diff --git a/config/webpack.server.config.js b/config/webpack.server.config.js
index 9f249e2..c9c41ff 100644
--- a/config/webpack.server.config.js
+++ b/config/webpack.server.config.js
@@ -8,6 +8,7 @@ const CleanPlugin = require('clean-webpack-plugin');
module.exports = function getConfig(env) {
const context = path.join(__dirname, '../');
+ const include = path.join(__dirname, '../src/cli');
return {
context,
@@ -36,17 +37,17 @@ module.exports = function getConfig(env) {
__dirname: false,
},
module: {
- noParse: /requireExternal/,
+ noParse: [/requireExternal/, /hotTemplate/],
rules: [
{
enforce: 'pre',
test: /\.js$/,
- exclude: [/node_modules/, /\.min\.js$/],
+ include,
use: 'eslint-loader',
},
{
test: /\.js$/,
- exclude: /node_modules/,
+ include,
use: 'babel-loader',
},
],
diff --git a/dist/cli/index.js b/dist/cli/index.js
index 6f9b991..e0ee01f 100644
--- a/dist/cli/index.js
+++ b/dist/cli/index.js
@@ -63,2179 +63,366 @@
/******/ __webpack_require__.p = "../";
/******/
/******/ // Load entry module and return exports
-/******/ return __webpack_require__(__webpack_require__.s = 29);
+/******/ return __webpack_require__(__webpack_require__.s = 30);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
+/* no static exports found */
+/* all exports used */
+/*!***********************!*\
+ !*** external "path" ***!
+ \***********************/
/***/ (function(module, exports) {
-module.exports = require("path");
+eval("module.exports = require(\"path\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9leHRlcm5hbCBcInBhdGhcIj81YjJhIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcInBhdGhcIik7XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gZXh0ZXJuYWwgXCJwYXRoXCJcbi8vIG1vZHVsZSBpZCA9IDBcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 1 */
+/* no static exports found */
+/* all exports used */
+/*!**************************!*\
+ !*** ./src/cli/utils.js ***!
+ \**************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.normalizeSectionData = normalizeSectionData;
-exports.writeSectionData = writeSectionData;
-exports.getTemplateDataPair = getTemplateDataPair;
-exports.normalizeHeader = normalizeHeader;
-exports.wrapMarkup = wrapMarkup;
-exports.generateFilename = generateFilename;
-exports.writeFile = writeFile;
-exports.removeFile = removeFile;
-exports.writeSectionTemplate = writeSectionTemplate;
-exports.getSection = getSection;
-exports.matchKssDir = matchKssDir;
-exports.mergeClassnameJSON = mergeClassnameJSON;
-exports.removeTrailingSlash = removeTrailingSlash;
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-var _fsExtra = __webpack_require__(3);
-
-var _fsExtra2 = _interopRequireDefault(_fsExtra);
-
-var _chalk = __webpack_require__(2);
-
-var _chalk2 = _interopRequireDefault(_chalk);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const cwd = process.cwd(); // Current working directory
-
-/**
- * Ensure predictable data structure for KSS section data
- *
- * @function normalizeSectionData
- * @param {object} section - section data
- * @return {object} section data
- */
-/** @module cli/utilities */
-function normalizeSectionData(section) {
- const data = section.data || section;
-
- if (!data.referenceURI || '' === data.referenceURI) {
- data.referenceURI = section.referenceURI();
- }
-
- return data;
-}
-
-/**
- * Ensure predictable data structure for KSS section data
- *
- * @function writeSectionData
- * @param {object} store - data store
- * @param {object} section - section data
- * @param {string} sectionPath - output destination for section data file
- */
-function writeSectionData(store, section, sectionPath = false) {
- let outputPath = sectionPath;
- let sectionFileInfo;
-
- if (!outputPath && {}.hasOwnProperty.call(section, 'kssPath')) {
- sectionFileInfo = _path2.default.parse(section.kssPath);
- outputPath = _path2.default.join(sectionFileInfo.dir, `${sectionFileInfo.name}.json`);
- }
-
- // Output section data
- if (outputPath) {
- return writeFile(section.referenceURI, 'section', outputPath, JSON.stringify(section), store);
- }
-
- console.warn( // eslint-disable-line no-console
- _chalk2.default.red(`Failed to write section data for ${section.referenceURI}`));
- return false;
-}
-
-/**
- * Find .json from a template file or vice versa
- *
- * @function getTemplateDataPair
- * @param {object} file - file object from path.parse()
- * @param {object} section - KSS section data
- * @return {string} relative path to module JSON file
- */
-function getTemplateDataPair(file, section, store) {
- const huron = store.get('config');
- const kssDir = matchKssDir(file.dir, huron);
-
- if (kssDir) {
- const componentPath = _path2.default.relative(_path2.default.resolve(cwd, kssDir), file.dir);
- const partnerType = '.json' === file.ext ? 'template' : 'data';
- const partnerExt = '.json' === file.ext ? huron.get('templates').extension : '.json';
-
- const pairPath = _path2.default.join(componentPath, generateFilename(section.referenceURI, partnerType, partnerExt, store));
-
- return `./${pairPath}`;
- }
-
- return false;
-}
-
-/**
- * Normalize a section title for use as a filename
- *
- * @function normalizeHeader
- * @param {string} header - section header extracted from KSS documentation
- * @return {string} modified header, lowercase and words separated by dash
- */
-function normalizeHeader(header) {
- return header.toLowerCase().replace(/\s?\W\s?/g, '-');
-}
-
-/**
- * Wrap html in required template tags
- *
- * @function wrapMarkup
- * @param {string} content - html or template markup
- * @param {string} templateId - id of template (should be section reference)
- * @return {string} modified HTML
- */
-function wrapMarkup(content, templateId) {
- return `
-
-${content}
-
-\n`;
-}
-
-/**
- * Generate a filename based on referenceURI, type and file object
- *
- * @function generateFilename
- * @param {string} id - The name of the file (with extension).
- * @param {string} type - the type of file output
- * @param {object} ext - file extension
- * @param {store} store - data store
- * @return {string} Path to output file, relative to ouput dir (can be use in require statements)
- */
-function generateFilename(id, type, ext, store) {
- // Type of file and its corresponding extension(s)
- const types = store.get('types');
- const outputExt = '.scss' !== ext ? ext : '.html';
-
- /* eslint-disable */
- if (-1 === types.indexOf(type)) {
- console.log(`Huron data ${type} does not exist`);
- return false;
- }
- /* eslint-enable */
-
- return `${id}-${type}${outputExt}`;
-}
-
-/**
- * Copy an HTML file into the huron output directory.
- *
- * @function writeFile
- * @param {string} id - The name of the file (with extension).
- * @param {string} content - The content of the file to write.
- * @param {string} type - the type of file output
- * @param {object} store - The data store
- * @return {string} Path to output file, relative to ouput dir (can be use in require statements)
- */
-function writeFile(id, type, filepath, content, store) {
- const huron = store.get('config');
- const file = _path2.default.parse(filepath);
- const filename = generateFilename(id, type, file.ext, store);
- const kssDir = matchKssDir(filepath, huron);
-
- if (kssDir) {
- const componentPath = _path2.default.relative(_path2.default.resolve(cwd, kssDir), file.dir);
- const outputRelative = _path2.default.join(huron.get('output'), componentPath, `${filename}`);
- const outputPath = _path2.default.resolve(cwd, huron.get('root'), outputRelative);
- let newContent = content;
-
- if ('data' !== type && 'section' !== type) {
- newContent = wrapMarkup(content, id);
- }
-
- try {
- _fsExtra2.default.outputFileSync(outputPath, newContent);
- console.log(_chalk2.default.green(`Writing ${outputRelative}`)); // eslint-disable-line no-console
- } catch (e) {
- console.log(_chalk2.default.red(`Failed to write ${outputRelative}`)); // eslint-disable-line no-console
- }
-
- return `./${outputRelative.replace(`${huron.get('output')}/`, '')}`;
- }
-
- return false;
-}
-
-/**
- * Delete a file in the huron output directory
- *
- * @function removeFile
- * @param {string} filename - The name of the file (with extension).
- * @param {object} store - The data store
- * @return {string} Path to output file, relative to ouput dir (can be use in require statements)
- */
-function removeFile(id, type, filepath, store) {
- const huron = store.get('config');
- const file = _path2.default.parse(filepath);
- const filename = generateFilename(id, type, file.ext, store);
- const kssDir = matchKssDir(filepath, huron);
-
- if (kssDir) {
- const componentPath = _path2.default.relative(_path2.default.resolve(cwd, kssDir), file.dir);
- const outputRelative = _path2.default.join(huron.get('output'), componentPath, `${filename}`);
- const outputPath = _path2.default.resolve(cwd, huron.get('root'), outputRelative);
-
- try {
- _fsExtra2.default.removeSync(outputPath);
- console.log(_chalk2.default.green(`Removing ${outputRelative}`)); // eslint-disable-line no-console
- } catch (e) {
- console.log( // eslint-disable-line no-console
- _chalk2.default.red(`${outputRelative} does not exist or cannot be deleted`));
- }
-
- return `./${outputRelative.replace(`${huron.get('output')}/`, '')}`;
- }
-
- return false;
-}
-
-/**
- * Write a template for sections
- *
- * @function writeSectionTemplate
- * @param {string} filepath - the original template file
- * @param {object} store - data store
- * @return {object} updated store
- */
-function writeSectionTemplate(filepath, store) {
- const huron = store.get('config');
- const sectionTemplate = wrapMarkup(_fsExtra2.default.readFileSync(filepath, 'utf8'));
- const componentPath = './huron-assets/section.hbs';
- const output = _path2.default.join(cwd, huron.get('root'), componentPath);
-
- // Move huron script and section template into huron root
- _fsExtra2.default.outputFileSync(output, sectionTemplate);
- console.log(_chalk2.default.green(`writing section template to ${output}`)); // eslint-disable-line no-console
-
- return store.set('sectionTemplatePath', componentPath);
-}
-
-/**
- * Request for section data based on section reference
- *
- * @function writeSectionTemplate
- * @param {string} search - key on which to match section
- * @param {field} string - field in which to look to determine section
- * @param {obj} store - sections memory store
- */
-function getSection(search, field, store) {
- const sectionValues = store.getIn(['sections', 'sectionsByPath']).valueSeq();
- let selectedSection = false;
-
- if (field) {
- selectedSection = sectionValues.filter(value => value[field] === search).get(0);
- } else {
- selectedSection = store.getIn(['sections', 'sectionsByPath', search]);
- }
-
- return selectedSection;
-}
-
-/**
- * Find which configured KSS directory a filepath exists in
- *
- * @function matchKssDir
- * @param {string} filepath - filepath to search for
- * @param {object} huron - huron configuration
- * @return {string} kssMatch - relative path to KSS directory
- */
-function matchKssDir(filepath, huron) {
- const kssSource = huron.get('kss');
- // Include forward slash in our test to make sure we're matchin a directory, not a file extension
- const kssMatch = kssSource.filter(dir => filepath.includes(`/${dir}`));
-
- if (kssMatch.length) {
- return kssMatch[0];
- }
-
- return false;
-}
-
-/**
- * Merge JSON files for css modules classnames in a provided directory
- *
- * @function mergeClassnameJSON
- * @param {string} directory - directory containing classname JSON files
- *
- * @return {object} classnamesMerged - merged classnames. contents of each JSON file is nested within
- * the returned object by filename. (e.g. article.json -> { article: {...json contents}})
- */
-function mergeClassnameJSON(directory) {
- let files;
-
- // Try to read through classnames directory
- try {
- files = _fsExtra2.default.readdirSync(directory);
- } catch (e) {
- console.warn(_chalk2.default.red(e));
- return {};
- }
-
- // Merge classname json files
- const classNamesMerged = files.reduce((acc, file) => {
- const fileInfo = _path2.default.parse(file);
- let classNames = {};
-
- if ('.json' === fileInfo.ext) {
- try {
- const contents = _fsExtra2.default.readFileSync(_path2.default.join(directory, file), 'utf8');
- classNames = JSON.parse(contents);
- } catch (e) {
- console.warn(_chalk2.default.red(e));
- return classNames;
- }
- }
-
- return Object.assign({}, acc, { [fileInfo.name]: classNames });
- }, {});
-
- return classNamesMerged;
-}
-
-/**
- * Remove the trailing slash from a provided directory
- *
- * @function removeTrailingSlash
- * @param {string} directory - directory path
- * @return {string} directory - directory path with trailing slash removed
- */
-function removeTrailingSlash(directory) {
- if ('/' === directory.slice(-1)) {
- return directory.slice(0, -1);
- }
-
- return directory;
-}
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.normalizeSectionData = normalizeSectionData;\nexports.writeSectionData = writeSectionData;\nexports.getTemplateDataPair = getTemplateDataPair;\nexports.normalizeHeader = normalizeHeader;\nexports.wrapMarkup = wrapMarkup;\nexports.generateFilename = generateFilename;\nexports.writeFile = writeFile;\nexports.removeFile = removeFile;\nexports.writeSectionTemplate = writeSectionTemplate;\nexports.getSection = getSection;\nexports.matchKssDir = matchKssDir;\nexports.mergeClassnameJSON = mergeClassnameJSON;\nexports.removeTrailingSlash = removeTrailingSlash;\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _fsExtra = __webpack_require__(/*! fs-extra */ 3);\n\nvar _fsExtra2 = _interopRequireDefault(_fsExtra);\n\nvar _chalk = __webpack_require__(/*! chalk */ 2);\n\nvar _chalk2 = _interopRequireDefault(_chalk);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst cwd = process.cwd(); // Current working directory\n\n/**\n * Ensure predictable data structure for KSS section data\n *\n * @function normalizeSectionData\n * @param {object} section - section data\n * @return {object} section data\n */\n/** @module cli/utilities */\nfunction normalizeSectionData(section) {\n const data = section.data || section;\n\n if (!data.referenceURI || '' === data.referenceURI) {\n data.referenceURI = section.referenceURI();\n }\n\n return data;\n}\n\n/**\n * Ensure predictable data structure for KSS section data\n *\n * @function writeSectionData\n * @param {object} store - data store\n * @param {object} section - section data\n * @param {string} sectionPath - output destination for section data file\n */\nfunction writeSectionData(store, section, sectionPath = false) {\n let outputPath = sectionPath;\n let sectionFileInfo;\n\n if (!outputPath && {}.hasOwnProperty.call(section, 'kssPath')) {\n sectionFileInfo = _path2.default.parse(section.kssPath);\n outputPath = _path2.default.join(sectionFileInfo.dir, `${sectionFileInfo.name}.json`);\n }\n\n // Output section data\n if (outputPath) {\n return writeFile(section.referenceURI, 'section', outputPath, JSON.stringify(section), store);\n }\n\n console.warn( // eslint-disable-line no-console\n _chalk2.default.red(`Failed to write section data for ${section.referenceURI}`));\n return false;\n}\n\n/**\n * Find .json from a template file or vice versa\n *\n * @function getTemplateDataPair\n * @param {object} file - file object from path.parse()\n * @param {object} section - KSS section data\n * @return {string} relative path to module JSON file\n */\nfunction getTemplateDataPair(file, section, store) {\n const huron = store.get('config');\n const kssDir = matchKssDir(file.dir, huron);\n\n if (kssDir) {\n const componentPath = _path2.default.relative(_path2.default.resolve(cwd, kssDir), file.dir);\n const partnerType = '.json' === file.ext ? 'template' : 'data';\n const partnerExt = '.json' === file.ext ? huron.get('templates').extension : '.json';\n\n const pairPath = _path2.default.join(componentPath, generateFilename(section.referenceURI, partnerType, partnerExt, store));\n\n return `./${pairPath}`;\n }\n\n return false;\n}\n\n/**\n * Normalize a section title for use as a filename\n *\n * @function normalizeHeader\n * @param {string} header - section header extracted from KSS documentation\n * @return {string} modified header, lowercase and words separated by dash\n */\nfunction normalizeHeader(header) {\n return header.toLowerCase().replace(/\\s?\\W\\s?/g, '-');\n}\n\n/**\n * Wrap html in required template tags\n *\n * @function wrapMarkup\n * @param {string} content - html or template markup\n * @param {string} templateId - id of template (should be section reference)\n * @return {string} modified HTML\n */\nfunction wrapMarkup(content, templateId) {\n return `\n\n${content}\n\n\\n`;\n}\n\n/**\n * Generate a filename based on referenceURI, type and file object\n *\n * @function generateFilename\n * @param {string} id - The name of the file (with extension).\n * @param {string} type - the type of file output\n * @param {object} ext - file extension\n * @param {store} store - data store\n * @return {string} Path to output file, relative to ouput dir (can be use in require statements)\n */\nfunction generateFilename(id, type, ext, store) {\n // Type of file and its corresponding extension(s)\n const types = store.get('types');\n const outputExt = '.scss' !== ext ? ext : '.html';\n\n /* eslint-disable */\n if (-1 === types.indexOf(type)) {\n console.log(`Huron data ${type} does not exist`);\n return false;\n }\n /* eslint-enable */\n\n return `${id}-${type}${outputExt}`;\n}\n\n/**\n * Copy an HTML file into the huron output directory.\n *\n * @function writeFile\n * @param {string} id - The name of the file (with extension).\n * @param {string} content - The content of the file to write.\n * @param {string} type - the type of file output\n * @param {object} store - The data store\n * @return {string} Path to output file, relative to ouput dir (can be use in require statements)\n */\nfunction writeFile(id, type, filepath, content, store) {\n const huron = store.get('config');\n const file = _path2.default.parse(filepath);\n const filename = generateFilename(id, type, file.ext, store);\n const kssDir = matchKssDir(filepath, huron);\n\n if (kssDir) {\n const componentPath = _path2.default.relative(_path2.default.resolve(cwd, kssDir), file.dir);\n const outputRelative = _path2.default.join(huron.get('output'), componentPath, `${filename}`);\n const outputPath = _path2.default.resolve(cwd, huron.get('root'), outputRelative);\n let newContent = content;\n\n if ('data' !== type && 'section' !== type) {\n newContent = wrapMarkup(content, id);\n }\n\n try {\n _fsExtra2.default.outputFileSync(outputPath, newContent);\n console.log(_chalk2.default.green(`Writing ${outputRelative}`)); // eslint-disable-line no-console\n } catch (e) {\n console.log(_chalk2.default.red(`Failed to write ${outputRelative}`)); // eslint-disable-line no-console\n }\n\n return `./${outputRelative.replace(`${huron.get('output')}/`, '')}`;\n }\n\n return false;\n}\n\n/**\n * Delete a file in the huron output directory\n *\n * @function removeFile\n * @param {string} filename - The name of the file (with extension).\n * @param {object} store - The data store\n * @return {string} Path to output file, relative to ouput dir (can be use in require statements)\n */\nfunction removeFile(id, type, filepath, store) {\n const huron = store.get('config');\n const file = _path2.default.parse(filepath);\n const filename = generateFilename(id, type, file.ext, store);\n const kssDir = matchKssDir(filepath, huron);\n\n if (kssDir) {\n const componentPath = _path2.default.relative(_path2.default.resolve(cwd, kssDir), file.dir);\n const outputRelative = _path2.default.join(huron.get('output'), componentPath, `${filename}`);\n const outputPath = _path2.default.resolve(cwd, huron.get('root'), outputRelative);\n\n try {\n _fsExtra2.default.removeSync(outputPath);\n console.log(_chalk2.default.green(`Removing ${outputRelative}`)); // eslint-disable-line no-console\n } catch (e) {\n console.log( // eslint-disable-line no-console\n _chalk2.default.red(`${outputRelative} does not exist or cannot be deleted`));\n }\n\n return `./${outputRelative.replace(`${huron.get('output')}/`, '')}`;\n }\n\n return false;\n}\n\n/**\n * Write a template for sections\n *\n * @function writeSectionTemplate\n * @param {string} filepath - the original template file\n * @param {object} store - data store\n * @return {object} updated store\n */\nfunction writeSectionTemplate(filepath, store) {\n const huron = store.get('config');\n const sectionTemplate = wrapMarkup(_fsExtra2.default.readFileSync(filepath, 'utf8'));\n const componentPath = './huron-assets/section.hbs';\n const output = _path2.default.join(cwd, huron.get('root'), componentPath);\n\n // Move huron script and section template into huron root\n _fsExtra2.default.outputFileSync(output, sectionTemplate);\n console.log(_chalk2.default.green(`writing section template to ${output}`)); // eslint-disable-line no-console\n\n return store.set('sectionTemplatePath', componentPath);\n}\n\n/**\n * Request for section data based on section reference\n *\n * @function writeSectionTemplate\n * @param {string} search - key on which to match section\n * @param {field} string - field in which to look to determine section\n * @param {obj} store - sections memory store\n */\nfunction getSection(search, field, store) {\n const sectionValues = store.getIn(['sections', 'sectionsByPath']).valueSeq();\n let selectedSection = false;\n\n if (field) {\n selectedSection = sectionValues.filter(value => value[field] === search).get(0);\n } else {\n selectedSection = store.getIn(['sections', 'sectionsByPath', search]);\n }\n\n return selectedSection;\n}\n\n/**\n * Find which configured KSS directory a filepath exists in\n *\n * @function matchKssDir\n * @param {string} filepath - filepath to search for\n * @param {object} huron - huron configuration\n * @return {string} kssMatch - relative path to KSS directory\n */\nfunction matchKssDir(filepath, huron) {\n const kssSource = huron.get('kss');\n // Include forward slash in our test to make sure we're matchin a directory, not a file extension\n const kssMatch = kssSource.filter(dir => filepath.includes(`/${dir}`));\n\n if (kssMatch.length) {\n return kssMatch[0];\n }\n\n return false;\n}\n\n/**\n * Merge JSON files for css modules classnames in a provided directory\n *\n * @function mergeClassnameJSON\n * @param {string} directory - directory containing classname JSON files\n *\n * @return {object} classnamesMerged - merged classnames. contents of each JSON file is nested within\n * the returned object by filename. (e.g. article.json -> { article: {...json contents}})\n */\nfunction mergeClassnameJSON(directory) {\n let files;\n\n // Try to read through classnames directory\n try {\n files = _fsExtra2.default.readdirSync(directory);\n } catch (e) {\n console.warn(_chalk2.default.red(e));\n return {};\n }\n\n // Merge classname json files\n const classNamesMerged = files.reduce((acc, file) => {\n const fileInfo = _path2.default.parse(file);\n let classNames = {};\n\n if ('.json' === fileInfo.ext) {\n try {\n const contents = _fsExtra2.default.readFileSync(_path2.default.join(directory, file), 'utf8');\n classNames = JSON.parse(contents);\n } catch (e) {\n console.warn(_chalk2.default.red(e));\n return classNames;\n }\n }\n\n return Object.assign({}, acc, { [fileInfo.name]: classNames });\n }, {});\n\n return classNamesMerged;\n}\n\n/**\n * Remove the trailing slash from a provided directory\n *\n * @function removeTrailingSlash\n * @param {string} directory - directory path\n * @return {string} directory - directory path with trailing slash removed\n */\nfunction removeTrailingSlash(directory) {\n if ('/' === directory.slice(-1)) {\n return directory.slice(0, -1);\n }\n\n return directory;\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMS5qcyIsInNvdXJjZXMiOlsid2VicGFjazov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UNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7O0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/* 2 */
+/* no static exports found */
+/* all exports used */
+/*!************************!*\
+ !*** external "chalk" ***!
+ \************************/
/***/ (function(module, exports) {
-module.exports = require("chalk");
+eval("module.exports = require(\"chalk\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9leHRlcm5hbCBcImNoYWxrXCI/NTNmNyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoXCJjaGFsa1wiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcImNoYWxrXCJcbi8vIG1vZHVsZSBpZCA9IDJcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 3 */
+/* no static exports found */
+/* all exports used */
+/*!***************************!*\
+ !*** external "fs-extra" ***!
+ \***************************/
/***/ (function(module, exports) {
-module.exports = require("fs-extra");
+eval("module.exports = require(\"fs-extra\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9leHRlcm5hbCBcImZzLWV4dHJhXCI/N2NhNiJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoXCJmcy1leHRyYVwiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcImZzLWV4dHJhXCJcbi8vIG1vZHVsZSBpZCA9IDNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 4 */
+/* no static exports found */
+/* all exports used */
+/*!******************************!*\
+ !*** ./src/cli/parseArgs.js ***!
+ \******************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _commander = __webpack_require__(20);
-
-var _commander2 = _interopRequireDefault(_commander);
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-// Requires
-/** @global */
-
-/**
- * Process huron CLI arguments
- *
- * @function parseArgs
- * @example node huron/dist/cli/huron-cli.js --config 'client/config/webpack.config.js' --production
- */
-/** @module cli/parse-arguments */
-/* eslint-disable space-unary-ops */
-
-function parseArgs() {
- const envArg = {};
-
- process.argv = process.argv.filter(arg => {
- if (-1 !== arg.indexOf('--env')) {
- const envParts = arg.split('.')[1].split('=');
-
- envArg[envParts[0]] = envParts[1] || true;
- return false;
- }
-
- return true;
- });
-
- _commander2.default.version('1.0.1').option('-c, --huron-config [huronConfig]', '[huronConfig] for all huron options', _path2.default.resolve(__dirname, '../defaultConfig/huron.config.js')).option('-w, --webpack-config [webpackConfig]', '[webpackConfig] for all webpack options', _path2.default.resolve(__dirname, '../defaultConfig/webpack.config.js')).option('-p, --production', 'compile assets once for production');
-
- _commander2.default.env = envArg;
-
- // Only parse if we're not running tests
- if (!process.env.npm_lifecycle_event || 'test' !== process.env.npm_lifecycle_event) {
- _commander2.default.parse(process.argv);
- }
-}
-
-parseArgs();
-/* eslint-enable */
-
-exports.default = _commander2.default;
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _commander = __webpack_require__(/*! commander */ 21);\n\nvar _commander2 = _interopRequireDefault(_commander);\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Requires\n/** @global */\n\n/**\n * Process huron CLI arguments\n *\n * @function parseArgs\n * @example node huron/dist/cli/huron-cli.js --config 'client/config/webpack.config.js' --production\n */\n/** @module cli/parse-arguments */\n/* eslint-disable space-unary-ops */\n\nfunction parseArgs() {\n const envArg = {};\n\n process.argv = process.argv.filter(arg => {\n if (-1 !== arg.indexOf('--env')) {\n const envParts = arg.split('.')[1].split('=');\n\n envArg[envParts[0]] = envParts[1] || true;\n return false;\n }\n\n return true;\n });\n\n _commander2.default.version('1.0.1').option('-c, --huron-config [huronConfig]', '[huronConfig] for all huron options', _path2.default.resolve(__dirname, '../defaultConfig/huron.config.js')).option('-w, --webpack-config [webpackConfig]', '[webpackConfig] for all webpack options', _path2.default.resolve(__dirname, '../defaultConfig/webpack.config.js')).option('-p, --production', 'compile assets once for production');\n\n _commander2.default.env = envArg;\n\n // Only parse if we're not running tests\n if (!process.env.npm_lifecycle_event || 'test' !== process.env.npm_lifecycle_event) {\n _commander2.default.parse(process.argv);\n }\n}\n\nparseArgs();\n/* eslint-enable */\n\nexports.default = _commander2.default;//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvY2xpL3BhcnNlQXJncy5qcz9iYTdmIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKiBAbW9kdWxlIGNsaS9wYXJzZS1hcmd1bWVudHMgKi9cbi8qIGVzbGludC1kaXNhYmxlIHNwYWNlLXVuYXJ5LW9wcyAqL1xuXG5pbXBvcnQgcHJvZ3JhbSBmcm9tICdjb21tYW5kZXInO1xuaW1wb3J0IHBhdGggZnJvbSAncGF0aCc7XG5cbi8vIFJlcXVpcmVzXG4vKiogQGdsb2JhbCAqL1xuXG4v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fZGlybmFtZSwgJy4uL2RlZmF1bHRDb25maWcvd2VicGFjay5jb25maWcuanMnKVxuICAgIClcbiAgICAub3B0aW9uKCctcCwgLS1wcm9kdWN0aW9uJywgJ2NvbXBpbGUgYXNzZXRzIG9uY2UgZm9yIHByb2R1Y3Rpb24nKTtcblxuICBwcm9ncmFtLmVudiA9IGVudkFyZztcblxuICAvLyBPbmx5IHBhcnNlIGlmIHdlJ3JlIG5vdCBydW5uaW5nIHRlc3RzXG4gIGlmIChcbiAgICAhIHByb2Nlc3MuZW52Lm5wbV9saWZlY3ljbGVfZXZlbnQgfHxcbiAgICAndGVzdCcgIT09IHByb2Nlc3MuZW52Lm5wbV9saWZlY3ljbGVfZXZlbnRcbiAgKSB7XG4gICAgcHJvZ3JhbS5wYXJzZShwcm9jZXNzLmFyZ3YpO1xuICB9XG59XG5cbnBhcnNlQXJncygpO1xuLyogZXNsaW50LWVuYWJsZSAqL1xuXG5leHBvcnQgZGVmYXVsdCBwcm9ncmFtO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9jbGkvcGFyc2VBcmdzLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFHQTtBQUNBOzs7QUFBQTtBQUNBOzs7OztBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7QUFUQTtBQUNBO0FBQ0E7QUFhQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQVlBO0FBQ0E7QUFDQTtBQUNBO0FBSUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 5 */
+/* no static exports found */
+/* all exports used */
+/*!**************************!*\
+ !*** external "webpack" ***!
+ \**************************/
/***/ (function(module, exports) {
-module.exports = require("webpack");
+eval("module.exports = require(\"webpack\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9leHRlcm5hbCBcIndlYnBhY2tcIj8zOTNkIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcIndlYnBhY2tcIik7XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gZXh0ZXJuYWwgXCJ3ZWJwYWNrXCJcbi8vIG1vZHVsZSBpZCA9IDVcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 6 */
+/* no static exports found */
+/* all exports used */
+/*!*********************************!*\
+ !*** ./src/cli/defaultStore.js ***!
+ \*********************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.config = exports.defaultStore = undefined;
-
-var _immutable = __webpack_require__(23);
-
-var _generateConfig = __webpack_require__(13);
-
-var _generateConfig2 = _interopRequireDefault(_generateConfig);
-
-var _utils = __webpack_require__(1);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-// Create initial data structure
-
-// Merge Huron default webpack config with user config
-const config = (0, _generateConfig2.default)();
-
-// Make sure the kss option is represented as an array
-config.huron.kss = [].concat(config.huron.kss);
-
-/* eslint-disable */
-/**
- * Initial structure for immutable data store
- *
- * @global
- */
-const defaultStore = (0, _immutable.Map)({
- types: ['template', 'data', 'description', 'section', 'prototype', 'sections-template'],
- config: (0, _immutable.Map)(config.huron),
- classNames: (0, _utils.mergeClassnameJSON)(config.huron.classNames),
- sections: (0, _immutable.Map)({
- sectionsByPath: (0, _immutable.Map)({}),
- sectionsByURI: (0, _immutable.Map)({}),
- sorted: {}
- }),
- templates: (0, _immutable.Map)({}),
- prototypes: (0, _immutable.Map)({}),
- sectionTemplatePath: '',
- referenceDelimiter: '.'
-});
-/* eslint-enable */
-
-exports.defaultStore = defaultStore;
-exports.config = config;
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.config = exports.defaultStore = undefined;\n\nvar _immutable = __webpack_require__(/*! immutable */ 24);\n\nvar _generateConfig = __webpack_require__(/*! ./generateConfig */ 13);\n\nvar _generateConfig2 = _interopRequireDefault(_generateConfig);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Create initial data structure\n\n// Merge Huron default webpack config with user config\nconst config = (0, _generateConfig2.default)();\n\n// Make sure the kss option is represented as an array\nconfig.huron.kss = [].concat(config.huron.kss);\n\n/* eslint-disable */\n/**\n * Initial structure for immutable data store\n *\n * @global\n */\nconst defaultStore = (0, _immutable.Map)({\n types: ['template', 'data', 'description', 'section', 'prototype', 'sections-template'],\n config: (0, _immutable.Map)(config.huron),\n classNames: (0, _utils.mergeClassnameJSON)(config.huron.classNames),\n sections: (0, _immutable.Map)({\n sectionsByPath: (0, _immutable.Map)({}),\n sectionsByURI: (0, _immutable.Map)({}),\n sorted: {}\n }),\n templates: (0, _immutable.Map)({}),\n prototypes: (0, _immutable.Map)({}),\n sectionTemplatePath: '',\n referenceDelimiter: '.'\n});\n/* eslint-enable */\n\nexports.defaultStore = defaultStore;\nexports.config = config;//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNi5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvY2xpL2RlZmF1bHRTdG9yZS5qcz8zNzBmIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE1hcCB9IGZyb20gJ2ltbXV0YWJsZSc7XG5cbmltcG9ydCBnZW5lcmF0ZUNvbmZpZyBmcm9tICcuL2dlbmVyYXRlQ29uZmlnJztcbmltc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WxpbWl0ZXI6ICcuJyxcbn0pO1xuLyogZXNsaW50LWVuYWJsZSAqL1xuXG5leHBvcnQgeyBkZWZhdWx0U3RvcmUsIGNvbmZpZyB9O1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIHNyYy9jbGkvZGVmYXVsdFN0b3JlLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7QUFDQTtBQUNBO0FBQ0E7OztBQUFBO0FBQ0E7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7OztBQUtBO0FBQ0E7QUFRQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFIQTtBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBbkJBO0FBcUJBO0FBQ0E7QUFDQTtBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 7 */
+/* no static exports found */
+/* all exports used */
+/*!************************************!*\
+ !*** ./src/cli/handleTemplates.js ***!
+ \************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.updateTemplate = updateTemplate;
-exports.deleteTemplate = deleteTemplate;
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-var _fsExtra = __webpack_require__(3);
-
-var _fsExtra2 = _interopRequireDefault(_fsExtra);
-
-var _chalk = __webpack_require__(2);
-
-var _chalk2 = _interopRequireDefault(_chalk);
-
-var _utils = __webpack_require__(1);
-
-var utils = _interopRequireWildcard(_utils);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Handle update of a template or data (json) file
- *
- * @function updateTemplate
- * @param {string} filepath - filepath of changed file (comes from gaze)
- * @param {object} section - contains KSS section data
- * @param {object} store - memory store
- * @return {object} updated memory store
- */
-/** @module cli/template-handler */
-function updateTemplate(filepath, section, store) {
- const file = _path2.default.parse(filepath);
- const pairPath = utils.getTemplateDataPair(file, section, store);
- const type = '.json' === file.ext ? 'data' : 'template';
- const newSection = section;
- const newStore = store;
- let content = false;
-
- try {
- content = _fsExtra2.default.readFileSync(filepath, 'utf8');
- } catch (e) {
- console.log(_chalk2.default.red(`${filepath} does not exist`));
- }
-
- if (content) {
- const requirePath = utils.writeFile(newSection.referenceURI, type, filepath, content, newStore);
- newSection[`${type}Path`] = requirePath;
-
- if ('template' === type) {
- newSection.templateContent = content;
-
- // Rewrite section data with template content
- newSection.sectionPath = utils.writeSectionData(newStore, newSection);
- }
-
- return newStore.setIn(['templates', requirePath], pairPath).setIn(['sections', 'sectionsByPath', newSection.kssPath], newSection).setIn(['sections', 'sectionsByURI', newSection.referenceURI], newSection);
- }
-
- return newStore;
-}
-
-/**
- * Handle removal of a template or data (json) file
- *
- * @function deleteTemplate
- * @param {string} filepath - filepath of changed file (comes from gaze)
- * @param {object} section - contains KSS section data
- * @param {object} store - memory store
- * @return {object} updated memory store
- */
-function deleteTemplate(filepath, section, store) {
- const file = _path2.default.parse(filepath);
- const type = '.json' === file.ext ? 'data' : 'template';
- const newSection = section;
- const newStore = store;
-
- // Remove partner
- const requirePath = utils.removeFile(newSection.referenceURI, type, filepath, newStore);
- delete newSection[`${type}Path`];
-
- return newStore.deleteIn(['templates', requirePath]).setIn(['sections', 'sectionsByPath', newSection.kssPath], newSection).setIn(['sections', 'sectionsByURI', newSection.referenceURI], newSection);
-}
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.updateTemplate = updateTemplate;\nexports.deleteTemplate = deleteTemplate;\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _fsExtra = __webpack_require__(/*! fs-extra */ 3);\n\nvar _fsExtra2 = _interopRequireDefault(_fsExtra);\n\nvar _chalk = __webpack_require__(/*! chalk */ 2);\n\nvar _chalk2 = _interopRequireDefault(_chalk);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1);\n\nvar utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handle update of a template or data (json) file\n *\n * @function updateTemplate\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - contains KSS section data\n * @param {object} store - memory store\n * @return {object} updated memory store\n */\n/** @module cli/template-handler */\nfunction updateTemplate(filepath, section, store) {\n const file = _path2.default.parse(filepath);\n const pairPath = utils.getTemplateDataPair(file, section, store);\n const type = '.json' === file.ext ? 'data' : 'template';\n const newSection = section;\n const newStore = store;\n let content = false;\n\n try {\n content = _fsExtra2.default.readFileSync(filepath, 'utf8');\n } catch (e) {\n console.log(_chalk2.default.red(`${filepath} does not exist`));\n }\n\n if (content) {\n const requirePath = utils.writeFile(newSection.referenceURI, type, filepath, content, newStore);\n newSection[`${type}Path`] = requirePath;\n\n if ('template' === type) {\n newSection.templateContent = content;\n\n // Rewrite section data with template content\n newSection.sectionPath = utils.writeSectionData(newStore, newSection);\n }\n\n return newStore.setIn(['templates', requirePath], pairPath).setIn(['sections', 'sectionsByPath', newSection.kssPath], newSection).setIn(['sections', 'sectionsByURI', newSection.referenceURI], newSection);\n }\n\n return newStore;\n}\n\n/**\n * Handle removal of a template or data (json) file\n *\n * @function deleteTemplate\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - contains KSS section data\n * @param {object} store - memory store\n * @return {object} updated memory store\n */\nfunction deleteTemplate(filepath, section, store) {\n const file = _path2.default.parse(filepath);\n const type = '.json' === file.ext ? 'data' : 'template';\n const newSection = section;\n const newStore = store;\n\n // Remove partner\n const requirePath = utils.removeFile(newSection.referenceURI, type, filepath, newStore);\n delete newSection[`${type}Path`];\n\n return newStore.deleteIn(['templates', requirePath]).setIn(['sections', 'sectionsByPath', newSection.kssPath], newSection).setIn(['sections', 'sectionsByURI', newSection.referenceURI], newSection);\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvY2xpL2hhbmRsZVRlbXBsYXRlcy5qcz8yYzdmIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKiBAbW9kdWxlIGNsaS90ZW1wbGF0ZS1oYW5kbGVyICovXG5pbXBvcnQgcGF0aCBmcm9tICdwYXRoJztcbmltcG9ydCBmcyBmcm9tICdmcy1leHRyYSc7XG5pbXBvcnQgY2hhbGsgZnJvbSAnY2hhbGsnO1xuXG5pbXBvcnQgKiBhcyB1dGlscyBmcm9tICcuL3V0aWxzJztcblxuLyoqXG4gKiBIYW5kbGUgdXBkYXRlIG9mIGEgdGVtcGxhdGUgb3IgZGF0YSAoanNvbikgZmlsZVxuICpcbiAqIEBmdW5jdGlvbiB1cGRhdGVUZW1wbGF0ZVxuICogQHBhcmFtIHtzdHJpbmd9IGZpbGVwYXRoIC0gZmlsZXBhdGggb2YgY2hhbmdlZCBmaWxlIChjb21lcyBmcm9tIGdhemUpXG4gKiBAcGFyYW0ge29iamVjdH0gc2VjdGlvbiAtIGNvbnRhaW5zIEtTUyBzZWN0aW9uIGRhdGFcbiAqIEBwYXJhbSB7b2JqZWN0fSBzdG9yZSAtIG1lbW9yeSBzdG9yZVxuICogQHJldHVybiB7b2JqZWN0fSB1cGRhdGVkIG1lbW9yeSBzdG9yZVxuICovXG5leHBvcnQgZnVuY3Rpb24gdXBkYXRlVGVtcGxhdGUoZmlsZXBhdGgsIHNlY3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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBYUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7Ozs7QUFTQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBTUE7QUFDQTtBQUNBO0FBVUEiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/* 8 */
+/* no static exports found */
+/* all exports used */
+/*!*************************************!*\
+ !*** ./src/cli/requireTemplates.js ***!
+ \*************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.writeStore = exports.requireTemplates = undefined;
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-var _fsExtra = __webpack_require__(3);
-
-var _fsExtra2 = _interopRequireDefault(_fsExtra);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/** @module cli/require-templates */
-
-const cwd = process.cwd();
-const huronScript = _fsExtra2.default.readFileSync(_path2.default.join(__dirname, '../web/index.js'), 'utf8');
-
-/**
- * Write code for requiring all generated huron assets
- * Note: prepended and appended code in this file should roughly follow es5 syntax for now,
- * as it will not pass through the Huron internal babel build nor can we assume the user is
- * working with babel.
- *
- * @function requireTemplates
- * @param {object} store - memory store
- */
-const requireTemplates = exports.requireTemplates = function requireTemplates(store) {
- const huron = store.get('config');
- const outputPath = _path2.default.join(cwd, huron.get('root'), 'huron-assets');
- const requireRegex = new RegExp(`\\.html|\\.json|\\${huron.get('templates').extension}$`);
- const requirePath = `'../${huron.get('output')}'`;
-
- // Initialize templates, js, css and Hot Module Replacement acceptance logic
- const hotTemplate = `
-var store = require('./huron-store');
-var InsertNodes = require('./insertNodes').default;
-var sectionTemplate = require('./section.hbs');
-var assets = require.context(${requirePath}, true, ${requireRegex});
-var modules = {};
-
-modules['${store.get('sectionTemplatePath')}'] = sectionTemplate;
-
-assets.keys().forEach(function(key) {
- modules[key] = assets(key);
-});
-
-var insert = window.insert ? window.insert :
- new InsertNodes(modules, store);
-window.insert = insert;
-
-if (module.hot) {
- // Hot Module Replacement for huron components (json, hbs, html)
- module.hot.accept(
- assets.id,
- () => {
- var newAssets = require.context(
- ${requirePath},
- true,
- ${requireRegex}
- );
- var newModules = newAssets.keys()
- .map((key) => {
- return [key, newAssets(key)];
- })
- .filter((newModule) => {
- return modules[newModule[0]] !== newModule[1];
- });
-
- updateStore(require('./huron-store.js'));
-
- newModules.forEach((module) => {
- modules[module[0]] = module[1];
- hotReplace(module[0], module[1], modules);
- });
- }
- );
-
- // Hot Module Replacement for sections template
- module.hot.accept(
- './section.hbs',
- () => {
- var newSectionTemplate = require('./section.hbs');
- modules['${store.get('sectionTemplatePath')}'] = newSectionTemplate;
- hotReplace(
- './huron-assets/section.hbs',
- newSectionTemplate,
- modules
- );
- }
- );
-
- // Hot Module Replacement for data store
- module.hot.accept(
- './huron-store.js',
- () => {
- updateStore(require('./huron-store.js'));
- }
- );
-}
-
-function hotReplace(key, module, modules) {
- insert.modules = modules;
- if (key === store.sectionTemplatePath) {
- insert.cycleSections();
- } else {
- insert.inserted = [];
- insert.loadModule(key, module, false);
- }
-};
-
-function updateStore(newStore) {
- insert.store = newStore;
-}\n`;
-
- // Write the contents of this script.
- // @todo lint this file.
- _fsExtra2.default.outputFileSync(_path2.default.join(outputPath, 'index.js'), `/*eslint-disable*/\n
-${hotTemplate}\n\n
-/*eslint-enable*/\n`);
- _fsExtra2.default.outputFileSync(_path2.default.join(outputPath, 'insertNodes.js'), huronScript);
-};
-
-/**
- * Output entire data store to a JS object and handle if any KSS data has changed
- *
- * @function writeStore
- * @param {object} store - memory store
- * @param {string} changed - filepath of changed KSS section, if applicable
- */
-const writeStore = exports.writeStore = function writeStore(store, newStore = false) {
- const updatedStore = newStore || store;
- const huron = updatedStore.get('config');
- const outputPath = _path2.default.join(cwd, huron.get('root'), 'huron-assets');
-
- // Write updated data store
- // @todo lint this file.
- _fsExtra2.default.outputFileSync(_path2.default.join(outputPath, 'huron-store.js'), `/*eslint-disable*/
- module.exports = ${JSON.stringify(updatedStore.toJSON())}
- /*eslint-disable*/\n`);
-};
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.writeStore = exports.requireTemplates = undefined;\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _fsExtra = __webpack_require__(/*! fs-extra */ 3);\n\nvar _fsExtra2 = _interopRequireDefault(_fsExtra);\n\nvar _hotTemplate = __webpack_require__(/*! raw-loader!babel-loader!../../templates/hotTemplate */ 31);\n\nvar _hotTemplate2 = _interopRequireDefault(_hotTemplate);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-enable */\n\nconst cwd = process.cwd();\n\n// We need to prepend this to the browser script as a string but still want to transpile it,\n// hence loading it using `raw-loader` so we receive a string from webpack\n/* eslint-disable */\n/** @module cli/require-templates */\n\nconst huronScript = _fsExtra2.default.readFileSync(_path2.default.join(__dirname, '../web/index.js'), 'utf8');\n\n/**\n * Write code for requiring all generated huron assets\n *\n * @function requireTemplates\n * @param {object} store - memory store\n */\nconst requireTemplates = exports.requireTemplates = function requireTemplates(store) {\n const huron = store.get('config');\n const outputPath = _path2.default.join(cwd, huron.get('root'), 'huron-assets');\n // These will be used to replace strings in the hotTemplate.\n // In order to accurately replace strings but still keep things parseable by eslint and babel,\n // each replaceable value should be referenced in `hotTemplate.js` under the `hotScope` object.\n // For example, if you need to replace a string with a value passed in from the CLI called `userVariable`,\n // you would reference that string in `hotTemplate.js` with `hotScope.userVariable`.\n const hotVariableScope = {\n sectionTemplatePath: `'${huron.get('sectionTemplate')}'`,\n requireRegex: new RegExp(`\\\\.html|\\\\.json|\\\\${huron.get('templates').extension}$`),\n requirePath: `'../${huron.get('output')}'`\n };\n const hotTemplateTransformed = Object.keys(hotVariableScope).reduce((acc, curr) => acc.replace(new RegExp(`hotScope.${curr}`, 'g'), hotVariableScope[curr]), _hotTemplate2.default);\n\n // Write the contents of this script.\n _fsExtra2.default.outputFileSync(_path2.default.join(outputPath, 'index.js'), hotTemplateTransformed);\n _fsExtra2.default.outputFileSync(_path2.default.join(outputPath, 'insertNodes.js'), huronScript);\n};\n\n/**\n * Output entire data store to a JS object and handle if any KSS data has changed\n *\n * @function writeStore\n * @param {object} store - memory store\n * @param {string} changed - filepath of changed KSS section, if applicable\n */\nconst writeStore = exports.writeStore = function writeStore(store, newStore = false) {\n const updatedStore = newStore || store;\n const huron = updatedStore.get('config');\n const outputPath = _path2.default.join(cwd, huron.get('root'), 'huron-assets');\n\n // Write updated data store\n _fsExtra2.default.outputFileSync(_path2.default.join(outputPath, 'huron-store.js'), `module.exports = ${JSON.stringify(updatedStore.toJSON())}`);\n};//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvY2xpL3JlcXVpcmVUZW1wbGF0ZXMuanM/ZmViYSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQG1vZHVsZSBjbGkvcmVxdWlyZS10ZW1wbGF0ZXMgKi9cbmltcG9ydCBwYXRoIGZyb20gJ3BhdGgnO1xuaW1wb3J0IGZzIGZyb20gJ2ZzLWV4dHJhJztcblxuLy8gV2UgbmVlZCB0byBwcmVwZW5kIHRoaXMgdG8gdGhlIGJyb3dzZXIgc2NyaXB0IGFzIGEgc3RyaW5nIGJ1dCBzdGlsbCB3YW50IHRvIHRyYW5zcGlsZSBpdCxcbi8vIGhlbmNlIGxvYWRpbmcgaXQgdXNpbmcgYHJhdy1sb2FkZXJgIHNvIHdlIHJlY2VpdmUgYSBzdHJpbmcgZnJvbSB3ZWJwYWNrXG4vKiBlc2xpbnQtZGlzYWJsZSAqL1xuaW1wb3J0IGhvdFRlbXBsYXRlIGZyb20gJyFyYXctbG9hZGVyIWJhYm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uanMiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFDQTtBQUNBOzs7QUFBQTtBQUNBOzs7QUFJQTtBQUNBOzs7OztBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBUEE7QUFDQTtBQUNBO0FBTkE7QUFDQTtBQVVBO0FBQ0E7QUFJQTs7Ozs7O0FBTUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUdBO0FBTEE7QUFPQTtBQUNBO0FBT0E7QUFDQTtBQUlBO0FBSUE7QUFDQTtBQUNBOzs7Ozs7O0FBT0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFJQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 9 */
+/* no static exports found */
+/* all exports used */
+/*!**************************!*\
+ !*** ./src/cli/index.js ***!
+ \**************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-var _chalk = __webpack_require__(2);
-
-var _chalk2 = _interopRequireDefault(_chalk);
-
-var _actions = __webpack_require__(11);
-
-var _requireTemplates = __webpack_require__(8);
-
-var _utils = __webpack_require__(1);
-
-var _parseArgs = __webpack_require__(4);
-
-var _parseArgs2 = _interopRequireDefault(_parseArgs);
-
-var _server = __webpack_require__(17);
-
-var _server2 = _interopRequireDefault(_server);
-
-var _defaultStore = __webpack_require__(6);
-
-var _fileWatcher = __webpack_require__(12);
-
-var _fileWatcher2 = _interopRequireDefault(_fileWatcher);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Initialize data store with files from gaze and original data structure
- *
- * @global
- */
-// Local imports
-const store = (0, _actions.initFiles)(_fileWatcher2.default.watched(), _defaultStore.defaultStore);
-const huron = _defaultStore.defaultStore.get('config');
-
-(0, _requireTemplates.requireTemplates)(store);
-(0, _requireTemplates.writeStore)(store);
-
-if (!_parseArgs2.default.production) {
- /** @module cli/gaze */
- let newStore = store;
-
- _fileWatcher2.default.on('all', (event, filepath) => {
- newStore = (0, _actions.updateClassNames)(filepath, newStore);
- (0, _requireTemplates.writeStore)(newStore);
- });
-
- /**
- * Anonymous handler for Gaze 'changed' event indicating a file has changed
- *
- * @callback changed
- * @listens gaze:changed
- * @param {string} filepath - absolute path of changed file
- */
- _fileWatcher2.default.on('changed', filepath => {
- if ((0, _utils.matchKssDir)(filepath, huron)) {
- newStore = (0, _actions.updateFile)(filepath, newStore);
- }
-
- console.log(_chalk2.default.green(`${filepath} updated!`));
- });
-
- /**
- * Anonymous handler for Gaze 'added' event indicating a file has been added to the watched directories
- *
- * @callback added
- * @listens gaze:added
- * @param {string} filepath - absolute path of changed file
- */
- _fileWatcher2.default.on('added', filepath => {
- if ((0, _utils.matchKssDir)(filepath, huron)) {
- newStore = (0, _actions.updateFile)(filepath, newStore);
- (0, _requireTemplates.writeStore)(newStore);
- }
-
- console.log(_chalk2.default.blue(`${filepath} added!`));
- });
-
- /**
- * Anonymous handler for Gaze 'renamed' event indicating a file has been renamed
- *
- * @callback renamed
- * @listens gaze:renamed
- * @param {string} filepath - absolute path of changed file
- */
- _fileWatcher2.default.on('renamed', (newPath, oldPath) => {
- if ((0, _utils.matchKssDir)(newPath, huron)) {
- newStore = (0, _actions.deleteFile)(oldPath, newStore);
- newStore = (0, _actions.updateFile)(newPath, newStore);
- (0, _requireTemplates.writeStore)(newStore);
- }
-
- console.log(_chalk2.default.blue(`${newPath} added!`));
- });
-
- /**
- * Anonymous handler for Gaze 'deleted' event indicating a file has been removed
- *
- * @callback deleted
- * @listens gaze:deleted
- * @param {string} filepath - absolute path of changed file
- */
- _fileWatcher2.default.on('deleted', filepath => {
- if ((0, _utils.matchKssDir)(filepath, huron)) {
- newStore = (0, _actions.deleteFile)(filepath, newStore);
- (0, _requireTemplates.writeStore)(newStore);
- }
-
- console.log(_chalk2.default.red(`${filepath} deleted`));
- });
-} else {
- _fileWatcher2.default.close();
-}
-
-// Start webpack or build for production
-(0, _server2.default)(_defaultStore.config);
+eval("\n\nvar _chalk = __webpack_require__(/*! chalk */ 2);\n\nvar _chalk2 = _interopRequireDefault(_chalk);\n\nvar _actions = __webpack_require__(/*! ./actions */ 11);\n\nvar _requireTemplates = __webpack_require__(/*! ./requireTemplates */ 8);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1);\n\nvar _parseArgs = __webpack_require__(/*! ./parseArgs */ 4);\n\nvar _parseArgs2 = _interopRequireDefault(_parseArgs);\n\nvar _server = __webpack_require__(/*! ./server */ 17);\n\nvar _server2 = _interopRequireDefault(_server);\n\nvar _defaultStore = __webpack_require__(/*! ./defaultStore */ 6);\n\nvar _fileWatcher = __webpack_require__(/*! ./fileWatcher */ 12);\n\nvar _fileWatcher2 = _interopRequireDefault(_fileWatcher);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Initialize data store with files from gaze and original data structure\n *\n * @global\n */\n// Local imports\nconst store = (0, _actions.initFiles)(_fileWatcher2.default.watched(), _defaultStore.defaultStore);\nconst huron = _defaultStore.defaultStore.get('config');\n\n(0, _requireTemplates.requireTemplates)(store);\n(0, _requireTemplates.writeStore)(store);\n\nif (!_parseArgs2.default.production) {\n /** @module cli/gaze */\n let newStore = store;\n\n _fileWatcher2.default.on('all', (event, filepath) => {\n newStore = (0, _actions.updateClassNames)(filepath, newStore);\n (0, _requireTemplates.writeStore)(newStore);\n });\n\n /**\n * Anonymous handler for Gaze 'changed' event indicating a file has changed\n *\n * @callback changed\n * @listens gaze:changed\n * @param {string} filepath - absolute path of changed file\n */\n _fileWatcher2.default.on('changed', filepath => {\n if ((0, _utils.matchKssDir)(filepath, huron)) {\n newStore = (0, _actions.updateFile)(filepath, newStore);\n }\n\n console.log(_chalk2.default.green(`${filepath} updated!`));\n });\n\n /**\n * Anonymous handler for Gaze 'added' event indicating a file has been added to the watched directories\n *\n * @callback added\n * @listens gaze:added\n * @param {string} filepath - absolute path of changed file\n */\n _fileWatcher2.default.on('added', filepath => {\n if ((0, _utils.matchKssDir)(filepath, huron)) {\n newStore = (0, _actions.updateFile)(filepath, newStore);\n (0, _requireTemplates.writeStore)(newStore);\n }\n\n console.log(_chalk2.default.blue(`${filepath} added!`));\n });\n\n /**\n * Anonymous handler for Gaze 'renamed' event indicating a file has been renamed\n *\n * @callback renamed\n * @listens gaze:renamed\n * @param {string} filepath - absolute path of changed file\n */\n _fileWatcher2.default.on('renamed', (newPath, oldPath) => {\n if ((0, _utils.matchKssDir)(newPath, huron)) {\n newStore = (0, _actions.deleteFile)(oldPath, newStore);\n newStore = (0, _actions.updateFile)(newPath, newStore);\n (0, _requireTemplates.writeStore)(newStore);\n }\n\n console.log(_chalk2.default.blue(`${newPath} added!`));\n });\n\n /**\n * Anonymous handler for Gaze 'deleted' event indicating a file has been removed\n *\n * @callback deleted\n * @listens gaze:deleted\n * @param {string} filepath - absolute path of changed file\n */\n _fileWatcher2.default.on('deleted', filepath => {\n if ((0, _utils.matchKssDir)(filepath, huron)) {\n newStore = (0, _actions.deleteFile)(filepath, newStore);\n (0, _requireTemplates.writeStore)(newStore);\n }\n\n console.log(_chalk2.default.red(`${filepath} deleted`));\n });\n} else {\n _fileWatcher2.default.close();\n}\n\n// Start webpack or build for production\n(0, _server2.default)(_defaultStore.config);//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy9zcmMvY2xpL2luZGV4LmpzPzg2N2IiXSwic291cmNlc0NvbnRlbnQiOlsiLy8gTG9jYWwgaW1wb3J0c1xuaW1wb3J0IGNoYWxrIGZyb20gJ2NoYWxrJztcblxuaW1wb3J0IHtcbiAgaW5pdEZpbGVzLFxuICB1cGRhdGVGaWxlLFxuICBkZWxldGVGaWxlLFxuICB1cGRhdGVDbGFzc05hbWVzLFxufSBmcm9tICcuL2FjdGlvbnMnO1xuaW1wb3J0IHsgcmVxdWlyZVRlbXBsYXR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__webpack_require__) {
+/* exports provided: default */
+/* all exports used */
+/*!************************************!*\
+ !*** ./config/devServer.config.js ***!
+ \************************************/
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-exports.default = huron => ({
- hot: true,
- quiet: false,
- noInfo: false,
- stats: {
- colors: true,
- hash: false,
- version: false,
- assets: false,
- chunks: false,
- modules: false,
- reasons: false,
- children: false,
- source: false
- },
- contentBase: huron.root,
- overlay: true,
- publicPath: `http://localhost:${huron.port}/${huron.root}`
-});
+eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony default export */ __webpack_exports__[\"default\"] = ((huron) => ({\n hot: true,\n quiet: false,\n noInfo: false,\n stats: {\n colors: true,\n hash: false,\n version: false,\n assets: false,\n chunks: false,\n modules: false,\n reasons: false,\n children: false,\n source: false,\n },\n contentBase: huron.root,\n overlay: true,\n publicPath: `http://localhost:${huron.port}/${huron.root}`,\n}));\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9jb25maWcvZGV2U2VydmVyLmNvbmZpZy5qcz80MjYxIl0sInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBkZWZhdWx0IChodXJvbikgPT4gKHtcbiAgaG90OiB0cnVlLFxuICBxdWlldDogZmFsc2UsXG4gIG5vSW5mbzogZmFsc2UsXG4gIHN0YXRzOiB7XG4gICAgY29sb3JzOiB0cnVlLFxuICAgIGhhc2g6IGZhbHNlLFxuICAgIHZlcnNpb246IGZhbHNlLFxuICAgIGFzc2V0czogZmFsc2UsXG4gICAgY2h1bmtzOiBmYWxzZSxcbiAgICBtb2R1bGVzOiBmYWxzZSxcbiAgICByZWFzb25zOiBmYWxzZSxcbiAgICBjaGlsZHJlbjogZmFsc2UsXG4gICAgc291cmNlOiBmYWxzZSxcbiAgfSxcbiAgY29udGVudEJhc2U6IGh1cm9uLnJvb3QsXG4gIG92ZXJsYXk6IHRydWUsXG4gIHB1YmxpY1BhdGg6IGBodHRwOi8vbG9jYWxob3N0OiR7aHVyb24ucG9ydH0vJHtodXJvbi5yb290fWAsXG59KTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vY29uZmlnL2RldlNlcnZlci5jb25maWcuanNcbi8vIG1vZHVsZSBpZCA9IDEwXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/* 11 */
+/* no static exports found */
+/* all exports used */
+/*!****************************!*\
+ !*** ./src/cli/actions.js ***!
+ \****************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.initFiles = initFiles;
-exports.updateFile = updateFile;
-exports.deleteFile = deleteFile;
-exports.updateClassNames = updateClassNames;
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-var _chalk = __webpack_require__(2);
-
-var _chalk2 = _interopRequireDefault(_chalk);
-
-var _isEqual = __webpack_require__(25);
-
-var _isEqual2 = _interopRequireDefault(_isEqual);
-
-var _handleHTML = __webpack_require__(14);
-
-var _handleTemplates = __webpack_require__(7);
-
-var _handleKSS = __webpack_require__(15);
-
-var _utils = __webpack_require__(1);
-
-var utils = _interopRequireWildcard(_utils);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Recursively loop through initial watched files list from Gaze.
- *
- * @param {object} data - object containing directory and file paths
- * @param {object} store - memory store
- * @return {object} newStore - map object of entire data store
- */
-function initFiles(data, store, depth = 0) {
- const type = Object.prototype.toString.call(data);
- const huron = store.get('config');
- let newStore = store;
- let info;
- let files;
-
- switch (type) {
- case '[object Object]':
- files = Object.keys(data);
- newStore = files.reduce((prevStore, file) => initFiles(data[file], prevStore, depth), newStore);
- break;
-
- case '[object Array]':
- newStore = data.reduce((prevStore, file) => initFiles(file, prevStore, depth), newStore);
- break;
-
- case '[object String]':
- info = _path2.default.parse(data);
-
- // Only call update if data is a filepath and it's within the KSS source directory
- if (info.ext && !data.includes(huron.get('classNames'))) {
- newStore = updateFile(data, store);
- }
- break;
-
- default:
- break;
- }
-
- return newStore;
-}
-
-/**
- * Logic for updating and writing file information based on file type (extension)
- *
- * @param {string} filepath - path to updated file. usually passed in from Gaze
- * @param {object} store - memory store
- * @return {object} store - map object of map object of entire data store
- */
-/** @module cli/actions */
-
-// Imports
-function updateFile(filepath, store) {
- const huron = store.get('config');
- const file = _path2.default.parse(filepath);
- let field;
- let section;
-
- if (filepath.includes(huron.get('sectionTemplate'))) {
- return utils.writeSectionTemplate(filepath, store);
- }
-
- switch (file.ext) {
- // Plain HTML template, external
- case '.html':
- section = utils.getSection(file.base, 'markup', store);
-
- if (section) {
- return (0, _handleHTML.updateHTML)(filepath, section, store);
- } else if (file.dir.includes('prototypes') && file.name.includes('prototype-')) {
- return (0, _handleHTML.updatePrototype)(filepath, store);
- }
-
- console.log(_chalk2.default.red(`Failed to write file: ${file.name}`));
- break;
-
- // Handlebars template, external
- case huron.get('templates').extension:
- case '.json':
- field = '.json' === file.ext ? 'data' : 'markup';
- section = utils.getSection(file.base, field, store);
-
- if (section) {
- return (0, _handleTemplates.updateTemplate)(filepath, section, store);
- }
-
- console.log( // eslint-disable-line no-console
- _chalk2.default.red(`Could not find associated KSS section for ${filepath}`));
- break;
-
- // KSS documentation (default extension is `.css`)
- // Will also output a template if markup is inline
- // Note: inline markup does _not_ support handlebars currently
- case huron.get('kssExtension'):
- return (0, _handleKSS.updateKSS)(filepath, store);
-
- // This should never happen if Gaze is working properly
- default:
- return store;
- }
-
- return store;
-}
-
-/**
- * Logic for deleting file information and files based on file type (extension)
- *
- * @param {string} filepath - path to updated file. usually passed in from Gaze
- * @param {object} store - memory store
- * @return {object} newStore - map object of map object of entire data store
- */
-function deleteFile(filepath, store) {
- const huron = store.get('config');
- const file = _path2.default.parse(filepath);
- let field = '';
- let section = null;
- let newStore = store;
-
- switch (file.ext) {
- // Plain HTML template, external
- case '.html':
- section = utils.getSection(file.base, 'markup', store);
-
- if (section) {
- newStore = (0, _handleHTML.deleteHTML)(filepath, section, store);
- } else if (file.dir.includes('prototypes') && file.name.includes('prototype-')) {
- newStore = (0, _handleHTML.deletePrototype)(filepath, store);
- }
- break;
-
- case huron.get('templates').extension:
- case '.json':
- field = '.json' === file.ext ? 'data' : 'markup';
- section = utils.getSection(file.base, field, store);
-
- if (section) {
- newStore = (0, _handleTemplates.deleteTemplate)(filepath, section, store);
- }
- break;
-
- case huron.get('kssExtension'):
- section = utils.getSection(filepath, false, store);
-
- if (section) {
- newStore = (0, _handleKSS.deleteKSS)(filepath, section, store);
- }
- break;
-
- default:
- console.warn( // eslint-disable-line no-console
- _chalk2.default.red(`Could not delete: ${file.name}`));
- break;
- }
-
- return newStore;
-}
-
-/**
- * Logic for updating localized classnames from CSS modules
- *
- * @param {string} filepath - path to updated file. usually passed in from Gaze
- * @param {object} store - memory store
- *
- * @return void
- */
-function updateClassNames(filepath, store) {
- const classNamesPath = store.getIn(['config', 'classNames']);
-
- if (filepath.includes(classNamesPath)) {
- const oldClassnames = store.get('classNames');
- const newClassnames = utils.mergeClassnameJSON(classNamesPath);
-
- if (!(0, _isEqual2.default)(oldClassnames, newClassnames)) {
- return store.set('classNames', newClassnames);
- }
- }
-
- return store;
-}
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.initFiles = initFiles;\nexports.updateFile = updateFile;\nexports.deleteFile = deleteFile;\nexports.updateClassNames = updateClassNames;\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _chalk = __webpack_require__(/*! chalk */ 2);\n\nvar _chalk2 = _interopRequireDefault(_chalk);\n\nvar _isEqual = __webpack_require__(/*! lodash/isEqual */ 26);\n\nvar _isEqual2 = _interopRequireDefault(_isEqual);\n\nvar _handleHTML = __webpack_require__(/*! ./handleHTML */ 14);\n\nvar _handleTemplates = __webpack_require__(/*! ./handleTemplates */ 7);\n\nvar _handleKSS = __webpack_require__(/*! ./handleKSS */ 15);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1);\n\nvar utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Recursively loop through initial watched files list from Gaze.\n *\n * @param {object} data - object containing directory and file paths\n * @param {object} store - memory store\n * @return {object} newStore - map object of entire data store\n */\nfunction initFiles(data, store, depth = 0) {\n const type = Object.prototype.toString.call(data);\n const huron = store.get('config');\n let newStore = store;\n let info;\n let files;\n\n switch (type) {\n case '[object Object]':\n files = Object.keys(data);\n newStore = files.reduce((prevStore, file) => initFiles(data[file], prevStore, depth), newStore);\n break;\n\n case '[object Array]':\n newStore = data.reduce((prevStore, file) => initFiles(file, prevStore, depth), newStore);\n break;\n\n case '[object String]':\n info = _path2.default.parse(data);\n\n // Only call update if data is a filepath and it's within the KSS source directory\n if (info.ext && !data.includes(huron.get('classNames'))) {\n newStore = updateFile(data, store);\n }\n break;\n\n default:\n break;\n }\n\n return newStore;\n}\n\n/**\n * Logic for updating and writing file information based on file type (extension)\n *\n * @param {string} filepath - path to updated file. usually passed in from Gaze\n * @param {object} store - memory store\n * @return {object} store - map object of map object of entire data store\n */\n/** @module cli/actions */\n\n// Imports\nfunction updateFile(filepath, store) {\n const huron = store.get('config');\n const file = _path2.default.parse(filepath);\n let field;\n let section;\n\n if (filepath.includes(huron.get('sectionTemplate'))) {\n return utils.writeSectionTemplate(filepath, store);\n }\n\n switch (file.ext) {\n // Plain HTML template, external\n case '.html':\n section = utils.getSection(file.base, 'markup', store);\n\n if (section) {\n return (0, _handleHTML.updateHTML)(filepath, section, store);\n } else if (file.dir.includes('prototypes') && file.name.includes('prototype-')) {\n return (0, _handleHTML.updatePrototype)(filepath, store);\n }\n\n console.log(_chalk2.default.red(`Failed to write file: ${file.name}`));\n break;\n\n // Handlebars template, external\n case huron.get('templates').extension:\n case '.json':\n field = '.json' === file.ext ? 'data' : 'markup';\n section = utils.getSection(file.base, field, store);\n\n if (section) {\n return (0, _handleTemplates.updateTemplate)(filepath, section, store);\n }\n\n console.log( // eslint-disable-line no-console\n _chalk2.default.red(`Could not find associated KSS section for ${filepath}`));\n break;\n\n // KSS documentation (default extension is `.css`)\n // Will also output a template if markup is inline\n // Note: inline markup does _not_ support handlebars currently\n case huron.get('kssExtension'):\n return (0, _handleKSS.updateKSS)(filepath, store);\n\n // This should never happen if Gaze is working properly\n default:\n return store;\n }\n\n return store;\n}\n\n/**\n * Logic for deleting file information and files based on file type (extension)\n *\n * @param {string} filepath - path to updated file. usually passed in from Gaze\n * @param {object} store - memory store\n * @return {object} newStore - map object of map object of entire data store\n */\nfunction deleteFile(filepath, store) {\n const huron = store.get('config');\n const file = _path2.default.parse(filepath);\n let field = '';\n let section = null;\n let newStore = store;\n\n switch (file.ext) {\n // Plain HTML template, external\n case '.html':\n section = utils.getSection(file.base, 'markup', store);\n\n if (section) {\n newStore = (0, _handleHTML.deleteHTML)(filepath, section, store);\n } else if (file.dir.includes('prototypes') && file.name.includes('prototype-')) {\n newStore = (0, _handleHTML.deletePrototype)(filepath, store);\n }\n break;\n\n case huron.get('templates').extension:\n case '.json':\n field = '.json' === file.ext ? 'data' : 'markup';\n section = utils.getSection(file.base, field, store);\n\n if (section) {\n newStore = (0, _handleTemplates.deleteTemplate)(filepath, section, store);\n }\n break;\n\n case huron.get('kssExtension'):\n section = utils.getSection(filepath, false, store);\n\n if (section) {\n newStore = (0, _handleKSS.deleteKSS)(filepath, section, store);\n }\n break;\n\n default:\n console.warn( // eslint-disable-line no-console\n _chalk2.default.red(`Could not delete: ${file.name}`));\n break;\n }\n\n return newStore;\n}\n\n/**\n * Logic for updating localized classnames from CSS modules\n *\n * @param {string} filepath - path to updated file. usually passed in from Gaze\n * @param {object} store - memory store\n *\n * @return void\n */\nfunction updateClassNames(filepath, store) {\n const classNamesPath = store.getIn(['config', 'classNames']);\n\n if (filepath.includes(classNamesPath)) {\n const oldClassnames = store.get('classNames');\n const newClassnames = utils.mergeClassnameJSON(classNamesPath);\n\n if (!(0, _isEqual2.default)(oldClassnames, newClassnames)) {\n return store.set('classNames', newClassnames);\n }\n }\n\n return store;\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NsaS9hY3Rpb25zLmpzPzVlNWEiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBtb2R1bGUgY2xpL2FjdGlvbnMgKi9cblxuLy8gSW1wb3J0c1xuaW1wb3J0IHBhdGggZnJvbSAncGF0aCc7XG5pbXBvcnQgY2hhbGsgZnJvbSAnY2hhbGsnO1xuaW1wb3J0IGlzRXF1YWwgZnJvbSAnbG9kYXNoL2lzRXF1YWwnO1xuXG5pbXBvcnQge1xuICB1cGRhdGVIVE1MLFxuICBkZWxldGVIVE1MLFxuICB1cGRhdGVQcm90b3R5cGUsXG4gIGRlbGV0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0FBQ0E7QUFDQTtBQUNBOzs7Ozs7OztBQVFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/* 12 */
+/* no static exports found */
+/* all exports used */
+/*!********************************!*\
+ !*** ./src/cli/fileWatcher.js ***!
+ \********************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.watchedFiles = exports.extensions = undefined;
-
-var _gaze = __webpack_require__(21);
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-var _utils = __webpack_require__(1);
-
-var _defaultStore = __webpack_require__(6);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Huron configuration object
- *
- * @global
- */
-const huron = _defaultStore.defaultStore.get('config');
-
-/**
- * Available file extensions. Extensions should not include the leading '.'
- *
- * @global
- */
-const extensions = exports.extensions = [huron.get('kssExtension'), huron.get('templates').extension, 'html', 'json'].map(extension => extension.replace('.', ''));
-
-// Generate watch list for Gaze, start gaze
-const watchedFiles = exports.watchedFiles = [];
-
-// Watch section template
-watchedFiles.push(_path2.default.resolve(huron.get('sectionTemplate')));
-
-// Watch cssmodules classname files (if they exist)
-if (huron.get('classNames')) {
- watchedFiles.push(`${_path2.default.resolve(huron.get('classNames'))}/*.json`);
-}
-
-// Watch all provided kss directories
-huron.get('kss').forEach(dir => {
- watchedFiles.push(`${(0, _utils.removeTrailingSlash)(dir)}/**/*.+(${extensions.join('|')})`);
-});
-
-/**
- * Gaze instance for watching all files, including KSS, html, hbs/template, and JSON
- *
- * @global
- */
-const gaze = new _gaze.Gaze(watchedFiles);
-
-exports.default = gaze;
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.watchedFiles = exports.extensions = undefined;\n\nvar _gaze = __webpack_require__(/*! gaze */ 22);\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1);\n\nvar _defaultStore = __webpack_require__(/*! ./defaultStore */ 6);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Huron configuration object\n *\n * @global\n */\nconst huron = _defaultStore.defaultStore.get('config');\n\n/**\n * Available file extensions. Extensions should not include the leading '.'\n *\n * @global\n */\nconst extensions = exports.extensions = [huron.get('kssExtension'), huron.get('templates').extension, 'html', 'json'].map(extension => extension.replace('.', ''));\n\n// Generate watch list for Gaze, start gaze\nconst watchedFiles = exports.watchedFiles = [];\n\n// Watch section template\nwatchedFiles.push(_path2.default.resolve(huron.get('sectionTemplate')));\n\n// Watch cssmodules classname files (if they exist)\nif (huron.get('classNames')) {\n watchedFiles.push(`${_path2.default.resolve(huron.get('classNames'))}/*.json`);\n}\n\n// Watch all provided kss directories\nhuron.get('kss').forEach(dir => {\n watchedFiles.push(`${(0, _utils.removeTrailingSlash)(dir)}/**/*.+(${extensions.join('|')})`);\n});\n\n/**\n * Gaze instance for watching all files, including KSS, html, hbs/template, and JSON\n *\n * @global\n */\nconst gaze = new _gaze.Gaze(watchedFiles);\n\nexports.default = gaze;//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NsaS9maWxlV2F0Y2hlci5qcz80ZGI4Il0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEdhemUgfSBmcm9tICdnYXplJztcbmltcG9ydCBwYXRoIGZyb20gJ3BhdGgnO1xuXG5pbXBvcnQgeyByZW1vdmVUcmFpbGluZ1NsYXNoIH0gZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyBkZWZhdWx0U3RvcmUgfSBmcm9tICcuL2RlZmF1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YWNoKChkaXIpID0+IHtcbiAgd2F0Y2hlZEZpbGVzLnB1c2goXG4gICAgYCR7cmVtb3ZlVHJhaWxpbmdTbGFzaChkaXIpfS8qKi8qLisoJHtleHRlbnNpb25zLmpvaW4oJ3wnKX0pYFxuICApO1xufSk7XG5cbi8qKlxuICogR2F6ZSBpbnN0YW5jZSBmb3Igd2F0Y2hpbmcgYWxsIGZpbGVzLCBpbmNsdWRpbmcgS1NTLCBodG1sLCBoYnMvdGVtcGxhdGUsIGFuZCBKU09OXG4gKlxuICogQGdsb2JhbFxuICovXG5jb25zdCBnYXplID0gbmV3IEdhemUod2F0Y2hlZEZpbGVzKTtcblxuZXhwb3J0IGRlZmF1bHQgZ2F6ZTtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvY2xpL2ZpbGVXYXRjaGVyLmpzIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBQUE7QUFDQTtBQUFBO0FBQ0E7OztBQUNBO0FBQ0E7QUFBQTtBQUNBOzs7QUFDQTs7Ozs7QUFLQTtBQUNBO0FBQ0E7Ozs7O0FBS0E7QUFDQTtBQU1BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUdBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFHQTtBQUNBO0FBQ0E7Ozs7O0FBS0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 13 */
+/* no static exports found */
+/* all exports used */
+/*!***********************************!*\
+ !*** ./src/cli/generateConfig.js ***!
+ \***********************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = generateConfig;
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-var _url = __webpack_require__(27);
-
-var _url2 = _interopRequireDefault(_url);
-
-var _fsExtra = __webpack_require__(3);
-
-var _fsExtra2 = _interopRequireDefault(_fsExtra);
-
-var _webpack = __webpack_require__(5);
-
-var _webpack2 = _interopRequireDefault(_webpack);
-
-var _htmlWebpackPlugin = __webpack_require__(22);
-
-var _htmlWebpackPlugin2 = _interopRequireDefault(_htmlWebpackPlugin);
-
-var _parseArgs = __webpack_require__(4);
-
-var _parseArgs2 = _interopRequireDefault(_parseArgs);
-
-var _requireExternal = __webpack_require__(16);
-
-var _requireExternal2 = _interopRequireDefault(_requireExternal);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const cwd = process.cwd(); /** @module cli/generate-config */
-
-const defaultWebpack = __webpack_require__(19);
-const defaultHuron = __webpack_require__(18);
-
-// Require configs passed in by user from CLI
-let defaultConfig = false;
-const localConfig = (0, _requireExternal2.default)(_path2.default.resolve(_parseArgs2.default.webpackConfig));
-const localHuron = (0, _requireExternal2.default)(_path2.default.resolve(_parseArgs2.default.huronConfig));
-
-/**
- * Generate a mutant hybrid of the huron default webpack config and your local webpack config
- *
- * @function generateConfig
- * @param {object} config - local webpack config
- * @return {object} newConfig - updated data store
- */
-function generateConfig() {
- let newConfig = localConfig;
- let newHuron = localHuron;
-
- // Execute config function, if provided
- if ('function' === typeof newConfig) {
- newConfig = newConfig(_parseArgs2.default.env);
- }
-
- // Execute huron config function, if provided
- if ('function' === typeof newHuron) {
- newHuron = newHuron(_parseArgs2.default.env);
- }
-
- // Merge huron defaults with user settings
- newHuron = Object.assign({}, defaultHuron, newHuron);
- // Use user huron config to modify webpack defaults
- defaultConfig = defaultWebpack(newHuron);
-
- // Set ouput options
- newConfig.output = Object.assign({}, defaultConfig.output, newConfig.output);
- newConfig.output.path = defaultConfig.output.path;
- newConfig.output.publicPath = defaultConfig.output.publicPath;
-
- // configure entries
- newConfig = configureEntries(newHuron, newConfig);
-
- // configure plugins
- newConfig = configurePlugins(newHuron, newConfig);
-
- // configure loaders
- newConfig = configureLoaders(newHuron, newConfig);
-
- // Add HTMLWebpackPlugin for each configured prototype
- newConfig = configurePrototypes(newHuron, newConfig);
-
- // Remove existing devServer settings
- delete newConfig.devServer;
-
- return {
- huron: newHuron,
- webpack: newConfig
- };
-}
-
-/**
- * Configure and manage webpack entry points
- *
- * @param {object} huron - huron configuration object
- * @param {object} config - webpack configuration object
- * @return {object} newConfig - updated data store
- */
-function configureEntries(huron, config) {
- const entry = config.entry[huron.entry];
- const newConfig = config;
-
- newConfig.entry = {};
- if (!_parseArgs2.default.production) {
- newConfig.entry[huron.entry] = [`webpack-dev-server/client?http://localhost:${huron.port}`, 'webpack/hot/dev-server', _path2.default.join(cwd, huron.root, 'huron-assets/index')].concat(entry);
- } else {
- newConfig.entry[huron.entry] = [_path2.default.join(cwd, huron.root, 'huron-assets/index')].concat(entry);
- }
-
- return newConfig;
-}
-
-/**
- * Configure and manage webpack plugins
- *
- * @param {object} huron - huron configuration object
- * @param {object} config - webpack configuration object
- * @return {object} newConfig - updated data store
- */
-function configurePlugins(huron, config) {
- const newConfig = config;
-
- newConfig.plugins = config.plugins || [];
-
- if (!_parseArgs2.default.production) {
- if (newConfig.plugins && newConfig.plugins.length) {
- newConfig.plugins = newConfig.plugins.filter(plugin => 'HotModuleReplacementPlugin' !== plugin.constructor.name && 'NamedModulesPlugin' !== plugin.constructor.name);
- }
- newConfig.plugins = newConfig.plugins.concat([new _webpack2.default.HotModuleReplacementPlugin(), new _webpack2.default.NamedModulesPlugin()]);
- }
-
- return newConfig;
-}
-
-/**
- * Configure and manage webpack loaders
- *
- * @param {object} huron - huron configuration object
- * @param {object} config - webpack configuration object
- * @return {object} newConfig - updated data store
- */
-function configureLoaders(huron, config) {
- // Manage loaders
- const templatesLoader = huron.templates.rule || {};
- const newConfig = config;
-
- // Make sure we're only using templates loader for files in huron root
- templatesLoader.include = [_path2.default.join(cwd, huron.root, huron.output)];
-
- // Normalize module and module.rules
- newConfig.module = newConfig.module || {};
- newConfig.module.rules = newConfig.module.rules || newConfig.module.loaders || [];
-
- // Add default loaders
- newConfig.module.rules = defaultConfig.module.rules.concat(newConfig.module.rules, templatesLoader);
-
- return newConfig;
-}
-
-/**
- * Create an HTML webpack plugin for each configured prototype
- *
- * @param {object} huron - huron configuration object
- * @param {object} config - webpack configuration object
- * @return {object} newConfig - updated data store
- */
-function configurePrototypes(huron, config) {
- const wrapperTemplate = _fsExtra2.default.readFileSync(_path2.default.join(__dirname, '../../templates/prototypeTemplate.hbs'), 'utf8');
-
- const defaultHTMLPluginOptions = {
- title: 'Huron',
- window: huron.window,
- js: [],
- css: [],
- filename: 'index.html',
- template: _path2.default.join(cwd, huron.root, 'huron-assets/prototypeTemplate.hbs'),
- inject: false,
- chunks: [huron.entry]
- };
- const newConfig = config;
-
- // Write prototype template file for HTML webpack plugin
- _fsExtra2.default.outputFileSync(_path2.default.join(cwd, huron.root, 'huron-assets/prototypeTemplate.hbs'), wrapperTemplate);
-
- huron.prototypes.forEach(prototype => {
- const newPrototype = prototype;
- let opts = {};
-
- // Merge configured settings with default settings
- if ('string' === typeof prototype) {
- opts = Object.assign({}, defaultHTMLPluginOptions, {
- title: prototype,
- filename: `${prototype}.html`
- });
- } else if ('object' === typeof prototype && {}.hasOwnProperty.call(prototype, 'title')) {
- // Create filename based on configured title if not provided
- if (!prototype.filename) {
- newPrototype.filename = `${prototype.title}.html`;
- }
-
- // Move css assets for this prototype,
- // reset css option with new file paths
- if (prototype.css) {
- newPrototype.css = moveAdditionalAssets(prototype.css, 'css', huron);
- }
-
- // Move js assets for this prototype,
- // reset js option with new file paths
- if (prototype.js) {
- newPrototype.js = moveAdditionalAssets(prototype.js, 'js', huron);
- }
-
- opts = Object.assign({}, defaultHTMLPluginOptions, newPrototype);
- }
-
- // Move global css assets,
- // reset css option with new file paths
- if (huron.css.length) {
- opts.css = opts.css.concat(moveAdditionalAssets(huron.css, 'css', huron));
- }
-
- // Move global js assets,
- // reset js option with new file paths
- if (huron.js.length) {
- opts.js = opts.js.concat(moveAdditionalAssets(huron.js, 'js', huron));
- }
-
- // Push a new plugin for each configured prototype
- if (Object.keys(opts).length) {
- newConfig.plugins.push(new _htmlWebpackPlugin2.default(opts));
- }
- });
-
- return newConfig;
-}
-
-/**
- * Move relative (and local) js and css assets provided in huron options
- *
- * @param {array|string} assets - array of assets or single asset
- * @param {string} subdir - subdirectory in huron root from which to load additional asset
- * @param {object} huron - huron configuration object
- * @return {array} assetResults - paths to js and css assets
- */
-function moveAdditionalAssets(assets, subdir = '', huron) {
- const currentAssets = [].concat(assets);
- const assetResults = [];
-
- currentAssets.forEach(asset => {
- const assetInfo = _path2.default.parse(asset);
- const assetURL = _url2.default.parse(asset);
- const sourcePath = _path2.default.join(cwd, asset);
- const outputPath = _path2.default.resolve(cwd, huron.root, subdir, assetInfo.base);
- const loadPath = _parseArgs2.default.production ? _path2.default.join(subdir, assetInfo.base) : _path2.default.join('/', subdir, assetInfo.base); // Use absolute path in development
- let contents = false;
-
- if (!_path2.default.isAbsolute(asset) && !assetURL.protocol) {
- try {
- contents = _fsExtra2.default.readFileSync(sourcePath);
- } catch (e) {
- console.warn(`could not read ${sourcePath}`);
- }
-
- if (contents) {
- _fsExtra2.default.outputFileSync(outputPath, contents);
- assetResults.push(loadPath);
- }
- } else {
- assetResults.push(asset);
- }
- });
-
- return assetResults;
-}
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = generateConfig;\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _url = __webpack_require__(/*! url */ 28);\n\nvar _url2 = _interopRequireDefault(_url);\n\nvar _fsExtra = __webpack_require__(/*! fs-extra */ 3);\n\nvar _fsExtra2 = _interopRequireDefault(_fsExtra);\n\nvar _webpack = __webpack_require__(/*! webpack */ 5);\n\nvar _webpack2 = _interopRequireDefault(_webpack);\n\nvar _htmlWebpackPlugin = __webpack_require__(/*! html-webpack-plugin */ 23);\n\nvar _htmlWebpackPlugin2 = _interopRequireDefault(_htmlWebpackPlugin);\n\nvar _parseArgs = __webpack_require__(/*! ./parseArgs */ 4);\n\nvar _parseArgs2 = _interopRequireDefault(_parseArgs);\n\nvar _requireExternal = __webpack_require__(/*! ./requireExternal */ 16);\n\nvar _requireExternal2 = _interopRequireDefault(_requireExternal);\n\nvar _webpack3 = __webpack_require__(/*! ../defaultConfig/webpack.config */ 20);\n\nvar _webpack4 = _interopRequireDefault(_webpack3);\n\nvar _huron = __webpack_require__(/*! ../defaultConfig/huron.config */ 19);\n\nvar _huron2 = _interopRequireDefault(_huron);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nconst cwd = process.cwd();\n\n// Require configs passed in by user from CLI\n/** @module cli/generate-config */\nlet defaultConfig = false;\nconst localConfig = (0, _requireExternal2.default)(_path2.default.resolve(_parseArgs2.default.webpackConfig));\nconst localHuron = (0, _requireExternal2.default)(_path2.default.resolve(_parseArgs2.default.huronConfig));\n\n/**\n * Generate a mutant hybrid of the huron default webpack config and your local webpack config\n *\n * @function generateConfig\n * @param {object} config - local webpack config\n * @return {object} newConfig - updated data store\n */\nfunction generateConfig() {\n let newConfig = localConfig;\n let newHuron = localHuron;\n\n // Execute config function, if provided\n if ('function' === typeof newConfig) {\n newConfig = newConfig(_parseArgs2.default.env);\n }\n\n // Execute huron config function, if provided\n if ('function' === typeof newHuron) {\n newHuron = newHuron(_parseArgs2.default.env);\n }\n\n // Merge huron defaults with user settings\n newHuron = Object.assign({}, _huron2.default, newHuron);\n // Use user huron config to modify webpack defaults\n defaultConfig = (0, _webpack4.default)(newHuron);\n\n // Set ouput options\n newConfig.output = Object.assign({}, defaultConfig.output, newConfig.output);\n newConfig.output.path = defaultConfig.output.path;\n newConfig.output.publicPath = defaultConfig.output.publicPath;\n\n // configure entries\n newConfig = configureEntries(newHuron, newConfig);\n\n // configure plugins\n newConfig = configurePlugins(newHuron, newConfig);\n\n // configure loaders\n newConfig = configureLoaders(newHuron, newConfig);\n\n // Add HTMLWebpackPlugin for each configured prototype\n newConfig = configurePrototypes(newHuron, newConfig);\n\n // Remove existing devServer settings\n delete newConfig.devServer;\n\n return {\n huron: newHuron,\n webpack: newConfig\n };\n}\n\n/**\n * Configure and manage webpack entry points\n *\n * @param {object} huron - huron configuration object\n * @param {object} config - webpack configuration object\n * @return {object} newConfig - updated data store\n */\nfunction configureEntries(huron, config) {\n const entry = config.entry[huron.entry];\n const newConfig = config;\n\n newConfig.entry = {};\n if (!_parseArgs2.default.production) {\n newConfig.entry[huron.entry] = [`webpack-dev-server/client?http://localhost:${huron.port}`, 'webpack/hot/dev-server', _path2.default.join(cwd, huron.root, 'huron-assets/index')].concat(entry);\n } else {\n newConfig.entry[huron.entry] = [_path2.default.join(cwd, huron.root, 'huron-assets/index')].concat(entry);\n }\n\n return newConfig;\n}\n\n/**\n * Configure and manage webpack plugins\n *\n * @param {object} huron - huron configuration object\n * @param {object} config - webpack configuration object\n * @return {object} newConfig - updated data store\n */\nfunction configurePlugins(huron, config) {\n const newConfig = config;\n\n newConfig.plugins = config.plugins || [];\n\n if (!_parseArgs2.default.production) {\n if (newConfig.plugins && newConfig.plugins.length) {\n newConfig.plugins = newConfig.plugins.filter(plugin => 'HotModuleReplacementPlugin' !== plugin.constructor.name && 'NamedModulesPlugin' !== plugin.constructor.name);\n }\n newConfig.plugins = newConfig.plugins.concat([new _webpack2.default.HotModuleReplacementPlugin(), new _webpack2.default.NamedModulesPlugin()]);\n }\n\n return newConfig;\n}\n\n/**\n * Configure and manage webpack loaders\n *\n * @param {object} huron - huron configuration object\n * @param {object} config - webpack configuration object\n * @return {object} newConfig - updated data store\n */\nfunction configureLoaders(huron, config) {\n // Manage loaders\n const templatesLoader = huron.templates.rule || {};\n const newConfig = config;\n\n // Make sure we're only using templates loader for files in huron root\n templatesLoader.include = [_path2.default.join(cwd, huron.root, huron.output)];\n\n // Normalize module and module.rules\n newConfig.module = newConfig.module || {};\n newConfig.module.rules = newConfig.module.rules || newConfig.module.loaders || [];\n\n // Add default loaders\n newConfig.module.rules = defaultConfig.module.rules.concat(newConfig.module.rules, templatesLoader);\n\n return newConfig;\n}\n\n/**\n * Create an HTML webpack plugin for each configured prototype\n *\n * @param {object} huron - huron configuration object\n * @param {object} config - webpack configuration object\n * @return {object} newConfig - updated data store\n */\nfunction configurePrototypes(huron, config) {\n const wrapperTemplate = _fsExtra2.default.readFileSync(_path2.default.join(__dirname, '../../templates/prototypeTemplate.hbs'), 'utf8');\n\n const defaultHTMLPluginOptions = {\n title: 'Huron',\n window: huron.window,\n js: [],\n css: [],\n filename: 'index.html',\n template: _path2.default.join(cwd, huron.root, 'huron-assets/prototypeTemplate.hbs'),\n inject: false,\n chunks: [huron.entry]\n };\n const newConfig = config;\n\n // Write prototype template file for HTML webpack plugin\n _fsExtra2.default.outputFileSync(_path2.default.join(cwd, huron.root, 'huron-assets/prototypeTemplate.hbs'), wrapperTemplate);\n\n huron.prototypes.forEach(prototype => {\n const newPrototype = prototype;\n let opts = {};\n\n // Merge configured settings with default settings\n if ('string' === typeof prototype) {\n opts = Object.assign({}, defaultHTMLPluginOptions, {\n title: prototype,\n filename: `${prototype}.html`\n });\n } else if ('object' === typeof prototype && {}.hasOwnProperty.call(prototype, 'title')) {\n // Create filename based on configured title if not provided\n if (!prototype.filename) {\n newPrototype.filename = `${prototype.title}.html`;\n }\n\n // Move css assets for this prototype,\n // reset css option with new file paths\n if (prototype.css) {\n newPrototype.css = moveAdditionalAssets(prototype.css, 'css', huron);\n }\n\n // Move js assets for this prototype,\n // reset js option with new file paths\n if (prototype.js) {\n newPrototype.js = moveAdditionalAssets(prototype.js, 'js', huron);\n }\n\n opts = Object.assign({}, defaultHTMLPluginOptions, newPrototype);\n }\n\n // Move global css assets,\n // reset css option with new file paths\n if (huron.css.length) {\n opts.css = opts.css.concat(moveAdditionalAssets(huron.css, 'css', huron));\n }\n\n // Move global js assets,\n // reset js option with new file paths\n if (huron.js.length) {\n opts.js = opts.js.concat(moveAdditionalAssets(huron.js, 'js', huron));\n }\n\n // Push a new plugin for each configured prototype\n if (Object.keys(opts).length) {\n newConfig.plugins.push(new _htmlWebpackPlugin2.default(opts));\n }\n });\n\n return newConfig;\n}\n\n/**\n * Move relative (and local) js and css assets provided in huron options\n *\n * @param {array|string} assets - array of assets or single asset\n * @param {string} subdir - subdirectory in huron root from which to load additional asset\n * @param {object} huron - huron configuration object\n * @return {array} assetResults - paths to js and css assets\n */\nfunction moveAdditionalAssets(assets, subdir = '', huron) {\n const currentAssets = [].concat(assets);\n const assetResults = [];\n\n currentAssets.forEach(asset => {\n const assetInfo = _path2.default.parse(asset);\n const assetURL = _url2.default.parse(asset);\n const sourcePath = _path2.default.join(cwd, asset);\n const outputPath = _path2.default.resolve(cwd, huron.root, subdir, assetInfo.base);\n const loadPath = _parseArgs2.default.production ? _path2.default.join(subdir, assetInfo.base) : _path2.default.join('/', subdir, assetInfo.base); // Use absolute path in development\n let contents = false;\n\n if (!_path2.default.isAbsolute(asset) && !assetURL.protocol) {\n try {\n contents = _fsExtra2.default.readFileSync(sourcePath);\n } catch (e) {\n console.warn(`could not read ${sourcePath}`);\n }\n\n if (contents) {\n _fsExtra2.default.outputFileSync(outputPath, contents);\n assetResults.push(loadPath);\n }\n } else {\n assetResults.push(asset);\n }\n });\n\n return assetResults;\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NsaS9nZW5lcmF0ZUNvbmZpZy5qcz9lZGUwIl0sInNvdXJjZXNDb250ZW50IjpbIi8qKiBAbW9kdWxlIGNsaS9nZW5lcmF0ZS1jb25maWcgKi9cbmltcG9ydCBwYXRoIGZyb20gJ3BhdGgnO1xuaW1wb3J0IHVybCBmcm9tICd1cmwnO1xuaW1wb3J0IGZzIGZyb20gJ2ZzLWV4dHJhJztcbmltcG9ydCB3ZWJwYWNrIGZyb20gJ3dlYnBhY2snO1xuaW1wb3J0IEhUTUxXZWJwYWNrUGx1Z2luIGZyb20gJ2h0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BO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Ozs7Ozs7O0FBUUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFHQTtBQUNBO0FBQ0E7QUFJQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 14 */
+/* no static exports found */
+/* all exports used */
+/*!*******************************!*\
+ !*** ./src/cli/handleHTML.js ***!
+ \*******************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.updateHTML = updateHTML;
-exports.deleteHTML = deleteHTML;
-exports.updatePrototype = updatePrototype;
-exports.deletePrototype = deletePrototype;
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-var _fsExtra = __webpack_require__(3);
-
-var _fsExtra2 = _interopRequireDefault(_fsExtra);
-
-var _utils = __webpack_require__(1);
-
-var utils = _interopRequireWildcard(_utils);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Handle update of an HMTL template
- *
- * @function updateHTML
- * @param {string} filepath - filepath of changed file (comes from gaze)
- * @param {object} section - contains KSS section data
- * @param {object} store - memory store
- * @return {object} updated data store
- */
-function updateHTML(filepath, section, store) {
- const file = _path2.default.parse(filepath);
- const content = _fsExtra2.default.readFileSync(filepath, 'utf8');
- const newSection = section;
-
- if (content) {
- newSection.templatePath = utils.writeFile(section.referenceURI, 'template', filepath, content, store);
- newSection.templateContent = content;
-
- // Rewrite section data with template content
- newSection.sectionPath = utils.writeSectionData(store, newSection);
-
- return store.setIn(['sections', 'sectionsByPath', section.kssPath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);
- }
-
- console.log(`File ${file.base} could not be read`);
- return store;
-}
-
-/**
- * Handle removal of an HMTL template
- *
- * @function deleteHTML
- * @param {string} filepath - filepath of changed file (comes from gaze)
- * @param {object} section - contains KSS section data
- * @param {object} store - memory store
- * @return {object} updated data store
- */
-/** @module cli/html-handler */
-function deleteHTML(filepath, section, store) {
- const newSection = section;
-
- utils.removeFile(newSection.referenceURI, 'template', filepath, store);
-
- delete newSection.templatePath;
-
- return store.setIn(['sections', 'sectionsByPath', section.kssPath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);
-}
-
-/**
- * Handle update for a prototype file
- *
- * @function updatePrototype
- * @param {string} filepath - filepath of changed file (comes from gaze)
- * @param {object} store - memory store
- * @return {object} updated data store
- */
-function updatePrototype(filepath, store) {
- const file = _path2.default.parse(filepath);
- const content = _fsExtra2.default.readFileSync(filepath, 'utf8');
-
- if (content) {
- const requirePath = utils.writeFile(file.name, 'prototype', filepath, content, store);
-
- return store.setIn(['prototypes', file.name], requirePath);
- }
-
- console.log(`File ${file.base} could not be read`);
- return store;
-}
-
-/**
- * Handle removal of a prototype file
- *
- * @function deletePrototype
- * @param {string} filepath - filepath of changed file (comes from gaze)
- * @param {object} store - memory store
- * @return {object} updated data store
- */
-function deletePrototype(filepath, store) {
- const file = _path2.default.parse(filepath);
- const requirePath = utils.removeFile(file.name, 'prototype', filepath, store);
-
- return store.setIn(['prototypes', file.name], requirePath);
-}
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.updateHTML = updateHTML;\nexports.deleteHTML = deleteHTML;\nexports.updatePrototype = updatePrototype;\nexports.deletePrototype = deletePrototype;\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _fsExtra = __webpack_require__(/*! fs-extra */ 3);\n\nvar _fsExtra2 = _interopRequireDefault(_fsExtra);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1);\n\nvar utils = _interopRequireWildcard(_utils);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handle update of an HMTL template\n *\n * @function updateHTML\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - contains KSS section data\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nfunction updateHTML(filepath, section, store) {\n const file = _path2.default.parse(filepath);\n const content = _fsExtra2.default.readFileSync(filepath, 'utf8');\n const newSection = section;\n\n if (content) {\n newSection.templatePath = utils.writeFile(section.referenceURI, 'template', filepath, content, store);\n newSection.templateContent = content;\n\n // Rewrite section data with template content\n newSection.sectionPath = utils.writeSectionData(store, newSection);\n\n return store.setIn(['sections', 'sectionsByPath', section.kssPath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);\n }\n\n console.log(`File ${file.base} could not be read`);\n return store;\n}\n\n/**\n * Handle removal of an HMTL template\n *\n * @function deleteHTML\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - contains KSS section data\n * @param {object} store - memory store\n * @return {object} updated data store\n */\n/** @module cli/html-handler */\nfunction deleteHTML(filepath, section, store) {\n const newSection = section;\n\n utils.removeFile(newSection.referenceURI, 'template', filepath, store);\n\n delete newSection.templatePath;\n\n return store.setIn(['sections', 'sectionsByPath', section.kssPath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);\n}\n\n/**\n * Handle update for a prototype file\n *\n * @function updatePrototype\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nfunction updatePrototype(filepath, store) {\n const file = _path2.default.parse(filepath);\n const content = _fsExtra2.default.readFileSync(filepath, 'utf8');\n\n if (content) {\n const requirePath = utils.writeFile(file.name, 'prototype', filepath, content, store);\n\n return store.setIn(['prototypes', file.name], requirePath);\n }\n\n console.log(`File ${file.base} could not be read`);\n return store;\n}\n\n/**\n * Handle removal of a prototype file\n *\n * @function deletePrototype\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nfunction deletePrototype(filepath, store) {\n const file = _path2.default.parse(filepath);\n const requirePath = utils.removeFile(file.name, 'prototype', filepath, store);\n\n return store.setIn(['prototypes', file.name], requirePath);\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NsaS9oYW5kbGVIVE1MLmpzP2VhMjIiXSwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBtb2R1bGUgY2xpL2h0bWwtaGFuZGxlciAqL1xuaW1wb3J0IHBhdGggZnJvbSAncGF0aCc7XG5pbXBvcnQgZnMgZnJvbSAnZnMtZXh0cmEnO1xuXG5pbXBvcnQgKiBhcyB1dGlscyBmcm9tICcuL3V0aWxzJztcblxuLyoqXG4gKiBIYW5kbGUgdXBkYXRlIG9mIGFuIEhNVEwgdGVtcGxhdGVcbiAqXG4gKiBAZnVuY3Rpb24gdXBkYXRlSFRNTFxuICogQHBhcmFtIHtzdHJpbmd9IGZpbGVwYXRoIC0gZmlsZXBhdGggb2YgY2hhbmdlZCBmaWxlIChjb21lcyBmcm9tIGdhemUpXG4gKiBAcGFyYW0ge29iamVjdH0gc2VjdGlvbiAtIGNvbnRhaW5zIEtTUyBzZWN0aW9uIGRhdGFcbiAqIEBwYXJhbSB7b2JqZWN0fSBzdG9yZSAtIG1lbW9yeSBzdG9yZVxuICogQHJldHVybiB7b2JqZWN0fSB1cGRhdGVkIGR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QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7Ozs7OztBQVFBO0FBQ0E7QUFDQTtBQUNBO0FBTUE7QUFJQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 15 */
+/* no static exports found */
+/* all exports used */
+/*!******************************!*\
+ !*** ./src/cli/handleKSS.js ***!
+ \******************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.updateKSS = updateKSS;
-exports.deleteKSS = deleteKSS;
-
-var _path = __webpack_require__(0);
-
-var _path2 = _interopRequireDefault(_path);
-
-var _fsExtra = __webpack_require__(3);
-
-var _fsExtra2 = _interopRequireDefault(_fsExtra);
-
-var _kss = __webpack_require__(24);
-
-var _chalk = __webpack_require__(2);
-
-var _chalk2 = _interopRequireDefault(_chalk);
-
-var _utils = __webpack_require__(1);
-
-var utils = _interopRequireWildcard(_utils);
-
-var _handleTemplates = __webpack_require__(7);
-
-var _requireTemplates = __webpack_require__(8);
-
-function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Handle update of a KSS section
- *
- * @function updateKSS
- * @param {string} filepath - filepath of changed file (comes from gaze)
- * @param {object} store - memory store
- * @return {object} updated data store
- */
-function updateKSS(filepath, store) {
- const kssSource = _fsExtra2.default.readFileSync(filepath, 'utf8');
- const huron = store.get('config');
- const oldSection = utils.getSection(filepath, false, store) || {};
- const file = _path2.default.parse(filepath);
- let newStore = store;
-
- if (kssSource) {
- const styleguide = (0, _kss.parse)(kssSource, huron.get('kssOptions'));
-
- if (styleguide.data.sections.length) {
- const section = utils.normalizeSectionData(styleguide.data.sections[0]);
-
- if (section.reference && section.referenceURI) {
- // Update or add section data
- newStore = updateSectionData(filepath, section, oldSection, newStore);
-
- // Remove old section data if reference URI has changed
- if (oldSection && oldSection.referenceURI && oldSection.referenceURI !== section.referenceURI) {
- newStore = unsetSection(oldSection, file, newStore, false);
- }
-
- (0, _requireTemplates.writeStore)(newStore);
- console.log(_chalk2.default.green(`KSS source in ${filepath} changed or added`));
- return newStore;
- }
-
- console.log(_chalk2.default.magenta(`KSS section in ${filepath} is missing a section reference`));
- return newStore;
- }
-
- console.log(_chalk2.default.magenta(`No KSS found in ${filepath}`));
- return newStore;
- }
-
- if (oldSection) {
- newStore = deleteKSS(filepath, oldSection, newStore);
- }
-
- console.log(_chalk2.default.red(`${filepath} not found or empty`)); // eslint-disable-line no-console
- return newStore;
-}
-
-/**
- * Handle removal of a KSS section
- *
- * @function deleteKSS
- * @param {string} filepath - filepath of changed file (comes from gaze)
- * @param {object} section - KSS section data
- * @param {object} store - memory store
- * @return {object} updated data store
- */
-/** @module cli/kss-handler */
-
-function deleteKSS(filepath, section, store) {
- const file = _path2.default.parse(filepath);
-
- if (section.reference && section.referenceURI) {
- // Remove section data from memory store
- return unsetSection(section, file, store, true);
- }
-
- return store;
-}
-
-/**
- * Update the sections store with new data for a specific section
- *
- * @function updateSectionData
- * @param {object} section - contains updated section data
- * @param {string} kssPath - path to KSS section
- * @param {object} store - memory store
- * @return {object} updated data store
- */
-function updateSectionData(kssPath, section, oldSection, store) {
- const sectionFileInfo = _path2.default.parse(kssPath);
- const dataFilepath = _path2.default.join(sectionFileInfo.dir, `${sectionFileInfo.name}.json`);
- const isInline = null !== section.markup.match(/<\/[^>]*>/);
- const newSort = sortSection(store.getIn(['sections', 'sorted']), section.reference, store.get('referenceDelimiter'));
- const newSection = Object.assign({}, oldSection, section);
- let newStore = store;
-
- // Required for reference from templates and data
- newSection.kssPath = kssPath;
-
- if (isInline) {
- // Set section value if inlineTempalte() returned a path
- newStore = updateInlineTemplate(kssPath, oldSection, newSection, newStore);
- } else {
- // Remove inline template, if it exists
- utils.removeFile(newSection.referenceURI, 'template', kssPath, store);
- // Update markup and data fields
- newStore = updateTemplateFields(sectionFileInfo, oldSection, newSection, newStore);
- }
-
- // Output section description
- newStore = updateDescription(kssPath, oldSection, newSection, newStore);
-
- // Output section data to a JSON file
- newSection.sectionPath = utils.writeSectionData(newStore, newSection, dataFilepath);
-
- // Update section sorting
- return newStore.setIn(['sections', 'sorted'], newSort).setIn(['sections', 'sectionsByPath', kssPath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);
-}
-
-/**
- * Handle detection and output of inline templates, which is markup written
- * in the KSS documentation itself as opposed to an external file
- *
- * @function updateInlineTemplate
- * @param {string} oldSection - previous iteration of KSS data, if updated
- * @param {object} section - KSS section data
- * @return {object} updated data store with new template path info
- */
-function updateInlineTemplate(filepath, oldSection, section, store) {
- const newSection = section;
- const newStore = store;
-
- // If we have inline markup
- if (fieldShouldOutput(oldSection, section, 'markup')) {
- newSection.templatePath = utils.writeFile(section.referenceURI, 'template', filepath, section.markup, store);
- newSection.templateContent = section.markup;
-
- return newStore.setIn(['sections', 'sectionsByPath', filepath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);
- }
-
- return newStore;
-}
-
-/**
- * Handle output of section description
- *
- * @function updateDescription
- * @param {string} oldSection - previous iteration of KSS data, if updated
- * @param {object} section - KSS section data
- * @return {object} updated data store with new descripton path info
- */
-function updateDescription(filepath, oldSection, section, store) {
- const newSection = section;
- const newStore = store;
-
- // If we don't have previous KSS or the KSS has been updated
- if (fieldShouldOutput(oldSection, section, 'description')) {
- // Write new description
- newSection.descriptionPath = utils.writeFile(section.referenceURI, 'description', filepath, section.description, store);
-
- return newStore.setIn(['sections', 'sectionsByPath', filepath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);
- }
-
- return newStore;
-}
-
-/**
- * Handle Data and Markup fields
- *
- * @function updateTemplateFields
- * @param {string} file - File data for KSS file from path.parse()
- * @param {object} oldSection - outdated KSS data
- * @param {object} section - KSS section data
- * @param {object} store - memory store
- * @return {object} KSS section data with updated asset paths
- */
-function updateTemplateFields(file, oldSection, section, store) {
- const kssPath = _path2.default.format(file);
- const newSection = section;
- let filepath = '';
- let oldFilepath = '';
- let newStore = store;
-
- ['data', 'markup'].forEach(field => {
- if (newSection[field]) {
- if (oldSection[field]) {
- oldFilepath = _path2.default.join(file.dir, oldSection[field]);
- newStore = (0, _handleTemplates.deleteTemplate)(oldFilepath, oldSection, newStore);
- }
-
- filepath = _path2.default.join(file.dir, newSection[field]);
- newStore = (0, _handleTemplates.updateTemplate)(filepath, newSection, newStore);
- } else {
- delete newSection[field];
- newStore = newStore.setIn(['sections', 'sectionsByPath', kssPath], newSection).setIn(['sections', 'sectionsByURI', newSection.referenceURI], newSection);
- }
- });
-
- return newStore;
-}
-
-/**
- * Remove a section from the memory store
- *
- * @function unsetSection
- * @param {object} section - contains updated section data
- * @param {string} file - file object from path.parse()
- * @param {object} store - memory store
- * @param {bool} removed - has the file been removed or just the section information changed?
- * @return {object} updated data store with new descripton path info
- */
-function unsetSection(section, file, store, removed) {
- const sorted = store.getIn(['sections', 'sorted']);
- const kssPath = _path2.default.format(file);
- const dataFilepath = _path2.default.join(file.dir, `${file.name}.json`);
- const isInline = section.markup && null !== section.markup.match(/<\/[^>]*>/);
- const newSort = unsortSection(sorted, section.reference, store.get('referenceDelimiter'));
- let newStore = store;
-
- // Remove old section data
- utils.removeFile(section.referenceURI, 'section', dataFilepath, newStore);
-
- // Remove associated inline template
- if (isInline) {
- utils.removeFile(section.referenceURI, 'template', kssPath, newStore);
- }
-
- // Remove description template
- utils.removeFile(section.referenceURI, 'description', kssPath, newStore);
-
- // Remove data from sectionsByPath if file has been removed
- if (removed) {
- newStore = newStore.deleteIn(['sections', 'sectionsByPath', kssPath]);
- }
-
- return newStore.deleteIn(['sections', 'sectionsByURI', section.referenceURI]).setIn(['sections', 'sorted'], newSort);
-}
-
-/**
- * Sort sections and subsections
- *
- * @function sortSection
- * @param {object} sorted - currently sorted sections
- * @param {string} reference - reference URI of section to sort
- * @return {object} updated data store with new descripton path info
- */
-function sortSection(sorted, reference, delimiter) {
- const parts = reference.split(delimiter);
- const newSort = sorted[parts[0]] || {};
- const newSorted = sorted;
-
- if (1 < parts.length) {
- const newParts = parts.filter((part, idx) => 0 !== idx);
- newSorted[parts[0]] = sortSection(newSort, newParts.join(delimiter), delimiter);
- } else {
- newSorted[parts[0]] = newSort;
- }
-
- return newSorted;
-}
-
-/**
- * Remove a section from the sorted sections
- *
- * @function unsortSection
- * @param {object} sorted - currently sorted sections
- * @param {string} reference - reference URI of section to sort
- * @return {object} updated data store with new descripton path info
- */
-function unsortSection(sorted, reference, delimiter) {
- const parts = reference.split(delimiter);
- const subsections = Object.keys(sorted[parts[0]]);
- const newSorted = sorted;
-
- if (subsections.length) {
- if (1 < parts.length) {
- const newParts = parts.filter((part, idx) => 0 !== idx);
- newSorted[parts[0]] = unsortSection(newSorted[parts[0]], newParts.join(delimiter), delimiter);
- }
- } else {
- delete newSorted[parts[0]];
- }
-
- return newSorted;
-}
-
-/**
- * Compare a KSS field between old and new KSS data to see if we need to output
- * a new module for that field
- *
- * @function fieldShouldOutput
- * @param {object} oldSection - currently sorted sections
- * @param {object} newSection - reference URI of section to sort
- * @param {string} field - KSS field to check
- * @return {bool} output a new module for the KSS field
- */
-function fieldShouldOutput(oldSection, newSection, field) {
- return oldSection && (oldSection[field] !== newSection[field] || oldSection.referenceURI !== newSection.referenceURI) || !oldSection;
-}
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.updateKSS = updateKSS;\nexports.deleteKSS = deleteKSS;\n\nvar _path = __webpack_require__(/*! path */ 0);\n\nvar _path2 = _interopRequireDefault(_path);\n\nvar _fsExtra = __webpack_require__(/*! fs-extra */ 3);\n\nvar _fsExtra2 = _interopRequireDefault(_fsExtra);\n\nvar _kss = __webpack_require__(/*! kss */ 25);\n\nvar _chalk = __webpack_require__(/*! chalk */ 2);\n\nvar _chalk2 = _interopRequireDefault(_chalk);\n\nvar _utils = __webpack_require__(/*! ./utils */ 1);\n\nvar utils = _interopRequireWildcard(_utils);\n\nvar _handleTemplates = __webpack_require__(/*! ./handleTemplates */ 7);\n\nvar _requireTemplates = __webpack_require__(/*! ./requireTemplates */ 8);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Handle update of a KSS section\n *\n * @function updateKSS\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nfunction updateKSS(filepath, store) {\n const kssSource = _fsExtra2.default.readFileSync(filepath, 'utf8');\n const huron = store.get('config');\n const oldSection = utils.getSection(filepath, false, store) || {};\n const file = _path2.default.parse(filepath);\n let newStore = store;\n\n if (kssSource) {\n const styleguide = (0, _kss.parse)(kssSource, huron.get('kssOptions'));\n\n if (styleguide.data.sections.length) {\n const section = utils.normalizeSectionData(styleguide.data.sections[0]);\n\n if (section.reference && section.referenceURI) {\n // Update or add section data\n newStore = updateSectionData(filepath, section, oldSection, newStore);\n\n // Remove old section data if reference URI has changed\n if (oldSection && oldSection.referenceURI && oldSection.referenceURI !== section.referenceURI) {\n newStore = unsetSection(oldSection, file, newStore, false);\n }\n\n (0, _requireTemplates.writeStore)(newStore);\n console.log(_chalk2.default.green(`KSS source in ${filepath} changed or added`));\n return newStore;\n }\n\n console.log(_chalk2.default.magenta(`KSS section in ${filepath} is missing a section reference`));\n return newStore;\n }\n\n console.log(_chalk2.default.magenta(`No KSS found in ${filepath}`));\n return newStore;\n }\n\n if (oldSection) {\n newStore = deleteKSS(filepath, oldSection, newStore);\n }\n\n console.log(_chalk2.default.red(`${filepath} not found or empty`)); // eslint-disable-line no-console\n return newStore;\n}\n\n/**\n * Handle removal of a KSS section\n *\n * @function deleteKSS\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - KSS section data\n * @param {object} store - memory store\n * @return {object} updated data store\n */\n/** @module cli/kss-handler */\n\nfunction deleteKSS(filepath, section, store) {\n const file = _path2.default.parse(filepath);\n\n if (section.reference && section.referenceURI) {\n // Remove section data from memory store\n return unsetSection(section, file, store, true);\n }\n\n return store;\n}\n\n/**\n * Update the sections store with new data for a specific section\n *\n * @function updateSectionData\n * @param {object} section - contains updated section data\n * @param {string} kssPath - path to KSS section\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nfunction updateSectionData(kssPath, section, oldSection, store) {\n const sectionFileInfo = _path2.default.parse(kssPath);\n const dataFilepath = _path2.default.join(sectionFileInfo.dir, `${sectionFileInfo.name}.json`);\n const isInline = null !== section.markup.match(/<\\/[^>]*>/);\n const newSort = sortSection(store.getIn(['sections', 'sorted']), section.reference, store.get('referenceDelimiter'));\n const newSection = Object.assign({}, oldSection, section);\n let newStore = store;\n\n // Required for reference from templates and data\n newSection.kssPath = kssPath;\n\n if (isInline) {\n // Set section value if inlineTempalte() returned a path\n newStore = updateInlineTemplate(kssPath, oldSection, newSection, newStore);\n } else {\n // Remove inline template, if it exists\n utils.removeFile(newSection.referenceURI, 'template', kssPath, store);\n // Update markup and data fields\n newStore = updateTemplateFields(sectionFileInfo, oldSection, newSection, newStore);\n }\n\n // Output section description\n newStore = updateDescription(kssPath, oldSection, newSection, newStore);\n\n // Output section data to a JSON file\n newSection.sectionPath = utils.writeSectionData(newStore, newSection, dataFilepath);\n\n // Update section sorting\n return newStore.setIn(['sections', 'sorted'], newSort).setIn(['sections', 'sectionsByPath', kssPath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);\n}\n\n/**\n * Handle detection and output of inline templates, which is markup written\n * in the KSS documentation itself as opposed to an external file\n *\n * @function updateInlineTemplate\n * @param {string} oldSection - previous iteration of KSS data, if updated\n * @param {object} section - KSS section data\n * @return {object} updated data store with new template path info\n */\nfunction updateInlineTemplate(filepath, oldSection, section, store) {\n const newSection = section;\n const newStore = store;\n\n // If we have inline markup\n if (fieldShouldOutput(oldSection, section, 'markup')) {\n newSection.templatePath = utils.writeFile(section.referenceURI, 'template', filepath, section.markup, store);\n newSection.templateContent = section.markup;\n\n return newStore.setIn(['sections', 'sectionsByPath', filepath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);\n }\n\n return newStore;\n}\n\n/**\n * Handle output of section description\n *\n * @function updateDescription\n * @param {string} oldSection - previous iteration of KSS data, if updated\n * @param {object} section - KSS section data\n * @return {object} updated data store with new descripton path info\n */\nfunction updateDescription(filepath, oldSection, section, store) {\n const newSection = section;\n const newStore = store;\n\n // If we don't have previous KSS or the KSS has been updated\n if (fieldShouldOutput(oldSection, section, 'description')) {\n // Write new description\n newSection.descriptionPath = utils.writeFile(section.referenceURI, 'description', filepath, section.description, store);\n\n return newStore.setIn(['sections', 'sectionsByPath', filepath], newSection).setIn(['sections', 'sectionsByURI', section.referenceURI], newSection);\n }\n\n return newStore;\n}\n\n/**\n * Handle Data and Markup fields\n *\n * @function updateTemplateFields\n * @param {string} file - File data for KSS file from path.parse()\n * @param {object} oldSection - outdated KSS data\n * @param {object} section - KSS section data\n * @param {object} store - memory store\n * @return {object} KSS section data with updated asset paths\n */\nfunction updateTemplateFields(file, oldSection, section, store) {\n const kssPath = _path2.default.format(file);\n const newSection = section;\n let filepath = '';\n let oldFilepath = '';\n let newStore = store;\n\n ['data', 'markup'].forEach(field => {\n if (newSection[field]) {\n if (oldSection[field]) {\n oldFilepath = _path2.default.join(file.dir, oldSection[field]);\n newStore = (0, _handleTemplates.deleteTemplate)(oldFilepath, oldSection, newStore);\n }\n\n filepath = _path2.default.join(file.dir, newSection[field]);\n newStore = (0, _handleTemplates.updateTemplate)(filepath, newSection, newStore);\n } else {\n delete newSection[field];\n newStore = newStore.setIn(['sections', 'sectionsByPath', kssPath], newSection).setIn(['sections', 'sectionsByURI', newSection.referenceURI], newSection);\n }\n });\n\n return newStore;\n}\n\n/**\n * Remove a section from the memory store\n *\n * @function unsetSection\n * @param {object} section - contains updated section data\n * @param {string} file - file object from path.parse()\n * @param {object} store - memory store\n * @param {bool} removed - has the file been removed or just the section information changed?\n * @return {object} updated data store with new descripton path info\n */\nfunction unsetSection(section, file, store, removed) {\n const sorted = store.getIn(['sections', 'sorted']);\n const kssPath = _path2.default.format(file);\n const dataFilepath = _path2.default.join(file.dir, `${file.name}.json`);\n const isInline = section.markup && null !== section.markup.match(/<\\/[^>]*>/);\n const newSort = unsortSection(sorted, section.reference, store.get('referenceDelimiter'));\n let newStore = store;\n\n // Remove old section data\n utils.removeFile(section.referenceURI, 'section', dataFilepath, newStore);\n\n // Remove associated inline template\n if (isInline) {\n utils.removeFile(section.referenceURI, 'template', kssPath, newStore);\n }\n\n // Remove description template\n utils.removeFile(section.referenceURI, 'description', kssPath, newStore);\n\n // Remove data from sectionsByPath if file has been removed\n if (removed) {\n newStore = newStore.deleteIn(['sections', 'sectionsByPath', kssPath]);\n }\n\n return newStore.deleteIn(['sections', 'sectionsByURI', section.referenceURI]).setIn(['sections', 'sorted'], newSort);\n}\n\n/**\n * Sort sections and subsections\n *\n * @function sortSection\n * @param {object} sorted - currently sorted sections\n * @param {string} reference - reference URI of section to sort\n * @return {object} updated data store with new descripton path info\n */\nfunction sortSection(sorted, reference, delimiter) {\n const parts = reference.split(delimiter);\n const newSort = sorted[parts[0]] || {};\n const newSorted = sorted;\n\n if (1 < parts.length) {\n const newParts = parts.filter((part, idx) => 0 !== idx);\n newSorted[parts[0]] = sortSection(newSort, newParts.join(delimiter), delimiter);\n } else {\n newSorted[parts[0]] = newSort;\n }\n\n return newSorted;\n}\n\n/**\n * Remove a section from the sorted sections\n *\n * @function unsortSection\n * @param {object} sorted - currently sorted sections\n * @param {string} reference - reference URI of section to sort\n * @return {object} updated data store with new descripton path info\n */\nfunction unsortSection(sorted, reference, delimiter) {\n const parts = reference.split(delimiter);\n const subsections = Object.keys(sorted[parts[0]]);\n const newSorted = sorted;\n\n if (subsections.length) {\n if (1 < parts.length) {\n const newParts = parts.filter((part, idx) => 0 !== idx);\n newSorted[parts[0]] = unsortSection(newSorted[parts[0]], newParts.join(delimiter), delimiter);\n }\n } else {\n delete newSorted[parts[0]];\n }\n\n return newSorted;\n}\n\n/**\n * Compare a KSS field between old and new KSS data to see if we need to output\n * a new module for that field\n *\n * @function fieldShouldOutput\n * @param {object} oldSection - currently sorted sections\n * @param {object} newSection - reference URI of section to sort\n * @param {string} field - KSS field to check\n * @return {bool} output a new module for the KSS field\n */\nfunction fieldShouldOutput(oldSection, newSection, field) {\n return oldSection && (oldSection[field] !== newSection[field] || oldSection.referenceURI !== newSection.referenceURI) || !oldSection;\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NsaS9oYW5kbGVLU1MuanM/MzJmZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQG1vZHVsZSBjbGkva3NzLWhhbmRsZXIgKi9cblxuaW1wb3J0IHBhdGggZnJvbSAncGF0aCc7XG5pbXBvcnQgZnMgZnJvbSAnZnMtZXh0cmEnO1xuaW1wb3J0IHsgcGFyc2UgfSBmcm9tICdrc3MnO1xuaW1wb3J0IGNoYWxrIGZyb20gJ2NoYWxrJztcblxuaW1wb3J0ICogYXMgdXRpbHMgZnJvbSAnLi91dGlscyc7XG5pbXBvcnQgeyB1cGRhdGVUZW1wbGF0ZSwgZGVsZXRlVGVtcGxhdGUgfSBmcm9tICcuL2hhbmRsZVRlbXBsYXRlcyc7XG5pbXBvcnQgeyB3cml0ZVN0b3JlIH0gZnJvbSAnLi9yZXF1aXJlVGVtcGxhdGVzJztcblxuLyoqXG4gKiBIYW5kbGUgdXBkYXRlIG9mIGEgS1NTIHNlY3Rpb25cbiAqXG4gKiBAZnVuY3Rpb24gdXBkYXRlS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FDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUtBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTs7Ozs7Ozs7OztBQVVBO0FBQ0E7QUFLQSIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 16 */
+/* no static exports found */
+/* all exports used */
+/*!************************************!*\
+ !*** ./src/cli/requireExternal.js ***!
+ \************************************/
/***/ (function(module, exports) {
-"use strict";
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = requireExternal;
-// Necessary to remove require statement from Webpack processing preserve it in output
-/* eslint-disable import/no-dynamic-require, global-require */
-function requireExternal(requirePath) {
- return require(requirePath);
-}
-/* eslint-enable */
+eval("\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = requireExternal;\n// Necessary to remove require statement from Webpack processing preserve it in output\n/* eslint-disable import/no-dynamic-require, global-require */\nfunction requireExternal(requirePath) {\n return require(requirePath);\n}\n/* eslint-enable *///# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NsaS9yZXF1aXJlRXh0ZXJuYWwuanM/OWM3MCJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBOZWNlc3NhcnkgdG8gcmVtb3ZlIHJlcXVpcmUgc3RhdGVtZW50IGZyb20gV2VicGFjayBwcm9jZXNzaW5nIHByZXNlcnZlIGl0IGluIG91dHB1dFxuLyogZXNsaW50LWRpc2FibGUgaW1wb3J0L25vLWR5bmFtaWMtcmVxdWlyZSwgZ2xvYmFsLXJlcXVpcmUgKi9cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIHJlcXVpcmVFeHRlcm5hbChyZXF1aXJlUGF0aCkge1xuICByZXR1cm4gcmVxdWlyZShyZXF1aXJlUGF0aCk7XG59XG4vKiBlc2xpbnQtZW5hYmxlICovXG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gc3JjL2NsaS9yZXF1aXJlRXh0ZXJuYWwuanMiXSwibWFwcGluZ3MiOiI7Ozs7O0FBRUE7QUFGQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/* 17 */
+/* no static exports found */
+/* all exports used */
+/*!***************************!*\
+ !*** ./src/cli/server.js ***!
+ \***************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = startWebpack;
-
-var _webpack = __webpack_require__(5);
-
-var _webpack2 = _interopRequireDefault(_webpack);
-
-var _webpackDevServer = __webpack_require__(28);
-
-var _webpackDevServer2 = _interopRequireDefault(_webpackDevServer);
-
-var _chalk = __webpack_require__(2);
-
-var _chalk2 = _interopRequireDefault(_chalk);
-
-var _opn = __webpack_require__(26);
-
-var _opn2 = _interopRequireDefault(_opn);
-
-var _devServer = __webpack_require__(10);
-
-var _devServer2 = _interopRequireDefault(_devServer);
-
-var _parseArgs = __webpack_require__(4);
-
-var _parseArgs2 = _interopRequireDefault(_parseArgs);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-/**
- * Spin up webpack-dev-server or, if production flag is set, run webpack a single time
- *
- * @function startWebpack
- * @param {object} config - webpack configuration, preprocessed by {@link module:cli/generate-config generateConfig}
- * @see {@link module:cli/generate-config generateConfig}
- */
-/** @module cli/webpack-server */
-function startWebpack(config) {
- const huron = config.huron;
- const webpackConfig = config.webpack;
- const compiler = (0, _webpack2.default)(webpackConfig);
-
- if (_parseArgs2.default.progress) {
- compiler.apply(new _webpack2.default.ProgressPlugin((percentage, msg) => {
- console.log(`${percentage * 100}% `, msg);
- }));
- }
-
- if (_parseArgs2.default.production) {
- compiler.run((err, stats) => {
- const info = stats.toJson();
-
- if (err) {
- console.log(err);
- }
-
- if (stats.hasErrors()) {
- console.error(_chalk2.default.red('Webpack encountered errors during compile: ', info.errors));
- }
-
- if (stats.hasWarnings()) {
- console.error(_chalk2.default.yellow('Webpack encountered warnings during compile: ', info.warnings));
- }
- });
- } else {
- const server = new _webpackDevServer2.default(compiler, (0, _devServer2.default)(huron));
- const prototypeName = huron.prototypes[0].title || huron.prototypes[0];
-
- server.listen(huron.port, 'localhost', err => {
- if (err) {
- return console.log(err);
- }
-
- console.log(`Listening at http://localhost:${huron.port}/`);
- (0, _opn2.default)(`http://localhost:${huron.port}/${huron.root}/${prototypeName}.html`);
- return true;
- });
- }
-}
-
-/***/ }),
-/* 18 */
-/***/ (function(module, exports, __webpack_require__) {
-
-"use strict";
-
-
-const path = __webpack_require__(0);
-
-module.exports = {
- css: [],
- entry: 'huron',
- js: [],
- kss: 'css/',
- kssExtension: '.css',
- kssOptions: {
- multiline: true,
- markdown: true,
- custom: ['data']
- },
- output: 'partials',
- port: 8080,
- prototypes: ['index'],
- root: 'dist/',
- sectionTemplate: path.join(__dirname, '../../templates/section.hbs'),
- classNames: false,
- templates: {
- rule: {
- test: /\.(hbs|handlebars)$/,
- use: 'handlebars-loader'
- },
- extension: '.hbs'
- },
- window: {}
-};
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = startWebpack;\n\nvar _webpack = __webpack_require__(/*! webpack */ 5);\n\nvar _webpack2 = _interopRequireDefault(_webpack);\n\nvar _webpackDevServer = __webpack_require__(/*! webpack-dev-server */ 29);\n\nvar _webpackDevServer2 = _interopRequireDefault(_webpackDevServer);\n\nvar _chalk = __webpack_require__(/*! chalk */ 2);\n\nvar _chalk2 = _interopRequireDefault(_chalk);\n\nvar _opn = __webpack_require__(/*! opn */ 27);\n\nvar _opn2 = _interopRequireDefault(_opn);\n\nvar _devServer = __webpack_require__(/*! ../../config/devServer.config */ 10);\n\nvar _devServer2 = _interopRequireDefault(_devServer);\n\nvar _parseArgs = __webpack_require__(/*! ./parseArgs */ 4);\n\nvar _parseArgs2 = _interopRequireDefault(_parseArgs);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Spin up webpack-dev-server or, if production flag is set, run webpack a single time\n *\n * @function startWebpack\n * @param {object} config - webpack configuration, preprocessed by {@link module:cli/generate-config generateConfig}\n * @see {@link module:cli/generate-config generateConfig}\n */\n/** @module cli/webpack-server */\nfunction startWebpack(config) {\n const huron = config.huron;\n const webpackConfig = config.webpack;\n const compiler = (0, _webpack2.default)(webpackConfig);\n\n if (_parseArgs2.default.progress) {\n compiler.apply(new _webpack2.default.ProgressPlugin((percentage, msg) => {\n console.log(`${percentage * 100}% `, msg);\n }));\n }\n\n if (_parseArgs2.default.production) {\n compiler.run((err, stats) => {\n const info = stats.toJson();\n\n if (err) {\n console.log(err);\n }\n\n if (stats.hasErrors()) {\n console.error(_chalk2.default.red('Webpack encountered errors during compile: ', info.errors));\n }\n\n if (stats.hasWarnings()) {\n console.error(_chalk2.default.yellow('Webpack encountered warnings during compile: ', info.warnings));\n }\n });\n } else {\n const server = new _webpackDevServer2.default(compiler, (0, _devServer2.default)(huron));\n const prototypeName = huron.prototypes[0].title || huron.prototypes[0];\n\n server.listen(huron.port, 'localhost', err => {\n if (err) {\n return console.log(err);\n }\n\n console.log(`Listening at http://localhost:${huron.port}/`);\n (0, _opn2.default)(`http://localhost:${huron.port}/${huron.root}/${prototypeName}.html`);\n return true;\n });\n }\n}//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vc3JjL2NsaS9zZXJ2ZXIuanM/ODJlMSJdLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQG1vZHVsZSBjbGkvd2VicGFjay1zZXJ2ZXIgKi9cbmltcG9ydCB3ZWJwYWNrIGZyb20gJ3dlYnBhY2snO1xuaW1wb3J0IFdlYnBhY2tEZXZ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NhbGhvc3QnLFxuICAgICAgKGVycikgPT4ge1xuICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgcmV0dXJuIGNvbnNvbGUubG9nKGVycik7XG4gICAgICAgIH1cblxuICAgICAgICBjb25zb2xlLmxvZyhgTGlzdGVuaW5nIGF0IGh0dHA6Ly9sb2NhbGhvc3Q6JHtodXJvbi5wb3J0fS9gKTtcbiAgICAgICAgb3BlbihgaHR0cDovL2xvY2FsaG9zdDoke2h1cm9uLnBvcnR9LyR7aHVyb24ucm9vdH0vJHtwcm90b3R5cGVOYW1lfS5odG1sYCk7XG4gICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgfVxuICAgICk7XG4gIH1cbn1cblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyBzcmMvY2xpL3NlcnZlci5qcyJdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFnQkE7QUFDQTtBQWhCQTtBQUNBOzs7QUFBQTtBQUNBOzs7QUFBQTtBQUNBOzs7QUFBQTtBQUNBOzs7QUFDQTtBQUNBOzs7QUFBQTtBQUNBOzs7OztBQUNBOzs7Ozs7O0FBVEE7QUFnQkE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFHQTtBQUNBO0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBTUE7QUFDQTtBQUNBO0FBQ0E7QUFLQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUlBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFFQTtBQUNBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
+/* 18 */,
/* 19 */
-/***/ (function(module, exports, __webpack_require__) {
+/* exports provided: default */
+/* all exports used */
+/*!*******************************************!*\
+ !*** ./src/defaultConfig/huron.config.js ***!
+ \*******************************************/
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
-
-
-var _parseArgs = __webpack_require__(4);
-
-var _parseArgs2 = _interopRequireDefault(_parseArgs);
-
-function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
-
-const webpack = __webpack_require__(5);
-const path = __webpack_require__(0);
-
-module.exports = huron => {
- const cwd = process.cwd();
-
- return {
- entry: {},
- output: {
- path: path.join(cwd, huron.root),
- publicPath: _parseArgs2.default.production ? '' : `http://localhost:${huron.port}/${huron.root}`,
- filename: '[name].js',
- chunkFilename: '[name].chunk.min.js'
- },
- plugins: [new webpack.HotModuleReplacementPlugin(), new webpack.NamedModulesPlugin()],
- resolve: {
- modulesDirectories: [path.resolve(__dirname, '../src/js')]
- },
- resolveLoader: {
- modulesDirectories: ['web_loaders', 'web_modules', 'node_loaders', 'node_modules', path.resolve(__dirname, '../node_modules')]
- },
- module: {
- rules: [{
- test: /\.html$/,
- include: [path.join(cwd, huron.root, huron.output)],
- use: 'html-loader'
- }, {
- test: /\.(hbs|handlebars)$/,
- include: [path.join(cwd, huron.root, 'huron-assets')],
- use: {
- loader: 'handlebars-loader',
- options: {
- helperDirs: [path.join(__dirname, '../../', 'templates/handlebarsHelpers')]
- }
- }
- }]
- }
- };
-};
+eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path__ = __webpack_require__(/*! path */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_path___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_path__);\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n css: [],\n entry: 'huron',\n js: [],\n kss: 'css/',\n kssExtension: '.css',\n kssOptions: {\n multiline: true,\n markdown: true,\n custom: ['data'],\n },\n output: 'partials',\n port: 8080,\n prototypes: ['index'],\n root: 'dist/',\n sectionTemplate: __WEBPACK_IMPORTED_MODULE_0_path___default.a.join(__dirname, '../../templates/section.hbs'),\n classNames: false,\n templates: {\n rule: {\n test: /\\.(hbs|handlebars)$/,\n use: 'handlebars-loader',\n },\n extension: '.hbs',\n },\n window: {},\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvZGVmYXVsdENvbmZpZy9odXJvbi5jb25maWcuanM/MGJmZCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGF0aCBmcm9tICdwYXRoJztcblxuZXhwb3J0IGRlZmF1bHQge1xuICBjc3M6IFtdLFxuICBlbnRyeTogJ2h1cm9uJyxcbiAganM6IFtdLFxuICBrc3M6ICdjc3MvJyxcbiAga3NzRXh0ZW5zaW9uOiAnLmNzcycsXG4gIGtzc09wdGlvbnM6IHtcbiAgICBtdWx0aWxpbmU6IHRydWUsXG4gICAgbWFya2Rvd246IHRydWUsXG4gICAgY3VzdG9tOiBbJ2RhdGEnXSxcbiAgfSxcbiAgb3V0cHV0OiAncGFydGlhbHMnLFxuICBwb3J0OiA4MDgwLFxuICBwcm90b3R5cGVzOiBbJ2luZGV4J10sXG4gIHJvb3Q6ICdkaXN0LycsXG4gIHNlY3Rpb25UZW1wbGF0ZTogcGF0aC5qb2luKF9fZGlybmFtZSwgJy4uLy4uL3RlbXBsYXRlcy9zZWN0aW9uLmhicycpLFxuICBjbGFzc05hbWVzOiBmYWxzZSxcbiAgdGVtcGxhdGVzOiB7XG4gICAgcnVsZToge1xuICAgICAgdGVzdDogL1xcLihoYnN8aGFuZGxlYmFycykkLyxcbiAgICAgIHVzZTogJ2hhbmRsZWJhcnMtbG9hZGVyJyxcbiAgICB9LFxuICAgIGV4dGVuc2lvbjogJy5oYnMnLFxuICB9LFxuICB3aW5kb3c6IHt9LFxufTtcblxuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIC4vc3JjL2RlZmF1bHRDb25maWcvaHVyb24uY29uZmlnLmpzXG4vLyBtb2R1bGUgaWQgPSAxOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/* 20 */
-/***/ (function(module, exports) {
+/* exports provided: default */
+/* all exports used */
+/*!*********************************************!*\
+ !*** ./src/defaultConfig/webpack.config.js ***!
+ \*********************************************/
+/***/ (function(module, __webpack_exports__, __webpack_require__) {
-module.exports = require("commander");
+"use strict";
+eval("Object.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_webpack__ = __webpack_require__(/*! webpack */ 5);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_webpack___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_webpack__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_path__ = __webpack_require__(/*! path */ 0);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_path___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_path__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cli_parseArgs__ = __webpack_require__(/*! ../cli/parseArgs */ 4);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__cli_parseArgs___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2__cli_parseArgs__);\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ((huron) => {\n const cwd = process.cwd();\n\n return {\n entry: {},\n output: {\n path: __WEBPACK_IMPORTED_MODULE_1_path___default.a.join(cwd, huron.root),\n publicPath: __WEBPACK_IMPORTED_MODULE_2__cli_parseArgs___default.a.production ? '' :\n `http://localhost:${huron.port}/${huron.root}`,\n filename: '[name].js',\n chunkFilename: '[name].chunk.min.js',\n },\n plugins: [\n new __WEBPACK_IMPORTED_MODULE_0_webpack___default.a.HotModuleReplacementPlugin(),\n new __WEBPACK_IMPORTED_MODULE_0_webpack___default.a.NamedModulesPlugin(),\n ],\n resolve: {\n modulesDirectories: [\n __WEBPACK_IMPORTED_MODULE_1_path___default.a.resolve(__dirname, '../src/js'),\n ],\n },\n resolveLoader: {\n modulesDirectories: [\n 'web_loaders',\n 'web_modules',\n 'node_loaders',\n 'node_modules',\n __WEBPACK_IMPORTED_MODULE_1_path___default.a.resolve(__dirname, '../node_modules'),\n ],\n },\n module: {\n rules: [\n {\n test: /\\.html$/,\n include: [__WEBPACK_IMPORTED_MODULE_1_path___default.a.join(cwd, huron.root, huron.output)],\n use: 'html-loader',\n },\n {\n test: /\\.(hbs|handlebars)$/,\n include: [__WEBPACK_IMPORTED_MODULE_1_path___default.a.join(cwd, huron.root, 'huron-assets')],\n use: {\n loader: 'handlebars-loader',\n options: {\n helperDirs: [__WEBPACK_IMPORTED_MODULE_1_path___default.a.join(\n __dirname,\n '../../',\n 'templates/handlebarsHelpers'\n )],\n },\n },\n },\n ],\n },\n };\n});\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi9zcmMvZGVmYXVsdENvbmZpZy93ZWJwYWNrLmNvbmZpZy5qcz82ZGUzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB3ZWJwYWNrIGZyb20gJ3dlYnBhY2snO1xuaW1wb3J0IHBhdGggZnJvbSAncGF0aCc7XG5cbmltcG9ydCBwcm9ncmFtIGZyb20gJy4uL2NsaS9wYXJzZUFyZ3MnO1xu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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/* 21 */
+/* no static exports found */
+/* all exports used */
+/*!****************************!*\
+ !*** external "commander" ***!
+ \****************************/
/***/ (function(module, exports) {
-module.exports = require("gaze");
+eval("module.exports = require(\"commander\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJjb21tYW5kZXJcIj83NTczIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcImNvbW1hbmRlclwiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcImNvbW1hbmRlclwiXG4vLyBtb2R1bGUgaWQgPSAyMVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 22 */
+/* no static exports found */
+/* all exports used */
+/*!***********************!*\
+ !*** external "gaze" ***!
+ \***********************/
/***/ (function(module, exports) {
-module.exports = require("html-webpack-plugin");
+eval("module.exports = require(\"gaze\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjIuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJnYXplXCI/ZjIxOCJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoXCJnYXplXCIpO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIGV4dGVybmFsIFwiZ2F6ZVwiXG4vLyBtb2R1bGUgaWQgPSAyMlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 23 */
+/* no static exports found */
+/* all exports used */
+/*!**************************************!*\
+ !*** external "html-webpack-plugin" ***!
+ \**************************************/
/***/ (function(module, exports) {
-module.exports = require("immutable");
+eval("module.exports = require(\"html-webpack-plugin\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjMuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJodG1sLXdlYnBhY2stcGx1Z2luXCI/MThlYyJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IHJlcXVpcmUoXCJodG1sLXdlYnBhY2stcGx1Z2luXCIpO1xuXG5cbi8vLy8vLy8vLy8vLy8vLy8vL1xuLy8gV0VCUEFDSyBGT09URVJcbi8vIGV4dGVybmFsIFwiaHRtbC13ZWJwYWNrLXBsdWdpblwiXG4vLyBtb2R1bGUgaWQgPSAyM1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 24 */
+/* no static exports found */
+/* all exports used */
+/*!****************************!*\
+ !*** external "immutable" ***!
+ \****************************/
/***/ (function(module, exports) {
-module.exports = require("kss");
+eval("module.exports = require(\"immutable\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjQuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJpbW11dGFibGVcIj8xZDIwIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcImltbXV0YWJsZVwiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcImltbXV0YWJsZVwiXG4vLyBtb2R1bGUgaWQgPSAyNFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 25 */
+/* no static exports found */
+/* all exports used */
+/*!**********************!*\
+ !*** external "kss" ***!
+ \**********************/
/***/ (function(module, exports) {
-module.exports = require("lodash/isEqual");
+eval("module.exports = require(\"kss\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjUuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJrc3NcIj9jZDAyIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcImtzc1wiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcImtzc1wiXG4vLyBtb2R1bGUgaWQgPSAyNVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 26 */
+/* no static exports found */
+/* all exports used */
+/*!*********************************!*\
+ !*** external "lodash/isEqual" ***!
+ \*********************************/
/***/ (function(module, exports) {
-module.exports = require("opn");
+eval("module.exports = require(\"lodash/isEqual\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjYuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJsb2Rhc2gvaXNFcXVhbFwiP2NiNTIiXSwic291cmNlc0NvbnRlbnQiOlsibW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKFwibG9kYXNoL2lzRXF1YWxcIik7XG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gZXh0ZXJuYWwgXCJsb2Rhc2gvaXNFcXVhbFwiXG4vLyBtb2R1bGUgaWQgPSAyNlxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 27 */
+/* no static exports found */
+/* all exports used */
+/*!**********************!*\
+ !*** external "opn" ***!
+ \**********************/
/***/ (function(module, exports) {
-module.exports = require("url");
+eval("module.exports = require(\"opn\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjcuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJvcG5cIj82MDBmIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcIm9wblwiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcIm9wblwiXG4vLyBtb2R1bGUgaWQgPSAyN1xuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 28 */
+/* no static exports found */
+/* all exports used */
+/*!**********************!*\
+ !*** external "url" ***!
+ \**********************/
/***/ (function(module, exports) {
-module.exports = require("webpack-dev-server");
+eval("module.exports = require(\"url\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjguanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJ1cmxcIj9jYWVjIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcInVybFwiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcInVybFwiXG4vLyBtb2R1bGUgaWQgPSAyOFxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/* 29 */
+/* no static exports found */
+/* all exports used */
+/*!*************************************!*\
+ !*** external "webpack-dev-server" ***!
+ \*************************************/
+/***/ (function(module, exports) {
+
+eval("module.exports = require(\"webpack-dev-server\");//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMjkuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vZXh0ZXJuYWwgXCJ3ZWJwYWNrLWRldi1zZXJ2ZXJcIj8xYmVhIl0sInNvdXJjZXNDb250ZW50IjpbIm1vZHVsZS5leHBvcnRzID0gcmVxdWlyZShcIndlYnBhY2stZGV2LXNlcnZlclwiKTtcblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyBleHRlcm5hbCBcIndlYnBhY2stZGV2LXNlcnZlclwiXG4vLyBtb2R1bGUgaWQgPSAyOVxuLy8gbW9kdWxlIGNodW5rcyA9IDAiXSwibWFwcGluZ3MiOiJBQUFBIiwic291cmNlUm9vdCI6IiJ9");
+
+/***/ }),
+/* 30 */
+/* no static exports found */
+/* all exports used */
+/*!*****************************!*\
+ !*** multi ./src/cli/index ***!
+ \*****************************/
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__(9);
+module.exports = __webpack_require__(/*! ./src/cli/index */9);
+
+
+/***/ }),
+/* 31 */
+/* no static exports found */
+/* all exports used */
+/*!**********************************************************************!*\
+ !*** ./~/raw-loader!./~/babel-loader/lib!./templates/hotTemplate.js ***!
+ \**********************************************************************/
+/***/ (function(module, exports) {
+eval("module.exports = \"'use strict';\\n\\nvar _huronStore = require('./huron-store');\\n\\nvar _huronStore2 = _interopRequireDefault(_huronStore);\\n\\nvar _insertNodes = require('./insertNodes');\\n\\nvar _insertNodes2 = _interopRequireDefault(_insertNodes);\\n\\nvar _section = require('./section.hbs');\\n\\nvar _section2 = _interopRequireDefault(_section);\\n\\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\\n\\n/* eslint-enable */\\n\\nconst assets = require.context(hotScope.requirePath, true, hotScope.requireRegex); /* globals requirePath, requireRegex, sectionTemplatePath */\\n\\n// NOTE: This is not a normal JS file! It is pulled in by the CLI as a string\\n// and prepended to the browser script after replacing anything referenced via `hotScope[variable]`\\n// with CLI arguments or config properties passed in by the user.\\n\\n/* eslint-disable */\\n\\nconst modules = {};\\n\\nmodules[hotScope.sectionTemplatePath] = _section2.default;\\n\\nassets.keys().forEach(key => {\\n modules[key] = assets(key);\\n});\\n\\nconst insert = new _insertNodes2.default(modules, _huronStore2.default);\\n\\nif (module.hot) {\\n // Hot Module Replacement for huron components (json, hbs, html)\\n module.hot.accept(assets.id, () => {\\n const newAssets = require.context(hotScope.requirePath, true, hotScope.requireRegex);\\n const newModules = newAssets.keys().map(key => [key, newAssets(key)]).filter(newModule => modules[newModule[0]] !== newModule[1]);\\n\\n updateStore(require('./huron-store.js')); // eslint-disable-line global-require, import/no-unresolved\\n newModules.forEach(module => {\\n modules[module[0]] = module[1];\\n hotReplace(module[0], module[1], modules);\\n });\\n });\\n\\n // Hot Module Replacement for sections template\\n module.hot.accept('./section.hbs', () => {\\n const newSectionTemplate = require('./section.hbs'); // eslint-disable-line global-require, import/no-unresolved\\n\\n modules[hotScope.sectionTemplatePath] = newSectionTemplate;\\n hotReplace('./huron-assets/section.hbs', newSectionTemplate, modules);\\n });\\n\\n // Hot Module Replacement for data store\\n module.hot.accept('./huron-store.js', () => {\\n updateStore(require('./huron-store.js')); // eslint-disable-line global-require, import/no-unresolved\\n });\\n}\\n\\nfunction hotReplace(key, module, newModules) {\\n insert.modules = newModules;\\n if (key === _huronStore2.default.sectionTemplatePath) {\\n insert.cycleSections();\\n } else {\\n insert.inserted = [];\\n insert.loadModule(key, module, false);\\n }\\n}\\n\\nfunction updateStore(newStore) {\\n insert.store = newStore;\\n}\"//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMzEuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vLi90ZW1wbGF0ZXMvaG90VGVtcGxhdGUuanM/N2JiZSJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IFwiJ3VzZSBzdHJpY3QnO1xcblxcbnZhciBfaHVyb25TdG9yZSA9IHJlcXVpcmUoJy4vaHVyb24tc3RvcmUnKTtcXG5cXG52YXIgX2h1cm9uU3RvcmUyID0gX2ludGVyb3BSZXF1aXJlRGVmYXVsdChfaHVyb25TdG9yZSk7XFxuXFxudmFyIF9pbnNlcnROb2RlcyA9IHJlcXVpcmUoJy4vaW5zZXJ0Tm9kZXMnKTtcXG5cXG52YXIgX2luc2VydE5vZGVzMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX2luc2VydE5vZGVzKTtcXG5cXG52YXIgX3NlY3Rpb24gPSByZXF1aXJlKCcuL3NlY3Rpb24uaGJzJyk7XFxuXFxudmFyIF9zZWN0aW9uMiA9IF9pbnRlcm9wUmVxdWlyZURlZmF1bHQoX3NlY3Rpb24pO1xcblxcbmZ1bmN0aW9uIF9pbnRlcm9wUmVxdWlyZURlZmF1bHQob2JqKSB7IHJldHVybiBvYmogJiYgb2JqLl9fZXNNb2R1bGUgPyBvYmogOiB7IGRlZmF1bHQ6IG9iaiB9OyB9XFxuXFxuLyogZ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IkFBQUEiLCJzb3VyY2VSb290IjoiIn0=");
/***/ })
-/******/ ]);
-//# sourceMappingURL=index.js.map
\ No newline at end of file
+/******/ ]);
\ No newline at end of file
diff --git a/dist/cli/index.js.map b/dist/cli/index.js.map
deleted file mode 100644
index b0be050..0000000
--- a/dist/cli/index.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"index.js","sources":["webpack:///webpack/bootstrap 5439f3e6aead8d400ec8","webpack:///external \"path\"","webpack:///src/cli/utils.js","webpack:///external \"chalk\"","webpack:///external \"fs-extra\"","webpack:///src/cli/parseArgs.js","webpack:///external \"webpack\"","webpack:///src/cli/defaultStore.js","webpack:///src/cli/handleTemplates.js","webpack:///src/cli/requireTemplates.js","webpack:///src/cli/index.js","webpack:///config/devServer.config.js","webpack:///src/cli/actions.js","webpack:///src/cli/fileWatcher.js","webpack:///src/cli/generateConfig.js","webpack:///src/cli/handleHTML.js","webpack:///src/cli/handleKSS.js","webpack:///src/cli/requireExternal.js","webpack:///src/cli/server.js","webpack:///src/defaultConfig/huron.config.js","webpack:///src/defaultConfig/webpack.config.js","webpack:///external \"commander\"","webpack:///external \"gaze\"","webpack:///external \"html-webpack-plugin\"","webpack:///external \"immutable\"","webpack:///external \"kss\"","webpack:///external \"lodash/isEqual\"","webpack:///external \"opn\"","webpack:///external \"url\"","webpack:///external \"webpack-dev-server\""],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 29);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 5439f3e6aead8d400ec8","module.exports = require(\"path\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"path\"\n// module id = 0\n// module chunks = 0","/** @module cli/utilities */\nimport path from 'path';\nimport fs from 'fs-extra';\nimport chalk from 'chalk';\n\nconst cwd = process.cwd(); // Current working directory\n\n/**\n * Ensure predictable data structure for KSS section data\n *\n * @function normalizeSectionData\n * @param {object} section - section data\n * @return {object} section data\n */\nexport function normalizeSectionData(section) {\n const data = section.data || section;\n\n if (!data.referenceURI || '' === data.referenceURI) {\n data.referenceURI = section.referenceURI();\n }\n\n return data;\n}\n\n/**\n * Ensure predictable data structure for KSS section data\n *\n * @function writeSectionData\n * @param {object} store - data store\n * @param {object} section - section data\n * @param {string} sectionPath - output destination for section data file\n */\nexport function writeSectionData(store, section, sectionPath = false) {\n let outputPath = sectionPath;\n let sectionFileInfo;\n\n if (!outputPath && {}.hasOwnProperty.call(section, 'kssPath')) {\n sectionFileInfo = path.parse(section.kssPath);\n outputPath = path.join(\n sectionFileInfo.dir,\n `${sectionFileInfo.name}.json`\n );\n }\n\n // Output section data\n if (outputPath) {\n return writeFile(\n section.referenceURI,\n 'section',\n outputPath,\n JSON.stringify(section),\n store\n );\n }\n\n console.warn( // eslint-disable-line no-console\n chalk.red(`Failed to write section data for ${section.referenceURI}`)\n );\n return false;\n}\n\n/**\n * Find .json from a template file or vice versa\n *\n * @function getTemplateDataPair\n * @param {object} file - file object from path.parse()\n * @param {object} section - KSS section data\n * @return {string} relative path to module JSON file\n */\nexport function getTemplateDataPair(file, section, store) {\n const huron = store.get('config');\n const kssDir = matchKssDir(file.dir, huron);\n\n if (kssDir) {\n const componentPath = path.relative(\n path.resolve(cwd, kssDir),\n file.dir\n );\n const partnerType = '.json' === file.ext ? 'template' : 'data';\n const partnerExt = '.json' === file.ext ?\n huron.get('templates').extension :\n '.json';\n\n const pairPath = path.join(\n componentPath,\n generateFilename(\n section.referenceURI,\n partnerType,\n partnerExt,\n store\n )\n );\n\n return `./${pairPath}`;\n }\n\n return false;\n}\n\n/**\n * Normalize a section title for use as a filename\n *\n * @function normalizeHeader\n * @param {string} header - section header extracted from KSS documentation\n * @return {string} modified header, lowercase and words separated by dash\n */\nexport function normalizeHeader(header) {\n return header\n .toLowerCase()\n .replace(/\\s?\\W\\s?/g, '-');\n}\n\n/**\n * Wrap html in required template tags\n *\n * @function wrapMarkup\n * @param {string} content - html or template markup\n * @param {string} templateId - id of template (should be section reference)\n * @return {string} modified HTML\n */\nexport function wrapMarkup(content, templateId) {\n return `\n\n${content}\n\n\\n`;\n}\n\n/**\n * Generate a filename based on referenceURI, type and file object\n *\n * @function generateFilename\n * @param {string} id - The name of the file (with extension).\n * @param {string} type - the type of file output\n * @param {object} ext - file extension\n * @param {store} store - data store\n * @return {string} Path to output file, relative to ouput dir (can be use in require statements)\n */\nexport function generateFilename(id, type, ext, store) {\n // Type of file and its corresponding extension(s)\n const types = store.get('types');\n const outputExt = '.scss' !== ext ? ext : '.html';\n\n /* eslint-disable */\n if (-1 === types.indexOf(type)) {\n console.log(`Huron data ${type} does not exist`);\n return false;\n }\n /* eslint-enable */\n\n return `${id}-${type}${outputExt}`;\n}\n\n/**\n * Copy an HTML file into the huron output directory.\n *\n * @function writeFile\n * @param {string} id - The name of the file (with extension).\n * @param {string} content - The content of the file to write.\n * @param {string} type - the type of file output\n * @param {object} store - The data store\n * @return {string} Path to output file, relative to ouput dir (can be use in require statements)\n */\nexport function writeFile(id, type, filepath, content, store) {\n const huron = store.get('config');\n const file = path.parse(filepath);\n const filename = generateFilename(id, type, file.ext, store);\n const kssDir = matchKssDir(filepath, huron);\n\n if (kssDir) {\n const componentPath = path.relative(\n path.resolve(cwd, kssDir),\n file.dir\n );\n const outputRelative = path.join(\n huron.get('output'),\n componentPath,\n `${filename}`\n );\n const outputPath = path.resolve(cwd, huron.get('root'), outputRelative);\n let newContent = content;\n\n if ('data' !== type && 'section' !== type) {\n newContent = wrapMarkup(content, id);\n }\n\n try {\n fs.outputFileSync(outputPath, newContent);\n console.log(chalk.green(`Writing ${outputRelative}`)); // eslint-disable-line no-console\n } catch (e) {\n console.log(chalk.red(`Failed to write ${outputRelative}`)); // eslint-disable-line no-console\n }\n\n return `./${outputRelative.replace(`${huron.get('output')}/`, '')}`;\n }\n\n return false;\n}\n\n/**\n * Delete a file in the huron output directory\n *\n * @function removeFile\n * @param {string} filename - The name of the file (with extension).\n * @param {object} store - The data store\n * @return {string} Path to output file, relative to ouput dir (can be use in require statements)\n */\nexport function removeFile(id, type, filepath, store) {\n const huron = store.get('config');\n const file = path.parse(filepath);\n const filename = generateFilename(id, type, file.ext, store);\n const kssDir = matchKssDir(filepath, huron);\n\n if (kssDir) {\n const componentPath = path.relative(\n path.resolve(cwd, kssDir),\n file.dir\n );\n const outputRelative = path.join(\n huron.get('output'),\n componentPath,\n `${filename}`\n );\n const outputPath = path.resolve(cwd, huron.get('root'), outputRelative);\n\n try {\n fs.removeSync(outputPath);\n console.log(chalk.green(`Removing ${outputRelative}`)); // eslint-disable-line no-console\n } catch (e) {\n console.log( // eslint-disable-line no-console\n chalk.red(`${outputRelative} does not exist or cannot be deleted`)\n );\n }\n\n return `./${outputRelative.replace(`${huron.get('output')}/`, '')}`;\n }\n\n return false;\n}\n\n/**\n * Write a template for sections\n *\n * @function writeSectionTemplate\n * @param {string} filepath - the original template file\n * @param {object} store - data store\n * @return {object} updated store\n */\nexport function writeSectionTemplate(filepath, store) {\n const huron = store.get('config');\n const sectionTemplate = wrapMarkup(fs.readFileSync(filepath, 'utf8'));\n const componentPath = './huron-assets/section.hbs';\n const output = path.join(\n cwd,\n huron.get('root'),\n componentPath\n );\n\n // Move huron script and section template into huron root\n fs.outputFileSync(output, sectionTemplate);\n console.log(chalk.green(`writing section template to ${output}`)); // eslint-disable-line no-console\n\n return store.set('sectionTemplatePath', componentPath);\n}\n\n/**\n * Request for section data based on section reference\n *\n * @function writeSectionTemplate\n * @param {string} search - key on which to match section\n * @param {field} string - field in which to look to determine section\n * @param {obj} store - sections memory store\n */\nexport function getSection(search, field, store) {\n const sectionValues = store\n .getIn(['sections', 'sectionsByPath'])\n .valueSeq();\n let selectedSection = false;\n\n if (field) {\n selectedSection = sectionValues\n .filter((value) => value[field] === search)\n .get(0);\n } else {\n selectedSection = store.getIn(['sections', 'sectionsByPath', search]);\n }\n\n return selectedSection;\n}\n\n/**\n * Find which configured KSS directory a filepath exists in\n *\n * @function matchKssDir\n * @param {string} filepath - filepath to search for\n * @param {object} huron - huron configuration\n * @return {string} kssMatch - relative path to KSS directory\n */\nexport function matchKssDir(filepath, huron) {\n const kssSource = huron.get('kss');\n // Include forward slash in our test to make sure we're matchin a directory, not a file extension\n const kssMatch = kssSource.filter((dir) => filepath.includes(`/${dir}`));\n\n if (kssMatch.length) {\n return kssMatch[0];\n }\n\n return false;\n}\n\n/**\n * Merge JSON files for css modules classnames in a provided directory\n *\n * @function mergeClassnameJSON\n * @param {string} directory - directory containing classname JSON files\n *\n * @return {object} classnamesMerged - merged classnames. contents of each JSON file is nested within\n * the returned object by filename. (e.g. article.json -> { article: {...json contents}})\n */\nexport function mergeClassnameJSON(directory) {\n let files;\n\n // Try to read through classnames directory\n try {\n files = fs.readdirSync(directory);\n } catch (e) {\n console.warn(chalk.red(e));\n return {};\n }\n\n // Merge classname json files\n const classNamesMerged = files.reduce((acc, file) => {\n const fileInfo = path.parse(file);\n let classNames = {};\n\n if ('.json' === fileInfo.ext) {\n try {\n const contents = fs.readFileSync(\n path.join(directory, file),\n 'utf8'\n );\n classNames = JSON.parse(contents);\n } catch (e) {\n console.warn(chalk.red(e));\n return classNames;\n }\n }\n\n return Object.assign({}, acc, { [fileInfo.name]: classNames });\n }, {});\n\n return classNamesMerged;\n}\n\n/**\n * Remove the trailing slash from a provided directory\n *\n * @function removeTrailingSlash\n * @param {string} directory - directory path\n * @return {string} directory - directory path with trailing slash removed\n */\nexport function removeTrailingSlash(directory) {\n if ('/' === directory.slice(-1)) {\n return directory.slice(0, -1);\n }\n\n return directory;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/cli/utils.js","module.exports = require(\"chalk\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"chalk\"\n// module id = 2\n// module chunks = 0","module.exports = require(\"fs-extra\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"fs-extra\"\n// module id = 3\n// module chunks = 0","/** @module cli/parse-arguments */\n/* eslint-disable space-unary-ops */\n\nimport program from 'commander';\nimport path from 'path';\n\n// Requires\n/** @global */\n\n/**\n * Process huron CLI arguments\n *\n * @function parseArgs\n * @example node huron/dist/cli/huron-cli.js --config 'client/config/webpack.config.js' --production\n */\nfunction parseArgs() {\n const envArg = {};\n\n process.argv = process.argv.filter((arg) => {\n if (-1 !== arg.indexOf('--env')) {\n const envParts = arg\n .split('.')[1]\n .split('=');\n\n envArg[envParts[0]] = envParts[1] || true;\n return false;\n }\n\n return true;\n });\n\n program.version('1.0.1')\n .option(\n '-c, --huron-config [huronConfig]',\n '[huronConfig] for all huron options',\n path.resolve(__dirname, '../defaultConfig/huron.config.js')\n )\n .option(\n '-w, --webpack-config [webpackConfig]',\n '[webpackConfig] for all webpack options',\n path.resolve(__dirname, '../defaultConfig/webpack.config.js')\n )\n .option('-p, --production', 'compile assets once for production');\n\n program.env = envArg;\n\n // Only parse if we're not running tests\n if (\n ! process.env.npm_lifecycle_event ||\n 'test' !== process.env.npm_lifecycle_event\n ) {\n program.parse(process.argv);\n }\n}\n\nparseArgs();\n/* eslint-enable */\n\nexport default program;\n\n\n\n// WEBPACK FOOTER //\n// src/cli/parseArgs.js","module.exports = require(\"webpack\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"webpack\"\n// module id = 5\n// module chunks = 0","import { Map } from 'immutable';\n\nimport generateConfig from './generateConfig';\nimport { mergeClassnameJSON } from './utils';\n// Create initial data structure\n\n// Merge Huron default webpack config with user config\nconst config = generateConfig();\n\n// Make sure the kss option is represented as an array\nconfig.huron.kss = [].concat(config.huron.kss);\n\n/* eslint-disable */\n/**\n * Initial structure for immutable data store\n *\n * @global\n */\nconst defaultStore = Map({\n types: [\n 'template',\n 'data',\n 'description',\n 'section',\n 'prototype',\n 'sections-template',\n ],\n config: Map(config.huron),\n classNames: mergeClassnameJSON(config.huron.classNames),\n sections: Map({\n sectionsByPath: Map({}),\n sectionsByURI: Map({}),\n sorted: {},\n }),\n templates: Map({}),\n prototypes: Map({}),\n sectionTemplatePath: '',\n referenceDelimiter: '.',\n});\n/* eslint-enable */\n\nexport { defaultStore, config };\n\n\n\n// WEBPACK FOOTER //\n// src/cli/defaultStore.js","/** @module cli/template-handler */\nimport path from 'path';\nimport fs from 'fs-extra';\nimport chalk from 'chalk';\n\nimport * as utils from './utils';\n\n/**\n * Handle update of a template or data (json) file\n *\n * @function updateTemplate\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - contains KSS section data\n * @param {object} store - memory store\n * @return {object} updated memory store\n */\nexport function updateTemplate(filepath, section, store) {\n const file = path.parse(filepath);\n const pairPath = utils.getTemplateDataPair(file, section, store);\n const type = '.json' === file.ext ? 'data' : 'template';\n const newSection = section;\n const newStore = store;\n let content = false;\n\n try {\n content = fs.readFileSync(filepath, 'utf8');\n } catch (e) {\n console.log(chalk.red(`${filepath} does not exist`));\n }\n\n if (content) {\n const requirePath = utils.writeFile(\n newSection.referenceURI,\n type,\n filepath,\n content,\n newStore\n );\n newSection[`${type}Path`] = requirePath;\n\n if ('template' === type) {\n newSection.templateContent = content;\n\n // Rewrite section data with template content\n newSection.sectionPath = utils.writeSectionData(newStore, newSection);\n }\n\n return newStore\n .setIn(\n ['templates', requirePath],\n pairPath\n )\n .setIn(\n ['sections', 'sectionsByPath', newSection.kssPath],\n newSection\n )\n .setIn(\n ['sections', 'sectionsByURI', newSection.referenceURI],\n newSection\n );\n }\n\n return newStore;\n}\n\n/**\n * Handle removal of a template or data (json) file\n *\n * @function deleteTemplate\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - contains KSS section data\n * @param {object} store - memory store\n * @return {object} updated memory store\n */\nexport function deleteTemplate(filepath, section, store) {\n const file = path.parse(filepath);\n const type = '.json' === file.ext ? 'data' : 'template';\n const newSection = section;\n const newStore = store;\n\n // Remove partner\n const requirePath = utils.removeFile(\n newSection.referenceURI,\n type,\n filepath,\n newStore\n );\n delete newSection[`${type}Path`];\n\n return newStore\n .deleteIn(['templates', requirePath])\n .setIn(\n ['sections', 'sectionsByPath', newSection.kssPath],\n newSection\n )\n .setIn(\n ['sections', 'sectionsByURI', newSection.referenceURI],\n newSection\n );\n}\n\n\n\n// WEBPACK FOOTER //\n// src/cli/handleTemplates.js","/** @module cli/require-templates */\n\nimport path from 'path';\nimport fs from 'fs-extra';\n\nconst cwd = process.cwd();\nconst huronScript = fs.readFileSync(\n path.join(__dirname, '../web/index.js'),\n 'utf8'\n);\n\n/**\n * Write code for requiring all generated huron assets\n * Note: prepended and appended code in this file should roughly follow es5 syntax for now,\n * as it will not pass through the Huron internal babel build nor can we assume the user is\n * working with babel.\n *\n * @function requireTemplates\n * @param {object} store - memory store\n */\nexport const requireTemplates = function requireTemplates(store) {\n const huron = store.get('config');\n const outputPath = path.join(cwd, huron.get('root'), 'huron-assets');\n const requireRegex = new RegExp(`\\\\.html|\\\\.json|\\\\${\n huron.get('templates').extension\n }$`);\n const requirePath = `'../${huron.get('output')}'`;\n\n // Initialize templates, js, css and Hot Module Replacement acceptance logic\n const hotTemplate = `\nvar store = require('./huron-store');\nvar InsertNodes = require('./insertNodes').default;\nvar sectionTemplate = require('./section.hbs');\nvar assets = require.context(${requirePath}, true, ${requireRegex});\nvar modules = {};\n\nmodules['${store.get('sectionTemplatePath')}'] = sectionTemplate;\n\nassets.keys().forEach(function(key) {\n modules[key] = assets(key);\n});\n\nvar insert = window.insert ? window.insert :\n new InsertNodes(modules, store);\nwindow.insert = insert;\n\nif (module.hot) {\n // Hot Module Replacement for huron components (json, hbs, html)\n module.hot.accept(\n assets.id,\n () => {\n var newAssets = require.context(\n ${requirePath},\n true,\n ${requireRegex}\n );\n var newModules = newAssets.keys()\n .map((key) => {\n return [key, newAssets(key)];\n })\n .filter((newModule) => {\n return modules[newModule[0]] !== newModule[1];\n });\n\n updateStore(require('./huron-store.js'));\n\n newModules.forEach((module) => {\n modules[module[0]] = module[1];\n hotReplace(module[0], module[1], modules);\n });\n }\n );\n\n // Hot Module Replacement for sections template\n module.hot.accept(\n './section.hbs',\n () => {\n var newSectionTemplate = require('./section.hbs');\n modules['${store.get('sectionTemplatePath')}'] = newSectionTemplate;\n hotReplace(\n './huron-assets/section.hbs',\n newSectionTemplate,\n modules\n );\n }\n );\n\n // Hot Module Replacement for data store\n module.hot.accept(\n './huron-store.js',\n () => {\n updateStore(require('./huron-store.js'));\n }\n );\n}\n\nfunction hotReplace(key, module, modules) {\n insert.modules = modules;\n if (key === store.sectionTemplatePath) {\n insert.cycleSections();\n } else {\n insert.inserted = [];\n insert.loadModule(key, module, false);\n }\n};\n\nfunction updateStore(newStore) {\n insert.store = newStore;\n}\\n`;\n\n // Write the contents of this script.\n // @todo lint this file.\n fs.outputFileSync(\n path.join(outputPath, 'index.js'),\n `/*eslint-disable*/\\n\n${hotTemplate}\\n\\n\n/*eslint-enable*/\\n`\n );\n fs.outputFileSync(\n path.join(outputPath, 'insertNodes.js'),\n huronScript\n );\n};\n\n/**\n * Output entire data store to a JS object and handle if any KSS data has changed\n *\n * @function writeStore\n * @param {object} store - memory store\n * @param {string} changed - filepath of changed KSS section, if applicable\n */\nexport const writeStore = function writeStore(store, newStore = false) {\n const updatedStore = newStore || store;\n const huron = updatedStore.get('config');\n const outputPath = path.join(cwd, huron.get('root'), 'huron-assets');\n\n // Write updated data store\n // @todo lint this file.\n fs.outputFileSync(\n path.join(outputPath, 'huron-store.js'),\n `/*eslint-disable*/\n module.exports = ${JSON.stringify(updatedStore.toJSON())}\n /*eslint-disable*/\\n`\n );\n};\n\n\n\n\n// WEBPACK FOOTER //\n// src/cli/requireTemplates.js","// Local imports\nimport chalk from 'chalk';\n\nimport {\n initFiles,\n updateFile,\n deleteFile,\n updateClassNames,\n} from './actions';\nimport { requireTemplates, writeStore } from './requireTemplates';\nimport { matchKssDir } from './utils';\nimport program from './parseArgs';\nimport startWebpack from './server';\nimport { defaultStore, config } from './defaultStore';\nimport gaze from './fileWatcher';\n\n/**\n * Initialize data store with files from gaze and original data structure\n *\n * @global\n */\nconst store = initFiles(gaze.watched(), defaultStore);\nconst huron = defaultStore.get('config');\n\nrequireTemplates(store);\nwriteStore(store);\n\nif (!program.production) {\n /** @module cli/gaze */\n let newStore = store;\n\n gaze.on('all', (event, filepath) => {\n newStore = updateClassNames(filepath, newStore);\n writeStore(newStore);\n });\n\n /**\n * Anonymous handler for Gaze 'changed' event indicating a file has changed\n *\n * @callback changed\n * @listens gaze:changed\n * @param {string} filepath - absolute path of changed file\n */\n gaze.on('changed', (filepath) => {\n if (matchKssDir(filepath, huron)) {\n newStore = updateFile(filepath, newStore);\n }\n\n console.log(chalk.green(`${filepath} updated!`));\n });\n\n /**\n * Anonymous handler for Gaze 'added' event indicating a file has been added to the watched directories\n *\n * @callback added\n * @listens gaze:added\n * @param {string} filepath - absolute path of changed file\n */\n gaze.on('added', (filepath) => {\n if (matchKssDir(filepath, huron)) {\n newStore = updateFile(filepath, newStore);\n writeStore(newStore);\n }\n\n console.log(chalk.blue(`${filepath} added!`));\n });\n\n /**\n * Anonymous handler for Gaze 'renamed' event indicating a file has been renamed\n *\n * @callback renamed\n * @listens gaze:renamed\n * @param {string} filepath - absolute path of changed file\n */\n gaze.on('renamed', (newPath, oldPath) => {\n if (matchKssDir(newPath, huron)) {\n newStore = deleteFile(oldPath, newStore);\n newStore = updateFile(newPath, newStore);\n writeStore(newStore);\n }\n\n console.log(chalk.blue(`${newPath} added!`));\n });\n\n /**\n * Anonymous handler for Gaze 'deleted' event indicating a file has been removed\n *\n * @callback deleted\n * @listens gaze:deleted\n * @param {string} filepath - absolute path of changed file\n */\n gaze.on('deleted', (filepath) => {\n if (matchKssDir(filepath, huron)) {\n newStore = deleteFile(filepath, newStore);\n writeStore(newStore);\n }\n\n console.log(chalk.red(`${filepath} deleted`));\n });\n} else {\n gaze.close();\n}\n\n// Start webpack or build for production\nstartWebpack(config);\n\n\n\n// WEBPACK FOOTER //\n// src/cli/index.js","export default (huron) => ({\n hot: true,\n quiet: false,\n noInfo: false,\n stats: {\n colors: true,\n hash: false,\n version: false,\n assets: false,\n chunks: false,\n modules: false,\n reasons: false,\n children: false,\n source: false,\n },\n contentBase: huron.root,\n overlay: true,\n publicPath: `http://localhost:${huron.port}/${huron.root}`,\n});\n\n\n\n// WEBPACK FOOTER //\n// config/devServer.config.js","/** @module cli/actions */\n\n// Imports\nimport path from 'path';\nimport chalk from 'chalk';\nimport isEqual from 'lodash/isEqual';\n\nimport {\n updateHTML,\n deleteHTML,\n updatePrototype,\n deletePrototype,\n} from './handleHTML';\nimport { updateTemplate, deleteTemplate } from './handleTemplates';\nimport { updateKSS, deleteKSS } from './handleKSS';\nimport * as utils from './utils';\n\n/**\n * Recursively loop through initial watched files list from Gaze.\n *\n * @param {object} data - object containing directory and file paths\n * @param {object} store - memory store\n * @return {object} newStore - map object of entire data store\n */\nexport function initFiles(data, store, depth = 0) {\n const type = Object.prototype.toString.call(data);\n const huron = store.get('config');\n let newStore = store;\n let info;\n let files;\n\n switch (type) {\n case '[object Object]':\n files = Object.keys(data);\n newStore = files.reduce(\n (prevStore, file) => initFiles(data[file], prevStore, depth),\n newStore\n );\n break;\n\n case '[object Array]':\n newStore = data.reduce(\n (prevStore, file) => initFiles(file, prevStore, depth),\n newStore\n );\n break;\n\n case '[object String]':\n info = path.parse(data);\n\n // Only call update if data is a filepath and it's within the KSS source directory\n if (info.ext && !data.includes(huron.get('classNames'))) {\n newStore = updateFile(data, store);\n }\n break;\n\n default:\n break;\n }\n\n return newStore;\n}\n\n/**\n * Logic for updating and writing file information based on file type (extension)\n *\n * @param {string} filepath - path to updated file. usually passed in from Gaze\n * @param {object} store - memory store\n * @return {object} store - map object of map object of entire data store\n */\nexport function updateFile(filepath, store) {\n const huron = store.get('config');\n const file = path.parse(filepath);\n let field;\n let section;\n\n if (filepath.includes(huron.get('sectionTemplate'))) {\n return utils.writeSectionTemplate(filepath, store);\n }\n\n switch (file.ext) {\n // Plain HTML template, external\n case '.html':\n section = utils.getSection(file.base, 'markup', store);\n\n if (section) {\n return updateHTML(filepath, section, store);\n } else if (\n file.dir.includes('prototypes') &&\n file.name.includes('prototype-')\n ) {\n return updatePrototype(filepath, store);\n }\n\n console.log(chalk.red(`Failed to write file: ${file.name}`));\n break;\n\n // Handlebars template, external\n case huron.get('templates').extension:\n case '.json':\n field = ('.json' === file.ext) ? 'data' : 'markup';\n section = utils.getSection(file.base, field, store);\n\n if (section) {\n return updateTemplate(filepath, section, store);\n }\n\n console.log( // eslint-disable-line no-console\n chalk.red(`Could not find associated KSS section for ${filepath}`)\n );\n break;\n\n // KSS documentation (default extension is `.css`)\n // Will also output a template if markup is inline\n // Note: inline markup does _not_ support handlebars currently\n case huron.get('kssExtension'):\n return updateKSS(filepath, store);\n\n // This should never happen if Gaze is working properly\n default:\n return store;\n }\n\n return store;\n}\n\n/**\n * Logic for deleting file information and files based on file type (extension)\n *\n * @param {string} filepath - path to updated file. usually passed in from Gaze\n * @param {object} store - memory store\n * @return {object} newStore - map object of map object of entire data store\n */\nexport function deleteFile(filepath, store) {\n const huron = store.get('config');\n const file = path.parse(filepath);\n let field = '';\n let section = null;\n let newStore = store;\n\n switch (file.ext) {\n // Plain HTML template, external\n case '.html':\n section = utils.getSection(file.base, 'markup', store);\n\n if (section) {\n newStore = deleteHTML(filepath, section, store);\n } else if (\n file.dir.includes('prototypes') &&\n file.name.includes('prototype-')\n ) {\n newStore = deletePrototype(filepath, store);\n }\n break;\n\n case huron.get('templates').extension:\n case '.json':\n field = ('.json' === file.ext) ? 'data' : 'markup';\n section = utils.getSection(file.base, field, store);\n\n if (section) {\n newStore = deleteTemplate(filepath, section, store);\n }\n break;\n\n case huron.get('kssExtension'):\n section = utils.getSection(filepath, false, store);\n\n if (section) {\n newStore = deleteKSS(filepath, section, store);\n }\n break;\n\n default:\n console.warn( // eslint-disable-line no-console\n chalk.red(`Could not delete: ${file.name}`)\n );\n break;\n }\n\n return newStore;\n}\n\n/**\n * Logic for updating localized classnames from CSS modules\n *\n * @param {string} filepath - path to updated file. usually passed in from Gaze\n * @param {object} store - memory store\n *\n * @return void\n */\nexport function updateClassNames(filepath, store) {\n const classNamesPath = store.getIn(['config', 'classNames']);\n\n if (filepath.includes(classNamesPath)) {\n const oldClassnames = store.get('classNames');\n const newClassnames = utils.mergeClassnameJSON(classNamesPath);\n\n if (!isEqual(oldClassnames, newClassnames)) {\n return store.set('classNames', newClassnames);\n }\n }\n\n return store;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/cli/actions.js","import { Gaze } from 'gaze';\nimport path from 'path';\n\nimport { removeTrailingSlash } from './utils';\nimport { defaultStore } from './defaultStore';\n\n/**\n * Huron configuration object\n *\n * @global\n */\nconst huron = defaultStore.get('config');\n\n/**\n * Available file extensions. Extensions should not include the leading '.'\n *\n * @global\n */\nexport const extensions = [\n huron.get('kssExtension'),\n huron.get('templates').extension,\n 'html',\n 'json',\n].map((extension) => extension.replace('.', ''));\n\n// Generate watch list for Gaze, start gaze\nexport const watchedFiles = [];\n\n// Watch section template\nwatchedFiles.push(path.resolve(huron.get('sectionTemplate')));\n\n// Watch cssmodules classname files (if they exist)\nif (huron.get('classNames')) {\n watchedFiles.push(\n `${path.resolve(huron.get('classNames'))}/*.json`\n );\n}\n\n// Watch all provided kss directories\nhuron.get('kss').forEach((dir) => {\n watchedFiles.push(\n `${removeTrailingSlash(dir)}/**/*.+(${extensions.join('|')})`\n );\n});\n\n/**\n * Gaze instance for watching all files, including KSS, html, hbs/template, and JSON\n *\n * @global\n */\nconst gaze = new Gaze(watchedFiles);\n\nexport default gaze;\n\n\n\n// WEBPACK FOOTER //\n// src/cli/fileWatcher.js","/** @module cli/generate-config */\nimport path from 'path';\nimport url from 'url';\nimport fs from 'fs-extra';\nimport webpack from 'webpack';\nimport HTMLWebpackPlugin from 'html-webpack-plugin';\n\nimport program from './parseArgs';\nimport requireExternal from './requireExternal';\n\nconst cwd = process.cwd();\nconst defaultWebpack = require('../defaultConfig/webpack.config');\nconst defaultHuron = require('../defaultConfig/huron.config');\n\n// Require configs passed in by user from CLI\nlet defaultConfig = false;\nconst localConfig = requireExternal(\n path.resolve(program.webpackConfig)\n);\nconst localHuron = requireExternal(\n path.resolve(program.huronConfig)\n);\n\n/**\n * Generate a mutant hybrid of the huron default webpack config and your local webpack config\n *\n * @function generateConfig\n * @param {object} config - local webpack config\n * @return {object} newConfig - updated data store\n */\nexport default function generateConfig() {\n let newConfig = localConfig;\n let newHuron = localHuron;\n\n // Execute config function, if provided\n if ('function' === typeof newConfig) {\n newConfig = newConfig(program.env);\n }\n\n // Execute huron config function, if provided\n if ('function' === typeof newHuron) {\n newHuron = newHuron(program.env);\n }\n\n // Merge huron defaults with user settings\n newHuron = Object.assign({}, defaultHuron, newHuron);\n // Use user huron config to modify webpack defaults\n defaultConfig = defaultWebpack(newHuron);\n\n // Set ouput options\n newConfig.output = Object.assign({}, defaultConfig.output, newConfig.output);\n newConfig.output.path = defaultConfig.output.path;\n newConfig.output.publicPath = defaultConfig.output.publicPath;\n\n // configure entries\n newConfig = configureEntries(newHuron, newConfig);\n\n // configure plugins\n newConfig = configurePlugins(newHuron, newConfig);\n\n // configure loaders\n newConfig = configureLoaders(newHuron, newConfig);\n\n // Add HTMLWebpackPlugin for each configured prototype\n newConfig = configurePrototypes(newHuron, newConfig);\n\n // Remove existing devServer settings\n delete newConfig.devServer;\n\n return {\n huron: newHuron,\n webpack: newConfig,\n };\n}\n\n/**\n * Configure and manage webpack entry points\n *\n * @param {object} huron - huron configuration object\n * @param {object} config - webpack configuration object\n * @return {object} newConfig - updated data store\n */\nfunction configureEntries(huron, config) {\n const entry = config.entry[huron.entry];\n const newConfig = config;\n\n newConfig.entry = {};\n if (!program.production) {\n newConfig.entry[huron.entry] = [\n `webpack-dev-server/client?http://localhost:${huron.port}`,\n 'webpack/hot/dev-server',\n path.join(cwd, huron.root, 'huron-assets/index'),\n ].concat(entry);\n } else {\n newConfig.entry[huron.entry] = [\n path.join(cwd, huron.root, 'huron-assets/index'),\n ].concat(entry);\n }\n\n return newConfig;\n}\n\n/**\n * Configure and manage webpack plugins\n *\n * @param {object} huron - huron configuration object\n * @param {object} config - webpack configuration object\n * @return {object} newConfig - updated data store\n */\nfunction configurePlugins(huron, config) {\n const newConfig = config;\n\n newConfig.plugins = config.plugins || [];\n\n if (!program.production) {\n if (newConfig.plugins && newConfig.plugins.length) {\n newConfig.plugins = newConfig.plugins.filter(\n (plugin) => 'HotModuleReplacementPlugin' !== plugin.constructor.name &&\n 'NamedModulesPlugin' !== plugin.constructor.name\n );\n }\n newConfig.plugins = newConfig.plugins\n .concat([\n new webpack.HotModuleReplacementPlugin(),\n new webpack.NamedModulesPlugin(),\n ]);\n }\n\n return newConfig;\n}\n\n/**\n * Configure and manage webpack loaders\n *\n * @param {object} huron - huron configuration object\n * @param {object} config - webpack configuration object\n * @return {object} newConfig - updated data store\n */\nfunction configureLoaders(huron, config) {\n // Manage loaders\n const templatesLoader = huron.templates.rule || {};\n const newConfig = config;\n\n // Make sure we're only using templates loader for files in huron root\n templatesLoader.include = [path.join(cwd, huron.root, huron.output)];\n\n // Normalize module and module.rules\n newConfig.module = newConfig.module || {};\n newConfig.module.rules = newConfig.module.rules ||\n newConfig.module.loaders ||\n [];\n\n // Add default loaders\n newConfig.module.rules = defaultConfig.module.rules\n .concat(\n newConfig.module.rules,\n templatesLoader\n );\n\n return newConfig;\n}\n\n/**\n * Create an HTML webpack plugin for each configured prototype\n *\n * @param {object} huron - huron configuration object\n * @param {object} config - webpack configuration object\n * @return {object} newConfig - updated data store\n */\nfunction configurePrototypes(huron, config) {\n const wrapperTemplate = fs.readFileSync(\n path.join(__dirname, '../../templates/prototypeTemplate.hbs'),\n 'utf8'\n );\n\n const defaultHTMLPluginOptions = {\n title: 'Huron',\n window: huron.window,\n js: [],\n css: [],\n filename: 'index.html',\n template: path.join(\n cwd,\n huron.root,\n 'huron-assets/prototypeTemplate.hbs'\n ),\n inject: false,\n chunks: [huron.entry],\n };\n const newConfig = config;\n\n // Write prototype template file for HTML webpack plugin\n fs.outputFileSync(\n path.join(cwd, huron.root, 'huron-assets/prototypeTemplate.hbs'),\n wrapperTemplate\n );\n\n huron.prototypes.forEach((prototype) => {\n const newPrototype = prototype;\n let opts = {};\n\n // Merge configured settings with default settings\n if ('string' === typeof prototype) {\n opts = Object.assign({}, defaultHTMLPluginOptions, {\n title: prototype,\n filename: `${prototype}.html`,\n });\n } else if (\n 'object' === typeof prototype &&\n {}.hasOwnProperty.call(prototype, 'title')\n ) {\n // Create filename based on configured title if not provided\n if (!prototype.filename) {\n newPrototype.filename = `${prototype.title}.html`;\n }\n\n // Move css assets for this prototype,\n // reset css option with new file paths\n if (prototype.css) {\n newPrototype.css = moveAdditionalAssets(prototype.css, 'css', huron);\n }\n\n // Move js assets for this prototype,\n // reset js option with new file paths\n if (prototype.js) {\n newPrototype.js = moveAdditionalAssets(prototype.js, 'js', huron);\n }\n\n opts = Object.assign({}, defaultHTMLPluginOptions, newPrototype);\n }\n\n // Move global css assets,\n // reset css option with new file paths\n if (huron.css.length) {\n opts.css = opts.css.concat(\n moveAdditionalAssets(huron.css, 'css', huron)\n );\n }\n\n // Move global js assets,\n // reset js option with new file paths\n if (huron.js.length) {\n opts.js = opts.js.concat(\n moveAdditionalAssets(huron.js, 'js', huron)\n );\n }\n\n // Push a new plugin for each configured prototype\n if (Object.keys(opts).length) {\n newConfig.plugins.push(\n new HTMLWebpackPlugin(opts)\n );\n }\n });\n\n return newConfig;\n}\n\n/**\n * Move relative (and local) js and css assets provided in huron options\n *\n * @param {array|string} assets - array of assets or single asset\n * @param {string} subdir - subdirectory in huron root from which to load additional asset\n * @param {object} huron - huron configuration object\n * @return {array} assetResults - paths to js and css assets\n */\nfunction moveAdditionalAssets(assets, subdir = '', huron) {\n const currentAssets = [].concat(assets);\n const assetResults = [];\n\n currentAssets.forEach((asset) => {\n const assetInfo = path.parse(asset);\n const assetURL = url.parse(asset);\n const sourcePath = path.join(cwd, asset);\n const outputPath = path.resolve(cwd, huron.root, subdir, assetInfo.base);\n const loadPath = program.production ?\n path.join(subdir, assetInfo.base) :\n path.join('/', subdir, assetInfo.base); // Use absolute path in development\n let contents = false;\n\n if (\n !path.isAbsolute(asset) &&\n !assetURL.protocol\n ) {\n try {\n contents = fs.readFileSync(sourcePath);\n } catch (e) {\n console.warn(`could not read ${sourcePath}`);\n }\n\n if (contents) {\n fs.outputFileSync(outputPath, contents);\n assetResults.push(loadPath);\n }\n } else {\n assetResults.push(asset);\n }\n });\n\n return assetResults;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/cli/generateConfig.js","/** @module cli/html-handler */\nimport path from 'path';\nimport fs from 'fs-extra';\n\nimport * as utils from './utils';\n\n/**\n * Handle update of an HMTL template\n *\n * @function updateHTML\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - contains KSS section data\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nexport function updateHTML(filepath, section, store) {\n const file = path.parse(filepath);\n const content = fs.readFileSync(filepath, 'utf8');\n const newSection = section;\n\n if (content) {\n newSection.templatePath = utils.writeFile(\n section.referenceURI,\n 'template',\n filepath,\n content,\n store\n );\n newSection.templateContent = content;\n\n // Rewrite section data with template content\n newSection.sectionPath = utils.writeSectionData(store, newSection);\n\n return store\n .setIn(\n ['sections', 'sectionsByPath', section.kssPath],\n newSection\n )\n .setIn(\n ['sections', 'sectionsByURI', section.referenceURI],\n newSection\n );\n }\n\n console.log(`File ${file.base} could not be read`);\n return store;\n}\n\n/**\n * Handle removal of an HMTL template\n *\n * @function deleteHTML\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - contains KSS section data\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nexport function deleteHTML(filepath, section, store) {\n const newSection = section;\n\n utils.removeFile(\n newSection.referenceURI,\n 'template',\n filepath,\n store\n );\n\n delete newSection.templatePath;\n\n return store\n .setIn(\n ['sections', 'sectionsByPath', section.kssPath],\n newSection\n )\n .setIn(\n ['sections', 'sectionsByURI', section.referenceURI],\n newSection\n );\n}\n\n/**\n * Handle update for a prototype file\n *\n * @function updatePrototype\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nexport function updatePrototype(filepath, store) {\n const file = path.parse(filepath);\n const content = fs.readFileSync(filepath, 'utf8');\n\n if (content) {\n const requirePath = utils.writeFile(\n file.name,\n 'prototype',\n filepath,\n content,\n store\n );\n\n return store.setIn(\n ['prototypes', file.name],\n requirePath\n );\n }\n\n console.log(`File ${file.base} could not be read`);\n return store;\n}\n\n/**\n * Handle removal of a prototype file\n *\n * @function deletePrototype\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nexport function deletePrototype(filepath, store) {\n const file = path.parse(filepath);\n const requirePath = utils.removeFile(\n file.name,\n 'prototype',\n filepath,\n store\n );\n\n return store.setIn(\n ['prototypes', file.name],\n requirePath\n );\n}\n\n\n\n// WEBPACK FOOTER //\n// src/cli/handleHTML.js","/** @module cli/kss-handler */\n\nimport path from 'path';\nimport fs from 'fs-extra';\nimport { parse } from 'kss';\nimport chalk from 'chalk';\n\nimport * as utils from './utils';\nimport { updateTemplate, deleteTemplate } from './handleTemplates';\nimport { writeStore } from './requireTemplates';\n\n/**\n * Handle update of a KSS section\n *\n * @function updateKSS\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nexport function updateKSS(filepath, store) {\n const kssSource = fs.readFileSync(filepath, 'utf8');\n const huron = store.get('config');\n const oldSection = utils.getSection(filepath, false, store) || {};\n const file = path.parse(filepath);\n let newStore = store;\n\n if (kssSource) {\n const styleguide = parse(kssSource, huron.get('kssOptions'));\n\n if (styleguide.data.sections.length) {\n const section = utils.normalizeSectionData(\n styleguide.data.sections[0]\n );\n\n if (section.reference && section.referenceURI) {\n // Update or add section data\n newStore = updateSectionData(\n filepath,\n section,\n oldSection,\n newStore\n );\n\n // Remove old section data if reference URI has changed\n if (oldSection &&\n oldSection.referenceURI &&\n oldSection.referenceURI !== section.referenceURI\n ) {\n newStore = unsetSection(oldSection, file, newStore, false);\n }\n\n writeStore(newStore);\n console.log(\n chalk.green(\n `KSS source in ${filepath} changed or added`\n )\n );\n return newStore;\n }\n\n console.log(\n chalk.magenta(\n `KSS section in ${filepath} is missing a section reference`\n )\n );\n return newStore;\n }\n\n console.log(chalk.magenta(`No KSS found in ${filepath}`));\n return newStore;\n }\n\n if (oldSection) {\n newStore = deleteKSS(filepath, oldSection, newStore);\n }\n\n console.log(chalk.red(`${filepath} not found or empty`)); // eslint-disable-line no-console\n return newStore;\n}\n\n/**\n * Handle removal of a KSS section\n *\n * @function deleteKSS\n * @param {string} filepath - filepath of changed file (comes from gaze)\n * @param {object} section - KSS section data\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nexport function deleteKSS(filepath, section, store) {\n const file = path.parse(filepath);\n\n if (section.reference && section.referenceURI) {\n // Remove section data from memory store\n return unsetSection(section, file, store, true);\n }\n\n return store;\n}\n\n/**\n * Update the sections store with new data for a specific section\n *\n * @function updateSectionData\n * @param {object} section - contains updated section data\n * @param {string} kssPath - path to KSS section\n * @param {object} store - memory store\n * @return {object} updated data store\n */\nfunction updateSectionData(kssPath, section, oldSection, store) {\n const sectionFileInfo = path.parse(kssPath);\n const dataFilepath = path.join(\n sectionFileInfo.dir,\n `${sectionFileInfo.name}.json`\n );\n const isInline = null !== section.markup.match(/<\\/[^>]*>/);\n const newSort = sortSection(\n store.getIn(['sections', 'sorted']),\n section.reference,\n store.get('referenceDelimiter')\n );\n const newSection = Object.assign({}, oldSection, section);\n let newStore = store;\n\n // Required for reference from templates and data\n newSection.kssPath = kssPath;\n\n if (isInline) {\n // Set section value if inlineTempalte() returned a path\n newStore = updateInlineTemplate(\n kssPath,\n oldSection,\n newSection,\n newStore\n );\n } else {\n // Remove inline template, if it exists\n utils.removeFile(\n newSection.referenceURI,\n 'template',\n kssPath,\n store\n );\n // Update markup and data fields\n newStore = updateTemplateFields(\n sectionFileInfo,\n oldSection,\n newSection,\n newStore\n );\n }\n\n // Output section description\n newStore = updateDescription(\n kssPath,\n oldSection,\n newSection,\n newStore\n );\n\n // Output section data to a JSON file\n newSection.sectionPath = utils.writeSectionData(\n newStore,\n newSection,\n dataFilepath\n );\n\n // Update section sorting\n return newStore\n .setIn(\n ['sections', 'sorted'],\n newSort\n )\n .setIn(\n ['sections', 'sectionsByPath', kssPath],\n newSection\n )\n .setIn(\n ['sections', 'sectionsByURI', section.referenceURI],\n newSection\n );\n}\n\n/**\n * Handle detection and output of inline templates, which is markup written\n * in the KSS documentation itself as opposed to an external file\n *\n * @function updateInlineTemplate\n * @param {string} oldSection - previous iteration of KSS data, if updated\n * @param {object} section - KSS section data\n * @return {object} updated data store with new template path info\n */\nfunction updateInlineTemplate(filepath, oldSection, section, store) {\n const newSection = section;\n const newStore = store;\n\n // If we have inline markup\n if (fieldShouldOutput(oldSection, section, 'markup')) {\n newSection.templatePath = utils.writeFile(\n section.referenceURI,\n 'template',\n filepath,\n section.markup,\n store\n );\n newSection.templateContent = section.markup;\n\n return newStore\n .setIn(\n ['sections', 'sectionsByPath', filepath],\n newSection\n )\n .setIn(\n ['sections', 'sectionsByURI', section.referenceURI],\n newSection\n );\n }\n\n return newStore;\n}\n\n/**\n * Handle output of section description\n *\n * @function updateDescription\n * @param {string} oldSection - previous iteration of KSS data, if updated\n * @param {object} section - KSS section data\n * @return {object} updated data store with new descripton path info\n */\nfunction updateDescription(filepath, oldSection, section, store) {\n const newSection = section;\n const newStore = store;\n\n // If we don't have previous KSS or the KSS has been updated\n if (fieldShouldOutput(oldSection, section, 'description')) {\n // Write new description\n newSection.descriptionPath = utils.writeFile(\n section.referenceURI,\n 'description',\n filepath,\n section.description,\n store\n );\n\n return newStore\n .setIn(\n ['sections', 'sectionsByPath', filepath],\n newSection\n )\n .setIn(\n ['sections', 'sectionsByURI', section.referenceURI],\n newSection\n );\n }\n\n return newStore;\n}\n\n/**\n * Handle Data and Markup fields\n *\n * @function updateTemplateFields\n * @param {string} file - File data for KSS file from path.parse()\n * @param {object} oldSection - outdated KSS data\n * @param {object} section - KSS section data\n * @param {object} store - memory store\n * @return {object} KSS section data with updated asset paths\n */\nfunction updateTemplateFields(file, oldSection, section, store) {\n const kssPath = path.format(file);\n const newSection = section;\n let filepath = '';\n let oldFilepath = '';\n let newStore = store;\n\n ['data', 'markup'].forEach((field) => {\n if (newSection[field]) {\n if (oldSection[field]) {\n oldFilepath = path.join(file.dir, oldSection[field]);\n newStore = deleteTemplate(\n oldFilepath,\n oldSection,\n newStore\n );\n }\n\n filepath = path.join(file.dir, newSection[field]);\n newStore = updateTemplate(\n filepath,\n newSection,\n newStore\n );\n } else {\n delete newSection[field];\n newStore = newStore\n .setIn(\n ['sections', 'sectionsByPath', kssPath],\n newSection\n )\n .setIn(\n ['sections', 'sectionsByURI', newSection.referenceURI],\n newSection\n );\n }\n });\n\n return newStore;\n}\n\n/**\n * Remove a section from the memory store\n *\n * @function unsetSection\n * @param {object} section - contains updated section data\n * @param {string} file - file object from path.parse()\n * @param {object} store - memory store\n * @param {bool} removed - has the file been removed or just the section information changed?\n * @return {object} updated data store with new descripton path info\n */\nfunction unsetSection(section, file, store, removed) {\n const sorted = store.getIn(['sections', 'sorted']);\n const kssPath = path.format(file);\n const dataFilepath = path.join(file.dir, `${file.name}.json`);\n const isInline = section.markup &&\n null !== section.markup.match(/<\\/[^>]*>/);\n const newSort = unsortSection(\n sorted,\n section.reference,\n store.get('referenceDelimiter')\n );\n let newStore = store;\n\n // Remove old section data\n utils.removeFile(\n section.referenceURI,\n 'section',\n dataFilepath,\n newStore\n );\n\n // Remove associated inline template\n if (isInline) {\n utils.removeFile(section.referenceURI, 'template', kssPath, newStore);\n }\n\n // Remove description template\n utils.removeFile(section.referenceURI, 'description', kssPath, newStore);\n\n // Remove data from sectionsByPath if file has been removed\n if (removed) {\n newStore = newStore.deleteIn(['sections', 'sectionsByPath', kssPath]);\n }\n\n return newStore\n .deleteIn(['sections', 'sectionsByURI', section.referenceURI])\n .setIn(['sections', 'sorted'], newSort);\n}\n\n/**\n * Sort sections and subsections\n *\n * @function sortSection\n * @param {object} sorted - currently sorted sections\n * @param {string} reference - reference URI of section to sort\n * @return {object} updated data store with new descripton path info\n */\nfunction sortSection(sorted, reference, delimiter) {\n const parts = reference.split(delimiter);\n const newSort = sorted[parts[0]] || {};\n const newSorted = sorted;\n\n if (1 < parts.length) {\n const newParts = parts.filter((part, idx) => 0 !== idx);\n newSorted[parts[0]] = sortSection(\n newSort,\n newParts.join(delimiter),\n delimiter\n );\n } else {\n newSorted[parts[0]] = newSort;\n }\n\n return newSorted;\n}\n\n/**\n * Remove a section from the sorted sections\n *\n * @function unsortSection\n * @param {object} sorted - currently sorted sections\n * @param {string} reference - reference URI of section to sort\n * @return {object} updated data store with new descripton path info\n */\nfunction unsortSection(sorted, reference, delimiter) {\n const parts = reference.split(delimiter);\n const subsections = Object.keys(sorted[parts[0]]);\n const newSorted = sorted;\n\n if (subsections.length) {\n if (1 < parts.length) {\n const newParts = parts.filter((part, idx) => 0 !== idx);\n newSorted[parts[0]] = unsortSection(\n newSorted[parts[0]],\n newParts.join(delimiter),\n delimiter\n );\n }\n } else {\n delete newSorted[parts[0]];\n }\n\n return newSorted;\n}\n\n/**\n * Compare a KSS field between old and new KSS data to see if we need to output\n * a new module for that field\n *\n * @function fieldShouldOutput\n * @param {object} oldSection - currently sorted sections\n * @param {object} newSection - reference URI of section to sort\n * @param {string} field - KSS field to check\n * @return {bool} output a new module for the KSS field\n */\nfunction fieldShouldOutput(oldSection, newSection, field) {\n return (oldSection &&\n (oldSection[field] !== newSection[field] ||\n oldSection.referenceURI !== newSection.referenceURI)\n ) ||\n !oldSection;\n}\n\n\n\n// WEBPACK FOOTER //\n// src/cli/handleKSS.js","// Necessary to remove require statement from Webpack processing preserve it in output\n/* eslint-disable import/no-dynamic-require, global-require */\nexport default function requireExternal(requirePath) {\n return require(requirePath);\n}\n/* eslint-enable */\n\n\n\n// WEBPACK FOOTER //\n// src/cli/requireExternal.js","/** @module cli/webpack-server */\nimport webpack from 'webpack';\nimport WebpackDevServer from 'webpack-dev-server';\nimport chalk from 'chalk';\nimport open from 'opn';\n\nimport createDevServerConfig from '../../config/devServer.config';\nimport program from './parseArgs';\n\n/**\n * Spin up webpack-dev-server or, if production flag is set, run webpack a single time\n *\n * @function startWebpack\n * @param {object} config - webpack configuration, preprocessed by {@link module:cli/generate-config generateConfig}\n * @see {@link module:cli/generate-config generateConfig}\n */\nexport default function startWebpack(config) {\n const huron = config.huron;\n const webpackConfig = config.webpack;\n const compiler = webpack(webpackConfig);\n\n if (program.progress) {\n compiler.apply(\n new webpack.ProgressPlugin(\n (percentage, msg) => {\n console.log(`${(percentage * 100)}% `, msg);\n }\n )\n );\n }\n\n if (program.production) {\n compiler.run((err, stats) => {\n const info = stats.toJson();\n\n if (err) {\n console.log(err);\n }\n\n if (stats.hasErrors()) {\n console.error(\n chalk.red(\n 'Webpack encountered errors during compile: ',\n info.errors\n )\n );\n }\n\n if (stats.hasWarnings()) {\n console.error(\n chalk.yellow(\n 'Webpack encountered warnings during compile: ', info.warnings\n )\n );\n }\n });\n } else {\n const server = new WebpackDevServer(compiler, createDevServerConfig(huron));\n const prototypeName = huron.prototypes[0].title || huron.prototypes[0];\n\n server.listen(\n huron.port,\n 'localhost',\n (err) => {\n if (err) {\n return console.log(err);\n }\n\n console.log(`Listening at http://localhost:${huron.port}/`);\n open(`http://localhost:${huron.port}/${huron.root}/${prototypeName}.html`);\n return true;\n }\n );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// src/cli/server.js","const path = require('path');\n\nmodule.exports = {\n css: [],\n entry: 'huron',\n js: [],\n kss: 'css/',\n kssExtension: '.css',\n kssOptions: {\n multiline: true,\n markdown: true,\n custom: ['data'],\n },\n output: 'partials',\n port: 8080,\n prototypes: ['index'],\n root: 'dist/',\n sectionTemplate: path.join(__dirname, '../../templates/section.hbs'),\n classNames: false,\n templates: {\n rule: {\n test: /\\.(hbs|handlebars)$/,\n use: 'handlebars-loader',\n },\n extension: '.hbs',\n },\n window: {},\n};\n\n\n\n// WEBPACK FOOTER //\n// src/defaultConfig/huron.config.js","import program from '../cli/parseArgs';\n\nconst webpack = require('webpack');\nconst path = require('path');\n\nmodule.exports = (huron) => {\n const cwd = process.cwd();\n\n return {\n entry: {},\n output: {\n path: path.join(cwd, huron.root),\n publicPath: program.production ? '' :\n `http://localhost:${huron.port}/${huron.root}`,\n filename: '[name].js',\n chunkFilename: '[name].chunk.min.js',\n },\n plugins: [\n new webpack.HotModuleReplacementPlugin(),\n new webpack.NamedModulesPlugin(),\n ],\n resolve: {\n modulesDirectories: [\n path.resolve(__dirname, '../src/js'),\n ],\n },\n resolveLoader: {\n modulesDirectories: [\n 'web_loaders',\n 'web_modules',\n 'node_loaders',\n 'node_modules',\n path.resolve(__dirname, '../node_modules'),\n ],\n },\n module: {\n rules: [\n {\n test: /\\.html$/,\n include: [path.join(cwd, huron.root, huron.output)],\n use: 'html-loader',\n },\n {\n test: /\\.(hbs|handlebars)$/,\n include: [path.join(cwd, huron.root, 'huron-assets')],\n use: {\n loader: 'handlebars-loader',\n options: {\n helperDirs: [path.join(\n __dirname,\n '../../',\n 'templates/handlebarsHelpers'\n )],\n },\n },\n },\n ],\n },\n };\n};\n\n\n\n// WEBPACK FOOTER //\n// src/defaultConfig/webpack.config.js","module.exports = require(\"commander\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"commander\"\n// module id = 20\n// module chunks = 0","module.exports = require(\"gaze\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"gaze\"\n// module id = 21\n// module chunks = 0","module.exports = require(\"html-webpack-plugin\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"html-webpack-plugin\"\n// module id = 22\n// module chunks = 0","module.exports = require(\"immutable\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"immutable\"\n// module id = 23\n// module chunks = 0","module.exports = require(\"kss\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"kss\"\n// module id = 24\n// module chunks = 0","module.exports = require(\"lodash/isEqual\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"lodash/isEqual\"\n// module id = 25\n// module chunks = 0","module.exports = require(\"opn\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"opn\"\n// module id = 26\n// module chunks = 0","module.exports = require(\"url\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"url\"\n// module id = 27\n// module chunks = 0","module.exports = require(\"webpack-dev-server\");\n\n\n//////////////////\n// WEBPACK FOOTER\n// external \"webpack-dev-server\"\n// module id = 28\n// module chunks = 0"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;A;;;;AChEA;;;;;;;;;;;;ACcA;AAkBA;AAqCA;AAqCA;AAcA;AAkBA;AAyBA;AA4CA;AAyCA;AAyBA;AAyBA;AAqBA;AA0CA;AACA;AAzWA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;;;AACA;AACA;AACA;;;;;;;AAPA;AAcA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAGA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AAGA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;;AAFA;AAKA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AAGA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AC/WA;;;;;;ACAA;;;;;;;;;;;;;ACGA;AACA;;;AAAA;AACA;;;;;AACA;AACA;AACA;AACA;;;;;;AATA;AACA;AACA;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAYA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;ACzDA;;;;;;;;;;;;;;ACAA;AACA;AACA;AACA;;;AAAA;AACA;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;AAKA;AACA;AAQA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AACA;AAnBA;AAqBA;AACA;AACA;AAAA;;;;;;;;;;;;ACzBA;AA0DA;AACA;AA1EA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;AADA;AACA;;;;;AACA;;;;;;;;;AAPA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAaA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AAUA;;;;;;;;;;;;;;ACjGA;AACA;;;AAAA;AACA;;;;;AAJA;AACA;AAIA;AACA;AACA;AAIA;;;;;;;;;AASA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;;;;AAIA;;;AAGA;AACA;;;;;;;;;;;;;;;AAeA;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;AAwBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAjDA;AACA;AAgFA;AACA;AACA;AAGA;AAHA;AAMA;AAIA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AAHA;AAMA;;;;;;;;;AC/IA;AACA;;;AACA;AACA;AAKA;AACA;AAAA;AACA;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;;;AACA;;;;;AAhBA;AAqBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AATA;AAWA;AACA;AACA;AAjBA;;;;;;;;;;;;ACwBA;AA8CA;AA+DA;AA0DA;AACA;AA7LA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;AAKA;AACA;AAAA;AACA;AAAA;AACA;AADA;AACA;;;;;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AA1BA;AACA;AA4BA;AACA;AACA;AACA;;;;;;;AA/DA;AACA;AACA;AAoEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxCA;AACA;AA0CA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AArCA;AACA;AAuCA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AC5MA;AACA;AAAA;AACA;;;AACA;AACA;AAAA;AACA;;;AACA;;;;;AAKA;AACA;AACA;;;;;AAKA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;;;;;AAKA;AACA;AACA;;;;;;;;;;;;ACtBA;AACA;AA9BA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;;;AAAA;AACA;;;;;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAGA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAKA;AACA;AACA;AACA;;;;;;;AAOA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AAZA;AAcA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AC7RA;AA0CA;AA+BA;AA+BA;AACA;AAvHA;AACA;;;AAAA;AACA;;;AACA;AACA;AADA;AACA;;;;;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AACA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAhDA;AAyDA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AASA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AAMA;AAIA;;;;;;;;;;;;ACjHA;AAsEA;AACA;AAxFA;AACA;;;AAAA;AACA;;;AAAA;AACA;AAAA;AACA;;;AACA;AACA;AADA;AACA;AAAA;AACA;AAAA;AACA;;;;;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAMA;AACA;AAIA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAhFA;AACA;AAwFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AAIA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AAMA;AACA;AAMA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AAKA;AACA;AAaA;AACA;AACA;;;;;;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAOA;AASA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AAKA;AACA;AACA;AASA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AAEA;AAKA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAUA;AACA;AAKA;;;;;;;;;;;AC5aA;AAFA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACWA;AACA;AAhBA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AAAA;AACA;;;AACA;AACA;;;AAAA;AACA;;;;;AACA;;;;;;;AATA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;;;;;;;;;AC1EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAFA;AAIA;AALA;AAOA;AAxBA;;;;;;;;;ACFA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AALA;AAOA;AAIA;AACA;AADA;AAKA;AACA;AADA;AASA;AACA;AAEA;AACA;AACA;AAHA;AAMA;AACA;AACA;AACA;AACA;AACA;AADA;AAFA;AAHA;AAPA;AA3BA;AAmDA;;;;;;AC3DA;;;;;;ACAA;;;;;;ACAA;;;;;;ACAA;;;;;;ACAA;;;;;;ACAA;;;;;;ACAA;;;;;;ACAA;;;;;;ACAA;;;;;;;;;;A","sourceRoot":""}
\ No newline at end of file
diff --git a/dist/web/index.js b/dist/web/index.js
index 614cc10..55e167c 100644
--- a/dist/web/index.js
+++ b/dist/web/index.js
@@ -70,2030 +70,113 @@ module.exports =
/******/ ({
/***/ "./node_modules/lodash/fp.js":
+/* no static exports found */
+/* all exports used */
+/*!************************!*\
+ !*** ./~/lodash/fp.js ***!
+ \************************/
/***/ (function(module, exports, __webpack_require__) {
-var _ = __webpack_require__("./node_modules/lodash/lodash.min.js").runInContext();
-module.exports = __webpack_require__("./node_modules/lodash/fp/_baseConvert.js")(_, _);
-
+eval("var _ = __webpack_require__(/*! ./lodash.min */ \"./node_modules/lodash/lodash.min.js\").runInContext();\nmodule.exports = __webpack_require__(/*! ./fp/_baseConvert */ \"./node_modules/lodash/fp/_baseConvert.js\")(_, _);\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbG9kYXNoL2ZwLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vfi9sb2Rhc2gvZnAuanM/YmRjMyJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgXyA9IHJlcXVpcmUoJy4vbG9kYXNoLm1pbicpLnJ1bkluQ29udGV4dCgpO1xubW9kdWxlLmV4cG9ydHMgPSByZXF1aXJlKCcuL2ZwL19iYXNlQ29udmVydCcpKF8sIF8pO1xuXG5cblxuLy8vLy8vLy8vLy8vLy8vLy8vXG4vLyBXRUJQQUNLIEZPT1RFUlxuLy8gLi9+L2xvZGFzaC9mcC5qc1xuLy8gbW9kdWxlIGlkID0gLi9ub2RlX21vZHVsZXMvbG9kYXNoL2ZwLmpzXG4vLyBtb2R1bGUgY2h1bmtzID0gMCJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/***/ "./node_modules/lodash/fp/_baseConvert.js":
+/* no static exports found */
+/* all exports used */
+/*!*************************************!*\
+ !*** ./~/lodash/fp/_baseConvert.js ***!
+ \*************************************/
/***/ (function(module, exports, __webpack_require__) {
-var mapping = __webpack_require__("./node_modules/lodash/fp/_mapping.js"),
- fallbackHolder = __webpack_require__("./node_modules/lodash/fp/placeholder.js");
-
-/** Built-in value reference. */
-var push = Array.prototype.push;
-
-/**
- * Creates a function, with an arity of `n`, that invokes `func` with the
- * arguments it receives.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {number} n The arity of the new function.
- * @returns {Function} Returns the new function.
- */
-function baseArity(func, n) {
- return n == 2
- ? function(a, b) { return func.apply(undefined, arguments); }
- : function(a) { return func.apply(undefined, arguments); };
-}
-
-/**
- * Creates a function that invokes `func`, with up to `n` arguments, ignoring
- * any additional arguments.
- *
- * @private
- * @param {Function} func The function to cap arguments for.
- * @param {number} n The arity cap.
- * @returns {Function} Returns the new function.
- */
-function baseAry(func, n) {
- return n == 2
- ? function(a, b) { return func(a, b); }
- : function(a) { return func(a); };
-}
-
-/**
- * Creates a clone of `array`.
- *
- * @private
- * @param {Array} array The array to clone.
- * @returns {Array} Returns the cloned array.
- */
-function cloneArray(array) {
- var length = array ? array.length : 0,
- result = Array(length);
-
- while (length--) {
- result[length] = array[length];
- }
- return result;
-}
-
-/**
- * Creates a function that clones a given object using the assignment `func`.
- *
- * @private
- * @param {Function} func The assignment function.
- * @returns {Function} Returns the new cloner function.
- */
-function createCloner(func) {
- return function(object) {
- return func({}, object);
- };
-}
-
-/**
- * A specialized version of `_.spread` which flattens the spread array into
- * the arguments of the invoked `func`.
- *
- * @private
- * @param {Function} func The function to spread arguments over.
- * @param {number} start The start position of the spread.
- * @returns {Function} Returns the new function.
- */
-function flatSpread(func, start) {
- return function() {
- var length = arguments.length,
- lastIndex = length - 1,
- args = Array(length);
-
- while (length--) {
- args[length] = arguments[length];
- }
- var array = args[start],
- otherArgs = args.slice(0, start);
-
- if (array) {
- push.apply(otherArgs, array);
- }
- if (start != lastIndex) {
- push.apply(otherArgs, args.slice(start + 1));
- }
- return func.apply(this, otherArgs);
- };
-}
-
-/**
- * Creates a function that wraps `func` and uses `cloner` to clone the first
- * argument it receives.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} cloner The function to clone arguments.
- * @returns {Function} Returns the new immutable function.
- */
-function wrapImmutable(func, cloner) {
- return function() {
- var length = arguments.length;
- if (!length) {
- return;
- }
- var args = Array(length);
- while (length--) {
- args[length] = arguments[length];
- }
- var result = args[0] = cloner.apply(undefined, args);
- func.apply(undefined, args);
- return result;
- };
-}
-
-/**
- * The base implementation of `convert` which accepts a `util` object of methods
- * required to perform conversions.
- *
- * @param {Object} util The util object.
- * @param {string} name The name of the function to convert.
- * @param {Function} func The function to convert.
- * @param {Object} [options] The options object.
- * @param {boolean} [options.cap=true] Specify capping iteratee arguments.
- * @param {boolean} [options.curry=true] Specify currying.
- * @param {boolean} [options.fixed=true] Specify fixed arity.
- * @param {boolean} [options.immutable=true] Specify immutable operations.
- * @param {boolean} [options.rearg=true] Specify rearranging arguments.
- * @returns {Function|Object} Returns the converted function or object.
- */
-function baseConvert(util, name, func, options) {
- var setPlaceholder,
- isLib = typeof name == 'function',
- isObj = name === Object(name);
-
- if (isObj) {
- options = func;
- func = name;
- name = undefined;
- }
- if (func == null) {
- throw new TypeError;
- }
- options || (options = {});
-
- var config = {
- 'cap': 'cap' in options ? options.cap : true,
- 'curry': 'curry' in options ? options.curry : true,
- 'fixed': 'fixed' in options ? options.fixed : true,
- 'immutable': 'immutable' in options ? options.immutable : true,
- 'rearg': 'rearg' in options ? options.rearg : true
- };
-
- var forceCurry = ('curry' in options) && options.curry,
- forceFixed = ('fixed' in options) && options.fixed,
- forceRearg = ('rearg' in options) && options.rearg,
- placeholder = isLib ? func : fallbackHolder,
- pristine = isLib ? func.runInContext() : undefined;
-
- var helpers = isLib ? func : {
- 'ary': util.ary,
- 'assign': util.assign,
- 'clone': util.clone,
- 'curry': util.curry,
- 'forEach': util.forEach,
- 'isArray': util.isArray,
- 'isFunction': util.isFunction,
- 'iteratee': util.iteratee,
- 'keys': util.keys,
- 'rearg': util.rearg,
- 'toInteger': util.toInteger,
- 'toPath': util.toPath
- };
-
- var ary = helpers.ary,
- assign = helpers.assign,
- clone = helpers.clone,
- curry = helpers.curry,
- each = helpers.forEach,
- isArray = helpers.isArray,
- isFunction = helpers.isFunction,
- keys = helpers.keys,
- rearg = helpers.rearg,
- toInteger = helpers.toInteger,
- toPath = helpers.toPath;
-
- var aryMethodKeys = keys(mapping.aryMethod);
-
- var wrappers = {
- 'castArray': function(castArray) {
- return function() {
- var value = arguments[0];
- return isArray(value)
- ? castArray(cloneArray(value))
- : castArray.apply(undefined, arguments);
- };
- },
- 'iteratee': function(iteratee) {
- return function() {
- var func = arguments[0],
- arity = arguments[1],
- result = iteratee(func, arity),
- length = result.length;
-
- if (config.cap && typeof arity == 'number') {
- arity = arity > 2 ? (arity - 2) : 1;
- return (length && length <= arity) ? result : baseAry(result, arity);
- }
- return result;
- };
- },
- 'mixin': function(mixin) {
- return function(source) {
- var func = this;
- if (!isFunction(func)) {
- return mixin(func, Object(source));
- }
- var pairs = [];
- each(keys(source), function(key) {
- if (isFunction(source[key])) {
- pairs.push([key, func.prototype[key]]);
- }
- });
-
- mixin(func, Object(source));
-
- each(pairs, function(pair) {
- var value = pair[1];
- if (isFunction(value)) {
- func.prototype[pair[0]] = value;
- } else {
- delete func.prototype[pair[0]];
- }
- });
- return func;
- };
- },
- 'nthArg': function(nthArg) {
- return function(n) {
- var arity = n < 0 ? 1 : (toInteger(n) + 1);
- return curry(nthArg(n), arity);
- };
- },
- 'rearg': function(rearg) {
- return function(func, indexes) {
- var arity = indexes ? indexes.length : 0;
- return curry(rearg(func, indexes), arity);
- };
- },
- 'runInContext': function(runInContext) {
- return function(context) {
- return baseConvert(util, runInContext(context), options);
- };
- }
- };
-
- /*--------------------------------------------------------------------------*/
-
- /**
- * Casts `func` to a function with an arity capped iteratee if needed.
- *
- * @private
- * @param {string} name The name of the function to inspect.
- * @param {Function} func The function to inspect.
- * @returns {Function} Returns the cast function.
- */
- function castCap(name, func) {
- if (config.cap) {
- var indexes = mapping.iterateeRearg[name];
- if (indexes) {
- return iterateeRearg(func, indexes);
- }
- var n = !isLib && mapping.iterateeAry[name];
- if (n) {
- return iterateeAry(func, n);
- }
- }
- return func;
- }
-
- /**
- * Casts `func` to a curried function if needed.
- *
- * @private
- * @param {string} name The name of the function to inspect.
- * @param {Function} func The function to inspect.
- * @param {number} n The arity of `func`.
- * @returns {Function} Returns the cast function.
- */
- function castCurry(name, func, n) {
- return (forceCurry || (config.curry && n > 1))
- ? curry(func, n)
- : func;
- }
-
- /**
- * Casts `func` to a fixed arity function if needed.
- *
- * @private
- * @param {string} name The name of the function to inspect.
- * @param {Function} func The function to inspect.
- * @param {number} n The arity cap.
- * @returns {Function} Returns the cast function.
- */
- function castFixed(name, func, n) {
- if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {
- var data = mapping.methodSpread[name],
- start = data && data.start;
-
- return start === undefined ? ary(func, n) : flatSpread(func, start);
- }
- return func;
- }
-
- /**
- * Casts `func` to an rearged function if needed.
- *
- * @private
- * @param {string} name The name of the function to inspect.
- * @param {Function} func The function to inspect.
- * @param {number} n The arity of `func`.
- * @returns {Function} Returns the cast function.
- */
- function castRearg(name, func, n) {
- return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))
- ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])
- : func;
- }
-
- /**
- * Creates a clone of `object` by `path`.
- *
- * @private
- * @param {Object} object The object to clone.
- * @param {Array|string} path The path to clone by.
- * @returns {Object} Returns the cloned object.
- */
- function cloneByPath(object, path) {
- path = toPath(path);
-
- var index = -1,
- length = path.length,
- lastIndex = length - 1,
- result = clone(Object(object)),
- nested = result;
-
- while (nested != null && ++index < length) {
- var key = path[index],
- value = nested[key];
-
- if (value != null) {
- nested[path[index]] = clone(index == lastIndex ? value : Object(value));
- }
- nested = nested[key];
- }
- return result;
- }
-
- /**
- * Converts `lodash` to an immutable auto-curried iteratee-first data-last
- * version with conversion `options` applied.
- *
- * @param {Object} [options] The options object. See `baseConvert` for more details.
- * @returns {Function} Returns the converted `lodash`.
- */
- function convertLib(options) {
- return _.runInContext.convert(options)(undefined);
- }
-
- /**
- * Create a converter function for `func` of `name`.
- *
- * @param {string} name The name of the function to convert.
- * @param {Function} func The function to convert.
- * @returns {Function} Returns the new converter function.
- */
- function createConverter(name, func) {
- var realName = mapping.aliasToReal[name] || name,
- methodName = mapping.remap[realName] || realName,
- oldOptions = options;
-
- return function(options) {
- var newUtil = isLib ? pristine : helpers,
- newFunc = isLib ? pristine[methodName] : func,
- newOptions = assign(assign({}, oldOptions), options);
-
- return baseConvert(newUtil, realName, newFunc, newOptions);
- };
- }
-
- /**
- * Creates a function that wraps `func` to invoke its iteratee, with up to `n`
- * arguments, ignoring any additional arguments.
- *
- * @private
- * @param {Function} func The function to cap iteratee arguments for.
- * @param {number} n The arity cap.
- * @returns {Function} Returns the new function.
- */
- function iterateeAry(func, n) {
- return overArg(func, function(func) {
- return typeof func == 'function' ? baseAry(func, n) : func;
- });
- }
-
- /**
- * Creates a function that wraps `func` to invoke its iteratee with arguments
- * arranged according to the specified `indexes` where the argument value at
- * the first index is provided as the first argument, the argument value at
- * the second index is provided as the second argument, and so on.
- *
- * @private
- * @param {Function} func The function to rearrange iteratee arguments for.
- * @param {number[]} indexes The arranged argument indexes.
- * @returns {Function} Returns the new function.
- */
- function iterateeRearg(func, indexes) {
- return overArg(func, function(func) {
- var n = indexes.length;
- return baseArity(rearg(baseAry(func, n), indexes), n);
- });
- }
-
- /**
- * Creates a function that invokes `func` with its first argument transformed.
- *
- * @private
- * @param {Function} func The function to wrap.
- * @param {Function} transform The argument transform.
- * @returns {Function} Returns the new function.
- */
- function overArg(func, transform) {
- return function() {
- var length = arguments.length;
- if (!length) {
- return func();
- }
- var args = Array(length);
- while (length--) {
- args[length] = arguments[length];
- }
- var index = config.rearg ? 0 : (length - 1);
- args[index] = transform(args[index]);
- return func.apply(undefined, args);
- };
- }
-
- /**
- * Creates a function that wraps `func` and applys the conversions
- * rules by `name`.
- *
- * @private
- * @param {string} name The name of the function to wrap.
- * @param {Function} func The function to wrap.
- * @returns {Function} Returns the converted function.
- */
- function wrap(name, func) {
- var result,
- realName = mapping.aliasToReal[name] || name,
- wrapped = func,
- wrapper = wrappers[realName];
-
- if (wrapper) {
- wrapped = wrapper(func);
- }
- else if (config.immutable) {
- if (mapping.mutate.array[realName]) {
- wrapped = wrapImmutable(func, cloneArray);
- }
- else if (mapping.mutate.object[realName]) {
- wrapped = wrapImmutable(func, createCloner(func));
- }
- else if (mapping.mutate.set[realName]) {
- wrapped = wrapImmutable(func, cloneByPath);
- }
- }
- each(aryMethodKeys, function(aryKey) {
- each(mapping.aryMethod[aryKey], function(otherName) {
- if (realName == otherName) {
- var data = mapping.methodSpread[realName],
- afterRearg = data && data.afterRearg;
-
- result = afterRearg
- ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)
- : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);
-
- result = castCap(realName, result);
- result = castCurry(realName, result, aryKey);
- return false;
- }
- });
- return !result;
- });
-
- result || (result = wrapped);
- if (result == func) {
- result = forceCurry ? curry(result, 1) : function() {
- return func.apply(this, arguments);
- };
- }
- result.convert = createConverter(realName, func);
- if (mapping.placeholder[realName]) {
- setPlaceholder = true;
- result.placeholder = func.placeholder = placeholder;
- }
- return result;
- }
-
- /*--------------------------------------------------------------------------*/
-
- if (!isObj) {
- return wrap(name, func);
- }
- var _ = func;
-
- // Convert methods by ary cap.
- var pairs = [];
- each(aryMethodKeys, function(aryKey) {
- each(mapping.aryMethod[aryKey], function(key) {
- var func = _[mapping.remap[key] || key];
- if (func) {
- pairs.push([key, wrap(key, func)]);
- }
- });
- });
-
- // Convert remaining methods.
- each(keys(_), function(key) {
- var func = _[key];
- if (typeof func == 'function') {
- var length = pairs.length;
- while (length--) {
- if (pairs[length][0] == key) {
- return;
- }
- }
- func.convert = createConverter(key, func);
- pairs.push([key, func]);
- }
- });
-
- // Assign to `_` leaving `_.prototype` unchanged to allow chaining.
- each(pairs, function(pair) {
- _[pair[0]] = pair[1];
- });
-
- _.convert = convertLib;
- if (setPlaceholder) {
- _.placeholder = placeholder;
- }
- // Assign aliases.
- each(keys(_), function(key) {
- each(mapping.realToAlias[key] || [], function(alias) {
- _[alias] = _[key];
- });
- });
-
- return _;
-}
-
-module.exports = baseConvert;
-
+eval("var mapping = __webpack_require__(/*! ./_mapping */ \"./node_modules/lodash/fp/_mapping.js\"),\n fallbackHolder = __webpack_require__(/*! ./placeholder */ \"./node_modules/lodash/fp/placeholder.js\");\n\n/** Built-in value reference. */\nvar push = Array.prototype.push;\n\n/**\n * Creates a function, with an arity of `n`, that invokes `func` with the\n * arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} n The arity of the new function.\n * @returns {Function} Returns the new function.\n */\nfunction baseArity(func, n) {\n return n == 2\n ? function(a, b) { return func.apply(undefined, arguments); }\n : function(a) { return func.apply(undefined, arguments); };\n}\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments, ignoring\n * any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\nfunction baseAry(func, n) {\n return n == 2\n ? function(a, b) { return func(a, b); }\n : function(a) { return func(a); };\n}\n\n/**\n * Creates a clone of `array`.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the cloned array.\n */\nfunction cloneArray(array) {\n var length = array ? array.length : 0,\n result = Array(length);\n\n while (length--) {\n result[length] = array[length];\n }\n return result;\n}\n\n/**\n * Creates a function that clones a given object using the assignment `func`.\n *\n * @private\n * @param {Function} func The assignment function.\n * @returns {Function} Returns the new cloner function.\n */\nfunction createCloner(func) {\n return function(object) {\n return func({}, object);\n };\n}\n\n/**\n * A specialized version of `_.spread` which flattens the spread array into\n * the arguments of the invoked `func`.\n *\n * @private\n * @param {Function} func The function to spread arguments over.\n * @param {number} start The start position of the spread.\n * @returns {Function} Returns the new function.\n */\nfunction flatSpread(func, start) {\n return function() {\n var length = arguments.length,\n lastIndex = length - 1,\n args = Array(length);\n\n while (length--) {\n args[length] = arguments[length];\n }\n var array = args[start],\n otherArgs = args.slice(0, start);\n\n if (array) {\n push.apply(otherArgs, array);\n }\n if (start != lastIndex) {\n push.apply(otherArgs, args.slice(start + 1));\n }\n return func.apply(this, otherArgs);\n };\n}\n\n/**\n * Creates a function that wraps `func` and uses `cloner` to clone the first\n * argument it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} cloner The function to clone arguments.\n * @returns {Function} Returns the new immutable function.\n */\nfunction wrapImmutable(func, cloner) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return;\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var result = args[0] = cloner.apply(undefined, args);\n func.apply(undefined, args);\n return result;\n };\n}\n\n/**\n * The base implementation of `convert` which accepts a `util` object of methods\n * required to perform conversions.\n *\n * @param {Object} util The util object.\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.cap=true] Specify capping iteratee arguments.\n * @param {boolean} [options.curry=true] Specify currying.\n * @param {boolean} [options.fixed=true] Specify fixed arity.\n * @param {boolean} [options.immutable=true] Specify immutable operations.\n * @param {boolean} [options.rearg=true] Specify rearranging arguments.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction baseConvert(util, name, func, options) {\n var setPlaceholder,\n isLib = typeof name == 'function',\n isObj = name === Object(name);\n\n if (isObj) {\n options = func;\n func = name;\n name = undefined;\n }\n if (func == null) {\n throw new TypeError;\n }\n options || (options = {});\n\n var config = {\n 'cap': 'cap' in options ? options.cap : true,\n 'curry': 'curry' in options ? options.curry : true,\n 'fixed': 'fixed' in options ? options.fixed : true,\n 'immutable': 'immutable' in options ? options.immutable : true,\n 'rearg': 'rearg' in options ? options.rearg : true\n };\n\n var forceCurry = ('curry' in options) && options.curry,\n forceFixed = ('fixed' in options) && options.fixed,\n forceRearg = ('rearg' in options) && options.rearg,\n placeholder = isLib ? func : fallbackHolder,\n pristine = isLib ? func.runInContext() : undefined;\n\n var helpers = isLib ? func : {\n 'ary': util.ary,\n 'assign': util.assign,\n 'clone': util.clone,\n 'curry': util.curry,\n 'forEach': util.forEach,\n 'isArray': util.isArray,\n 'isFunction': util.isFunction,\n 'iteratee': util.iteratee,\n 'keys': util.keys,\n 'rearg': util.rearg,\n 'toInteger': util.toInteger,\n 'toPath': util.toPath\n };\n\n var ary = helpers.ary,\n assign = helpers.assign,\n clone = helpers.clone,\n curry = helpers.curry,\n each = helpers.forEach,\n isArray = helpers.isArray,\n isFunction = helpers.isFunction,\n keys = helpers.keys,\n rearg = helpers.rearg,\n toInteger = helpers.toInteger,\n toPath = helpers.toPath;\n\n var aryMethodKeys = keys(mapping.aryMethod);\n\n var wrappers = {\n 'castArray': function(castArray) {\n return function() {\n var value = arguments[0];\n return isArray(value)\n ? castArray(cloneArray(value))\n : castArray.apply(undefined, arguments);\n };\n },\n 'iteratee': function(iteratee) {\n return function() {\n var func = arguments[0],\n arity = arguments[1],\n result = iteratee(func, arity),\n length = result.length;\n\n if (config.cap && typeof arity == 'number') {\n arity = arity > 2 ? (arity - 2) : 1;\n return (length && length <= arity) ? result : baseAry(result, arity);\n }\n return result;\n };\n },\n 'mixin': function(mixin) {\n return function(source) {\n var func = this;\n if (!isFunction(func)) {\n return mixin(func, Object(source));\n }\n var pairs = [];\n each(keys(source), function(key) {\n if (isFunction(source[key])) {\n pairs.push([key, func.prototype[key]]);\n }\n });\n\n mixin(func, Object(source));\n\n each(pairs, function(pair) {\n var value = pair[1];\n if (isFunction(value)) {\n func.prototype[pair[0]] = value;\n } else {\n delete func.prototype[pair[0]];\n }\n });\n return func;\n };\n },\n 'nthArg': function(nthArg) {\n return function(n) {\n var arity = n < 0 ? 1 : (toInteger(n) + 1);\n return curry(nthArg(n), arity);\n };\n },\n 'rearg': function(rearg) {\n return function(func, indexes) {\n var arity = indexes ? indexes.length : 0;\n return curry(rearg(func, indexes), arity);\n };\n },\n 'runInContext': function(runInContext) {\n return function(context) {\n return baseConvert(util, runInContext(context), options);\n };\n }\n };\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Casts `func` to a function with an arity capped iteratee if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @returns {Function} Returns the cast function.\n */\n function castCap(name, func) {\n if (config.cap) {\n var indexes = mapping.iterateeRearg[name];\n if (indexes) {\n return iterateeRearg(func, indexes);\n }\n var n = !isLib && mapping.iterateeAry[name];\n if (n) {\n return iterateeAry(func, n);\n }\n }\n return func;\n }\n\n /**\n * Casts `func` to a curried function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castCurry(name, func, n) {\n return (forceCurry || (config.curry && n > 1))\n ? curry(func, n)\n : func;\n }\n\n /**\n * Casts `func` to a fixed arity function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the cast function.\n */\n function castFixed(name, func, n) {\n if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {\n var data = mapping.methodSpread[name],\n start = data && data.start;\n\n return start === undefined ? ary(func, n) : flatSpread(func, start);\n }\n return func;\n }\n\n /**\n * Casts `func` to an rearged function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castRearg(name, func, n) {\n return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))\n ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])\n : func;\n }\n\n /**\n * Creates a clone of `object` by `path`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {Array|string} path The path to clone by.\n * @returns {Object} Returns the cloned object.\n */\n function cloneByPath(object, path) {\n path = toPath(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n result = clone(Object(object)),\n nested = result;\n\n while (nested != null && ++index < length) {\n var key = path[index],\n value = nested[key];\n\n if (value != null) {\n nested[path[index]] = clone(index == lastIndex ? value : Object(value));\n }\n nested = nested[key];\n }\n return result;\n }\n\n /**\n * Converts `lodash` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied.\n *\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function} Returns the converted `lodash`.\n */\n function convertLib(options) {\n return _.runInContext.convert(options)(undefined);\n }\n\n /**\n * Create a converter function for `func` of `name`.\n *\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @returns {Function} Returns the new converter function.\n */\n function createConverter(name, func) {\n var realName = mapping.aliasToReal[name] || name,\n methodName = mapping.remap[realName] || realName,\n oldOptions = options;\n\n return function(options) {\n var newUtil = isLib ? pristine : helpers,\n newFunc = isLib ? pristine[methodName] : func,\n newOptions = assign(assign({}, oldOptions), options);\n\n return baseConvert(newUtil, realName, newFunc, newOptions);\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee, with up to `n`\n * arguments, ignoring any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap iteratee arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\n function iterateeAry(func, n) {\n return overArg(func, function(func) {\n return typeof func == 'function' ? baseAry(func, n) : func;\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee with arguments\n * arranged according to the specified `indexes` where the argument value at\n * the first index is provided as the first argument, the argument value at\n * the second index is provided as the second argument, and so on.\n *\n * @private\n * @param {Function} func The function to rearrange iteratee arguments for.\n * @param {number[]} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n */\n function iterateeRearg(func, indexes) {\n return overArg(func, function(func) {\n var n = indexes.length;\n return baseArity(rearg(baseAry(func, n), indexes), n);\n });\n }\n\n /**\n * Creates a function that invokes `func` with its first argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return func();\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var index = config.rearg ? 0 : (length - 1);\n args[index] = transform(args[index]);\n return func.apply(undefined, args);\n };\n }\n\n /**\n * Creates a function that wraps `func` and applys the conversions\n * rules by `name`.\n *\n * @private\n * @param {string} name The name of the function to wrap.\n * @param {Function} func The function to wrap.\n * @returns {Function} Returns the converted function.\n */\n function wrap(name, func) {\n var result,\n realName = mapping.aliasToReal[name] || name,\n wrapped = func,\n wrapper = wrappers[realName];\n\n if (wrapper) {\n wrapped = wrapper(func);\n }\n else if (config.immutable) {\n if (mapping.mutate.array[realName]) {\n wrapped = wrapImmutable(func, cloneArray);\n }\n else if (mapping.mutate.object[realName]) {\n wrapped = wrapImmutable(func, createCloner(func));\n }\n else if (mapping.mutate.set[realName]) {\n wrapped = wrapImmutable(func, cloneByPath);\n }\n }\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(otherName) {\n if (realName == otherName) {\n var data = mapping.methodSpread[realName],\n afterRearg = data && data.afterRearg;\n\n result = afterRearg\n ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)\n : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);\n\n result = castCap(realName, result);\n result = castCurry(realName, result, aryKey);\n return false;\n }\n });\n return !result;\n });\n\n result || (result = wrapped);\n if (result == func) {\n result = forceCurry ? curry(result, 1) : function() {\n return func.apply(this, arguments);\n };\n }\n result.convert = createConverter(realName, func);\n if (mapping.placeholder[realName]) {\n setPlaceholder = true;\n result.placeholder = func.placeholder = placeholder;\n }\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n if (!isObj) {\n return wrap(name, func);\n }\n var _ = func;\n\n // Convert methods by ary cap.\n var pairs = [];\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(key) {\n var func = _[mapping.remap[key] || key];\n if (func) {\n pairs.push([key, wrap(key, func)]);\n }\n });\n });\n\n // Convert remaining methods.\n each(keys(_), function(key) {\n var func = _[key];\n if (typeof func == 'function') {\n var length = pairs.length;\n while (length--) {\n if (pairs[length][0] == key) {\n return;\n }\n }\n func.convert = createConverter(key, func);\n pairs.push([key, func]);\n }\n });\n\n // Assign to `_` leaving `_.prototype` unchanged to allow chaining.\n each(pairs, function(pair) {\n _[pair[0]] = pair[1];\n });\n\n _.convert = convertLib;\n if (setPlaceholder) {\n _.placeholder = placeholder;\n }\n // Assign aliases.\n each(keys(_), function(key) {\n each(mapping.realToAlias[key] || [], function(alias) {\n _[alias] = _[key];\n });\n });\n\n return _;\n}\n\nmodule.exports = baseConvert;\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbG9kYXNoL2ZwL19iYXNlQ29udmVydC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8uL34vbG9kYXNoL2ZwL19iYXNlQ29udmVydC5qcz8zMmU3Il0sInNvdXJjZXNDb250ZW50IjpbInZhciBtYXBwaW5nID0gcmVxdWlyZSgnLi9fbWFwcGluZycpLFxuICAgIGZhbGxiYWNrSG9sZGVyID0gcmVxdWlyZSgnLi9wbGFjZWhvbGRlcicpO1xuXG4vKiogQnVpbHQtaW4gdmFsdWUgcmVmZXJlbmNlLiAqL1xudmFyIHB1c2ggPSBBcnJheS5wcm90b3R5cGUucHVzaDtcblxuLyoqXG4gKiBDcmVhdGVzIGEgZnVuY3Rpb24sIHdpdGggYW4gYXJpdHkgb2YgYG5gLCB0aGF0IGludm9rZXMgYGZ1bmNgIHdpdGggdGhlXG4gKiBhcmd1bWVudHMgaXQgcmVjZWl2ZXMuXG4gKlxuICogQHByaXZhdGVcbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIHdyYXAuXG4gKiBAcGFyYW0ge251bW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7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==");
/***/ }),
/***/ "./node_modules/lodash/fp/_mapping.js":
+/* no static exports found */
+/* all exports used */
+/*!*********************************!*\
+ !*** ./~/lodash/fp/_mapping.js ***!
+ \*********************************/
/***/ (function(module, exports) {
-/** Used to map aliases to their real names. */
-exports.aliasToReal = {
-
- // Lodash aliases.
- 'each': 'forEach',
- 'eachRight': 'forEachRight',
- 'entries': 'toPairs',
- 'entriesIn': 'toPairsIn',
- 'extend': 'assignIn',
- 'extendAll': 'assignInAll',
- 'extendAllWith': 'assignInAllWith',
- 'extendWith': 'assignInWith',
- 'first': 'head',
-
- // Methods that are curried variants of others.
- 'conforms': 'conformsTo',
- 'matches': 'isMatch',
- 'property': 'get',
-
- // Ramda aliases.
- '__': 'placeholder',
- 'F': 'stubFalse',
- 'T': 'stubTrue',
- 'all': 'every',
- 'allPass': 'overEvery',
- 'always': 'constant',
- 'any': 'some',
- 'anyPass': 'overSome',
- 'apply': 'spread',
- 'assoc': 'set',
- 'assocPath': 'set',
- 'complement': 'negate',
- 'compose': 'flowRight',
- 'contains': 'includes',
- 'dissoc': 'unset',
- 'dissocPath': 'unset',
- 'dropLast': 'dropRight',
- 'dropLastWhile': 'dropRightWhile',
- 'equals': 'isEqual',
- 'identical': 'eq',
- 'indexBy': 'keyBy',
- 'init': 'initial',
- 'invertObj': 'invert',
- 'juxt': 'over',
- 'omitAll': 'omit',
- 'nAry': 'ary',
- 'path': 'get',
- 'pathEq': 'matchesProperty',
- 'pathOr': 'getOr',
- 'paths': 'at',
- 'pickAll': 'pick',
- 'pipe': 'flow',
- 'pluck': 'map',
- 'prop': 'get',
- 'propEq': 'matchesProperty',
- 'propOr': 'getOr',
- 'props': 'at',
- 'symmetricDifference': 'xor',
- 'symmetricDifferenceBy': 'xorBy',
- 'symmetricDifferenceWith': 'xorWith',
- 'takeLast': 'takeRight',
- 'takeLastWhile': 'takeRightWhile',
- 'unapply': 'rest',
- 'unnest': 'flatten',
- 'useWith': 'overArgs',
- 'where': 'conformsTo',
- 'whereEq': 'isMatch',
- 'zipObj': 'zipObject'
-};
-
-/** Used to map ary to method names. */
-exports.aryMethod = {
- '1': [
- 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',
- 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',
- 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',
- 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',
- 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',
- 'uniqueId', 'words', 'zipAll'
- ],
- '2': [
- 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',
- 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',
- 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',
- 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',
- 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',
- 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',
- 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',
- 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',
- 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',
- 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',
- 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',
- 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',
- 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',
- 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',
- 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',
- 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',
- 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',
- 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',
- 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',
- 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',
- 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',
- 'zipObjectDeep'
- ],
- '3': [
- 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',
- 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',
- 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',
- 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',
- 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',
- 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',
- 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',
- 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',
- 'xorWith', 'zipWith'
- ],
- '4': [
- 'fill', 'setWith', 'updateWith'
- ]
-};
-
-/** Used to map ary to rearg configs. */
-exports.aryRearg = {
- '2': [1, 0],
- '3': [2, 0, 1],
- '4': [3, 2, 0, 1]
-};
-
-/** Used to map method names to their iteratee ary. */
-exports.iterateeAry = {
- 'dropRightWhile': 1,
- 'dropWhile': 1,
- 'every': 1,
- 'filter': 1,
- 'find': 1,
- 'findFrom': 1,
- 'findIndex': 1,
- 'findIndexFrom': 1,
- 'findKey': 1,
- 'findLast': 1,
- 'findLastFrom': 1,
- 'findLastIndex': 1,
- 'findLastIndexFrom': 1,
- 'findLastKey': 1,
- 'flatMap': 1,
- 'flatMapDeep': 1,
- 'flatMapDepth': 1,
- 'forEach': 1,
- 'forEachRight': 1,
- 'forIn': 1,
- 'forInRight': 1,
- 'forOwn': 1,
- 'forOwnRight': 1,
- 'map': 1,
- 'mapKeys': 1,
- 'mapValues': 1,
- 'partition': 1,
- 'reduce': 2,
- 'reduceRight': 2,
- 'reject': 1,
- 'remove': 1,
- 'some': 1,
- 'takeRightWhile': 1,
- 'takeWhile': 1,
- 'times': 1,
- 'transform': 2
-};
-
-/** Used to map method names to iteratee rearg configs. */
-exports.iterateeRearg = {
- 'mapKeys': [1],
- 'reduceRight': [1, 0]
-};
-
-/** Used to map method names to rearg configs. */
-exports.methodRearg = {
- 'assignInAllWith': [1, 0],
- 'assignInWith': [1, 2, 0],
- 'assignAllWith': [1, 0],
- 'assignWith': [1, 2, 0],
- 'differenceBy': [1, 2, 0],
- 'differenceWith': [1, 2, 0],
- 'getOr': [2, 1, 0],
- 'intersectionBy': [1, 2, 0],
- 'intersectionWith': [1, 2, 0],
- 'isEqualWith': [1, 2, 0],
- 'isMatchWith': [2, 1, 0],
- 'mergeAllWith': [1, 0],
- 'mergeWith': [1, 2, 0],
- 'padChars': [2, 1, 0],
- 'padCharsEnd': [2, 1, 0],
- 'padCharsStart': [2, 1, 0],
- 'pullAllBy': [2, 1, 0],
- 'pullAllWith': [2, 1, 0],
- 'rangeStep': [1, 2, 0],
- 'rangeStepRight': [1, 2, 0],
- 'setWith': [3, 1, 2, 0],
- 'sortedIndexBy': [2, 1, 0],
- 'sortedLastIndexBy': [2, 1, 0],
- 'unionBy': [1, 2, 0],
- 'unionWith': [1, 2, 0],
- 'updateWith': [3, 1, 2, 0],
- 'xorBy': [1, 2, 0],
- 'xorWith': [1, 2, 0],
- 'zipWith': [1, 2, 0]
-};
-
-/** Used to map method names to spread configs. */
-exports.methodSpread = {
- 'assignAll': { 'start': 0 },
- 'assignAllWith': { 'start': 0 },
- 'assignInAll': { 'start': 0 },
- 'assignInAllWith': { 'start': 0 },
- 'defaultsAll': { 'start': 0 },
- 'defaultsDeepAll': { 'start': 0 },
- 'invokeArgs': { 'start': 2 },
- 'invokeArgsMap': { 'start': 2 },
- 'mergeAll': { 'start': 0 },
- 'mergeAllWith': { 'start': 0 },
- 'partial': { 'start': 1 },
- 'partialRight': { 'start': 1 },
- 'without': { 'start': 1 },
- 'zipAll': { 'start': 0 }
-};
-
-/** Used to identify methods which mutate arrays or objects. */
-exports.mutate = {
- 'array': {
- 'fill': true,
- 'pull': true,
- 'pullAll': true,
- 'pullAllBy': true,
- 'pullAllWith': true,
- 'pullAt': true,
- 'remove': true,
- 'reverse': true
- },
- 'object': {
- 'assign': true,
- 'assignAll': true,
- 'assignAllWith': true,
- 'assignIn': true,
- 'assignInAll': true,
- 'assignInAllWith': true,
- 'assignInWith': true,
- 'assignWith': true,
- 'defaults': true,
- 'defaultsAll': true,
- 'defaultsDeep': true,
- 'defaultsDeepAll': true,
- 'merge': true,
- 'mergeAll': true,
- 'mergeAllWith': true,
- 'mergeWith': true,
- },
- 'set': {
- 'set': true,
- 'setWith': true,
- 'unset': true,
- 'update': true,
- 'updateWith': true
- }
-};
-
-/** Used to track methods with placeholder support */
-exports.placeholder = {
- 'bind': true,
- 'bindKey': true,
- 'curry': true,
- 'curryRight': true,
- 'partial': true,
- 'partialRight': true
-};
-
-/** Used to map real names to their aliases. */
-exports.realToAlias = (function() {
- var hasOwnProperty = Object.prototype.hasOwnProperty,
- object = exports.aliasToReal,
- result = {};
-
- for (var key in object) {
- var value = object[key];
- if (hasOwnProperty.call(result, value)) {
- result[value].push(key);
- } else {
- result[value] = [key];
- }
- }
- return result;
-}());
-
-/** Used to map method names to other names. */
-exports.remap = {
- 'assignAll': 'assign',
- 'assignAllWith': 'assignWith',
- 'assignInAll': 'assignIn',
- 'assignInAllWith': 'assignInWith',
- 'curryN': 'curry',
- 'curryRightN': 'curryRight',
- 'defaultsAll': 'defaults',
- 'defaultsDeepAll': 'defaultsDeep',
- 'findFrom': 'find',
- 'findIndexFrom': 'findIndex',
- 'findLastFrom': 'findLast',
- 'findLastIndexFrom': 'findLastIndex',
- 'getOr': 'get',
- 'includesFrom': 'includes',
- 'indexOfFrom': 'indexOf',
- 'invokeArgs': 'invoke',
- 'invokeArgsMap': 'invokeMap',
- 'lastIndexOfFrom': 'lastIndexOf',
- 'mergeAll': 'merge',
- 'mergeAllWith': 'mergeWith',
- 'padChars': 'pad',
- 'padCharsEnd': 'padEnd',
- 'padCharsStart': 'padStart',
- 'propertyOf': 'get',
- 'rangeStep': 'range',
- 'rangeStepRight': 'rangeRight',
- 'restFrom': 'rest',
- 'spreadFrom': 'spread',
- 'trimChars': 'trim',
- 'trimCharsEnd': 'trimEnd',
- 'trimCharsStart': 'trimStart',
- 'zipAll': 'zip'
-};
-
-/** Used to track methods that skip fixing their arity. */
-exports.skipFixed = {
- 'castArray': true,
- 'flow': true,
- 'flowRight': true,
- 'iteratee': true,
- 'mixin': true,
- 'rearg': true,
- 'runInContext': true
-};
-
-/** Used to track methods that skip rearranging arguments. */
-exports.skipRearg = {
- 'add': true,
- 'assign': true,
- 'assignIn': true,
- 'bind': true,
- 'bindKey': true,
- 'concat': true,
- 'difference': true,
- 'divide': true,
- 'eq': true,
- 'gt': true,
- 'gte': true,
- 'isEqual': true,
- 'lt': true,
- 'lte': true,
- 'matchesProperty': true,
- 'merge': true,
- 'multiply': true,
- 'overArgs': true,
- 'partial': true,
- 'partialRight': true,
- 'propertyOf': true,
- 'random': true,
- 'range': true,
- 'rangeRight': true,
- 'subtract': true,
- 'zip': true,
- 'zipObject': true,
- 'zipObjectDeep': true
-};
-
+eval("/** Used to map aliases to their real names. */\nexports.aliasToReal = {\n\n // Lodash aliases.\n 'each': 'forEach',\n 'eachRight': 'forEachRight',\n 'entries': 'toPairs',\n 'entriesIn': 'toPairsIn',\n 'extend': 'assignIn',\n 'extendAll': 'assignInAll',\n 'extendAllWith': 'assignInAllWith',\n 'extendWith': 'assignInWith',\n 'first': 'head',\n\n // Methods that are curried variants of others.\n 'conforms': 'conformsTo',\n 'matches': 'isMatch',\n 'property': 'get',\n\n // Ramda aliases.\n '__': 'placeholder',\n 'F': 'stubFalse',\n 'T': 'stubTrue',\n 'all': 'every',\n 'allPass': 'overEvery',\n 'always': 'constant',\n 'any': 'some',\n 'anyPass': 'overSome',\n 'apply': 'spread',\n 'assoc': 'set',\n 'assocPath': 'set',\n 'complement': 'negate',\n 'compose': 'flowRight',\n 'contains': 'includes',\n 'dissoc': 'unset',\n 'dissocPath': 'unset',\n 'dropLast': 'dropRight',\n 'dropLastWhile': 'dropRightWhile',\n 'equals': 'isEqual',\n 'identical': 'eq',\n 'indexBy': 'keyBy',\n 'init': 'initial',\n 'invertObj': 'invert',\n 'juxt': 'over',\n 'omitAll': 'omit',\n 'nAry': 'ary',\n 'path': 'get',\n 'pathEq': 'matchesProperty',\n 'pathOr': 'getOr',\n 'paths': 'at',\n 'pickAll': 'pick',\n 'pipe': 'flow',\n 'pluck': 'map',\n 'prop': 'get',\n 'propEq': 'matchesProperty',\n 'propOr': 'getOr',\n 'props': 'at',\n 'symmetricDifference': 'xor',\n 'symmetricDifferenceBy': 'xorBy',\n 'symmetricDifferenceWith': 'xorWith',\n 'takeLast': 'takeRight',\n 'takeLastWhile': 'takeRightWhile',\n 'unapply': 'rest',\n 'unnest': 'flatten',\n 'useWith': 'overArgs',\n 'where': 'conformsTo',\n 'whereEq': 'isMatch',\n 'zipObj': 'zipObject'\n};\n\n/** Used to map ary to method names. */\nexports.aryMethod = {\n '1': [\n 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',\n 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',\n 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',\n 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',\n 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',\n 'uniqueId', 'words', 'zipAll'\n ],\n '2': [\n 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',\n 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',\n 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',\n 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',\n 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',\n 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',\n 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',\n 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',\n 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',\n 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',\n 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',\n 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',\n 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',\n 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',\n 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',\n 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',\n 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',\n 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',\n 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',\n 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',\n 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',\n 'zipObjectDeep'\n ],\n '3': [\n 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',\n 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',\n 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',\n 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',\n 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',\n 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',\n 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',\n 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',\n 'xorWith', 'zipWith'\n ],\n '4': [\n 'fill', 'setWith', 'updateWith'\n ]\n};\n\n/** Used to map ary to rearg configs. */\nexports.aryRearg = {\n '2': [1, 0],\n '3': [2, 0, 1],\n '4': [3, 2, 0, 1]\n};\n\n/** Used to map method names to their iteratee ary. */\nexports.iterateeAry = {\n 'dropRightWhile': 1,\n 'dropWhile': 1,\n 'every': 1,\n 'filter': 1,\n 'find': 1,\n 'findFrom': 1,\n 'findIndex': 1,\n 'findIndexFrom': 1,\n 'findKey': 1,\n 'findLast': 1,\n 'findLastFrom': 1,\n 'findLastIndex': 1,\n 'findLastIndexFrom': 1,\n 'findLastKey': 1,\n 'flatMap': 1,\n 'flatMapDeep': 1,\n 'flatMapDepth': 1,\n 'forEach': 1,\n 'forEachRight': 1,\n 'forIn': 1,\n 'forInRight': 1,\n 'forOwn': 1,\n 'forOwnRight': 1,\n 'map': 1,\n 'mapKeys': 1,\n 'mapValues': 1,\n 'partition': 1,\n 'reduce': 2,\n 'reduceRight': 2,\n 'reject': 1,\n 'remove': 1,\n 'some': 1,\n 'takeRightWhile': 1,\n 'takeWhile': 1,\n 'times': 1,\n 'transform': 2\n};\n\n/** Used to map method names to iteratee rearg configs. */\nexports.iterateeRearg = {\n 'mapKeys': [1],\n 'reduceRight': [1, 0]\n};\n\n/** Used to map method names to rearg configs. */\nexports.methodRearg = {\n 'assignInAllWith': [1, 0],\n 'assignInWith': [1, 2, 0],\n 'assignAllWith': [1, 0],\n 'assignWith': [1, 2, 0],\n 'differenceBy': [1, 2, 0],\n 'differenceWith': [1, 2, 0],\n 'getOr': [2, 1, 0],\n 'intersectionBy': [1, 2, 0],\n 'intersectionWith': [1, 2, 0],\n 'isEqualWith': [1, 2, 0],\n 'isMatchWith': [2, 1, 0],\n 'mergeAllWith': [1, 0],\n 'mergeWith': [1, 2, 0],\n 'padChars': [2, 1, 0],\n 'padCharsEnd': [2, 1, 0],\n 'padCharsStart': [2, 1, 0],\n 'pullAllBy': [2, 1, 0],\n 'pullAllWith': [2, 1, 0],\n 'rangeStep': [1, 2, 0],\n 'rangeStepRight': [1, 2, 0],\n 'setWith': [3, 1, 2, 0],\n 'sortedIndexBy': [2, 1, 0],\n 'sortedLastIndexBy': [2, 1, 0],\n 'unionBy': [1, 2, 0],\n 'unionWith': [1, 2, 0],\n 'updateWith': [3, 1, 2, 0],\n 'xorBy': [1, 2, 0],\n 'xorWith': [1, 2, 0],\n 'zipWith': [1, 2, 0]\n};\n\n/** Used to map method names to spread configs. */\nexports.methodSpread = {\n 'assignAll': { 'start': 0 },\n 'assignAllWith': { 'start': 0 },\n 'assignInAll': { 'start': 0 },\n 'assignInAllWith': { 'start': 0 },\n 'defaultsAll': { 'start': 0 },\n 'defaultsDeepAll': { 'start': 0 },\n 'invokeArgs': { 'start': 2 },\n 'invokeArgsMap': { 'start': 2 },\n 'mergeAll': { 'start': 0 },\n 'mergeAllWith': { 'start': 0 },\n 'partial': { 'start': 1 },\n 'partialRight': { 'start': 1 },\n 'without': { 'start': 1 },\n 'zipAll': { 'start': 0 }\n};\n\n/** Used to identify methods which mutate arrays or objects. */\nexports.mutate = {\n 'array': {\n 'fill': true,\n 'pull': true,\n 'pullAll': true,\n 'pullAllBy': true,\n 'pullAllWith': true,\n 'pullAt': true,\n 'remove': true,\n 'reverse': true\n },\n 'object': {\n 'assign': true,\n 'assignAll': true,\n 'assignAllWith': true,\n 'assignIn': true,\n 'assignInAll': true,\n 'assignInAllWith': true,\n 'assignInWith': true,\n 'assignWith': true,\n 'defaults': true,\n 'defaultsAll': true,\n 'defaultsDeep': true,\n 'defaultsDeepAll': true,\n 'merge': true,\n 'mergeAll': true,\n 'mergeAllWith': true,\n 'mergeWith': true,\n },\n 'set': {\n 'set': true,\n 'setWith': true,\n 'unset': true,\n 'update': true,\n 'updateWith': true\n }\n};\n\n/** Used to track methods with placeholder support */\nexports.placeholder = {\n 'bind': true,\n 'bindKey': true,\n 'curry': true,\n 'curryRight': true,\n 'partial': true,\n 'partialRight': true\n};\n\n/** Used to map real names to their aliases. */\nexports.realToAlias = (function() {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n object = exports.aliasToReal,\n result = {};\n\n for (var key in object) {\n var value = object[key];\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }\n return result;\n}());\n\n/** Used to map method names to other names. */\nexports.remap = {\n 'assignAll': 'assign',\n 'assignAllWith': 'assignWith',\n 'assignInAll': 'assignIn',\n 'assignInAllWith': 'assignInWith',\n 'curryN': 'curry',\n 'curryRightN': 'curryRight',\n 'defaultsAll': 'defaults',\n 'defaultsDeepAll': 'defaultsDeep',\n 'findFrom': 'find',\n 'findIndexFrom': 'findIndex',\n 'findLastFrom': 'findLast',\n 'findLastIndexFrom': 'findLastIndex',\n 'getOr': 'get',\n 'includesFrom': 'includes',\n 'indexOfFrom': 'indexOf',\n 'invokeArgs': 'invoke',\n 'invokeArgsMap': 'invokeMap',\n 'lastIndexOfFrom': 'lastIndexOf',\n 'mergeAll': 'merge',\n 'mergeAllWith': 'mergeWith',\n 'padChars': 'pad',\n 'padCharsEnd': 'padEnd',\n 'padCharsStart': 'padStart',\n 'propertyOf': 'get',\n 'rangeStep': 'range',\n 'rangeStepRight': 'rangeRight',\n 'restFrom': 'rest',\n 'spreadFrom': 'spread',\n 'trimChars': 'trim',\n 'trimCharsEnd': 'trimEnd',\n 'trimCharsStart': 'trimStart',\n 'zipAll': 'zip'\n};\n\n/** Used to track methods that skip fixing their arity. */\nexports.skipFixed = {\n 'castArray': true,\n 'flow': true,\n 'flowRight': true,\n 'iteratee': true,\n 'mixin': true,\n 'rearg': true,\n 'runInContext': true\n};\n\n/** Used to track methods that skip rearranging arguments. */\nexports.skipRearg = {\n 'add': true,\n 'assign': true,\n 'assignIn': true,\n 'bind': true,\n 'bindKey': true,\n 'concat': true,\n 'difference': true,\n 'divide': true,\n 'eq': true,\n 'gt': true,\n 'gte': true,\n 'isEqual': true,\n 'lt': true,\n 'lte': true,\n 'matchesProperty': true,\n 'merge': true,\n 'multiply': true,\n 'overArgs': true,\n 'partial': true,\n 'partialRight': true,\n 'propertyOf': true,\n 'random': true,\n 'range': true,\n 'rangeRight': true,\n 'subtract': true,\n 'zip': true,\n 'zipObject': true,\n 'zipObjectDeep': true\n};\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbG9kYXNoL2ZwL19tYXBwaW5nLmpzLmpzIiwic291cmNlcyI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ports used */
+/*!************************************!*\
+ !*** ./~/lodash/fp/placeholder.js ***!
+ \************************************/
/***/ (function(module, exports) {
-/**
- * The default argument placeholder value for methods.
- *
- * @type {Object}
- */
-module.exports = {};
-
+eval("/**\n * The default argument placeholder value for methods.\n *\n * @type {Object}\n */\nmodule.exports = {};\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvbG9kYXNoL2ZwL3BsYWNlaG9sZGVyLmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vLy4vfi9sb2Rhc2gvZnAvcGxhY2Vob2xkZXIuanM/MTkxZCJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFRoZSBkZWZhdWx0IGFyZ3VtZW50IHBsYWNlaG9sZGVyIHZhbHVlIGZvciBtZXRob2RzLlxuICpcbiAqIEB0eXBlIHtPYmplY3R9XG4gKi9cbm1vZHVsZS5leHBvcnRzID0ge307XG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAuL34vbG9kYXNoL2ZwL3BsYWNlaG9sZGVyLmpzXG4vLyBtb2R1bGUgaWQgPSAuL25vZGVfbW9kdWxlcy9sb2Rhc2gvZnAvcGxhY2Vob2xkZXIuanNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/***/ "./node_modules/lodash/lodash.min.js":
+/* no static exports found */
+/* all exports used */
+/*!********************************!*\
+ !*** ./~/lodash/lodash.min.js ***!
+ \********************************/
/***/ (function(module, exports, __webpack_require__) {
-/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
- * @license
- * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE
- */
-;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,nn=/<%=([\s\S]+?)%>/g,tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rn=/^\w*$/,en=/^\./,un=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,on=/[\\^$.*+?()[\]{}|]/g,fn=RegExp(on.source),cn=/^\s+|\s+$/g,an=/^\s+/,ln=/\s+$/,sn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,hn=/\{\n\/\* \[wrapped with (.+)\] \*/,pn=/,? & /,_n=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vn=/\\(\\)?/g,gn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\d*)$/,mn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,An=/($^)/,kn=/['\n\r\u2028\u2029\\]/g,En="[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?(?:\\u200d(?:[^\\ud800-\\udfff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])[\\ufe0e\\ufe0f]?(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?)*",On="(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff])"+En,Sn="(?:[^\\ud800-\\udfff][\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]?|[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff])",In=RegExp("['\u2019]","g"),Rn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),zn=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+Sn+En,"g"),Wn=RegExp(["[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+(?:['\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde]|$)|(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000]|[A-Z\\xc0-\\xd6\\xd8-\\xde](?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])|$)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?(?:[a-z\\xdf-\\xf6\\xf8-\\xff]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?:['\u2019](?:D|LL|M|RE|S|T|VE))?|\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)|\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)|\\d+",On].join("|"),"g"),Bn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un="Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout".split(" "),Cn={};
-Cn["[object Float32Array]"]=Cn["[object Float64Array]"]=Cn["[object Int8Array]"]=Cn["[object Int16Array]"]=Cn["[object Int32Array]"]=Cn["[object Uint8Array]"]=Cn["[object Uint8ClampedArray]"]=Cn["[object Uint16Array]"]=Cn["[object Uint32Array]"]=true,Cn["[object Arguments]"]=Cn["[object Array]"]=Cn["[object ArrayBuffer]"]=Cn["[object Boolean]"]=Cn["[object DataView]"]=Cn["[object Date]"]=Cn["[object Error]"]=Cn["[object Function]"]=Cn["[object Map]"]=Cn["[object Number]"]=Cn["[object Object]"]=Cn["[object RegExp]"]=Cn["[object Set]"]=Cn["[object String]"]=Cn["[object WeakMap]"]=false;
-var Dn={};Dn["[object Arguments]"]=Dn["[object Array]"]=Dn["[object ArrayBuffer]"]=Dn["[object DataView]"]=Dn["[object Boolean]"]=Dn["[object Date]"]=Dn["[object Float32Array]"]=Dn["[object Float64Array]"]=Dn["[object Int8Array]"]=Dn["[object Int16Array]"]=Dn["[object Int32Array]"]=Dn["[object Map]"]=Dn["[object Number]"]=Dn["[object Object]"]=Dn["[object RegExp]"]=Dn["[object Set]"]=Dn["[object String]"]=Dn["[object Symbol]"]=Dn["[object Uint8Array]"]=Dn["[object Uint8ClampedArray]"]=Dn["[object Uint16Array]"]=Dn["[object Uint32Array]"]=true,
-Dn["[object Error]"]=Dn["[object Function]"]=Dn["[object WeakMap]"]=false;var Mn,Tn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},$n=parseFloat,Fn=parseInt,Nn=typeof global=="object"&&global&&global.Object===Object&&global,Pn=typeof self=="object"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function("return this")(),qn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module=="object"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;
-n:{try{Mn=Gn&&Gn.binding&&Gn.binding("util");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j("length"),rt=w({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I",
-"\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C",
-"\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i",
-"\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S",
-"\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe",
-"\u0149":"'n","\u017f":"s"}),et=w({"&":"&","<":"<",">":">",'"':""","'":"'"}),ut=w({"&":"&","<":"<",">":">",""":'"',"'":"'"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,"__wrapped__"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,
-this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h="[object Function]"==s||"[object GeneratorFunction]"==s;if(sf(n))return Wr(n,c);if("[object Object]"==s||"[object Arguments]"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),
-i=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!="function")throw new ei("Expected a function");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;
-if(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++ut}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&"[object Arguments]"==zt(n)}function Tt(n){return xu(n)&&"[object ArrayBuffer]"==zt(n)}function $t(n){return xu(n)&&"[object Date]"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{
-var i=af(n),o=af(t),f=i?"[object Array]":yo(n),c=o?"[object Array]":yo(t),f="[object Arguments]"==f?"[object Object]":f,c="[object Arguments]"==c?"[object Object]":c,a="[object Object]"==f,o="[object Object]"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,"__wrapped__"),f=o&&ci.call(t,"__wrapped__"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),
-i=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*("desc"==r[e]?-1:1);
-break n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e=u){for(;e>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:ot.length?n:It(n,vr(t,0,-1)),
-null==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){
-if(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?F:i,u=1),t=ni(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,or?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(""):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],"__lodash_placeholder__"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],"__lodash_placeholder__"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],
-r=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;
-for(i.set(n,t),i.set(t,n);++cr&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),
-g(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){
-return r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!="function")throw new ei("Expected a function");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),
-r}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,
-a=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!="function")throw new ei("Expected a function");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g="maxWait"in r)?Di(Iu(r.maxWait)||0,t):l,d="trailing"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),
-r.cache=i.set(u,e)||i,e)}if(typeof n!="function"||null!=t&&typeof t!="function")throw new ei("Expected a function");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!="function")throw new ei("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);
-}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return"[object Error]"==t||"[object DOMException]"==t||typeof n.message=="string"&&typeof n.name=="string"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n)}function du(n){return typeof n=="number"&&n==Ou(n)}function yu(n){return typeof n=="number"&&-1=n}function bu(n){var t=typeof n;return null!=n&&("object"==t||"function"==t);
-}function xu(n){return null!=n&&typeof n=="object"}function ju(n){return typeof n=="number"||xu(n)&&"[object Number]"==zt(n)}function wu(n){return!(!xu(n)||"[object Object]"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,"constructor")&&n.constructor,typeof n=="function"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n=="string"||!af(n)&&xu(n)&&"[object String]"==zt(n)}function Au(n){return typeof n=="symbol"||xu(n)&&"[object Symbol]"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);
-if(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),("[object Map]"==t?L:"[object Set]"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n=="number")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf=="function"?n.valueOf():n,n=bu(n)?n+"":n),typeof n!="string")return 0===n?n:+n;
-n=n.replace(cn,"");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?"":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)("constructor"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){
-if(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,"")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n=="function"?n:dt(n,1))}function Zu(n,t,r){
-var e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&"chain"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){
-return false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En["__core-js_shared__"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||"");return n?"Symbol(src)_1."+n:""}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti("^"+fi.call(ci).replace(on,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){
-try{var n=Ae(ni,"defineProperty");return n({},"",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,"DataView"),Zi=Ae(En,"Map"),qi=Ae(En,"Promise"),Vi=Ae(En,"Set"),Ki=Ae(En,"WeakMap"),Gi=Ae(ni,"create"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){
-function n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:"",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],
-this.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],"__lodash_hash_undefined__"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?"__lodash_hash_undefined__":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),
---this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);
-},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){
-return this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,"toString",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){
-return Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&"[object DataView]"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&"[object Map]"!=yo(new Zi)||qi&&"[object Promise]"!=yo(qi.resolve())||Vi&&"[object Set]"!=yo(new Vi)||Ki&&"[object WeakMap]"!=yo(new Ki))&&(yo=function(n){
-var t=zt(n);if(n=(n="[object Object]"==t?n.constructor:F)?Fe(n):"")switch(n){case Yi:return"[object DataView]";case Qi:return"[object Map]";case Xi:return"[object Promise]";case no:return"[object Set]";case to:return"[object WeakMap]"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(""),n.replace(un,function(n,r,e,u){
-t.push(e?u.replace(vn,"$1"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t=="function"?t:F)&&r.pop(),
-r.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),
-Er(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t=="function"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,"callee")&&!ji.call(n,"callee")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){
-if(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){
-var r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},
-On.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));et?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!="number"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r>>0,r?(n=zu(n))&&(typeof t=="string"||null!=t&&!_f(t))&&(t=jr(t),
-!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!="function")throw new ei("Expected a function");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){
-return n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new ei("Expected a function");return bu(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,
-On.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t=="function"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);
-},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e=="function"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);
-},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t=="function"?t:F,dt(n,4,t)},
-On.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,"\\$&"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));
-},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);
-},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&"[object WeakMap]"==yo(n)},On.isWeakSet=function(n){return xu(n)&&"[object WeakSet]"==zt(n)},On.join=function(n,t){
-return null==n?"":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){
-return n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return""},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){
-n=zu(n);var e=(t=Ou(t))?T(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n("1e-"+((r+"").length-1))),t)):cr(n,t);
-},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++en||9007199254740991=i)return n;if(i=r-T(e),1>i)return e;
-if(r=o?zr(o,0,i).join(""):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+"g")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?"Right":"")}),e},Mn.prototype[n+"Right"]=function(t){
-return this.reverse()[n](t).reverse()}}),u(["filter","map","takeWhile"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u(["head","last"],function(n,t){var r="take"+(t?"Right":"");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u(["initial","tail"],function(n,t){var r="drop"+(t?"":"Right");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);
-}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n=="function"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),
-t!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);
-l&&r&&typeof a=="function"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u("pop push shift sort splice unshift".split(" "),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){
-var u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+"";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:"wrapper",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),
-n},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);
-},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}(); true?(Zn._=it, !(__WEBPACK_AMD_DEFINE_RESULT__ = function(){return it}.call(exports, __webpack_require__, exports, module),
- __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this);
-/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__("./node_modules/webpack/buildin/global.js"), __webpack_require__("./node_modules/webpack/buildin/module.js")(module)))
+eval("/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**\n * @license\n * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE\n */\n;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u\"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\\s\\S]+?)%>/g,X=/<%([\\s\\S]+?)%>/g,nn=/<%=([\\s\\S]+?)%>/g,tn=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,rn=/^\\w*$/,en=/^\\./,un=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,on=/[\\\\^$.*+?()[\\]{}|]/g,fn=RegExp(on.source),cn=/^\\s+|\\s+$/g,an=/^\\s+/,ln=/\\s+$/,sn=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,hn=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,pn=/,? & /,_n=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,vn=/\\\\(\\\\)?/g,gn=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,dn=/\\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\\[object .+?Constructor\\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\\d*)$/,mn=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,An=/($^)/,kn=/['\\n\\r\\u2028\\u2029\\\\]/g,En=\"[\\\\ufe0e\\\\ufe0f]?(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?(?:\\\\u200d(?:[^\\\\ud800-\\\\udfff]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff])[\\\\ufe0e\\\\ufe0f]?(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?)*\",On=\"(?:[\\\\u2700-\\\\u27bf]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff])\"+En,Sn=\"(?:[^\\\\ud800-\\\\udfff][\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]?|[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]|[\\\\ud800-\\\\udfff])\",In=RegExp(\"['\\u2019]\",\"g\"),Rn=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\"),zn=RegExp(\"\\\\ud83c[\\\\udffb-\\\\udfff](?=\\\\ud83c[\\\\udffb-\\\\udfff])|\"+Sn+En,\"g\"),Wn=RegExp([\"[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]?[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]+(?:['\\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000]|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]|$)|(?:[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])+(?:['\\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000]|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde](?:[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])|$)|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]?(?:[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])+(?:['\\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]+(?:['\\u2019](?:D|LL|M|RE|S|T|VE))?|\\\\d*(?:(?:1ST|2ND|3RD|(?![123])\\\\dTH)\\\\b)|\\\\d*(?:(?:1st|2nd|3rd|(?![123])\\\\dth)\\\\b)|\\\\d+\",On].join(\"|\"),\"g\"),Bn=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un=\"Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout\".split(\" \"),Cn={};\nCn[\"[object Float32Array]\"]=Cn[\"[object Float64Array]\"]=Cn[\"[object Int8Array]\"]=Cn[\"[object Int16Array]\"]=Cn[\"[object Int32Array]\"]=Cn[\"[object Uint8Array]\"]=Cn[\"[object Uint8ClampedArray]\"]=Cn[\"[object Uint16Array]\"]=Cn[\"[object Uint32Array]\"]=true,Cn[\"[object Arguments]\"]=Cn[\"[object Array]\"]=Cn[\"[object ArrayBuffer]\"]=Cn[\"[object Boolean]\"]=Cn[\"[object DataView]\"]=Cn[\"[object Date]\"]=Cn[\"[object Error]\"]=Cn[\"[object Function]\"]=Cn[\"[object Map]\"]=Cn[\"[object Number]\"]=Cn[\"[object Object]\"]=Cn[\"[object RegExp]\"]=Cn[\"[object Set]\"]=Cn[\"[object String]\"]=Cn[\"[object WeakMap]\"]=false;\nvar Dn={};Dn[\"[object Arguments]\"]=Dn[\"[object Array]\"]=Dn[\"[object ArrayBuffer]\"]=Dn[\"[object DataView]\"]=Dn[\"[object Boolean]\"]=Dn[\"[object Date]\"]=Dn[\"[object Float32Array]\"]=Dn[\"[object Float64Array]\"]=Dn[\"[object Int8Array]\"]=Dn[\"[object Int16Array]\"]=Dn[\"[object Int32Array]\"]=Dn[\"[object Map]\"]=Dn[\"[object Number]\"]=Dn[\"[object Object]\"]=Dn[\"[object RegExp]\"]=Dn[\"[object Set]\"]=Dn[\"[object String]\"]=Dn[\"[object Symbol]\"]=Dn[\"[object Uint8Array]\"]=Dn[\"[object Uint8ClampedArray]\"]=Dn[\"[object Uint16Array]\"]=Dn[\"[object Uint32Array]\"]=true,\nDn[\"[object Error]\"]=Dn[\"[object Function]\"]=Dn[\"[object WeakMap]\"]=false;var Mn,Tn={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},$n=parseFloat,Fn=parseInt,Nn=typeof global==\"object\"&&global&&global.Object===Object&&global,Pn=typeof self==\"object\"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function(\"return this\")(),qn=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module==\"object\"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;\nn:{try{Mn=Gn&&Gn.binding&&Gn.binding(\"util\");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j(\"length\"),rt=w({\"\\xc0\":\"A\",\"\\xc1\":\"A\",\"\\xc2\":\"A\",\"\\xc3\":\"A\",\"\\xc4\":\"A\",\"\\xc5\":\"A\",\"\\xe0\":\"a\",\"\\xe1\":\"a\",\"\\xe2\":\"a\",\"\\xe3\":\"a\",\"\\xe4\":\"a\",\"\\xe5\":\"a\",\"\\xc7\":\"C\",\"\\xe7\":\"c\",\"\\xd0\":\"D\",\"\\xf0\":\"d\",\"\\xc8\":\"E\",\"\\xc9\":\"E\",\"\\xca\":\"E\",\"\\xcb\":\"E\",\"\\xe8\":\"e\",\"\\xe9\":\"e\",\"\\xea\":\"e\",\"\\xeb\":\"e\",\"\\xcc\":\"I\",\"\\xcd\":\"I\",\"\\xce\":\"I\",\n\"\\xcf\":\"I\",\"\\xec\":\"i\",\"\\xed\":\"i\",\"\\xee\":\"i\",\"\\xef\":\"i\",\"\\xd1\":\"N\",\"\\xf1\":\"n\",\"\\xd2\":\"O\",\"\\xd3\":\"O\",\"\\xd4\":\"O\",\"\\xd5\":\"O\",\"\\xd6\":\"O\",\"\\xd8\":\"O\",\"\\xf2\":\"o\",\"\\xf3\":\"o\",\"\\xf4\":\"o\",\"\\xf5\":\"o\",\"\\xf6\":\"o\",\"\\xf8\":\"o\",\"\\xd9\":\"U\",\"\\xda\":\"U\",\"\\xdb\":\"U\",\"\\xdc\":\"U\",\"\\xf9\":\"u\",\"\\xfa\":\"u\",\"\\xfb\":\"u\",\"\\xfc\":\"u\",\"\\xdd\":\"Y\",\"\\xfd\":\"y\",\"\\xff\":\"y\",\"\\xc6\":\"Ae\",\"\\xe6\":\"ae\",\"\\xde\":\"Th\",\"\\xfe\":\"th\",\"\\xdf\":\"ss\",\"\\u0100\":\"A\",\"\\u0102\":\"A\",\"\\u0104\":\"A\",\"\\u0101\":\"a\",\"\\u0103\":\"a\",\"\\u0105\":\"a\",\"\\u0106\":\"C\",\"\\u0108\":\"C\",\"\\u010a\":\"C\",\n\"\\u010c\":\"C\",\"\\u0107\":\"c\",\"\\u0109\":\"c\",\"\\u010b\":\"c\",\"\\u010d\":\"c\",\"\\u010e\":\"D\",\"\\u0110\":\"D\",\"\\u010f\":\"d\",\"\\u0111\":\"d\",\"\\u0112\":\"E\",\"\\u0114\":\"E\",\"\\u0116\":\"E\",\"\\u0118\":\"E\",\"\\u011a\":\"E\",\"\\u0113\":\"e\",\"\\u0115\":\"e\",\"\\u0117\":\"e\",\"\\u0119\":\"e\",\"\\u011b\":\"e\",\"\\u011c\":\"G\",\"\\u011e\":\"G\",\"\\u0120\":\"G\",\"\\u0122\":\"G\",\"\\u011d\":\"g\",\"\\u011f\":\"g\",\"\\u0121\":\"g\",\"\\u0123\":\"g\",\"\\u0124\":\"H\",\"\\u0126\":\"H\",\"\\u0125\":\"h\",\"\\u0127\":\"h\",\"\\u0128\":\"I\",\"\\u012a\":\"I\",\"\\u012c\":\"I\",\"\\u012e\":\"I\",\"\\u0130\":\"I\",\"\\u0129\":\"i\",\"\\u012b\":\"i\",\"\\u012d\":\"i\",\n\"\\u012f\":\"i\",\"\\u0131\":\"i\",\"\\u0134\":\"J\",\"\\u0135\":\"j\",\"\\u0136\":\"K\",\"\\u0137\":\"k\",\"\\u0138\":\"k\",\"\\u0139\":\"L\",\"\\u013b\":\"L\",\"\\u013d\":\"L\",\"\\u013f\":\"L\",\"\\u0141\":\"L\",\"\\u013a\":\"l\",\"\\u013c\":\"l\",\"\\u013e\":\"l\",\"\\u0140\":\"l\",\"\\u0142\":\"l\",\"\\u0143\":\"N\",\"\\u0145\":\"N\",\"\\u0147\":\"N\",\"\\u014a\":\"N\",\"\\u0144\":\"n\",\"\\u0146\":\"n\",\"\\u0148\":\"n\",\"\\u014b\":\"n\",\"\\u014c\":\"O\",\"\\u014e\":\"O\",\"\\u0150\":\"O\",\"\\u014d\":\"o\",\"\\u014f\":\"o\",\"\\u0151\":\"o\",\"\\u0154\":\"R\",\"\\u0156\":\"R\",\"\\u0158\":\"R\",\"\\u0155\":\"r\",\"\\u0157\":\"r\",\"\\u0159\":\"r\",\"\\u015a\":\"S\",\"\\u015c\":\"S\",\n\"\\u015e\":\"S\",\"\\u0160\":\"S\",\"\\u015b\":\"s\",\"\\u015d\":\"s\",\"\\u015f\":\"s\",\"\\u0161\":\"s\",\"\\u0162\":\"T\",\"\\u0164\":\"T\",\"\\u0166\":\"T\",\"\\u0163\":\"t\",\"\\u0165\":\"t\",\"\\u0167\":\"t\",\"\\u0168\":\"U\",\"\\u016a\":\"U\",\"\\u016c\":\"U\",\"\\u016e\":\"U\",\"\\u0170\":\"U\",\"\\u0172\":\"U\",\"\\u0169\":\"u\",\"\\u016b\":\"u\",\"\\u016d\":\"u\",\"\\u016f\":\"u\",\"\\u0171\":\"u\",\"\\u0173\":\"u\",\"\\u0174\":\"W\",\"\\u0175\":\"w\",\"\\u0176\":\"Y\",\"\\u0177\":\"y\",\"\\u0178\":\"Y\",\"\\u0179\":\"Z\",\"\\u017b\":\"Z\",\"\\u017d\":\"Z\",\"\\u017a\":\"z\",\"\\u017c\":\"z\",\"\\u017e\":\"z\",\"\\u0132\":\"IJ\",\"\\u0133\":\"ij\",\"\\u0152\":\"Oe\",\"\\u0153\":\"oe\",\n\"\\u0149\":\"'n\",\"\\u017f\":\"s\"}),et=w({\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"}),ut=w({\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,\"__wrapped__\"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,\nthis.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h=\"[object Function]\"==s||\"[object GeneratorFunction]\"==s;if(sf(n))return Wr(n,c);if(\"[object Object]\"==s||\"[object Arguments]\"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),\ni=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;\nif(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++ut}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&\"[object Arguments]\"==zt(n)}function Tt(n){return xu(n)&&\"[object ArrayBuffer]\"==zt(n)}function $t(n){return xu(n)&&\"[object Date]\"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{\nvar i=af(n),o=af(t),f=i?\"[object Array]\":yo(n),c=o?\"[object Array]\":yo(t),f=\"[object Arguments]\"==f?\"[object Object]\":f,c=\"[object Arguments]\"==c?\"[object Object]\":c,a=\"[object Object]\"==f,o=\"[object Object]\"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,\"__wrapped__\"),f=o&&ci.call(t,\"__wrapped__\"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),\ni=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*(\"desc\"==r[e]?-1:1);\nbreak n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e=u){for(;e>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:ot.length?n:It(n,vr(t,0,-1)),\nnull==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){\nif(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?F:i,u=1),t=ni(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,or?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(\"\"):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],\"__lodash_placeholder__\"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],\"__lodash_placeholder__\"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],\nr=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;\nfor(i.set(n,t),i.set(t,n);++cr&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),\ng(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){\nreturn r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!=\"function\")throw new ei(\"Expected a function\");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),\nr}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,\na=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!=\"function\")throw new ei(\"Expected a function\");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g=\"maxWait\"in r)?Di(Iu(r.maxWait)||0,t):l,d=\"trailing\"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),\nr.cache=i.set(u,e)||i,e)}if(typeof n!=\"function\"||null!=t&&typeof t!=\"function\")throw new ei(\"Expected a function\");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);\n}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return\"[object Error]\"==t||\"[object DOMException]\"==t||typeof n.message==\"string\"&&typeof n.name==\"string\"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),\"[object Function]\"==n||\"[object GeneratorFunction]\"==n||\"[object AsyncFunction]\"==n||\"[object Proxy]\"==n)}function du(n){return typeof n==\"number\"&&n==Ou(n)}function yu(n){return typeof n==\"number\"&&-1=n}function bu(n){var t=typeof n;return null!=n&&(\"object\"==t||\"function\"==t);\n}function xu(n){return null!=n&&typeof n==\"object\"}function ju(n){return typeof n==\"number\"||xu(n)&&\"[object Number]\"==zt(n)}function wu(n){return!(!xu(n)||\"[object Object]\"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,\"constructor\")&&n.constructor,typeof n==\"function\"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n==\"string\"||!af(n)&&xu(n)&&\"[object String]\"==zt(n)}function Au(n){return typeof n==\"symbol\"||xu(n)&&\"[object Symbol]\"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);\nif(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),(\"[object Map]\"==t?L:\"[object Set]\"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n==\"number\")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf==\"function\"?n.valueOf():n,n=bu(n)?n+\"\":n),typeof n!=\"string\")return 0===n?n:+n;\nn=n.replace(cn,\"\");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?\"\":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)(\"constructor\"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){\nif(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,\"\")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n==\"function\"?n:dt(n,1))}function Zu(n,t,r){\nvar e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&\"chain\"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){\nreturn false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En[\"__core-js_shared__\"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||\"\");return n?\"Symbol(src)_1.\"+n:\"\"}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti(\"^\"+fi.call(ci).replace(on,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){\ntry{var n=Ae(ni,\"defineProperty\");return n({},\"\",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,\"DataView\"),Zi=Ae(En,\"Map\"),qi=Ae(En,\"Promise\"),Vi=Ae(En,\"Set\"),Ki=Ae(En,\"WeakMap\"),Gi=Ae(ni,\"create\"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){\nfunction n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:\"\",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],\nthis.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],\"__lodash_hash_undefined__\"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?\"__lodash_hash_undefined__\":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),\n--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);\n},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,\"__lodash_hash_undefined__\"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){\nreturn this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,\"toString\",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){\nreturn Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&\"[object DataView]\"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&\"[object Map]\"!=yo(new Zi)||qi&&\"[object Promise]\"!=yo(qi.resolve())||Vi&&\"[object Set]\"!=yo(new Vi)||Ki&&\"[object WeakMap]\"!=yo(new Ki))&&(yo=function(n){\nvar t=zt(n);if(n=(n=\"[object Object]\"==t?n.constructor:F)?Fe(n):\"\")switch(n){case Yi:return\"[object DataView]\";case Qi:return\"[object Map]\";case Xi:return\"[object Promise]\";case no:return\"[object Set]\";case to:return\"[object WeakMap]\"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(\"\"),n.replace(un,function(n,r,e,u){\nt.push(e?u.replace(vn,\"$1\"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t==\"function\"?t:F)&&r.pop(),\nr.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t==\"function\"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),\nEr(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t==\"function\"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,\"callee\")&&!ji.call(n,\"callee\")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){\nif(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){\nvar r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},\nOn.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));et?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!=\"number\"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r>>0,r?(n=zu(n))&&(typeof t==\"string\"||null!=t&&!_f(t))&&(t=jr(t),\n!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){\nreturn n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!=\"function\")throw new ei(\"Expected a function\");return bu(r)&&(e=\"leading\"in r?!!r.leading:e,u=\"trailing\"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,\nOn.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t==\"function\"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);\n},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e==\"function\"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);\n},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t==\"function\"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t==\"function\"?t:F,dt(n,4,t)},\nOn.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,\"\\\\$&\"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));\n},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);\n},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&\"[object WeakMap]\"==yo(n)},On.isWeakSet=function(n){return xu(n)&&\"[object WeakSet]\"==zt(n)},On.join=function(n,t){\nreturn null==n?\"\":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){\nreturn n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return\"\"},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){\nn=zu(n);var e=(t=Ou(t))?T(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n(\"1e-\"+((r+\"\").length-1))),t)):cr(n,t);\n},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++en||9007199254740991=i)return n;if(i=r-T(e),1>i)return e;\nif(r=o?zr(o,0,i).join(\"\"):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+\"g\")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?\"Right\":\"\")}),e},Mn.prototype[n+\"Right\"]=function(t){\nreturn this.reverse()[n](t).reverse()}}),u([\"filter\",\"map\",\"takeWhile\"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u([\"head\",\"last\"],function(n,t){var r=\"take\"+(t?\"Right\":\"\");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u([\"initial\",\"tail\"],function(n,t){var r=\"drop\"+(t?\"\":\"Right\");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);\n}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n==\"function\"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),\nt!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?\"take\"+(\"last\"==t?\"Right\":\"\"):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);\nl&&r&&typeof a==\"function\"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u(\"pop push shift sort splice unshift\".split(\" \"),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?\"tap\":\"thru\",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){\nvar u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+\"\";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:\"wrapper\",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),\nn},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);\n},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}(); true?(Zn._=it, !(__WEBPACK_AMD_DEFINE_RESULT__ = function(){return it}.call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this);\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(/*! ./../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\"), __webpack_require__(/*! ./../webpack/buildin/module.js */ \"./node_modules/webpack/buildin/module.js\")(module)))//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uI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ildin/global.js":
+/* no static exports found */
+/* all exports used */
+/*!***********************************!*\
+ !*** (webpack)/buildin/global.js ***!
+ \***********************************/
/***/ (function(module, exports) {
-var g;
-
-// This works in non-strict mode
-g = (function() {
- return this;
-})();
-
-try {
- // This works if eval is allowed (see CSP)
- g = g || Function("return this")() || (1,eval)("this");
-} catch(e) {
- // This works if the window reference is available
- if(typeof window === "object")
- g = window;
-}
-
-// g can still be undefined, but nothing to do about it...
-// We return undefined, instead of nothing here, so it's
-// easier to handle this case. if(!global) { ...}
-
-module.exports = g;
-
+eval("var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvd2VicGFjay9idWlsZGluL2dsb2JhbC5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8od2VicGFjaykvYnVpbGRpbi9nbG9iYWwuanM/MzY5OCJdLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZztcclxuXHJcbi8vIFRoaXMgd29ya3MgaW4gbm9uLXN0cmljdCBtb2RlXHJcbmcgPSAoZnVuY3Rpb24oKSB7XHJcblx0cmV0dXJuIHRoaXM7XHJcbn0pKCk7XHJcblxyXG50cnkge1xyXG5cdC8vIFRoaXMgd29ya3MgaWYgZXZhbCBpcyBhbGxvd2VkIChzZWUgQ1NQKVxyXG5cdGcgPSBnIHx8IEZ1bmN0aW9uKFwicmV0dXJuIHRoaXNcIikoKSB8fCAoMSxldmFsKShcInRoaXNcIik7XHJcbn0gY2F0Y2goZSkge1xyXG5cdC8vIFRoaXMgd29ya3MgaWYgdGhlIHdpbmRvdyByZWZlcmVuY2UgaXMgYXZhaWxhYmxlXHJcblx0aWYodHlwZW9mIHdpbmRvdyA9PT0gXCJvYmplY3RcIilcclxuXHRcdGcgPSB3aW5kb3c7XHJcbn1cclxuXHJcbi8vIGcgY2FuIHN0aWxsIGJlIHVuZGVmaW5lZCwgYnV0IG5vdGhpbmcgdG8gZG8gYWJvdXQgaXQuLi5cclxuLy8gV2UgcmV0dXJuIHVuZGVmaW5lZCwgaW5zdGVhZCBvZiBub3RoaW5nIGhlcmUsIHNvIGl0J3NcclxuLy8gZWFzaWVyIHRvIGhhbmRsZSB0aGlzIGNhc2UuIGlmKCFnbG9iYWwpIHsgLi4ufVxyXG5cclxubW9kdWxlLmV4cG9ydHMgPSBnO1xyXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAod2VicGFjaykvYnVpbGRpbi9nbG9iYWwuanNcbi8vIG1vZHVsZSBpZCA9IC4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9nbG9iYWwuanNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7Iiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/***/ "./node_modules/webpack/buildin/module.js":
+/* no static exports found */
+/* all exports used */
+/*!***********************************!*\
+ !*** (webpack)/buildin/module.js ***!
+ \***********************************/
/***/ (function(module, exports) {
-module.exports = function(module) {
- if(!module.webpackPolyfill) {
- module.deprecate = function() {};
- module.paths = [];
- // module.parent = undefined by default
- if(!module.children) module.children = [];
- Object.defineProperty(module, "loaded", {
- enumerable: true,
- get: function() {
- return module.l;
- }
- });
- Object.defineProperty(module, "id", {
- enumerable: true,
- get: function() {
- return module.i;
- }
- });
- module.webpackPolyfill = 1;
- }
- return module;
-};
-
+eval("module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9ub2RlX21vZHVsZXMvd2VicGFjay9idWlsZGluL21vZHVsZS5qcy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovLy8od2VicGFjaykvYnVpbGRpbi9tb2R1bGUuanM/YzNjMiJdLCJzb3VyY2VzQ29udGVudCI6WyJtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uKG1vZHVsZSkge1xyXG5cdGlmKCFtb2R1bGUud2VicGFja1BvbHlmaWxsKSB7XHJcblx0XHRtb2R1bGUuZGVwcmVjYXRlID0gZnVuY3Rpb24oKSB7fTtcclxuXHRcdG1vZHVsZS5wYXRocyA9IFtdO1xyXG5cdFx0Ly8gbW9kdWxlLnBhcmVudCA9IHVuZGVmaW5lZCBieSBkZWZhdWx0XHJcblx0XHRpZighbW9kdWxlLmNoaWxkcmVuKSBtb2R1bGUuY2hpbGRyZW4gPSBbXTtcclxuXHRcdE9iamVjdC5kZWZpbmVQcm9wZXJ0eShtb2R1bGUsIFwibG9hZGVkXCIsIHtcclxuXHRcdFx0ZW51bWVyYWJsZTogdHJ1ZSxcclxuXHRcdFx0Z2V0OiBmdW5jdGlvbigpIHtcclxuXHRcdFx0XHRyZXR1cm4gbW9kdWxlLmw7XHJcblx0XHRcdH1cclxuXHRcdH0pO1xyXG5cdFx0T2JqZWN0LmRlZmluZVByb3BlcnR5KG1vZHVsZSwgXCJpZFwiLCB7XHJcblx0XHRcdGVudW1lcmFibGU6IHRydWUsXHJcblx0XHRcdGdldDogZnVuY3Rpb24oKSB7XHJcblx0XHRcdFx0cmV0dXJuIG1vZHVsZS5pO1xyXG5cdFx0XHR9XHJcblx0XHR9KTtcclxuXHRcdG1vZHVsZS53ZWJwYWNrUG9seWZpbGwgPSAxO1xyXG5cdH1cclxuXHRyZXR1cm4gbW9kdWxlO1xyXG59O1xyXG5cblxuXG4vLy8vLy8vLy8vLy8vLy8vLy9cbi8vIFdFQlBBQ0sgRk9PVEVSXG4vLyAod2VicGFjaykvYnVpbGRpbi9tb2R1bGUuanNcbi8vIG1vZHVsZSBpZCA9IC4vbm9kZV9tb2R1bGVzL3dlYnBhY2svYnVpbGRpbi9tb2R1bGUuanNcbi8vIG1vZHVsZSBjaHVua3MgPSAwIl0sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=");
/***/ }),
/***/ "./src/web/index.js":
+/* no static exports found */
+/* all exports used */
+/*!**************************!*\
+ !*** ./src/web/index.js ***!
+ \**************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
-
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-
-var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-var _fp = __webpack_require__("./node_modules/lodash/fp.js");
-
-function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-/* eslint-disable no-underscore-dangle */
-// Accept the huron.js module for Huron development
-if (false) {
- module.hot.accept();
-}
-
-/** Class for inserting HTML snippets at particular insertion points.
- * Uses require() to grab html partials, then inserts that html
- * into an element with attribute [huron-id] corresponding to the reference URI of the target KSS section,
- * and [huron-type] corresponding with the required KSS field
- */
-
-var InsertNodes = function () {
- function InsertNodes(modules, store) {
- _classCallCheck(this, InsertNodes);
-
- /** webpack module list in which keys are relative require paths and values are the module contents */
- this._modules = modules;
- /** array of module keys */
- this._moduleIds = Object.keys(modules);
- /** reference to the huron config */
- this._config = null;
- /** KSS sections organized in various formats including by reference URI, by module key, and modules sorted by parent/child */
- this._sections = null;
- /** Key/value pairs of partner data and template files */
- this._templates = null;
- /** array of prototypes */
- this._prototypes = null;
- /** array of valid huron placeholder types */
- this._types = null;
- /** array of CSS modules classnames */
- this._classNames = null;
-
- /** Cache for module metadata */
- this.meta = {};
-
- /** Reference to entire memory store */
- this.store = store;
-
- // Inits
- this.cycleModules();
- this.cycleStyleguide();
- }
-
- /**
- * Apply a modifier if one exists
- *
- * @param {object} data - data with which to render template
- * @param {string} modifier - target modifier
- *
- * @return {string} data - subset of data object for supplied modifier
- */
-
-
- _createClass(InsertNodes, [{
- key: 'cycleModules',
-
-
- /**
- * Replace all template markers with the actual template markup.
- *
- * @param {string} context - The hash context for the module
- * @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs
- */
- value: function cycleModules() {
- var _this = this;
-
- var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
- var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
-
- var moduleList = {};
- var elementList = context;
-
- // We're replacing top-level elements
- if (!elementList) {
- this.regenCache();
-
- // Find all top-level huron placeholders
- elementList = [].concat(_toConsumableArray(document.querySelectorAll('[data-huron-id][data-huron-type]')));
- }
-
- moduleList = this.getModuleListFromTags(elementList);
-
- // Loop through modules array
- Object.keys(moduleList).forEach(function (key) {
- var module = _this._modules[key];
- var replaceElements = moduleList[key];
-
- _this.loadModule(key, module, replaceElements, true, filter);
- });
- }
-
- /**
- * Helper for reloading sections only
- */
-
- }, {
- key: 'cycleSections',
- value: function cycleSections() {
- this.cycleModules(false, {
- property: 'type',
- values: ['section'],
- include: true
- });
- }
-
- /**
- * Reload styleguide sections and menu helpers
- */
-
- }, {
- key: 'cycleStyleguide',
- value: function cycleStyleguide() {
- var sectionsQuery = document.querySelector('[huron-sections]');
- var menuQuery = document.querySelector('[huron-menu]');
-
- // Sections
- if (sectionsQuery) {
- sectionsQuery.innerHTML = '';
- this.outputSections(null, sectionsQuery);
- this.cycleSections();
- }
-
- // Menu
- if (menuQuery) {
- menuQuery.innerHTML = '';
-
- if (null === document.querySelector('.section-menu__expand')) {
- var menuTrigger = document.createElement('button');
-
- menuTrigger.classList.add('section-menu__expand');
- menuTrigger.innerHTML = 'Sections Menu';
- document.body.insertBefore(menuQuery.appendChild(menuTrigger), document.body.childNodes[0]);
-
- // Add menu trigger handler
- menuTrigger.addEventListener('click', function () {
- document.body.classList.toggle('section-menu-open');
- });
- }
-
- // Create menu
- this.outputMenu(null, menuQuery);
- }
- }
-
- /**
- * Generate a hash string from a module key
- *
- * @param {string} key - module key (require path) to convert into a hash
- * @return {string} key - generated MD5 Hash
- */
-
- }, {
- key: 'generateModuleHash',
- value: function generateModuleHash(key) {
- var currentKey = key;
-
- // If module key is for data, use template key instead
- if (key.includes('-section.json')) {
- currentKey = this._sectionTemplatePath;
- } else if (key.includes('.json')) {
- currentKey = this._templates[key];
- }
-
- return '_' + currentKey.replace(/[/.]/g, '_');
- }
-
- /**
- * Get module metadata from a module require path
- *
- * @param {string} key - Module require path
- * @return {object} containing module id, module type, key and the module contents
- */
-
- }, {
- key: 'getMetaFromPath',
- value: function getMetaFromPath(key, module) {
- var _this2 = this;
-
- var sections = this._sections.sectionsByPath;
- var templateTypes = this._types.filter(function (type) {
- return 'prototype' !== type;
- });
- var id = false;
- var type = false;
-
- /* eslint-disable space-unary-ops */
- if (-1 !== key.indexOf('./prototypes')) {
- /* eslint-enable space-unary-ops */
- var prototype = Object.keys(this._prototypes).filter(function (name) {
- return _this2._prototypes[name] === key;
- });
-
- if (prototype.length) {
- id = prototype[0];
- type = 'prototype';
- }
- } else if (key === this._sectionTemplatePath) {
- id = 'sections-template';
- type = 'sections-template';
- } else {
- var testTypes = [];
- var testSections = Object.keys(sections).filter(function (section) {
- var tempTypes = templateTypes.filter(function (currentType) {
- return sections[section][currentType + 'Path'] === key;
- });
-
- if (tempTypes.length) {
- testTypes = tempTypes;
- return true;
- }
-
- return false;
- });
-
- if (testSections && testSections.length && testTypes && testTypes.length) {
- id = sections[testSections[0]].referenceURI;
- type = testTypes[0];
- }
- }
-
- if (id && type) {
- var renderData = this.getModuleRender(type, key, module);
- var replaceKey = this.generateModuleHash(key);
-
- if (renderData) {
- return Object.assign({ id: id, type: type, key: key, replaceKey: replaceKey, module: module }, renderData);
- }
- }
-
- console.warn( // eslint-disable-line no-console
- 'Module \'' + key + '\' does not exist on the page\n or is no longer in use');
- return false;
- }
-
- /**
- * Check if a tag is a huron placeholder and, if so,
- * return its associated module key
- *
- * @param {object} tag - tag to check
- * @return {bool} associated module key
- */
-
- }, {
- key: 'getModuleKeyFromTag',
- value: function getModuleKeyFromTag(tag) {
- // Safari/webkit has some trouble parsing dataset in certain cases.
- // This is a fallback method of accessing the same data.
- var type = InsertNodes.getDataAttribute(tag, 'huron-type');
- var id = InsertNodes.getDataAttribute(tag, 'huron-id');
- var section = this._sections.sectionsByURI[id];
-
- if (id && type) {
- if (section) {
- return section[type + 'Path'];
- } else if ('prototype' === type) {
- return this._prototypes[id];
- }
- }
-
- return false;
- }
-
- /**
- * Check if an array of elements contains a Huron placeholder
- *
- * @param {array} tags - array of DOM nodes
- * @param {bool} recurse - should we recurse this function with a new array
- * @return {object} moduleList - Huron placeholder DOM node
- */
-
- }, {
- key: 'getModuleListFromTags',
- value: function getModuleListFromTags(elements) {
- var _this3 = this;
-
- var recurse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
-
- var moduleList = {};
- var newList = {};
-
- if (elements && elements.length) {
- elements.forEach(function (element) {
- var moduleKey = _this3.getModuleKeyFromTag(element);
-
- if (moduleKey) {
- if (!moduleList[moduleKey]) {
- moduleList[moduleKey] = [];
- }
- moduleList[moduleKey].push(element);
- } else if (recurse) {
- newList = _this3.getModuleListFromTags([].concat(_toConsumableArray(element.querySelectorAll('[data-huron-id][data-huron-type]'))), false);
-
- Object.keys(newList).forEach(function (key) {
- moduleList[key] = moduleList[key] ? moduleList[key].concat(newList[key]) : newList[key];
- });
- }
- });
- }
-
- return moduleList;
- }
-
- /**
- * Transform every module into a predictable object
- *
- * @param {object} type - Module metadata
- * @param {mixed} module - Module contents
- * @return {object} containing render function, render data and module id
- */
-
- }, {
- key: 'getModuleRender',
- value: function getModuleRender(type, key, module) {
- var render = false;
- var data = false;
-
- if ('template' === type && 'function' === typeof module) {
- // It's a render function for a template
- render = module;
- data = this._modules[this._templates[key]];
- } else if ('sections-template' === type && 'function' === typeof module) {
- // It's a kss section template
- render = module;
- } else if ('section' === type && 'object' === (typeof module === 'undefined' ? 'undefined' : _typeof(module))) {
- // It's section data
- render = this._modules[this._sectionTemplatePath];
- data = module;
- } else if (('template' === type || 'description' === type || 'prototype' === type) && 'string' === typeof module) {
- // it's straight HTML
- render = function render() {
- return module;
- };
- } else if ('data' === type && 'object' === (typeof module === 'undefined' ? 'undefined' : _typeof(module))) {
- // It's a data file (.json)
- render = this._modules[this._templates[key]];
- data = module;
- }
-
- // Only need render, as data will be left empty for static HTML
- if (render) {
- return { render: render, data: data };
- }
-
- return false;
- }
-
- /**
- * Replace all sections. For hot reloading use when the section template has changed.
- *
- * @param {object} replaceElements - The context (e.g. document) that you will query for the template ID to replace
- * @param {string} key - Module require path
- * @param {mixed} module - Module contents
- * @param {bool} cached - Whether or not to use cached values for module replacement
- * @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs
- */
-
- }, {
- key: 'loadModule',
- value: function loadModule(key, module, replaceElements) {
- var cached = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
- var filter = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
-
- var shouldLoad = true;
- var moduleMeta = false;
-
- // Check if we should load from internal module metadata cache
- if (cached) {
- moduleMeta = this.meta[key];
- } else {
- moduleMeta = this.meta[key] = this.getMetaFromPath(key, module);
- }
-
- if (moduleMeta) {
- if (filter) {
- shouldLoad = InsertNodes.filterModules(filter, moduleMeta);
- }
-
- if (shouldLoad) {
- this.replaceTemplate(moduleMeta, replaceElements);
- }
- }
- }
-
- /*
- * Helper function for inserting styleguide sections.
- *
- * Recurses over sorted styleguide sections and inserts a to be used as a menu for each section
- */
-
- }, {
- key: 'outputMenu',
- value: function outputMenu(parent, el) {
- var _this4 = this;
-
- var sections = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._sections.sorted;
-
- var templateId = null;
- var newEl = el;
-
- Object.keys(sections).forEach(function (section) {
- var hasSubmenu = Object.keys(sections[section]).length;
- var menuTarget = void 0;
- var nextMenu = void 0;
-
- if (parent) {
- templateId = parent + '-' + section;
- } else {
- templateId = section;
- }
-
- if (newEl) {
- var title = _this4._sections.sectionsByURI[templateId] ? _this4._sections.sectionsByURI[templateId].header : templateId;
- var sectionMenu = document.createElement('ul');
- var menuItem = document.createElement('li');
- var link = '' + title + '';
-
- sectionMenu.classList.add('section-menu');
- menuItem.classList.add('section-menu__item');
- menuItem.innerHTML = link;
-
- // Check if this is a UL and, if not, create one
- if ('UL' !== newEl.tagName) {
- menuTarget = sectionMenu.cloneNode();
- newEl.appendChild(menuTarget);
- newEl = menuTarget;
- }
-
- // Has subsections
- if (hasSubmenu) {
- nextMenu = sectionMenu.cloneNode();
- nextMenu.classList.add('section-menu--submenu');
- menuItem.classList.add('section-menu__item--has-submenu');
- menuItem.appendChild(nextMenu);
- }
-
- newEl.appendChild(menuItem);
-
- if (hasSubmenu) {
- _this4.outputMenu(templateId, nextMenu, sections[section]);
- }
- }
- });
- }
-
- /**
- * Helper function for inserting styleguide sections.
- *
- * Recurses over sorted styleguide sections and inserts a tag with [huron-id] equal to the section template name.
- */
-
- }, {
- key: 'outputSections',
- value: function outputSections(parent, el) {
- var _this5 = this;
-
- var sections = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._sections.sorted;
-
- var templateId = null;
- var placeholder = null;
-
- Object.keys(sections).forEach(function (section) {
- var istopLevel = false;
- var topLevelWrapper = null;
- var topLevelSection = null;
- var insertionEl = el;
-
- // Generate section ID and check if it is top-level
- if (parent) {
- templateId = parent + '-' + section;
- } else {
- templateId = section;
- istopLevel = true;
- }
-
- if (el) {
- // Generate huron placeholder for this section
- placeholder = document.createElement('div');
- placeholder.dataset.huronId = templateId;
- placeholder.dataset.huronType = 'section';
-
- if (istopLevel) {
- // Generate wrapper to contain top-level section and all subsections underneath it
- topLevelWrapper = document.createElement('div');
- topLevelWrapper.classList.add('section--top-level__wrapper');
-
- // Generate wrapper for top-level section
- topLevelSection = document.createElement('div');
- topLevelSection.classList.add('section', 'section--top-level');
-
- // Append wrappers to huron-sections element
- topLevelSection.appendChild(placeholder);
- topLevelWrapper.appendChild(topLevelSection);
- el.appendChild(topLevelWrapper);
- insertionEl = topLevelWrapper;
- } else {
- // If this is not top-level, append placeholder
- el.appendChild(placeholder);
- }
- }
-
- // Recursively call this function to insert other sections
- if (Object.keys(sections[section]).length && placeholder) {
- _this5.outputSections(templateId, insertionEl, sections[section]);
- }
- });
- }
-
- /**
- * Apply a modifier and merge classnames into template data, if it exists
- *
- * @param {object} data - data with which to render template
- * @param {string} modifier - target modifier
- *
- * @return {string} rendered - the modified HTML module
- */
-
- }, {
- key: 'provideClassnames',
- value: function provideClassnames(data) {
- if (this._classNames) {
- return Object.assign({}, data, { classNames: this._classNames });
- }
-
- return data;
- }
-
- /**
- * Regenerate module meta cache
- */
-
- }, {
- key: 'regenCache',
- value: function regenCache() {
- var _this6 = this;
-
- Object.keys(this._modules).forEach(function (moduleKey) {
- _this6.meta[moduleKey] = _this6.getMetaFromPath(moduleKey, _this6._modules[moduleKey]);
- });
- }
-
- /**
- * Recursively remove old tags
- *
- * @param {string} replaceKey - key of module for which we need to remove old tags
- * @param {object} tag - tag to start our search with
- * (usually the tag immediately preceding the current placeholder)
- */
-
- }, {
- key: 'removeOldTags',
- value: function removeOldTags(replaceKey, tag) {
- if (tag) {
- var parentModule = InsertNodes.getDataAttribute(tag, 'parent-module');
- var selfModule = InsertNodes.getDataAttribute(tag, 'self-module');
-
- if (parentModule === replaceKey && selfModule !== replaceKey) {
- // This is a child of the current module,
- // so remove it and its children (if applicable)
- var childrenModule = selfModule;
- var nextTag = tag.previousSibling;
-
- if (childrenModule) {
- this.removeOldTags(childrenModule, nextTag);
- // Reset nextTag if we removed a child
- nextTag = tag.previousSibling;
- }
-
- tag.parentNode.removeChild(tag);
- this.removeOldTags(replaceKey, nextTag);
- }
- }
- }
-
- /**
- * Replace a single template marker with template content.
- *
- * @param {object} replaceElements - Array of elements to check for Huron placeholders
- * @param {object} meta - Module metadata
- */
-
- }, {
- key: 'replaceTemplate',
- value: function replaceTemplate(meta, replaceElements) {
- var _this7 = this;
-
- var type = this.validateType(meta.type);
- var tags = [];
- var replace = replaceElements;
- var hasStyleguideHelpers = false;
-
- if (!replace) {
- replace = document.querySelectorAll('[data-huron-id][data-huron-type]');
- }
-
- if (type) {
- replace.forEach(function (tag) {
- var tagType = InsertNodes.getDataAttribute(tag, 'huron-type');
- var tagId = InsertNodes.getDataAttribute(tag, 'huron-id');
-
- if (tagId === meta.id && tagType === type) {
- tags.push(tag);
- }
- });
-
- if (tags && tags.length && meta.render) {
- tags.forEach(function (currentTag) {
- var modifiedPlaceholder = currentTag;
- var modifier = InsertNodes.getDataAttribute(modifiedPlaceholder, 'huron-modifier');
- var parent = modifiedPlaceholder.parentNode;
- var data = (0, _fp.compose)(_this7.provideClassnames.bind(_this7), InsertNodes.applyModifier)(meta.data, modifier);
- var rendered = meta.render(data);
- var renderedTemplate = InsertNodes.convertToElement(rendered).querySelector('template');
- var renderedContents = null;
-
- // Remove existing module tags
- _this7.removeOldTags(meta.replaceKey, modifiedPlaceholder.previousSibling);
-
- // Get the contents of the rendered template
- renderedContents = [].concat(_toConsumableArray(renderedTemplate.content.children));
-
- // Insert each tag of the template contents before placeholder
- renderedContents.forEach(function (element) {
- var newEl = element;
-
- if (1 === newEl.nodeType) {
- newEl.dataset.parentModule = meta.replaceKey;
- hasStyleguideHelpers = !hasStyleguideHelpers ? InsertNodes.isSectionHelper(newEl, meta) : hasStyleguideHelpers;
-
- parent.insertBefore(newEl, modifiedPlaceholder);
- }
- });
-
- // Add module hash to this placeholder
- modifiedPlaceholder.dataset.selfModule = meta.replaceKey;
-
- // Hide the placeholder
- modifiedPlaceholder.style.display = 'none';
-
- // Recursively load modules, excluding the current one
- _this7.cycleModules(renderedContents, {
- property: 'key',
- values: [meta.key, _this7._sectionTemplatePath],
- include: false
- });
-
- if (hasStyleguideHelpers) {
- _this7.cycleStyleguide();
- }
- });
- }
- } else {
- console.warn( // eslint-disable-line no-console
- 'Could not render module\n section: ' + meta.id + '\n type: ' + meta.type);
- }
- }
-
- /**
- * Verify specified element is using an acceptable huron type
- *
- * @param {string} type - type of partial (template, data, description, section or prototype )
- * @return {string} type - huron type or 'template' if invalid
- */
-
- }, {
- key: 'validateType',
- value: function validateType(type) {
- if ('data' === type) {
- return 'template';
- }
-
- if (!this._types.includes(type)) {
- return false;
- }
-
- return type;
- }
-
- /*
- * Set new modules object
- */
-
- }, {
- key: 'modules',
- set: function set(modules) {
- this._modules = modules;
- this._moduleIds = Object.keys(modules);
- }
-
- /*
- * Set store
- */
-
- }, {
- key: 'store',
- set: function set(store) {
- this._store = store;
- this._config = store.config;
- this._sections = store.sections;
- this._templates = store.templates;
- this._prototypes = store.prototypes;
- this._types = store.types;
- this._sectionTemplatePath = store.sectionTemplatePath;
-
- // Completely rerender prototype if any CSS modules classnames change
- if (!(0, _fp.isEqual)(this._classNames, store.classNames)) {
- var isInitialRender = !this._classNames;
- this._classNames = store.classNames;
-
- // Only rerender after initial render (when classnames is not falsy)
- if (!isInitialRender) {
- this.cycleModules();
- }
- }
- }
- }], [{
- key: 'applyModifier',
- value: function applyModifier(data, modifier) {
- // If we have a modifier, use it, otherwise use the entire data set
- if (modifier && data && data[modifier]) {
- return Object.assign({}, data[modifier], { modifier: modifier });
- }
-
- return data;
- }
-
- /**
- * Get markup from any type of module (html, json or template)
- *
- * @param {string} content - String corresponding to markup
- * @return {object} el.firstElementChild - HTML module
- */
-
- }, {
- key: 'convertToElement',
- value: function convertToElement(content) {
- var el = document.createElement('div');
-
- el.innerHTML = content;
- return el.firstElementChild;
- }
-
- /**
- * Filter module object by module key or module type
- *
- * @param {object} filter - Filter for modules. Options:
- * @param {string} filter.property - Which property to filter ('key' or 'type')
- * @param {array} filter.values - Values for property
- * @param {bool} filter.include - Whether the values should be included or excluded (true = include, false = exclude)
- * @param {object} moduleMeta - Filter for modules. Fields explained in the filterModules() function docs
- * @return {bool} match - determine if modules need to be filtered
- */
-
- }, {
- key: 'filterModules',
- value: function filterModules(filter, moduleMeta) {
- var match = true;
-
- // Check if we should filter out any modules
- if ('object' === (typeof filter === 'undefined' ? 'undefined' : _typeof(filter)) && {}.hasOwnProperty.call(filter, 'property') && {}.hasOwnProperty.call(filter, 'values') && {}.hasOwnProperty.call(filter, 'include')) {
- match = filter.values.filter(function (value) {
- return moduleMeta[filter.property] === value;
- });
- return Boolean(match.length) === filter.include;
- }
-
- console.log(' // eslint-disable-line no-console\n filter ' + filter + ' is not in a valid format.\n module filters must include \'property\', \'values\', and \'include\' properties\n ');
-
- return match;
- }
-
- /**
- * Retrieve a data attribute from a tag using one of two methods
- *
- * @param {HTMLElement} tag - DOM node on which to check for a data attribute
- * @param {string} attr - attribute to check for
- * @returns {string} data - contents of data attribute
- */
-
- }, {
- key: 'getDataAttribute',
- value: function getDataAttribute(tag, attr) {
- var data = false;
-
- // Check if element has dataset and, if so, use it
- if (tag.dataset) {
- data = tag.dataset[attr];
- }
-
- // Fallback to getAttribute for ugly old Safari
- if (!data && tag.getAttribute) {
- data = tag.getAttribute('data-' + attr);
- }
-
- return data;
- }
-
- /**
- * Check if this tag is a styleguide helper
- *
- * @param {object} tag - tag to check
- * @param {object} meta - module metadata
- * @return {bool}
- */
-
- }, {
- key: 'isSectionHelper',
- value: function isSectionHelper(tag, meta) {
- if ('prototype' === meta.type) {
- return tag.hasAttribute('huron-sections') || tag.hasAttribute('huron-menu');
- }
-
- return false;
- }
- }]);
-
- return InsertNodes;
-}();
-/* eslint-enable */
-
-
-exports.default = InsertNodes;
+eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _fp = __webpack_require__(/*! lodash/fp */ \"./node_modules/lodash/fp.js\");\n\nfunction _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n/* eslint-disable no-underscore-dangle */\n// Accept the huron.js module for Huron development\nif (false) {\n module.hot.accept();\n}\n\n/** Class for inserting HTML snippets at particular insertion points.\n * Uses require() to grab html partials, then inserts that html\n * into an element with attribute [huron-id] corresponding to the reference URI of the target KSS section,\n * and [huron-type] corresponding with the required KSS field\n */\n\nvar InsertNodes = function () {\n function InsertNodes(modules, store) {\n _classCallCheck(this, InsertNodes);\n\n /** webpack module list in which keys are relative require paths and values are the module contents */\n this._modules = modules;\n /** array of module keys */\n this._moduleIds = Object.keys(modules);\n /** reference to the huron config */\n this._config = null;\n /** KSS sections organized in various formats including by reference URI, by module key, and modules sorted by parent/child */\n this._sections = null;\n /** Key/value pairs of partner data and template files */\n this._templates = null;\n /** array of prototypes */\n this._prototypes = null;\n /** array of valid huron placeholder types */\n this._types = null;\n /** array of CSS modules classnames */\n this._classNames = null;\n\n /** Cache for module metadata */\n this.meta = {};\n\n /** Reference to entire memory store */\n this.store = store;\n\n // Inits\n this.cycleModules();\n this.cycleStyleguide();\n }\n\n /**\n * Apply a modifier if one exists\n *\n * @param {object} data - data with which to render template\n * @param {string} modifier - target modifier\n *\n * @return {string} data - subset of data object for supplied modifier\n */\n\n\n _createClass(InsertNodes, [{\n key: 'cycleModules',\n\n\n /**\n * Replace all template markers with the actual template markup.\n *\n * @param {string} context - The within which to replace markup\n * @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs\n */\n value: function cycleModules() {\n var _this = this;\n\n var context = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var moduleList = {};\n var elementList = context;\n\n // We're replacing top-level elements\n if (!elementList) {\n this.regenCache();\n\n // Find all top-level huron placeholders\n elementList = [].concat(_toConsumableArray(document.querySelectorAll('[data-huron-id][data-huron-type]')));\n }\n\n moduleList = this.getModuleListFromTags(elementList);\n\n // Loop through modules array\n Object.keys(moduleList).forEach(function (key) {\n var module = _this._modules[key];\n var replaceElements = moduleList[key];\n\n _this.loadModule(key, module, replaceElements, true, filter);\n });\n }\n\n /**\n * Helper for reloading sections only\n */\n\n }, {\n key: 'cycleSections',\n value: function cycleSections() {\n this.cycleModules(false, {\n property: 'type',\n values: ['section'],\n include: true\n });\n }\n\n /**\n * Reload styleguide sections and menu helpers\n */\n\n }, {\n key: 'cycleStyleguide',\n value: function cycleStyleguide() {\n var sectionsQuery = document.querySelector('[huron-sections]');\n var menuQuery = document.querySelector('[huron-menu]');\n\n // Sections\n if (sectionsQuery) {\n sectionsQuery.innerHTML = '';\n this.outputSections(null, sectionsQuery);\n this.cycleSections();\n }\n\n // Menu\n if (menuQuery) {\n menuQuery.innerHTML = '';\n\n if (null === document.querySelector('.section-menu__expand')) {\n var menuTrigger = document.createElement('button');\n\n menuTrigger.classList.add('section-menu__expand');\n menuTrigger.innerHTML = 'Sections Menu';\n document.body.insertBefore(menuQuery.appendChild(menuTrigger), document.body.childNodes[0]);\n\n // Add menu trigger handler\n menuTrigger.addEventListener('click', function () {\n document.body.classList.toggle('section-menu-open');\n });\n }\n\n // Create menu\n this.outputMenu(null, menuQuery);\n }\n }\n\n /**\n * Generate a unique key for targeting markup replacement\n *\n * @param {string} key - module key (webpack require path) to convert into a replacement key\n * @return {string} key - generated replacement key\n */\n\n }, {\n key: 'generateModuleReplaceKey',\n value: function generateModuleReplaceKey(key) {\n var currentKey = key;\n\n // If this is section data, use the section template path\n if (key.includes('-section.json')) {\n currentKey = this._sectionTemplatePath;\n // If updated module is a json file, use template key instead\n } else if (key.includes('.json')) {\n currentKey = this._templates[key];\n }\n\n return '_' + currentKey.replace(/[/.]/g, '_');\n }\n\n /**\n * Get module metadata from a module require path\n *\n * @param {string} key - Module require path\n * @return {object} containing module id, module type, key and the module contents\n */\n\n }, {\n key: 'getMetaFromPath',\n value: function getMetaFromPath(key, module) {\n var _this2 = this;\n\n var sections = this._sections.sectionsByPath;\n var templateTypes = this._types.filter(function (type) {\n return 'prototype' !== type;\n });\n var id = false;\n var type = false;\n\n /* eslint-disable space-unary-ops */\n if (-1 !== key.indexOf('./prototypes')) {\n /* eslint-enable space-unary-ops */\n var prototype = Object.keys(this._prototypes).filter(function (name) {\n return _this2._prototypes[name] === key;\n });\n\n if (prototype.length) {\n id = prototype[0];\n type = 'prototype';\n }\n } else if (key === this._sectionTemplatePath) {\n id = 'sections-template';\n type = 'sections-template';\n } else {\n var testTypes = [];\n var testSections = Object.keys(sections).filter(function (section) {\n var tempTypes = templateTypes.filter(function (currentType) {\n return sections[section][currentType + 'Path'] === key;\n });\n\n if (tempTypes.length) {\n testTypes = tempTypes;\n return true;\n }\n\n return false;\n });\n\n if (testSections && testSections.length && testTypes && testTypes.length) {\n id = sections[testSections[0]].referenceURI;\n type = testTypes[0];\n }\n }\n\n if (id && type) {\n var renderData = this.getModuleRender(type, key, module);\n var replaceKey = this.generateModuleReplaceKey(key);\n\n if (renderData) {\n return Object.assign({ id: id, type: type, key: key, replaceKey: replaceKey, module: module }, renderData);\n }\n }\n\n console.warn( // eslint-disable-line no-console\n 'Module \\'' + key + '\\' does not exist on the page\\n or is no longer in use');\n return false;\n }\n\n /**\n * Check if a tag is a huron placeholder and, if so,\n * return its associated module key\n *\n * @param {object} tag - tag to check\n * @return {bool} associated module key\n */\n\n }, {\n key: 'getModuleKeyFromTag',\n value: function getModuleKeyFromTag(tag) {\n // Safari/webkit has some trouble parsing dataset in certain cases.\n // This is a fallback method of accessing the same data.\n var type = InsertNodes.getDataAttribute(tag, 'huron-type');\n var id = InsertNodes.getDataAttribute(tag, 'huron-id');\n var section = this._sections.sectionsByURI[id];\n\n if (id && type) {\n if (section) {\n return section[type + 'Path'];\n } else if ('prototype' === type) {\n return this._prototypes[id];\n }\n }\n\n return false;\n }\n\n /**\n * Check if an array of elements contains a Huron placeholder\n *\n * @param {array} tags - array of DOM nodes\n * @param {bool} recurse - should we recurse this function with a new array\n * @return {object} moduleList - Huron placeholder DOM node\n */\n\n }, {\n key: 'getModuleListFromTags',\n value: function getModuleListFromTags(elements) {\n var _this3 = this;\n\n var recurse = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n var moduleList = {};\n var newList = {};\n\n if (elements && elements.length) {\n elements.forEach(function (element) {\n var moduleKey = _this3.getModuleKeyFromTag(element);\n\n if (moduleKey) {\n if (!moduleList[moduleKey]) {\n moduleList[moduleKey] = [];\n }\n moduleList[moduleKey].push(element);\n } else if (recurse) {\n newList = _this3.getModuleListFromTags([].concat(_toConsumableArray(element.querySelectorAll('[data-huron-id][data-huron-type]'))), false);\n\n Object.keys(newList).forEach(function (key) {\n moduleList[key] = moduleList[key] ? moduleList[key].concat(newList[key]) : newList[key];\n });\n }\n });\n }\n\n return moduleList;\n }\n\n /**\n * Transform every module into a predictable object\n *\n * @param {object} type - Module metadata\n * @param {mixed} module - Module contents\n * @return {object} containing render function, render data and module id\n */\n\n }, {\n key: 'getModuleRender',\n value: function getModuleRender(type, key, module) {\n var render = false;\n var data = false;\n\n if ('template' === type && 'function' === typeof module) {\n // It's a render function for a template\n render = module;\n data = this._modules[this._templates[key]];\n } else if ('sections-template' === type && 'function' === typeof module) {\n // It's a kss section template\n render = module;\n } else if ('section' === type && 'object' === (typeof module === 'undefined' ? 'undefined' : _typeof(module))) {\n // It's section data\n render = this._modules[this._sectionTemplatePath];\n data = module;\n } else if (('template' === type || 'description' === type || 'prototype' === type) && 'string' === typeof module) {\n // it's straight HTML\n render = function render() {\n return module;\n };\n } else if ('data' === type && 'object' === (typeof module === 'undefined' ? 'undefined' : _typeof(module))) {\n // It's a data file (.json)\n render = this._modules[this._templates[key]];\n data = module;\n }\n\n // Only need render, as data will be left empty for static HTML\n if (render) {\n return { render: render, data: data };\n }\n\n return false;\n }\n\n /**\n * Replace all sections. For hot reloading use when the section template has changed.\n *\n * @param {object} replaceElements - The context (e.g. document) that you will query for the template ID to replace\n * @param {string} key - Module require path\n * @param {mixed} module - Module contents\n * @param {bool} cached - Whether or not to use cached values for module replacement\n * @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs\n */\n\n }, {\n key: 'loadModule',\n value: function loadModule(key, module, replaceElements) {\n var cached = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var filter = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n\n var shouldLoad = true;\n var moduleMeta = false;\n\n // Check if we should load from internal module metadata cache\n if (cached) {\n moduleMeta = this.meta[key];\n } else {\n moduleMeta = this.meta[key] = this.getMetaFromPath(key, module);\n }\n\n if (moduleMeta) {\n if (filter) {\n shouldLoad = InsertNodes.filterModules(filter, moduleMeta);\n }\n\n if (shouldLoad) {\n this.replaceTemplate(moduleMeta, replaceElements);\n }\n }\n }\n\n /*\n * Helper function for inserting styleguide sections.\n *\n * Recurses over sorted styleguide sections and inserts a to be used as a menu for each section\n */\n\n }, {\n key: 'outputMenu',\n value: function outputMenu(parent, el) {\n var _this4 = this;\n\n var sections = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._sections.sorted;\n\n var templateId = null;\n var newEl = el;\n\n Object.keys(sections).forEach(function (section) {\n var hasSubmenu = Object.keys(sections[section]).length;\n var menuTarget = void 0;\n var nextMenu = void 0;\n\n if (parent) {\n templateId = parent + '-' + section;\n } else {\n templateId = section;\n }\n\n if (newEl) {\n var title = _this4._sections.sectionsByURI[templateId] ? _this4._sections.sectionsByURI[templateId].header : templateId;\n var sectionMenu = document.createElement('ul');\n var menuItem = document.createElement('li');\n var link = '' + title + '';\n\n sectionMenu.classList.add('section-menu');\n menuItem.classList.add('section-menu__item');\n menuItem.innerHTML = link;\n\n // Check if this is a UL and, if not, create one\n if ('UL' !== newEl.tagName) {\n menuTarget = sectionMenu.cloneNode();\n newEl.appendChild(menuTarget);\n newEl = menuTarget;\n }\n\n // Has subsections\n if (hasSubmenu) {\n nextMenu = sectionMenu.cloneNode();\n nextMenu.classList.add('section-menu--submenu');\n menuItem.classList.add('section-menu__item--has-submenu');\n menuItem.appendChild(nextMenu);\n }\n\n newEl.appendChild(menuItem);\n\n if (hasSubmenu) {\n _this4.outputMenu(templateId, nextMenu, sections[section]);\n }\n }\n });\n }\n\n /**\n * Helper function for inserting styleguide sections.\n *\n * Recurses over sorted styleguide sections and inserts a tag with [huron-id] equal to the section template name.\n */\n\n }, {\n key: 'outputSections',\n value: function outputSections(parent, el) {\n var _this5 = this;\n\n var sections = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this._sections.sorted;\n\n var templateId = null;\n var placeholder = null;\n\n Object.keys(sections).forEach(function (section) {\n var istopLevel = false;\n var topLevelWrapper = null;\n var topLevelSection = null;\n var insertionEl = el;\n\n // Generate section ID and check if it is top-level\n if (parent) {\n templateId = parent + '-' + section;\n } else {\n templateId = section;\n istopLevel = true;\n }\n\n if (el) {\n // Generate huron placeholder for this section\n placeholder = document.createElement('div');\n placeholder.dataset.huronId = templateId;\n placeholder.dataset.huronType = 'section';\n\n if (istopLevel) {\n // Generate wrapper to contain top-level section and all subsections underneath it\n topLevelWrapper = document.createElement('div');\n topLevelWrapper.classList.add('section--top-level__wrapper');\n\n // Generate wrapper for top-level section\n topLevelSection = document.createElement('div');\n topLevelSection.classList.add('section', 'section--top-level');\n\n // Append wrappers to huron-sections element\n topLevelSection.appendChild(placeholder);\n topLevelWrapper.appendChild(topLevelSection);\n el.appendChild(topLevelWrapper);\n insertionEl = topLevelWrapper;\n } else {\n // If this is not top-level, append placeholder\n el.appendChild(placeholder);\n }\n }\n\n // Recursively call this function to insert other sections\n if (Object.keys(sections[section]).length && placeholder) {\n _this5.outputSections(templateId, insertionEl, sections[section]);\n }\n });\n }\n\n /**\n * Apply a modifier and merge classnames into template data, if it exists\n *\n * @param {object} data - data with which to render template\n * @param {string} modifier - target modifier\n *\n * @return {string} rendered - the modified HTML module\n */\n\n }, {\n key: 'provideClassnames',\n value: function provideClassnames(data) {\n if (this._classNames) {\n return Object.assign({}, data, { classNames: this._classNames });\n }\n\n return data;\n }\n\n /**\n * Regenerate module meta cache\n */\n\n }, {\n key: 'regenCache',\n value: function regenCache() {\n var _this6 = this;\n\n Object.keys(this._modules).forEach(function (moduleKey) {\n _this6.meta[moduleKey] = _this6.getMetaFromPath(moduleKey, _this6._modules[moduleKey]);\n });\n }\n\n /**\n * Recursively remove old tags\n *\n * @param {string} replaceKey - key of module for which we need to remove old tags\n * @param {object} tag - tag to start our search with\n * (usually the tag immediately preceding the current placeholder)\n */\n\n }, {\n key: 'removeOldTags',\n value: function removeOldTags(replaceKey, tag) {\n if (tag) {\n var parentModule = InsertNodes.getDataAttribute(tag, 'parent-module');\n var selfModule = InsertNodes.getDataAttribute(tag, 'self-module');\n\n if (parentModule === replaceKey && selfModule !== replaceKey) {\n // This is a child of the current module,\n // so remove it and its children (if applicable)\n var childrenModule = selfModule;\n var nextTag = tag.previousSibling;\n\n if (childrenModule) {\n this.removeOldTags(childrenModule, nextTag);\n // Reset nextTag if we removed a child\n nextTag = tag.previousSibling;\n }\n\n tag.parentNode.removeChild(tag);\n this.removeOldTags(replaceKey, nextTag);\n }\n }\n }\n\n /**\n * Replace a single template marker with template content.\n *\n * @param {object} replaceElements - Array of elements to check for Huron placeholders\n * @param {object} meta - Module metadata\n */\n\n }, {\n key: 'replaceTemplate',\n value: function replaceTemplate(meta, replaceElements) {\n var _this7 = this;\n\n var type = this.validateType(meta.type);\n var tags = [];\n var replace = replaceElements;\n var hasStyleguideHelpers = false;\n\n if (!replace) {\n replace = document.querySelectorAll('[data-huron-id][data-huron-type]');\n }\n\n if (type) {\n replace.forEach(function (tag) {\n var tagType = InsertNodes.getDataAttribute(tag, 'huron-type');\n var tagId = InsertNodes.getDataAttribute(tag, 'huron-id');\n\n if (tagId === meta.id && tagType === type) {\n tags.push(tag);\n }\n });\n\n if (tags && tags.length && meta.render) {\n tags.forEach(function (currentTag) {\n var modifiedPlaceholder = currentTag;\n var modifier = InsertNodes.getDataAttribute(modifiedPlaceholder, 'huron-modifier');\n var parent = modifiedPlaceholder.parentNode;\n var data = (0, _fp.compose)(_this7.provideClassnames.bind(_this7), InsertNodes.applyModifier)(meta.data, modifier);\n var rendered = meta.render(data);\n var renderedTemplate = InsertNodes.convertToElement(rendered).querySelector('template');\n var renderedContents = null;\n\n // Remove existing module tags\n _this7.removeOldTags(meta.replaceKey, modifiedPlaceholder.previousSibling);\n\n // Get the contents of the rendered template\n renderedContents = [].concat(_toConsumableArray(renderedTemplate.content.children));\n\n // Insert each tag of the template contents before placeholder\n renderedContents.forEach(function (element) {\n var newEl = element;\n\n if (1 === newEl.nodeType) {\n newEl.dataset.parentModule = meta.replaceKey;\n hasStyleguideHelpers = !hasStyleguideHelpers ? InsertNodes.isSectionHelper(newEl, meta) : hasStyleguideHelpers;\n\n parent.insertBefore(newEl, modifiedPlaceholder);\n }\n });\n\n // Add module replacement key to this placeholder\n modifiedPlaceholder.dataset.selfModule = meta.replaceKey;\n\n // Hide the placeholder\n modifiedPlaceholder.style.display = 'none';\n\n // Recursively load modules, excluding the current one\n _this7.cycleModules(renderedContents, {\n property: 'key',\n values: [meta.key, _this7._sectionTemplatePath],\n include: false\n });\n\n if (hasStyleguideHelpers) {\n _this7.cycleStyleguide();\n }\n });\n }\n } else {\n console.warn( // eslint-disable-line no-console\n 'Could not render module\\n section: ' + meta.id + '\\n type: ' + meta.type);\n }\n }\n\n /**\n * Verify specified element is using an acceptable huron type\n *\n * @param {string} type - type of partial (template, data, description, section or prototype )\n * @return {string} type - huron type or 'template' if invalid\n */\n\n }, {\n key: 'validateType',\n value: function validateType(type) {\n if ('data' === type) {\n return 'template';\n }\n\n if (!this._types.includes(type)) {\n return false;\n }\n\n return type;\n }\n\n /*\n * Set new modules object\n */\n\n }, {\n key: 'modules',\n set: function set(modules) {\n this._modules = modules;\n this._moduleIds = Object.keys(modules);\n }\n\n /*\n * Set store\n */\n\n }, {\n key: 'store',\n set: function set(store) {\n this._store = store;\n this._config = store.config;\n this._sections = store.sections;\n this._templates = store.templates;\n this._prototypes = store.prototypes;\n this._types = store.types;\n this._sectionTemplatePath = store.sectionTemplatePath;\n\n // Completely rerender prototype if any CSS modules classnames change\n if (!(0, _fp.isEqual)(this._classNames, store.classNames)) {\n var isInitialRender = !this._classNames;\n this._classNames = store.classNames;\n\n // Only rerender after initial render (when classnames is not falsy)\n if (!isInitialRender) {\n this.cycleModules();\n }\n }\n }\n }], [{\n key: 'applyModifier',\n value: function applyModifier(data, modifier) {\n // If we have a modifier, use it, otherwise use the entire data set\n if (modifier && data && data[modifier]) {\n return Object.assign({}, data[modifier], { modifier: modifier });\n }\n\n return data;\n }\n\n /**\n * Get markup from any type of module (html, json or template)\n *\n * @param {string} content - String corresponding to markup\n * @return {object} el.firstElementChild - HTML module\n */\n\n }, {\n key: 'convertToElement',\n value: function convertToElement(content) {\n var el = document.createElement('div');\n\n el.innerHTML = content;\n return el.firstElementChild;\n }\n\n /**\n * Filter module object by module key or module type\n *\n * @param {object} filter - Filter for modules. Options:\n * @param {string} filter.property - Which property to filter ('key' or 'type')\n * @param {array} filter.values - Values for property\n * @param {bool} filter.include - Whether the values should be included or excluded (true = include, false = exclude)\n * @param {object} moduleMeta - Filter for modules. Fields explained in the filterModules() function docs\n * @return {bool} match - determine if modules need to be filtered\n */\n\n }, {\n key: 'filterModules',\n value: function filterModules(filter, moduleMeta) {\n var match = true;\n\n // Check if we should filter out any modules\n if ('object' === (typeof filter === 'undefined' ? 'undefined' : _typeof(filter)) && {}.hasOwnProperty.call(filter, 'property') && {}.hasOwnProperty.call(filter, 'values') && {}.hasOwnProperty.call(filter, 'include')) {\n match = filter.values.filter(function (value) {\n return moduleMeta[filter.property] === value;\n });\n return Boolean(match.length) === filter.include;\n }\n\n console.log(' // eslint-disable-line no-console\\n filter ' + filter + ' is not in a valid format.\\n module filters must include \\'property\\', \\'values\\', and \\'include\\' properties\\n ');\n\n return match;\n }\n\n /**\n * Retrieve a data attribute from a tag using one of two methods\n *\n * @param {HTMLElement} tag - DOM node on which to check for a data attribute\n * @param {string} attr - attribute to check for\n * @returns {string} data - contents of data attribute\n */\n\n }, {\n key: 'getDataAttribute',\n value: function getDataAttribute(tag, attr) {\n var data = false;\n\n // Check if element has dataset and, if so, use it\n if (tag.dataset) {\n data = tag.dataset[attr];\n }\n\n // Fallback to getAttribute for ugly old Safari\n if (!data && tag.getAttribute) {\n data = tag.getAttribute('data-' + attr);\n }\n\n return data;\n }\n\n /**\n * Check if this tag is a styleguide helper\n *\n * @param {object} tag - tag to check\n * @param {object} meta - module metadata\n * @return {bool}\n */\n\n }, {\n key: 'isSectionHelper',\n value: function isSectionHelper(tag, meta) {\n if ('prototype' === meta.type) {\n return tag.hasAttribute('huron-sections') || tag.hasAttribute('huron-menu');\n }\n\n return false;\n }\n }]);\n\n return InsertNodes;\n}();\n/* eslint-enable */\n\n\nexports.default = InsertNodes;//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiLi9zcmMvd2ViL2luZGV4LmpzLmpzIiwic291cmNlcyI6WyJ3ZWJwYWNrOi8vL3NyYy93ZWIvaW5kZXguanM/NDYyYiJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjb21wb3NlLCBpc0VxdWFsIH0gZnJvbSAnbG9kYXNoL2ZwJztcblxuLyogZXNsaW50LWRpc2FibGUgbm8tdW5kZXJzY29yZS1kYW5n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XG4gICAgICAgICAgdGFncy5wdXNoKHRhZyk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICBpZiAodGFncyAmJiB0YWdzLmxlbmd0aCAmJiBtZXRhLnJlbmRlcikge1xuICAgICAgICB0YWdzLmZvckVhY2goKGN1cnJlbnRUYWcpID0+IHtcbiAgICAgICAgICBjb25zdCBtb2RpZmllZFBsYWNlaG9sZGVyID0gY3VycmVudFRhZztcbiAgICAgICAgICBjb25zdCBtb2RpZmllciA9IEluc2VydE5vZGVzXG4gICAgICAgICAgICAuZ2V0RGF0YUF0dHJpYnV0ZShtb2RpZmllZFBsYWNlaG9sZGVyLCAnaHVyb24tbW9kaWZpZXInKTtcbiAgICAgICAgICBjb25zdCBwYXJlbnQgPSBtb2RpZmllZFBsYWNlaG9sZGVyLnBhcmVudE5vZGU7XG4gICAgICAgICAgY29uc3QgZGF0YSA9IGNvbXBvc2UoXG4gICAgICAgICAgICB0aGlzLnByb3ZpZGVDbGFzc25hbWVzLmJpbmQodGhpcyksXG4gICAgICAgICAgICBJbnNlcnROb2Rlcy5hcHBseU1vZGlmaWVyXG4gICAgICAgICAgKShtZXRhLmRhdGEsIG1vZGlmaWVyKTtcbiAgICAgICAgICBjb25zdCByZW5kZXJlZCA9IG1ldGEucmVuZGVyKGRhdGEpO1xuICAgICAgICAgIGNvbnN0IHJlbmRlcmVkVGVtcGxhdGUgPSBJbnNlcnROb2Rlcy5jb252ZXJ0VG9FbGVtZW50KHJlbmRlcmVkKVxuICAgICAgICAgICAgICAucXVlcnlTZWxlY3RvcigndGVtcGxhdGUnKTtcbiAgICAgICAgICBsZXQgcmVuZGVyZWRDb250ZW50cyA9IG51bGw7XG5cbiAgICAgICAgICAvLyBSZW1vdmUgZXhpc3RpbmcgbW9kdWxlIHRhZ3NcbiAgICAgICAgICB0aGlzLnJlbW92ZU9sZFRhZ3MoXG4gICAgICAgICAgICBtZXRhLnJlcGxhY2VLZXksXG4gICAgICAgICAgICBtb2RpZmllZF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NBO0FBQ0E7Ozs7O0FBNm5CQTtBQUNBO0FBQ0E7QUFud0JBIiwic291cmNlUm9vdCI6IiJ9");
/***/ }),
/***/ 0:
+/* no static exports found */
+/* all exports used */
+/*!*****************************!*\
+ !*** multi ./src/web/index ***!
+ \*****************************/
/***/ (function(module, exports, __webpack_require__) {
-module.exports = __webpack_require__("./src/web/index.js");
+module.exports = __webpack_require__(/*! ./src/web/index */"./src/web/index.js");
/***/ })
-/******/ });
-//# sourceMappingURL=index.js.map
\ No newline at end of file
+/******/ });
\ No newline at end of file
diff --git a/dist/web/index.js.map b/dist/web/index.js.map
index d4c531e..25769dd 100644
--- a/dist/web/index.js.map
+++ b/dist/web/index.js.map
@@ -1 +1 @@
-{"version":3,"file":"index.js","sources":["webpack:///webpack/bootstrap f3c48dd287e1edf611a8","webpack:///./~/lodash/fp.js","webpack:///./~/lodash/fp/_baseConvert.js","webpack:///./~/lodash/fp/_mapping.js","webpack:///./~/lodash/fp/placeholder.js","webpack:///./~/lodash/lodash.min.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js","webpack:///src/web/index.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap f3c48dd287e1edf611a8","var _ = require('./lodash.min').runInContext();\nmodule.exports = require('./fp/_baseConvert')(_, _);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp.js\n// module id = ./node_modules/lodash/fp.js\n// module chunks = 0","var mapping = require('./_mapping'),\n fallbackHolder = require('./placeholder');\n\n/** Built-in value reference. */\nvar push = Array.prototype.push;\n\n/**\n * Creates a function, with an arity of `n`, that invokes `func` with the\n * arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} n The arity of the new function.\n * @returns {Function} Returns the new function.\n */\nfunction baseArity(func, n) {\n return n == 2\n ? function(a, b) { return func.apply(undefined, arguments); }\n : function(a) { return func.apply(undefined, arguments); };\n}\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments, ignoring\n * any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\nfunction baseAry(func, n) {\n return n == 2\n ? function(a, b) { return func(a, b); }\n : function(a) { return func(a); };\n}\n\n/**\n * Creates a clone of `array`.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the cloned array.\n */\nfunction cloneArray(array) {\n var length = array ? array.length : 0,\n result = Array(length);\n\n while (length--) {\n result[length] = array[length];\n }\n return result;\n}\n\n/**\n * Creates a function that clones a given object using the assignment `func`.\n *\n * @private\n * @param {Function} func The assignment function.\n * @returns {Function} Returns the new cloner function.\n */\nfunction createCloner(func) {\n return function(object) {\n return func({}, object);\n };\n}\n\n/**\n * A specialized version of `_.spread` which flattens the spread array into\n * the arguments of the invoked `func`.\n *\n * @private\n * @param {Function} func The function to spread arguments over.\n * @param {number} start The start position of the spread.\n * @returns {Function} Returns the new function.\n */\nfunction flatSpread(func, start) {\n return function() {\n var length = arguments.length,\n lastIndex = length - 1,\n args = Array(length);\n\n while (length--) {\n args[length] = arguments[length];\n }\n var array = args[start],\n otherArgs = args.slice(0, start);\n\n if (array) {\n push.apply(otherArgs, array);\n }\n if (start != lastIndex) {\n push.apply(otherArgs, args.slice(start + 1));\n }\n return func.apply(this, otherArgs);\n };\n}\n\n/**\n * Creates a function that wraps `func` and uses `cloner` to clone the first\n * argument it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} cloner The function to clone arguments.\n * @returns {Function} Returns the new immutable function.\n */\nfunction wrapImmutable(func, cloner) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return;\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var result = args[0] = cloner.apply(undefined, args);\n func.apply(undefined, args);\n return result;\n };\n}\n\n/**\n * The base implementation of `convert` which accepts a `util` object of methods\n * required to perform conversions.\n *\n * @param {Object} util The util object.\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.cap=true] Specify capping iteratee arguments.\n * @param {boolean} [options.curry=true] Specify currying.\n * @param {boolean} [options.fixed=true] Specify fixed arity.\n * @param {boolean} [options.immutable=true] Specify immutable operations.\n * @param {boolean} [options.rearg=true] Specify rearranging arguments.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction baseConvert(util, name, func, options) {\n var setPlaceholder,\n isLib = typeof name == 'function',\n isObj = name === Object(name);\n\n if (isObj) {\n options = func;\n func = name;\n name = undefined;\n }\n if (func == null) {\n throw new TypeError;\n }\n options || (options = {});\n\n var config = {\n 'cap': 'cap' in options ? options.cap : true,\n 'curry': 'curry' in options ? options.curry : true,\n 'fixed': 'fixed' in options ? options.fixed : true,\n 'immutable': 'immutable' in options ? options.immutable : true,\n 'rearg': 'rearg' in options ? options.rearg : true\n };\n\n var forceCurry = ('curry' in options) && options.curry,\n forceFixed = ('fixed' in options) && options.fixed,\n forceRearg = ('rearg' in options) && options.rearg,\n placeholder = isLib ? func : fallbackHolder,\n pristine = isLib ? func.runInContext() : undefined;\n\n var helpers = isLib ? func : {\n 'ary': util.ary,\n 'assign': util.assign,\n 'clone': util.clone,\n 'curry': util.curry,\n 'forEach': util.forEach,\n 'isArray': util.isArray,\n 'isFunction': util.isFunction,\n 'iteratee': util.iteratee,\n 'keys': util.keys,\n 'rearg': util.rearg,\n 'toInteger': util.toInteger,\n 'toPath': util.toPath\n };\n\n var ary = helpers.ary,\n assign = helpers.assign,\n clone = helpers.clone,\n curry = helpers.curry,\n each = helpers.forEach,\n isArray = helpers.isArray,\n isFunction = helpers.isFunction,\n keys = helpers.keys,\n rearg = helpers.rearg,\n toInteger = helpers.toInteger,\n toPath = helpers.toPath;\n\n var aryMethodKeys = keys(mapping.aryMethod);\n\n var wrappers = {\n 'castArray': function(castArray) {\n return function() {\n var value = arguments[0];\n return isArray(value)\n ? castArray(cloneArray(value))\n : castArray.apply(undefined, arguments);\n };\n },\n 'iteratee': function(iteratee) {\n return function() {\n var func = arguments[0],\n arity = arguments[1],\n result = iteratee(func, arity),\n length = result.length;\n\n if (config.cap && typeof arity == 'number') {\n arity = arity > 2 ? (arity - 2) : 1;\n return (length && length <= arity) ? result : baseAry(result, arity);\n }\n return result;\n };\n },\n 'mixin': function(mixin) {\n return function(source) {\n var func = this;\n if (!isFunction(func)) {\n return mixin(func, Object(source));\n }\n var pairs = [];\n each(keys(source), function(key) {\n if (isFunction(source[key])) {\n pairs.push([key, func.prototype[key]]);\n }\n });\n\n mixin(func, Object(source));\n\n each(pairs, function(pair) {\n var value = pair[1];\n if (isFunction(value)) {\n func.prototype[pair[0]] = value;\n } else {\n delete func.prototype[pair[0]];\n }\n });\n return func;\n };\n },\n 'nthArg': function(nthArg) {\n return function(n) {\n var arity = n < 0 ? 1 : (toInteger(n) + 1);\n return curry(nthArg(n), arity);\n };\n },\n 'rearg': function(rearg) {\n return function(func, indexes) {\n var arity = indexes ? indexes.length : 0;\n return curry(rearg(func, indexes), arity);\n };\n },\n 'runInContext': function(runInContext) {\n return function(context) {\n return baseConvert(util, runInContext(context), options);\n };\n }\n };\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Casts `func` to a function with an arity capped iteratee if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @returns {Function} Returns the cast function.\n */\n function castCap(name, func) {\n if (config.cap) {\n var indexes = mapping.iterateeRearg[name];\n if (indexes) {\n return iterateeRearg(func, indexes);\n }\n var n = !isLib && mapping.iterateeAry[name];\n if (n) {\n return iterateeAry(func, n);\n }\n }\n return func;\n }\n\n /**\n * Casts `func` to a curried function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castCurry(name, func, n) {\n return (forceCurry || (config.curry && n > 1))\n ? curry(func, n)\n : func;\n }\n\n /**\n * Casts `func` to a fixed arity function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the cast function.\n */\n function castFixed(name, func, n) {\n if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {\n var data = mapping.methodSpread[name],\n start = data && data.start;\n\n return start === undefined ? ary(func, n) : flatSpread(func, start);\n }\n return func;\n }\n\n /**\n * Casts `func` to an rearged function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castRearg(name, func, n) {\n return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))\n ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])\n : func;\n }\n\n /**\n * Creates a clone of `object` by `path`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {Array|string} path The path to clone by.\n * @returns {Object} Returns the cloned object.\n */\n function cloneByPath(object, path) {\n path = toPath(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n result = clone(Object(object)),\n nested = result;\n\n while (nested != null && ++index < length) {\n var key = path[index],\n value = nested[key];\n\n if (value != null) {\n nested[path[index]] = clone(index == lastIndex ? value : Object(value));\n }\n nested = nested[key];\n }\n return result;\n }\n\n /**\n * Converts `lodash` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied.\n *\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function} Returns the converted `lodash`.\n */\n function convertLib(options) {\n return _.runInContext.convert(options)(undefined);\n }\n\n /**\n * Create a converter function for `func` of `name`.\n *\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @returns {Function} Returns the new converter function.\n */\n function createConverter(name, func) {\n var realName = mapping.aliasToReal[name] || name,\n methodName = mapping.remap[realName] || realName,\n oldOptions = options;\n\n return function(options) {\n var newUtil = isLib ? pristine : helpers,\n newFunc = isLib ? pristine[methodName] : func,\n newOptions = assign(assign({}, oldOptions), options);\n\n return baseConvert(newUtil, realName, newFunc, newOptions);\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee, with up to `n`\n * arguments, ignoring any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap iteratee arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\n function iterateeAry(func, n) {\n return overArg(func, function(func) {\n return typeof func == 'function' ? baseAry(func, n) : func;\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee with arguments\n * arranged according to the specified `indexes` where the argument value at\n * the first index is provided as the first argument, the argument value at\n * the second index is provided as the second argument, and so on.\n *\n * @private\n * @param {Function} func The function to rearrange iteratee arguments for.\n * @param {number[]} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n */\n function iterateeRearg(func, indexes) {\n return overArg(func, function(func) {\n var n = indexes.length;\n return baseArity(rearg(baseAry(func, n), indexes), n);\n });\n }\n\n /**\n * Creates a function that invokes `func` with its first argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return func();\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var index = config.rearg ? 0 : (length - 1);\n args[index] = transform(args[index]);\n return func.apply(undefined, args);\n };\n }\n\n /**\n * Creates a function that wraps `func` and applys the conversions\n * rules by `name`.\n *\n * @private\n * @param {string} name The name of the function to wrap.\n * @param {Function} func The function to wrap.\n * @returns {Function} Returns the converted function.\n */\n function wrap(name, func) {\n var result,\n realName = mapping.aliasToReal[name] || name,\n wrapped = func,\n wrapper = wrappers[realName];\n\n if (wrapper) {\n wrapped = wrapper(func);\n }\n else if (config.immutable) {\n if (mapping.mutate.array[realName]) {\n wrapped = wrapImmutable(func, cloneArray);\n }\n else if (mapping.mutate.object[realName]) {\n wrapped = wrapImmutable(func, createCloner(func));\n }\n else if (mapping.mutate.set[realName]) {\n wrapped = wrapImmutable(func, cloneByPath);\n }\n }\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(otherName) {\n if (realName == otherName) {\n var data = mapping.methodSpread[realName],\n afterRearg = data && data.afterRearg;\n\n result = afterRearg\n ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)\n : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);\n\n result = castCap(realName, result);\n result = castCurry(realName, result, aryKey);\n return false;\n }\n });\n return !result;\n });\n\n result || (result = wrapped);\n if (result == func) {\n result = forceCurry ? curry(result, 1) : function() {\n return func.apply(this, arguments);\n };\n }\n result.convert = createConverter(realName, func);\n if (mapping.placeholder[realName]) {\n setPlaceholder = true;\n result.placeholder = func.placeholder = placeholder;\n }\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n if (!isObj) {\n return wrap(name, func);\n }\n var _ = func;\n\n // Convert methods by ary cap.\n var pairs = [];\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(key) {\n var func = _[mapping.remap[key] || key];\n if (func) {\n pairs.push([key, wrap(key, func)]);\n }\n });\n });\n\n // Convert remaining methods.\n each(keys(_), function(key) {\n var func = _[key];\n if (typeof func == 'function') {\n var length = pairs.length;\n while (length--) {\n if (pairs[length][0] == key) {\n return;\n }\n }\n func.convert = createConverter(key, func);\n pairs.push([key, func]);\n }\n });\n\n // Assign to `_` leaving `_.prototype` unchanged to allow chaining.\n each(pairs, function(pair) {\n _[pair[0]] = pair[1];\n });\n\n _.convert = convertLib;\n if (setPlaceholder) {\n _.placeholder = placeholder;\n }\n // Assign aliases.\n each(keys(_), function(key) {\n each(mapping.realToAlias[key] || [], function(alias) {\n _[alias] = _[key];\n });\n });\n\n return _;\n}\n\nmodule.exports = baseConvert;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/_baseConvert.js\n// module id = ./node_modules/lodash/fp/_baseConvert.js\n// module chunks = 0","/** Used to map aliases to their real names. */\nexports.aliasToReal = {\n\n // Lodash aliases.\n 'each': 'forEach',\n 'eachRight': 'forEachRight',\n 'entries': 'toPairs',\n 'entriesIn': 'toPairsIn',\n 'extend': 'assignIn',\n 'extendAll': 'assignInAll',\n 'extendAllWith': 'assignInAllWith',\n 'extendWith': 'assignInWith',\n 'first': 'head',\n\n // Methods that are curried variants of others.\n 'conforms': 'conformsTo',\n 'matches': 'isMatch',\n 'property': 'get',\n\n // Ramda aliases.\n '__': 'placeholder',\n 'F': 'stubFalse',\n 'T': 'stubTrue',\n 'all': 'every',\n 'allPass': 'overEvery',\n 'always': 'constant',\n 'any': 'some',\n 'anyPass': 'overSome',\n 'apply': 'spread',\n 'assoc': 'set',\n 'assocPath': 'set',\n 'complement': 'negate',\n 'compose': 'flowRight',\n 'contains': 'includes',\n 'dissoc': 'unset',\n 'dissocPath': 'unset',\n 'dropLast': 'dropRight',\n 'dropLastWhile': 'dropRightWhile',\n 'equals': 'isEqual',\n 'identical': 'eq',\n 'indexBy': 'keyBy',\n 'init': 'initial',\n 'invertObj': 'invert',\n 'juxt': 'over',\n 'omitAll': 'omit',\n 'nAry': 'ary',\n 'path': 'get',\n 'pathEq': 'matchesProperty',\n 'pathOr': 'getOr',\n 'paths': 'at',\n 'pickAll': 'pick',\n 'pipe': 'flow',\n 'pluck': 'map',\n 'prop': 'get',\n 'propEq': 'matchesProperty',\n 'propOr': 'getOr',\n 'props': 'at',\n 'symmetricDifference': 'xor',\n 'symmetricDifferenceBy': 'xorBy',\n 'symmetricDifferenceWith': 'xorWith',\n 'takeLast': 'takeRight',\n 'takeLastWhile': 'takeRightWhile',\n 'unapply': 'rest',\n 'unnest': 'flatten',\n 'useWith': 'overArgs',\n 'where': 'conformsTo',\n 'whereEq': 'isMatch',\n 'zipObj': 'zipObject'\n};\n\n/** Used to map ary to method names. */\nexports.aryMethod = {\n '1': [\n 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',\n 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',\n 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',\n 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',\n 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',\n 'uniqueId', 'words', 'zipAll'\n ],\n '2': [\n 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',\n 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',\n 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',\n 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',\n 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',\n 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',\n 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',\n 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',\n 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',\n 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',\n 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',\n 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',\n 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',\n 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',\n 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',\n 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',\n 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',\n 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',\n 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',\n 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',\n 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',\n 'zipObjectDeep'\n ],\n '3': [\n 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',\n 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',\n 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',\n 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',\n 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',\n 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',\n 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',\n 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',\n 'xorWith', 'zipWith'\n ],\n '4': [\n 'fill', 'setWith', 'updateWith'\n ]\n};\n\n/** Used to map ary to rearg configs. */\nexports.aryRearg = {\n '2': [1, 0],\n '3': [2, 0, 1],\n '4': [3, 2, 0, 1]\n};\n\n/** Used to map method names to their iteratee ary. */\nexports.iterateeAry = {\n 'dropRightWhile': 1,\n 'dropWhile': 1,\n 'every': 1,\n 'filter': 1,\n 'find': 1,\n 'findFrom': 1,\n 'findIndex': 1,\n 'findIndexFrom': 1,\n 'findKey': 1,\n 'findLast': 1,\n 'findLastFrom': 1,\n 'findLastIndex': 1,\n 'findLastIndexFrom': 1,\n 'findLastKey': 1,\n 'flatMap': 1,\n 'flatMapDeep': 1,\n 'flatMapDepth': 1,\n 'forEach': 1,\n 'forEachRight': 1,\n 'forIn': 1,\n 'forInRight': 1,\n 'forOwn': 1,\n 'forOwnRight': 1,\n 'map': 1,\n 'mapKeys': 1,\n 'mapValues': 1,\n 'partition': 1,\n 'reduce': 2,\n 'reduceRight': 2,\n 'reject': 1,\n 'remove': 1,\n 'some': 1,\n 'takeRightWhile': 1,\n 'takeWhile': 1,\n 'times': 1,\n 'transform': 2\n};\n\n/** Used to map method names to iteratee rearg configs. */\nexports.iterateeRearg = {\n 'mapKeys': [1],\n 'reduceRight': [1, 0]\n};\n\n/** Used to map method names to rearg configs. */\nexports.methodRearg = {\n 'assignInAllWith': [1, 0],\n 'assignInWith': [1, 2, 0],\n 'assignAllWith': [1, 0],\n 'assignWith': [1, 2, 0],\n 'differenceBy': [1, 2, 0],\n 'differenceWith': [1, 2, 0],\n 'getOr': [2, 1, 0],\n 'intersectionBy': [1, 2, 0],\n 'intersectionWith': [1, 2, 0],\n 'isEqualWith': [1, 2, 0],\n 'isMatchWith': [2, 1, 0],\n 'mergeAllWith': [1, 0],\n 'mergeWith': [1, 2, 0],\n 'padChars': [2, 1, 0],\n 'padCharsEnd': [2, 1, 0],\n 'padCharsStart': [2, 1, 0],\n 'pullAllBy': [2, 1, 0],\n 'pullAllWith': [2, 1, 0],\n 'rangeStep': [1, 2, 0],\n 'rangeStepRight': [1, 2, 0],\n 'setWith': [3, 1, 2, 0],\n 'sortedIndexBy': [2, 1, 0],\n 'sortedLastIndexBy': [2, 1, 0],\n 'unionBy': [1, 2, 0],\n 'unionWith': [1, 2, 0],\n 'updateWith': [3, 1, 2, 0],\n 'xorBy': [1, 2, 0],\n 'xorWith': [1, 2, 0],\n 'zipWith': [1, 2, 0]\n};\n\n/** Used to map method names to spread configs. */\nexports.methodSpread = {\n 'assignAll': { 'start': 0 },\n 'assignAllWith': { 'start': 0 },\n 'assignInAll': { 'start': 0 },\n 'assignInAllWith': { 'start': 0 },\n 'defaultsAll': { 'start': 0 },\n 'defaultsDeepAll': { 'start': 0 },\n 'invokeArgs': { 'start': 2 },\n 'invokeArgsMap': { 'start': 2 },\n 'mergeAll': { 'start': 0 },\n 'mergeAllWith': { 'start': 0 },\n 'partial': { 'start': 1 },\n 'partialRight': { 'start': 1 },\n 'without': { 'start': 1 },\n 'zipAll': { 'start': 0 }\n};\n\n/** Used to identify methods which mutate arrays or objects. */\nexports.mutate = {\n 'array': {\n 'fill': true,\n 'pull': true,\n 'pullAll': true,\n 'pullAllBy': true,\n 'pullAllWith': true,\n 'pullAt': true,\n 'remove': true,\n 'reverse': true\n },\n 'object': {\n 'assign': true,\n 'assignAll': true,\n 'assignAllWith': true,\n 'assignIn': true,\n 'assignInAll': true,\n 'assignInAllWith': true,\n 'assignInWith': true,\n 'assignWith': true,\n 'defaults': true,\n 'defaultsAll': true,\n 'defaultsDeep': true,\n 'defaultsDeepAll': true,\n 'merge': true,\n 'mergeAll': true,\n 'mergeAllWith': true,\n 'mergeWith': true,\n },\n 'set': {\n 'set': true,\n 'setWith': true,\n 'unset': true,\n 'update': true,\n 'updateWith': true\n }\n};\n\n/** Used to track methods with placeholder support */\nexports.placeholder = {\n 'bind': true,\n 'bindKey': true,\n 'curry': true,\n 'curryRight': true,\n 'partial': true,\n 'partialRight': true\n};\n\n/** Used to map real names to their aliases. */\nexports.realToAlias = (function() {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n object = exports.aliasToReal,\n result = {};\n\n for (var key in object) {\n var value = object[key];\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }\n return result;\n}());\n\n/** Used to map method names to other names. */\nexports.remap = {\n 'assignAll': 'assign',\n 'assignAllWith': 'assignWith',\n 'assignInAll': 'assignIn',\n 'assignInAllWith': 'assignInWith',\n 'curryN': 'curry',\n 'curryRightN': 'curryRight',\n 'defaultsAll': 'defaults',\n 'defaultsDeepAll': 'defaultsDeep',\n 'findFrom': 'find',\n 'findIndexFrom': 'findIndex',\n 'findLastFrom': 'findLast',\n 'findLastIndexFrom': 'findLastIndex',\n 'getOr': 'get',\n 'includesFrom': 'includes',\n 'indexOfFrom': 'indexOf',\n 'invokeArgs': 'invoke',\n 'invokeArgsMap': 'invokeMap',\n 'lastIndexOfFrom': 'lastIndexOf',\n 'mergeAll': 'merge',\n 'mergeAllWith': 'mergeWith',\n 'padChars': 'pad',\n 'padCharsEnd': 'padEnd',\n 'padCharsStart': 'padStart',\n 'propertyOf': 'get',\n 'rangeStep': 'range',\n 'rangeStepRight': 'rangeRight',\n 'restFrom': 'rest',\n 'spreadFrom': 'spread',\n 'trimChars': 'trim',\n 'trimCharsEnd': 'trimEnd',\n 'trimCharsStart': 'trimStart',\n 'zipAll': 'zip'\n};\n\n/** Used to track methods that skip fixing their arity. */\nexports.skipFixed = {\n 'castArray': true,\n 'flow': true,\n 'flowRight': true,\n 'iteratee': true,\n 'mixin': true,\n 'rearg': true,\n 'runInContext': true\n};\n\n/** Used to track methods that skip rearranging arguments. */\nexports.skipRearg = {\n 'add': true,\n 'assign': true,\n 'assignIn': true,\n 'bind': true,\n 'bindKey': true,\n 'concat': true,\n 'difference': true,\n 'divide': true,\n 'eq': true,\n 'gt': true,\n 'gte': true,\n 'isEqual': true,\n 'lt': true,\n 'lte': true,\n 'matchesProperty': true,\n 'merge': true,\n 'multiply': true,\n 'overArgs': true,\n 'partial': true,\n 'partialRight': true,\n 'propertyOf': true,\n 'random': true,\n 'range': true,\n 'rangeRight': true,\n 'subtract': true,\n 'zip': true,\n 'zipObject': true,\n 'zipObjectDeep': true\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/_mapping.js\n// module id = ./node_modules/lodash/fp/_mapping.js\n// module chunks = 0","/**\n * The default argument placeholder value for methods.\n *\n * @type {Object}\n */\nmodule.exports = {};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/placeholder.js\n// module id = ./node_modules/lodash/fp/placeholder.js\n// module chunks = 0","/**\n * @license\n * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE\n */\n;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u\"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\\s\\S]+?)%>/g,X=/<%([\\s\\S]+?)%>/g,nn=/<%=([\\s\\S]+?)%>/g,tn=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,rn=/^\\w*$/,en=/^\\./,un=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,on=/[\\\\^$.*+?()[\\]{}|]/g,fn=RegExp(on.source),cn=/^\\s+|\\s+$/g,an=/^\\s+/,ln=/\\s+$/,sn=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,hn=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,pn=/,? & /,_n=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,vn=/\\\\(\\\\)?/g,gn=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,dn=/\\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\\[object .+?Constructor\\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\\d*)$/,mn=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,An=/($^)/,kn=/['\\n\\r\\u2028\\u2029\\\\]/g,En=\"[\\\\ufe0e\\\\ufe0f]?(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?(?:\\\\u200d(?:[^\\\\ud800-\\\\udfff]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff])[\\\\ufe0e\\\\ufe0f]?(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?)*\",On=\"(?:[\\\\u2700-\\\\u27bf]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff])\"+En,Sn=\"(?:[^\\\\ud800-\\\\udfff][\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]?|[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]|[\\\\ud800-\\\\udfff])\",In=RegExp(\"['\\u2019]\",\"g\"),Rn=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\"),zn=RegExp(\"\\\\ud83c[\\\\udffb-\\\\udfff](?=\\\\ud83c[\\\\udffb-\\\\udfff])|\"+Sn+En,\"g\"),Wn=RegExp([\"[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]?[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]+(?:['\\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000]|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]|$)|(?:[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])+(?:['\\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000]|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde](?:[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])|$)|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]?(?:[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])+(?:['\\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]+(?:['\\u2019](?:D|LL|M|RE|S|T|VE))?|\\\\d*(?:(?:1ST|2ND|3RD|(?![123])\\\\dTH)\\\\b)|\\\\d*(?:(?:1st|2nd|3rd|(?![123])\\\\dth)\\\\b)|\\\\d+\",On].join(\"|\"),\"g\"),Bn=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un=\"Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout\".split(\" \"),Cn={};\nCn[\"[object Float32Array]\"]=Cn[\"[object Float64Array]\"]=Cn[\"[object Int8Array]\"]=Cn[\"[object Int16Array]\"]=Cn[\"[object Int32Array]\"]=Cn[\"[object Uint8Array]\"]=Cn[\"[object Uint8ClampedArray]\"]=Cn[\"[object Uint16Array]\"]=Cn[\"[object Uint32Array]\"]=true,Cn[\"[object Arguments]\"]=Cn[\"[object Array]\"]=Cn[\"[object ArrayBuffer]\"]=Cn[\"[object Boolean]\"]=Cn[\"[object DataView]\"]=Cn[\"[object Date]\"]=Cn[\"[object Error]\"]=Cn[\"[object Function]\"]=Cn[\"[object Map]\"]=Cn[\"[object Number]\"]=Cn[\"[object Object]\"]=Cn[\"[object RegExp]\"]=Cn[\"[object Set]\"]=Cn[\"[object String]\"]=Cn[\"[object WeakMap]\"]=false;\nvar Dn={};Dn[\"[object Arguments]\"]=Dn[\"[object Array]\"]=Dn[\"[object ArrayBuffer]\"]=Dn[\"[object DataView]\"]=Dn[\"[object Boolean]\"]=Dn[\"[object Date]\"]=Dn[\"[object Float32Array]\"]=Dn[\"[object Float64Array]\"]=Dn[\"[object Int8Array]\"]=Dn[\"[object Int16Array]\"]=Dn[\"[object Int32Array]\"]=Dn[\"[object Map]\"]=Dn[\"[object Number]\"]=Dn[\"[object Object]\"]=Dn[\"[object RegExp]\"]=Dn[\"[object Set]\"]=Dn[\"[object String]\"]=Dn[\"[object Symbol]\"]=Dn[\"[object Uint8Array]\"]=Dn[\"[object Uint8ClampedArray]\"]=Dn[\"[object Uint16Array]\"]=Dn[\"[object Uint32Array]\"]=true,\nDn[\"[object Error]\"]=Dn[\"[object Function]\"]=Dn[\"[object WeakMap]\"]=false;var Mn,Tn={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},$n=parseFloat,Fn=parseInt,Nn=typeof global==\"object\"&&global&&global.Object===Object&&global,Pn=typeof self==\"object\"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function(\"return this\")(),qn=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module==\"object\"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;\nn:{try{Mn=Gn&&Gn.binding&&Gn.binding(\"util\");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j(\"length\"),rt=w({\"\\xc0\":\"A\",\"\\xc1\":\"A\",\"\\xc2\":\"A\",\"\\xc3\":\"A\",\"\\xc4\":\"A\",\"\\xc5\":\"A\",\"\\xe0\":\"a\",\"\\xe1\":\"a\",\"\\xe2\":\"a\",\"\\xe3\":\"a\",\"\\xe4\":\"a\",\"\\xe5\":\"a\",\"\\xc7\":\"C\",\"\\xe7\":\"c\",\"\\xd0\":\"D\",\"\\xf0\":\"d\",\"\\xc8\":\"E\",\"\\xc9\":\"E\",\"\\xca\":\"E\",\"\\xcb\":\"E\",\"\\xe8\":\"e\",\"\\xe9\":\"e\",\"\\xea\":\"e\",\"\\xeb\":\"e\",\"\\xcc\":\"I\",\"\\xcd\":\"I\",\"\\xce\":\"I\",\n\"\\xcf\":\"I\",\"\\xec\":\"i\",\"\\xed\":\"i\",\"\\xee\":\"i\",\"\\xef\":\"i\",\"\\xd1\":\"N\",\"\\xf1\":\"n\",\"\\xd2\":\"O\",\"\\xd3\":\"O\",\"\\xd4\":\"O\",\"\\xd5\":\"O\",\"\\xd6\":\"O\",\"\\xd8\":\"O\",\"\\xf2\":\"o\",\"\\xf3\":\"o\",\"\\xf4\":\"o\",\"\\xf5\":\"o\",\"\\xf6\":\"o\",\"\\xf8\":\"o\",\"\\xd9\":\"U\",\"\\xda\":\"U\",\"\\xdb\":\"U\",\"\\xdc\":\"U\",\"\\xf9\":\"u\",\"\\xfa\":\"u\",\"\\xfb\":\"u\",\"\\xfc\":\"u\",\"\\xdd\":\"Y\",\"\\xfd\":\"y\",\"\\xff\":\"y\",\"\\xc6\":\"Ae\",\"\\xe6\":\"ae\",\"\\xde\":\"Th\",\"\\xfe\":\"th\",\"\\xdf\":\"ss\",\"\\u0100\":\"A\",\"\\u0102\":\"A\",\"\\u0104\":\"A\",\"\\u0101\":\"a\",\"\\u0103\":\"a\",\"\\u0105\":\"a\",\"\\u0106\":\"C\",\"\\u0108\":\"C\",\"\\u010a\":\"C\",\n\"\\u010c\":\"C\",\"\\u0107\":\"c\",\"\\u0109\":\"c\",\"\\u010b\":\"c\",\"\\u010d\":\"c\",\"\\u010e\":\"D\",\"\\u0110\":\"D\",\"\\u010f\":\"d\",\"\\u0111\":\"d\",\"\\u0112\":\"E\",\"\\u0114\":\"E\",\"\\u0116\":\"E\",\"\\u0118\":\"E\",\"\\u011a\":\"E\",\"\\u0113\":\"e\",\"\\u0115\":\"e\",\"\\u0117\":\"e\",\"\\u0119\":\"e\",\"\\u011b\":\"e\",\"\\u011c\":\"G\",\"\\u011e\":\"G\",\"\\u0120\":\"G\",\"\\u0122\":\"G\",\"\\u011d\":\"g\",\"\\u011f\":\"g\",\"\\u0121\":\"g\",\"\\u0123\":\"g\",\"\\u0124\":\"H\",\"\\u0126\":\"H\",\"\\u0125\":\"h\",\"\\u0127\":\"h\",\"\\u0128\":\"I\",\"\\u012a\":\"I\",\"\\u012c\":\"I\",\"\\u012e\":\"I\",\"\\u0130\":\"I\",\"\\u0129\":\"i\",\"\\u012b\":\"i\",\"\\u012d\":\"i\",\n\"\\u012f\":\"i\",\"\\u0131\":\"i\",\"\\u0134\":\"J\",\"\\u0135\":\"j\",\"\\u0136\":\"K\",\"\\u0137\":\"k\",\"\\u0138\":\"k\",\"\\u0139\":\"L\",\"\\u013b\":\"L\",\"\\u013d\":\"L\",\"\\u013f\":\"L\",\"\\u0141\":\"L\",\"\\u013a\":\"l\",\"\\u013c\":\"l\",\"\\u013e\":\"l\",\"\\u0140\":\"l\",\"\\u0142\":\"l\",\"\\u0143\":\"N\",\"\\u0145\":\"N\",\"\\u0147\":\"N\",\"\\u014a\":\"N\",\"\\u0144\":\"n\",\"\\u0146\":\"n\",\"\\u0148\":\"n\",\"\\u014b\":\"n\",\"\\u014c\":\"O\",\"\\u014e\":\"O\",\"\\u0150\":\"O\",\"\\u014d\":\"o\",\"\\u014f\":\"o\",\"\\u0151\":\"o\",\"\\u0154\":\"R\",\"\\u0156\":\"R\",\"\\u0158\":\"R\",\"\\u0155\":\"r\",\"\\u0157\":\"r\",\"\\u0159\":\"r\",\"\\u015a\":\"S\",\"\\u015c\":\"S\",\n\"\\u015e\":\"S\",\"\\u0160\":\"S\",\"\\u015b\":\"s\",\"\\u015d\":\"s\",\"\\u015f\":\"s\",\"\\u0161\":\"s\",\"\\u0162\":\"T\",\"\\u0164\":\"T\",\"\\u0166\":\"T\",\"\\u0163\":\"t\",\"\\u0165\":\"t\",\"\\u0167\":\"t\",\"\\u0168\":\"U\",\"\\u016a\":\"U\",\"\\u016c\":\"U\",\"\\u016e\":\"U\",\"\\u0170\":\"U\",\"\\u0172\":\"U\",\"\\u0169\":\"u\",\"\\u016b\":\"u\",\"\\u016d\":\"u\",\"\\u016f\":\"u\",\"\\u0171\":\"u\",\"\\u0173\":\"u\",\"\\u0174\":\"W\",\"\\u0175\":\"w\",\"\\u0176\":\"Y\",\"\\u0177\":\"y\",\"\\u0178\":\"Y\",\"\\u0179\":\"Z\",\"\\u017b\":\"Z\",\"\\u017d\":\"Z\",\"\\u017a\":\"z\",\"\\u017c\":\"z\",\"\\u017e\":\"z\",\"\\u0132\":\"IJ\",\"\\u0133\":\"ij\",\"\\u0152\":\"Oe\",\"\\u0153\":\"oe\",\n\"\\u0149\":\"'n\",\"\\u017f\":\"s\"}),et=w({\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"}),ut=w({\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,\"__wrapped__\"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,\nthis.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h=\"[object Function]\"==s||\"[object GeneratorFunction]\"==s;if(sf(n))return Wr(n,c);if(\"[object Object]\"==s||\"[object Arguments]\"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),\ni=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;\nif(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++ut}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&\"[object Arguments]\"==zt(n)}function Tt(n){return xu(n)&&\"[object ArrayBuffer]\"==zt(n)}function $t(n){return xu(n)&&\"[object Date]\"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{\nvar i=af(n),o=af(t),f=i?\"[object Array]\":yo(n),c=o?\"[object Array]\":yo(t),f=\"[object Arguments]\"==f?\"[object Object]\":f,c=\"[object Arguments]\"==c?\"[object Object]\":c,a=\"[object Object]\"==f,o=\"[object Object]\"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,\"__wrapped__\"),f=o&&ci.call(t,\"__wrapped__\"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),\ni=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*(\"desc\"==r[e]?-1:1);\nbreak n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e=u){for(;e>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:ot.length?n:It(n,vr(t,0,-1)),\nnull==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){\nif(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?F:i,u=1),t=ni(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,or?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(\"\"):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],\"__lodash_placeholder__\"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],\"__lodash_placeholder__\"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],\nr=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;\nfor(i.set(n,t),i.set(t,n);++cr&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),\ng(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){\nreturn r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!=\"function\")throw new ei(\"Expected a function\");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),\nr}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,\na=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!=\"function\")throw new ei(\"Expected a function\");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g=\"maxWait\"in r)?Di(Iu(r.maxWait)||0,t):l,d=\"trailing\"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),\nr.cache=i.set(u,e)||i,e)}if(typeof n!=\"function\"||null!=t&&typeof t!=\"function\")throw new ei(\"Expected a function\");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);\n}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return\"[object Error]\"==t||\"[object DOMException]\"==t||typeof n.message==\"string\"&&typeof n.name==\"string\"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),\"[object Function]\"==n||\"[object GeneratorFunction]\"==n||\"[object AsyncFunction]\"==n||\"[object Proxy]\"==n)}function du(n){return typeof n==\"number\"&&n==Ou(n)}function yu(n){return typeof n==\"number\"&&-1=n}function bu(n){var t=typeof n;return null!=n&&(\"object\"==t||\"function\"==t);\n}function xu(n){return null!=n&&typeof n==\"object\"}function ju(n){return typeof n==\"number\"||xu(n)&&\"[object Number]\"==zt(n)}function wu(n){return!(!xu(n)||\"[object Object]\"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,\"constructor\")&&n.constructor,typeof n==\"function\"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n==\"string\"||!af(n)&&xu(n)&&\"[object String]\"==zt(n)}function Au(n){return typeof n==\"symbol\"||xu(n)&&\"[object Symbol]\"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);\nif(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),(\"[object Map]\"==t?L:\"[object Set]\"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n==\"number\")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf==\"function\"?n.valueOf():n,n=bu(n)?n+\"\":n),typeof n!=\"string\")return 0===n?n:+n;\nn=n.replace(cn,\"\");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?\"\":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)(\"constructor\"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){\nif(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,\"\")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n==\"function\"?n:dt(n,1))}function Zu(n,t,r){\nvar e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&\"chain\"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){\nreturn false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En[\"__core-js_shared__\"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||\"\");return n?\"Symbol(src)_1.\"+n:\"\"}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti(\"^\"+fi.call(ci).replace(on,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){\ntry{var n=Ae(ni,\"defineProperty\");return n({},\"\",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,\"DataView\"),Zi=Ae(En,\"Map\"),qi=Ae(En,\"Promise\"),Vi=Ae(En,\"Set\"),Ki=Ae(En,\"WeakMap\"),Gi=Ae(ni,\"create\"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){\nfunction n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:\"\",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],\nthis.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],\"__lodash_hash_undefined__\"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?\"__lodash_hash_undefined__\":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),\n--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);\n},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,\"__lodash_hash_undefined__\"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){\nreturn this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,\"toString\",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){\nreturn Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&\"[object DataView]\"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&\"[object Map]\"!=yo(new Zi)||qi&&\"[object Promise]\"!=yo(qi.resolve())||Vi&&\"[object Set]\"!=yo(new Vi)||Ki&&\"[object WeakMap]\"!=yo(new Ki))&&(yo=function(n){\nvar t=zt(n);if(n=(n=\"[object Object]\"==t?n.constructor:F)?Fe(n):\"\")switch(n){case Yi:return\"[object DataView]\";case Qi:return\"[object Map]\";case Xi:return\"[object Promise]\";case no:return\"[object Set]\";case to:return\"[object WeakMap]\"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(\"\"),n.replace(un,function(n,r,e,u){\nt.push(e?u.replace(vn,\"$1\"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t==\"function\"?t:F)&&r.pop(),\nr.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t==\"function\"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),\nEr(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t==\"function\"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,\"callee\")&&!ji.call(n,\"callee\")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){\nif(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){\nvar r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},\nOn.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));et?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!=\"number\"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r>>0,r?(n=zu(n))&&(typeof t==\"string\"||null!=t&&!_f(t))&&(t=jr(t),\n!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){\nreturn n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!=\"function\")throw new ei(\"Expected a function\");return bu(r)&&(e=\"leading\"in r?!!r.leading:e,u=\"trailing\"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,\nOn.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t==\"function\"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);\n},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e==\"function\"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);\n},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t==\"function\"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t==\"function\"?t:F,dt(n,4,t)},\nOn.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,\"\\\\$&\"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));\n},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);\n},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&\"[object WeakMap]\"==yo(n)},On.isWeakSet=function(n){return xu(n)&&\"[object WeakSet]\"==zt(n)},On.join=function(n,t){\nreturn null==n?\"\":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){\nreturn n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return\"\"},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){\nn=zu(n);var e=(t=Ou(t))?T(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n(\"1e-\"+((r+\"\").length-1))),t)):cr(n,t);\n},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++en||9007199254740991=i)return n;if(i=r-T(e),1>i)return e;\nif(r=o?zr(o,0,i).join(\"\"):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+\"g\")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?\"Right\":\"\")}),e},Mn.prototype[n+\"Right\"]=function(t){\nreturn this.reverse()[n](t).reverse()}}),u([\"filter\",\"map\",\"takeWhile\"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u([\"head\",\"last\"],function(n,t){var r=\"take\"+(t?\"Right\":\"\");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u([\"initial\",\"tail\"],function(n,t){var r=\"drop\"+(t?\"\":\"Right\");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);\n}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n==\"function\"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),\nt!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?\"take\"+(\"last\"==t?\"Right\":\"\"):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);\nl&&r&&typeof a==\"function\"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u(\"pop push shift sort splice unshift\".split(\" \"),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?\"tap\":\"thru\",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){\nvar u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+\"\";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:\"wrapper\",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),\nn},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);\n},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define==\"function\"&&typeof define.amd==\"object\"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/lodash.min.js\n// module id = ./node_modules/lodash/lodash.min.js\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = ./node_modules/webpack/buildin/global.js\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = ./node_modules/webpack/buildin/module.js\n// module chunks = 0","import { compose, isEqual } from 'lodash/fp';\n\n/* eslint-disable no-underscore-dangle */\n// Accept the huron.js module for Huron development\nif (module.hot) {\n module.hot.accept();\n}\n\n/** Class for inserting HTML snippets at particular insertion points.\n * Uses require() to grab html partials, then inserts that html\n * into an element with attribute [huron-id] corresponding to the reference URI of the target KSS section,\n * and [huron-type] corresponding with the required KSS field\n */\nexport default class InsertNodes {\n\n constructor(modules, store) {\n /** webpack module list in which keys are relative require paths and values are the module contents */\n this._modules = modules;\n /** array of module keys */\n this._moduleIds = Object.keys(modules);\n /** reference to the huron config */\n this._config = null;\n /** KSS sections organized in various formats including by reference URI, by module key, and modules sorted by parent/child */\n this._sections = null;\n /** Key/value pairs of partner data and template files */\n this._templates = null;\n /** array of prototypes */\n this._prototypes = null;\n /** array of valid huron placeholder types */\n this._types = null;\n /** array of CSS modules classnames */\n this._classNames = null;\n\n /** Cache for module metadata */\n this.meta = {};\n\n /** Reference to entire memory store */\n this.store = store;\n\n // Inits\n this.cycleModules();\n this.cycleStyleguide();\n }\n\n /**\n * Apply a modifier if one exists\n *\n * @param {object} data - data with which to render template\n * @param {string} modifier - target modifier\n *\n * @return {string} data - subset of data object for supplied modifier\n */\n static applyModifier(data, modifier) {\n // If we have a modifier, use it, otherwise use the entire data set\n if (modifier && data && data[modifier]) {\n return Object.assign({}, data[modifier], { modifier });\n }\n\n return data;\n }\n\n /**\n * Get markup from any type of module (html, json or template)\n *\n * @param {string} content - String corresponding to markup\n * @return {object} el.firstElementChild - HTML module\n */\n static convertToElement(content) {\n const el = document.createElement('div');\n\n el.innerHTML = content;\n return el.firstElementChild;\n }\n\n /**\n * Filter module object by module key or module type\n *\n * @param {object} filter - Filter for modules. Options:\n * @param {string} filter.property - Which property to filter ('key' or 'type')\n * @param {array} filter.values - Values for property\n * @param {bool} filter.include - Whether the values should be included or excluded (true = include, false = exclude)\n * @param {object} moduleMeta - Filter for modules. Fields explained in the filterModules() function docs\n * @return {bool} match - determine if modules need to be filtered\n */\n static filterModules(filter, moduleMeta) {\n let match = true;\n\n // Check if we should filter out any modules\n if (\n 'object' === typeof filter &&\n {}.hasOwnProperty.call(filter, 'property') &&\n {}.hasOwnProperty.call(filter, 'values') &&\n {}.hasOwnProperty.call(filter, 'include')\n ) {\n match = filter.values.filter(\n (value) => moduleMeta[filter.property] === value\n );\n return Boolean(match.length) === filter.include;\n }\n\n console.log(` // eslint-disable-line no-console\n filter ${filter} is not in a valid format.\n module filters must include 'property', 'values', and 'include' properties\n `);\n\n return match;\n }\n\n /**\n * Retrieve a data attribute from a tag using one of two methods\n *\n * @param {HTMLElement} tag - DOM node on which to check for a data attribute\n * @param {string} attr - attribute to check for\n * @returns {string} data - contents of data attribute\n */\n static getDataAttribute(tag, attr) {\n let data = false;\n\n // Check if element has dataset and, if so, use it\n if (tag.dataset) {\n data = tag.dataset[attr];\n }\n\n // Fallback to getAttribute for ugly old Safari\n if (!data && tag.getAttribute) {\n data = tag.getAttribute(`data-${attr}`);\n }\n\n return data;\n }\n\n /**\n * Check if this tag is a styleguide helper\n *\n * @param {object} tag - tag to check\n * @param {object} meta - module metadata\n * @return {bool}\n */\n static isSectionHelper(tag, meta) {\n if ('prototype' === meta.type) {\n return tag.hasAttribute('huron-sections') ||\n tag.hasAttribute('huron-menu');\n }\n\n return false;\n }\n\n /**\n * Replace all template markers with the actual template markup.\n *\n * @param {string} context - The hash context for the module\n * @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs\n */\n cycleModules(context = false, filter = false) {\n let moduleList = {};\n let elementList = context;\n\n // We're replacing top-level elements\n if (!elementList) {\n this.regenCache();\n\n // Find all top-level huron placeholders\n elementList = [...document.querySelectorAll(\n '[data-huron-id][data-huron-type]'\n )];\n }\n\n moduleList = this.getModuleListFromTags(elementList);\n\n // Loop through modules array\n Object.keys(moduleList).forEach((key) => {\n const module = this._modules[key];\n const replaceElements = moduleList[key];\n\n this.loadModule(key, module, replaceElements, true, filter);\n });\n }\n\n /**\n * Helper for reloading sections only\n */\n cycleSections() {\n this.cycleModules(false, {\n property: 'type',\n values: ['section'],\n include: true,\n });\n }\n\n /**\n * Reload styleguide sections and menu helpers\n */\n cycleStyleguide() {\n const sectionsQuery = document.querySelector('[huron-sections]');\n const menuQuery = document.querySelector('[huron-menu]');\n\n // Sections\n if (sectionsQuery) {\n sectionsQuery.innerHTML = '';\n this.outputSections(null, sectionsQuery);\n this.cycleSections();\n }\n\n // Menu\n if (menuQuery) {\n menuQuery.innerHTML = '';\n\n if (null === document.querySelector('.section-menu__expand')) {\n const menuTrigger = document.createElement('button');\n\n menuTrigger.classList.add('section-menu__expand');\n menuTrigger.innerHTML = 'Sections Menu';\n document.body.insertBefore(\n menuQuery.appendChild(menuTrigger),\n document.body.childNodes[0]\n );\n\n // Add menu trigger handler\n menuTrigger.addEventListener('click', () => {\n document.body.classList.toggle('section-menu-open');\n });\n }\n\n // Create menu\n this.outputMenu(null, menuQuery);\n }\n }\n\n /**\n * Generate a hash string from a module key\n *\n * @param {string} key - module key (require path) to convert into a hash\n * @return {string} key - generated MD5 Hash\n */\n generateModuleHash(key) {\n let currentKey = key;\n\n // If module key is for data, use template key instead\n if (key.includes('-section.json')) {\n currentKey = this._sectionTemplatePath;\n } else if (key.includes('.json')) {\n currentKey = this._templates[key];\n }\n\n return `_${currentKey.replace(/[/.]/g, '_')}`;\n }\n\n /**\n * Get module metadata from a module require path\n *\n * @param {string} key - Module require path\n * @return {object} containing module id, module type, key and the module contents\n */\n getMetaFromPath(key, module) {\n const sections = this._sections.sectionsByPath;\n const templateTypes = this._types.filter((type) => 'prototype' !== type);\n let id = false;\n let type = false;\n\n /* eslint-disable space-unary-ops */\n if (-1 !== key.indexOf('./prototypes')) {\n /* eslint-enable space-unary-ops */\n const prototype = Object.keys(this._prototypes)\n .filter((name) => this._prototypes[name] === key);\n\n if (prototype.length) {\n id = prototype[0];\n type = 'prototype';\n }\n } else if (key === this._sectionTemplatePath) {\n id = 'sections-template';\n type = 'sections-template';\n } else {\n let testTypes = [];\n const testSections = Object.keys(sections).filter((section) => {\n const tempTypes = templateTypes.filter(\n (currentType) => sections[section][`${currentType}Path`] === key\n );\n\n if (tempTypes.length) {\n testTypes = tempTypes;\n return true;\n }\n\n return false;\n });\n\n if (\n testSections &&\n testSections.length &&\n testTypes &&\n testTypes.length\n ) {\n id = sections[testSections[0]].referenceURI;\n type = testTypes[0];\n }\n }\n\n if (id && type) {\n const renderData = this.getModuleRender(type, key, module);\n const replaceKey = this.generateModuleHash(key);\n\n if (renderData) {\n return Object.assign({ id, type, key, replaceKey, module }, renderData);\n }\n }\n\n console.warn( // eslint-disable-line no-console\n `Module '${key}' does not exist on the page\n or is no longer in use`\n );\n return false;\n }\n\n /**\n * Check if a tag is a huron placeholder and, if so,\n * return its associated module key\n *\n * @param {object} tag - tag to check\n * @return {bool} associated module key\n */\n getModuleKeyFromTag(tag) {\n // Safari/webkit has some trouble parsing dataset in certain cases.\n // This is a fallback method of accessing the same data.\n const type = InsertNodes.getDataAttribute(tag, 'huron-type');\n const id = InsertNodes.getDataAttribute(tag, 'huron-id');\n const section = this._sections.sectionsByURI[id];\n\n if (id && type) {\n if (section) {\n return section[`${type}Path`];\n } else if ('prototype' === type) {\n return this._prototypes[id];\n }\n }\n\n return false;\n }\n\n /**\n * Check if an array of elements contains a Huron placeholder\n *\n * @param {array} tags - array of DOM nodes\n * @param {bool} recurse - should we recurse this function with a new array\n * @return {object} moduleList - Huron placeholder DOM node\n */\n getModuleListFromTags(elements, recurse = true) {\n const moduleList = {};\n let newList = {};\n\n if (elements && elements.length) {\n elements.forEach((element) => {\n const moduleKey = this.getModuleKeyFromTag(element);\n\n if (moduleKey) {\n if (!moduleList[moduleKey]) {\n moduleList[moduleKey] = [];\n }\n moduleList[moduleKey].push(element);\n } else if (recurse) {\n newList = this.getModuleListFromTags(\n [...element.querySelectorAll('[data-huron-id][data-huron-type]')],\n false\n );\n\n Object.keys(newList).forEach((key) => {\n moduleList[key] = moduleList[key] ?\n moduleList[key].concat(newList[key]) :\n newList[key];\n });\n }\n });\n }\n\n return moduleList;\n }\n\n /**\n * Transform every module into a predictable object\n *\n * @param {object} type - Module metadata\n * @param {mixed} module - Module contents\n * @return {object} containing render function, render data and module id\n */\n getModuleRender(type, key, module) {\n let render = false;\n let data = false;\n\n if ('template' === type && 'function' === typeof module) {\n // It's a render function for a template\n render = module;\n data = this._modules[this._templates[key]];\n } else if (\n 'sections-template' === type &&\n 'function' === typeof module\n ) {\n // It's a kss section template\n render = module;\n } else if (\n 'section' === type &&\n 'object' === typeof module\n ) {\n // It's section data\n render = this._modules[this._sectionTemplatePath];\n data = module;\n } else if (\n ('template' === type || 'description' === type || 'prototype' === type) &&\n 'string' === typeof module\n ) {\n // it's straight HTML\n render = () => module;\n } else if ('data' === type && 'object' === typeof module) {\n // It's a data file (.json)\n render = this._modules[this._templates[key]];\n data = module;\n }\n\n // Only need render, as data will be left empty for static HTML\n if (render) {\n return { render, data };\n }\n\n return false;\n }\n\n /**\n * Replace all sections. For hot reloading use when the section template has changed.\n *\n * @param {object} replaceElements - The context (e.g. document) that you will query for the template ID to replace\n * @param {string} key - Module require path\n * @param {mixed} module - Module contents\n * @param {bool} cached - Whether or not to use cached values for module replacement\n * @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs\n */\n loadModule(key, module, replaceElements, cached = false, filter = false) {\n let shouldLoad = true;\n let moduleMeta = false;\n\n // Check if we should load from internal module metadata cache\n if (cached) {\n moduleMeta = this.meta[key];\n } else {\n moduleMeta = this.meta[key] = this.getMetaFromPath(key, module);\n }\n\n if (moduleMeta) {\n if (filter) {\n shouldLoad = InsertNodes.filterModules(filter, moduleMeta);\n }\n\n if (shouldLoad) {\n this.replaceTemplate(moduleMeta, replaceElements);\n }\n }\n }\n\n /*\n * Helper function for inserting styleguide sections.\n *\n * Recurses over sorted styleguide sections and inserts a to be used as a menu for each section\n */\n outputMenu(parent, el, sections = this._sections.sorted) {\n let templateId = null;\n let newEl = el;\n\n Object.keys(sections).forEach((section) => {\n const hasSubmenu = Object.keys(sections[section]).length;\n let menuTarget;\n let nextMenu;\n\n if (parent) {\n templateId = `${parent}-${section}`;\n } else {\n templateId = section;\n }\n\n if (newEl) {\n const title = this._sections\n .sectionsByURI[templateId] ?\n this._sections\n .sectionsByURI[templateId]\n .header :\n templateId;\n const sectionMenu = document.createElement('ul');\n const menuItem = document.createElement('li');\n const link = `${title}`;\n\n sectionMenu.classList.add('section-menu');\n menuItem.classList.add('section-menu__item');\n menuItem.innerHTML = link;\n\n // Check if this is a UL and, if not, create one\n if ('UL' !== newEl.tagName) {\n menuTarget = sectionMenu.cloneNode();\n newEl.appendChild(menuTarget);\n newEl = menuTarget;\n }\n\n // Has subsections\n if (hasSubmenu) {\n nextMenu = sectionMenu.cloneNode();\n nextMenu.classList.add('section-menu--submenu');\n menuItem.classList.add('section-menu__item--has-submenu');\n menuItem.appendChild(nextMenu);\n }\n\n newEl.appendChild(menuItem);\n\n if (hasSubmenu) {\n this.outputMenu(\n templateId,\n nextMenu,\n sections[section]\n );\n }\n }\n });\n }\n\n /**\n * Helper function for inserting styleguide sections.\n *\n * Recurses over sorted styleguide sections and inserts a tag with [huron-id] equal to the section template name.\n */\n outputSections(parent, el, sections = this._sections.sorted) {\n let templateId = null;\n let placeholder = null;\n\n Object.keys(sections).forEach((section) => {\n let istopLevel = false;\n let topLevelWrapper = null;\n let topLevelSection = null;\n let insertionEl = el;\n\n // Generate section ID and check if it is top-level\n if (parent) {\n templateId = `${parent}-${section}`;\n } else {\n templateId = section;\n istopLevel = true;\n }\n\n if (el) {\n // Generate huron placeholder for this section\n placeholder = document.createElement('div');\n placeholder.dataset.huronId = templateId;\n placeholder.dataset.huronType = 'section';\n\n if (istopLevel) {\n // Generate wrapper to contain top-level section and all subsections underneath it\n topLevelWrapper = document.createElement('div');\n topLevelWrapper.classList.add('section--top-level__wrapper');\n\n // Generate wrapper for top-level section\n topLevelSection = document.createElement('div');\n topLevelSection.classList.add('section', 'section--top-level');\n\n // Append wrappers to huron-sections element\n topLevelSection.appendChild(placeholder);\n topLevelWrapper.appendChild(topLevelSection);\n el.appendChild(topLevelWrapper);\n insertionEl = topLevelWrapper;\n } else {\n // If this is not top-level, append placeholder\n el.appendChild(placeholder);\n }\n }\n\n // Recursively call this function to insert other sections\n if (Object.keys(sections[section]).length && placeholder) {\n this.outputSections(\n templateId,\n insertionEl,\n sections[section]\n );\n }\n });\n }\n\n /**\n * Apply a modifier and merge classnames into template data, if it exists\n *\n * @param {object} data - data with which to render template\n * @param {string} modifier - target modifier\n *\n * @return {string} rendered - the modified HTML module\n */\n provideClassnames(data) {\n if (this._classNames) {\n return Object.assign({}, data, { classNames: this._classNames });\n }\n\n return data;\n }\n\n /**\n * Regenerate module meta cache\n */\n regenCache() {\n Object.keys(this._modules).forEach((moduleKey) => {\n this.meta[moduleKey] = this.getMetaFromPath(\n moduleKey, this._modules[moduleKey]\n );\n });\n }\n\n /**\n * Recursively remove old tags\n *\n * @param {string} replaceKey - key of module for which we need to remove old tags\n * @param {object} tag - tag to start our search with\n * (usually the tag immediately preceding the current placeholder)\n */\n removeOldTags(replaceKey, tag) {\n if (tag) {\n const parentModule = InsertNodes.getDataAttribute(tag, 'parent-module');\n const selfModule = InsertNodes.getDataAttribute(tag, 'self-module');\n\n if (parentModule === replaceKey && selfModule !== replaceKey) {\n // This is a child of the current module,\n // so remove it and its children (if applicable)\n const childrenModule = selfModule;\n let nextTag = tag.previousSibling;\n\n if (childrenModule) {\n this.removeOldTags(childrenModule, nextTag);\n // Reset nextTag if we removed a child\n nextTag = tag.previousSibling;\n }\n\n tag.parentNode.removeChild(tag);\n this.removeOldTags(replaceKey, nextTag);\n }\n }\n }\n\n /**\n * Replace a single template marker with template content.\n *\n * @param {object} replaceElements - Array of elements to check for Huron placeholders\n * @param {object} meta - Module metadata\n */\n replaceTemplate(meta, replaceElements) {\n const type = this.validateType(meta.type);\n const tags = [];\n let replace = replaceElements;\n let hasStyleguideHelpers = false;\n\n if (!replace) {\n replace = document.querySelectorAll(\n '[data-huron-id][data-huron-type]'\n );\n }\n\n if (type) {\n replace.forEach((tag) => {\n const tagType = InsertNodes.getDataAttribute(tag, 'huron-type');\n const tagId = InsertNodes.getDataAttribute(tag, 'huron-id');\n\n if (tagId === meta.id && tagType === type) {\n tags.push(tag);\n }\n });\n\n if (tags && tags.length && meta.render) {\n tags.forEach((currentTag) => {\n const modifiedPlaceholder = currentTag;\n const modifier = InsertNodes\n .getDataAttribute(modifiedPlaceholder, 'huron-modifier');\n const parent = modifiedPlaceholder.parentNode;\n const data = compose(\n this.provideClassnames.bind(this),\n InsertNodes.applyModifier\n )(meta.data, modifier);\n const rendered = meta.render(data);\n const renderedTemplate = InsertNodes.convertToElement(rendered)\n .querySelector('template');\n let renderedContents = null;\n\n // Remove existing module tags\n this.removeOldTags(\n meta.replaceKey,\n modifiedPlaceholder.previousSibling\n );\n\n // Get the contents of the rendered template\n renderedContents = [\n ...renderedTemplate.content.children,\n ];\n\n // Insert each tag of the template contents before placeholder\n renderedContents.forEach((element) => {\n const newEl = element;\n\n if (1 === newEl.nodeType) {\n newEl.dataset.parentModule = meta.replaceKey;\n hasStyleguideHelpers = !hasStyleguideHelpers ?\n InsertNodes.isSectionHelper(newEl, meta) :\n hasStyleguideHelpers;\n\n parent.insertBefore(newEl, modifiedPlaceholder);\n }\n });\n\n // Add module hash to this placeholder\n modifiedPlaceholder.dataset.selfModule = meta.replaceKey;\n\n // Hide the placeholder\n modifiedPlaceholder.style.display = 'none';\n\n // Recursively load modules, excluding the current one\n this.cycleModules(renderedContents, {\n property: 'key',\n values: [meta.key, this._sectionTemplatePath],\n include: false,\n });\n\n if (hasStyleguideHelpers) {\n this.cycleStyleguide();\n }\n });\n }\n } else {\n console.warn( // eslint-disable-line no-console\n `Could not render module\n section: ${meta.id}\n type: ${meta.type}`\n );\n }\n }\n\n /**\n * Verify specified element is using an acceptable huron type\n *\n * @param {string} type - type of partial (template, data, description, section or prototype )\n * @return {string} type - huron type or 'template' if invalid\n */\n validateType(type) {\n if ('data' === type) {\n return 'template';\n }\n\n if (!this._types.includes(type)) {\n return false;\n }\n\n return type;\n }\n\n /*\n * Set new modules object\n */\n set modules(modules) {\n this._modules = modules;\n this._moduleIds = Object.keys(modules);\n }\n\n /*\n * Set store\n */\n set store(store) {\n this._store = store;\n this._config = store.config;\n this._sections = store.sections;\n this._templates = store.templates;\n this._prototypes = store.prototypes;\n this._types = store.types;\n this._sectionTemplatePath = store.sectionTemplatePath;\n\n // Completely rerender prototype if any CSS modules classnames change\n if (!isEqual(this._classNames, store.classNames)) {\n const isInitialRender = !this._classNames;\n this._classNames = store.classNames;\n\n // Only rerender after initial render (when classnames is not falsy)\n if (!isInitialRender) {\n this.cycleModules();\n }\n }\n }\n}\n/* eslint-enable */\n\n\n\n// WEBPACK FOOTER //\n// src/web/index.js"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;A;;;;;AChEA;AACA;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/WA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACrBA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAKA;AAEA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAuGA;;;;;;AAMA;AAAA;AACA;AADA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAIA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAIA;AACA;AACA;AACA;AAIA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AAGA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAKA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAvtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AAMA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;AA4nBA;AACA;AACA;AAlwBA;;;;;;;;;;;;A","sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"index.js","sources":["webpack:///webpack/bootstrap 4bd027993a09f543db54","webpack:///./~/lodash/fp.js","webpack:///./~/lodash/fp/_baseConvert.js","webpack:///./~/lodash/fp/_mapping.js","webpack:///./~/lodash/fp/placeholder.js","webpack:///./~/lodash/lodash.min.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js","webpack:///src/web/index.js"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// identity function for calling harmony imports with the correct context\n \t__webpack_require__.i = function(value) { return value; };\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"../\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 4bd027993a09f543db54","var _ = require('./lodash.min').runInContext();\nmodule.exports = require('./fp/_baseConvert')(_, _);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp.js\n// module id = ./node_modules/lodash/fp.js\n// module chunks = 0","var mapping = require('./_mapping'),\n fallbackHolder = require('./placeholder');\n\n/** Built-in value reference. */\nvar push = Array.prototype.push;\n\n/**\n * Creates a function, with an arity of `n`, that invokes `func` with the\n * arguments it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} n The arity of the new function.\n * @returns {Function} Returns the new function.\n */\nfunction baseArity(func, n) {\n return n == 2\n ? function(a, b) { return func.apply(undefined, arguments); }\n : function(a) { return func.apply(undefined, arguments); };\n}\n\n/**\n * Creates a function that invokes `func`, with up to `n` arguments, ignoring\n * any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\nfunction baseAry(func, n) {\n return n == 2\n ? function(a, b) { return func(a, b); }\n : function(a) { return func(a); };\n}\n\n/**\n * Creates a clone of `array`.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the cloned array.\n */\nfunction cloneArray(array) {\n var length = array ? array.length : 0,\n result = Array(length);\n\n while (length--) {\n result[length] = array[length];\n }\n return result;\n}\n\n/**\n * Creates a function that clones a given object using the assignment `func`.\n *\n * @private\n * @param {Function} func The assignment function.\n * @returns {Function} Returns the new cloner function.\n */\nfunction createCloner(func) {\n return function(object) {\n return func({}, object);\n };\n}\n\n/**\n * A specialized version of `_.spread` which flattens the spread array into\n * the arguments of the invoked `func`.\n *\n * @private\n * @param {Function} func The function to spread arguments over.\n * @param {number} start The start position of the spread.\n * @returns {Function} Returns the new function.\n */\nfunction flatSpread(func, start) {\n return function() {\n var length = arguments.length,\n lastIndex = length - 1,\n args = Array(length);\n\n while (length--) {\n args[length] = arguments[length];\n }\n var array = args[start],\n otherArgs = args.slice(0, start);\n\n if (array) {\n push.apply(otherArgs, array);\n }\n if (start != lastIndex) {\n push.apply(otherArgs, args.slice(start + 1));\n }\n return func.apply(this, otherArgs);\n };\n}\n\n/**\n * Creates a function that wraps `func` and uses `cloner` to clone the first\n * argument it receives.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} cloner The function to clone arguments.\n * @returns {Function} Returns the new immutable function.\n */\nfunction wrapImmutable(func, cloner) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return;\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var result = args[0] = cloner.apply(undefined, args);\n func.apply(undefined, args);\n return result;\n };\n}\n\n/**\n * The base implementation of `convert` which accepts a `util` object of methods\n * required to perform conversions.\n *\n * @param {Object} util The util object.\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @param {Object} [options] The options object.\n * @param {boolean} [options.cap=true] Specify capping iteratee arguments.\n * @param {boolean} [options.curry=true] Specify currying.\n * @param {boolean} [options.fixed=true] Specify fixed arity.\n * @param {boolean} [options.immutable=true] Specify immutable operations.\n * @param {boolean} [options.rearg=true] Specify rearranging arguments.\n * @returns {Function|Object} Returns the converted function or object.\n */\nfunction baseConvert(util, name, func, options) {\n var setPlaceholder,\n isLib = typeof name == 'function',\n isObj = name === Object(name);\n\n if (isObj) {\n options = func;\n func = name;\n name = undefined;\n }\n if (func == null) {\n throw new TypeError;\n }\n options || (options = {});\n\n var config = {\n 'cap': 'cap' in options ? options.cap : true,\n 'curry': 'curry' in options ? options.curry : true,\n 'fixed': 'fixed' in options ? options.fixed : true,\n 'immutable': 'immutable' in options ? options.immutable : true,\n 'rearg': 'rearg' in options ? options.rearg : true\n };\n\n var forceCurry = ('curry' in options) && options.curry,\n forceFixed = ('fixed' in options) && options.fixed,\n forceRearg = ('rearg' in options) && options.rearg,\n placeholder = isLib ? func : fallbackHolder,\n pristine = isLib ? func.runInContext() : undefined;\n\n var helpers = isLib ? func : {\n 'ary': util.ary,\n 'assign': util.assign,\n 'clone': util.clone,\n 'curry': util.curry,\n 'forEach': util.forEach,\n 'isArray': util.isArray,\n 'isFunction': util.isFunction,\n 'iteratee': util.iteratee,\n 'keys': util.keys,\n 'rearg': util.rearg,\n 'toInteger': util.toInteger,\n 'toPath': util.toPath\n };\n\n var ary = helpers.ary,\n assign = helpers.assign,\n clone = helpers.clone,\n curry = helpers.curry,\n each = helpers.forEach,\n isArray = helpers.isArray,\n isFunction = helpers.isFunction,\n keys = helpers.keys,\n rearg = helpers.rearg,\n toInteger = helpers.toInteger,\n toPath = helpers.toPath;\n\n var aryMethodKeys = keys(mapping.aryMethod);\n\n var wrappers = {\n 'castArray': function(castArray) {\n return function() {\n var value = arguments[0];\n return isArray(value)\n ? castArray(cloneArray(value))\n : castArray.apply(undefined, arguments);\n };\n },\n 'iteratee': function(iteratee) {\n return function() {\n var func = arguments[0],\n arity = arguments[1],\n result = iteratee(func, arity),\n length = result.length;\n\n if (config.cap && typeof arity == 'number') {\n arity = arity > 2 ? (arity - 2) : 1;\n return (length && length <= arity) ? result : baseAry(result, arity);\n }\n return result;\n };\n },\n 'mixin': function(mixin) {\n return function(source) {\n var func = this;\n if (!isFunction(func)) {\n return mixin(func, Object(source));\n }\n var pairs = [];\n each(keys(source), function(key) {\n if (isFunction(source[key])) {\n pairs.push([key, func.prototype[key]]);\n }\n });\n\n mixin(func, Object(source));\n\n each(pairs, function(pair) {\n var value = pair[1];\n if (isFunction(value)) {\n func.prototype[pair[0]] = value;\n } else {\n delete func.prototype[pair[0]];\n }\n });\n return func;\n };\n },\n 'nthArg': function(nthArg) {\n return function(n) {\n var arity = n < 0 ? 1 : (toInteger(n) + 1);\n return curry(nthArg(n), arity);\n };\n },\n 'rearg': function(rearg) {\n return function(func, indexes) {\n var arity = indexes ? indexes.length : 0;\n return curry(rearg(func, indexes), arity);\n };\n },\n 'runInContext': function(runInContext) {\n return function(context) {\n return baseConvert(util, runInContext(context), options);\n };\n }\n };\n\n /*--------------------------------------------------------------------------*/\n\n /**\n * Casts `func` to a function with an arity capped iteratee if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @returns {Function} Returns the cast function.\n */\n function castCap(name, func) {\n if (config.cap) {\n var indexes = mapping.iterateeRearg[name];\n if (indexes) {\n return iterateeRearg(func, indexes);\n }\n var n = !isLib && mapping.iterateeAry[name];\n if (n) {\n return iterateeAry(func, n);\n }\n }\n return func;\n }\n\n /**\n * Casts `func` to a curried function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castCurry(name, func, n) {\n return (forceCurry || (config.curry && n > 1))\n ? curry(func, n)\n : func;\n }\n\n /**\n * Casts `func` to a fixed arity function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the cast function.\n */\n function castFixed(name, func, n) {\n if (config.fixed && (forceFixed || !mapping.skipFixed[name])) {\n var data = mapping.methodSpread[name],\n start = data && data.start;\n\n return start === undefined ? ary(func, n) : flatSpread(func, start);\n }\n return func;\n }\n\n /**\n * Casts `func` to an rearged function if needed.\n *\n * @private\n * @param {string} name The name of the function to inspect.\n * @param {Function} func The function to inspect.\n * @param {number} n The arity of `func`.\n * @returns {Function} Returns the cast function.\n */\n function castRearg(name, func, n) {\n return (config.rearg && n > 1 && (forceRearg || !mapping.skipRearg[name]))\n ? rearg(func, mapping.methodRearg[name] || mapping.aryRearg[n])\n : func;\n }\n\n /**\n * Creates a clone of `object` by `path`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {Array|string} path The path to clone by.\n * @returns {Object} Returns the cloned object.\n */\n function cloneByPath(object, path) {\n path = toPath(path);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n result = clone(Object(object)),\n nested = result;\n\n while (nested != null && ++index < length) {\n var key = path[index],\n value = nested[key];\n\n if (value != null) {\n nested[path[index]] = clone(index == lastIndex ? value : Object(value));\n }\n nested = nested[key];\n }\n return result;\n }\n\n /**\n * Converts `lodash` to an immutable auto-curried iteratee-first data-last\n * version with conversion `options` applied.\n *\n * @param {Object} [options] The options object. See `baseConvert` for more details.\n * @returns {Function} Returns the converted `lodash`.\n */\n function convertLib(options) {\n return _.runInContext.convert(options)(undefined);\n }\n\n /**\n * Create a converter function for `func` of `name`.\n *\n * @param {string} name The name of the function to convert.\n * @param {Function} func The function to convert.\n * @returns {Function} Returns the new converter function.\n */\n function createConverter(name, func) {\n var realName = mapping.aliasToReal[name] || name,\n methodName = mapping.remap[realName] || realName,\n oldOptions = options;\n\n return function(options) {\n var newUtil = isLib ? pristine : helpers,\n newFunc = isLib ? pristine[methodName] : func,\n newOptions = assign(assign({}, oldOptions), options);\n\n return baseConvert(newUtil, realName, newFunc, newOptions);\n };\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee, with up to `n`\n * arguments, ignoring any additional arguments.\n *\n * @private\n * @param {Function} func The function to cap iteratee arguments for.\n * @param {number} n The arity cap.\n * @returns {Function} Returns the new function.\n */\n function iterateeAry(func, n) {\n return overArg(func, function(func) {\n return typeof func == 'function' ? baseAry(func, n) : func;\n });\n }\n\n /**\n * Creates a function that wraps `func` to invoke its iteratee with arguments\n * arranged according to the specified `indexes` where the argument value at\n * the first index is provided as the first argument, the argument value at\n * the second index is provided as the second argument, and so on.\n *\n * @private\n * @param {Function} func The function to rearrange iteratee arguments for.\n * @param {number[]} indexes The arranged argument indexes.\n * @returns {Function} Returns the new function.\n */\n function iterateeRearg(func, indexes) {\n return overArg(func, function(func) {\n var n = indexes.length;\n return baseArity(rearg(baseAry(func, n), indexes), n);\n });\n }\n\n /**\n * Creates a function that invokes `func` with its first argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n function overArg(func, transform) {\n return function() {\n var length = arguments.length;\n if (!length) {\n return func();\n }\n var args = Array(length);\n while (length--) {\n args[length] = arguments[length];\n }\n var index = config.rearg ? 0 : (length - 1);\n args[index] = transform(args[index]);\n return func.apply(undefined, args);\n };\n }\n\n /**\n * Creates a function that wraps `func` and applys the conversions\n * rules by `name`.\n *\n * @private\n * @param {string} name The name of the function to wrap.\n * @param {Function} func The function to wrap.\n * @returns {Function} Returns the converted function.\n */\n function wrap(name, func) {\n var result,\n realName = mapping.aliasToReal[name] || name,\n wrapped = func,\n wrapper = wrappers[realName];\n\n if (wrapper) {\n wrapped = wrapper(func);\n }\n else if (config.immutable) {\n if (mapping.mutate.array[realName]) {\n wrapped = wrapImmutable(func, cloneArray);\n }\n else if (mapping.mutate.object[realName]) {\n wrapped = wrapImmutable(func, createCloner(func));\n }\n else if (mapping.mutate.set[realName]) {\n wrapped = wrapImmutable(func, cloneByPath);\n }\n }\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(otherName) {\n if (realName == otherName) {\n var data = mapping.methodSpread[realName],\n afterRearg = data && data.afterRearg;\n\n result = afterRearg\n ? castFixed(realName, castRearg(realName, wrapped, aryKey), aryKey)\n : castRearg(realName, castFixed(realName, wrapped, aryKey), aryKey);\n\n result = castCap(realName, result);\n result = castCurry(realName, result, aryKey);\n return false;\n }\n });\n return !result;\n });\n\n result || (result = wrapped);\n if (result == func) {\n result = forceCurry ? curry(result, 1) : function() {\n return func.apply(this, arguments);\n };\n }\n result.convert = createConverter(realName, func);\n if (mapping.placeholder[realName]) {\n setPlaceholder = true;\n result.placeholder = func.placeholder = placeholder;\n }\n return result;\n }\n\n /*--------------------------------------------------------------------------*/\n\n if (!isObj) {\n return wrap(name, func);\n }\n var _ = func;\n\n // Convert methods by ary cap.\n var pairs = [];\n each(aryMethodKeys, function(aryKey) {\n each(mapping.aryMethod[aryKey], function(key) {\n var func = _[mapping.remap[key] || key];\n if (func) {\n pairs.push([key, wrap(key, func)]);\n }\n });\n });\n\n // Convert remaining methods.\n each(keys(_), function(key) {\n var func = _[key];\n if (typeof func == 'function') {\n var length = pairs.length;\n while (length--) {\n if (pairs[length][0] == key) {\n return;\n }\n }\n func.convert = createConverter(key, func);\n pairs.push([key, func]);\n }\n });\n\n // Assign to `_` leaving `_.prototype` unchanged to allow chaining.\n each(pairs, function(pair) {\n _[pair[0]] = pair[1];\n });\n\n _.convert = convertLib;\n if (setPlaceholder) {\n _.placeholder = placeholder;\n }\n // Assign aliases.\n each(keys(_), function(key) {\n each(mapping.realToAlias[key] || [], function(alias) {\n _[alias] = _[key];\n });\n });\n\n return _;\n}\n\nmodule.exports = baseConvert;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/_baseConvert.js\n// module id = ./node_modules/lodash/fp/_baseConvert.js\n// module chunks = 0","/** Used to map aliases to their real names. */\nexports.aliasToReal = {\n\n // Lodash aliases.\n 'each': 'forEach',\n 'eachRight': 'forEachRight',\n 'entries': 'toPairs',\n 'entriesIn': 'toPairsIn',\n 'extend': 'assignIn',\n 'extendAll': 'assignInAll',\n 'extendAllWith': 'assignInAllWith',\n 'extendWith': 'assignInWith',\n 'first': 'head',\n\n // Methods that are curried variants of others.\n 'conforms': 'conformsTo',\n 'matches': 'isMatch',\n 'property': 'get',\n\n // Ramda aliases.\n '__': 'placeholder',\n 'F': 'stubFalse',\n 'T': 'stubTrue',\n 'all': 'every',\n 'allPass': 'overEvery',\n 'always': 'constant',\n 'any': 'some',\n 'anyPass': 'overSome',\n 'apply': 'spread',\n 'assoc': 'set',\n 'assocPath': 'set',\n 'complement': 'negate',\n 'compose': 'flowRight',\n 'contains': 'includes',\n 'dissoc': 'unset',\n 'dissocPath': 'unset',\n 'dropLast': 'dropRight',\n 'dropLastWhile': 'dropRightWhile',\n 'equals': 'isEqual',\n 'identical': 'eq',\n 'indexBy': 'keyBy',\n 'init': 'initial',\n 'invertObj': 'invert',\n 'juxt': 'over',\n 'omitAll': 'omit',\n 'nAry': 'ary',\n 'path': 'get',\n 'pathEq': 'matchesProperty',\n 'pathOr': 'getOr',\n 'paths': 'at',\n 'pickAll': 'pick',\n 'pipe': 'flow',\n 'pluck': 'map',\n 'prop': 'get',\n 'propEq': 'matchesProperty',\n 'propOr': 'getOr',\n 'props': 'at',\n 'symmetricDifference': 'xor',\n 'symmetricDifferenceBy': 'xorBy',\n 'symmetricDifferenceWith': 'xorWith',\n 'takeLast': 'takeRight',\n 'takeLastWhile': 'takeRightWhile',\n 'unapply': 'rest',\n 'unnest': 'flatten',\n 'useWith': 'overArgs',\n 'where': 'conformsTo',\n 'whereEq': 'isMatch',\n 'zipObj': 'zipObject'\n};\n\n/** Used to map ary to method names. */\nexports.aryMethod = {\n '1': [\n 'assignAll', 'assignInAll', 'attempt', 'castArray', 'ceil', 'create',\n 'curry', 'curryRight', 'defaultsAll', 'defaultsDeepAll', 'floor', 'flow',\n 'flowRight', 'fromPairs', 'invert', 'iteratee', 'memoize', 'method', 'mergeAll',\n 'methodOf', 'mixin', 'nthArg', 'over', 'overEvery', 'overSome','rest', 'reverse',\n 'round', 'runInContext', 'spread', 'template', 'trim', 'trimEnd', 'trimStart',\n 'uniqueId', 'words', 'zipAll'\n ],\n '2': [\n 'add', 'after', 'ary', 'assign', 'assignAllWith', 'assignIn', 'assignInAllWith',\n 'at', 'before', 'bind', 'bindAll', 'bindKey', 'chunk', 'cloneDeepWith',\n 'cloneWith', 'concat', 'conformsTo', 'countBy', 'curryN', 'curryRightN',\n 'debounce', 'defaults', 'defaultsDeep', 'defaultTo', 'delay', 'difference',\n 'divide', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'endsWith', 'eq',\n 'every', 'filter', 'find', 'findIndex', 'findKey', 'findLast', 'findLastIndex',\n 'findLastKey', 'flatMap', 'flatMapDeep', 'flattenDepth', 'forEach',\n 'forEachRight', 'forIn', 'forInRight', 'forOwn', 'forOwnRight', 'get',\n 'groupBy', 'gt', 'gte', 'has', 'hasIn', 'includes', 'indexOf', 'intersection',\n 'invertBy', 'invoke', 'invokeMap', 'isEqual', 'isMatch', 'join', 'keyBy',\n 'lastIndexOf', 'lt', 'lte', 'map', 'mapKeys', 'mapValues', 'matchesProperty',\n 'maxBy', 'meanBy', 'merge', 'mergeAllWith', 'minBy', 'multiply', 'nth', 'omit',\n 'omitBy', 'overArgs', 'pad', 'padEnd', 'padStart', 'parseInt', 'partial',\n 'partialRight', 'partition', 'pick', 'pickBy', 'propertyOf', 'pull', 'pullAll',\n 'pullAt', 'random', 'range', 'rangeRight', 'rearg', 'reject', 'remove',\n 'repeat', 'restFrom', 'result', 'sampleSize', 'some', 'sortBy', 'sortedIndex',\n 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexOf', 'sortedUniqBy',\n 'split', 'spreadFrom', 'startsWith', 'subtract', 'sumBy', 'take', 'takeRight',\n 'takeRightWhile', 'takeWhile', 'tap', 'throttle', 'thru', 'times', 'trimChars',\n 'trimCharsEnd', 'trimCharsStart', 'truncate', 'union', 'uniqBy', 'uniqWith',\n 'unset', 'unzipWith', 'without', 'wrap', 'xor', 'zip', 'zipObject',\n 'zipObjectDeep'\n ],\n '3': [\n 'assignInWith', 'assignWith', 'clamp', 'differenceBy', 'differenceWith',\n 'findFrom', 'findIndexFrom', 'findLastFrom', 'findLastIndexFrom', 'getOr',\n 'includesFrom', 'indexOfFrom', 'inRange', 'intersectionBy', 'intersectionWith',\n 'invokeArgs', 'invokeArgsMap', 'isEqualWith', 'isMatchWith', 'flatMapDepth',\n 'lastIndexOfFrom', 'mergeWith', 'orderBy', 'padChars', 'padCharsEnd',\n 'padCharsStart', 'pullAllBy', 'pullAllWith', 'rangeStep', 'rangeStepRight',\n 'reduce', 'reduceRight', 'replace', 'set', 'slice', 'sortedIndexBy',\n 'sortedLastIndexBy', 'transform', 'unionBy', 'unionWith', 'update', 'xorBy',\n 'xorWith', 'zipWith'\n ],\n '4': [\n 'fill', 'setWith', 'updateWith'\n ]\n};\n\n/** Used to map ary to rearg configs. */\nexports.aryRearg = {\n '2': [1, 0],\n '3': [2, 0, 1],\n '4': [3, 2, 0, 1]\n};\n\n/** Used to map method names to their iteratee ary. */\nexports.iterateeAry = {\n 'dropRightWhile': 1,\n 'dropWhile': 1,\n 'every': 1,\n 'filter': 1,\n 'find': 1,\n 'findFrom': 1,\n 'findIndex': 1,\n 'findIndexFrom': 1,\n 'findKey': 1,\n 'findLast': 1,\n 'findLastFrom': 1,\n 'findLastIndex': 1,\n 'findLastIndexFrom': 1,\n 'findLastKey': 1,\n 'flatMap': 1,\n 'flatMapDeep': 1,\n 'flatMapDepth': 1,\n 'forEach': 1,\n 'forEachRight': 1,\n 'forIn': 1,\n 'forInRight': 1,\n 'forOwn': 1,\n 'forOwnRight': 1,\n 'map': 1,\n 'mapKeys': 1,\n 'mapValues': 1,\n 'partition': 1,\n 'reduce': 2,\n 'reduceRight': 2,\n 'reject': 1,\n 'remove': 1,\n 'some': 1,\n 'takeRightWhile': 1,\n 'takeWhile': 1,\n 'times': 1,\n 'transform': 2\n};\n\n/** Used to map method names to iteratee rearg configs. */\nexports.iterateeRearg = {\n 'mapKeys': [1],\n 'reduceRight': [1, 0]\n};\n\n/** Used to map method names to rearg configs. */\nexports.methodRearg = {\n 'assignInAllWith': [1, 0],\n 'assignInWith': [1, 2, 0],\n 'assignAllWith': [1, 0],\n 'assignWith': [1, 2, 0],\n 'differenceBy': [1, 2, 0],\n 'differenceWith': [1, 2, 0],\n 'getOr': [2, 1, 0],\n 'intersectionBy': [1, 2, 0],\n 'intersectionWith': [1, 2, 0],\n 'isEqualWith': [1, 2, 0],\n 'isMatchWith': [2, 1, 0],\n 'mergeAllWith': [1, 0],\n 'mergeWith': [1, 2, 0],\n 'padChars': [2, 1, 0],\n 'padCharsEnd': [2, 1, 0],\n 'padCharsStart': [2, 1, 0],\n 'pullAllBy': [2, 1, 0],\n 'pullAllWith': [2, 1, 0],\n 'rangeStep': [1, 2, 0],\n 'rangeStepRight': [1, 2, 0],\n 'setWith': [3, 1, 2, 0],\n 'sortedIndexBy': [2, 1, 0],\n 'sortedLastIndexBy': [2, 1, 0],\n 'unionBy': [1, 2, 0],\n 'unionWith': [1, 2, 0],\n 'updateWith': [3, 1, 2, 0],\n 'xorBy': [1, 2, 0],\n 'xorWith': [1, 2, 0],\n 'zipWith': [1, 2, 0]\n};\n\n/** Used to map method names to spread configs. */\nexports.methodSpread = {\n 'assignAll': { 'start': 0 },\n 'assignAllWith': { 'start': 0 },\n 'assignInAll': { 'start': 0 },\n 'assignInAllWith': { 'start': 0 },\n 'defaultsAll': { 'start': 0 },\n 'defaultsDeepAll': { 'start': 0 },\n 'invokeArgs': { 'start': 2 },\n 'invokeArgsMap': { 'start': 2 },\n 'mergeAll': { 'start': 0 },\n 'mergeAllWith': { 'start': 0 },\n 'partial': { 'start': 1 },\n 'partialRight': { 'start': 1 },\n 'without': { 'start': 1 },\n 'zipAll': { 'start': 0 }\n};\n\n/** Used to identify methods which mutate arrays or objects. */\nexports.mutate = {\n 'array': {\n 'fill': true,\n 'pull': true,\n 'pullAll': true,\n 'pullAllBy': true,\n 'pullAllWith': true,\n 'pullAt': true,\n 'remove': true,\n 'reverse': true\n },\n 'object': {\n 'assign': true,\n 'assignAll': true,\n 'assignAllWith': true,\n 'assignIn': true,\n 'assignInAll': true,\n 'assignInAllWith': true,\n 'assignInWith': true,\n 'assignWith': true,\n 'defaults': true,\n 'defaultsAll': true,\n 'defaultsDeep': true,\n 'defaultsDeepAll': true,\n 'merge': true,\n 'mergeAll': true,\n 'mergeAllWith': true,\n 'mergeWith': true,\n },\n 'set': {\n 'set': true,\n 'setWith': true,\n 'unset': true,\n 'update': true,\n 'updateWith': true\n }\n};\n\n/** Used to track methods with placeholder support */\nexports.placeholder = {\n 'bind': true,\n 'bindKey': true,\n 'curry': true,\n 'curryRight': true,\n 'partial': true,\n 'partialRight': true\n};\n\n/** Used to map real names to their aliases. */\nexports.realToAlias = (function() {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n object = exports.aliasToReal,\n result = {};\n\n for (var key in object) {\n var value = object[key];\n if (hasOwnProperty.call(result, value)) {\n result[value].push(key);\n } else {\n result[value] = [key];\n }\n }\n return result;\n}());\n\n/** Used to map method names to other names. */\nexports.remap = {\n 'assignAll': 'assign',\n 'assignAllWith': 'assignWith',\n 'assignInAll': 'assignIn',\n 'assignInAllWith': 'assignInWith',\n 'curryN': 'curry',\n 'curryRightN': 'curryRight',\n 'defaultsAll': 'defaults',\n 'defaultsDeepAll': 'defaultsDeep',\n 'findFrom': 'find',\n 'findIndexFrom': 'findIndex',\n 'findLastFrom': 'findLast',\n 'findLastIndexFrom': 'findLastIndex',\n 'getOr': 'get',\n 'includesFrom': 'includes',\n 'indexOfFrom': 'indexOf',\n 'invokeArgs': 'invoke',\n 'invokeArgsMap': 'invokeMap',\n 'lastIndexOfFrom': 'lastIndexOf',\n 'mergeAll': 'merge',\n 'mergeAllWith': 'mergeWith',\n 'padChars': 'pad',\n 'padCharsEnd': 'padEnd',\n 'padCharsStart': 'padStart',\n 'propertyOf': 'get',\n 'rangeStep': 'range',\n 'rangeStepRight': 'rangeRight',\n 'restFrom': 'rest',\n 'spreadFrom': 'spread',\n 'trimChars': 'trim',\n 'trimCharsEnd': 'trimEnd',\n 'trimCharsStart': 'trimStart',\n 'zipAll': 'zip'\n};\n\n/** Used to track methods that skip fixing their arity. */\nexports.skipFixed = {\n 'castArray': true,\n 'flow': true,\n 'flowRight': true,\n 'iteratee': true,\n 'mixin': true,\n 'rearg': true,\n 'runInContext': true\n};\n\n/** Used to track methods that skip rearranging arguments. */\nexports.skipRearg = {\n 'add': true,\n 'assign': true,\n 'assignIn': true,\n 'bind': true,\n 'bindKey': true,\n 'concat': true,\n 'difference': true,\n 'divide': true,\n 'eq': true,\n 'gt': true,\n 'gte': true,\n 'isEqual': true,\n 'lt': true,\n 'lte': true,\n 'matchesProperty': true,\n 'merge': true,\n 'multiply': true,\n 'overArgs': true,\n 'partial': true,\n 'partialRight': true,\n 'propertyOf': true,\n 'random': true,\n 'range': true,\n 'rangeRight': true,\n 'subtract': true,\n 'zip': true,\n 'zipObject': true,\n 'zipObjectDeep': true\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/_mapping.js\n// module id = ./node_modules/lodash/fp/_mapping.js\n// module chunks = 0","/**\n * The default argument placeholder value for methods.\n *\n * @type {Object}\n */\nmodule.exports = {};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/fp/placeholder.js\n// module id = ./node_modules/lodash/fp/placeholder.js\n// module chunks = 0","/**\n * @license\n * Lodash lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE\n */\n;(function(){function n(n,t){return n.set(t[0],t[1]),n}function t(n,t){return n.add(t),n}function r(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function e(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u\"']/g,J=RegExp(G.source),Y=RegExp(H.source),Q=/<%-([\\s\\S]+?)%>/g,X=/<%([\\s\\S]+?)%>/g,nn=/<%=([\\s\\S]+?)%>/g,tn=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,rn=/^\\w*$/,en=/^\\./,un=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,on=/[\\\\^$.*+?()[\\]{}|]/g,fn=RegExp(on.source),cn=/^\\s+|\\s+$/g,an=/^\\s+/,ln=/\\s+$/,sn=/\\{(?:\\n\\/\\* \\[wrapped with .+\\] \\*\\/)?\\n?/,hn=/\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,pn=/,? & /,_n=/[^\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\x7f]+/g,vn=/\\\\(\\\\)?/g,gn=/\\$\\{([^\\\\}]*(?:\\\\.[^\\\\}]*)*)\\}/g,dn=/\\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,xn=/^\\[object .+?Constructor\\]$/,jn=/^0o[0-7]+$/i,wn=/^(?:0|[1-9]\\d*)$/,mn=/[\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\xff\\u0100-\\u017f]/g,An=/($^)/,kn=/['\\n\\r\\u2028\\u2029\\\\]/g,En=\"[\\\\ufe0e\\\\ufe0f]?(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?(?:\\\\u200d(?:[^\\\\ud800-\\\\udfff]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff])[\\\\ufe0e\\\\ufe0f]?(?:[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|\\\\ud83c[\\\\udffb-\\\\udfff])?)*\",On=\"(?:[\\\\u2700-\\\\u27bf]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff])\"+En,Sn=\"(?:[^\\\\ud800-\\\\udfff][\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]?|[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]|(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}|[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]|[\\\\ud800-\\\\udfff])\",In=RegExp(\"['\\u2019]\",\"g\"),Rn=RegExp(\"[\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff]\",\"g\"),zn=RegExp(\"\\\\ud83c[\\\\udffb-\\\\udfff](?=\\\\ud83c[\\\\udffb-\\\\udfff])|\"+Sn+En,\"g\"),Wn=RegExp([\"[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]?[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]+(?:['\\u2019](?:d|ll|m|re|s|t|ve))?(?=[\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000]|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]|$)|(?:[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])+(?:['\\u2019](?:D|LL|M|RE|S|T|VE))?(?=[\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000]|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde](?:[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])|$)|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]?(?:[a-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xff]|[^\\\\ud800-\\\\udfff\\\\xac\\\\xb1\\\\xd7\\\\xf7\\\\x00-\\\\x2f\\\\x3a-\\\\x40\\\\x5b-\\\\x60\\\\x7b-\\\\xbf\\\\u2000-\\\\u206f \\\\t\\\\x0b\\\\f\\\\xa0\\\\ufeff\\\\n\\\\r\\\\u2028\\\\u2029\\\\u1680\\\\u180e\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200a\\\\u202f\\\\u205f\\\\u3000\\\\d+\\\\u2700-\\\\u27bfa-z\\\\xdf-\\\\xf6\\\\xf8-\\\\xffA-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde])+(?:['\\u2019](?:d|ll|m|re|s|t|ve))?|[A-Z\\\\xc0-\\\\xd6\\\\xd8-\\\\xde]+(?:['\\u2019](?:D|LL|M|RE|S|T|VE))?|\\\\d*(?:(?:1ST|2ND|3RD|(?![123])\\\\dTH)\\\\b)|\\\\d*(?:(?:1st|2nd|3rd|(?![123])\\\\dth)\\\\b)|\\\\d+\",On].join(\"|\"),\"g\"),Bn=RegExp(\"[\\\\u200d\\\\ud800-\\\\udfff\\\\u0300-\\\\u036f\\\\ufe20-\\\\ufe2f\\\\u20d0-\\\\u20ff\\\\ufe0e\\\\ufe0f]\"),Ln=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Un=\"Array Buffer DataView Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Map Math Object Promise RegExp Set String Symbol TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap _ clearTimeout isFinite parseInt setTimeout\".split(\" \"),Cn={};\nCn[\"[object Float32Array]\"]=Cn[\"[object Float64Array]\"]=Cn[\"[object Int8Array]\"]=Cn[\"[object Int16Array]\"]=Cn[\"[object Int32Array]\"]=Cn[\"[object Uint8Array]\"]=Cn[\"[object Uint8ClampedArray]\"]=Cn[\"[object Uint16Array]\"]=Cn[\"[object Uint32Array]\"]=true,Cn[\"[object Arguments]\"]=Cn[\"[object Array]\"]=Cn[\"[object ArrayBuffer]\"]=Cn[\"[object Boolean]\"]=Cn[\"[object DataView]\"]=Cn[\"[object Date]\"]=Cn[\"[object Error]\"]=Cn[\"[object Function]\"]=Cn[\"[object Map]\"]=Cn[\"[object Number]\"]=Cn[\"[object Object]\"]=Cn[\"[object RegExp]\"]=Cn[\"[object Set]\"]=Cn[\"[object String]\"]=Cn[\"[object WeakMap]\"]=false;\nvar Dn={};Dn[\"[object Arguments]\"]=Dn[\"[object Array]\"]=Dn[\"[object ArrayBuffer]\"]=Dn[\"[object DataView]\"]=Dn[\"[object Boolean]\"]=Dn[\"[object Date]\"]=Dn[\"[object Float32Array]\"]=Dn[\"[object Float64Array]\"]=Dn[\"[object Int8Array]\"]=Dn[\"[object Int16Array]\"]=Dn[\"[object Int32Array]\"]=Dn[\"[object Map]\"]=Dn[\"[object Number]\"]=Dn[\"[object Object]\"]=Dn[\"[object RegExp]\"]=Dn[\"[object Set]\"]=Dn[\"[object String]\"]=Dn[\"[object Symbol]\"]=Dn[\"[object Uint8Array]\"]=Dn[\"[object Uint8ClampedArray]\"]=Dn[\"[object Uint16Array]\"]=Dn[\"[object Uint32Array]\"]=true,\nDn[\"[object Error]\"]=Dn[\"[object Function]\"]=Dn[\"[object WeakMap]\"]=false;var Mn,Tn={\"\\\\\":\"\\\\\",\"'\":\"'\",\"\\n\":\"n\",\"\\r\":\"r\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},$n=parseFloat,Fn=parseInt,Nn=typeof global==\"object\"&&global&&global.Object===Object&&global,Pn=typeof self==\"object\"&&self&&self.Object===Object&&self,Zn=Nn||Pn||Function(\"return this\")(),qn=typeof exports==\"object\"&&exports&&!exports.nodeType&&exports,Vn=qn&&typeof module==\"object\"&&module&&!module.nodeType&&module,Kn=Vn&&Vn.exports===qn,Gn=Kn&&Nn.process;\nn:{try{Mn=Gn&&Gn.binding&&Gn.binding(\"util\");break n}catch(n){}Mn=void 0}var Hn=Mn&&Mn.isArrayBuffer,Jn=Mn&&Mn.isDate,Yn=Mn&&Mn.isMap,Qn=Mn&&Mn.isRegExp,Xn=Mn&&Mn.isSet,nt=Mn&&Mn.isTypedArray,tt=j(\"length\"),rt=w({\"\\xc0\":\"A\",\"\\xc1\":\"A\",\"\\xc2\":\"A\",\"\\xc3\":\"A\",\"\\xc4\":\"A\",\"\\xc5\":\"A\",\"\\xe0\":\"a\",\"\\xe1\":\"a\",\"\\xe2\":\"a\",\"\\xe3\":\"a\",\"\\xe4\":\"a\",\"\\xe5\":\"a\",\"\\xc7\":\"C\",\"\\xe7\":\"c\",\"\\xd0\":\"D\",\"\\xf0\":\"d\",\"\\xc8\":\"E\",\"\\xc9\":\"E\",\"\\xca\":\"E\",\"\\xcb\":\"E\",\"\\xe8\":\"e\",\"\\xe9\":\"e\",\"\\xea\":\"e\",\"\\xeb\":\"e\",\"\\xcc\":\"I\",\"\\xcd\":\"I\",\"\\xce\":\"I\",\n\"\\xcf\":\"I\",\"\\xec\":\"i\",\"\\xed\":\"i\",\"\\xee\":\"i\",\"\\xef\":\"i\",\"\\xd1\":\"N\",\"\\xf1\":\"n\",\"\\xd2\":\"O\",\"\\xd3\":\"O\",\"\\xd4\":\"O\",\"\\xd5\":\"O\",\"\\xd6\":\"O\",\"\\xd8\":\"O\",\"\\xf2\":\"o\",\"\\xf3\":\"o\",\"\\xf4\":\"o\",\"\\xf5\":\"o\",\"\\xf6\":\"o\",\"\\xf8\":\"o\",\"\\xd9\":\"U\",\"\\xda\":\"U\",\"\\xdb\":\"U\",\"\\xdc\":\"U\",\"\\xf9\":\"u\",\"\\xfa\":\"u\",\"\\xfb\":\"u\",\"\\xfc\":\"u\",\"\\xdd\":\"Y\",\"\\xfd\":\"y\",\"\\xff\":\"y\",\"\\xc6\":\"Ae\",\"\\xe6\":\"ae\",\"\\xde\":\"Th\",\"\\xfe\":\"th\",\"\\xdf\":\"ss\",\"\\u0100\":\"A\",\"\\u0102\":\"A\",\"\\u0104\":\"A\",\"\\u0101\":\"a\",\"\\u0103\":\"a\",\"\\u0105\":\"a\",\"\\u0106\":\"C\",\"\\u0108\":\"C\",\"\\u010a\":\"C\",\n\"\\u010c\":\"C\",\"\\u0107\":\"c\",\"\\u0109\":\"c\",\"\\u010b\":\"c\",\"\\u010d\":\"c\",\"\\u010e\":\"D\",\"\\u0110\":\"D\",\"\\u010f\":\"d\",\"\\u0111\":\"d\",\"\\u0112\":\"E\",\"\\u0114\":\"E\",\"\\u0116\":\"E\",\"\\u0118\":\"E\",\"\\u011a\":\"E\",\"\\u0113\":\"e\",\"\\u0115\":\"e\",\"\\u0117\":\"e\",\"\\u0119\":\"e\",\"\\u011b\":\"e\",\"\\u011c\":\"G\",\"\\u011e\":\"G\",\"\\u0120\":\"G\",\"\\u0122\":\"G\",\"\\u011d\":\"g\",\"\\u011f\":\"g\",\"\\u0121\":\"g\",\"\\u0123\":\"g\",\"\\u0124\":\"H\",\"\\u0126\":\"H\",\"\\u0125\":\"h\",\"\\u0127\":\"h\",\"\\u0128\":\"I\",\"\\u012a\":\"I\",\"\\u012c\":\"I\",\"\\u012e\":\"I\",\"\\u0130\":\"I\",\"\\u0129\":\"i\",\"\\u012b\":\"i\",\"\\u012d\":\"i\",\n\"\\u012f\":\"i\",\"\\u0131\":\"i\",\"\\u0134\":\"J\",\"\\u0135\":\"j\",\"\\u0136\":\"K\",\"\\u0137\":\"k\",\"\\u0138\":\"k\",\"\\u0139\":\"L\",\"\\u013b\":\"L\",\"\\u013d\":\"L\",\"\\u013f\":\"L\",\"\\u0141\":\"L\",\"\\u013a\":\"l\",\"\\u013c\":\"l\",\"\\u013e\":\"l\",\"\\u0140\":\"l\",\"\\u0142\":\"l\",\"\\u0143\":\"N\",\"\\u0145\":\"N\",\"\\u0147\":\"N\",\"\\u014a\":\"N\",\"\\u0144\":\"n\",\"\\u0146\":\"n\",\"\\u0148\":\"n\",\"\\u014b\":\"n\",\"\\u014c\":\"O\",\"\\u014e\":\"O\",\"\\u0150\":\"O\",\"\\u014d\":\"o\",\"\\u014f\":\"o\",\"\\u0151\":\"o\",\"\\u0154\":\"R\",\"\\u0156\":\"R\",\"\\u0158\":\"R\",\"\\u0155\":\"r\",\"\\u0157\":\"r\",\"\\u0159\":\"r\",\"\\u015a\":\"S\",\"\\u015c\":\"S\",\n\"\\u015e\":\"S\",\"\\u0160\":\"S\",\"\\u015b\":\"s\",\"\\u015d\":\"s\",\"\\u015f\":\"s\",\"\\u0161\":\"s\",\"\\u0162\":\"T\",\"\\u0164\":\"T\",\"\\u0166\":\"T\",\"\\u0163\":\"t\",\"\\u0165\":\"t\",\"\\u0167\":\"t\",\"\\u0168\":\"U\",\"\\u016a\":\"U\",\"\\u016c\":\"U\",\"\\u016e\":\"U\",\"\\u0170\":\"U\",\"\\u0172\":\"U\",\"\\u0169\":\"u\",\"\\u016b\":\"u\",\"\\u016d\":\"u\",\"\\u016f\":\"u\",\"\\u0171\":\"u\",\"\\u0173\":\"u\",\"\\u0174\":\"W\",\"\\u0175\":\"w\",\"\\u0176\":\"Y\",\"\\u0177\":\"y\",\"\\u0178\":\"Y\",\"\\u0179\":\"Z\",\"\\u017b\":\"Z\",\"\\u017d\":\"Z\",\"\\u017a\":\"z\",\"\\u017c\":\"z\",\"\\u017e\":\"z\",\"\\u0132\":\"IJ\",\"\\u0133\":\"ij\",\"\\u0152\":\"Oe\",\"\\u0153\":\"oe\",\n\"\\u0149\":\"'n\",\"\\u017f\":\"s\"}),et=w({\"&\":\"&\",\"<\":\"<\",\">\":\">\",'\"':\""\",\"'\":\"'\"}),ut=w({\"&\":\"&\",\"<\":\"<\",\">\":\">\",\""\":'\"',\"'\":\"'\"}),it=function w(En){function On(n){if(xu(n)&&!af(n)&&!(n instanceof Mn)){if(n instanceof zn)return n;if(ci.call(n,\"__wrapped__\"))return Pe(n)}return new zn(n)}function Sn(){}function zn(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=F}function Mn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,\nthis.__filtered__=false,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Tn(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function dt(n,t,r,e,i,o){var f,c=1&t,a=2&t,l=4&t;if(r&&(f=i?r(n,e,i,o):r(n)),f!==F)return f;if(!bu(n))return n;if(e=af(n)){if(f=Ee(n),!c)return Mr(n,f)}else{var s=yo(n),h=\"[object Function]\"==s||\"[object GeneratorFunction]\"==s;if(sf(n))return Wr(n,c);if(\"[object Object]\"==s||\"[object Arguments]\"==s||h&&!i){if(f=a||h?{}:Oe(n),!c)return a?Fr(n,pt(f,n)):$r(n,ht(f,n))}else{if(!Dn[s])return i?n:{};f=Se(n,s,dt,c)}}if(o||(o=new Vn),\ni=o.get(n))return i;o.set(n,f);var a=l?a?ye:de:a?Uu:Lu,p=e?F:a(n);return u(p||n,function(e,u){p&&(u=e,e=n[u]),at(f,u,dt(e,t,r,u,n,o))}),f}function yt(n){var t=Lu(n);return function(r){return bt(r,n,t)}}function bt(n,t,r){var e=r.length;if(null==n)return!e;for(n=ni(n);e--;){var u=r[e],i=t[u],o=n[u];if(o===F&&!(u in n)||!i(o))return false}return true}function xt(n,t,r){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return jo(function(){n.apply(F,r)},t)}function jt(n,t,r,e){var u=-1,i=c,o=true,f=n.length,s=[],h=t.length;\nif(!f)return s;r&&(t=l(t,S(r))),e?(i=a,o=false):200<=t.length&&(i=R,o=false,t=new qn(t));n:for(;++ut}function Bt(n,t){return null!=n&&ci.call(n,t)}function Lt(n,t){return null!=n&&t in ni(n)}function Ut(n,t,r){for(var e=r?a:c,u=n[0].length,i=n.length,o=i,f=Hu(i),s=1/0,h=[];o--;){var p=n[o];o&&t&&(p=l(p,S(t))),s=Mi(p.length,s),f[o]=!r&&(t||120<=u&&120<=p.length)?new qn(o&&p):F}var p=n[0],_=-1,v=f[0];n:for(;++_t.length?n:It(n,vr(t,0,-1)),t=null==n?n:n[$e(Ge(t))],null==t?F:r(t,n,e)}function Mt(n){return xu(n)&&\"[object Arguments]\"==zt(n)}function Tt(n){return xu(n)&&\"[object ArrayBuffer]\"==zt(n)}function $t(n){return xu(n)&&\"[object Date]\"==zt(n)}function Ft(n,t,r,e,u){if(n===t)t=true;else if(null==n||null==t||!xu(n)&&!xu(t))t=n!==n&&t!==t;else n:{\nvar i=af(n),o=af(t),f=i?\"[object Array]\":yo(n),c=o?\"[object Array]\":yo(t),f=\"[object Arguments]\"==f?\"[object Object]\":f,c=\"[object Arguments]\"==c?\"[object Object]\":c,a=\"[object Object]\"==f,o=\"[object Object]\"==c;if((c=f==c)&&sf(n)){if(!sf(t)){t=false;break n}i=true,a=false}if(c&&!a)u||(u=new Vn),t=i||gf(n)?_e(n,t,r,e,Ft,u):ve(n,t,f,r,e,Ft,u);else{if(!(1&r)&&(i=a&&ci.call(n,\"__wrapped__\"),f=o&&ci.call(t,\"__wrapped__\"),i||f)){n=i?n.value():n,t=f?t.value():t,u||(u=new Vn),t=Ft(n,t,r,e,u);break n}if(c)t:if(u||(u=new Vn),\ni=1&r,f=de(n),o=f.length,c=de(t).length,o==c||i){for(a=o;a--;){var l=f[a];if(!(i?l in t:ci.call(t,l))){t=false;break t}}if((c=u.get(n))&&u.get(t))t=c==t;else{c=true,u.set(n,t),u.set(t,n);for(var s=i;++at?r:0,Re(t,r)?n[t]:F}function rr(n,t,r){var e=-1;return t=l(t.length?t:[Nu],S(je())),n=Yt(n,function(n){return{a:l(t,function(t){return t(n)}),b:++e,c:n}}),A(n,function(n,t){var e;n:{e=-1;for(var u=n.a,i=t.a,o=u.length,f=r.length;++e=f?c:c*(\"desc\"==r[e]?-1:1);\nbreak n}}e=n.b-t.b}return e})}function er(n,t){return ur(n,t,function(t,r){return Bu(n,r)})}function ur(n,t,r){for(var e=-1,u=t.length,i={};++et||9007199254740991t&&(t=-t>u?0:u+t),r=r>u?u:r,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=Hu(u);++e=u){for(;e>>1,o=n[i];null!==o&&!Au(o)&&(r?o<=t:ot.length?n:It(n,vr(t,0,-1)),\nnull==n||delete n[$e(Ge(t))]}function Ar(n,t,r,e){for(var u=n.length,i=e?u:-1;(e?i--:++ie)return e?wr(n[0]):[];for(var u=-1,i=Hu(e);++u=e?n:vr(n,t,r)}function Wr(n,t){if(t)return n.slice();var r=n.length,r=yi?yi(r):new n.constructor(r);return n.copy(r),r}function Br(n){var t=new n.constructor(n.byteLength);return new di(t).set(new di(n)),t}function Lr(n,t){return new n.constructor(t?Br(n.buffer):n.buffer,n.byteOffset,n.length)}function Ur(n,t){\nif(n!==t){var r=n!==F,e=null===n,u=n===n,i=Au(n),o=t!==F,f=null===t,c=t===t,a=Au(t);if(!f&&!a&&!i&&n>t||i&&o&&c&&!f&&!a||e&&o&&c||!r&&c||!u)return 1;if(!e&&!i&&!a&&nu?F:i,u=1),t=ni(t);++eo&&f[0]!==a&&f[o-1]!==a?[]:C(f,a),o-=c.length,or?r?ar(t,n):t:(r=ar(t,Ri(n/T(t))),Bn.test(t)?zr($(r),0,n).join(\"\"):r.slice(0,n))}function ue(n,t,e,u){function i(){for(var t=-1,c=arguments.length,a=-1,l=u.length,s=Hu(l+c),h=this&&this!==Zn&&this instanceof i?f:n;++at||e)&&(1&n&&(i[2]=h[2],t|=1&r?0:4),(r=h[3])&&(e=i[3],i[3]=e?Cr(e,r,h[4]):r,i[4]=e?C(i[3],\"__lodash_placeholder__\"):h[4]),(r=h[5])&&(e=i[5],i[5]=e?Dr(e,r,h[6]):r,i[6]=e?C(i[5],\"__lodash_placeholder__\"):h[6]),(r=h[7])&&(i[7]=r),128&n&&(i[8]=null==i[8]?h[8]:Mi(i[8],h[8])),null==i[9]&&(i[9]=h[9]),i[0]=h[0],i[1]=t),n=i[0],t=i[1],\nr=i[2],e=i[3],u=i[4],f=i[9]=i[9]===F?c?0:n.length:Di(i[9]-a,0),!f&&24&t&&(t&=-25),De((h?lo:xo)(t&&1!=t?8==t||16==t?Jr(n,t,f):32!=t&&33!=t||u.length?Xr.apply(F,i):ue(n,t,r,e):Vr(n,t,r),i),n,t)}function se(n,t,r,e){return n===F||hu(n,ii[r])&&!ci.call(e,r)?t:n}function he(n,t,r,e,u,i){return bu(n)&&bu(t)&&(i.set(t,n),nr(n,t,F,he,i),i.delete(t)),n}function pe(n){return wu(n)?F:n}function _e(n,t,r,e,u,i){var o=1&r,f=n.length,c=t.length;if(f!=c&&!(o&&c>f))return false;if((c=i.get(n))&&i.get(t))return c==t;var c=-1,a=true,l=2&r?new qn:F;\nfor(i.set(n,t),i.set(t,n);++cr&&(r=Di(e+r,0)),g(n,je(t,3),r)):-1}function qe(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e-1;return r!==F&&(u=Ou(r),u=0>r?Di(e+u,0):Mi(u,e-1)),\ng(n,je(t,3),u,true)}function Ve(n){return(null==n?0:n.length)?kt(n,1):[]}function Ke(n){return n&&n.length?n[0]:F}function Ge(n){var t=null==n?0:n.length;return t?n[t-1]:F}function He(n,t){return n&&n.length&&t&&t.length?or(n,t):n}function Je(n){return null==n?n:Ni.call(n)}function Ye(n){if(!n||!n.length)return[];var t=0;return n=f(n,function(n){if(_u(n))return t=Di(n.length,t),true}),E(t,function(t){return l(n,j(t))})}function Qe(n,t){if(!n||!n.length)return[];var e=Ye(n);return null==t?e:l(e,function(n){\nreturn r(t,F,n)})}function Xe(n){return n=On(n),n.__chain__=true,n}function nu(n,t){return t(n)}function tu(){return this}function ru(n,t){return(af(n)?u:oo)(n,je(t,3))}function eu(n,t){return(af(n)?i:fo)(n,je(t,3))}function uu(n,t){return(af(n)?l:Yt)(n,je(t,3))}function iu(n,t,r){return t=r?F:t,t=n&&null==t?n.length:t,le(n,128,F,F,F,F,t)}function ou(n,t){var r;if(typeof t!=\"function\")throw new ei(\"Expected a function\");return n=Ou(n),function(){return 0<--n&&(r=t.apply(this,arguments)),1>=n&&(t=F),\nr}}function fu(n,t,r){return t=r?F:t,n=le(n,8,F,F,F,F,F,t),n.placeholder=fu.placeholder,n}function cu(n,t,r){return t=r?F:t,n=le(n,16,F,F,F,F,F,t),n.placeholder=cu.placeholder,n}function au(n,t,r){function e(t){var r=c,e=a;return c=a=F,_=t,s=n.apply(e,r)}function u(n){var r=n-p;return n-=_,p===F||r>=t||0>r||g&&n>=l}function i(){var n=Jo();if(u(n))return o(n);var r,e=jo;r=n-_,n=t-(n-p),r=g?Mi(n,l-r):n,h=e(i,r)}function o(n){return h=F,d&&c?e(n):(c=a=F,s)}function f(){var n=Jo(),r=u(n);if(c=arguments,\na=this,p=n,r){if(h===F)return _=n=p,h=jo(i,t),v?e(n):s;if(g)return h=jo(i,t),e(p)}return h===F&&(h=jo(i,t)),s}var c,a,l,s,h,p,_=0,v=false,g=false,d=true;if(typeof n!=\"function\")throw new ei(\"Expected a function\");return t=Iu(t)||0,bu(r)&&(v=!!r.leading,l=(g=\"maxWait\"in r)?Di(Iu(r.maxWait)||0,t):l,d=\"trailing\"in r?!!r.trailing:d),f.cancel=function(){h!==F&&ho(h),_=0,c=p=a=h=F},f.flush=function(){return h===F?s:o(Jo())},f}function lu(n,t){function r(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;return i.has(u)?i.get(u):(e=n.apply(this,e),\nr.cache=i.set(u,e)||i,e)}if(typeof n!=\"function\"||null!=t&&typeof t!=\"function\")throw new ei(\"Expected a function\");return r.cache=new(lu.Cache||Pn),r}function su(n){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}function hu(n,t){return n===t||n!==n&&t!==t}function pu(n){return null!=n&&yu(n.length)&&!gu(n);\n}function _u(n){return xu(n)&&pu(n)}function vu(n){if(!xu(n))return false;var t=zt(n);return\"[object Error]\"==t||\"[object DOMException]\"==t||typeof n.message==\"string\"&&typeof n.name==\"string\"&&!wu(n)}function gu(n){return!!bu(n)&&(n=zt(n),\"[object Function]\"==n||\"[object GeneratorFunction]\"==n||\"[object AsyncFunction]\"==n||\"[object Proxy]\"==n)}function du(n){return typeof n==\"number\"&&n==Ou(n)}function yu(n){return typeof n==\"number\"&&-1=n}function bu(n){var t=typeof n;return null!=n&&(\"object\"==t||\"function\"==t);\n}function xu(n){return null!=n&&typeof n==\"object\"}function ju(n){return typeof n==\"number\"||xu(n)&&\"[object Number]\"==zt(n)}function wu(n){return!(!xu(n)||\"[object Object]\"!=zt(n))&&(n=bi(n),null===n||(n=ci.call(n,\"constructor\")&&n.constructor,typeof n==\"function\"&&n instanceof n&&fi.call(n)==hi))}function mu(n){return typeof n==\"string\"||!af(n)&&xu(n)&&\"[object String]\"==zt(n)}function Au(n){return typeof n==\"symbol\"||xu(n)&&\"[object Symbol]\"==zt(n)}function ku(n){if(!n)return[];if(pu(n))return mu(n)?$(n):Mr(n);\nif(Ai&&n[Ai]){n=n[Ai]();for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}return t=yo(n),(\"[object Map]\"==t?L:\"[object Set]\"==t?D:Du)(n)}function Eu(n){return n?(n=Iu(n),n===N||n===-N?1.7976931348623157e308*(0>n?-1:1):n===n?n:0):0===n?n:0}function Ou(n){n=Eu(n);var t=n%1;return n===n?t?n-t:n:0}function Su(n){return n?gt(Ou(n),0,4294967295):0}function Iu(n){if(typeof n==\"number\")return n;if(Au(n))return P;if(bu(n)&&(n=typeof n.valueOf==\"function\"?n.valueOf():n,n=bu(n)?n+\"\":n),typeof n!=\"string\")return 0===n?n:+n;\nn=n.replace(cn,\"\");var t=bn.test(n);return t||jn.test(n)?Fn(n.slice(2),t?2:8):yn.test(n)?P:+n}function Ru(n){return Tr(n,Uu(n))}function zu(n){return null==n?\"\":jr(n)}function Wu(n,t,r){return n=null==n?F:It(n,t),n===F?r:n}function Bu(n,t){return null!=n&&ke(n,t,Lt)}function Lu(n){return pu(n)?Gn(n):Ht(n)}function Uu(n){if(pu(n))n=Gn(n,true);else if(bu(n)){var t,r=Le(n),e=[];for(t in n)(\"constructor\"!=t||!r&&ci.call(n,t))&&e.push(t);n=e}else{if(t=[],null!=n)for(r in ni(n))t.push(r);n=t}return n}function Cu(n,t){\nif(null==n)return{};var r=l(ye(n),function(n){return[n]});return t=je(t),ur(n,r,function(n,r){return t(n,r[0])})}function Du(n){return null==n?[]:I(n,Lu(n))}function Mu(n){return Nf(zu(n).toLowerCase())}function Tu(n){return(n=zu(n))&&n.replace(mn,rt).replace(Rn,\"\")}function $u(n,t,r){return n=zu(n),t=r?F:t,t===F?Ln.test(n)?n.match(Wn)||[]:n.match(_n)||[]:n.match(t)||[]}function Fu(n){return function(){return n}}function Nu(n){return n}function Pu(n){return Gt(typeof n==\"function\"?n:dt(n,1))}function Zu(n,t,r){\nvar e=Lu(t),i=St(t,e);null!=r||bu(t)&&(i.length||!e.length)||(r=t,t=n,n=this,i=St(t,Lu(t)));var o=!(bu(r)&&\"chain\"in r&&!r.chain),f=gu(n);return u(i,function(r){var e=t[r];n[r]=e,f&&(n.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=n(this.__wrapped__);return(r.__actions__=Mr(this.__actions__)).push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,s([this.value()],arguments))})}),n}function qu(){}function Vu(n){return We(n)?j($e(n)):ir(n)}function Ku(){return[]}function Gu(){\nreturn false}En=null==En?Zn:it.defaults(Zn.Object(),En,it.pick(Zn,Un));var Hu=En.Array,Ju=En.Date,Yu=En.Error,Qu=En.Function,Xu=En.Math,ni=En.Object,ti=En.RegExp,ri=En.String,ei=En.TypeError,ui=Hu.prototype,ii=ni.prototype,oi=En[\"__core-js_shared__\"],fi=Qu.prototype.toString,ci=ii.hasOwnProperty,ai=0,li=function(){var n=/[^.]+$/.exec(oi&&oi.keys&&oi.keys.IE_PROTO||\"\");return n?\"Symbol(src)_1.\"+n:\"\"}(),si=ii.toString,hi=fi.call(ni),pi=Zn._,_i=ti(\"^\"+fi.call(ci).replace(on,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),vi=Kn?En.Buffer:F,gi=En.Symbol,di=En.Uint8Array,yi=vi?vi.f:F,bi=U(ni.getPrototypeOf,ni),xi=ni.create,ji=ii.propertyIsEnumerable,wi=ui.splice,mi=gi?gi.isConcatSpreadable:F,Ai=gi?gi.iterator:F,ki=gi?gi.toStringTag:F,Ei=function(){\ntry{var n=Ae(ni,\"defineProperty\");return n({},\"\",{}),n}catch(n){}}(),Oi=En.clearTimeout!==Zn.clearTimeout&&En.clearTimeout,Si=Ju&&Ju.now!==Zn.Date.now&&Ju.now,Ii=En.setTimeout!==Zn.setTimeout&&En.setTimeout,Ri=Xu.ceil,zi=Xu.floor,Wi=ni.getOwnPropertySymbols,Bi=vi?vi.isBuffer:F,Li=En.isFinite,Ui=ui.join,Ci=U(ni.keys,ni),Di=Xu.max,Mi=Xu.min,Ti=Ju.now,$i=En.parseInt,Fi=Xu.random,Ni=ui.reverse,Pi=Ae(En,\"DataView\"),Zi=Ae(En,\"Map\"),qi=Ae(En,\"Promise\"),Vi=Ae(En,\"Set\"),Ki=Ae(En,\"WeakMap\"),Gi=Ae(ni,\"create\"),Hi=Ki&&new Ki,Ji={},Yi=Fe(Pi),Qi=Fe(Zi),Xi=Fe(qi),no=Fe(Vi),to=Fe(Ki),ro=gi?gi.prototype:F,eo=ro?ro.valueOf:F,uo=ro?ro.toString:F,io=function(){\nfunction n(){}return function(t){return bu(t)?xi?xi(t):(n.prototype=t,t=new n,n.prototype=F,t):{}}}();On.templateSettings={escape:Q,evaluate:X,interpolate:nn,variable:\"\",imports:{_:On}},On.prototype=Sn.prototype,On.prototype.constructor=On,zn.prototype=io(Sn.prototype),zn.prototype.constructor=zn,Mn.prototype=io(Sn.prototype),Mn.prototype.constructor=Mn,Tn.prototype.clear=function(){this.__data__=Gi?Gi(null):{},this.size=0},Tn.prototype.delete=function(n){return n=this.has(n)&&delete this.__data__[n],\nthis.size-=n?1:0,n},Tn.prototype.get=function(n){var t=this.__data__;return Gi?(n=t[n],\"__lodash_hash_undefined__\"===n?F:n):ci.call(t,n)?t[n]:F},Tn.prototype.has=function(n){var t=this.__data__;return Gi?t[n]!==F:ci.call(t,n)},Tn.prototype.set=function(n,t){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Gi&&t===F?\"__lodash_hash_undefined__\":t,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(n){var t=this.__data__;return n=lt(t,n),!(0>n)&&(n==t.length-1?t.pop():wi.call(t,n,1),\n--this.size,true)},Nn.prototype.get=function(n){var t=this.__data__;return n=lt(t,n),0>n?F:t[n][1]},Nn.prototype.has=function(n){return-1e?(++this.size,r.push([n,t])):r[e][1]=t,this},Pn.prototype.clear=function(){this.size=0,this.__data__={hash:new Tn,map:new(Zi||Nn),string:new Tn}},Pn.prototype.delete=function(n){return n=we(this,n).delete(n),this.size-=n?1:0,n},Pn.prototype.get=function(n){return we(this,n).get(n);\n},Pn.prototype.has=function(n){return we(this,n).has(n)},Pn.prototype.set=function(n,t){var r=we(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},qn.prototype.add=qn.prototype.push=function(n){return this.__data__.set(n,\"__lodash_hash_undefined__\"),this},qn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.clear=function(){this.__data__=new Nn,this.size=0},Vn.prototype.delete=function(n){var t=this.__data__;return n=t.delete(n),this.size=t.size,n},Vn.prototype.get=function(n){\nreturn this.__data__.get(n)},Vn.prototype.has=function(n){return this.__data__.has(n)},Vn.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Nn){var e=r.__data__;if(!Zi||199>e.length)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Pn(e)}return r.set(n,t),this.size=r.size,this};var oo=Zr(Et),fo=Zr(Ot,true),co=qr(),ao=qr(true),lo=Hi?function(n,t){return Hi.set(n,t),n}:Nu,so=Ei?function(n,t){return Ei(n,\"toString\",{configurable:true,enumerable:false,value:Fu(t),writable:true})}:Nu,ho=Oi||function(n){\nreturn Zn.clearTimeout(n)},po=Vi&&1/D(new Vi([,-0]))[1]==N?function(n){return new Vi(n)}:qu,_o=Hi?function(n){return Hi.get(n)}:qu,vo=Wi?function(n){return null==n?[]:(n=ni(n),f(Wi(n),function(t){return ji.call(n,t)}))}:Ku,go=Wi?function(n){for(var t=[];n;)s(t,vo(n)),n=bi(n);return t}:Ku,yo=zt;(Pi&&\"[object DataView]\"!=yo(new Pi(new ArrayBuffer(1)))||Zi&&\"[object Map]\"!=yo(new Zi)||qi&&\"[object Promise]\"!=yo(qi.resolve())||Vi&&\"[object Set]\"!=yo(new Vi)||Ki&&\"[object WeakMap]\"!=yo(new Ki))&&(yo=function(n){\nvar t=zt(n);if(n=(n=\"[object Object]\"==t?n.constructor:F)?Fe(n):\"\")switch(n){case Yi:return\"[object DataView]\";case Qi:return\"[object Map]\";case Xi:return\"[object Promise]\";case no:return\"[object Set]\";case to:return\"[object WeakMap]\"}return t});var bo=oi?gu:Gu,xo=Me(lo),jo=Ii||function(n,t){return Zn.setTimeout(n,t)},wo=Me(so),mo=function(n){n=lu(n,function(n){return 500===t.size&&t.clear(),n});var t=n.cache;return n}(function(n){var t=[];return en.test(n)&&t.push(\"\"),n.replace(un,function(n,r,e,u){\nt.push(e?u.replace(vn,\"$1\"):r||n)}),t}),Ao=lr(function(n,t){return _u(n)?jt(n,kt(t,1,_u,true)):[]}),ko=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),je(r,2)):[]}),Eo=lr(function(n,t){var r=Ge(t);return _u(r)&&(r=F),_u(n)?jt(n,kt(t,1,_u,true),F,r):[]}),Oo=lr(function(n){var t=l(n,Sr);return t.length&&t[0]===n[0]?Ut(t):[]}),So=lr(function(n){var t=Ge(n),r=l(n,Sr);return t===Ge(r)?t=F:r.pop(),r.length&&r[0]===n[0]?Ut(r,je(t,2)):[]}),Io=lr(function(n){var t=Ge(n),r=l(n,Sr);return(t=typeof t==\"function\"?t:F)&&r.pop(),\nr.length&&r[0]===n[0]?Ut(r,F,t):[]}),Ro=lr(He),zo=ge(function(n,t){var r=null==n?0:n.length,e=vt(n,t);return fr(n,l(t,function(n){return Re(n,r)?+n:n}).sort(Ur)),e}),Wo=lr(function(n){return wr(kt(n,1,_u,true))}),Bo=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),wr(kt(n,1,_u,true),je(t,2))}),Lo=lr(function(n){var t=Ge(n),t=typeof t==\"function\"?t:F;return wr(kt(n,1,_u,true),F,t)}),Uo=lr(function(n,t){return _u(n)?jt(n,t):[]}),Co=lr(function(n){return Er(f(n,_u))}),Do=lr(function(n){var t=Ge(n);return _u(t)&&(t=F),\nEr(f(n,_u),je(t,2))}),Mo=lr(function(n){var t=Ge(n),t=typeof t==\"function\"?t:F;return Er(f(n,_u),F,t)}),To=lr(Ye),$o=lr(function(n){var t=n.length,t=1=t}),cf=Mt(function(){return arguments}())?Mt:function(n){return xu(n)&&ci.call(n,\"callee\")&&!ji.call(n,\"callee\")},af=Hu.isArray,lf=Hn?S(Hn):Tt,sf=Bi||Gu,hf=Jn?S(Jn):$t,pf=Yn?S(Yn):Nt,_f=Qn?S(Qn):qt,vf=Xn?S(Xn):Vt,gf=nt?S(nt):Kt,df=oe(Jt),yf=oe(function(n,t){return n<=t}),bf=Pr(function(n,t){\nif(Le(t)||pu(t))Tr(t,Lu(t),n);else for(var r in t)ci.call(t,r)&&at(n,r,t[r])}),xf=Pr(function(n,t){Tr(t,Uu(t),n)}),jf=Pr(function(n,t,r,e){Tr(t,Uu(t),n,e)}),wf=Pr(function(n,t,r,e){Tr(t,Lu(t),n,e)}),mf=ge(vt),Af=lr(function(n){return n.push(F,se),r(jf,F,n)}),kf=lr(function(n){return n.push(F,he),r(Rf,F,n)}),Ef=ne(function(n,t,r){n[t]=r},Fu(Nu)),Of=ne(function(n,t,r){ci.call(n,t)?n[t].push(r):n[t]=[r]},je),Sf=lr(Dt),If=Pr(function(n,t,r){nr(n,t,r)}),Rf=Pr(function(n,t,r,e){nr(n,t,r,e)}),zf=ge(function(n,t){\nvar r={};if(null==n)return r;var e=false;t=l(t,function(t){return t=Rr(t,n),e||(e=1--n)return t.apply(this,arguments)}},On.ary=iu,On.assign=bf,On.assignIn=xf,On.assignInWith=jf,On.assignWith=wf,On.at=mf,On.before=ou,On.bind=Yo,On.bindAll=Zf,On.bindKey=Qo,On.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return af(n)?n:[n]},\nOn.chain=Xe,On.chunk=function(n,t,r){if(t=(r?ze(n,t,r):t===F)?1:Di(Ou(t),0),r=null==n?0:n.length,!r||1>t)return[];for(var e=0,u=0,i=Hu(Ri(r/t));et?0:t,e)):[]},On.dropRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0,0>t?0:t)):[]},On.dropRightWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true,true):[]},On.dropWhile=function(n,t){return n&&n.length?Ar(n,je(t,3),true):[]},On.fill=function(n,t,r,e){var u=null==n?0:n.length;if(!u)return[];for(r&&typeof r!=\"number\"&&ze(n,t,r)&&(r=0,e=u),u=n.length,r=Ou(r),0>r&&(r=-r>u?0:u+r),e=e===F||e>u?u:Ou(e),0>e&&(e+=u),e=r>e?0:Su(e);r>>0,r?(n=zu(n))&&(typeof t==\"string\"||null!=t&&!_f(t))&&(t=jr(t),\n!t&&Bn.test(n))?zr($(n),0,r):n.split(t,r):[]},On.spread=function(n,t){if(typeof n!=\"function\")throw new ei(\"Expected a function\");return t=null==t?0:Di(Ou(t),0),lr(function(e){var u=e[t];return e=zr(e,0,t),u&&s(e,u),r(n,this,e)})},On.tail=function(n){var t=null==n?0:n.length;return t?vr(n,1,t):[]},On.take=function(n,t,r){return n&&n.length?(t=r||t===F?1:Ou(t),vr(n,0,0>t?0:t)):[]},On.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?(t=r||t===F?1:Ou(t),t=e-t,vr(n,0>t?0:t,e)):[]},On.takeRightWhile=function(n,t){\nreturn n&&n.length?Ar(n,je(t,3),false,true):[]},On.takeWhile=function(n,t){return n&&n.length?Ar(n,je(t,3)):[]},On.tap=function(n,t){return t(n),n},On.throttle=function(n,t,r){var e=true,u=true;if(typeof n!=\"function\")throw new ei(\"Expected a function\");return bu(r)&&(e=\"leading\"in r?!!r.leading:e,u=\"trailing\"in r?!!r.trailing:u),au(n,t,{leading:e,maxWait:t,trailing:u})},On.thru=nu,On.toArray=ku,On.toPairs=Bf,On.toPairsIn=Lf,On.toPath=function(n){return af(n)?l(n,$e):Au(n)?[n]:Mr(mo(zu(n)))},On.toPlainObject=Ru,\nOn.transform=function(n,t,r){var e=af(n),i=e||sf(n)||gf(n);if(t=je(t,4),null==r){var o=n&&n.constructor;r=i?e?new o:[]:bu(n)&&gu(o)?io(bi(n)):{}}return(i?u:Et)(n,function(n,e,u){return t(r,n,e,u)}),r},On.unary=function(n){return iu(n,1)},On.union=Wo,On.unionBy=Bo,On.unionWith=Lo,On.uniq=function(n){return n&&n.length?wr(n):[]},On.uniqBy=function(n,t){return n&&n.length?wr(n,je(t,2)):[]},On.uniqWith=function(n,t){return t=typeof t==\"function\"?t:F,n&&n.length?wr(n,F,t):[]},On.unset=function(n,t){return null==n||mr(n,t);\n},On.unzip=Ye,On.unzipWith=Qe,On.update=function(n,t,r){return null==n?n:pr(n,t,Ir(r)(It(n,t)),void 0)},On.updateWith=function(n,t,r,e){return e=typeof e==\"function\"?e:F,null!=n&&(n=pr(n,t,Ir(r)(It(n,t)),e)),n},On.values=Du,On.valuesIn=function(n){return null==n?[]:I(n,Uu(n))},On.without=Uo,On.words=$u,On.wrap=function(n,t){return rf(Ir(t),n)},On.xor=Co,On.xorBy=Do,On.xorWith=Mo,On.zip=To,On.zipObject=function(n,t){return Or(n||[],t||[],at)},On.zipObjectDeep=function(n,t){return Or(n||[],t||[],pr);\n},On.zipWith=$o,On.entries=Bf,On.entriesIn=Lf,On.extend=xf,On.extendWith=jf,Zu(On,On),On.add=nc,On.attempt=Pf,On.camelCase=Uf,On.capitalize=Mu,On.ceil=tc,On.clamp=function(n,t,r){return r===F&&(r=t,t=F),r!==F&&(r=Iu(r),r=r===r?r:0),t!==F&&(t=Iu(t),t=t===t?t:0),gt(Iu(n),t,r)},On.clone=function(n){return dt(n,4)},On.cloneDeep=function(n){return dt(n,5)},On.cloneDeepWith=function(n,t){return t=typeof t==\"function\"?t:F,dt(n,5,t)},On.cloneWith=function(n,t){return t=typeof t==\"function\"?t:F,dt(n,4,t)},\nOn.conformsTo=function(n,t){return null==t||bt(n,t,Lu(t))},On.deburr=Tu,On.defaultTo=function(n,t){return null==n||n!==n?t:n},On.divide=rc,On.endsWith=function(n,t,r){n=zu(n),t=jr(t);var e=n.length,e=r=r===F?e:gt(Ou(r),0,e);return r-=t.length,0<=r&&n.slice(r,e)==t},On.eq=hu,On.escape=function(n){return(n=zu(n))&&Y.test(n)?n.replace(H,et):n},On.escapeRegExp=function(n){return(n=zu(n))&&fn.test(n)?n.replace(on,\"\\\\$&\"):n},On.every=function(n,t,r){var e=af(n)?o:wt;return r&&ze(n,t,r)&&(t=F),e(n,je(t,3));\n},On.find=Po,On.findIndex=Ze,On.findKey=function(n,t){return v(n,je(t,3),Et)},On.findLast=Zo,On.findLastIndex=qe,On.findLastKey=function(n,t){return v(n,je(t,3),Ot)},On.floor=ec,On.forEach=ru,On.forEachRight=eu,On.forIn=function(n,t){return null==n?n:co(n,je(t,3),Uu)},On.forInRight=function(n,t){return null==n?n:ao(n,je(t,3),Uu)},On.forOwn=function(n,t){return n&&Et(n,je(t,3))},On.forOwnRight=function(n,t){return n&&Ot(n,je(t,3))},On.get=Wu,On.gt=of,On.gte=ff,On.has=function(n,t){return null!=n&&ke(n,t,Bt);\n},On.hasIn=Bu,On.head=Ke,On.identity=Nu,On.includes=function(n,t,r,e){return n=pu(n)?n:Du(n),r=r&&!e?Ou(r):0,e=n.length,0>r&&(r=Di(e+r,0)),mu(n)?r<=e&&-1r&&(r=Di(e+r,0)),d(n,t,r)):-1},On.inRange=function(n,t,r){return t=Eu(t),r===F?(r=t,t=0):r=Eu(r),n=Iu(n),n>=Mi(t,r)&&n=n},On.isSet=vf,On.isString=mu,On.isSymbol=Au,On.isTypedArray=gf,On.isUndefined=function(n){return n===F},On.isWeakMap=function(n){return xu(n)&&\"[object WeakMap]\"==yo(n)},On.isWeakSet=function(n){return xu(n)&&\"[object WeakSet]\"==zt(n)},On.join=function(n,t){\nreturn null==n?\"\":Ui.call(n,t)},On.kebabCase=Cf,On.last=Ge,On.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;if(r!==F&&(u=Ou(r),u=0>u?Di(e+u,0):Mi(u,e-1)),t===t){for(r=u+1;r--&&n[r]!==t;);n=r}else n=g(n,b,u,true);return n},On.lowerCase=Df,On.lowerFirst=Mf,On.lt=df,On.lte=yf,On.max=function(n){return n&&n.length?mt(n,Nu,Wt):F},On.maxBy=function(n,t){return n&&n.length?mt(n,je(t,2),Wt):F},On.mean=function(n){return x(n,Nu)},On.meanBy=function(n,t){return x(n,je(t,2))},On.min=function(n){\nreturn n&&n.length?mt(n,Nu,Jt):F},On.minBy=function(n,t){return n&&n.length?mt(n,je(t,2),Jt):F},On.stubArray=Ku,On.stubFalse=Gu,On.stubObject=function(){return{}},On.stubString=function(){return\"\"},On.stubTrue=function(){return true},On.multiply=uc,On.nth=function(n,t){return n&&n.length?tr(n,Ou(t)):F},On.noConflict=function(){return Zn._===this&&(Zn._=pi),this},On.noop=qu,On.now=Jo,On.pad=function(n,t,r){n=zu(n);var e=(t=Ou(t))?T(n):0;return!t||e>=t?n:(t=(t-e)/2,ee(zi(t),r)+n+ee(Ri(t),r))},On.padEnd=function(n,t,r){\nn=zu(n);var e=(t=Ou(t))?T(n):0;return t&&et){var e=n;n=t,t=e}return r||n%1||t%1?(r=Fi(),Mi(n+r*(t-n+$n(\"1e-\"+((r+\"\").length-1))),t)):cr(n,t);\n},On.reduce=function(n,t,r){var e=af(n)?h:m,u=3>arguments.length;return e(n,je(t,4),r,u,oo)},On.reduceRight=function(n,t,r){var e=af(n)?p:m,u=3>arguments.length;return e(n,je(t,4),r,u,fo)},On.repeat=function(n,t,r){return t=(r?ze(n,t,r):t===F)?1:Ou(t),ar(zu(n),t)},On.replace=function(){var n=arguments,t=zu(n[0]);return 3>n.length?t:t.replace(n[1],n[2])},On.result=function(n,t,r){t=Rr(t,n);var e=-1,u=t.length;for(u||(u=1,n=F);++en||9007199254740991=i)return n;if(i=r-T(e),1>i)return e;\nif(r=o?zr(o,0,i).join(\"\"):n.slice(0,i),u===F)return r+e;if(o&&(i+=r.length-i),_f(u)){if(n.slice(i).search(u)){var f=r;for(u.global||(u=ti(u.source,zu(dn.exec(u))+\"g\")),u.lastIndex=0;o=u.exec(f);)var c=o.index;r=r.slice(0,c===F?i:c)}}else n.indexOf(jr(u),i)!=i&&(u=r.lastIndexOf(u),-1e.__dir__?\"Right\":\"\")}),e},Mn.prototype[n+\"Right\"]=function(t){\nreturn this.reverse()[n](t).reverse()}}),u([\"filter\",\"map\",\"takeWhile\"],function(n,t){var r=t+1,e=1==r||3==r;Mn.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:je(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}}),u([\"head\",\"last\"],function(n,t){var r=\"take\"+(t?\"Right\":\"\");Mn.prototype[n]=function(){return this[r](1).value()[0]}}),u([\"initial\",\"tail\"],function(n,t){var r=\"drop\"+(t?\"\":\"Right\");Mn.prototype[n]=function(){return this.__filtered__?new Mn(this):this[r](1);\n}}),Mn.prototype.compact=function(){return this.filter(Nu)},Mn.prototype.find=function(n){return this.filter(n).head()},Mn.prototype.findLast=function(n){return this.reverse().find(n)},Mn.prototype.invokeMap=lr(function(n,t){return typeof n==\"function\"?new Mn(this):this.map(function(r){return Dt(r,n,t)})}),Mn.prototype.reject=function(n){return this.filter(su(je(n)))},Mn.prototype.slice=function(n,t){n=Ou(n);var r=this;return r.__filtered__&&(0t)?new Mn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),\nt!==F&&(t=Ou(t),r=0>t?r.dropRight(-t):r.take(t-n)),r)},Mn.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Mn.prototype.toArray=function(){return this.take(4294967295)},Et(Mn.prototype,function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=On[e?\"take\"+(\"last\"==t?\"Right\":\"\"):t],i=e||/^find/.test(t);u&&(On.prototype[t]=function(){function t(n){return n=u.apply(On,s([n],f)),e&&h?n[0]:n}var o=this.__wrapped__,f=e?[1]:arguments,c=o instanceof Mn,a=f[0],l=c||af(o);\nl&&r&&typeof a==\"function\"&&1!=a.length&&(c=l=false);var h=this.__chain__,p=!!this.__actions__.length,a=i&&!h,c=c&&!p;return!i&&l?(o=c?o:new Mn(this),o=n.apply(o,f),o.__actions__.push({func:nu,args:[t],thisArg:F}),new zn(o,h)):a&&c?n.apply(this,f):(o=this.thru(t),a?e?o.value()[0]:o.value():o)})}),u(\"pop push shift sort splice unshift\".split(\" \"),function(n){var t=ui[n],r=/^(?:push|sort|unshift)$/.test(n)?\"tap\":\"thru\",e=/^(?:pop|shift)$/.test(n);On.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){\nvar u=this.value();return t.apply(af(u)?u:[],n)}return this[r](function(r){return t.apply(af(r)?r:[],n)})}}),Et(Mn.prototype,function(n,t){var r=On[t];if(r){var e=r.name+\"\";(Ji[e]||(Ji[e]=[])).push({name:t,func:r})}}),Ji[Xr(F,2).name]=[{name:\"wrapper\",func:F}],Mn.prototype.clone=function(){var n=new Mn(this.__wrapped__);return n.__actions__=Mr(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=Mr(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=Mr(this.__views__),\nn},Mn.prototype.reverse=function(){if(this.__filtered__){var n=new Mn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},Mn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=af(t),u=0>r,i=e?t.length:0;n=i;for(var o=this.__views__,f=0,c=-1,a=o.length;++c=this.__values__.length;return{done:n,value:n?F:this.__values__[this.__index__++]}},On.prototype.plant=function(n){for(var t,r=this;r instanceof Sn;){var e=Pe(r);e.__index__=0,e.__values__=F,t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},On.prototype.reverse=function(){var n=this.__wrapped__;return n instanceof Mn?(this.__actions__.length&&(n=new Mn(this)),n=n.reverse(),n.__actions__.push({func:nu,args:[Je],thisArg:F}),new zn(n,this.__chain__)):this.thru(Je);\n},On.prototype.toJSON=On.prototype.valueOf=On.prototype.value=function(){return kr(this.__wrapped__,this.__actions__)},On.prototype.first=On.prototype.head,Ai&&(On.prototype[Ai]=tu),On}();typeof define==\"function\"&&typeof define.amd==\"object\"&&define.amd?(Zn._=it, define(function(){return it})):Vn?((Vn.exports=it)._=it,qn._=it):Zn._=it}).call(this);\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash/lodash.min.js\n// module id = ./node_modules/lodash/lodash.min.js\n// module chunks = 0","var g;\r\n\r\n// This works in non-strict mode\r\ng = (function() {\r\n\treturn this;\r\n})();\r\n\r\ntry {\r\n\t// This works if eval is allowed (see CSP)\r\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\r\n} catch(e) {\r\n\t// This works if the window reference is available\r\n\tif(typeof window === \"object\")\r\n\t\tg = window;\r\n}\r\n\r\n// g can still be undefined, but nothing to do about it...\r\n// We return undefined, instead of nothing here, so it's\r\n// easier to handle this case. if(!global) { ...}\r\n\r\nmodule.exports = g;\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/global.js\n// module id = ./node_modules/webpack/buildin/global.js\n// module chunks = 0","module.exports = function(module) {\r\n\tif(!module.webpackPolyfill) {\r\n\t\tmodule.deprecate = function() {};\r\n\t\tmodule.paths = [];\r\n\t\t// module.parent = undefined by default\r\n\t\tif(!module.children) module.children = [];\r\n\t\tObject.defineProperty(module, \"loaded\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.l;\r\n\t\t\t}\r\n\t\t});\r\n\t\tObject.defineProperty(module, \"id\", {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn module.i;\r\n\t\t\t}\r\n\t\t});\r\n\t\tmodule.webpackPolyfill = 1;\r\n\t}\r\n\treturn module;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// (webpack)/buildin/module.js\n// module id = ./node_modules/webpack/buildin/module.js\n// module chunks = 0","import { compose, isEqual } from 'lodash/fp';\n\n/* eslint-disable no-underscore-dangle */\n// Accept the huron.js module for Huron development\nif (module.hot) {\n module.hot.accept();\n}\n\n/** Class for inserting HTML snippets at particular insertion points.\n * Uses require() to grab html partials, then inserts that html\n * into an element with attribute [huron-id] corresponding to the reference URI of the target KSS section,\n * and [huron-type] corresponding with the required KSS field\n */\nexport default class InsertNodes {\n\n constructor(modules, store) {\n /** webpack module list in which keys are relative require paths and values are the module contents */\n this._modules = modules;\n /** array of module keys */\n this._moduleIds = Object.keys(modules);\n /** reference to the huron config */\n this._config = null;\n /** KSS sections organized in various formats including by reference URI, by module key, and modules sorted by parent/child */\n this._sections = null;\n /** Key/value pairs of partner data and template files */\n this._templates = null;\n /** array of prototypes */\n this._prototypes = null;\n /** array of valid huron placeholder types */\n this._types = null;\n /** array of CSS modules classnames */\n this._classNames = null;\n\n /** Cache for module metadata */\n this.meta = {};\n\n /** Reference to entire memory store */\n this.store = store;\n\n // Inits\n this.cycleModules();\n this.cycleStyleguide();\n }\n\n /**\n * Apply a modifier if one exists\n *\n * @param {object} data - data with which to render template\n * @param {string} modifier - target modifier\n *\n * @return {string} data - subset of data object for supplied modifier\n */\n static applyModifier(data, modifier) {\n // If we have a modifier, use it, otherwise use the entire data set\n if (modifier && data && data[modifier]) {\n return Object.assign({}, data[modifier], { modifier });\n }\n\n return data;\n }\n\n /**\n * Get markup from any type of module (html, json or template)\n *\n * @param {string} content - String corresponding to markup\n * @return {object} el.firstElementChild - HTML module\n */\n static convertToElement(content) {\n const el = document.createElement('div');\n\n el.innerHTML = content;\n return el.firstElementChild;\n }\n\n /**\n * Filter module object by module key or module type\n *\n * @param {object} filter - Filter for modules. Options:\n * @param {string} filter.property - Which property to filter ('key' or 'type')\n * @param {array} filter.values - Values for property\n * @param {bool} filter.include - Whether the values should be included or excluded (true = include, false = exclude)\n * @param {object} moduleMeta - Filter for modules. Fields explained in the filterModules() function docs\n * @return {bool} match - determine if modules need to be filtered\n */\n static filterModules(filter, moduleMeta) {\n let match = true;\n\n // Check if we should filter out any modules\n if (\n 'object' === typeof filter &&\n {}.hasOwnProperty.call(filter, 'property') &&\n {}.hasOwnProperty.call(filter, 'values') &&\n {}.hasOwnProperty.call(filter, 'include')\n ) {\n match = filter.values.filter(\n (value) => moduleMeta[filter.property] === value\n );\n return Boolean(match.length) === filter.include;\n }\n\n console.log(` // eslint-disable-line no-console\n filter ${filter} is not in a valid format.\n module filters must include 'property', 'values', and 'include' properties\n `);\n\n return match;\n }\n\n /**\n * Retrieve a data attribute from a tag using one of two methods\n *\n * @param {HTMLElement} tag - DOM node on which to check for a data attribute\n * @param {string} attr - attribute to check for\n * @returns {string} data - contents of data attribute\n */\n static getDataAttribute(tag, attr) {\n let data = false;\n\n // Check if element has dataset and, if so, use it\n if (tag.dataset) {\n data = tag.dataset[attr];\n }\n\n // Fallback to getAttribute for ugly old Safari\n if (!data && tag.getAttribute) {\n data = tag.getAttribute(`data-${attr}`);\n }\n\n return data;\n }\n\n /**\n * Check if this tag is a styleguide helper\n *\n * @param {object} tag - tag to check\n * @param {object} meta - module metadata\n * @return {bool}\n */\n static isSectionHelper(tag, meta) {\n if ('prototype' === meta.type) {\n return tag.hasAttribute('huron-sections') ||\n tag.hasAttribute('huron-menu');\n }\n\n return false;\n }\n\n /**\n * Replace all template markers with the actual template markup.\n *\n * @param {string} context - The within which to replace markup\n * @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs\n */\n cycleModules(context = false, filter = false) {\n let moduleList = {};\n let elementList = context;\n\n // We're replacing top-level elements\n if (!elementList) {\n this.regenCache();\n\n // Find all top-level huron placeholders\n elementList = [...document.querySelectorAll(\n '[data-huron-id][data-huron-type]'\n )];\n }\n\n moduleList = this.getModuleListFromTags(elementList);\n\n // Loop through modules array\n Object.keys(moduleList).forEach((key) => {\n const module = this._modules[key];\n const replaceElements = moduleList[key];\n\n this.loadModule(key, module, replaceElements, true, filter);\n });\n }\n\n /**\n * Helper for reloading sections only\n */\n cycleSections() {\n this.cycleModules(false, {\n property: 'type',\n values: ['section'],\n include: true,\n });\n }\n\n /**\n * Reload styleguide sections and menu helpers\n */\n cycleStyleguide() {\n const sectionsQuery = document.querySelector('[huron-sections]');\n const menuQuery = document.querySelector('[huron-menu]');\n\n // Sections\n if (sectionsQuery) {\n sectionsQuery.innerHTML = '';\n this.outputSections(null, sectionsQuery);\n this.cycleSections();\n }\n\n // Menu\n if (menuQuery) {\n menuQuery.innerHTML = '';\n\n if (null === document.querySelector('.section-menu__expand')) {\n const menuTrigger = document.createElement('button');\n\n menuTrigger.classList.add('section-menu__expand');\n menuTrigger.innerHTML = 'Sections Menu';\n document.body.insertBefore(\n menuQuery.appendChild(menuTrigger),\n document.body.childNodes[0]\n );\n\n // Add menu trigger handler\n menuTrigger.addEventListener('click', () => {\n document.body.classList.toggle('section-menu-open');\n });\n }\n\n // Create menu\n this.outputMenu(null, menuQuery);\n }\n }\n\n /**\n * Generate a unique key for targeting markup replacement\n *\n * @param {string} key - module key (webpack require path) to convert into a replacement key\n * @return {string} key - generated replacement key\n */\n generateModuleReplaceKey(key) {\n let currentKey = key;\n\n // If this is section data, use the section template path\n if (key.includes('-section.json')) {\n currentKey = this._sectionTemplatePath;\n // If updated module is a json file, use template key instead\n } else if (key.includes('.json')) {\n currentKey = this._templates[key];\n }\n\n return `_${currentKey.replace(/[/.]/g, '_')}`;\n }\n\n /**\n * Get module metadata from a module require path\n *\n * @param {string} key - Module require path\n * @return {object} containing module id, module type, key and the module contents\n */\n getMetaFromPath(key, module) {\n const sections = this._sections.sectionsByPath;\n const templateTypes = this._types.filter((type) => 'prototype' !== type);\n let id = false;\n let type = false;\n\n /* eslint-disable space-unary-ops */\n if (-1 !== key.indexOf('./prototypes')) {\n /* eslint-enable space-unary-ops */\n const prototype = Object.keys(this._prototypes)\n .filter((name) => this._prototypes[name] === key);\n\n if (prototype.length) {\n id = prototype[0];\n type = 'prototype';\n }\n } else if (key === this._sectionTemplatePath) {\n id = 'sections-template';\n type = 'sections-template';\n } else {\n let testTypes = [];\n const testSections = Object.keys(sections).filter((section) => {\n const tempTypes = templateTypes.filter(\n (currentType) => sections[section][`${currentType}Path`] === key\n );\n\n if (tempTypes.length) {\n testTypes = tempTypes;\n return true;\n }\n\n return false;\n });\n\n if (\n testSections &&\n testSections.length &&\n testTypes &&\n testTypes.length\n ) {\n id = sections[testSections[0]].referenceURI;\n type = testTypes[0];\n }\n }\n\n if (id && type) {\n const renderData = this.getModuleRender(type, key, module);\n const replaceKey = this.generateModuleReplaceKey(key);\n\n if (renderData) {\n return Object.assign({ id, type, key, replaceKey, module }, renderData);\n }\n }\n\n console.warn( // eslint-disable-line no-console\n `Module '${key}' does not exist on the page\n or is no longer in use`\n );\n return false;\n }\n\n /**\n * Check if a tag is a huron placeholder and, if so,\n * return its associated module key\n *\n * @param {object} tag - tag to check\n * @return {bool} associated module key\n */\n getModuleKeyFromTag(tag) {\n // Safari/webkit has some trouble parsing dataset in certain cases.\n // This is a fallback method of accessing the same data.\n const type = InsertNodes.getDataAttribute(tag, 'huron-type');\n const id = InsertNodes.getDataAttribute(tag, 'huron-id');\n const section = this._sections.sectionsByURI[id];\n\n if (id && type) {\n if (section) {\n return section[`${type}Path`];\n } else if ('prototype' === type) {\n return this._prototypes[id];\n }\n }\n\n return false;\n }\n\n /**\n * Check if an array of elements contains a Huron placeholder\n *\n * @param {array} tags - array of DOM nodes\n * @param {bool} recurse - should we recurse this function with a new array\n * @return {object} moduleList - Huron placeholder DOM node\n */\n getModuleListFromTags(elements, recurse = true) {\n const moduleList = {};\n let newList = {};\n\n if (elements && elements.length) {\n elements.forEach((element) => {\n const moduleKey = this.getModuleKeyFromTag(element);\n\n if (moduleKey) {\n if (!moduleList[moduleKey]) {\n moduleList[moduleKey] = [];\n }\n moduleList[moduleKey].push(element);\n } else if (recurse) {\n newList = this.getModuleListFromTags(\n [...element.querySelectorAll('[data-huron-id][data-huron-type]')],\n false\n );\n\n Object.keys(newList).forEach((key) => {\n moduleList[key] = moduleList[key] ?\n moduleList[key].concat(newList[key]) :\n newList[key];\n });\n }\n });\n }\n\n return moduleList;\n }\n\n /**\n * Transform every module into a predictable object\n *\n * @param {object} type - Module metadata\n * @param {mixed} module - Module contents\n * @return {object} containing render function, render data and module id\n */\n getModuleRender(type, key, module) {\n let render = false;\n let data = false;\n\n if ('template' === type && 'function' === typeof module) {\n // It's a render function for a template\n render = module;\n data = this._modules[this._templates[key]];\n } else if (\n 'sections-template' === type &&\n 'function' === typeof module\n ) {\n // It's a kss section template\n render = module;\n } else if (\n 'section' === type &&\n 'object' === typeof module\n ) {\n // It's section data\n render = this._modules[this._sectionTemplatePath];\n data = module;\n } else if (\n ('template' === type || 'description' === type || 'prototype' === type) &&\n 'string' === typeof module\n ) {\n // it's straight HTML\n render = () => module;\n } else if ('data' === type && 'object' === typeof module) {\n // It's a data file (.json)\n render = this._modules[this._templates[key]];\n data = module;\n }\n\n // Only need render, as data will be left empty for static HTML\n if (render) {\n return { render, data };\n }\n\n return false;\n }\n\n /**\n * Replace all sections. For hot reloading use when the section template has changed.\n *\n * @param {object} replaceElements - The context (e.g. document) that you will query for the template ID to replace\n * @param {string} key - Module require path\n * @param {mixed} module - Module contents\n * @param {bool} cached - Whether or not to use cached values for module replacement\n * @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs\n */\n loadModule(key, module, replaceElements, cached = false, filter = false) {\n let shouldLoad = true;\n let moduleMeta = false;\n\n // Check if we should load from internal module metadata cache\n if (cached) {\n moduleMeta = this.meta[key];\n } else {\n moduleMeta = this.meta[key] = this.getMetaFromPath(key, module);\n }\n\n if (moduleMeta) {\n if (filter) {\n shouldLoad = InsertNodes.filterModules(filter, moduleMeta);\n }\n\n if (shouldLoad) {\n this.replaceTemplate(moduleMeta, replaceElements);\n }\n }\n }\n\n /*\n * Helper function for inserting styleguide sections.\n *\n * Recurses over sorted styleguide sections and inserts a to be used as a menu for each section\n */\n outputMenu(parent, el, sections = this._sections.sorted) {\n let templateId = null;\n let newEl = el;\n\n Object.keys(sections).forEach((section) => {\n const hasSubmenu = Object.keys(sections[section]).length;\n let menuTarget;\n let nextMenu;\n\n if (parent) {\n templateId = `${parent}-${section}`;\n } else {\n templateId = section;\n }\n\n if (newEl) {\n const title = this._sections\n .sectionsByURI[templateId] ?\n this._sections\n .sectionsByURI[templateId]\n .header :\n templateId;\n const sectionMenu = document.createElement('ul');\n const menuItem = document.createElement('li');\n const link = `${title}`;\n\n sectionMenu.classList.add('section-menu');\n menuItem.classList.add('section-menu__item');\n menuItem.innerHTML = link;\n\n // Check if this is a UL and, if not, create one\n if ('UL' !== newEl.tagName) {\n menuTarget = sectionMenu.cloneNode();\n newEl.appendChild(menuTarget);\n newEl = menuTarget;\n }\n\n // Has subsections\n if (hasSubmenu) {\n nextMenu = sectionMenu.cloneNode();\n nextMenu.classList.add('section-menu--submenu');\n menuItem.classList.add('section-menu__item--has-submenu');\n menuItem.appendChild(nextMenu);\n }\n\n newEl.appendChild(menuItem);\n\n if (hasSubmenu) {\n this.outputMenu(\n templateId,\n nextMenu,\n sections[section]\n );\n }\n }\n });\n }\n\n /**\n * Helper function for inserting styleguide sections.\n *\n * Recurses over sorted styleguide sections and inserts a tag with [huron-id] equal to the section template name.\n */\n outputSections(parent, el, sections = this._sections.sorted) {\n let templateId = null;\n let placeholder = null;\n\n Object.keys(sections).forEach((section) => {\n let istopLevel = false;\n let topLevelWrapper = null;\n let topLevelSection = null;\n let insertionEl = el;\n\n // Generate section ID and check if it is top-level\n if (parent) {\n templateId = `${parent}-${section}`;\n } else {\n templateId = section;\n istopLevel = true;\n }\n\n if (el) {\n // Generate huron placeholder for this section\n placeholder = document.createElement('div');\n placeholder.dataset.huronId = templateId;\n placeholder.dataset.huronType = 'section';\n\n if (istopLevel) {\n // Generate wrapper to contain top-level section and all subsections underneath it\n topLevelWrapper = document.createElement('div');\n topLevelWrapper.classList.add('section--top-level__wrapper');\n\n // Generate wrapper for top-level section\n topLevelSection = document.createElement('div');\n topLevelSection.classList.add('section', 'section--top-level');\n\n // Append wrappers to huron-sections element\n topLevelSection.appendChild(placeholder);\n topLevelWrapper.appendChild(topLevelSection);\n el.appendChild(topLevelWrapper);\n insertionEl = topLevelWrapper;\n } else {\n // If this is not top-level, append placeholder\n el.appendChild(placeholder);\n }\n }\n\n // Recursively call this function to insert other sections\n if (Object.keys(sections[section]).length && placeholder) {\n this.outputSections(\n templateId,\n insertionEl,\n sections[section]\n );\n }\n });\n }\n\n /**\n * Apply a modifier and merge classnames into template data, if it exists\n *\n * @param {object} data - data with which to render template\n * @param {string} modifier - target modifier\n *\n * @return {string} rendered - the modified HTML module\n */\n provideClassnames(data) {\n if (this._classNames) {\n return Object.assign({}, data, { classNames: this._classNames });\n }\n\n return data;\n }\n\n /**\n * Regenerate module meta cache\n */\n regenCache() {\n Object.keys(this._modules).forEach((moduleKey) => {\n this.meta[moduleKey] = this.getMetaFromPath(\n moduleKey, this._modules[moduleKey]\n );\n });\n }\n\n /**\n * Recursively remove old tags\n *\n * @param {string} replaceKey - key of module for which we need to remove old tags\n * @param {object} tag - tag to start our search with\n * (usually the tag immediately preceding the current placeholder)\n */\n removeOldTags(replaceKey, tag) {\n if (tag) {\n const parentModule = InsertNodes.getDataAttribute(tag, 'parent-module');\n const selfModule = InsertNodes.getDataAttribute(tag, 'self-module');\n\n if (parentModule === replaceKey && selfModule !== replaceKey) {\n // This is a child of the current module,\n // so remove it and its children (if applicable)\n const childrenModule = selfModule;\n let nextTag = tag.previousSibling;\n\n if (childrenModule) {\n this.removeOldTags(childrenModule, nextTag);\n // Reset nextTag if we removed a child\n nextTag = tag.previousSibling;\n }\n\n tag.parentNode.removeChild(tag);\n this.removeOldTags(replaceKey, nextTag);\n }\n }\n }\n\n /**\n * Replace a single template marker with template content.\n *\n * @param {object} replaceElements - Array of elements to check for Huron placeholders\n * @param {object} meta - Module metadata\n */\n replaceTemplate(meta, replaceElements) {\n const type = this.validateType(meta.type);\n const tags = [];\n let replace = replaceElements;\n let hasStyleguideHelpers = false;\n\n if (!replace) {\n replace = document.querySelectorAll(\n '[data-huron-id][data-huron-type]'\n );\n }\n\n if (type) {\n replace.forEach((tag) => {\n const tagType = InsertNodes.getDataAttribute(tag, 'huron-type');\n const tagId = InsertNodes.getDataAttribute(tag, 'huron-id');\n\n if (tagId === meta.id && tagType === type) {\n tags.push(tag);\n }\n });\n\n if (tags && tags.length && meta.render) {\n tags.forEach((currentTag) => {\n const modifiedPlaceholder = currentTag;\n const modifier = InsertNodes\n .getDataAttribute(modifiedPlaceholder, 'huron-modifier');\n const parent = modifiedPlaceholder.parentNode;\n const data = compose(\n this.provideClassnames.bind(this),\n InsertNodes.applyModifier\n )(meta.data, modifier);\n const rendered = meta.render(data);\n const renderedTemplate = InsertNodes.convertToElement(rendered)\n .querySelector('template');\n let renderedContents = null;\n\n // Remove existing module tags\n this.removeOldTags(\n meta.replaceKey,\n modifiedPlaceholder.previousSibling\n );\n\n // Get the contents of the rendered template\n renderedContents = [\n ...renderedTemplate.content.children,\n ];\n\n // Insert each tag of the template contents before placeholder\n renderedContents.forEach((element) => {\n const newEl = element;\n\n if (1 === newEl.nodeType) {\n newEl.dataset.parentModule = meta.replaceKey;\n hasStyleguideHelpers = !hasStyleguideHelpers ?\n InsertNodes.isSectionHelper(newEl, meta) :\n hasStyleguideHelpers;\n\n parent.insertBefore(newEl, modifiedPlaceholder);\n }\n });\n\n // Add module replacement key to this placeholder\n modifiedPlaceholder.dataset.selfModule = meta.replaceKey;\n\n // Hide the placeholder\n modifiedPlaceholder.style.display = 'none';\n\n // Recursively load modules, excluding the current one\n this.cycleModules(renderedContents, {\n property: 'key',\n values: [meta.key, this._sectionTemplatePath],\n include: false,\n });\n\n if (hasStyleguideHelpers) {\n this.cycleStyleguide();\n }\n });\n }\n } else {\n console.warn( // eslint-disable-line no-console\n `Could not render module\n section: ${meta.id}\n type: ${meta.type}`\n );\n }\n }\n\n /**\n * Verify specified element is using an acceptable huron type\n *\n * @param {string} type - type of partial (template, data, description, section or prototype )\n * @return {string} type - huron type or 'template' if invalid\n */\n validateType(type) {\n if ('data' === type) {\n return 'template';\n }\n\n if (!this._types.includes(type)) {\n return false;\n }\n\n return type;\n }\n\n /*\n * Set new modules object\n */\n set modules(modules) {\n this._modules = modules;\n this._moduleIds = Object.keys(modules);\n }\n\n /*\n * Set store\n */\n set store(store) {\n this._store = store;\n this._config = store.config;\n this._sections = store.sections;\n this._templates = store.templates;\n this._prototypes = store.prototypes;\n this._types = store.types;\n this._sectionTemplatePath = store.sectionTemplatePath;\n\n // Completely rerender prototype if any CSS modules classnames change\n if (!isEqual(this._classNames, store.classNames)) {\n const isInitialRender = !this._classNames;\n this._classNames = store.classNames;\n\n // Only rerender after initial render (when classnames is not falsy)\n if (!isInitialRender) {\n this.cycleModules();\n }\n }\n }\n}\n/* eslint-enable */\n\n\n\n// WEBPACK FOOTER //\n// src/web/index.js"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;A;;;;;AChEA;AACA;;;;;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACvjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AC/WA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;ACrBA;AACA;;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAKA;AAEA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AAuGA;;;;;;AAMA;AAAA;AACA;AADA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AAHA;AAKA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAIA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAIA;AACA;AACA;AACA;AAIA;AACA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;AASA;AAAA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;;;;;;;;AAKA;AAAA;AACA;AADA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AACA;AACA;AACA;AACA;;;;;;;;;;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AAAA;AACA;AAAA;AACA;AAGA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AAAA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAIA;AACA;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAHA;AACA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAKA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAxtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;AAMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AAUA;AACA;AACA;AACA;AACA;AAMA;AACA;AAAA;AAEA;AACA;AACA;AACA;AACA;AAIA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;AAOA;AACA;AACA;AAEA;AACA;AACA;AACA;;;;;AA6nBA;AACA;AACA;AAnwBA;;;;;;;;;;;;A","sourceRoot":""}
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index ae9f431..84a7c87 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "huron",
- "version": "2.3.0-beta.2",
+ "version": "2.3.0-beta.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -342,7 +342,6 @@
"version": "6.25.0",
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.25.0.tgz",
"integrity": "sha1-fdQrBGPHQunVKW3rPsZ6kyLa1yk=",
- "dev": true,
"requires": {
"babel-code-frame": "6.26.0",
"babel-generator": "6.26.0",
@@ -368,8 +367,7 @@
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
}
}
},
@@ -377,7 +375,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.0.tgz",
"integrity": "sha1-rBriAHC3n248odMmlhMFN3TyDcU=",
- "dev": true,
"requires": {
"babel-messages": "6.23.0",
"babel-runtime": "6.26.0",
@@ -392,14 +389,12 @@
"jsesc": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz",
- "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=",
- "dev": true
+ "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s="
},
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
}
}
},
@@ -550,7 +545,6 @@
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
"integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=",
- "dev": true,
"requires": {
"babel-runtime": "6.26.0",
"babel-template": "6.26.0"
@@ -624,7 +618,6 @@
"version": "6.23.0",
"resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz",
"integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=",
- "dev": true,
"requires": {
"babel-runtime": "6.26.0"
}
@@ -1054,7 +1047,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz",
"integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=",
- "dev": true,
"requires": {
"babel-core": "6.26.0",
"babel-runtime": "6.26.0",
@@ -1069,7 +1061,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.0.tgz",
"integrity": "sha1-rzL3izGm/O8RnIew/Y2XU/A6C7g=",
- "dev": true,
"requires": {
"babel-code-frame": "6.26.0",
"babel-generator": "6.26.0",
@@ -1095,8 +1086,7 @@
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
}
}
},
@@ -1104,7 +1094,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=",
- "dev": true,
"requires": {
"core-js": "2.5.1",
"regenerator-runtime": "0.11.0"
@@ -1113,8 +1102,7 @@
"regenerator-runtime": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz",
- "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==",
- "dev": true
+ "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A=="
}
}
},
@@ -1122,7 +1110,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz",
"integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=",
- "dev": true,
"requires": {
"babel-runtime": "6.26.0",
"babel-traverse": "6.26.0",
@@ -1134,8 +1121,7 @@
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
}
}
},
@@ -1143,7 +1129,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz",
"integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=",
- "dev": true,
"requires": {
"babel-code-frame": "6.26.0",
"babel-messages": "6.23.0",
@@ -1159,8 +1144,7 @@
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
}
}
},
@@ -1168,7 +1152,6 @@
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz",
"integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=",
- "dev": true,
"requires": {
"babel-runtime": "6.26.0",
"esutils": "2.0.2",
@@ -1179,16 +1162,14 @@
"lodash": {
"version": "4.17.4",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
- "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=",
- "dev": true
+ "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
}
}
},
"babylon": {
"version": "6.18.0",
"resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz",
- "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==",
- "dev": true
+ "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ=="
},
"balanced-match": {
"version": "0.4.2",
@@ -2006,8 +1987,7 @@
"convert-source-map": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.0.tgz",
- "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU=",
- "dev": true
+ "integrity": "sha1-ms1whRxtXf3ZPZKC5e35SgP/RrU="
},
"cookie": {
"version": "0.3.1",
@@ -2022,8 +2002,7 @@
"core-js": {
"version": "2.5.1",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz",
- "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=",
- "dev": true
+ "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs="
},
"core-util-is": {
"version": "1.0.2",
@@ -2351,7 +2330,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz",
"integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=",
- "dev": true,
"requires": {
"repeating": "2.0.1"
}
@@ -4158,8 +4136,7 @@
"globals": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz",
- "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==",
- "dev": true
+ "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ=="
},
"globby": {
"version": "5.0.0",
@@ -4401,7 +4378,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz",
"integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=",
- "dev": true,
"requires": {
"os-homedir": "1.0.2",
"os-tmpdir": "1.0.2"
@@ -4802,7 +4778,6 @@
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.2.tgz",
"integrity": "sha1-nh9WrArNtr8wMwbzOL47IErmA2A=",
- "dev": true,
"requires": {
"loose-envify": "1.3.1"
}
@@ -6005,7 +5980,6 @@
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz",
"integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=",
- "dev": true,
"requires": {
"js-tokens": "3.0.2"
}
@@ -6595,8 +6569,7 @@
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
- "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
- "dev": true
+ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-locale": {
"version": "1.4.0",
@@ -6609,8 +6582,7 @@
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
- "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
- "dev": true
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"output-file-sync": {
"version": "1.1.2",
@@ -7581,6 +7553,12 @@
"unpipe": "1.0.0"
}
},
+ "raw-loader": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz",
+ "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=",
+ "dev": true
+ },
"read-pkg": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
@@ -8148,8 +8126,7 @@
"slash": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz",
- "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=",
- "dev": true
+ "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU="
},
"slice-ansi": {
"version": "0.0.4",
@@ -8228,7 +8205,6 @@
"version": "0.4.18",
"resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.18.tgz",
"integrity": "sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==",
- "dev": true,
"requires": {
"source-map": "0.5.7"
}
@@ -8620,8 +8596,7 @@
"to-fast-properties": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz",
- "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=",
- "dev": true
+ "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc="
},
"toposort": {
"version": "1.0.6",
@@ -8656,8 +8631,7 @@
"trim-right": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz",
- "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=",
- "dev": true
+ "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM="
},
"tryit": {
"version": "1.0.3",
diff --git a/package.json b/package.json
index c96d76a..e77da1a 100644
--- a/package.json
+++ b/package.json
@@ -2,7 +2,7 @@
"name": "huron",
"description": "An in-browser prototyping tool built on top of webpack and kss-node",
"author": "Alley Interactive",
- "version": "2.3.0-beta.3",
+ "version": "2.3.0-beta.4",
"license": "GPL-2.0",
"repository": {
"type": "git",
@@ -33,6 +33,7 @@
"templates"
],
"dependencies": {
+ "babel-core": "6.25.0",
"chalk": "1.1.3",
"commander": "2.9.0",
"concurrently": "^3.5.0",
@@ -55,7 +56,6 @@
},
"devDependencies": {
"babel-cli": "6.24.0",
- "babel-core": "6.25.0",
"babel-jest": "20.0.3",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.0",
@@ -70,6 +70,7 @@
"jest": "20.0.4",
"jsdoc": "3.4.3",
"mock-fs": "4.4.1",
+ "raw-loader": "^0.5.1",
"regenerator-runtime": "0.10.5",
"webpack-node-externals": "1.5.4"
}
diff --git a/src/cli/generateConfig.js b/src/cli/generateConfig.js
index f44c103..83133c2 100644
--- a/src/cli/generateConfig.js
+++ b/src/cli/generateConfig.js
@@ -7,10 +7,10 @@ import HTMLWebpackPlugin from 'html-webpack-plugin';
import program from './parseArgs';
import requireExternal from './requireExternal';
+import defaultWebpack from '../defaultConfig/webpack.config';
+import defaultHuron from '../defaultConfig/huron.config';
const cwd = process.cwd();
-const defaultWebpack = require('../defaultConfig/webpack.config');
-const defaultHuron = require('../defaultConfig/huron.config');
// Require configs passed in by user from CLI
let defaultConfig = false;
diff --git a/src/cli/requireTemplates.js b/src/cli/requireTemplates.js
index 0cef0e2..59e2e2c 100644
--- a/src/cli/requireTemplates.js
+++ b/src/cli/requireTemplates.js
@@ -1,8 +1,13 @@
/** @module cli/require-templates */
-
import path from 'path';
import fs from 'fs-extra';
+// We need to prepend this to the browser script as a string but still want to transpile it,
+// hence loading it using `raw-loader` so we receive a string from webpack
+/* eslint-disable */
+import hotTemplate from '!raw-loader!babel-loader!../../templates/hotTemplate';
+/* eslint-enable */
+
const cwd = process.cwd();
const huronScript = fs.readFileSync(
path.join(__dirname, '../web/index.js'),
@@ -11,9 +16,6 @@ const huronScript = fs.readFileSync(
/**
* Write code for requiring all generated huron assets
- * Note: prepended and appended code in this file should roughly follow es5 syntax for now,
- * as it will not pass through the Huron internal babel build nor can we assume the user is
- * working with babel.
*
* @function requireTemplates
* @param {object} store - memory store
@@ -21,100 +23,30 @@ const huronScript = fs.readFileSync(
export const requireTemplates = function requireTemplates(store) {
const huron = store.get('config');
const outputPath = path.join(cwd, huron.get('root'), 'huron-assets');
- const requireRegex = new RegExp(`\\.html|\\.json|\\${
- huron.get('templates').extension
- }$`);
- const requirePath = `'../${huron.get('output')}'`;
-
- // Initialize templates, js, css and Hot Module Replacement acceptance logic
- const hotTemplate = `
-var store = require('./huron-store');
-var InsertNodes = require('./insertNodes').default;
-var sectionTemplate = require('./section.hbs');
-var assets = require.context(${requirePath}, true, ${requireRegex});
-var modules = {};
-
-modules['${store.get('sectionTemplatePath')}'] = sectionTemplate;
-
-assets.keys().forEach(function(key) {
- modules[key] = assets(key);
-});
-
-var insert = window.insert ? window.insert :
- new InsertNodes(modules, store);
-window.insert = insert;
-
-if (module.hot) {
- // Hot Module Replacement for huron components (json, hbs, html)
- module.hot.accept(
- assets.id,
- () => {
- var newAssets = require.context(
- ${requirePath},
- true,
- ${requireRegex}
- );
- var newModules = newAssets.keys()
- .map((key) => {
- return [key, newAssets(key)];
- })
- .filter((newModule) => {
- return modules[newModule[0]] !== newModule[1];
- });
-
- updateStore(require('./huron-store.js'));
-
- newModules.forEach((module) => {
- modules[module[0]] = module[1];
- hotReplace(module[0], module[1], modules);
- });
- }
- );
-
- // Hot Module Replacement for sections template
- module.hot.accept(
- './section.hbs',
- () => {
- var newSectionTemplate = require('./section.hbs');
- modules['${store.get('sectionTemplatePath')}'] = newSectionTemplate;
- hotReplace(
- './huron-assets/section.hbs',
- newSectionTemplate,
- modules
- );
- }
- );
-
- // Hot Module Replacement for data store
- module.hot.accept(
- './huron-store.js',
- () => {
- updateStore(require('./huron-store.js'));
- }
- );
-}
-
-function hotReplace(key, module, modules) {
- insert.modules = modules;
- if (key === store.sectionTemplatePath) {
- insert.cycleSections();
- } else {
- insert.inserted = [];
- insert.loadModule(key, module, false);
- }
-};
-
-function updateStore(newStore) {
- insert.store = newStore;
-}\n`;
+ // These will be used to replace strings in the hotTemplate.
+ // In order to accurately replace strings but still keep things parseable by eslint and babel,
+ // each replaceable value should be referenced in `hotTemplate.js` under the `hotScope` object.
+ // For example, if you need to replace a string with a value passed in from the CLI called `userVariable`,
+ // you would reference that string in `hotTemplate.js` with `hotScope.userVariable`.
+ const hotVariableScope = {
+ sectionTemplatePath: `'${huron.get('sectionTemplate')}'`,
+ requireRegex: new RegExp(`\\.html|\\.json|\\${
+ huron.get('templates').extension
+ }$`),
+ requirePath: `'../${huron.get('output')}'`,
+ };
+ const hotTemplateTransformed = Object.keys(hotVariableScope)
+ .reduce(
+ (acc, curr) => acc.replace(
+ new RegExp(`hotScope.${curr}`, 'g'),
+ hotVariableScope[curr]
+ ), hotTemplate
+ );
// Write the contents of this script.
- // @todo lint this file.
fs.outputFileSync(
path.join(outputPath, 'index.js'),
- `/*eslint-disable*/\n
-${hotTemplate}\n\n
-/*eslint-enable*/\n`
+ hotTemplateTransformed
);
fs.outputFileSync(
path.join(outputPath, 'insertNodes.js'),
@@ -135,12 +67,9 @@ export const writeStore = function writeStore(store, newStore = false) {
const outputPath = path.join(cwd, huron.get('root'), 'huron-assets');
// Write updated data store
- // @todo lint this file.
fs.outputFileSync(
path.join(outputPath, 'huron-store.js'),
- `/*eslint-disable*/
- module.exports = ${JSON.stringify(updatedStore.toJSON())}
- /*eslint-disable*/\n`
+ `module.exports = ${JSON.stringify(updatedStore.toJSON())}`
);
};
diff --git a/src/defaultConfig/huron.config.js b/src/defaultConfig/huron.config.js
index d31614c..763f96b 100644
--- a/src/defaultConfig/huron.config.js
+++ b/src/defaultConfig/huron.config.js
@@ -1,6 +1,6 @@
-const path = require('path');
+import path from 'path';
-module.exports = {
+export default {
css: [],
entry: 'huron',
js: [],
diff --git a/src/defaultConfig/webpack.config.js b/src/defaultConfig/webpack.config.js
index 739bc59..a819183 100644
--- a/src/defaultConfig/webpack.config.js
+++ b/src/defaultConfig/webpack.config.js
@@ -1,9 +1,9 @@
-import program from '../cli/parseArgs';
+import webpack from 'webpack';
+import path from 'path';
-const webpack = require('webpack');
-const path = require('path');
+import program from '../cli/parseArgs';
-module.exports = (huron) => {
+export default (huron) => {
const cwd = process.cwd();
return {
diff --git a/src/web/index.js b/src/web/index.js
index d1f6bcb..d4b79e1 100644
--- a/src/web/index.js
+++ b/src/web/index.js
@@ -148,7 +148,7 @@ export default class InsertNodes {
/**
* Replace all template markers with the actual template markup.
*
- * @param {string} context - The hash context for the module
+ * @param {string} context - The within which to replace markup
* @param {object} filter - Filter for modules. Fields explained in the filterModules() function docs
*/
cycleModules(context = false, filter = false) {
@@ -227,17 +227,18 @@ export default class InsertNodes {
}
/**
- * Generate a hash string from a module key
+ * Generate a unique key for targeting markup replacement
*
- * @param {string} key - module key (require path) to convert into a hash
- * @return {string} key - generated MD5 Hash
+ * @param {string} key - module key (webpack require path) to convert into a replacement key
+ * @return {string} key - generated replacement key
*/
- generateModuleHash(key) {
+ generateModuleReplaceKey(key) {
let currentKey = key;
- // If module key is for data, use template key instead
+ // If this is section data, use the section template path
if (key.includes('-section.json')) {
currentKey = this._sectionTemplatePath;
+ // If updated module is a json file, use template key instead
} else if (key.includes('.json')) {
currentKey = this._templates[key];
}
@@ -298,7 +299,7 @@ export default class InsertNodes {
if (id && type) {
const renderData = this.getModuleRender(type, key, module);
- const replaceKey = this.generateModuleHash(key);
+ const replaceKey = this.generateModuleReplaceKey(key);
if (renderData) {
return Object.assign({ id, type, key, replaceKey, module }, renderData);
@@ -702,7 +703,7 @@ export default class InsertNodes {
}
});
- // Add module hash to this placeholder
+ // Add module replacement key to this placeholder
modifiedPlaceholder.dataset.selfModule = meta.replaceKey;
// Hide the placeholder
diff --git a/templates/hotTemplate.js b/templates/hotTemplate.js
new file mode 100644
index 0000000..6421264
--- /dev/null
+++ b/templates/hotTemplate.js
@@ -0,0 +1,86 @@
+/* globals requirePath, requireRegex, sectionTemplatePath */
+
+// NOTE: This is not a normal JS file! It is pulled in by the CLI as a string
+// and prepended to the browser script after replacing anything referenced via `hotScope[variable]`
+// with CLI arguments or config properties passed in by the user.
+
+/* eslint-disable */
+import store from './huron-store';
+import InsertNodes from './insertNodes';
+import sectionTemplate from './section.hbs';
+/* eslint-enable */
+
+const assets = require.context(
+ hotScope.requirePath,
+ true,
+ hotScope.requireRegex
+ );
+const modules = {};
+
+modules[hotScope.sectionTemplatePath] = sectionTemplate;
+
+assets.keys().forEach((key) => {
+ modules[key] = assets(key);
+});
+
+const insert = new InsertNodes(modules, store);
+
+if (module.hot) {
+ // Hot Module Replacement for huron components (json, hbs, html)
+ module.hot.accept(
+ assets.id,
+ () => {
+ const newAssets = require.context(
+ hotScope.requirePath,
+ true,
+ hotScope.requireRegex
+ );
+ const newModules = newAssets.keys()
+ .map((key) => [key, newAssets(key)])
+ .filter((newModule) => modules[newModule[0]] !== newModule[1]);
+
+ updateStore(require('./huron-store.js')); // eslint-disable-line global-require, import/no-unresolved
+ newModules.forEach((module) => {
+ modules[module[0]] = module[1];
+ hotReplace(module[0], module[1], modules);
+ });
+ }
+ );
+
+ // Hot Module Replacement for sections template
+ module.hot.accept(
+ './section.hbs',
+ () => {
+ const newSectionTemplate = require('./section.hbs'); // eslint-disable-line global-require, import/no-unresolved
+
+ modules[hotScope.sectionTemplatePath] = newSectionTemplate;
+ hotReplace(
+ './huron-assets/section.hbs',
+ newSectionTemplate,
+ modules
+ );
+ }
+ );
+
+ // Hot Module Replacement for data store
+ module.hot.accept(
+ './huron-store.js',
+ () => {
+ updateStore(require('./huron-store.js')); // eslint-disable-line global-require, import/no-unresolved
+ }
+ );
+}
+
+function hotReplace(key, module, newModules) {
+ insert.modules = newModules;
+ if (key === store.sectionTemplatePath) {
+ insert.cycleSections();
+ } else {
+ insert.inserted = [];
+ insert.loadModule(key, module, false);
+ }
+}
+
+function updateStore(newStore) {
+ insert.store = newStore;
+}