delete globalThis.performance; var seed = 1234567890; Math.random = () => { seed = (1103515245 * seed + 12345) % 2147483648; return seed / 2147483648; // Normalize to a value between 0 and 1 }; // Benchmark for server rendering // This is a real example taken from https://github.com/ENCODE-DCC/encoded. // Does not exit because this React version lacks https://github.com/facebook/react/pull/20834 var render_page; var window = globalThis; // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel // MIT license (function() { var lastTime = 0; if (!window.requestAnimationFrame) window.requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; if (!window.cancelAnimationFrame) window.cancelAnimationFrame = function(id) { clearTimeout(id); }; }()); /******/ (function(modules) { // webpackBootstrap /******/ // install a JSONP callback for chunk loading /******/ function webpackJsonpCallback(data) { /******/ var chunkIds = data[0]; /******/ var moreModules = data[1]; /******/ /******/ /******/ // add "moreModules" to the modules object, /******/ // then flag all "chunkIds" as loaded and fire callback /******/ var moduleId, chunkId, i = 0, resolves = []; /******/ for(;i < chunkIds.length; i++) { /******/ chunkId = chunkIds[i]; /******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) { /******/ resolves.push(installedChunks[chunkId][0]); /******/ } /******/ installedChunks[chunkId] = 0; /******/ } /******/ for(moduleId in moreModules) { /******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) { /******/ modules[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(parentJsonpFunction) parentJsonpFunction(data); /******/ /******/ while(resolves.length) { /******/ resolves.shift()(); /******/ } /******/ /******/ }; /******/ /******/ /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // object to store loaded and loading chunks /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched /******/ // Promise = chunk loading, 0 = chunk loaded /******/ var installedChunks = { /******/ 0: 0 /******/ }; /******/ /******/ /******/ /******/ // script path function /******/ function jsonpScriptSrc(chunkId) { /******/ return __webpack_require__.p + "" + ({}[chunkId]||chunkId) + ".js" /******/ } /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // The chunk loading function for additional chunks /******/ // Since all referenced chunks are already included /******/ // in this file, this function is empty here. /******/ __webpack_require__.e = function requireEnsure() { /******/ return Promise.resolve(); /******/ }; /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/static/build-server"; /******/ /******/ // on error function for async loading /******/ __webpack_require__.oe = function(err) { console.error(err); throw err; }; /******/ /******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || []; /******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray); /******/ jsonpArray.push = webpackJsonpCallback; /******/ jsonpArray = jsonpArray.slice(); /******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]); /******/ var parentJsonpFunction = oldJsonpFunction; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 304); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(306); } else {} /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { /** * Copyright (c) 2013-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ if (false) { var throwOnDirectAccess, ReactIs; } else { // By explicitly using `prop-types` you are opting into new production behavior. // http://fb.me/prop-types-in-prod module.exports = __webpack_require__(314)(); } /***/ }), /* 2 */ /***/ (function(module, exports) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } module.exports = _interopRequireDefault; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; if (true) { module.exports = __webpack_require__(305); } else {} /***/ }), /* 4 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.itemClass = itemClass; exports.truncateString = truncateString; exports.atIdToAccession = atIdToAccession; exports.atIdToType = atIdToType; exports.hashCode = hashCode; exports.zeroFill = zeroFill; exports.humanFileSize = humanFileSize; exports.parseError = parseError; exports.parseAndLogError = parseAndLogError; exports.sortDocs = sortDocs; exports.hasType = exports.titleize = exports.isMediaQueryBreakpointActive = exports.viewToSvg = exports.DeeplyProfiledCellLineListColors = exports.replicateTypeColors = exports.biosampleTypeColors = exports.projectColors = exports.replicateTypeList = exports.biosampleTypeList = exports.projectList = exports.sanitizedString = exports.dbxrefPrefixMap = exports.browserPriority = exports.assemblyPriority = exports.encodeVersionMap = exports.isProductionHost = exports.statusToClassElement = exports.sanitizeId = exports.uniqueObjectsArray = exports.reportCell = exports.documentViews = exports.facetView = exports.graphDetail = exports.blocks = exports.listingTitles = exports.listingViews = exports.panelViews = exports.contentViews = void 0; var _underscore = _interopRequireDefault(__webpack_require__(7)); var _googleAnalytics = _interopRequireDefault(__webpack_require__(195)); var _url = _interopRequireDefault(__webpack_require__(11)); var _registry = _interopRequireDefault(__webpack_require__(313)); var _datacolors = _interopRequireDefault(__webpack_require__(36)); // Item pages const contentViews = new _registry.default(); // Panel detail views exports.contentViews = contentViews; const panelViews = new _registry.default(); // Listing detail views exports.panelViews = panelViews; const listingViews = new _registry.default(); // Cell name listing titles exports.listingViews = listingViews; const listingTitles = new _registry.default(); // Blocks exports.listingTitles = listingTitles; const blocks = new _registry.default(); // Graph detail view exports.blocks = blocks; const graphDetail = new _registry.default(); // Search facet view exports.graphDetail = graphDetail; const facetView = new _registry.default(); // Document panel components // +---------------------------------------+ // | header | // +---------------------------+-----------+ // | | | // | caption | preview | <--This row Called a document "intro" in the code // | | | // +---------------------------+-----------+ // | file | // +---------------------------------------+ // | detail | // +---------------------------------------+ exports.facetView = facetView; const documentViews = {}; exports.documentViews = documentViews; documentViews.header = new _registry.default(); documentViews.caption = new _registry.default(); documentViews.preview = new _registry.default(); documentViews.file = new _registry.default(); documentViews.detail = new _registry.default(); // Report-page cell components const reportCell = new _registry.default(); exports.reportCell = reportCell; function itemClass(context, htmlClass) { let localHtmlClass = htmlClass || ''; (context['@type'] || []).forEach(type => { localHtmlClass += " type-".concat(type); }); return localHtmlClass; } function truncateString(str, len) { let localStr = str; if (localStr.length > len) { localStr = localStr.replace(/(^\s)|(\s$)/gi, ''); // Trim leading/trailing white space localStr = localStr.substr(0, len - 1); // Truncate to length ignoring word boundary const isOneWord = localStr.match(/\s/gi) === null; // Detect single-word string localStr = "".concat(!isOneWord ? localStr.substr(0, localStr.lastIndexOf(' ')) : localStr, "\u2026"); // Ensure last word is not prematurely split } return localStr; } // Given an array of objects with @id properties, this returns the same array but with any // duplicate @id objects removed. const uniqueObjectsArray = objects => (0, _underscore.default)(objects).uniq(object => object['@id']); /** * Remove spaces from id so it can be accepted as an id by HTML * * @param {string} id * @returns id without space or dash if id is empty */ exports.uniqueObjectsArray = uniqueObjectsArray; const sanitizeId = id => id ? "".concat(id.replace(/\s/g, '_')) : '-'; // Take an @id and return the corresponding accession. If no accession could be found in the @id, // the unchanged @id is returned. exports.sanitizeId = sanitizeId; function atIdToAccession(atId) { const matched = atId.match(/^\/.+\/(.+)\/$/); if (matched && matched.length === 2) { return matched[1]; } return atId; } // Take an @id and return the corresponding object type. If no object type could be found in the // @id, the empty string is returned. function atIdToType(atId) { const matched = atId.match(/^\/(.+)\/.+\/$/); if (matched && matched.length === 2) { return matched[1]; } return ''; } // Make the first character of the given string uppercase. Can be less fiddly than CSS text-transform. // http://stackoverflow.com/questions/1026069/capitalize-the-first-letter-of-string-in-javascript#answer-1026087 /* eslint-disable no-extend-native */ String.prototype.uppercaseFirstChar = function uppercaseFirstChar() { return this.charAt(0).toUpperCase() + this.slice(1); }; /* eslint-enable no-extend-native */ // Convert a string to a 32-bit hash. // http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/ function hashCode(src) { let hash = 0; if (src.length > 0) { for (let i = 0; i < src.length; i += 1) { const char = src.charCodeAt(i); hash = (hash << 5) - hash + char; // eslint-disable-line no-bitwise hash &= hash; // eslint-disable-line no-bitwise } } return hash; } // Convert the number `n` to a string, zero-filled to `digits` digits. Maximum of four zeroes. // http://stackoverflow.com/questions/2998784/how-to-output-integers-with-leading-zeros-in-javascript#answer-2998822 function zeroFill(n, digits) { const filled = "0000".concat(n); return filled.substr(filled.length - digits); } // Convert a status string to a string suitable to build a CSS class name. const statusToClassElement = status => status.toLowerCase().replace(/ /g, '-').replace(/\(|\)/g, ''); /** * Returns true if code runs on the production host, as opposed to test, demos, or local. This * applies to both server and browser rendering. * @param {string} currentUrl Normally from React context.location_href * * @return True if code runs on production host */ exports.statusToClassElement = statusToClassElement; const isProductionHost = currentUrl => ['www.encodeproject.org', 'encodeproject.org', 'www.encodedcc.org'].includes(_url.default.parse(currentUrl).hostname); exports.isProductionHost = isProductionHost; const encodeVersionMap = { ENCODE2: '2', ENCODE3: '3' }; // Order that assemblies should appear in lists exports.encodeVersionMap = encodeVersionMap; const assemblyPriority = ['GRCh38', 'GRCh38-minimal', 'hg19', 'ENC001.1', 'ENC002.1', 'ENC003.1', 'ENC004.1', 'GRCm39', 'mm10', 'mm10-minimal', 'mm9', 'ce11', 'ce10', 'dm6', 'dm3', 'J02459.1']; exports.assemblyPriority = assemblyPriority; const browserPriority = ['UCSC', 'Ensembl']; // Display a human-readable form of the file size given the size of a file in bytes. Returned as a // string. exports.browserPriority = browserPriority; function humanFileSize(size) { if (size >= 0) { const i = Math.floor(Math.log(size) / Math.log(1024)); const adjustedSize = (size / 1024 ** i).toPrecision(3) * 1; const units = ['B', 'kB', 'MB', 'GB', 'TB'][i]; return "".concat(adjustedSize, " ").concat(units); } return 0; } function parseError(response) { if (response instanceof Error) { return Promise.resolve({ status: 'error', title: response.message, '@type': ['AjaxError', 'Error'] }); } let contentType = response.headers.get('Content-Type') || ''; contentType = contentType.split(';')[0]; if (contentType === 'application/json') { return response.json(); } return Promise.resolve({ status: 'error', title: response.statusText, code: response.status, '@type': ['AjaxError', 'Error'] }); } function parseAndLogError(cause, response) { const promise = parseError(response); promise.then(data => { (0, _googleAnalytics.default)('send', 'exception', { exDescription: "".concat(cause, ":").concat(data.code, ":").concat(data.title), location: window.location.href }); }); return promise; } /** * Sort an array of documents first by attachment download name, and then by @id. * * @param {array} docs - Array of document/characterization objects to be sorted. * @return (array) - Array of the same documents/characterization as was passed in, but sorted. */ function sortDocs(docs) { return docs.sort((a, b) => { // Generate sorting names based on the download file name followed by the @id of the // document/characterization. If the document has no attachment, then this just uses the // the @id. const aLowerName = a.attachment && a.attachment.download ? a.attachment.download.toLowerCase() : ''; const bLowerName = b.attachment && b.attachment.download ? b.attachment.download.toLowerCase() : ''; const aAttachmentName = "".concat(aLowerName).concat(a['@id']); const bAttachmentName = "".concat(bLowerName).concat(b['@id']); // Perform the actual sort. Because we know the sorting name has a unique @id, we don't // have to check for equivalent names. if (aAttachmentName < bAttachmentName) { return -1; } return 1; }); } const dbxrefPrefixMap = { FlyBase: 'http://flybase.org/cgi-bin/quicksearch_solr.cgi?caller=quicksearch&tab=basic_tab&data_class=FBgn&species=Dmel&search_type=all&context=', WormBase: 'http://www.wormbase.org/species/c_elegans/strain/' }; // Sanitize user input and facet terms for comparison: convert to lowercase, remove white space and asterisks (which cause regular expression error) exports.dbxrefPrefixMap = dbxrefPrefixMap; const sanitizedString = inputString => inputString.toLowerCase().replace(/ /g, '') // remove spaces (to allow multiple word searches) .replace(/[*?()+[\]\\/]/g, ''); // remove certain special characters (these cause console errors) // Keep lists of currently known project and biosample_type. As new project and biosample_type // enter the system, these lists must be updated. Used mostly to keep chart and matrix colors // consistent. exports.sanitizedString = sanitizedString; const projectList = ['ENCODE', 'Roadmap', 'modENCODE', 'modERN', 'GGR']; exports.projectList = projectList; const biosampleTypeList = ['cell line', 'tissue', 'primary cell', 'whole organisms', 'in vitro differentiated cells', 'single cell', 'cell-free sample', 'cloning host', 'organoid', 'technical sample']; exports.biosampleTypeList = biosampleTypeList; const deeplyProfiledCellLines = ['A549', 'A673', 'Caco-2', 'Calu3', 'endothelial cell of umbilical vein', 'GM12878', 'GM23338', 'H1', 'H9', 'HCT116', 'HepG2', 'HFFc6', 'IMR-90', 'K562', 'mammary epithelial cell', 'MCF-7', 'MCF 10A', 'OCI-LY7', 'PC-9', 'PC-3', 'Panc1', 'WTC11']; const replicateTypeList = ['unreplicated', 'isogenic', 'anisogenic']; // Make `project` and `biosample_type` color mappings for downstream modules to use. exports.replicateTypeList = replicateTypeList; const projectColors = new _datacolors.default(projectList); exports.projectColors = projectColors; const biosampleTypeColors = new _datacolors.default(biosampleTypeList); exports.biosampleTypeColors = biosampleTypeColors; const replicateTypeColors = new _datacolors.default(replicateTypeList); exports.replicateTypeColors = replicateTypeColors; const DeeplyProfiledCellLineListColors = new _datacolors.default(deeplyProfiledCellLines); // Map view icons to svg icons. exports.DeeplyProfiledCellLineListColors = DeeplyProfiledCellLineListColors; const viewToSvg = { 'list-alt': 'search', table: 'table', summary: 'summary', th: 'matrix' }; // Media query breakpoints to match those in style.scss. exports.viewToSvg = viewToSvg; const SCREEN_XS = 480; const SCREEN_SM = 768; const SCREEN_MD = 960; const SCREEN_LG = 1160; const SCREEN_XL = 1716; /** * Determine whether the current browser-window width activates the given Bootstrap-based media * query code. The component this function gets called from must have mounted. * @param min {string} Bootstrap-based code for each breakpoint * * @return {bool} True if specified breakpoint is active */ const isMediaQueryBreakpointActive = min => { if (window.matchMedia) { let breakpoint; switch (min) { case 'XS': breakpoint = SCREEN_XS; break; case 'SM': breakpoint = SCREEN_SM; break; case 'MD': breakpoint = SCREEN_MD; break; case 'LG': breakpoint = SCREEN_LG; break; case 'XL': breakpoint = SCREEN_XL; break; default: // Undefined code; default to mobile. breakpoint = 0; } const mql = window.matchMedia("(min-width: ".concat(breakpoint, "px)")); return mql.matches; } // Browser doesn't support matchMedia, so default to mobile. return false; }; /** * Convert a text to title case * * @param {string} title Title * @returns Title in title case */ exports.isMediaQueryBreakpointActive = isMediaQueryBreakpointActive; const titleize = title => title === null || title === void 0 ? void 0 : title.toLowerCase().replace(/(^|\s)\S/g, firstLetter => firstLetter.toUpperCase()); /** * Determine whether an object has the matching @type. * @param {object} item Object to check the @type of * @param {string} type Type to check for * @returns {boolean} True if the object has the matching @type */ exports.titleize = titleize; const hasType = (item, type) => item['@type'].includes(type); exports.hasType = hasType; /***/ }), /* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; module.exports = __webpack_require__(80); /***/ }), /* 6 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return VERSION; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return root; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ArrayProto; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ObjProto; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return SymbolProto; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return push; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return slice; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return toString; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return hasOwnProperty; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return supportsArrayBuffer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return supportsDataView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return nativeIsArray; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return nativeKeys; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return nativeCreate; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return nativeIsView; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return _isNaN; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return _isFinite; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return hasEnumBug; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return nonEnumerableProps; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return MAX_ARRAY_INDEX; }); // Current version. var VERSION = '1.13.1'; // Establish the root object, `window` (`self`) in the browser, `global` // on the server, or `this` in some virtual machines. We use `self` // instead of `window` for `WebWorker` support. var root = typeof self == 'object' && self.self === self && self || typeof global == 'object' && global.global === global && global || Function('return this')() || {}; // Save bytes in the minified (but not gzipped) version: var ArrayProto = Array.prototype, ObjProto = Object.prototype; var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null; // Create quick reference variables for speed access to core prototypes. var push = ArrayProto.push, slice = ArrayProto.slice, toString = ObjProto.toString, hasOwnProperty = ObjProto.hasOwnProperty; // Modern feature detection. var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined', supportsDataView = typeof DataView !== 'undefined'; // All **ECMAScript 5+** native function implementations that we hope to use // are declared here. var nativeIsArray = Array.isArray, nativeKeys = Object.keys, nativeCreate = Object.create, nativeIsView = supportsArrayBuffer && ArrayBuffer.isView; // Create references to these builtin functions because we override them. var _isNaN = isNaN, _isFinite = isFinite; // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed. var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString'); var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString']; // The largest integer that can be represented exactly. var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(28))) /***/ }), /* 7 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, "default", function() { return /* reexport */ index_default; }); __webpack_require__.d(__webpack_exports__, "VERSION", function() { return /* reexport */ _setup["e" /* VERSION */]; }); __webpack_require__.d(__webpack_exports__, "restArguments", function() { return /* reexport */ restArguments; }); __webpack_require__.d(__webpack_exports__, "isObject", function() { return /* reexport */ isObject; }); __webpack_require__.d(__webpack_exports__, "isNull", function() { return /* reexport */ isNull; }); __webpack_require__.d(__webpack_exports__, "isUndefined", function() { return /* reexport */ isUndefined; }); __webpack_require__.d(__webpack_exports__, "isBoolean", function() { return /* reexport */ isBoolean; }); __webpack_require__.d(__webpack_exports__, "isElement", function() { return /* reexport */ isElement; }); __webpack_require__.d(__webpack_exports__, "isString", function() { return /* reexport */ isString; }); __webpack_require__.d(__webpack_exports__, "isNumber", function() { return /* reexport */ isNumber; }); __webpack_require__.d(__webpack_exports__, "isDate", function() { return /* reexport */ isDate; }); __webpack_require__.d(__webpack_exports__, "isRegExp", function() { return /* reexport */ isRegExp; }); __webpack_require__.d(__webpack_exports__, "isError", function() { return /* reexport */ isError; }); __webpack_require__.d(__webpack_exports__, "isSymbol", function() { return /* reexport */ isSymbol; }); __webpack_require__.d(__webpack_exports__, "isArrayBuffer", function() { return /* reexport */ isArrayBuffer; }); __webpack_require__.d(__webpack_exports__, "isDataView", function() { return /* reexport */ modules_isDataView; }); __webpack_require__.d(__webpack_exports__, "isArray", function() { return /* reexport */ isArray; }); __webpack_require__.d(__webpack_exports__, "isFunction", function() { return /* reexport */ modules_isFunction; }); __webpack_require__.d(__webpack_exports__, "isArguments", function() { return /* reexport */ modules_isArguments; }); __webpack_require__.d(__webpack_exports__, "isFinite", function() { return /* reexport */ isFinite_isFinite; }); __webpack_require__.d(__webpack_exports__, "isNaN", function() { return /* reexport */ isNaN_isNaN; }); __webpack_require__.d(__webpack_exports__, "isTypedArray", function() { return /* reexport */ modules_isTypedArray; }); __webpack_require__.d(__webpack_exports__, "isEmpty", function() { return /* reexport */ isEmpty; }); __webpack_require__.d(__webpack_exports__, "isMatch", function() { return /* reexport */ isMatch; }); __webpack_require__.d(__webpack_exports__, "isEqual", function() { return /* reexport */ isEqual; }); __webpack_require__.d(__webpack_exports__, "isMap", function() { return /* reexport */ isMap; }); __webpack_require__.d(__webpack_exports__, "isWeakMap", function() { return /* reexport */ isWeakMap; }); __webpack_require__.d(__webpack_exports__, "isSet", function() { return /* reexport */ isSet; }); __webpack_require__.d(__webpack_exports__, "isWeakSet", function() { return /* reexport */ isWeakSet; }); __webpack_require__.d(__webpack_exports__, "keys", function() { return /* reexport */ keys_keys; }); __webpack_require__.d(__webpack_exports__, "allKeys", function() { return /* reexport */ allKeys; }); __webpack_require__.d(__webpack_exports__, "values", function() { return /* reexport */ values_values; }); __webpack_require__.d(__webpack_exports__, "pairs", function() { return /* reexport */ pairs_pairs; }); __webpack_require__.d(__webpack_exports__, "invert", function() { return /* reexport */ invert; }); __webpack_require__.d(__webpack_exports__, "functions", function() { return /* reexport */ functions; }); __webpack_require__.d(__webpack_exports__, "methods", function() { return /* reexport */ functions; }); __webpack_require__.d(__webpack_exports__, "extend", function() { return /* reexport */ extend; }); __webpack_require__.d(__webpack_exports__, "extendOwn", function() { return /* reexport */ extendOwn; }); __webpack_require__.d(__webpack_exports__, "assign", function() { return /* reexport */ extendOwn; }); __webpack_require__.d(__webpack_exports__, "defaults", function() { return /* reexport */ defaults; }); __webpack_require__.d(__webpack_exports__, "create", function() { return /* reexport */ create; }); __webpack_require__.d(__webpack_exports__, "clone", function() { return /* reexport */ clone; }); __webpack_require__.d(__webpack_exports__, "tap", function() { return /* reexport */ tap; }); __webpack_require__.d(__webpack_exports__, "get", function() { return /* reexport */ get; }); __webpack_require__.d(__webpack_exports__, "has", function() { return /* reexport */ has_has; }); __webpack_require__.d(__webpack_exports__, "mapObject", function() { return /* reexport */ mapObject; }); __webpack_require__.d(__webpack_exports__, "identity", function() { return /* reexport */ identity; }); __webpack_require__.d(__webpack_exports__, "constant", function() { return /* reexport */ constant; }); __webpack_require__.d(__webpack_exports__, "noop", function() { return /* reexport */ noop; }); __webpack_require__.d(__webpack_exports__, "toPath", function() { return /* reexport */ toPath; }); __webpack_require__.d(__webpack_exports__, "property", function() { return /* reexport */ property; }); __webpack_require__.d(__webpack_exports__, "propertyOf", function() { return /* reexport */ propertyOf; }); __webpack_require__.d(__webpack_exports__, "matcher", function() { return /* reexport */ matcher_matcher; }); __webpack_require__.d(__webpack_exports__, "matches", function() { return /* reexport */ matcher_matcher; }); __webpack_require__.d(__webpack_exports__, "times", function() { return /* reexport */ times; }); __webpack_require__.d(__webpack_exports__, "random", function() { return /* reexport */ random; }); __webpack_require__.d(__webpack_exports__, "now", function() { return /* reexport */ now; }); __webpack_require__.d(__webpack_exports__, "escape", function() { return /* reexport */ modules_escape; }); __webpack_require__.d(__webpack_exports__, "unescape", function() { return /* reexport */ modules_unescape; }); __webpack_require__.d(__webpack_exports__, "templateSettings", function() { return /* reexport */ templateSettings; }); __webpack_require__.d(__webpack_exports__, "template", function() { return /* reexport */ template_template; }); __webpack_require__.d(__webpack_exports__, "result", function() { return /* reexport */ result_result; }); __webpack_require__.d(__webpack_exports__, "uniqueId", function() { return /* reexport */ uniqueId; }); __webpack_require__.d(__webpack_exports__, "chain", function() { return /* reexport */ chain; }); __webpack_require__.d(__webpack_exports__, "iteratee", function() { return /* reexport */ iteratee_iteratee; }); __webpack_require__.d(__webpack_exports__, "partial", function() { return /* reexport */ modules_partial; }); __webpack_require__.d(__webpack_exports__, "bind", function() { return /* reexport */ bind; }); __webpack_require__.d(__webpack_exports__, "bindAll", function() { return /* reexport */ bindAll; }); __webpack_require__.d(__webpack_exports__, "memoize", function() { return /* reexport */ memoize_memoize; }); __webpack_require__.d(__webpack_exports__, "delay", function() { return /* reexport */ delay; }); __webpack_require__.d(__webpack_exports__, "defer", function() { return /* reexport */ defer; }); __webpack_require__.d(__webpack_exports__, "throttle", function() { return /* reexport */ throttle; }); __webpack_require__.d(__webpack_exports__, "debounce", function() { return /* reexport */ debounce; }); __webpack_require__.d(__webpack_exports__, "wrap", function() { return /* reexport */ wrap; }); __webpack_require__.d(__webpack_exports__, "negate", function() { return /* reexport */ negate; }); __webpack_require__.d(__webpack_exports__, "compose", function() { return /* reexport */ compose; }); __webpack_require__.d(__webpack_exports__, "after", function() { return /* reexport */ after; }); __webpack_require__.d(__webpack_exports__, "before", function() { return /* reexport */ before; }); __webpack_require__.d(__webpack_exports__, "once", function() { return /* reexport */ once; }); __webpack_require__.d(__webpack_exports__, "findKey", function() { return /* reexport */ findKey; }); __webpack_require__.d(__webpack_exports__, "findIndex", function() { return /* reexport */ findIndex; }); __webpack_require__.d(__webpack_exports__, "findLastIndex", function() { return /* reexport */ findLastIndex; }); __webpack_require__.d(__webpack_exports__, "sortedIndex", function() { return /* reexport */ sortedIndex_sortedIndex; }); __webpack_require__.d(__webpack_exports__, "indexOf", function() { return /* reexport */ indexOf; }); __webpack_require__.d(__webpack_exports__, "lastIndexOf", function() { return /* reexport */ lastIndexOf; }); __webpack_require__.d(__webpack_exports__, "find", function() { return /* reexport */ find; }); __webpack_require__.d(__webpack_exports__, "detect", function() { return /* reexport */ find; }); __webpack_require__.d(__webpack_exports__, "findWhere", function() { return /* reexport */ findWhere; }); __webpack_require__.d(__webpack_exports__, "each", function() { return /* reexport */ each; }); __webpack_require__.d(__webpack_exports__, "forEach", function() { return /* reexport */ each; }); __webpack_require__.d(__webpack_exports__, "map", function() { return /* reexport */ map_map; }); __webpack_require__.d(__webpack_exports__, "collect", function() { return /* reexport */ map_map; }); __webpack_require__.d(__webpack_exports__, "reduce", function() { return /* reexport */ reduce; }); __webpack_require__.d(__webpack_exports__, "foldl", function() { return /* reexport */ reduce; }); __webpack_require__.d(__webpack_exports__, "inject", function() { return /* reexport */ reduce; }); __webpack_require__.d(__webpack_exports__, "reduceRight", function() { return /* reexport */ reduceRight; }); __webpack_require__.d(__webpack_exports__, "foldr", function() { return /* reexport */ reduceRight; }); __webpack_require__.d(__webpack_exports__, "filter", function() { return /* reexport */ filter; }); __webpack_require__.d(__webpack_exports__, "select", function() { return /* reexport */ filter; }); __webpack_require__.d(__webpack_exports__, "reject", function() { return /* reexport */ reject; }); __webpack_require__.d(__webpack_exports__, "every", function() { return /* reexport */ every; }); __webpack_require__.d(__webpack_exports__, "all", function() { return /* reexport */ every; }); __webpack_require__.d(__webpack_exports__, "some", function() { return /* reexport */ some; }); __webpack_require__.d(__webpack_exports__, "any", function() { return /* reexport */ some; }); __webpack_require__.d(__webpack_exports__, "contains", function() { return /* reexport */ contains; }); __webpack_require__.d(__webpack_exports__, "includes", function() { return /* reexport */ contains; }); __webpack_require__.d(__webpack_exports__, "include", function() { return /* reexport */ contains; }); __webpack_require__.d(__webpack_exports__, "invoke", function() { return /* reexport */ invoke; }); __webpack_require__.d(__webpack_exports__, "pluck", function() { return /* reexport */ pluck; }); __webpack_require__.d(__webpack_exports__, "where", function() { return /* reexport */ where; }); __webpack_require__.d(__webpack_exports__, "max", function() { return /* reexport */ max; }); __webpack_require__.d(__webpack_exports__, "min", function() { return /* reexport */ min; }); __webpack_require__.d(__webpack_exports__, "shuffle", function() { return /* reexport */ shuffle; }); __webpack_require__.d(__webpack_exports__, "sample", function() { return /* reexport */ sample_sample; }); __webpack_require__.d(__webpack_exports__, "sortBy", function() { return /* reexport */ sortBy; }); __webpack_require__.d(__webpack_exports__, "groupBy", function() { return /* reexport */ groupBy; }); __webpack_require__.d(__webpack_exports__, "indexBy", function() { return /* reexport */ indexBy; }); __webpack_require__.d(__webpack_exports__, "countBy", function() { return /* reexport */ countBy; }); __webpack_require__.d(__webpack_exports__, "partition", function() { return /* reexport */ modules_partition; }); __webpack_require__.d(__webpack_exports__, "toArray", function() { return /* reexport */ toArray; }); __webpack_require__.d(__webpack_exports__, "size", function() { return /* reexport */ size; }); __webpack_require__.d(__webpack_exports__, "pick", function() { return /* reexport */ pick; }); __webpack_require__.d(__webpack_exports__, "omit", function() { return /* reexport */ omit; }); __webpack_require__.d(__webpack_exports__, "first", function() { return /* reexport */ first; }); __webpack_require__.d(__webpack_exports__, "head", function() { return /* reexport */ first; }); __webpack_require__.d(__webpack_exports__, "take", function() { return /* reexport */ first; }); __webpack_require__.d(__webpack_exports__, "initial", function() { return /* reexport */ initial_initial; }); __webpack_require__.d(__webpack_exports__, "last", function() { return /* reexport */ last_last; }); __webpack_require__.d(__webpack_exports__, "rest", function() { return /* reexport */ rest_rest; }); __webpack_require__.d(__webpack_exports__, "tail", function() { return /* reexport */ rest_rest; }); __webpack_require__.d(__webpack_exports__, "drop", function() { return /* reexport */ rest_rest; }); __webpack_require__.d(__webpack_exports__, "compact", function() { return /* reexport */ compact; }); __webpack_require__.d(__webpack_exports__, "flatten", function() { return /* reexport */ flatten_flatten; }); __webpack_require__.d(__webpack_exports__, "without", function() { return /* reexport */ without; }); __webpack_require__.d(__webpack_exports__, "uniq", function() { return /* reexport */ uniq; }); __webpack_require__.d(__webpack_exports__, "unique", function() { return /* reexport */ uniq; }); __webpack_require__.d(__webpack_exports__, "union", function() { return /* reexport */ union; }); __webpack_require__.d(__webpack_exports__, "intersection", function() { return /* reexport */ intersection; }); __webpack_require__.d(__webpack_exports__, "difference", function() { return /* reexport */ difference; }); __webpack_require__.d(__webpack_exports__, "unzip", function() { return /* reexport */ unzip; }); __webpack_require__.d(__webpack_exports__, "transpose", function() { return /* reexport */ unzip; }); __webpack_require__.d(__webpack_exports__, "zip", function() { return /* reexport */ zip; }); __webpack_require__.d(__webpack_exports__, "object", function() { return /* reexport */ object_object; }); __webpack_require__.d(__webpack_exports__, "range", function() { return /* reexport */ range; }); __webpack_require__.d(__webpack_exports__, "chunk", function() { return /* reexport */ chunk; }); __webpack_require__.d(__webpack_exports__, "mixin", function() { return /* reexport */ mixin; }); // NAMESPACE OBJECT: /app/node_modules/underscore/modules/index.js var modules_namespaceObject = {}; __webpack_require__.r(modules_namespaceObject); __webpack_require__.d(modules_namespaceObject, "VERSION", function() { return _setup["e" /* VERSION */]; }); __webpack_require__.d(modules_namespaceObject, "restArguments", function() { return restArguments; }); __webpack_require__.d(modules_namespaceObject, "isObject", function() { return isObject; }); __webpack_require__.d(modules_namespaceObject, "isNull", function() { return isNull; }); __webpack_require__.d(modules_namespaceObject, "isUndefined", function() { return isUndefined; }); __webpack_require__.d(modules_namespaceObject, "isBoolean", function() { return isBoolean; }); __webpack_require__.d(modules_namespaceObject, "isElement", function() { return isElement; }); __webpack_require__.d(modules_namespaceObject, "isString", function() { return isString; }); __webpack_require__.d(modules_namespaceObject, "isNumber", function() { return isNumber; }); __webpack_require__.d(modules_namespaceObject, "isDate", function() { return isDate; }); __webpack_require__.d(modules_namespaceObject, "isRegExp", function() { return isRegExp; }); __webpack_require__.d(modules_namespaceObject, "isError", function() { return isError; }); __webpack_require__.d(modules_namespaceObject, "isSymbol", function() { return isSymbol; }); __webpack_require__.d(modules_namespaceObject, "isArrayBuffer", function() { return isArrayBuffer; }); __webpack_require__.d(modules_namespaceObject, "isDataView", function() { return modules_isDataView; }); __webpack_require__.d(modules_namespaceObject, "isArray", function() { return isArray; }); __webpack_require__.d(modules_namespaceObject, "isFunction", function() { return modules_isFunction; }); __webpack_require__.d(modules_namespaceObject, "isArguments", function() { return modules_isArguments; }); __webpack_require__.d(modules_namespaceObject, "isFinite", function() { return isFinite_isFinite; }); __webpack_require__.d(modules_namespaceObject, "isNaN", function() { return isNaN_isNaN; }); __webpack_require__.d(modules_namespaceObject, "isTypedArray", function() { return modules_isTypedArray; }); __webpack_require__.d(modules_namespaceObject, "isEmpty", function() { return isEmpty; }); __webpack_require__.d(modules_namespaceObject, "isMatch", function() { return isMatch; }); __webpack_require__.d(modules_namespaceObject, "isEqual", function() { return isEqual; }); __webpack_require__.d(modules_namespaceObject, "isMap", function() { return isMap; }); __webpack_require__.d(modules_namespaceObject, "isWeakMap", function() { return isWeakMap; }); __webpack_require__.d(modules_namespaceObject, "isSet", function() { return isSet; }); __webpack_require__.d(modules_namespaceObject, "isWeakSet", function() { return isWeakSet; }); __webpack_require__.d(modules_namespaceObject, "keys", function() { return keys_keys; }); __webpack_require__.d(modules_namespaceObject, "allKeys", function() { return allKeys; }); __webpack_require__.d(modules_namespaceObject, "values", function() { return values_values; }); __webpack_require__.d(modules_namespaceObject, "pairs", function() { return pairs_pairs; }); __webpack_require__.d(modules_namespaceObject, "invert", function() { return invert; }); __webpack_require__.d(modules_namespaceObject, "functions", function() { return functions; }); __webpack_require__.d(modules_namespaceObject, "methods", function() { return functions; }); __webpack_require__.d(modules_namespaceObject, "extend", function() { return extend; }); __webpack_require__.d(modules_namespaceObject, "extendOwn", function() { return extendOwn; }); __webpack_require__.d(modules_namespaceObject, "assign", function() { return extendOwn; }); __webpack_require__.d(modules_namespaceObject, "defaults", function() { return defaults; }); __webpack_require__.d(modules_namespaceObject, "create", function() { return create; }); __webpack_require__.d(modules_namespaceObject, "clone", function() { return clone; }); __webpack_require__.d(modules_namespaceObject, "tap", function() { return tap; }); __webpack_require__.d(modules_namespaceObject, "get", function() { return get; }); __webpack_require__.d(modules_namespaceObject, "has", function() { return has_has; }); __webpack_require__.d(modules_namespaceObject, "mapObject", function() { return mapObject; }); __webpack_require__.d(modules_namespaceObject, "identity", function() { return identity; }); __webpack_require__.d(modules_namespaceObject, "constant", function() { return constant; }); __webpack_require__.d(modules_namespaceObject, "noop", function() { return noop; }); __webpack_require__.d(modules_namespaceObject, "toPath", function() { return toPath; }); __webpack_require__.d(modules_namespaceObject, "property", function() { return property; }); __webpack_require__.d(modules_namespaceObject, "propertyOf", function() { return propertyOf; }); __webpack_require__.d(modules_namespaceObject, "matcher", function() { return matcher_matcher; }); __webpack_require__.d(modules_namespaceObject, "matches", function() { return matcher_matcher; }); __webpack_require__.d(modules_namespaceObject, "times", function() { return times; }); __webpack_require__.d(modules_namespaceObject, "random", function() { return random; }); __webpack_require__.d(modules_namespaceObject, "now", function() { return now; }); __webpack_require__.d(modules_namespaceObject, "escape", function() { return modules_escape; }); __webpack_require__.d(modules_namespaceObject, "unescape", function() { return modules_unescape; }); __webpack_require__.d(modules_namespaceObject, "templateSettings", function() { return templateSettings; }); __webpack_require__.d(modules_namespaceObject, "template", function() { return template_template; }); __webpack_require__.d(modules_namespaceObject, "result", function() { return result_result; }); __webpack_require__.d(modules_namespaceObject, "uniqueId", function() { return uniqueId; }); __webpack_require__.d(modules_namespaceObject, "chain", function() { return chain; }); __webpack_require__.d(modules_namespaceObject, "iteratee", function() { return iteratee_iteratee; }); __webpack_require__.d(modules_namespaceObject, "partial", function() { return modules_partial; }); __webpack_require__.d(modules_namespaceObject, "bind", function() { return bind; }); __webpack_require__.d(modules_namespaceObject, "bindAll", function() { return bindAll; }); __webpack_require__.d(modules_namespaceObject, "memoize", function() { return memoize_memoize; }); __webpack_require__.d(modules_namespaceObject, "delay", function() { return delay; }); __webpack_require__.d(modules_namespaceObject, "defer", function() { return defer; }); __webpack_require__.d(modules_namespaceObject, "throttle", function() { return throttle; }); __webpack_require__.d(modules_namespaceObject, "debounce", function() { return debounce; }); __webpack_require__.d(modules_namespaceObject, "wrap", function() { return wrap; }); __webpack_require__.d(modules_namespaceObject, "negate", function() { return negate; }); __webpack_require__.d(modules_namespaceObject, "compose", function() { return compose; }); __webpack_require__.d(modules_namespaceObject, "after", function() { return after; }); __webpack_require__.d(modules_namespaceObject, "before", function() { return before; }); __webpack_require__.d(modules_namespaceObject, "once", function() { return once; }); __webpack_require__.d(modules_namespaceObject, "findKey", function() { return findKey; }); __webpack_require__.d(modules_namespaceObject, "findIndex", function() { return findIndex; }); __webpack_require__.d(modules_namespaceObject, "findLastIndex", function() { return findLastIndex; }); __webpack_require__.d(modules_namespaceObject, "sortedIndex", function() { return sortedIndex_sortedIndex; }); __webpack_require__.d(modules_namespaceObject, "indexOf", function() { return indexOf; }); __webpack_require__.d(modules_namespaceObject, "lastIndexOf", function() { return lastIndexOf; }); __webpack_require__.d(modules_namespaceObject, "find", function() { return find; }); __webpack_require__.d(modules_namespaceObject, "detect", function() { return find; }); __webpack_require__.d(modules_namespaceObject, "findWhere", function() { return findWhere; }); __webpack_require__.d(modules_namespaceObject, "each", function() { return each; }); __webpack_require__.d(modules_namespaceObject, "forEach", function() { return each; }); __webpack_require__.d(modules_namespaceObject, "map", function() { return map_map; }); __webpack_require__.d(modules_namespaceObject, "collect", function() { return map_map; }); __webpack_require__.d(modules_namespaceObject, "reduce", function() { return reduce; }); __webpack_require__.d(modules_namespaceObject, "foldl", function() { return reduce; }); __webpack_require__.d(modules_namespaceObject, "inject", function() { return reduce; }); __webpack_require__.d(modules_namespaceObject, "reduceRight", function() { return reduceRight; }); __webpack_require__.d(modules_namespaceObject, "foldr", function() { return reduceRight; }); __webpack_require__.d(modules_namespaceObject, "filter", function() { return filter; }); __webpack_require__.d(modules_namespaceObject, "select", function() { return filter; }); __webpack_require__.d(modules_namespaceObject, "reject", function() { return reject; }); __webpack_require__.d(modules_namespaceObject, "every", function() { return every; }); __webpack_require__.d(modules_namespaceObject, "all", function() { return every; }); __webpack_require__.d(modules_namespaceObject, "some", function() { return some; }); __webpack_require__.d(modules_namespaceObject, "any", function() { return some; }); __webpack_require__.d(modules_namespaceObject, "contains", function() { return contains; }); __webpack_require__.d(modules_namespaceObject, "includes", function() { return contains; }); __webpack_require__.d(modules_namespaceObject, "include", function() { return contains; }); __webpack_require__.d(modules_namespaceObject, "invoke", function() { return invoke; }); __webpack_require__.d(modules_namespaceObject, "pluck", function() { return pluck; }); __webpack_require__.d(modules_namespaceObject, "where", function() { return where; }); __webpack_require__.d(modules_namespaceObject, "max", function() { return max; }); __webpack_require__.d(modules_namespaceObject, "min", function() { return min; }); __webpack_require__.d(modules_namespaceObject, "shuffle", function() { return shuffle; }); __webpack_require__.d(modules_namespaceObject, "sample", function() { return sample_sample; }); __webpack_require__.d(modules_namespaceObject, "sortBy", function() { return sortBy; }); __webpack_require__.d(modules_namespaceObject, "groupBy", function() { return groupBy; }); __webpack_require__.d(modules_namespaceObject, "indexBy", function() { return indexBy; }); __webpack_require__.d(modules_namespaceObject, "countBy", function() { return countBy; }); __webpack_require__.d(modules_namespaceObject, "partition", function() { return modules_partition; }); __webpack_require__.d(modules_namespaceObject, "toArray", function() { return toArray; }); __webpack_require__.d(modules_namespaceObject, "size", function() { return size; }); __webpack_require__.d(modules_namespaceObject, "pick", function() { return pick; }); __webpack_require__.d(modules_namespaceObject, "omit", function() { return omit; }); __webpack_require__.d(modules_namespaceObject, "first", function() { return first; }); __webpack_require__.d(modules_namespaceObject, "head", function() { return first; }); __webpack_require__.d(modules_namespaceObject, "take", function() { return first; }); __webpack_require__.d(modules_namespaceObject, "initial", function() { return initial_initial; }); __webpack_require__.d(modules_namespaceObject, "last", function() { return last_last; }); __webpack_require__.d(modules_namespaceObject, "rest", function() { return rest_rest; }); __webpack_require__.d(modules_namespaceObject, "tail", function() { return rest_rest; }); __webpack_require__.d(modules_namespaceObject, "drop", function() { return rest_rest; }); __webpack_require__.d(modules_namespaceObject, "compact", function() { return compact; }); __webpack_require__.d(modules_namespaceObject, "flatten", function() { return flatten_flatten; }); __webpack_require__.d(modules_namespaceObject, "without", function() { return without; }); __webpack_require__.d(modules_namespaceObject, "uniq", function() { return uniq; }); __webpack_require__.d(modules_namespaceObject, "unique", function() { return uniq; }); __webpack_require__.d(modules_namespaceObject, "union", function() { return union; }); __webpack_require__.d(modules_namespaceObject, "intersection", function() { return intersection; }); __webpack_require__.d(modules_namespaceObject, "difference", function() { return difference; }); __webpack_require__.d(modules_namespaceObject, "unzip", function() { return unzip; }); __webpack_require__.d(modules_namespaceObject, "transpose", function() { return unzip; }); __webpack_require__.d(modules_namespaceObject, "zip", function() { return zip; }); __webpack_require__.d(modules_namespaceObject, "object", function() { return object_object; }); __webpack_require__.d(modules_namespaceObject, "range", function() { return range; }); __webpack_require__.d(modules_namespaceObject, "chunk", function() { return chunk; }); __webpack_require__.d(modules_namespaceObject, "mixin", function() { return mixin; }); __webpack_require__.d(modules_namespaceObject, "default", function() { return underscore_array_methods; }); // EXTERNAL MODULE: /app/node_modules/underscore/modules/_setup.js var _setup = __webpack_require__(6); // CONCATENATED MODULE: /app/node_modules/underscore/modules/restArguments.js // Some functions take a variable number of arguments, or a few expected // arguments at the beginning and then a variable number of values to operate // on. This helper accumulates all remaining arguments past the function’s // argument length (or an explicit `startIndex`), into an array that becomes // the last argument. Similar to ES6’s "rest parameter". function restArguments(func, startIndex) { startIndex = startIndex == null ? func.length - 1 : +startIndex; return function() { var length = Math.max(arguments.length - startIndex, 0), rest = Array(length), index = 0; for (; index < length; index++) { rest[index] = arguments[index + startIndex]; } switch (startIndex) { case 0: return func.call(this, rest); case 1: return func.call(this, arguments[0], rest); case 2: return func.call(this, arguments[0], arguments[1], rest); } var args = Array(startIndex + 1); for (index = 0; index < startIndex; index++) { args[index] = arguments[index]; } args[startIndex] = rest; return func.apply(this, args); }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isObject.js // Is a given variable an object? function isObject(obj) { var type = typeof obj; return type === 'function' || type === 'object' && !!obj; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isNull.js // Is a given value equal to null? function isNull(obj) { return obj === null; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isUndefined.js // Is a given variable undefined? function isUndefined(obj) { return obj === void 0; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isBoolean.js // Is a given value a boolean? function isBoolean(obj) { return obj === true || obj === false || _setup["t" /* toString */].call(obj) === '[object Boolean]'; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isElement.js // Is a given value a DOM element? function isElement(obj) { return !!(obj && obj.nodeType === 1); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_tagTester.js // Internal function for creating a `toString`-based type tester. function tagTester(name) { var tag = '[object ' + name + ']'; return function(obj) { return _setup["t" /* toString */].call(obj) === tag; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isString.js /* harmony default export */ var isString = (tagTester('String')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isNumber.js /* harmony default export */ var isNumber = (tagTester('Number')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isDate.js /* harmony default export */ var isDate = (tagTester('Date')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isRegExp.js /* harmony default export */ var isRegExp = (tagTester('RegExp')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isError.js /* harmony default export */ var isError = (tagTester('Error')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isSymbol.js /* harmony default export */ var isSymbol = (tagTester('Symbol')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isArrayBuffer.js /* harmony default export */ var isArrayBuffer = (tagTester('ArrayBuffer')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isFunction.js var isFunction = tagTester('Function'); // Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old // v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236). var nodelist = _setup["p" /* root */].document && _setup["p" /* root */].document.childNodes; if ( true && typeof Int8Array != 'object' && typeof nodelist != 'function') { isFunction = function(obj) { return typeof obj == 'function' || false; }; } /* harmony default export */ var modules_isFunction = (isFunction); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_hasObjectTag.js /* harmony default export */ var _hasObjectTag = (tagTester('Object')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_stringTagBug.js // In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`. // In IE 11, the most common among them, this problem also applies to // `Map`, `WeakMap` and `Set`. var hasStringTagBug = ( _setup["s" /* supportsDataView */] && _hasObjectTag(new DataView(new ArrayBuffer(8))) ), isIE11 = (typeof Map !== 'undefined' && _hasObjectTag(new Map)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isDataView.js var isDataView = tagTester('DataView'); // In IE 10 - Edge 13, we need a different heuristic // to determine whether an object is a `DataView`. function ie10IsDataView(obj) { return obj != null && modules_isFunction(obj.getInt8) && isArrayBuffer(obj.buffer); } /* harmony default export */ var modules_isDataView = (hasStringTagBug ? ie10IsDataView : isDataView); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isArray.js // Is a given value an array? // Delegates to ECMA5's native `Array.isArray`. /* harmony default export */ var isArray = (_setup["k" /* nativeIsArray */] || tagTester('Array')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_has.js // Internal function to check whether `key` is an own property name of `obj`. function has(obj, key) { return obj != null && _setup["i" /* hasOwnProperty */].call(obj, key); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isArguments.js var isArguments = tagTester('Arguments'); // Define a fallback version of the method in browsers (ahem, IE < 9), where // there isn't any inspectable "Arguments" type. (function() { if (!isArguments(arguments)) { isArguments = function(obj) { return has(obj, 'callee'); }; } }()); /* harmony default export */ var modules_isArguments = (isArguments); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isFinite.js // Is a given object a finite number? function isFinite_isFinite(obj) { return !isSymbol(obj) && Object(_setup["f" /* _isFinite */])(obj) && !isNaN(parseFloat(obj)); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isNaN.js // Is the given value `NaN`? function isNaN_isNaN(obj) { return isNumber(obj) && Object(_setup["g" /* _isNaN */])(obj); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/constant.js // Predicate-generating function. Often useful outside of Underscore. function constant(value) { return function() { return value; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_createSizePropertyCheck.js // Common internal logic for `isArrayLike` and `isBufferLike`. function createSizePropertyCheck(getSizeProperty) { return function(collection) { var sizeProperty = getSizeProperty(collection); return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= _setup["b" /* MAX_ARRAY_INDEX */]; } } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_shallowProperty.js // Internal helper to generate a function to obtain property `key` from `obj`. function shallowProperty(key) { return function(obj) { return obj == null ? void 0 : obj[key]; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_getByteLength.js // Internal helper to obtain the `byteLength` property of an object. /* harmony default export */ var _getByteLength = (shallowProperty('byteLength')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_isBufferLike.js // Internal helper to determine whether we should spend extensive checks against // `ArrayBuffer` et al. /* harmony default export */ var _isBufferLike = (createSizePropertyCheck(_getByteLength)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isTypedArray.js // Is a given value a typed array? var typedArrayPattern = /\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/; function isTypedArray(obj) { // `ArrayBuffer.isView` is the most future-proof, so use it when available. // Otherwise, fall back on the above regular expression. return _setup["l" /* nativeIsView */] ? (Object(_setup["l" /* nativeIsView */])(obj) && !modules_isDataView(obj)) : _isBufferLike(obj) && typedArrayPattern.test(_setup["t" /* toString */].call(obj)); } /* harmony default export */ var modules_isTypedArray = (_setup["r" /* supportsArrayBuffer */] ? isTypedArray : constant(false)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_getLength.js // Internal helper to obtain the `length` property of an object. /* harmony default export */ var _getLength = (shallowProperty('length')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_collectNonEnumProps.js // Internal helper to create a simple lookup structure. // `collectNonEnumProps` used to depend on `_.contains`, but this led to // circular imports. `emulatedSet` is a one-off solution that only works for // arrays of strings. function emulatedSet(keys) { var hash = {}; for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true; return { contains: function(key) { return hash[key]; }, push: function(key) { hash[key] = true; return keys.push(key); } }; } // Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't // be iterated by `for key in ...` and thus missed. Extends `keys` in place if // needed. function collectNonEnumProps(obj, keys) { keys = emulatedSet(keys); var nonEnumIdx = _setup["n" /* nonEnumerableProps */].length; var constructor = obj.constructor; var proto = modules_isFunction(constructor) && constructor.prototype || _setup["c" /* ObjProto */]; // Constructor is a special case. var prop = 'constructor'; if (has(obj, prop) && !keys.contains(prop)) keys.push(prop); while (nonEnumIdx--) { prop = _setup["n" /* nonEnumerableProps */][nonEnumIdx]; if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) { keys.push(prop); } } } // CONCATENATED MODULE: /app/node_modules/underscore/modules/keys.js // Retrieve the names of an object's own properties. // Delegates to **ECMAScript 5**'s native `Object.keys`. function keys_keys(obj) { if (!isObject(obj)) return []; if (_setup["m" /* nativeKeys */]) return Object(_setup["m" /* nativeKeys */])(obj); var keys = []; for (var key in obj) if (has(obj, key)) keys.push(key); // Ahem, IE < 9. if (_setup["h" /* hasEnumBug */]) collectNonEnumProps(obj, keys); return keys; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isEmpty.js // Is a given array, string, or object empty? // An "empty" object has no enumerable own-properties. function isEmpty(obj) { if (obj == null) return true; // Skip the more expensive `toString`-based type checks if `obj` has no // `.length`. var length = _getLength(obj); if (typeof length == 'number' && ( isArray(obj) || isString(obj) || modules_isArguments(obj) )) return length === 0; return _getLength(keys_keys(obj)) === 0; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isMatch.js // Returns whether an object has a given set of `key:value` pairs. function isMatch(object, attrs) { var _keys = keys_keys(attrs), length = _keys.length; if (object == null) return !length; var obj = Object(object); for (var i = 0; i < length; i++) { var key = _keys[i]; if (attrs[key] !== obj[key] || !(key in obj)) return false; } return true; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/underscore.js // If Underscore is called as a function, it returns a wrapped object that can // be used OO-style. This wrapper holds altered versions of all functions added // through `_.mixin`. Wrapped objects may be chained. function _(obj) { if (obj instanceof _) return obj; if (!(this instanceof _)) return new _(obj); this._wrapped = obj; } _.VERSION = _setup["e" /* VERSION */]; // Extracts the result from a wrapped and chained object. _.prototype.value = function() { return this._wrapped; }; // Provide unwrapping proxies for some methods used in engine operations // such as arithmetic and JSON stringification. _.prototype.valueOf = _.prototype.toJSON = _.prototype.value; _.prototype.toString = function() { return String(this._wrapped); }; // CONCATENATED MODULE: /app/node_modules/underscore/modules/_toBufferView.js // Internal function to wrap or shallow-copy an ArrayBuffer, // typed array or DataView to a new view, reusing the buffer. function toBufferView(bufferSource) { return new Uint8Array( bufferSource.buffer || bufferSource, bufferSource.byteOffset || 0, _getByteLength(bufferSource) ); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/isEqual.js // We use this string twice, so give it a name for minification. var tagDataView = '[object DataView]'; // Internal recursive comparison function for `_.isEqual`. function eq(a, b, aStack, bStack) { // Identical objects are equal. `0 === -0`, but they aren't identical. // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal). if (a === b) return a !== 0 || 1 / a === 1 / b; // `null` or `undefined` only equal to itself (strict comparison). if (a == null || b == null) return false; // `NaN`s are equivalent, but non-reflexive. if (a !== a) return b !== b; // Exhaust primitive checks var type = typeof a; if (type !== 'function' && type !== 'object' && typeof b != 'object') return false; return deepEq(a, b, aStack, bStack); } // Internal recursive comparison function for `_.isEqual`. function deepEq(a, b, aStack, bStack) { // Unwrap any wrapped objects. if (a instanceof _) a = a._wrapped; if (b instanceof _) b = b._wrapped; // Compare `[[Class]]` names. var className = _setup["t" /* toString */].call(a); if (className !== _setup["t" /* toString */].call(b)) return false; // Work around a bug in IE 10 - Edge 13. if (hasStringTagBug && className == '[object Object]' && modules_isDataView(a)) { if (!modules_isDataView(b)) return false; className = tagDataView; } switch (className) { // These types are compared by value. case '[object RegExp]': // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i') case '[object String]': // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is // equivalent to `new String("5")`. return '' + a === '' + b; case '[object Number]': // `NaN`s are equivalent, but non-reflexive. // Object(NaN) is equivalent to NaN. if (+a !== +a) return +b !== +b; // An `egal` comparison is performed for other numeric values. return +a === 0 ? 1 / +a === 1 / b : +a === +b; case '[object Date]': case '[object Boolean]': // Coerce dates and booleans to numeric primitive values. Dates are compared by their // millisecond representations. Note that invalid dates with millisecond representations // of `NaN` are not equivalent. return +a === +b; case '[object Symbol]': return _setup["d" /* SymbolProto */].valueOf.call(a) === _setup["d" /* SymbolProto */].valueOf.call(b); case '[object ArrayBuffer]': case tagDataView: // Coerce to typed array so we can fall through. return deepEq(toBufferView(a), toBufferView(b), aStack, bStack); } var areArrays = className === '[object Array]'; if (!areArrays && modules_isTypedArray(a)) { var byteLength = _getByteLength(a); if (byteLength !== _getByteLength(b)) return false; if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true; areArrays = true; } if (!areArrays) { if (typeof a != 'object' || typeof b != 'object') return false; // Objects with different constructors are not equivalent, but `Object`s or `Array`s // from different frames are. var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(modules_isFunction(aCtor) && aCtor instanceof aCtor && modules_isFunction(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)) { return false; } } // Assume equality for cyclic structures. The algorithm for detecting cyclic // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`. // Initializing stack of traversed objects. // It's done here since we only need them for objects and arrays comparison. aStack = aStack || []; bStack = bStack || []; var length = aStack.length; while (length--) { // Linear search. Performance is inversely proportional to the number of // unique nested structures. if (aStack[length] === a) return bStack[length] === b; } // Add the first object to the stack of traversed objects. aStack.push(a); bStack.push(b); // Recursively compare objects and arrays. if (areArrays) { // Compare array lengths to determine if a deep comparison is necessary. length = a.length; if (length !== b.length) return false; // Deep compare the contents, ignoring non-numeric properties. while (length--) { if (!eq(a[length], b[length], aStack, bStack)) return false; } } else { // Deep compare objects. var _keys = keys_keys(a), key; length = _keys.length; // Ensure that both objects contain the same number of properties before comparing deep equality. if (keys_keys(b).length !== length) return false; while (length--) { // Deep compare each member key = _keys[length]; if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false; } } // Remove the first object from the stack of traversed objects. aStack.pop(); bStack.pop(); return true; } // Perform a deep comparison to check if two objects are equal. function isEqual(a, b) { return eq(a, b); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/allKeys.js // Retrieve all the enumerable property names of an object. function allKeys(obj) { if (!isObject(obj)) return []; var keys = []; for (var key in obj) keys.push(key); // Ahem, IE < 9. if (_setup["h" /* hasEnumBug */]) collectNonEnumProps(obj, keys); return keys; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_methodFingerprint.js // Since the regular `Object.prototype.toString` type tests don't work for // some types in IE 11, we use a fingerprinting heuristic instead, based // on the methods. It's not great, but it's the best we got. // The fingerprint method lists are defined below. function ie11fingerprint(methods) { var length = _getLength(methods); return function(obj) { if (obj == null) return false; // `Map`, `WeakMap` and `Set` have no enumerable keys. var keys = allKeys(obj); if (_getLength(keys)) return false; for (var i = 0; i < length; i++) { if (!modules_isFunction(obj[methods[i]])) return false; } // If we are testing against `WeakMap`, we need to ensure that // `obj` doesn't have a `forEach` method in order to distinguish // it from a regular `Map`. return methods !== weakMapMethods || !modules_isFunction(obj[forEachName]); }; } // In the interest of compact minification, we write // each string in the fingerprints only once. var forEachName = 'forEach', hasName = 'has', commonInit = ['clear', 'delete'], mapTail = ['get', hasName, 'set']; // `Map`, `WeakMap` and `Set` each have slightly different // combinations of the above sublists. var mapMethods = commonInit.concat(forEachName, mapTail), weakMapMethods = commonInit.concat(mapTail), setMethods = ['add'].concat(commonInit, forEachName, hasName); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isMap.js /* harmony default export */ var isMap = (isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isWeakMap.js /* harmony default export */ var isWeakMap = (isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isSet.js /* harmony default export */ var isSet = (isIE11 ? ie11fingerprint(setMethods) : tagTester('Set')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/isWeakSet.js /* harmony default export */ var isWeakSet = (tagTester('WeakSet')); // CONCATENATED MODULE: /app/node_modules/underscore/modules/values.js // Retrieve the values of an object's properties. function values_values(obj) { var _keys = keys_keys(obj); var length = _keys.length; var values = Array(length); for (var i = 0; i < length; i++) { values[i] = obj[_keys[i]]; } return values; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/pairs.js // Convert an object into a list of `[key, value]` pairs. // The opposite of `_.object` with one argument. function pairs_pairs(obj) { var _keys = keys_keys(obj); var length = _keys.length; var pairs = Array(length); for (var i = 0; i < length; i++) { pairs[i] = [_keys[i], obj[_keys[i]]]; } return pairs; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/invert.js // Invert the keys and values of an object. The values must be serializable. function invert(obj) { var result = {}; var _keys = keys_keys(obj); for (var i = 0, length = _keys.length; i < length; i++) { result[obj[_keys[i]]] = _keys[i]; } return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/functions.js // Return a sorted list of the function names available on the object. function functions(obj) { var names = []; for (var key in obj) { if (modules_isFunction(obj[key])) names.push(key); } return names.sort(); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_createAssigner.js // An internal function for creating assigner functions. function createAssigner(keysFunc, defaults) { return function(obj) { var length = arguments.length; if (defaults) obj = Object(obj); if (length < 2 || obj == null) return obj; for (var index = 1; index < length; index++) { var source = arguments[index], keys = keysFunc(source), l = keys.length; for (var i = 0; i < l; i++) { var key = keys[i]; if (!defaults || obj[key] === void 0) obj[key] = source[key]; } } return obj; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/extend.js // Extend a given object with all the properties in passed-in object(s). /* harmony default export */ var extend = (createAssigner(allKeys)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/extendOwn.js // Assigns a given object with all the own properties in the passed-in // object(s). // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) /* harmony default export */ var extendOwn = (createAssigner(keys_keys)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/defaults.js // Fill in a given object with default properties. /* harmony default export */ var defaults = (createAssigner(allKeys, true)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_baseCreate.js // Create a naked function reference for surrogate-prototype-swapping. function ctor() { return function(){}; } // An internal function for creating a new object that inherits from another. function baseCreate(prototype) { if (!isObject(prototype)) return {}; if (_setup["j" /* nativeCreate */]) return Object(_setup["j" /* nativeCreate */])(prototype); var Ctor = ctor(); Ctor.prototype = prototype; var result = new Ctor; Ctor.prototype = null; return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/create.js // Creates an object that inherits from the given prototype object. // If additional properties are provided then they will be added to the // created object. function create(prototype, props) { var result = baseCreate(prototype); if (props) extendOwn(result, props); return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/clone.js // Create a (shallow-cloned) duplicate of an object. function clone(obj) { if (!isObject(obj)) return obj; return isArray(obj) ? obj.slice() : extend({}, obj); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/tap.js // Invokes `interceptor` with the `obj` and then returns `obj`. // The primary purpose of this method is to "tap into" a method chain, in // order to perform operations on intermediate results within the chain. function tap(obj, interceptor) { interceptor(obj); return obj; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/toPath.js // Normalize a (deep) property `path` to array. // Like `_.iteratee`, this function can be customized. function toPath(path) { return isArray(path) ? path : [path]; } _.toPath = toPath; // CONCATENATED MODULE: /app/node_modules/underscore/modules/_toPath.js // Internal wrapper for `_.toPath` to enable minification. // Similar to `cb` for `_.iteratee`. function _toPath_toPath(path) { return _.toPath(path); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_deepGet.js // Internal function to obtain a nested property in `obj` along `path`. function deepGet(obj, path) { var length = path.length; for (var i = 0; i < length; i++) { if (obj == null) return void 0; obj = obj[path[i]]; } return length ? obj : void 0; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/get.js // Get the value of the (deep) property on `path` from `object`. // If any property in `path` does not exist or if the value is // `undefined`, return `defaultValue` instead. // The `path` is normalized through `_.toPath`. function get(object, path, defaultValue) { var value = deepGet(object, _toPath_toPath(path)); return isUndefined(value) ? defaultValue : value; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/has.js // Shortcut function for checking if an object has a given property directly on // itself (in other words, not on a prototype). Unlike the internal `has` // function, this public version can also traverse nested properties. function has_has(obj, path) { path = _toPath_toPath(path); var length = path.length; for (var i = 0; i < length; i++) { var key = path[i]; if (!has(obj, key)) return false; obj = obj[key]; } return !!length; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/identity.js // Keep the identity function around for default iteratees. function identity(value) { return value; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/matcher.js // Returns a predicate for checking whether an object has a given set of // `key:value` pairs. function matcher_matcher(attrs) { attrs = extendOwn({}, attrs); return function(obj) { return isMatch(obj, attrs); }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/property.js // Creates a function that, when passed an object, will traverse that object’s // properties down the given `path`, specified as an array of keys or indices. function property(path) { path = _toPath_toPath(path); return function(obj) { return deepGet(obj, path); }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_optimizeCb.js // Internal function that returns an efficient (for current engines) version // of the passed-in callback, to be repeatedly applied in other Underscore // functions. function optimizeCb(func, context, argCount) { if (context === void 0) return func; switch (argCount == null ? 3 : argCount) { case 1: return function(value) { return func.call(context, value); }; // The 2-argument case is omitted because we’re not using it. case 3: return function(value, index, collection) { return func.call(context, value, index, collection); }; case 4: return function(accumulator, value, index, collection) { return func.call(context, accumulator, value, index, collection); }; } return function() { return func.apply(context, arguments); }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_baseIteratee.js // An internal function to generate callbacks that can be applied to each // element in a collection, returning the desired result — either `_.identity`, // an arbitrary callback, a property matcher, or a property accessor. function baseIteratee(value, context, argCount) { if (value == null) return identity; if (modules_isFunction(value)) return optimizeCb(value, context, argCount); if (isObject(value) && !isArray(value)) return matcher_matcher(value); return property(value); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/iteratee.js // External wrapper for our callback generator. Users may customize // `_.iteratee` if they want additional predicate/iteratee shorthand styles. // This abstraction hides the internal-only `argCount` argument. function iteratee_iteratee(value, context) { return baseIteratee(value, context, Infinity); } _.iteratee = iteratee_iteratee; // CONCATENATED MODULE: /app/node_modules/underscore/modules/_cb.js // The function we call internally to generate a callback. It invokes // `_.iteratee` if overridden, otherwise `baseIteratee`. function cb(value, context, argCount) { if (_.iteratee !== iteratee_iteratee) return _.iteratee(value, context); return baseIteratee(value, context, argCount); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/mapObject.js // Returns the results of applying the `iteratee` to each element of `obj`. // In contrast to `_.map` it returns an object. function mapObject(obj, iteratee, context) { iteratee = cb(iteratee, context); var _keys = keys_keys(obj), length = _keys.length, results = {}; for (var index = 0; index < length; index++) { var currentKey = _keys[index]; results[currentKey] = iteratee(obj[currentKey], currentKey, obj); } return results; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/noop.js // Predicate-generating function. Often useful outside of Underscore. function noop(){} // CONCATENATED MODULE: /app/node_modules/underscore/modules/propertyOf.js // Generates a function for a given object that returns a given property. function propertyOf(obj) { if (obj == null) return noop; return function(path) { return get(obj, path); }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/times.js // Run a function **n** times. function times(n, iteratee, context) { var accum = Array(Math.max(0, n)); iteratee = optimizeCb(iteratee, context, 1); for (var i = 0; i < n; i++) accum[i] = iteratee(i); return accum; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/random.js // Return a random integer between `min` and `max` (inclusive). function random(min, max) { if (max == null) { max = min; min = 0; } return min + Math.floor(Math.random() * (max - min + 1)); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/now.js // A (possibly faster) way to get the current timestamp as an integer. /* harmony default export */ var now = (Date.now || function() { return new Date().getTime(); }); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_createEscaper.js // Internal helper to generate functions for escaping and unescaping strings // to/from HTML interpolation. function createEscaper(map) { var escaper = function(match) { return map[match]; }; // Regexes for identifying a key that needs to be escaped. var source = '(?:' + keys_keys(map).join('|') + ')'; var testRegexp = RegExp(source); var replaceRegexp = RegExp(source, 'g'); return function(string) { string = string == null ? '' : '' + string; return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_escapeMap.js // Internal list of HTML entities for escaping. /* harmony default export */ var _escapeMap = ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''', '`': '`' }); // CONCATENATED MODULE: /app/node_modules/underscore/modules/escape.js // Function for escaping strings to HTML interpolation. /* harmony default export */ var modules_escape = (createEscaper(_escapeMap)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_unescapeMap.js // Internal list of HTML entities for unescaping. /* harmony default export */ var _unescapeMap = (invert(_escapeMap)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/unescape.js // Function for unescaping strings from HTML interpolation. /* harmony default export */ var modules_unescape = (createEscaper(_unescapeMap)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/templateSettings.js // By default, Underscore uses ERB-style template delimiters. Change the // following template settings to use alternative delimiters. /* harmony default export */ var templateSettings = (_.templateSettings = { evaluate: /<%([\s\S]+?)%>/g, interpolate: /<%=([\s\S]+?)%>/g, escape: /<%-([\s\S]+?)%>/g }); // CONCATENATED MODULE: /app/node_modules/underscore/modules/template.js // When customizing `_.templateSettings`, if you don't want to define an // interpolation, evaluation or escaping regex, we need one that is // guaranteed not to match. var noMatch = /(.)^/; // Certain characters need to be escaped so that they can be put into a // string literal. var escapes = { "'": "'", '\\': '\\', '\r': 'r', '\n': 'n', '\u2028': 'u2028', '\u2029': 'u2029' }; var escapeRegExp = /\\|'|\r|\n|\u2028|\u2029/g; function escapeChar(match) { return '\\' + escapes[match]; } // In order to prevent third-party code injection through // `_.templateSettings.variable`, we test it against the following regular // expression. It is intentionally a bit more liberal than just matching valid // identifiers, but still prevents possible loopholes through defaults or // destructuring assignment. var bareIdentifier = /^\s*(\w|\$)+\s*$/; // JavaScript micro-templating, similar to John Resig's implementation. // Underscore templating handles arbitrary delimiters, preserves whitespace, // and correctly escapes quotes within interpolated code. // NB: `oldSettings` only exists for backwards compatibility. function template_template(text, settings, oldSettings) { if (!settings && oldSettings) settings = oldSettings; settings = defaults({}, settings, _.templateSettings); // Combine delimiters into one regular expression via alternation. var matcher = RegExp([ (settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source ].join('|') + '|$', 'g'); // Compile the template source, escaping string literals appropriately. var index = 0; var source = "__p+='"; text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { source += text.slice(index, offset).replace(escapeRegExp, escapeChar); index = offset + match.length; if (escape) { source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; } else if (interpolate) { source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; } else if (evaluate) { source += "';\n" + evaluate + "\n__p+='"; } // Adobe VMs need the match returned to produce the correct offset. return match; }); source += "';\n"; var argument = settings.variable; if (argument) { // Insure against third-party code injection. (CVE-2021-23358) if (!bareIdentifier.test(argument)) throw new Error( 'variable is not a bare identifier: ' + argument ); } else { // If a variable is not specified, place data values in local scope. source = 'with(obj||{}){\n' + source + '}\n'; argument = 'obj'; } source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n'; var render; try { render = new Function(argument, '_', source); } catch (e) { e.source = source; throw e; } var template = function(data) { return render.call(this, data, _); }; // Provide the compiled source as a convenience for precompilation. template.source = 'function(' + argument + '){\n' + source + '}'; return template; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/result.js // Traverses the children of `obj` along `path`. If a child is a function, it // is invoked with its parent as context. Returns the value of the final // child, or `fallback` if any child is undefined. function result_result(obj, path, fallback) { path = _toPath_toPath(path); var length = path.length; if (!length) { return modules_isFunction(fallback) ? fallback.call(obj) : fallback; } for (var i = 0; i < length; i++) { var prop = obj == null ? void 0 : obj[path[i]]; if (prop === void 0) { prop = fallback; i = length; // Ensure we don't continue iterating. } obj = modules_isFunction(prop) ? prop.call(obj) : prop; } return obj; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/uniqueId.js // Generate a unique integer id (unique within the entire client session). // Useful for temporary DOM ids. var idCounter = 0; function uniqueId(prefix) { var id = ++idCounter + ''; return prefix ? prefix + id : id; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/chain.js // Start chaining a wrapped Underscore object. function chain(obj) { var instance = _(obj); instance._chain = true; return instance; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_executeBound.js // Internal function to execute `sourceFunc` bound to `context` with optional // `args`. Determines whether to execute a function as a constructor or as a // normal function. function executeBound(sourceFunc, boundFunc, context, callingContext, args) { if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args); var self = baseCreate(sourceFunc.prototype); var result = sourceFunc.apply(self, args); if (isObject(result)) return result; return self; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/partial.js // Partially apply a function by creating a version that has had some of its // arguments pre-filled, without changing its dynamic `this` context. `_` acts // as a placeholder by default, allowing any combination of arguments to be // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument. var partial = restArguments(function(func, boundArgs) { var placeholder = partial.placeholder; var bound = function() { var position = 0, length = boundArgs.length; var args = Array(length); for (var i = 0; i < length; i++) { args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; } while (position < arguments.length) args.push(arguments[position++]); return executeBound(func, bound, this, this, args); }; return bound; }); partial.placeholder = _; /* harmony default export */ var modules_partial = (partial); // CONCATENATED MODULE: /app/node_modules/underscore/modules/bind.js // Create a function bound to a given object (assigning `this`, and arguments, // optionally). /* harmony default export */ var bind = (restArguments(function(func, context, args) { if (!modules_isFunction(func)) throw new TypeError('Bind must be called on a function'); var bound = restArguments(function(callArgs) { return executeBound(func, bound, context, this, args.concat(callArgs)); }); return bound; })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_isArrayLike.js // Internal helper for collection methods to determine whether a collection // should be iterated as an array or as an object. // Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094 /* harmony default export */ var _isArrayLike = (createSizePropertyCheck(_getLength)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/_flatten.js // Internal implementation of a recursive `flatten` function. function flatten(input, depth, strict, output) { output = output || []; if (!depth && depth !== 0) { depth = Infinity; } else if (depth <= 0) { return output.concat(input); } var idx = output.length; for (var i = 0, length = _getLength(input); i < length; i++) { var value = input[i]; if (_isArrayLike(value) && (isArray(value) || modules_isArguments(value))) { // Flatten current level of array or arguments object. if (depth > 1) { flatten(value, depth - 1, strict, output); idx = output.length; } else { var j = 0, len = value.length; while (j < len) output[idx++] = value[j++]; } } else if (!strict) { output[idx++] = value; } } return output; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/bindAll.js // Bind a number of an object's methods to that object. Remaining arguments // are the method names to be bound. Useful for ensuring that all callbacks // defined on an object belong to it. /* harmony default export */ var bindAll = (restArguments(function(obj, keys) { keys = flatten(keys, false, false); var index = keys.length; if (index < 1) throw new Error('bindAll must be passed function names'); while (index--) { var key = keys[index]; obj[key] = bind(obj[key], obj); } return obj; })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/memoize.js // Memoize an expensive function by storing its results. function memoize_memoize(func, hasher) { var memoize = function(key) { var cache = memoize.cache; var address = '' + (hasher ? hasher.apply(this, arguments) : key); if (!has(cache, address)) cache[address] = func.apply(this, arguments); return cache[address]; }; memoize.cache = {}; return memoize; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/delay.js // Delays a function for the given number of milliseconds, and then calls // it with the arguments supplied. /* harmony default export */ var delay = (restArguments(function(func, wait, args) { return setTimeout(function() { return func.apply(null, args); }, wait); })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/defer.js // Defers a function, scheduling it to run after the current call stack has // cleared. /* harmony default export */ var defer = (modules_partial(delay, _, 1)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/throttle.js // Returns a function, that, when invoked, will only be triggered at most once // during a given window of time. Normally, the throttled function will run // as much as it can, without ever going more than once per `wait` duration; // but if you'd like to disable the execution on the leading edge, pass // `{leading: false}`. To disable execution on the trailing edge, ditto. function throttle(func, wait, options) { var timeout, context, args, result; var previous = 0; if (!options) options = {}; var later = function() { previous = options.leading === false ? 0 : now(); timeout = null; result = func.apply(context, args); if (!timeout) context = args = null; }; var throttled = function() { var _now = now(); if (!previous && options.leading === false) previous = _now; var remaining = wait - (_now - previous); context = this; args = arguments; if (remaining <= 0 || remaining > wait) { if (timeout) { clearTimeout(timeout); timeout = null; } previous = _now; result = func.apply(context, args); if (!timeout) context = args = null; } else if (!timeout && options.trailing !== false) { timeout = setTimeout(later, remaining); } return result; }; throttled.cancel = function() { clearTimeout(timeout); previous = 0; timeout = context = args = null; }; return throttled; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/debounce.js // When a sequence of calls of the returned function ends, the argument // function is triggered. The end of a sequence is defined by the `wait` // parameter. If `immediate` is passed, the argument function will be // triggered at the beginning of the sequence instead of at the end. function debounce(func, wait, immediate) { var timeout, previous, args, result, context; var later = function() { var passed = now() - previous; if (wait > passed) { timeout = setTimeout(later, wait - passed); } else { timeout = null; if (!immediate) result = func.apply(context, args); // This check is needed because `func` can recursively invoke `debounced`. if (!timeout) args = context = null; } }; var debounced = restArguments(function(_args) { context = this; args = _args; previous = now(); if (!timeout) { timeout = setTimeout(later, wait); if (immediate) result = func.apply(context, args); } return result; }); debounced.cancel = function() { clearTimeout(timeout); timeout = args = context = null; }; return debounced; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/wrap.js // Returns the first function passed as an argument to the second, // allowing you to adjust arguments, run code before and after, and // conditionally execute the original function. function wrap(func, wrapper) { return modules_partial(wrapper, func); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/negate.js // Returns a negated version of the passed-in predicate. function negate(predicate) { return function() { return !predicate.apply(this, arguments); }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/compose.js // Returns a function that is the composition of a list of functions, each // consuming the return value of the function that follows. function compose() { var args = arguments; var start = args.length - 1; return function() { var i = start; var result = args[start].apply(this, arguments); while (i--) result = args[i].call(this, result); return result; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/after.js // Returns a function that will only be executed on and after the Nth call. function after(times, func) { return function() { if (--times < 1) { return func.apply(this, arguments); } }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/before.js // Returns a function that will only be executed up to (but not including) the // Nth call. function before(times, func) { var memo; return function() { if (--times > 0) { memo = func.apply(this, arguments); } if (times <= 1) func = null; return memo; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/once.js // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. /* harmony default export */ var once = (modules_partial(before, 2)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/findKey.js // Returns the first key on an object that passes a truth test. function findKey(obj, predicate, context) { predicate = cb(predicate, context); var _keys = keys_keys(obj), key; for (var i = 0, length = _keys.length; i < length; i++) { key = _keys[i]; if (predicate(obj[key], key, obj)) return key; } } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_createPredicateIndexFinder.js // Internal function to generate `_.findIndex` and `_.findLastIndex`. function createPredicateIndexFinder(dir) { return function(array, predicate, context) { predicate = cb(predicate, context); var length = _getLength(array); var index = dir > 0 ? 0 : length - 1; for (; index >= 0 && index < length; index += dir) { if (predicate(array[index], index, array)) return index; } return -1; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/findIndex.js // Returns the first index on an array-like that passes a truth test. /* harmony default export */ var findIndex = (createPredicateIndexFinder(1)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/findLastIndex.js // Returns the last index on an array-like that passes a truth test. /* harmony default export */ var findLastIndex = (createPredicateIndexFinder(-1)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/sortedIndex.js // Use a comparator function to figure out the smallest index at which // an object should be inserted so as to maintain order. Uses binary search. function sortedIndex_sortedIndex(array, obj, iteratee, context) { iteratee = cb(iteratee, context, 1); var value = iteratee(obj); var low = 0, high = _getLength(array); while (low < high) { var mid = Math.floor((low + high) / 2); if (iteratee(array[mid]) < value) low = mid + 1; else high = mid; } return low; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_createIndexFinder.js // Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions. function createIndexFinder(dir, predicateFind, sortedIndex) { return function(array, item, idx) { var i = 0, length = _getLength(array); if (typeof idx == 'number') { if (dir > 0) { i = idx >= 0 ? idx : Math.max(idx + length, i); } else { length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; } } else if (sortedIndex && idx && length) { idx = sortedIndex(array, item); return array[idx] === item ? idx : -1; } if (item !== item) { idx = predicateFind(_setup["q" /* slice */].call(array, i, length), isNaN_isNaN); return idx >= 0 ? idx + i : -1; } for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { if (array[idx] === item) return idx; } return -1; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/indexOf.js // Return the position of the first occurrence of an item in an array, // or -1 if the item is not included in the array. // If the array is large and already in sort order, pass `true` // for **isSorted** to use binary search. /* harmony default export */ var indexOf = (createIndexFinder(1, findIndex, sortedIndex_sortedIndex)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/lastIndexOf.js // Return the position of the last occurrence of an item in an array, // or -1 if the item is not included in the array. /* harmony default export */ var lastIndexOf = (createIndexFinder(-1, findLastIndex)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/find.js // Return the first value which passes a truth test. function find(obj, predicate, context) { var keyFinder = _isArrayLike(obj) ? findIndex : findKey; var key = keyFinder(obj, predicate, context); if (key !== void 0 && key !== -1) return obj[key]; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/findWhere.js // Convenience version of a common use case of `_.find`: getting the first // object containing specific `key:value` pairs. function findWhere(obj, attrs) { return find(obj, matcher_matcher(attrs)); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/each.js // The cornerstone for collection functions, an `each` // implementation, aka `forEach`. // Handles raw objects in addition to array-likes. Treats all // sparse array-likes as if they were dense. function each(obj, iteratee, context) { iteratee = optimizeCb(iteratee, context); var i, length; if (_isArrayLike(obj)) { for (i = 0, length = obj.length; i < length; i++) { iteratee(obj[i], i, obj); } } else { var _keys = keys_keys(obj); for (i = 0, length = _keys.length; i < length; i++) { iteratee(obj[_keys[i]], _keys[i], obj); } } return obj; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/map.js // Return the results of applying the iteratee to each element. function map_map(obj, iteratee, context) { iteratee = cb(iteratee, context); var _keys = !_isArrayLike(obj) && keys_keys(obj), length = (_keys || obj).length, results = Array(length); for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; results[index] = iteratee(obj[currentKey], currentKey, obj); } return results; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_createReduce.js // Internal helper to create a reducing function, iterating left or right. function createReduce(dir) { // Wrap code that reassigns argument variables in a separate function than // the one that accesses `arguments.length` to avoid a perf hit. (#1991) var reducer = function(obj, iteratee, memo, initial) { var _keys = !_isArrayLike(obj) && keys_keys(obj), length = (_keys || obj).length, index = dir > 0 ? 0 : length - 1; if (!initial) { memo = obj[_keys ? _keys[index] : index]; index += dir; } for (; index >= 0 && index < length; index += dir) { var currentKey = _keys ? _keys[index] : index; memo = iteratee(memo, obj[currentKey], currentKey, obj); } return memo; }; return function(obj, iteratee, memo, context) { var initial = arguments.length >= 3; return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial); }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/reduce.js // **Reduce** builds up a single result from a list of values, aka `inject`, // or `foldl`. /* harmony default export */ var reduce = (createReduce(1)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/reduceRight.js // The right-associative version of reduce, also known as `foldr`. /* harmony default export */ var reduceRight = (createReduce(-1)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/filter.js // Return all the elements that pass a truth test. function filter(obj, predicate, context) { var results = []; predicate = cb(predicate, context); each(obj, function(value, index, list) { if (predicate(value, index, list)) results.push(value); }); return results; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/reject.js // Return all the elements for which a truth test fails. function reject(obj, predicate, context) { return filter(obj, negate(cb(predicate)), context); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/every.js // Determine whether all of the elements pass a truth test. function every(obj, predicate, context) { predicate = cb(predicate, context); var _keys = !_isArrayLike(obj) && keys_keys(obj), length = (_keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; if (!predicate(obj[currentKey], currentKey, obj)) return false; } return true; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/some.js // Determine if at least one element in the object passes a truth test. function some(obj, predicate, context) { predicate = cb(predicate, context); var _keys = !_isArrayLike(obj) && keys_keys(obj), length = (_keys || obj).length; for (var index = 0; index < length; index++) { var currentKey = _keys ? _keys[index] : index; if (predicate(obj[currentKey], currentKey, obj)) return true; } return false; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/contains.js // Determine if the array or object contains a given item (using `===`). function contains(obj, item, fromIndex, guard) { if (!_isArrayLike(obj)) obj = values_values(obj); if (typeof fromIndex != 'number' || guard) fromIndex = 0; return indexOf(obj, item, fromIndex) >= 0; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/invoke.js // Invoke a method (with arguments) on every item in a collection. /* harmony default export */ var invoke = (restArguments(function(obj, path, args) { var contextPath, func; if (modules_isFunction(path)) { func = path; } else { path = _toPath_toPath(path); contextPath = path.slice(0, -1); path = path[path.length - 1]; } return map_map(obj, function(context) { var method = func; if (!method) { if (contextPath && contextPath.length) { context = deepGet(context, contextPath); } if (context == null) return void 0; method = context[path]; } return method == null ? method : method.apply(context, args); }); })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/pluck.js // Convenience version of a common use case of `_.map`: fetching a property. function pluck(obj, key) { return map_map(obj, property(key)); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/where.js // Convenience version of a common use case of `_.filter`: selecting only // objects containing specific `key:value` pairs. function where(obj, attrs) { return filter(obj, matcher_matcher(attrs)); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/max.js // Return the maximum element (or element-based computation). function max(obj, iteratee, context) { var result = -Infinity, lastComputed = -Infinity, value, computed; if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { obj = _isArrayLike(obj) ? obj : values_values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value != null && value > result) { result = value; } } } else { iteratee = cb(iteratee, context); each(obj, function(v, index, list) { computed = iteratee(v, index, list); if (computed > lastComputed || computed === -Infinity && result === -Infinity) { result = v; lastComputed = computed; } }); } return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/min.js // Return the minimum element (or element-based computation). function min(obj, iteratee, context) { var result = Infinity, lastComputed = Infinity, value, computed; if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { obj = _isArrayLike(obj) ? obj : values_values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; if (value != null && value < result) { result = value; } } } else { iteratee = cb(iteratee, context); each(obj, function(v, index, list) { computed = iteratee(v, index, list); if (computed < lastComputed || computed === Infinity && result === Infinity) { result = v; lastComputed = computed; } }); } return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/sample.js // Sample **n** random values from a collection using the modern version of the // [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle). // If **n** is not specified, returns a single random element. // The internal `guard` argument allows it to work with `_.map`. function sample_sample(obj, n, guard) { if (n == null || guard) { if (!_isArrayLike(obj)) obj = values_values(obj); return obj[random(obj.length - 1)]; } var sample = _isArrayLike(obj) ? clone(obj) : values_values(obj); var length = _getLength(sample); n = Math.max(Math.min(n, length), 0); var last = length - 1; for (var index = 0; index < n; index++) { var rand = random(index, last); var temp = sample[index]; sample[index] = sample[rand]; sample[rand] = temp; } return sample.slice(0, n); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/shuffle.js // Shuffle a collection. function shuffle(obj) { return sample_sample(obj, Infinity); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/sortBy.js // Sort the object's values by a criterion produced by an iteratee. function sortBy(obj, iteratee, context) { var index = 0; iteratee = cb(iteratee, context); return pluck(map_map(obj, function(value, key, list) { return { value: value, index: index++, criteria: iteratee(value, key, list) }; }).sort(function(left, right) { var a = left.criteria; var b = right.criteria; if (a !== b) { if (a > b || a === void 0) return 1; if (a < b || b === void 0) return -1; } return left.index - right.index; }), 'value'); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_group.js // An internal function used for aggregate "group by" operations. function group(behavior, partition) { return function(obj, iteratee, context) { var result = partition ? [[], []] : {}; iteratee = cb(iteratee, context); each(obj, function(value, index) { var key = iteratee(value, index, obj); behavior(result, value, key); }); return result; }; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/groupBy.js // Groups the object's values by a criterion. Pass either a string attribute // to group by, or a function that returns the criterion. /* harmony default export */ var groupBy = (group(function(result, value, key) { if (has(result, key)) result[key].push(value); else result[key] = [value]; })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/indexBy.js // Indexes the object's values by a criterion, similar to `_.groupBy`, but for // when you know that your index values will be unique. /* harmony default export */ var indexBy = (group(function(result, value, key) { result[key] = value; })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/countBy.js // Counts instances of an object that group by a certain criterion. Pass // either a string attribute to count by, or a function that returns the // criterion. /* harmony default export */ var countBy = (group(function(result, value, key) { if (has(result, key)) result[key]++; else result[key] = 1; })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/partition.js // Split a collection into two arrays: one whose elements all pass the given // truth test, and one whose elements all do not pass the truth test. /* harmony default export */ var modules_partition = (group(function(result, value, pass) { result[pass ? 0 : 1].push(value); }, true)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/toArray.js // Safely create a real, live array from anything iterable. var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g; function toArray(obj) { if (!obj) return []; if (isArray(obj)) return _setup["q" /* slice */].call(obj); if (isString(obj)) { // Keep surrogate pair characters together. return obj.match(reStrSymbol); } if (_isArrayLike(obj)) return map_map(obj, identity); return values_values(obj); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/size.js // Return the number of elements in a collection. function size(obj) { if (obj == null) return 0; return _isArrayLike(obj) ? obj.length : keys_keys(obj).length; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_keyInObj.js // Internal `_.pick` helper function to determine whether `key` is an enumerable // property name of `obj`. function keyInObj(value, key, obj) { return key in obj; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/pick.js // Return a copy of the object only containing the allowed properties. /* harmony default export */ var pick = (restArguments(function(obj, keys) { var result = {}, iteratee = keys[0]; if (obj == null) return result; if (modules_isFunction(iteratee)) { if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]); keys = allKeys(obj); } else { iteratee = keyInObj; keys = flatten(keys, false, false); obj = Object(obj); } for (var i = 0, length = keys.length; i < length; i++) { var key = keys[i]; var value = obj[key]; if (iteratee(value, key, obj)) result[key] = value; } return result; })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/omit.js // Return a copy of the object without the disallowed properties. /* harmony default export */ var omit = (restArguments(function(obj, keys) { var iteratee = keys[0], context; if (modules_isFunction(iteratee)) { iteratee = negate(iteratee); if (keys.length > 1) context = keys[1]; } else { keys = map_map(flatten(keys, false, false), String); iteratee = function(value, key) { return !contains(keys, key); }; } return pick(obj, iteratee, context); })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/initial.js // Returns everything but the last entry of the array. Especially useful on // the arguments object. Passing **n** will return all the values in // the array, excluding the last N. function initial_initial(array, n, guard) { return _setup["q" /* slice */].call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n))); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/first.js // Get the first element of an array. Passing **n** will return the first N // values in the array. The **guard** check allows it to work with `_.map`. function first(array, n, guard) { if (array == null || array.length < 1) return n == null || guard ? void 0 : []; if (n == null || guard) return array[0]; return initial_initial(array, array.length - n); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/rest.js // Returns everything but the first entry of the `array`. Especially useful on // the `arguments` object. Passing an **n** will return the rest N values in the // `array`. function rest_rest(array, n, guard) { return _setup["q" /* slice */].call(array, n == null || guard ? 1 : n); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/last.js // Get the last element of an array. Passing **n** will return the last N // values in the array. function last_last(array, n, guard) { if (array == null || array.length < 1) return n == null || guard ? void 0 : []; if (n == null || guard) return array[array.length - 1]; return rest_rest(array, Math.max(0, array.length - n)); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/compact.js // Trim out all falsy values from an array. function compact(array) { return filter(array, Boolean); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/flatten.js // Flatten out an array, either recursively (by default), or up to `depth`. // Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively. function flatten_flatten(array, depth) { return flatten(array, depth, false); } // CONCATENATED MODULE: /app/node_modules/underscore/modules/difference.js // Take the difference between one array and a number of other arrays. // Only the elements present in just the first array will remain. /* harmony default export */ var difference = (restArguments(function(array, rest) { rest = flatten(rest, true, true); return filter(array, function(value){ return !contains(rest, value); }); })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/without.js // Return a version of the array that does not contain the specified value(s). /* harmony default export */ var without = (restArguments(function(array, otherArrays) { return difference(array, otherArrays); })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/uniq.js // Produce a duplicate-free version of the array. If the array has already // been sorted, you have the option of using a faster algorithm. // The faster algorithm will not work with an iteratee if the iteratee // is not a one-to-one function, so providing an iteratee will disable // the faster algorithm. function uniq(array, isSorted, iteratee, context) { if (!isBoolean(isSorted)) { context = iteratee; iteratee = isSorted; isSorted = false; } if (iteratee != null) iteratee = cb(iteratee, context); var result = []; var seen = []; for (var i = 0, length = _getLength(array); i < length; i++) { var value = array[i], computed = iteratee ? iteratee(value, i, array) : value; if (isSorted && !iteratee) { if (!i || seen !== computed) result.push(value); seen = computed; } else if (iteratee) { if (!contains(seen, computed)) { seen.push(computed); result.push(value); } } else if (!contains(result, value)) { result.push(value); } } return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/union.js // Produce an array that contains the union: each distinct element from all of // the passed-in arrays. /* harmony default export */ var union = (restArguments(function(arrays) { return uniq(flatten(arrays, true, true)); })); // CONCATENATED MODULE: /app/node_modules/underscore/modules/intersection.js // Produce an array that contains every item shared between all the // passed-in arrays. function intersection(array) { var result = []; var argsLength = arguments.length; for (var i = 0, length = _getLength(array); i < length; i++) { var item = array[i]; if (contains(result, item)) continue; var j; for (j = 1; j < argsLength; j++) { if (!contains(arguments[j], item)) break; } if (j === argsLength) result.push(item); } return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/unzip.js // Complement of zip. Unzip accepts an array of arrays and groups // each array's elements on shared indices. function unzip(array) { var length = array && max(array, _getLength).length || 0; var result = Array(length); for (var index = 0; index < length; index++) { result[index] = pluck(array, index); } return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/zip.js // Zip together multiple lists into a single array -- elements that share // an index go together. /* harmony default export */ var zip = (restArguments(unzip)); // CONCATENATED MODULE: /app/node_modules/underscore/modules/object.js // Converts lists into objects. Pass either a single array of `[key, value]` // pairs, or two parallel arrays of the same length -- one of keys, and one of // the corresponding values. Passing by pairs is the reverse of `_.pairs`. function object_object(list, values) { var result = {}; for (var i = 0, length = _getLength(list); i < length; i++) { if (values) { result[list[i]] = values[i]; } else { result[list[i][0]] = list[i][1]; } } return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/range.js // Generate an integer Array containing an arithmetic progression. A port of // the native Python `range()` function. See // [the Python documentation](https://docs.python.org/library/functions.html#range). function range(start, stop, step) { if (stop == null) { stop = start || 0; start = 0; } if (!step) { step = stop < start ? -1 : 1; } var length = Math.max(Math.ceil((stop - start) / step), 0); var range = Array(length); for (var idx = 0; idx < length; idx++, start += step) { range[idx] = start; } return range; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/chunk.js // Chunk a single array into multiple arrays, each containing `count` or fewer // items. function chunk(array, count) { if (count == null || count < 1) return []; var result = []; var i = 0, length = array.length; while (i < length) { result.push(_setup["q" /* slice */].call(array, i, i += count)); } return result; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/_chainResult.js // Helper function to continue chaining intermediate results. function chainResult(instance, obj) { return instance._chain ? _(obj).chain() : obj; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/mixin.js // Add your own custom functions to the Underscore object. function mixin(obj) { each(functions(obj), function(name) { var func = _[name] = obj[name]; _.prototype[name] = function() { var args = [this._wrapped]; _setup["o" /* push */].apply(args, arguments); return chainResult(this, func.apply(_, args)); }; }); return _; } // CONCATENATED MODULE: /app/node_modules/underscore/modules/underscore-array-methods.js // Add all mutator `Array` functions to the wrapper. each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) { var method = _setup["a" /* ArrayProto */][name]; _.prototype[name] = function() { var obj = this._wrapped; if (obj != null) { method.apply(obj, arguments); if ((name === 'shift' || name === 'splice') && obj.length === 0) { delete obj[0]; } } return chainResult(this, obj); }; }); // Add all accessor `Array` functions to the wrapper. each(['concat', 'join', 'slice'], function(name) { var method = _setup["a" /* ArrayProto */][name]; _.prototype[name] = function() { var obj = this._wrapped; if (obj != null) obj = method.apply(obj, arguments); return chainResult(this, obj); }; }); /* harmony default export */ var underscore_array_methods = (_); // CONCATENATED MODULE: /app/node_modules/underscore/modules/index.js // Named Exports // ============= // Underscore.js 1.13.1 // https://underscorejs.org // (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. // Baseline setup. // Object Functions // ---------------- // Our most fundamental functions operate on any JavaScript object. // Most functions in Underscore depend on at least one function in this section. // A group of functions that check the types of core JavaScript values. // These are often informally referred to as the "isType" functions. // Functions that treat an object as a dictionary of key-value pairs. // Utility Functions // ----------------- // A bit of a grab bag: Predicate-generating functions for use with filters and // loops, string escaping and templating, create random numbers and unique ids, // and functions that facilitate Underscore's chaining and iteration conventions. // Function (ahem) Functions // ------------------------- // These functions take a function as an argument and return a new function // as the result. Also known as higher-order functions. // Finders // ------- // Functions that extract (the position of) a single element from an object // or array based on some criterion. // Collection Functions // -------------------- // Functions that work on any collection of elements: either an array, or // an object of key-value pairs. // `_.pick` and `_.omit` are actually object functions, but we put // them here in order to create a more natural reading order in the // monolithic build as they depend on `_.contains`. // Array Functions // --------------- // Functions that operate on arrays (and array-likes) only, because they’re // expressed in terms of operations on an ordered list of values. // OOP // --- // These modules support the "object-oriented" calling style. See also // `underscore.js` and `index-default.js`. // CONCATENATED MODULE: /app/node_modules/underscore/modules/index-default.js // Default Export // ============== // In this module, we mix our bundled exports into the `_` object and export // the result. This is analogous to setting `module.exports = _` in CommonJS. // Hence, this module is also the entry point of our UMD bundle and the package // entry point for CommonJS and AMD users. In other words, this is (the source // of) the module you are interfacing with when you do any of the following: // // ```js // // CommonJS // var _ = require('underscore'); // // // AMD // define(['underscore'], function(_) {...}); // // // UMD in the browser // // _ is available as a global variable // ``` // Add all of the Underscore functions to the wrapper object. var index_default_ = mixin(modules_namespaceObject); // Legacy Node.js API. index_default_._ = index_default_; // Export the Underscore API. /* harmony default export */ var index_default = (index_default_); // CONCATENATED MODULE: /app/node_modules/underscore/modules/index-all.js // ESM Exports // =========== // This module is the package entry point for ES module users. In other words, // it is the module they are interfacing with when they import from the whole // package instead of from a submodule, like this: // // ```js // import { map } from 'underscore'; // ``` // // The difference with `./index-default`, which is the package entry point for // CommonJS, AMD and UMD users, is purely technical. In ES modules, named and // default exports are considered to be siblings, so when you have a default // export, its properties are not automatically available as named exports. For // this reason, we re-export the named exports in addition to providing the same // default export as in `./index-default`. /***/ }), /* 8 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; exports.__esModule = true; exports.reset = exports.auth = exports.ui = exports.validPublicHooks = undefined; 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; }; exports.setup = setup; exports.id = id; exports.clientID = clientID; exports.domain = domain; exports.clientBaseUrl = clientBaseUrl; exports.tenantBaseUrl = tenantBaseUrl; exports.useTenantInfo = useTenantInfo; exports.connectionResolver = connectionResolver; exports.setResolvedConnection = setResolvedConnection; exports.resolvedConnection = resolvedConnection; exports.languageBaseUrl = languageBaseUrl; exports.setSubmitting = setSubmitting; exports.submitting = submitting; exports.setGlobalError = setGlobalError; exports.globalError = globalError; exports.clearGlobalError = clearGlobalError; exports.setGlobalSuccess = setGlobalSuccess; exports.globalSuccess = globalSuccess; exports.clearGlobalSuccess = clearGlobalSuccess; exports.setGlobalInfo = setGlobalInfo; exports.globalInfo = globalInfo; exports.clearGlobalInfo = clearGlobalInfo; exports.rendering = rendering; exports.stopRendering = stopRendering; exports.setSupressSubmitOverlay = setSupressSubmitOverlay; exports.suppressSubmitOverlay = suppressSubmitOverlay; exports.hooks = hooks; exports.withAuthOptions = withAuthOptions; exports.extractTenantBaseUrlOption = extractTenantBaseUrlOption; exports.render = render; exports.setLoggedIn = setLoggedIn; exports.loggedIn = loggedIn; exports.defaultADUsernameFromEmailPrefix = defaultADUsernameFromEmailPrefix; exports.setCaptcha = setCaptcha; exports.captcha = captcha; exports.prefill = prefill; exports.warn = warn; exports.error = error; exports.allowedConnections = allowedConnections; exports.connections = connections; exports.connection = connection; exports.hasOneConnection = hasOneConnection; exports.hasOnlyConnections = hasOnlyConnections; exports.hasSomeConnections = hasSomeConnections; exports.countConnections = countConnections; exports.findConnection = findConnection; exports.hasConnection = hasConnection; exports.filterConnections = filterConnections; exports.useCustomPasswordlessConnection = useCustomPasswordlessConnection; exports.runHook = runHook; exports.emitEvent = emitEvent; exports.handleEvent = handleEvent; exports.loginErrorMessage = loginErrorMessage; exports.stop = stop; exports.hasStopped = hasStopped; exports.hashCleanup = hashCleanup; exports.emitHashParsedEvent = emitHashParsedEvent; exports.emitAuthenticatedEvent = emitAuthenticatedEvent; exports.emitAuthorizationErrorEvent = emitAuthorizationErrorEvent; exports.emitUnrecoverableErrorEvent = emitUnrecoverableErrorEvent; exports.showBadge = showBadge; exports.overrideOptions = overrideOptions; var _urlJoin = __webpack_require__(260); var _urlJoin2 = _interopRequireDefault(_urlJoin); var _immutable = __webpack_require__(29); var _immutable2 = _interopRequireDefault(_immutable); var _media_utils = __webpack_require__(115); var _string_utils = __webpack_require__(261); var _url_utils = __webpack_require__(488); var _i18n = __webpack_require__(34); var i18n = _interopRequireWildcard(_i18n); var _trim = __webpack_require__(73); var _trim2 = _interopRequireDefault(_trim); var _gravatar_provider = __webpack_require__(492); var gp = _interopRequireWildcard(_gravatar_provider); var _data_utils = __webpack_require__(55); var _index = __webpack_require__(268); var _captcha = __webpack_require__(272); var captchaField = _interopRequireWildcard(_captcha); 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 }; } var _dataFns = (0, _data_utils.dataFns)(['core']), get = _dataFns.get, init = _dataFns.init, remove = _dataFns.remove, reset = _dataFns.reset, set = _dataFns.set, tget = _dataFns.tget, tset = _dataFns.tset, tremove = _dataFns.tremove; var validPublicHooks = exports.validPublicHooks = ['loggingIn', 'signingUp']; function setup(id, clientID, domain, options, hookRunner, emitEventFn, handleEventFn) { var m = init(id, _immutable2.default.fromJS({ clientBaseUrl: extractClientBaseUrlOption(options, domain), tenantBaseUrl: extractTenantBaseUrlOption(options, domain), languageBaseUrl: extractLanguageBaseUrlOption(options, domain), auth: extractAuthOptions(options), clientID: clientID, domain: domain, emitEventFn: emitEventFn, hookRunner: hookRunner, useTenantInfo: options.__useTenantInfo || false, hashCleanup: options.hashCleanup === false ? false : true, allowedConnections: _immutable2.default.fromJS(options.allowedConnections || []), useCustomPasswordlessConnection: options.useCustomPasswordlessConnection === true ? true : false, ui: extractUIOptions(id, options), defaultADUsernameFromEmailPrefix: options.defaultADUsernameFromEmailPrefix === false ? false : true, prefill: options.prefill || {}, connectionResolver: options.connectionResolver, handleEventFn: handleEventFn, hooks: extractHookOptions(options) })); m = i18n.initI18n(m); return m; } function id(m) { return m.get('id'); } function clientID(m) { return get(m, 'clientID'); } function domain(m) { return get(m, 'domain'); } function clientBaseUrl(m) { return get(m, 'clientBaseUrl'); } function tenantBaseUrl(m) { return get(m, 'tenantBaseUrl'); } function useTenantInfo(m) { return get(m, 'useTenantInfo'); } function connectionResolver(m) { return get(m, 'connectionResolver'); } function setResolvedConnection(m, resolvedConnection) { if (!resolvedConnection) { return set(m, 'resolvedConnection', undefined); } if (!resolvedConnection.type || !resolvedConnection.name) { throw new Error('Invalid connection object. The resolved connection must look like: `{ type: "database", name: "connection name" }`.'); } if (resolvedConnection.type !== 'database') { throw new Error('Invalid connection type. Only database connections can be resolved with a custom resolver.'); } return set(m, 'resolvedConnection', _immutable2.default.fromJS(resolvedConnection)); } function resolvedConnection(m) { var resolvedConnection = get(m, 'resolvedConnection'); if (!resolvedConnection) { return undefined; } return findConnection(m, resolvedConnection.get('name')); } function languageBaseUrl(m) { return get(m, 'languageBaseUrl'); } function setSubmitting(m, value) { var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ''; m = tset(m, 'submitting', value); m = clearGlobalSuccess(m); m = error && !value ? setGlobalError(m, error) : clearGlobalError(m); return m; } function submitting(m) { return tget(m, 'submitting', false); } function setGlobalError(m, str) { return tset(m, 'globalError', str); } function globalError(m) { return tget(m, 'globalError', ''); } function clearGlobalError(m) { return tremove(m, 'globalError'); } function setGlobalSuccess(m, str) { return tset(m, 'globalSuccess', str); } function globalSuccess(m) { return tget(m, 'globalSuccess', ''); } function clearGlobalSuccess(m) { return tremove(m, 'globalSuccess'); } function setGlobalInfo(m, str) { return tset(m, 'globalInfo', str); } function globalInfo(m) { return tget(m, 'globalInfo', ''); } function clearGlobalInfo(m) { return tremove(m, 'globalInfo'); } function rendering(m) { return tget(m, 'render', false); } function stopRendering(m) { return tremove(m, 'render'); } function setSupressSubmitOverlay(m, b) { return set(m, 'suppressSubmitOverlay', b); } function suppressSubmitOverlay(m) { return get(m, 'suppressSubmitOverlay'); } function hooks(m) { return get(m, 'hooks'); } function extractUIOptions(id, options) { var closable = options.container ? false : undefined === options.closable ? true : !!options.closable; var theme = options.theme || {}; var labeledSubmitButton = theme.labeledSubmitButton, hideMainScreenTitle = theme.hideMainScreenTitle, logo = theme.logo, primaryColor = theme.primaryColor, authButtons = theme.authButtons; var avatar = options.avatar !== null; var customAvatarProvider = options.avatar && typeof options.avatar.url === 'function' && typeof options.avatar.displayName === 'function' && options.avatar; var avatarProvider = customAvatarProvider || gp; return new _immutable2.default.fromJS({ containerID: options.container || 'auth0-lock-container-' + id, appendContainer: !options.container, autoclose: undefined === options.autoclose ? false : closable && options.autoclose, autofocus: undefined === options.autofocus ? !(options.container || (0, _media_utils.isSmallScreen)()) : !!options.autofocus, avatar: avatar, avatarProvider: avatarProvider, logo: typeof logo === 'string' ? logo : undefined, closable: closable, hideMainScreenTitle: !!hideMainScreenTitle, labeledSubmitButton: undefined === labeledSubmitButton ? true : !!labeledSubmitButton, language: undefined === options.language ? 'en' : (0, _trim2.default)(options.language || '').toLowerCase(), dict: _typeof(options.languageDictionary) === 'object' ? options.languageDictionary : {}, disableWarnings: options.disableWarnings === undefined ? false : !!options.disableWarnings, mobile: undefined === options.mobile ? false : !!options.mobile, popupOptions: undefined === options.popupOptions ? {} : options.popupOptions, primaryColor: typeof primaryColor === 'string' ? primaryColor : undefined, rememberLastLogin: undefined === options.rememberLastLogin ? true : !!options.rememberLastLogin, allowAutocomplete: !!options.allowAutocomplete, preferConnectionDisplayName: !!options.preferConnectionDisplayName, authButtonsTheme: (typeof authButtons === 'undefined' ? 'undefined' : _typeof(authButtons)) === 'object' ? authButtons : {}, allowShowPassword: !!options.allowShowPassword, allowPasswordAutocomplete: !!options.allowPasswordAutocomplete, scrollGlobalMessagesIntoView: undefined === options.scrollGlobalMessagesIntoView ? true : !!options.scrollGlobalMessagesIntoView }); } function extractHookOptions(options) { var hooks = {}; validPublicHooks.forEach(function (hookName) { if (options.hooks && typeof options.hooks[hookName] === 'function') { hooks[hookName] = options.hooks[hookName]; } }); return new _immutable2.default.fromJS(hooks); } var _dataFns2 = (0, _data_utils.dataFns)(['core', 'ui']), getUI = _dataFns2.get, setUI = _dataFns2.set; var _dataFns3 = (0, _data_utils.dataFns)(['core', 'transient', 'ui']), tgetUI = _dataFns3.get, tsetUI = _dataFns3.set; var getUIAttribute = function getUIAttribute(m, attribute) { return tgetUI(m, attribute) || getUI(m, attribute); }; var ui = exports.ui = { containerID: function containerID(lock) { return getUIAttribute(lock, 'containerID'); }, appendContainer: function appendContainer(lock) { return getUIAttribute(lock, 'appendContainer'); }, autoclose: function autoclose(lock) { return getUIAttribute(lock, 'autoclose'); }, autofocus: function autofocus(lock) { return getUIAttribute(lock, 'autofocus'); }, avatar: function avatar(lock) { return getUIAttribute(lock, 'avatar'); }, avatarProvider: function avatarProvider(lock) { return getUIAttribute(lock, 'avatarProvider'); }, closable: function closable(lock) { return getUIAttribute(lock, 'closable'); }, dict: function dict(lock) { return getUIAttribute(lock, 'dict'); }, disableWarnings: function disableWarnings(lock) { return getUIAttribute(lock, 'disableWarnings'); }, labeledSubmitButton: function labeledSubmitButton(lock) { return getUIAttribute(lock, 'labeledSubmitButton'); }, hideMainScreenTitle: function hideMainScreenTitle(lock) { return getUIAttribute(lock, 'hideMainScreenTitle'); }, language: function language(lock) { return getUIAttribute(lock, 'language'); }, logo: function logo(lock) { return getUIAttribute(lock, 'logo'); }, mobile: function mobile(lock) { return getUIAttribute(lock, 'mobile'); }, popupOptions: function popupOptions(lock) { return getUIAttribute(lock, 'popupOptions'); }, primaryColor: function primaryColor(lock) { return getUIAttribute(lock, 'primaryColor'); }, authButtonsTheme: function authButtonsTheme(lock) { return getUIAttribute(lock, 'authButtonsTheme'); }, preferConnectionDisplayName: function preferConnectionDisplayName(lock) { return getUIAttribute(lock, 'preferConnectionDisplayName'); }, rememberLastLogin: function rememberLastLogin(m) { return tget(m, 'rememberLastLogin', getUIAttribute(m, 'rememberLastLogin')); }, allowAutocomplete: function allowAutocomplete(m) { return tget(m, 'allowAutocomplete', getUIAttribute(m, 'allowAutocomplete')); }, scrollGlobalMessagesIntoView: function scrollGlobalMessagesIntoView(lock) { return getUIAttribute(lock, 'scrollGlobalMessagesIntoView'); }, allowShowPassword: function allowShowPassword(m) { return tget(m, 'allowShowPassword', getUIAttribute(m, 'allowShowPassword')); }, allowPasswordAutocomplete: function allowPasswordAutocomplete(m) { return tget(m, 'allowPasswordAutocomplete', getUIAttribute(m, 'allowPasswordAutocomplete')); } }; var _dataFns4 = (0, _data_utils.dataFns)(['core', 'auth']), getAuthAttribute = _dataFns4.get; var auth = exports.auth = { connectionScopes: function connectionScopes(m) { return getAuthAttribute(m, 'connectionScopes'); }, params: function params(m) { return tget(m, 'authParams') || getAuthAttribute(m, 'params'); }, autoParseHash: function autoParseHash(lock) { return getAuthAttribute(lock, 'autoParseHash'); }, redirect: function redirect(lock) { return getAuthAttribute(lock, 'redirect'); }, redirectUrl: function redirectUrl(lock) { return getAuthAttribute(lock, 'redirectUrl'); }, responseType: function responseType(lock) { return getAuthAttribute(lock, 'responseType'); }, sso: function sso(lock) { return getAuthAttribute(lock, 'sso'); } }; function extractAuthOptions(options) { var _ref = options.auth || {}, audience = _ref.audience, connectionScopes = _ref.connectionScopes, params = _ref.params, autoParseHash = _ref.autoParseHash, redirect = _ref.redirect, redirectUrl = _ref.redirectUrl, responseMode = _ref.responseMode, responseType = _ref.responseType, sso = _ref.sso, state = _ref.state, nonce = _ref.nonce; if (options.auth && options.auth.redirectUri) { console.warn("You're sending an `auth` option named `redirectUri`. This option will be ignored. Use `redirectUrl` instead."); } audience = typeof audience === 'string' ? audience : undefined; connectionScopes = (typeof connectionScopes === 'undefined' ? 'undefined' : _typeof(connectionScopes)) === 'object' ? connectionScopes : {}; params = (typeof params === 'undefined' ? 'undefined' : _typeof(params)) === 'object' ? params : {}; // by default is null because we need to know if it was set when we curate the responseType redirectUrl = typeof redirectUrl === 'string' && redirectUrl ? redirectUrl : null; autoParseHash = typeof autoParseHash === 'boolean' ? autoParseHash : true; redirect = typeof redirect === 'boolean' ? redirect : true; responseMode = typeof responseMode === 'string' ? responseMode : undefined; state = typeof state === 'string' ? state : undefined; nonce = typeof nonce === 'string' ? nonce : undefined; // if responseType was not set and there is a redirectUrl, it defaults to code. Otherwise token. responseType = typeof responseType === 'string' ? responseType : redirectUrl ? 'code' : 'token'; // now we set the default because we already did the validation redirectUrl = redirectUrl || '' + (0, _url_utils.getOriginFromUrl)(window.location.href) + window.location.pathname; sso = typeof sso === 'boolean' ? sso : true; if (!params.scope) { params.scope = 'openid profile email'; } return _immutable2.default.fromJS({ audience: audience, connectionScopes: connectionScopes, params: params, autoParseHash: autoParseHash, redirect: redirect, redirectUrl: redirectUrl, responseMode: responseMode, responseType: responseType, sso: sso, state: state, nonce: nonce }); } function withAuthOptions(m, opts) { return _immutable2.default.fromJS(opts).merge(get(m, 'auth')).toJS(); } function extractClientBaseUrlOption(opts, domain) { if (opts.clientBaseUrl && typeof opts.clientBaseUrl === 'string') { return opts.clientBaseUrl; } if (opts.configurationBaseUrl && typeof opts.configurationBaseUrl === 'string') { return opts.configurationBaseUrl; } if (opts.assetsUrl && typeof opts.assetsUrl === 'string') { return opts.assetsUrl; } var domainUrl = 'https://' + domain; var hostname = (0, _url_utils.getLocationFromUrl)(domainUrl).hostname; var DOT_AUTH0_DOT_COM = '.auth0.com'; var AUTH0_US_CDN_URL = 'https://cdn.auth0.com'; if ((0, _string_utils.endsWith)(hostname, DOT_AUTH0_DOT_COM)) { var parts = hostname.split('.'); return parts.length > 3 ? 'https://cdn.' + parts[parts.length - 3] + DOT_AUTH0_DOT_COM : AUTH0_US_CDN_URL; } else { return domainUrl; } } function extractTenantBaseUrlOption(opts, domain) { if (opts.configurationBaseUrl && typeof opts.configurationBaseUrl === 'string') { if (opts.overrides && opts.overrides.__tenant) { // When using a custom domain and a configuration URL hosted in auth0's cdn return (0, _urlJoin2.default)(opts.configurationBaseUrl, 'tenants', 'v1', opts.overrides.__tenant + '.js'); } return (0, _urlJoin2.default)(opts.configurationBaseUrl, 'info-v1.js'); } if (opts.assetsUrl && typeof opts.assetsUrl === 'string') { return opts.assetsUrl; } var domainUrl = 'https://' + domain; var hostname = (0, _url_utils.getLocationFromUrl)(domainUrl).hostname; var DOT_AUTH0_DOT_COM = '.auth0.com'; var AUTH0_US_CDN_URL = 'https://cdn.auth0.com'; var parts = hostname.split('.'); var tenant_name = parts[0]; var domain; if ((0, _string_utils.endsWith)(hostname, DOT_AUTH0_DOT_COM)) { domain = parts.length > 3 ? 'https://cdn.' + parts[parts.length - 3] + DOT_AUTH0_DOT_COM : AUTH0_US_CDN_URL; return (0, _urlJoin2.default)(domain, 'tenants', 'v1', tenant_name + '.js'); } else { return (0, _urlJoin2.default)(domainUrl, 'info-v1.js'); } } function extractLanguageBaseUrlOption(opts, domain) { if (opts.languageBaseUrl && typeof opts.languageBaseUrl === 'string') { return opts.languageBaseUrl; } if (opts.assetsUrl && typeof opts.assetsUrl === 'string') { return opts.assetsUrl; } return 'https://cdn.auth0.com'; } function render(m) { return tset(m, 'render', true); } exports.reset = reset; function setLoggedIn(m, value) { return tset(m, 'loggedIn', value); } function loggedIn(m) { return tget(m, 'loggedIn', false); } function defaultADUsernameFromEmailPrefix(m) { return get(m, 'defaultADUsernameFromEmailPrefix', true); } function setCaptcha(m, value, wasInvalid) { m = captchaField.reset(m, wasInvalid); return set(m, 'captcha', _immutable2.default.fromJS(value)); } function captcha(m) { //some tests send an string as model. // https://github.com/auth0/lock/blob/82f56187698528699478bd429858cf91e387763c/src/__tests__/engine/classic/sign_up_pane.test.jsx#L28 if ((typeof m === 'undefined' ? 'undefined' : _typeof(m)) !== 'object') { return; } return get(m, 'captcha'); } function prefill(m) { return get(m, 'prefill', {}); } function warn(x, str) { var shouldOutput = _immutable.Map.isMap(x) ? !ui.disableWarnings(x) : !x.disableWarnings; if (shouldOutput && console && console.warn) { console.warn(str); } } function error(x, str) { var shouldOutput = _immutable.Map.isMap(x) ? !ui.disableWarnings(x) : !x.disableWarnings; if (shouldOutput && console && console.error) { console.error(str); } } function allowedConnections(m) { return tget(m, 'allowedConnections') || get(m, 'allowedConnections'); } function connections(m) { for (var _len = arguments.length, strategies = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { strategies[_key - 2] = arguments[_key]; } var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; if (arguments.length === 1) { return tget(m, 'connections', (0, _immutable.Map)()).filter(function (v, k) { return k !== 'unknown'; }).valueSeq().flatten(true); } var xs = tget(m, ['connections', type], (0, _immutable.List)()); return strategies.length > 0 ? xs.filter(function (x) { return ~strategies.indexOf(x.get('strategy')); }) : xs; } function connection(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; for (var _len2 = arguments.length, strategies = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { strategies[_key2 - 2] = arguments[_key2]; } return connections.apply(undefined, [m, type].concat(strategies)).get(0); } function hasOneConnection(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; var xs = connections(m); return xs.count() === 1 && (!type || xs.getIn([0, 'type']) === type); } function hasOnlyConnections(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; var all = connections(m).count(); for (var _len3 = arguments.length, strategies = Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) { strategies[_key3 - 2] = arguments[_key3]; } var filtered = connections.apply(undefined, [m, type].concat(strategies)).count(); return all > 0 && all === filtered; } function hasSomeConnections(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; for (var _len4 = arguments.length, strategies = Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) { strategies[_key4 - 2] = arguments[_key4]; } return countConnections.apply(undefined, [m, type].concat(strategies)) > 0; } function countConnections(m) { var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; for (var _len5 = arguments.length, strategies = Array(_len5 > 2 ? _len5 - 2 : 0), _key5 = 2; _key5 < _len5; _key5++) { strategies[_key5 - 2] = arguments[_key5]; } return connections.apply(undefined, [m, type].concat(strategies)).count(); } function findConnection(m, name) { return connections(m).find(function (m1) { return m1.get('name') === name; }); } function hasConnection(m, name) { return !!findConnection(m, name); } function filterConnections(m) { var allowed = allowedConnections(m); var order = allowed.count() === 0 ? function (_) { return 0; } : function (c) { return allowed.indexOf(c.get('name')); }; return tset(m, 'connections', (0, _index.clientConnections)(m).map(function (cs) { return cs.filter(function (c) { return order(c) >= 0; }).sort(function (c1, c2) { return order(c1) - order(c2); }); })); } function useCustomPasswordlessConnection(m) { return get(m, 'useCustomPasswordlessConnection'); } function runHook(m, str) { for (var _len6 = arguments.length, args = Array(_len6 > 2 ? _len6 - 2 : 0), _key6 = 2; _key6 < _len6; _key6++) { args[_key6 - 2] = arguments[_key6]; } return get(m, 'hookRunner').apply(undefined, [str, m].concat(args)); } function emitEvent(m, str) { for (var _len7 = arguments.length, args = Array(_len7 > 2 ? _len7 - 2 : 0), _key7 = 2; _key7 < _len7; _key7++) { args[_key7 - 2] = arguments[_key7]; } setTimeout(function () { var emitEventFn = get(m, 'emitEventFn'); var hadListener = emitEventFn.apply(undefined, [str].concat(args)); // Handle uncaught custom error if (str === 'unrecoverable_error' && !hadListener) { throw new (Function.prototype.bind.apply(Error, [null].concat(args)))(); } }, 0); } function handleEvent(m, str) { var handleEventFn = get(m, 'handleEventFn'); for (var _len8 = arguments.length, args = Array(_len8 > 2 ? _len8 - 2 : 0), _key8 = 2; _key8 < _len8; _key8++) { args[_key8 - 2] = arguments[_key8]; } handleEventFn.apply(undefined, [str].concat(args)); } function loginErrorMessage(m, error, type) { // NOTE: previous version of lock checked for status codes and, at // some point, if the status code was 401 it defaults to an // "invalid_user_password" error (actually the // "wrongEmailPasswordErrorText" dict entry) instead of checking // explicitly. We should figure out if there was a reason for that. if (error.status === 0) { return i18n.html(m, ['error', 'login', 'lock.network']); } // Custom rule or hook error (except blocked_user) if (error.code === 'rule_error' || error.code === 'hook_error') { return error.description || i18n.html(m, ['error', 'login', 'lock.fallback']); } var INVALID_MAP = { code: 'lock.invalid_code', email: 'lock.invalid_email_password', username: 'lock.invalid_username_password' }; var code = error.error || error.code; if (code === 'invalid_user_password' && INVALID_MAP[type]) { code = INVALID_MAP[type]; } if (code === 'a0.mfa_registration_required') { code = 'lock.mfa_registration_required'; } if (code === 'a0.mfa_invalid_code') { code = 'lock.mfa_invalid_code'; } if (code === 'password_expired') { code = 'password_change_required'; } if (code === 'invalid_captcha') { var currentCaptcha = get(m, 'captcha'); if (currentCaptcha && currentCaptcha.get('provider') === 'recaptcha_v2') { code = 'invalid_recaptcha'; } } return i18n.html(m, ['error', 'login', code]) || i18n.html(m, ['error', 'login', 'lock.fallback']); } // TODO: rename to something less generic that is easier to grep function stop(m, error) { if (error) { setTimeout(function () { return emitEvent(m, 'unrecoverable_error', error); }, 17); } return set(m, 'stopped', true); } function hasStopped(m) { return get(m, 'stopped'); } function hashCleanup(m) { return get(m, 'hashCleanup'); } function emitHashParsedEvent(m, parsedHash) { emitEvent(m, 'hash_parsed', parsedHash); } function emitAuthenticatedEvent(m, result) { emitEvent(m, 'authenticated', result); } function emitAuthorizationErrorEvent(m, error) { emitEvent(m, 'authorization_error', error); } function emitUnrecoverableErrorEvent(m, error) { emitEvent(m, 'unrecoverable_error', error); } function showBadge(m) { return (0, _index.hasFreeSubscription)(m) || false; } function overrideOptions(m, opts) { if (!opts) opts = {}; if (opts.allowedConnections) { m = tset(m, 'allowedConnections', _immutable2.default.fromJS(opts.allowedConnections)); } if (opts.flashMessage) { var type = opts.flashMessage.type; var typeCapitalized = type.charAt(0).toUpperCase() + type.slice(1); m = tset(m, 'global' + typeCapitalized, opts.flashMessage.text); } if (opts.auth && opts.auth.params) { m = tset(m, 'authParams', _immutable2.default.fromJS(opts.auth.params)); } if (opts.theme) { if (opts.theme.primaryColor) { m = tset(m, ['ui', 'primaryColor'], opts.theme.primaryColor); } if (opts.theme.logo) { m = tset(m, ['ui', 'logo'], opts.theme.logo); } } if (opts.language || opts.languageDictionary) { if (opts.language) { m = tset(m, ['ui', 'language'], opts.language); } if (opts.languageDictionary) { m = tset(m, ['ui', 'dict'], opts.languageDictionary); } m = i18n.initI18n(m); } if (typeof opts.rememberLastLogin === 'boolean') { m = tset(m, 'rememberLastLogin', opts.rememberLastLogin); } if (typeof opts.allowAutocomplete === 'boolean') { m = tset(m, 'allowAutocomplete', opts.allowAutocomplete); } if (typeof opts.allowShowPassword === 'boolean') { m = tset(m, 'allowShowPassword', opts.allowShowPassword); } if (typeof opts.allowPasswordAutocomplete === 'boolean') { m = tset(m, 'allowPasswordAutocomplete', opts.allowPasswordAutocomplete); } return m; } /***/ }), /* 9 */ /***/ (function(module, exports) { function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } module.exports = _defineProperty; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.TabPanelPane = exports.TabPanel = exports.PanelFooter = exports.PanelHeading = exports.PanelBody = exports.Panel = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(9)); var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(342)); var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(1)); var _jsxRuntime = __webpack_require__(3); const _excluded = ["addClasses", "noDefaultClasses", "children"]; function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } const Panel = _ref => { let { addClasses, noDefaultClasses, children } = _ref, other = (0, _objectWithoutProperties2.default)(_ref, _excluded); return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, other), {}, { className: (noDefaultClasses ? '' : 'panel panel-default') + (addClasses ? " ".concat(addClasses) : ''), children: children })); }; exports.Panel = Panel; Panel.propTypes = { addClasses: _propTypes.default.string, // Classes to add to outer panel div noDefaultClasses: _propTypes.default.bool, // T to not include default panel classes children: _propTypes.default.node }; Panel.defaultProps = { addClasses: '', // Classes to add to outer panel div noDefaultClasses: false, // T to not include default panel classes children: null }; const PanelBody = _ref2 => { let { addClasses, children } = _ref2; return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "panel-body".concat(addClasses ? " ".concat(addClasses) : ''), children: children }); }; exports.PanelBody = PanelBody; PanelBody.propTypes = { addClasses: _propTypes.default.string, // Classes to add to outer panel div children: _propTypes.default.node }; PanelBody.defaultProps = { addClasses: '', children: null }; const PanelHeading = _ref3 => { let { addClasses, children } = _ref3; return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "panel-heading".concat(addClasses ? " ".concat(addClasses) : ''), children: children }); }; exports.PanelHeading = PanelHeading; PanelHeading.propTypes = { addClasses: _propTypes.default.string, // Classes to add to outer panel div children: _propTypes.default.node }; PanelHeading.defaultProps = { addClasses: '', children: null }; const PanelFooter = _ref4 => { let { addClasses, children } = _ref4; return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "panel-footer".concat(addClasses ? " ".concat(addClasses) : ''), children: children }); }; exports.PanelFooter = PanelFooter; PanelFooter.propTypes = { addClasses: _propTypes.default.string, // Classes to add to outer panel div children: _propTypes.default.node }; PanelFooter.defaultProps = { addClasses: '', children: null }; // components have tabs that select between panes, and so the main child components of // must be components. The children of components are the // content you want to have rendered within a tab's pane. takes a required `tabs` // parameter -- an object that maps an identifier to a tab title. The identifier has to map to a // child `key` property. Here's an example tabbed panel. // // // //
Content for panel 1
//
// //
Content for panel 2
//
// //
Content for panel 3
//
//
// // Note that takes an `id` property, not a `key` property because components can't // receive those. copies the `key` property to an `id` property in any child // components so that can see it. const TabPanelPane = _ref5 => { let { id, active, children } = _ref5; return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { role: "tabpanel", className: "tab-pane".concat(active ? ' active' : ''), id: id, children: active ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { children: children }) : null }); }; exports.TabPanelPane = TabPanelPane; TabPanelPane.propTypes = { id: _propTypes.default.string, // ID of the pane; not passed explicitly -- comes from `key` of active: _propTypes.default.bool, // True if this panel is the active one children: _propTypes.default.node }; TabPanelPane.defaultProps = { id: '', // Actually required, but added within cloneElement, so requiring triggers warning active: false, children: null }; const TabPanel = _ref6 => { let { tabs, tabDisplay, selectedTab, tabPanelCss, tabCss, navCss, moreComponents, moreComponentsClasses, tabFlange, decoration, decorationClasses, handleTabClick, children } = _ref6; const [currentTab, setCurrentTab] = _react.default.useState(selectedTab || ''); // Handle a click on a tab const handleClick = tab => { if (handleTabClick) { handleTabClick(tab); // must keep parent aware of selectedTab. } if (tab !== currentTab) { setCurrentTab(tab); } }; /** * Get the currently selected tab from `selectedTab`, or the component state `currentTab`, or * just the first tab if neither of those is specified. * * @return {string} Key of selected tab */ const getCurrentTab = () => { if (selectedTab === null || selectedTab) { return selectedTab; } if (currentTab) { return currentTab; } return Object.keys(tabs)[0]; }; let childrenCopy = []; let firstPaneIndex = -1; // React.Children.map index of first component _react.default.useEffect(() => { // If the selected tab is not in the tabs object, set it to the first tab. if (selectedTab && !tabs[selectedTab]) { setCurrentTab(Object.keys(tabs)[0]); } }, [selectedTab, tabs, currentTab]); // We expect to find child elements inside . For any we find, get // the React `key` value and copy it to an `id` value that we add to each child component. // That lets each child get an HTML ID matching `key` without having to pass both a key and // id with the same value. We also set the `active` property in the TabPanelPane component // here too so that each pane knows whether it's the active one or not. ### React14 if (children) { childrenCopy = _react.default.Children.map(children, (child, i) => { if (child !== null && child.type === TabPanelPane) { firstPaneIndex = firstPaneIndex === -1 ? i : firstPaneIndex; // Replace the existing child component const active = getCurrentTab() === child.key; return /*#__PURE__*/_react.default.cloneElement(child, { id: child.key, active }); } return child; }); } return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { className: tabPanelCss, children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { className: "tab-nav tab-nav-".concat(getCurrentTab() ? getCurrentTab().replace(/\s/g, '') : ''), children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("ul", { className: "nav-tabs".concat(navCss ? " ".concat(navCss) : ''), role: "tablist", children: [Object.keys(tabs).map(tab => /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.default.Fragment, { children: tabs[tab] ? /*#__PURE__*/(0, _jsxRuntime.jsx)("li", { role: "presentation", "aria-controls": tab, className: "".concat(tab.replace(/\s/g, ''), "-tab ").concat(tabCss, " ").concat(getCurrentTab() === tab ? 'active' : ''), children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TabItem, { tab: tab, handleClick: handleClick, children: tabDisplay[tab] || tabs[tab] }) }) : null }, tab)), moreComponents ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: moreComponentsClasses, children: moreComponents }) : null] }), decoration ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: decorationClasses, children: decoration }) : null, tabFlange ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "tab-flange" }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "tab-border" })] }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "tab-content tab-content-".concat(getCurrentTab() ? getCurrentTab().replace(/\s/g, '').toLowerCase() : ''), children: childrenCopy })] }); }; exports.TabPanel = TabPanel; TabPanel.propTypes = { /** Object with tab=>pane specifications */ tabs: _propTypes.default.object.isRequired, /** Object with optional tab-rendering components */ tabDisplay: _propTypes.default.object, /** key of tab to select (must provide handleTabClick) too; null for no selection */ selectedTab: _propTypes.default.string, /** CSS class for the entire tab panel
*/ tabPanelCss: _propTypes.default.string, /** CSS class for each tab */ tabCss: _propTypes.default.string, /** Classes to add to navigation
    */ navCss: _propTypes.default.string, /** Other components to render in the tab bar */ moreComponents: _propTypes.default.object, /** Classes to add to moreComponents wrapper
    */ moreComponentsClasses: _propTypes.default.string, /** True to show a small full-width strip under active tab */ tabFlange: _propTypes.default.bool, /** Component to render in the tab bar */ decoration: _propTypes.default.object, /** CSS classes to wrap decoration in */ decorationClasses: _propTypes.default.string, /** If selectedTab is provided, then parent must keep track of it */ handleTabClick: _propTypes.default.func, children: _propTypes.default.node }; TabPanel.defaultProps = { tabDisplay: {}, selectedTab: '', tabPanelCss: null, tabCss: null, navCss: null, moreComponents: null, moreComponentsClasses: '', tabFlange: false, decoration: null, decorationClasses: null, handleTabClick: null, children: null }; // Check to see if child of tab has "disabled" class const checkIfDisabled = input => input.children && input.children.props && input.children.props.className && input.children.props.className.includes('disabled'); class TabItem extends _react.default.Component { constructor(props) { super(props); this.clickHandler = this.clickHandler.bind(this); } clickHandler() { if (!checkIfDisabled(this.props)) { this.props.handleClick(this.props.tab); } } render() { const { tab } = this.props; const isDisabled = checkIfDisabled(this.props); return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", { href: "#".concat(tab), ref: tab, onClick: this.clickHandler, "data-trigger": "tab", "aria-controls": tab, role: "tab", "data-toggle": "tab", disabled: isDisabled, children: this.props.children }); } } TabItem.propTypes = { tab: _propTypes.default.string.isRequired, // Text of tab handleClick: _propTypes.default.func, // Handle a click on the link children: _propTypes.default.node }; TabItem.defaultProps = { handleClick: null, children: null }; /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var punycode = __webpack_require__(309); var util = __webpack_require__(310); exports.parse = urlParse; exports.resolve = urlResolve; exports.resolveObject = urlResolveObject; exports.format = urlFormat; exports.Url = Url; function Url() { this.protocol = null; this.slashes = null; this.auth = null; this.host = null; this.port = null; this.hostname = null; this.hash = null; this.search = null; this.query = null; this.pathname = null; this.path = null; this.href = null; } // Reference: RFC 3986, RFC 1808, RFC 2396 // define these here so at least they only have to be // compiled once on the first module load. var protocolPattern = /^([a-z0-9.+-]+:)/i, portPattern = /:[0-9]*$/, // Special case for a simple path URL simplePathPattern = /^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/, // RFC 2396: characters reserved for delimiting URLs. // We actually just auto-escape these. delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'], // RFC 2396: characters not allowed for various reasons. unwise = ['{', '}', '|', '\\', '^', '`'].concat(delims), // Allowed by RFCs, but cause of XSS attacks. Always escape these. autoEscape = ['\''].concat(unwise), // Characters that are never ever allowed in a hostname. // Note that any invalid chars are also handled, but these // are the ones that are *expected* to be seen, so we fast-path // them. nonHostChars = ['%', '/', '?', ';', '#'].concat(autoEscape), hostEndingChars = ['/', '?', '#'], hostnameMaxLen = 255, hostnamePartPattern = /^[+a-z0-9A-Z_-]{0,63}$/, hostnamePartStart = /^([+a-z0-9A-Z_-]{0,63})(.*)$/, // protocols that can allow "unsafe" and "unwise" chars. unsafeProtocol = { 'javascript': true, 'javascript:': true }, // protocols that never have a hostname. hostlessProtocol = { 'javascript': true, 'javascript:': true }, // protocols that always contain a // bit. slashedProtocol = { 'http': true, 'https': true, 'ftp': true, 'gopher': true, 'file': true, 'http:': true, 'https:': true, 'ftp:': true, 'gopher:': true, 'file:': true }, querystring = __webpack_require__(197); function urlParse(url, parseQueryString, slashesDenoteHost) { if (url && util.isObject(url) && url instanceof Url) return url; var u = new Url; u.parse(url, parseQueryString, slashesDenoteHost); return u; } Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { if (!util.isString(url)) { throw new TypeError("Parameter 'url' must be a string, not " + typeof url); } // Copy chrome, IE, opera backslash-handling behavior. // Back slashes before the query string get converted to forward slashes // See: https://code.google.com/p/chromium/issues/detail?id=25916 var queryIndex = url.indexOf('?'), splitter = (queryIndex !== -1 && queryIndex < url.indexOf('#')) ? '?' : '#', uSplit = url.split(splitter), slashRegex = /\\/g; uSplit[0] = uSplit[0].replace(slashRegex, '/'); url = uSplit.join(splitter); var rest = url; // trim before proceeding. // This is to support parse stuff like " http://foo.com \n" rest = rest.trim(); if (!slashesDenoteHost && url.split('#').length === 1) { // Try fast path regexp var simplePath = simplePathPattern.exec(rest); if (simplePath) { this.path = rest; this.href = rest; this.pathname = simplePath[1]; if (simplePath[2]) { this.search = simplePath[2]; if (parseQueryString) { this.query = querystring.parse(this.search.substr(1)); } else { this.query = this.search.substr(1); } } else if (parseQueryString) { this.search = ''; this.query = {}; } return this; } } var proto = protocolPattern.exec(rest); if (proto) { proto = proto[0]; var lowerProto = proto.toLowerCase(); this.protocol = lowerProto; rest = rest.substr(proto.length); } // figure out if it's got a host // user@server is *always* interpreted as a hostname, and url // resolution will treat //foo/bar as host=foo,path=bar because that's // how the browser resolves relative URLs. if (slashesDenoteHost || proto || rest.match(/^\/\/[^@\/]+@[^@\/]+/)) { var slashes = rest.substr(0, 2) === '//'; if (slashes && !(proto && hostlessProtocol[proto])) { rest = rest.substr(2); this.slashes = true; } } if (!hostlessProtocol[proto] && (slashes || (proto && !slashedProtocol[proto]))) { // there's a hostname. // the first instance of /, ?, ;, or # ends the host. // // If there is an @ in the hostname, then non-host chars *are* allowed // to the left of the last @ sign, unless some host-ending character // comes *before* the @-sign. // URLs are obnoxious. // // ex: // http://a@b@c/ => user:a@b host:c // http://a@b?@c => user:a host:c path:/?@c // v0.12 TODO(isaacs): This is not quite how Chrome does things. // Review our test case against browsers more comprehensively. // find the first instance of any hostEndingChars var hostEnd = -1; for (var i = 0; i < hostEndingChars.length; i++) { var hec = rest.indexOf(hostEndingChars[i]); if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; } // at this point, either we have an explicit point where the // auth portion cannot go past, or the last @ char is the decider. var auth, atSign; if (hostEnd === -1) { // atSign can be anywhere. atSign = rest.lastIndexOf('@'); } else { // atSign must be in auth portion. // http://a@b/c@d => host:b auth:a path:/c@d atSign = rest.lastIndexOf('@', hostEnd); } // Now we have a portion which is definitely the auth. // Pull that off. if (atSign !== -1) { auth = rest.slice(0, atSign); rest = rest.slice(atSign + 1); this.auth = decodeURIComponent(auth); } // the host is the remaining to the left of the first non-host char hostEnd = -1; for (var i = 0; i < nonHostChars.length; i++) { var hec = rest.indexOf(nonHostChars[i]); if (hec !== -1 && (hostEnd === -1 || hec < hostEnd)) hostEnd = hec; } // if we still have not hit it, then the entire thing is a host. if (hostEnd === -1) hostEnd = rest.length; this.host = rest.slice(0, hostEnd); rest = rest.slice(hostEnd); // pull out port. this.parseHost(); // we've indicated that there is a hostname, // so even if it's empty, it has to be present. this.hostname = this.hostname || ''; // if hostname begins with [ and ends with ] // assume that it's an IPv6 address. var ipv6Hostname = this.hostname[0] === '[' && this.hostname[this.hostname.length - 1] === ']'; // validate a little. if (!ipv6Hostname) { var hostparts = this.hostname.split(/\./); for (var i = 0, l = hostparts.length; i < l; i++) { var part = hostparts[i]; if (!part) continue; if (!part.match(hostnamePartPattern)) { var newpart = ''; for (var j = 0, k = part.length; j < k; j++) { if (part.charCodeAt(j) > 127) { // we replace non-ASCII char with a temporary placeholder // we need this to make sure size of hostname is not // broken by replacing non-ASCII by nothing newpart += 'x'; } else { newpart += part[j]; } } // we test again with ASCII char only if (!newpart.match(hostnamePartPattern)) { var validParts = hostparts.slice(0, i); var notHost = hostparts.slice(i + 1); var bit = part.match(hostnamePartStart); if (bit) { validParts.push(bit[1]); notHost.unshift(bit[2]); } if (notHost.length) { rest = '/' + notHost.join('.') + rest; } this.hostname = validParts.join('.'); break; } } } } if (this.hostname.length > hostnameMaxLen) { this.hostname = ''; } else { // hostnames are always lower case. this.hostname = this.hostname.toLowerCase(); } if (!ipv6Hostname) { // IDNA Support: Returns a punycoded representation of "domain". // It only converts parts of the domain name that // have non-ASCII characters, i.e. it doesn't matter if // you call it with a domain that already is ASCII-only. this.hostname = punycode.toASCII(this.hostname); } var p = this.port ? ':' + this.port : ''; var h = this.hostname || ''; this.host = h + p; this.href += this.host; // strip [ and ] from the hostname // the host field still retains them, though if (ipv6Hostname) { this.hostname = this.hostname.substr(1, this.hostname.length - 2); if (rest[0] !== '/') { rest = '/' + rest; } } } // now rest is set to the post-host stuff. // chop off any delim chars. if (!unsafeProtocol[lowerProto]) { // First, make 100% sure that any "autoEscape" chars get // escaped, even if encodeURIComponent doesn't think they // need to be. for (var i = 0, l = autoEscape.length; i < l; i++) { var ae = autoEscape[i]; if (rest.indexOf(ae) === -1) continue; var esc = encodeURIComponent(ae); if (esc === ae) { esc = escape(ae); } rest = rest.split(ae).join(esc); } } // chop off from the tail first. var hash = rest.indexOf('#'); if (hash !== -1) { // got a fragment string. this.hash = rest.substr(hash); rest = rest.slice(0, hash); } var qm = rest.indexOf('?'); if (qm !== -1) { this.search = rest.substr(qm); this.query = rest.substr(qm + 1); if (parseQueryString) { this.query = querystring.parse(this.query); } rest = rest.slice(0, qm); } else if (parseQueryString) { // no query string, but parseQueryString still requested this.search = ''; this.query = {}; } if (rest) this.pathname = rest; if (slashedProtocol[lowerProto] && this.hostname && !this.pathname) { this.pathname = '/'; } //to support http.request if (this.pathname || this.search) { var p = this.pathname || ''; var s = this.search || ''; this.path = p + s; } // finally, reconstruct the href based on what has been validated. this.href = this.format(); return this; }; // format a parsed object into a url string function urlFormat(obj) { // ensure it's an object, and not a string url. // If it's an obj, this is a no-op. // this way, you can call url_format() on strings // to clean up potentially wonky urls. if (util.isString(obj)) obj = urlParse(obj); if (!(obj instanceof Url)) return Url.prototype.format.call(obj); return obj.format(); } Url.prototype.format = function() { var auth = this.auth || ''; if (auth) { auth = encodeURIComponent(auth); auth = auth.replace(/%3A/i, ':'); auth += '@'; } var protocol = this.protocol || '', pathname = this.pathname || '', hash = this.hash || '', host = false, query = ''; if (this.host) { host = auth + this.host; } else if (this.hostname) { host = auth + (this.hostname.indexOf(':') === -1 ? this.hostname : '[' + this.hostname + ']'); if (this.port) { host += ':' + this.port; } } if (this.query && util.isObject(this.query) && Object.keys(this.query).length) { query = querystring.stringify(this.query); } var search = this.search || (query && ('?' + query)) || ''; if (protocol && protocol.substr(-1) !== ':') protocol += ':'; // only the slashedProtocols get the //. Not mailto:, xmpp:, etc. // unless they had them to begin with. if (this.slashes || (!protocol || slashedProtocol[protocol]) && host !== false) { host = '//' + (host || ''); if (pathname && pathname.charAt(0) !== '/') pathname = '/' + pathname; } else if (!host) { host = ''; } if (hash && hash.charAt(0) !== '#') hash = '#' + hash; if (search && search.charAt(0) !== '?') search = '?' + search; pathname = pathname.replace(/[?#]/g, function(match) { return encodeURIComponent(match); }); search = search.replace('#', '%23'); return protocol + host + pathname + search + hash; }; function urlResolve(source, relative) { return urlParse(source, false, true).resolve(relative); } Url.prototype.resolve = function(relative) { return this.resolveObject(urlParse(relative, false, true)).format(); }; function urlResolveObject(source, relative) { if (!source) return relative; return urlParse(source, false, true).resolveObject(relative); } Url.prototype.resolveObject = function(relative) { if (util.isString(relative)) { var rel = new Url(); rel.parse(relative, false, true); relative = rel; } var result = new Url(); var tkeys = Object.keys(this); for (var tk = 0; tk < tkeys.length; tk++) { var tkey = tkeys[tk]; result[tkey] = this[tkey]; } // hash is always overridden, no matter what. // even href="" will remove it. result.hash = relative.hash; // if the relative url is empty, then there's nothing left to do here. if (relative.href === '') { result.href = result.format(); return result; } // hrefs like //foo/bar always cut to the protocol. if (relative.slashes && !relative.protocol) { // take everything except the protocol from relative var rkeys = Object.keys(relative); for (var rk = 0; rk < rkeys.length; rk++) { var rkey = rkeys[rk]; if (rkey !== 'protocol') result[rkey] = relative[rkey]; } //urlParse appends trailing / to urls like http://www.example.com if (slashedProtocol[result.protocol] && result.hostname && !result.pathname) { result.path = result.pathname = '/'; } result.href = result.format(); return result; } if (relative.protocol && relative.protocol !== result.protocol) { // if it's a known url protocol, then changing // the protocol does weird things // first, if it's not file:, then we MUST have a host, // and if there was a path // to begin with, then we MUST have a path. // if it is file:, then the host is dropped, // because that's known to be hostless. // anything else is assumed to be absolute. if (!slashedProtocol[relative.protocol]) { var keys = Object.keys(relative); for (var v = 0; v < keys.length; v++) { var k = keys[v]; result[k] = relative[k]; } result.href = result.format(); return result; } result.protocol = relative.protocol; if (!relative.host && !hostlessProtocol[relative.protocol]) { var relPath = (relative.pathname || '').split('/'); while (relPath.length && !(relative.host = relPath.shift())); if (!relative.host) relative.host = ''; if (!relative.hostname) relative.hostname = ''; if (relPath[0] !== '') relPath.unshift(''); if (relPath.length < 2) relPath.unshift(''); result.pathname = relPath.join('/'); } else { result.pathname = relative.pathname; } result.search = relative.search; result.query = relative.query; result.host = relative.host || ''; result.auth = relative.auth; result.hostname = relative.hostname || relative.host; result.port = relative.port; // to support http.request if (result.pathname || result.search) { var p = result.pathname || ''; var s = result.search || ''; result.path = p + s; } result.slashes = result.slashes || relative.slashes; result.href = result.format(); return result; } var isSourceAbs = (result.pathname && result.pathname.charAt(0) === '/'), isRelAbs = ( relative.host || relative.pathname && relative.pathname.charAt(0) === '/' ), mustEndAbs = (isRelAbs || isSourceAbs || (result.host && relative.pathname)), removeAllDots = mustEndAbs, srcPath = result.pathname && result.pathname.split('/') || [], relPath = relative.pathname && relative.pathname.split('/') || [], psychotic = result.protocol && !slashedProtocol[result.protocol]; // if the url is a non-slashed url, then relative // links like ../.. should be able // to crawl up to the hostname, as well. This is strange. // result.protocol has already been set by now. // Later on, put the first path part into the host field. if (psychotic) { result.hostname = ''; result.port = null; if (result.host) { if (srcPath[0] === '') srcPath[0] = result.host; else srcPath.unshift(result.host); } result.host = ''; if (relative.protocol) { relative.hostname = null; relative.port = null; if (relative.host) { if (relPath[0] === '') relPath[0] = relative.host; else relPath.unshift(relative.host); } relative.host = null; } mustEndAbs = mustEndAbs && (relPath[0] === '' || srcPath[0] === ''); } if (isRelAbs) { // it's absolute. result.host = (relative.host || relative.host === '') ? relative.host : result.host; result.hostname = (relative.hostname || relative.hostname === '') ? relative.hostname : result.hostname; result.search = relative.search; result.query = relative.query; srcPath = relPath; // fall through to the dot-handling below. } else if (relPath.length) { // it's relative // throw away the existing file, and take the new path instead. if (!srcPath) srcPath = []; srcPath.pop(); srcPath = srcPath.concat(relPath); result.search = relative.search; result.query = relative.query; } else if (!util.isNullOrUndefined(relative.search)) { // just pull out the search. // like href='?foo'. // Put this after the other two cases because it simplifies the booleans if (psychotic) { result.hostname = result.host = srcPath.shift(); //occationaly the auth can get stuck only in host //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; if (authInHost) { result.auth = authInHost.shift(); result.host = result.hostname = authInHost.shift(); } } result.search = relative.search; result.query = relative.query; //to support http.request if (!util.isNull(result.pathname) || !util.isNull(result.search)) { result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); } result.href = result.format(); return result; } if (!srcPath.length) { // no path at all. easy. // we've already handled the other stuff above. result.pathname = null; //to support http.request if (result.search) { result.path = '/' + result.search; } else { result.path = null; } result.href = result.format(); return result; } // if a url ENDs in . or .., then it must get a trailing slash. // however, if it ends in anything else non-slashy, // then it must NOT get a trailing slash. var last = srcPath.slice(-1)[0]; var hasTrailingSlash = ( (result.host || relative.host || srcPath.length > 1) && (last === '.' || last === '..') || last === ''); // strip single dots, resolve double dots to parent dir // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = srcPath.length; i >= 0; i--) { last = srcPath[i]; if (last === '.') { srcPath.splice(i, 1); } else if (last === '..') { srcPath.splice(i, 1); up++; } else if (up) { srcPath.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (!mustEndAbs && !removeAllDots) { for (; up--; up) { srcPath.unshift('..'); } } if (mustEndAbs && srcPath[0] !== '' && (!srcPath[0] || srcPath[0].charAt(0) !== '/')) { srcPath.unshift(''); } if (hasTrailingSlash && (srcPath.join('/').substr(-1) !== '/')) { srcPath.push(''); } var isAbsolute = srcPath[0] === '' || (srcPath[0] && srcPath[0].charAt(0) === '/'); // put the host back if (psychotic) { result.hostname = result.host = isAbsolute ? '' : srcPath.length ? srcPath.shift() : ''; //occationaly the auth can get stuck only in host //this especially happens in cases like //url.resolveObject('mailto:local1@domain1', 'local2@domain2') var authInHost = result.host && result.host.indexOf('@') > 0 ? result.host.split('@') : false; if (authInHost) { result.auth = authInHost.shift(); result.host = result.hostname = authInHost.shift(); } } mustEndAbs = mustEndAbs || (result.host && srcPath.length); if (mustEndAbs && !isAbsolute) { srcPath.unshift(''); } if (!srcPath.length) { result.pathname = null; result.path = null; } else { result.pathname = srcPath.join('/'); } //to support request.http if (!util.isNull(result.pathname) || !util.isNull(result.search)) { result.path = (result.pathname ? result.pathname : '') + (result.search ? result.search : ''); } result.auth = relative.auth || result.auth; result.slashes = result.slashes || relative.slashes; result.href = result.format(); return result; }; Url.prototype.parseHost = function() { var host = this.host; var port = portPattern.exec(host); if (port) { port = port[0]; if (port !== ':') { this.port = port.substr(1); } host = host.substr(0, host.length - port.length); } if (host) this.hostname = host; }; /***/ }), /* 12 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.collapseIcon = exports.svgIcon = void 0; var _jsxRuntime = __webpack_require__(3); // Spinner based on https://codepen.io/aurer/pen/jEGbA const spinner = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Spinner", "data-name": "Spinner", version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "100%", height: "100%", viewBox: "0 0 50 50", style: style, className: "svg-icon svg-icon-spinner", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fill: "#000", d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z" }) }); const search = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { id: "Search", "data-name": "Search", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024", width: "17", height: "17", style: style, className: "svg-icon svg-icon-search", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.16,96H17.84C7.99,96,0,88.01,0,78.16V17.84C0,7.99,7.99,0,17.84,0h988.32c9.85,0,17.84,7.99,17.84,17.84 v60.32C1024,88.01,1016.01,96,1006.16,96z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.16,1024H17.84C7.99,1024,0,1016.01,0,1006.16v-60.32C0,935.99,7.99,928,17.84,928h988.32 c9.85,0,17.84,7.99,17.84,17.84v60.32C1024,1016.01,1016.01,1024,1006.16,1024z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.16,560H17.84C7.99,560,0,552.01,0,542.16v-60.32C0,471.99,7.99,464,17.84,464h988.32 c9.85,0,17.84,7.99,17.84,17.84v60.32C1024,552.01,1016.01,560,1006.16,560z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.16,328H17.84C7.99,328,0,320.01,0,310.16v-60.32C0,239.99,7.99,232,17.84,232h988.32 c9.85,0,17.84,7.99,17.84,17.84v60.32C1024,320.01,1016.01,328,1006.16,328z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.16,792H17.84C7.99,792,0,784.01,0,774.16v-60.32C0,703.99,7.99,696,17.84,696h988.32 c9.85,0,17.84,7.99,17.84,17.84v60.32C1024,784.01,1016.01,792,1006.16,792z" })] }); const matrix = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { id: "Matrix", xmlns: "http://www.w3.org/2000/svg", width: "17", height: "17", viewBox: "0 0 1024 1024", cstyle: style, className: "svg-icon svg-icon-matrix", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.16,1024H849.84c-9.85,0-17.84-7.99-17.84-17.84V849.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C1024,1016.01,1016.01,1024,1006.16,1024z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.16,756H849.84c-9.85,0-17.84-7.99-17.84-17.84V581.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C1024,748.01,1016.01,756,1006.16,756z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.16,488H849.84c-9.85,0-17.84-7.99-17.84-17.84V313.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C1024,480.01,1016.01,488,1006.16,488z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M1006.56,220H849.44c-9.85,0-17.84-7.99-17.84-17.84V17.84C831.6,7.99,839.58,0,849.44,0h157.13 c9.85,0,17.84,7.99,17.84,17.84v184.32C1024.4,212.01,1016.42,220,1006.56,220z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M738.16,1024H581.84c-9.85,0-17.84-7.99-17.84-17.84V849.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C756,1016.01,748.01,1024,738.16,1024z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M738.16,756H581.84c-9.85,0-17.84-7.99-17.84-17.84V581.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C756,748.01,748.01,756,738.16,756z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M738.16,488H581.84c-9.85,0-17.84-7.99-17.84-17.84V313.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C756,480.01,748.01,488,738.16,488z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M738.56,220H581.44c-9.85,0-17.84-7.99-17.84-17.84V17.84C563.6,7.99,571.58,0,581.44,0h157.13 c9.85,0,17.84,7.99,17.84,17.84v184.32C756.4,212.01,748.42,220,738.56,220z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M470.16,1024H313.84c-9.85,0-17.84-7.99-17.84-17.84V849.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C488,1016.01,480.01,1024,470.16,1024z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M470.16,756H313.84c-9.85,0-17.84-7.99-17.84-17.84V581.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C488,748.01,480.01,756,470.16,756z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M470.16,488H313.84c-9.85,0-17.84-7.99-17.84-17.84V313.84c0-9.85,7.99-17.84,17.84-17.84h156.32 c9.85,0,17.84,7.99,17.84,17.84v156.32C488,480.01,480.01,488,470.16,488z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M470.56,220H313.44c-9.85,0-17.84-7.99-17.84-17.84V17.84C295.6,7.99,303.58,0,313.44,0h157.13 c9.85,0,17.84,7.99,17.84,17.84v184.32C488.4,212.01,480.42,220,470.56,220z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M219.98,313.44v157.13c0,9.85-7.99,17.84-17.84,17.84H17.82c-9.85,0-17.84-7.99-17.84-17.84V313.44 c0-9.85,7.99-17.84,17.84-17.84h184.32C211.99,295.6,219.98,303.58,219.98,313.44z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M219.98,581.44v157.13c0,9.85-7.99,17.84-17.84,17.84H17.82c-9.85,0-17.84-7.99-17.84-17.84V581.44 c0-9.85,7.99-17.84,17.84-17.84h184.32C211.99,563.6,219.98,571.58,219.98,581.44z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M219.98,849.44v157.13c0,9.85-7.99,17.84-17.84,17.84H17.82c-9.85,0-17.84-7.99-17.84-17.84V849.44 c0-9.85,7.99-17.84,17.84-17.84h184.32C211.99,831.6,219.98,839.58,219.98,849.44z" })] }); const table = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Table", xmlns: "http://www.w3.org/2000/svg", width: "17", height: "17", viewBox: "0 0 1024 1024", style: style, className: "svg-icon svg-icon-table", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M0,0v1024h1024V0H0z M46.42,220.82H488v152.68H46.42V220.82z M46.42,421.49H488v152.89H46.42V421.49z M46.42,622.39H488v152.89H46.42V622.39z M46.42,823.28H488v154.3H46.42V823.28z M977.58,977.58H536v-154.3h441.58V977.58z M977.58,775.28H536V622.39h441.58V775.28z M977.58,574.39H536V421.49h441.58V574.39z M977.58,373.49H536V220.82h441.58V373.49z" }) }); const largeArrow = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Large arrow", "data-name": "Large arrow", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 49 17", style: style, className: "svg-icon svg-icon-large-arrow", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "39.98,0 38.56,1.52 44.95,7.46 -0.02,7.46 -0.02,9.54 44.95,9.54 38.56,15.48 39.98,17 49.12,8.5 " }) }); const genomeBrowser = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { version: "1.1", "data-name": "Genome browser", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1000 1000", style: style, className: "svg-icon svg-icon-genome-browser", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "500.06,232.95 0.11,1000 1000,1000" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", { x: "267", width: "466", height: "153.41" })] }); const cellGroup = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "download", className: "svg-inline--fa fa-download fa-w-16", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 30 30", style: style, children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("ellipse", { cx: "2", cy: "2", rx: "12", ry: "9", className: "js-cell" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ellipse", { cx: "2", cy: "2", rx: "6.5", ry: "6", className: "js-cell" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ellipse", { cx: "-5", cy: "10", rx: "12", ry: "9", className: "js-cell" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ellipse", { cx: "-5", cy: "10", rx: "6.5", ry: "5", className: "js-cell" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ellipse", { cx: "10", cy: "10", rx: "12", ry: "9", className: "js-cell" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ellipse", { cx: "10", cy: "10", rx: "6.5", ry: "5", className: "js-cell" })] }); const expandArrows = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { className: "expand-arrows", width: "1em", height: "1em", viewBox: "0 0 16 16", style: style, fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fillRule: "evenodd", d: "M1.464 10.536a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3.5a.5.5 0 0 1-.5-.5v-3.5a.5.5 0 0 1 .5-.5z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fillRule: "evenodd", d: "M5.964 10a.5.5 0 0 1 0 .707l-4.146 4.147a.5.5 0 0 1-.707-.708L5.257 10a.5.5 0 0 1 .707 0zm8.854-8.854a.5.5 0 0 1 0 .708L10.672 6a.5.5 0 0 1-.708-.707l4.147-4.147a.5.5 0 0 1 .707 0z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fillRule: "evenodd", d: "M10.5 1.5A.5.5 0 0 1 11 1h3.5a.5.5 0 0 1 .5.5V5a.5.5 0 0 1-1 0V2h-3a.5.5 0 0 1-.5-.5zm4 9a.5.5 0 0 0-.5.5v3h-3a.5.5 0 0 0 0 1h3.5a.5.5 0 0 0 .5-.5V11a.5.5 0 0 0-.5-.5z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fillRule: "evenodd", d: "M10 9.964a.5.5 0 0 0 0 .708l4.146 4.146a.5.5 0 0 0 .708-.707l-4.147-4.147a.5.5 0 0 0-.707 0zM1.182 1.146a.5.5 0 0 0 0 .708L5.328 6a.5.5 0 0 0 .708-.707L1.889 1.146a.5.5 0 0 0-.707 0z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fillRule: "evenodd", d: "M5.5 1.5A.5.5 0 0 0 5 1H1.5a.5.5 0 0 0-.5.5V5a.5.5 0 0 0 1 0V2h3a.5.5 0 0 0 .5-.5z" })] }); const collapseArrows = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { className: "collapse-arrows", width: "1em", height: "1em", viewBox: "0 0 16 16", style: style, fill: "currentColor", xmlns: "http://www.w3.org/2000/svg", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fillRule: "evenodd", d: "M9.5 2.036a.5.5 0 0 1 .5.5v3.5h3.5a.5.5 0 0 1 0 1h-4a.5.5 0 0 1-.5-.5v-4a.5.5 0 0 1 .5-.5z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fillRule: "evenodd", d: "M14.354 1.646a.5.5 0 0 1 0 .708l-4.5 4.5a.5.5 0 1 1-.708-.708l4.5-4.5a.5.5 0 0 1 .708 0zm-7.5 7.5a.5.5 0 0 1 0 .708l-4.5 4.5a.5.5 0 0 1-.708-.708l4.5-4.5a.5.5 0 0 1 .708 0z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fillRule: "evenodd", d: "M2.036 9.5a.5.5 0 0 1 .5-.5h4a.5.5 0 0 1 .5.5v4a.5.5 0 0 1-1 0V10h-3.5a.5.5 0 0 1-.5-.5z" })] }); const lockOpen = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", "data-name": "Lock open", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 249 249", style: style, className: "svg-icon svg-icon-lock-open", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M180.7,3.5c-30.2,0-54.77,24.57-54.77,54.77v57.41h-95.9c-8.8,0-16,7.2-16,16V229c0,8.8,7.2,16,16,16h116.27 c8.8,0,16-7.2,16-16v-97.32c0-8.8-7.2-16-16-16h-3.37V58.27c0-20.82,16.94-37.77,37.77-37.77s37.77,16.94,37.77,37.77v40.18 c0,4.69,3.81,8.5,8.5,8.5s8.5-3.81,8.5-8.5V58.27C235.47,28.07,210.9,3.5,180.7,3.5z" }) }); const lockClosed = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", "data-name": "Lock closed", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 249 249", style: style, className: "svg-icon svg-icon-lock-open", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M182.89,115.15h-3.37V82.74c0-30.2-24.57-54.77-54.77-54.77c-30.2,0-54.77,24.57-54.77,54.77v32.41h-3.37 c-8.8,0-16,7.2-16,16v97.32c0,8.8,7.2,16,16,16h116.27c8.8,0,16-7.2,16-16v-97.32C198.89,122.35,191.69,115.15,182.89,115.15z M86.98,82.74c0-20.82,16.94-37.77,37.77-37.77s37.77,16.94,37.77,37.77v32.41H86.98V82.74z" }) }); const chevronLeft = () => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "7.359", height: "12", viewBox: "0 0 7.281 12", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M0.192,5.534l5.341-5.341c0.258-0.258,0.676-0.258,0.931,0l0.624,0.624c0.258,0.258,0.258,0.673,0,0.931l-4.231,4.25 l4.231,4.253c0.255,0.258,0.255,0.673,0,0.931l-0.624,0.624c-0.258,0.258-0.676,0.258-0.931,0L0.192,6.466 C-0.064,6.207-0.064,5.79,0.192,5.534z" }) }); const chevronRight = () => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", width: "7.359", height: "12", viewBox: "0 0 7.359 12", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M7.165,6.466l-5.341,5.341c-0.258,0.258-0.676,0.258-0.931,0L0.27,11.183c-0.258-0.258-0.258-0.673,0-0.931L4.5,6.001 L0.27,1.749c-0.255-0.258-0.255-0.673,0-0.931l0.624-0.624c0.258-0.258,0.676-0.258,0.931,0l5.341,5.341 C7.423,5.79,7.423,6.207,7.165,6.466z" }) }); const clipboard = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 249 249", style: style, className: "svg-icon svg-icon-clipboard", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M164,24.5h26.54c6.31,0,11.46,5.05,11.46,11.23v190.05c0,6.17-5.16,11.23-11.46,11.23H57.46 C51.16,237,46,231.95,46,225.77V35.73c0-6.17,5.16-11.23,11.46-11.23H84" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("rect", { x: "84", y: "11", width: "80", height: "46" })] }); const checkbox = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: style, className: "svg-icon svg-icon-checkbox", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z" }) }); const dataset = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 500", style: style, className: "svg-icon svg-icon-archive", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "354.26,235.5 314.26,235.5 314.26,277.69 185.74,277.69 185.74,235.5 145.74,235.5 145.74,317.69 354.26,317.69" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M500.5,37.5h-501v148h38v278h425v-278h38V37.5z M39.5,77.5h421v68h-421V77.5z M422.5,423.5h-345v-238h345V423.5z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "354.26,317.69 145.74,317.69 145.74,235.5 185.74,235.5 185.74,277.69 314.26,277.69 314.26,235.5 354.26,235.5" })] }); const file = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 500", style: style, className: "svg-icon svg-icon-file", children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("g", { children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M156.73,187.92c-28.12,0-44.92-18.83-44.92-50.31v-16.64c0-31.48,16.8-50.31,44.92-50.31s44.92,18.83,44.92,50.31v16.64 C201.65,169.09,184.85,187.92,156.73,187.92z M172.51,137.29v-16.02c0-18.44-4.92-26.88-15.78-26.88s-15.78,8.44-15.78,26.88v16.02 c0,18.44,4.92,26.88,15.78,26.88S172.51,155.73,172.51,137.29z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M211.28,185.65v-22.27h28.12V98.77h-1.48l-26.64,18.36V92.45l28.12-19.53h27.89v90.47h26.72v22.27H211.28z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M343.43,187.92c-28.12,0-44.92-18.83-44.92-50.31v-16.64c0-31.48,16.8-50.31,44.92-50.31s44.92,18.83,44.92,50.31v16.64 C388.36,169.09,371.56,187.92,343.43,187.92z M359.22,137.29v-16.02c0-18.44-4.92-26.88-15.78-26.88s-15.78,8.44-15.78,26.88v16.02 c0,18.44,4.92,26.88,15.78,26.88S359.22,155.73,359.22,137.29z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M118.68,325.65v-22.27h28.12v-64.61h-1.48l-26.64,18.36v-24.69l28.12-19.53h27.89v90.47h26.72v22.27H118.68z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M211.2,325.65v-22.27h28.12v-64.61h-1.48l-26.64,18.36v-24.69l28.12-19.53h27.89v90.47h26.72v22.27H211.2z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M343.35,327.92c-28.12,0-44.92-18.83-44.92-50.31v-16.64c0-31.48,16.8-50.31,44.92-50.31s44.92,18.83,44.92,50.31v16.64 C388.28,309.09,371.48,327.92,343.35,327.92z M359.14,277.29v-16.02c0-18.44-4.92-26.88-15.78-26.88s-15.78,8.44-15.78,26.88v16.02 c0,18.44,4.92,26.88,15.78,26.88S359.14,295.73,359.14,277.29z" })] }), /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M0,0v500h349h40.98H390v-0.02L499.98,390H500v-0.02V350V0H0z M40,40h420v310H350v110H40V40z M390,443.41V390h53.41 L390,443.41z" })] }); const download = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "fas", "data-icon": "download", className: "svg-inline--fa fa-download fa-w-16", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: style, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { fill: "currentColor", d: "M216 0h80c13.3 0 24 10.7 24 24v168h87.7c17.8 0 26.7 21.5 14.1 34.1L269.7 378.3c-7.5 7.5-19.8 7.5-27.3 0L90.1 226.1c-12.6-12.6-3.7-34.1 14.1-34.1H192V24c0-13.3 10.7-24 24-24zm296 376v112c0 13.3-10.7 24-24 24H24c-13.3 0-24-10.7-24-24V376c0-13.3 10.7-24 24-24h146.7l49 49c20.1 20.1 52.5 20.1 72.6 0l49-49H488c13.3 0 24 10.7 24 24zm-124 88c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20zm64 0c0-11-9-20-20-20s-20 9-20 20 9 20 20 20 20-9 20-20z" }) }); const venus = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024", style: style, className: "svg-icon svg-icon-venus", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M818.38,332.69c0-168.94-137.44-306.38-306.38-306.38S205.62,163.75,205.62,332.69 c0,156.06,117.32,285.15,268.38,303.93v130.69H314.88v71.25H474v159.12h71.25V838.56h159.12v-71.25H545.25V637.23 C698.6,620.6,818.38,490.39,818.38,332.69z M286.38,332.69c0-124.41,101.22-225.62,225.62-225.62s225.62,101.22,225.62,225.62 S636.41,558.31,512,558.31S286.38,457.1,286.38,332.69z" }) }); const mars = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 1024 1024", style: style, className: "svg-icon svg-icon-mars", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M628.38,136.75v80.75H749.4L629.19,337.71c-51.63-39.6-116.13-63.21-186.07-63.21 c-168.94,0-306.38,137.44-306.38,306.38s137.44,306.38,306.38,306.38S749.5,749.81,749.5,580.88c0-69.94-23.61-134.44-63.21-186.07 L806.5,274.6v121.03h80.75V136.75H628.38z M443.12,806.5c-124.41,0-225.62-101.22-225.62-225.62s101.22-225.62,225.62-225.62 s225.62,101.22,225.62,225.62S567.53,806.5,443.12,806.5z" }) }); const edit = style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 250 250", style: style, className: "svg-icon svg-icon-edit", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M78.7,160c-1.7,5.7,3.6,11,9.3,9.3l45.8-13.3l86.4-86.4l-41.8-41.8L92,114.2L78.7,160z M204.7,1.5l-13.3,13.3l41.8,41.8 l13.3-13.3c5.3-5.3,5.3-13.9,0-19.2L223.9,1.5C218.6-3.8,210-3.8,204.7,1.5z" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "171.7,164.1 171.7,223.8 26.4,223.8 26.4,78.5 86,78.5 112,52.5 0.4,52.5 0.4,249.8 197.7,249.8 197.7,138.1" })] }); const magnifyingGlass = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: style, className: "svg-icon svg-icon-magnifying-glass", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M505,442.7L405.3,343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3,44-79.7,44-128C416,93.1,322.9,0,208,0S0,93.1,0,208 s93.1,208,208,208c48.3,0,92.7-16.4,128-44v16.3c0,6.4,2.5,12.5,7,17l99.7,99.7c9.4,9.4,24.6,9.4,33.9,0l28.3-28.3 C514.3,467.3,514.3,452.1,505,442.7z M208,336c-70.7,0-128-57.2-128-128c0-70.7,57.2-128,128-128c70.7,0,128,57.2,128,128 C336,278.7,278.8,336,208,336z" }) }); const questionCircle = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: style, className: "svg-icon svg-icon-question-circle", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M504,256c0,137-111,248-248,248S8,393,8,256C8,119.1,119,8,256,8S504,119.1,504,256z M262.7,90c-54.5,0-89.3,23-116.5,63.8 c-3.5,5.3-2.4,12.4,2.7,16.3l34.7,26.3c5.2,3.9,12.6,3,16.7-2.1c17.9-22.7,30.1-35.8,57.3-35.8c20.4,0,45.7,13.1,45.7,33 c0,15-12.4,22.7-32.5,34C247.1,238.5,216,254.9,216,296v4c0,6.6,5.4,12,12,12h56c6.6,0,12-5.4,12-12v-1.3 c0-28.5,83.2-29.6,83.2-106.7C379.2,134,319,90,262.7,90z M256,338c-25.4,0-46,20.6-46,46c0,25.4,20.6,46,46,46s46-20.6,46-46 C302,358.6,281.4,338,256,338z" }) }); const user = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", style: style, className: "svg-icon svg-icon-user", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M224,256c70.7,0,128-57.3,128-128S294.7,0,224,0S96,57.3,96,128S153.3,256,224,256z M134.4,288C85,297,0,348.2,0,422.4V464 c0,26.5,0,48,48,48h352c48,0,48-21.5,48-48v-41.6c0-74.2-92.8-125.4-134.4-134.4S183.8,279,134.4,288z" }) }); const twitter = style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", style: style, className: "svg-icon svg-icon-twitter", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M24,4.6c-0.9,0.4-1.8,0.7-2.8,0.8c1-0.6,1.8-1.6,2.2-2.7c-1,0.6-2,1-3.1,1.2c-0.9-1-2.2-1.6-3.6-1.6c-3.2,0-5.5,3-4.8,6 C7.7,8.1,4.1,6.1,1.7,3.1C0.4,5.4,1,8.3,3.2,9.7C2.4,9.7,1.6,9.5,1,9.1c-0.1,2.3,1.6,4.4,3.9,4.9c-0.7,0.2-1.5,0.2-2.2,0.1 c0.6,2,2.4,3.4,4.6,3.4c-2.1,1.6-4.7,2.3-7.3,2c2.2,1.4,4.8,2.2,7.5,2.2c9.1,0,14.3-7.7,14-14.6C22.5,6.4,23.3,5.5,24,4.6z" }) }); const icons = { disclosure: style => /*#__PURE__*/(0, _jsxRuntime.jsxs)("svg", { id: "Disclosure", "data-name": "Disclosure", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 480 480", style: style, className: "svg-icon svg-icon-disclosure", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("circle", { cx: "240", cy: "240", r: "240" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("polyline", { points: "401.79 175.66 240 304.34 78.21 175.66" })] }), table, matrix, search, orientV: style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Orient Vertically", "data-name": "Orient Vertically", xmlns: "http://www.w3.org/2000/svg", width: "29", height: "17", viewBox: "0 0 360 220", style: style, className: "svg-icon svg-icon-orient-v", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M326,0H230a18.05,18.05,0,0,0-18,18V44a18.06,18.06,0,0,0,18,18h38.41l-41,67.18-9.69-5.92L216.91,158l30.47-16.61-9.69-5.91L282.51,62H326a18,18,0,0,0,18-18V18A18,18,0,0,0,326,0Zm6,44a6,6,0,0,1-6,6H230a6,6,0,0,1-6-6V18a6,6,0,0,1,6-6h96a6,6,0,0,1,6,6V44ZM228,158H132a18,18,0,0,0-18,18v26a18,18,0,0,0,18,18h96a18,18,0,0,0,18-18V176A18,18,0,0,0,228,158Zm6,44a6,6,0,0,1-6,6H132a6,6,0,0,1-6-6V176a6,6,0,0,1,6-6h96a6,6,0,0,1,6,6v26Zm-90.91-44.05-0.84-34.69-9.69,5.92L91.55,62H130a18.06,18.06,0,0,0,18-18V18A18.05,18.05,0,0,0,130,0H34A18,18,0,0,0,16,18V44A18,18,0,0,0,34,62H77.49l44.82,73.43-9.69,5.91ZM136,44a6,6,0,0,1-6,6H34a6,6,0,0,1-6-6V18a6,6,0,0,1,6-6h96a6,6,0,0,1,6,6V44Z" }) }), orientH: style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Orient Horizontally", "data-name": "Orient Horizontally", xmlns: "http://www.w3.org/2000/svg", width: "29", height: "17", viewBox: "0 0 360 220", style: style, className: "svg-icon svg-icon-orient-v", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M342,79H246a18,18,0,0,0-17.34,13.23L209.38,64.55l-4.83,10.28L132,40.8V31.33A18.3,18.3,0,0,0,114,13H18A18.32,18.32,0,0,0,0,31.33v26A17.75,17.75,0,0,0,18,75h96a17.72,17.72,0,0,0,18-17.67V54.06l67.45,31.63L194.64,96l33.8-2.88A18,18,0,0,0,228,97v26a17.91,17.91,0,0,0,.58,4.47l-33.94-2.9,4.81,10.28L132,166.48v-3.82A17.73,17.73,0,0,0,114,145H18A17.75,17.75,0,0,0,0,162.67v26A18.32,18.32,0,0,0,18,207h96a18.3,18.3,0,0,0,18-18.33v-8.93l72.55-34L209.37,156l19.39-27.82A18,18,0,0,0,246,141h96a18,18,0,0,0,18-18V97A18,18,0,0,0,342,79ZM120,57a6,6,0,0,1-6,6H18a6,6,0,0,1-6-6V31a6,6,0,0,1,6-6h96a6,6,0,0,1,6,6V57Zm0,132a6,6,0,0,1-6,6H18a6,6,0,0,1-6-6V163a6,6,0,0,1,6-6h96a6,6,0,0,1,6,6v26Zm228-66a6,6,0,0,1-6,6H246a6,6,0,0,1-6-6V97a6,6,0,0,1,6-6h96a6,6,0,0,1,6,6v26Z" }) }), cart: style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Cart", "data-name": "Cart", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", style: style, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("path", { d: "M12,12.23H6.5a1.5,1.5,0,0,0,.11.13,1.48,1.48,0,0,1,.31.79,1.42,1.42,0,0,1-.3,1,1.46,1.46,0,0,1-2.23.12,1.31,1.31,0,0,1-.4-.8,1.46,1.46,0,0,1,.33-1.17,1.43,1.43,0,0,1,.35-.3s0,0,0-.08c-.18-.88-.37-1.77-.55-2.65s-.29-1.45-.44-2.18-.33-1.61-.5-2.41C3.11,4.14,3,3.58,2.88,3c0-.06,0-.08-.1-.08H1.05a.69.69,0,0,1-.4-.11.65.65,0,0,1-.27-.51V1.85a.64.64,0,0,1,.54-.6h.19c.84,0,1.68,0,2.51,0a.68.68,0,0,1,.75.62c.06.33.13.67.2,1,0,.06,0,.07.09.07H14.91a.64.64,0,0,1,.66.78c-.17.76-.34,1.52-.52,2.28s-.37,1.63-.55,2.44l-.18.79a.64.64,0,0,1-.6.47H6.05c-.08,0-.08,0-.07.08,0,.23.1.46.14.69a.09.09,0,0,0,.11.08h7a.65.65,0,0,1,.44.15.62.62,0,0,1,.21.65c0,.19-.08.38-.13.57,0,0,0,.06,0,.07A1.43,1.43,0,0,1,14.51,13a1.37,1.37,0,0,1-.32,1.18,1.39,1.39,0,0,1-.81.5,1.45,1.45,0,0,1-1.25-.29,1.46,1.46,0,0,1-.54-.94,1.44,1.44,0,0,1,.33-1.16Z" }) }), asterisk: style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Asterisk", "data-name": "Asterisk", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", style: style, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "15.68 5.3 14.18 2.7 8.94 6.38 9.5 0 6.5 0 7.06 6.38 1.82 2.7 0.32 5.3 6.13 8 0.32 10.7 1.82 13.3 7.06 9.62 6.5 16 9.5 16 8.94 9.62 14.18 13.3 15.68 10.7 9.87 8 15.68 5.3" }) }), chevronDown: style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Chevron Down", "data-name": "Chevron Down", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 249 124", className: "svg-icon svg-icon-chevron-down", style: style, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "249,57 124.5,124 0,57 0,0 124.5,67 249,0" }) }), chevronUp: style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { id: "Chevron Up", "data-name": "Chevron Up", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 249 124", className: "svg-icon svg-icon-chevron-up", style: style, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "249,67 124.5,0 0,67 0,124 124.5,57 249,124" }) }), circle: style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 500", style: style, className: "svg-icon svg-icon-circle", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", { cx: "250", cy: "250", r: "250" }) }), multiplication: style => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 500", style: style, className: "svg-icon svg-icon-multiplication", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("polygon", { points: "500,99 401,0 250,151.01 99,0 0,99 151.01,250 0,401 99,500 250,348.99 401,500 500,401 348.99,250" }) }), chevronLeft, chevronRight, spinner, largeArrow, genomeBrowser, collapseArrows, expandArrows, lockOpen, lockClosed, clipboard, checkbox, dataset, file, download, cellGroup, venus, mars, edit, magnifyingGlass, questionCircle, user, twitter }; /** * Render an SVG icon specified by `icon` which must match a property of the `icons` variable above. * Can optionally add css styles as a React style object to the SVG element. * @param {string} icon Specifies which icon to show; property of `icons` * @param {object} style React CSS styles (not classes) to add to svg */ const svgIcon = (icon, style) => icons[icon](style); /** * Render the icon used to collapse a panel from the title bar. * @param {boolean} collapsed - True if the icon should be rendered for the collapsed state * @param {string} addClasses - CSS classes to add to icon element */ exports.svgIcon = svgIcon; const collapseIcon = (collapsed, addClasses) => /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", { className: "collapsing-title-control".concat(addClasses ? " ".concat(addClasses) : ''), "data-name": "Collapse Icon", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: collapsed ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", { children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("title", { children: "Panel collapsed" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", { className: "bg", cx: "256", cy: "256", r: "240" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", { className: "content-line", x1: "151.87", y1: "256", x2: "360.13", y2: "256" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", { className: "content-line", x1: "256", y1: "151.87", x2: "256", y2: "360.13" })] }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("g", { children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("title", { children: "Panel open" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("circle", { className: "bg", cx: "256", cy: "256", r: "240" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("line", { className: "content-line", x1: "151.87", y1: "256", x2: "360.13", y2: "256" })] }) }); exports.collapseIcon = collapseIcon; /***/ }), /* 13 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _interopRequireDefault = __webpack_require__(2); Object.defineProperty(exports, "__esModule", { value: true }); exports.shadeOverflowOnScroll = shadeOverflowOnScroll; exports.singleTreatment = singleTreatment; exports.treatmentTypeDisplay = treatmentTypeDisplay; exports.treatmentDisplay = treatmentDisplay; exports.requestSearch = requestSearch; exports.requestFiles = requestFiles; exports.donorDiversity = donorDiversity; exports.publicDataset = publicDataset; exports.PanelLookup = PanelLookup; exports.computeAssemblyAnnotationValue = computeAssemblyAnnotationValue; exports.filterForVisualizableFiles = filterForVisualizableFiles; exports.computeExaminedLoci = computeExaminedLoci; exports.TextAreaCounter = exports.collectDatasetBiosamples = exports.Checkbox = exports.CopyButton = exports.TableItemCount = exports.filterForReleasedAnalyses = exports.filterForDatasetFiles = exports.filterForDefaultFiles = exports.isFileVisualizable = exports.TopAccessories = exports.ItemAccessories = exports.DocTypeTitle = exports.InternalTags = exports.MatrixBadges = exports.internalTagsMap = exports.ImageWithFallback = exports.AlternateAccession = exports.DownloadableAccession = exports.RestrictedDownloadButton = exports.controlTypeParameter = exports.requestObjects = exports.postUri = exports.requestUri = exports.filterFacet = exports.DisplayAsJson = void 0; var _defineProperty2 = _interopRequireDefault(__webpack_require__(9)); var _react = _interopRequireDefault(__webpack_require__(0)); var _propTypes = _interopRequireDefault(__webpack_require__(1)); var _underscore = _interopRequireDefault(__webpack_require__(7)); var _url = _interopRequireDefault(__webpack_require__(11)); var _ordinal_suffix = _interopRequireDefault(__webpack_require__(104)); var encoding = _interopRequireWildcard(__webpack_require__(23)); var _svgIcons = __webpack_require__(12); var _cart = __webpack_require__(46); var globals = _interopRequireWildcard(__webpack_require__(4)); var _hooks = __webpack_require__(50); var _navigation = __webpack_require__(134); var _tooltip = _interopRequireDefault(__webpack_require__(61)); var _jsxRuntime = __webpack_require__(3); function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } // Display information on page as JSON formatted data class DisplayAsJson extends _react.default.Component { constructor() { super(); // Bind this to non-React methods. this.onClick = this.onClick.bind(this); } onClick() { const urlComponents = _url.default.parse(this.context.location_href); if (urlComponents.query !== null) { window.location.href += '&format=json'; } else { window.location.href += '?format=json'; } } render() { return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", { type: "button", className: "btn btn-info btn-sm", title: "Convert page to JSON-formatted data", "aria-label": "Convert page to JSON-formatted data", onClick: this.onClick, children: "{ ; }" }); } } exports.DisplayAsJson = DisplayAsJson; DisplayAsJson.contextTypes = { location_href: _propTypes.default.string }; function shadeOverflowOnScroll(e) { // shading element that indicates there is further to scroll down const bottomShading = e.target.parentNode.getElementsByClassName('shading')[0]; if (bottomShading) { if (e.target.scrollHeight - e.target.scrollTop === e.target.clientHeight) { bottomShading.classList.add('hide-shading'); } else { bottomShading.classList.remove('hide-shading'); } } // shading element that indicates there is further to scroll up const topShading = e.target.parentNode.getElementsByClassName('top-shading')[0]; if (topShading) { if (e.target.scrollTop > 0) { topShading.classList.remove('hide-shading'); } else { topShading.classList.add('hide-shading'); } } } // Hide facets that we don't want to display const filterFacet = (facets, keepFacets) => { const filteredFacets = facets.filter(facet => keepFacets.indexOf(facet.field) > -1); return filteredFacets; }; // Display a summary sentence for a single treatment. exports.filterFacet = filterFacet; function singleTreatment(treatment) { let treatmentText = ''; if (treatment.amount) { treatmentText += "".concat(treatment.amount).concat(treatment.amount_units ? " ".concat(treatment.amount_units) : '', " "); } treatmentText += "".concat(treatment.treatment_term_name).concat(treatment.treatment_term_id ? " (".concat(treatment.treatment_term_id, ")") : '', " "); if (treatment.duration) { let units = ''; if (treatment.duration_units) { units = "".concat(treatment.duration_units).concat(treatment.duration !== 1 ? 's' : ''); } treatmentText += "for ".concat(treatment.duration).concat(units ? " ".concat(units) : ''); } return treatmentText; } // Display treatment type with treatment type details if present. function treatmentTypeDisplay(treatment) { let treatmentDetails = "".concat(treatment.treatment_type); if (treatment.treatment_type_details) { treatmentDetails += " (".concat(treatment.treatment_type_details, ")"); } return treatmentDetails; } // Display a treatment definition list. function treatmentDisplay(treatment) { const treatmentText = singleTreatment(treatment); const treatmentDetails = treatmentTypeDisplay(treatment); return /*#__PURE__*/(0, _jsxRuntime.jsxs)("dl", { className: "key-value", children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { "data-test": "treatment", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("dt", { children: "Treatment" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("dd", { children: treatmentText })] }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { "data-test": "type", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("dt", { children: "Type" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("dd", { children: treatmentDetails })] }), treatment.purpose ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { "data-test": "purpose", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("dt", { children: "Purpose" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("dd", { children: treatment.purpose })] }) : null] }, treatment.uuid); } /** * Perform a request to the given URI and return the results in a promise. * @param {string} URI to request from the server * @return {promise} Contains request results */ const requestUri = queryUri => fetch(queryUri, { method: 'GET', headers: { Accept: 'application/json' } }).then(response => { // Convert the response to JSON. if (response.ok) { return response.json(); } return Promise.resolve(null); }).then(responseJson => responseJson || {}); /** * Sends a POST request to the specified server URL with the given payload. * @param {string} queryUri - URI to request from the server * @param {object} payload - Payload to send to the server * @returns {Promise} - Contains request response */ exports.requestUri = requestUri; const postUri = (queryUri, payload) => fetch(queryUri, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(payload) }).then(response => // If we get an error response from the SCREEN server, just don't display a suggestions // drop down. response.ok ? response.json() : null).then(responseJson => responseJson || {}); /** * Do a search of an arbitrary query string passed in the `query` parameter, and return a promise. * If, for whatever reason, no results could be had, an empty object gets returned from the * promise. * @param {string} query Query string, not including ? * @return {promise} Contains search results object */ exports.postUri = postUri; function requestSearch(query) { return requestUri("/search/?".concat(query)); } const SINGLE_QUERY_SIZE_PADDING = 10; const MAX_DOMAIN_LENGTH = 64 + 19 + 8; // Max AWS domain name + .demo.encodedcc.org + https:// const MAX_URL_LENGTH = 4000 - MAX_DOMAIN_LENGTH; /** * Do a search of the specific objects whose @ids are listed in the `identifiers` parameter. Because * we have to specify the @id of each object in the URL of the GET request, the URL can get quite * long, so if the number of `identifiers` goes beyond the CHUNK_SIZE constant, we break the * searches into chunks, and we estimate the maximum number of @ids in each chunk to reasonably * fit within a URL. We then send out all the search GET requests at once, and combine the * requested objects into one array returned as a promise. * * @param {array} identifiers object identifiers, usually @ids * @param {string} uri Base URI specifying type and statuses of the objects we want to get * @param {string} queryProp Object property to search; '@id' by default * * @return {promise} Array of objects requested from the server */ const requestObjects = async function requestObjects(identifiers, uri) { let queryProp = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '@id'; if (identifiers.length > 0) { // Calculate a roughly reasonable chunk size based on an estimate of how many query-string // elements will fit within the maximum URL size. Assume the first identifier has a length // typical for all the identifiers. const singleQuerySize = queryProp.length + identifiers[0].length + SINGLE_QUERY_SIZE_PADDING; const chunkLength = Math.trunc((MAX_URL_LENGTH - uri.length) / singleQuerySize); // Break `identifiers` into an array of arrays of <= the calculated chunk size. const objectChunks = []; for (let start = 0, chunkIndex = 0; start < identifiers.length; start += chunkLength, chunkIndex += 1) { objectChunks[chunkIndex] = identifiers.slice(start, start + chunkLength); } // Going to send out all search chunk GET requests at once, and then wait for all of them to // complete. const chunks = await Promise.all(objectChunks.map(async objectChunk => { // Build URL containing search for specific objects for each chunk of objects. const objectUrl = uri.concat(objectChunk.reduce((combined, current) => "".concat(combined, "&").concat(queryProp, "=").concat(encoding.encodedURIComponent(current)), '')); const response = await fetch(objectUrl, { method: 'GET', headers: { Accept: 'application/json' } }); // Convert each response response to JSON. if (response.ok) { return response.json(); } return Promise.resolve(null); })); // All search chunks have resolved or errored. We get an array of search results in // `chunks` -- one per chunk. Now collect their objects from their @graphs into one array of // objects and return them as the promise result. if (chunks && chunks.length > 0) { return chunks.reduce((objects, chunk) => chunk && chunk['@graph'].length > 0 ? objects.concat(chunk['@graph']) : objects, []); } } return Promise.resolve([]); }; // Do a search of the specific files whose @ids are listed in the `fileIds` parameter. // // You can also supply an array of objects in the filteringFiles parameter. Any file @ids in // `atIds` that matches an object['@id'] in `filteringFiles` doesn't get included in the GET // request. // // Note: this function calls requestObjects which calls `fetch`, so you can't call this function // from code that runs on the server or it'll complain that `fetch` isn't defined. If called from a // React component, make sure you only call it when you know the component is mounted, like from // the componentDidMount method. // // fileIds: array of file @ids. // filteringFiles: Array of files to filter out of the array of file @ids in the fileIds parameter. exports.requestObjects = requestObjects; function requestFiles(fileIds, filteringFiles) { return requestObjects(fileIds, '/search/?type=File&limit=all&status!=deleted&status!=revoked&status!=replaced', filteringFiles); } // Given a dataset (for now, only ReferenceEpigenome), return the donor diversity of that dataset. function donorDiversity(dataset) { let diversity = 'none'; if (dataset.related_datasets && dataset.related_datasets.length > 0) { // Get all non-deleted related experiments; empty array if none. const experiments = dataset.related_datasets.filter(experiment => experiment.status !== 'deleted'); // From list list of non-deleted experiments, get all non-deleted replicates into one // array. if (experiments.length > 0) { // Make an array of replicate arrays, one replicate array per experiment. Only include // non-deleted replicates. const replicatesByExperiment = experiments.map(experiment => experiment.replicates && experiment.replicates.length > 0 ? experiment.replicates.filter(replicate => replicate.status !== 'deleted') : []); // Merge all replicate arrays into one non-deleted replicate array. const replicates = replicatesByExperiment.reduce((replicateCollection, replicatesForExperiment) => replicateCollection.concat(replicatesForExperiment), []); // Look at the donors in each replicate's biosample. If we see at least two different // donors, we know we have a composite. If only one unique donor after examining all // donors, we have a single. "None" if no donors found in all replicates. if (replicates.length > 0) { const donorAtIdCollection = []; replicates.every(replicate => { if (replicate.library && replicate.library.status !== 'deleted' && replicate.library.biosample && replicate.library.biosample.status !== 'deleted' && replicate.library.biosample.donor && replicate.library.biosample.donor.status !== 'deleted') { const donorAccession = replicate.library.biosample.donor.accession; // If we haven't yet seen this donor @id, add it to our collection if (donorAtIdCollection.indexOf(donorAccession) === -1) { donorAtIdCollection.push(donorAccession); } // If we have two, we know have a composite, and we can exit the loop by // returning false, which makes the replicates.every function end. return donorAtIdCollection.length !== 2; } // No donor to examine in this replicate. Keep the `every` loop going. return true; }); // Now determine the donor diversity. if (donorAtIdCollection.length > 1) { diversity = 'composite'; } else if (donorAtIdCollection.length === 1) { diversity = 'single'; } // Else keep its original value of 'none'. } } } return diversity; } /** * Return control type if needed or empty string other wise. * * @param {string} type Type * @returns Control Type part of URL */ const controlTypeParameter = type => ['Experiment', 'FunctionalCharacterizationExperiment'].includes(type) ? '&control_type!=*' : ''; // Render the Download icon while allowing the hovering tooltip. exports.controlTypeParameter = controlTypeParameter; class DownloadIcon extends _react.default.Component { constructor() { super(); // Bind this to non-React methods. this.onMouseEnter = this.onMouseEnter.bind(this); this.onMouseLeave = this.onMouseLeave.bind(this); } onMouseEnter() { this.props.hoverDL(true); } onMouseLeave() { this.props.hoverDL(false); } render() { const { file } = this.props; return /*#__PURE__*/(0, _jsxRuntime.jsx)("i", { className: "icon icon-download", style: !file.restricted ? {} : { opacity: '0.3' }, onMouseEnter: file.restricted ? this.onMouseEnter : null, onMouseLeave: file.restricted ? this.onMouseLeave : null, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", { className: "sr-only", children: "Download" }) }); } } DownloadIcon.propTypes = { hoverDL: _propTypes.default.func.isRequired, // Function to call when hovering or stop hovering over the icon file: _propTypes.default.object.isRequired // File associated with this download button }; // Render an accession as a button if clicking it sets a graph node, or just as text if not. const FileAccessionButton = props => { const { file } = props; return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", { href: file['@id'], title: "Go to page for ".concat(file.title), children: file.title }); }; FileAccessionButton.propTypes = { file: _propTypes.default.object.isRequired // File whose button is being rendered }; // Display a button to open the file information modal. class FileInfoButton extends _react.default.Component { constructor() { super(); // Bind this to non-React methods. this.onClick = this.onClick.bind(this); } onClick() { this.props.clickHandler(this.props.file); } render() { return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", { type: "button", className: "file-table-btn", onClick: this.onClick, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("i", { className: "icon icon-info-circle", children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", { className: "sr-only", children: "Open file information" }) }) }); } } FileInfoButton.propTypes = { file: _propTypes.default.object.isRequired, // File whose information is to be displayed clickHandler: _propTypes.default.func.isRequired // Function to call when the info button is clicked }; // Render a download button for a file that reacts to login state and admin status to render a // tooltip about the restriction based on those things. const RestrictedDownloadButton = props => { const { file } = props; const buttonEnabled = !(file.restricted || file.no_file_available); // Default icon const icon = /*#__PURE__*/(0, _jsxRuntime.jsx)("i", { className: "icon icon-download", style: !file.restricted ? {} : { opacity: '0.3' }, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", { className: "sr-only", children: "Download" }) }); // If the user provided us with a component for downloading files, add the download // properties to the component before rendering. const downloadComponent = props.downloadComponent ? /*#__PURE__*/_react.default.cloneElement(props.downloadComponent, { file, href: file.href, download: file.href.substr(file.href.lastIndexOf('/') + 1), hoverDL: null, buttonEnabled }) : icon; return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.default, { trigger: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { children: buttonEnabled ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", { children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", { href: file.href, download: file.href.substr(file.href.lastIndexOf('/') + 1), "data-bypass": "true", children: downloadComponent }) }) : /*#__PURE__*/(0, _jsxRuntime.jsx)("span", { children: downloadComponent }) }), tooltipId: file['@id'], css: "dl-tooltip-trigger", children: file.restricted ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { children: ["If you are a collaborator or owner of this file,", /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), "please contact ", /*#__PURE__*/(0, _jsxRuntime.jsx)("a", { href: "mailto:encode-help@lists.stanford.edu", children: "encode-help@lists.stanford.edu" }), /*#__PURE__*/(0, _jsxRuntime.jsx)("br", {}), "to receive a copy of this file"] }) : null }); }; exports.RestrictedDownloadButton = RestrictedDownloadButton; RestrictedDownloadButton.propTypes = { file: _propTypes.default.object.isRequired, // File containing `href` to use as download link downloadComponent: _propTypes.default.object // Optional component to render the download button, instead of default }; RestrictedDownloadButton.defaultProps = { downloadComponent: null }; const DownloadableAccession = props => { const { file, clickHandler, loggedIn } = props; return /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", { className: "file-table-accession", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FileAccessionButton, { file: file }), clickHandler ? /*#__PURE__*/(0, _jsxRuntime.jsx)(FileInfoButton, { file: file, clickHandler: clickHandler }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(RestrictedDownloadButton, { file: file, loggedIn: loggedIn })] }); }; exports.DownloadableAccession = DownloadableAccession; DownloadableAccession.propTypes = { file: _propTypes.default.object.isRequired, // File whose accession to render clickHandler: _propTypes.default.func, // Function to call when button is clicked loggedIn: _propTypes.default.bool // True if current user is logged in }; DownloadableAccession.defaultProps = { clickHandler: null, loggedIn: false }; // Return `true` if the given dataset is viewable by people not logged in, or people logged in // but not as admin. function publicDataset(dataset) { return dataset.status === 'released' || dataset.status === 'archived' || dataset.status === 'revoked'; } // You can use this function to render a panel view for a context object with a couple options: // 1. Pass an ENCODE context object (e.g. Biosample or Experiment) directly in props. PanelLookup // returns a React component that you can render directly. // // 2. Pass an object of the form: // { // context: context object to render // ...any other props you want to pass to the panel-rendering component // } // // Note: this function really doesn't do much of value, but it does do something and it's been // around since the beginning of encoded, so it stays for now. function PanelLookup(properties) { let localProps; if (properties['@id']) { // `properties` is an ENCODE context object, so normalize it by making `props` an object // with the given context as an object property. localProps = { context: properties }; } else { localProps = properties; } // `props` is an object with at least { context: ENCODE context object }. const PanelView = globals.panelViews.lookup(localProps.context); return /*#__PURE__*/(0, _jsxRuntime.jsx)(PanelView, _objectSpread({}, localProps), localProps.context.uuid); } // Display the alternate accessions, normally below the header line in objects. const AlternateAccession = props => { const { altAcc } = props; if (altAcc && altAcc.length > 0) { return /*#__PURE__*/(0, _jsxRuntime.jsx)("h4", { className: "replacement-accessions__alternate", children: altAcc.length === 1 ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", { children: ["Alternate accession: ", altAcc[0]] }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", { children: ["Alternate accessions: ", altAcc.join(', ')] }) }); } // No alternate accessions to display. return null; }; exports.AlternateAccession = AlternateAccession; AlternateAccession.propTypes = { altAcc: _propTypes.default.array // Array of alternate accession strings }; AlternateAccession.defaultProps = { altAcc: null }; /** * Display image with fallback for non-existent image links */ class ImageWithFallback extends _react.default.Component { constructor() { super(); // Initialize image src and alt tags to be empty // These should not be set to props values prior to the component mounting or the onError function may not execute for broken image urls on certain browsers (Chrome in particular) this.state = { imageUrl: '', imageAlt: '' }; this.onError = this.onError.bind(this); } // Only once the component has mounted, update image src and alt tag // This ensures that the component mounts and that the onError function will execute for broken image urls componentDidMount() { this.setState({ imageUrl: this.props.imageUrl, imageAlt: this.props.imageAlt }); } onError() { const imageUrl = '/static/img/brokenImage.png'; const imageAlt = 'Not found'; this.setState({ imageUrl, imageAlt }); } render() { return /*#__PURE__*/(0, _jsxRuntime.jsx)("img", { onError: this.onError, src: this.state.imageUrl, alt: this.state.imageAlt }); } } exports.ImageWithFallback = ImageWithFallback; ImageWithFallback.propTypes = { imageUrl: _propTypes.default.string.isRequired, imageAlt: _propTypes.default.string.isRequired }; /** * Maps an internal tag to the corresponding image file name. Exported for Jest testing. */ const internalTagsMap = { ccre_inputv1: { badgeFilename: 'tag-ccre_inputv1.svg' }, ccre_inputv2: { badgeFilename: 'tag-ccre_inputv2.svg' }, cre_inputv10: { badgeFilename: 'tag-cre_inputv10.svg' }, cre_inputv11: { badgeFilename: 'tag-cre_inputv11.svg' }, dbGaP: { badgeFilename: 'tag-dbGaP.png' }, 'Deeply Profiled': { badgeFilename: 'tag-deeply-profiled.svg' }, DREAM: { badgeFilename: 'tag-DREAM.png' }, ENCORE: { badgeFilename: 'tag-ENCORE.svg', collectionPath: '/encore-matrix/?type=Experiment&status=released&internal_tags=ENCORE' }, ENCYCLOPEDIAv3: { badgeFilename: 'tag-ENCYCLOPEDIAv3.svg' }, ENCYCLOPEDIAv4: { badgeFilename: 'tag-ENCYCLOPEDIAv4.svg' }, ENCYCLOPEDIAv5: { badgeFilename: 'tag-ENCYCLOPEDIAv5.svg' }, ENCYCLOPEDIAv6: { badgeFilename: 'tag-ENCYCLOPEDIAv6.svg' }, ENTEx: { badgeFilename: 'tag-ENTEx.png', collectionPath: '/entex-matrix/?type=Experiment&status=released&internal_tags=ENTEx' }, LRGASP: { badgeFilename: 'tag-LRGASP.png' }, MouseDevSeries: { badgeFilename: 'tag-MouseDevSeries.svg', collectionPath: '/mouse-development-matrix/?type=Experiment&status=released&related_series.@type=OrganismDevelopmentSeries&replicates.library.biosample.organism.scientific_name=Mus+musculus' }, PGP: { badgeFilename: 'tag-PGP.png' }, RegulomeDB_1_0: { badgeFilename: 'tag-RegulomeDB_1_0.svg' }, RegulomeDB_2_0: { badgeFilename: 'tag-RegulomeDB_2_0.svg' }, RegulomeDB_2_1: { badgeFilename: 'tag-RegulomeDB_2_1.svg' }, RushAD: { badgeFilename: 'tag-RushAD.svg' }, SESCC: { badgeFilename: 'tag-SESCC.svg', collectionPath: '/sescc-stem-cell-matrix/?type=Experiment&internal_tags=SESCC' }, YaleImmuneCells: { badgeFilename: 'tag-YaleImmuneCells.svg' } }; /** * Maps a badge type to the corresponding image filename. */ exports.internalTagsMap = internalTagsMap; const badgeMap = { Experiment: 'badge-Experiment.svg', Annotation: 'badge-Annotation.svg', 'ReferenceEpigenome-human': 'badge-ReferenceEpigenome-human.svg', 'ReferenceEpigenome-mouse': 'badge-ReferenceEpigenome-mouse.svg', MouseDevelopment: 'badge-MouseDevelopment.svg', ChIPseq: 'badge-ChIPseq.svg' }; /** * Display internal tag badges or a given badge ID from search results. Badge IDs are used for * matrix displays that don't necessarily have internal_tags defined in the query string. */ const MatrixBadges = _ref => { let { context, type } = _ref; // Collect filters that are internal_tags. const internalTags = _underscore.default.uniq(context.filters.filter(filter => filter.field === 'internal_tags' && filter.term !== '*').map(filter => filter.term)); if (internalTags.length > 0) { return internalTags.map(tag => { const filename = internalTagsMap[tag].badgeFilename; if (filename) { return /*#__PURE__*/(0, _jsxRuntime.jsx)("img", { className: "badge-image", src: "/static/img/".concat(filename), alt: "".concat(tag, " logo") }, tag); } return null; }); } // Use a badge for the specific given type, if provided, when no internal_tags used. if (type) { const filename = badgeMap[type]; if (filename) { return /*#__PURE__*/(0, _jsxRuntime.jsx)("img", { className: "badge-image", src: "/static/img/".concat(filename), alt: "".concat(type, " badge") }); } } return null; }; exports.MatrixBadges = MatrixBadges; MatrixBadges.propTypes = { /** encode search-results object being displayed */ context: _propTypes.default.object.isRequired, /** Specific type of badge to display; used if available if internal_tags does not exist */ type: _propTypes.default.string }; MatrixBadges.defaultProps = { type: '' }; /** * Display a list of internal_tags for an object as badges that link to a corresponding search. The * object in `context` must have at least one `internal_tags` value or the results are * unpredictable. */ const InternalTags = _ref2 => { let { internalTags, objectType, css } = _ref2; const tagBadges = internalTags.map(tag => { const filename = internalTagsMap[tag]; if (filename) { if (filename.collectionPath) { const tagSearchUrl = filename.collectionPath; return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", { href: tagSearchUrl, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", { src: "/static/img/".concat(filename.badgeFilename), alt: "Visit collection page for ".concat(tag) }) }, tag); } const tagSearchUrl = "/search/?type=".concat(objectType, "&internal_tags=").concat(encoding.encodedURIComponentOLD(tag), "&status=released"); return /*#__PURE__*/(0, _jsxRuntime.jsx)("a", { href: tagSearchUrl, children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", { src: "/static/img/".concat(filename.badgeFilename), alt: "Search for all ".concat(objectType, " with internal tag ").concat(tag) }) }, tag); } return null; }); return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", { className: css, children: tagBadges }); }; exports.InternalTags = InternalTags; InternalTags.propTypes = { /** Array of internal tags to display */ internalTags: _propTypes.default.array.isRequired, /** Object @type internal_tags belongs to */ objectType: _propTypes.default.string.isRequired, /** Optional CSS class to assign to surrounding all the badges */ css: _propTypes.default.string }; InternalTags.defaultProps = { css: '' }; /** * Given a search results object, extract the type of object that was requested in the query * string that generated the search results object and map it to a presentable human-generated * object type name from that kind of object's schema. Optionally wrap the name in a given wrapper * component. Nothing gets rendered if the search result's query string doesn't specify a * "type=anything" or has more than one. The wrapper function must take the form of: * "title => {title}". Idea for the component wrapping technique from: * https://gist.github.com/kitze/23d82bb9eb0baabfd03a6a720b1d637f */ const DocTypeTitle = (_ref3, reactContext) => { let { searchResults, wrapper } = _ref3; // Determine the search page doc_type title to display at the top of the facet list. let facetTitle = ''; const docTypes = searchResults.filters.length > 0 ? searchResults.filters.filter(searchFilter => searchFilter.field === 'type') : []; if (docTypes.length === 1) { facetTitle = reactContext.profilesTitles[docTypes[0].term]; } // If one object type was requested, render it *into* the given wrapper component if one was // given. if (facetTitle) { const facetTitleComponent = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", { children: facetTitle }); return wrapper ? wrapper(facetTitleComponent) : facetTitleComponent; } return null; }; exports.DocTypeTitle = DocTypeTitle; DocTypeTitle.propTypes = { searchResults: _propTypes.default.object.isRequired, wrapper: _propTypes.default.func }; DocTypeTitle.defaultProps = { wrapper: null }; DocTypeTitle.contextTypes = { profilesTitles: _propTypes.default.object }; /** * Display a block of accessory controls on object-display pages, e.g. the audit indicator button. */ const ItemAccessories = (_ref4, reactContext) => { let { item, audit } = _ref4; return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { className: "item-accessories", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "item-accessories--left", children: audit ? audit.auditIndicators(item.audit, audit.auditId, { session: reactContext.session, sessionProperties: reactContext.session_properties, except: audit.except }) : null }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "item-accessories--right", children: /*#__PURE__*/(0, _jsxRuntime.jsx)(DisplayAsJson, {}) })] }); }; exports.ItemAccessories = ItemAccessories; ItemAccessories.propTypes = { /** Object being displayed that needs these accessories */ item: _propTypes.default.object.isRequired, /** Audit information */ audit: _propTypes.default.shape({ auditIndicators: _propTypes.default.func, // Function to display audit indicators auditId: _propTypes.default.string, // Audit HTML ID to use for a11y except: _propTypes.default.string // Don't link any references to this @id }) }; ItemAccessories.defaultProps = { audit: null }; ItemAccessories.contextTypes = { session: _propTypes.default.object, session_properties: _propTypes.default.object }; /** * Display the top section containing the breadcrumb links on summary pages. */ const TopAccessories = _ref5 => { let { context, crumbs, removeConfirmation } = _ref5; const type = context['@type'][0]; const isItemAllowedInCart = (0, _cart.cartGetAllowedTypes)().includes(type); return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { className: "top-accessories", children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_navigation.Breadcrumbs, { root: "/search/?type=".concat(type).concat(controlTypeParameter(type)), crumbs: crumbs, crumbsReleased: context.status === 'released' }), isItemAllowedInCart ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_cart.CartToggle, { element: context, removeConfirmation: removeConfirmation, displayName: true }) : null] }); }; exports.TopAccessories = TopAccessories; TopAccessories.propTypes = { /** Summary page currently displayed */ context: _propTypes.default.object.isRequired, /** Object with breadcrumb contents */ crumbs: _propTypes.default.arrayOf(_propTypes.default.object).isRequired, /** For removing a series object on individual series pages */ removeConfirmation: _propTypes.default.shape({ /** Called by cart toggle when the user requests removing a series object from the cart */ requestRemove: _propTypes.default.func, /** Called when the user confirms removing a series object from the cart */ requestRemoveConfirmation: _propTypes.default.func, /** True if the user has confirmed they want to remove the series object from the cart */ isRemoveConfirmed: _propTypes.default.bool, /** True to remove series and its related datasets without a confirmation modal */ immediate: _propTypes.default.bool }) }; TopAccessories.defaultProps = { removeConfirmation: {} }; // Convert assembly and annotation to a single value // Values computed such that assembly and annotations that are the most recent have the highest value // The correct sorting is as follows: // Genome mm9 or mm10 // "ENSEMBL V65", // "M2", // "M3", // "M4", // "M7", // "M14", // "M21", // Genome hg19 // "V3c", // "V7", // "V10", // "V19", // "miRBase V21", // "V22", // Genome GRCh38 // "V24", // "V29", // "V30" // Genome ce10 or ce11 // "WS235", // "WS245" // outlier: // "None" function computeAssemblyAnnotationValue(assembly, annotation) { // There are three levels of sorting // First level of sorting: most recent assemblies are ordered first (represented by numerical component of assembly) // Second level of sorting: assemblies without '-minimal' are sorted before assemblies with '-minimal' at the end (represented by tenths place value which is 5 if there is no '-minimal') // Third level of sorting: Annotations within an assembly are ordered with most recent first, with more recent annotations having a higher annotation number (with the exception of "ENSEMBL V65") (represented by the annotation number divided by 10,000, or, the three decimal places after the tenths place) let assemblyNumber = /\d/.test(assembly) ? +assembly.match(/[0-9]+/g)[0] : 0; if ((assembly === null || assembly === void 0 ? void 0 : assembly.indexOf('minimal')) === -1) { // If there is no '-minimal', add 0.5 which will order this assembly ahead of any assembly with '-minimal' and the same numerical component assemblyNumber += 0.5; } if (annotation) { const annotationNumber = +annotation.match(/[0-9]+/g)[0]; let annotationDecimal = 0; // All of the annotations are in order numerically except for "ENSEMBL V65" which should be ordered behind "M2" // We divide by 10000 because the highest annotation number (for now) is 245 if (+annotationNumber === 65) { annotationDecimal = +annotationNumber / 1000000; } else { annotationDecimal = +annotationNumber / 10000; } assemblyNumber += annotationDecimal; return assemblyNumber; } return assemblyNumber; } /** * Determine whether the given file is visualizable or not. Needs to be kept in sync with * is_file_visualizable in batch_download.py. * @param {object} file File object to test for visualizability * * @return {bool} True if file is visualizable */ const isFileVisualizable = file => { if (!file || !file.file_format) { return false; } return (file.file_format === 'bigWig' || file.file_format === 'bigBed') && file.file_format_type !== 'bedMethyl' && file.file_format_type !== 'bedLogR' && file.file_format_type !== 'pepMap' && file.file_format_type !== 'modPepMap' && ['methylation state at CHG', 'methylation state at CHH', 'methylation state at CpG', 'smoothed methylation state at CpG'].indexOf(file.output_type) === -1 && ['released', 'in progress', 'archived'].indexOf(file.status) > -1; }; exports.isFileVisualizable = isFileVisualizable; function isVisualizableAssembly(assembly) { const visualizableAssemblies = ['GRCh38', 'hg19', 'GRCh37', 'GRCm39', 'mm10', 'mm10-minimal', 'GRCm38', 'mm9', 'GRCm37', 'dm6', 'dm3', 'ce11', 'ce10']; return visualizableAssemblies.includes(assembly); } function filterForVisualizableAssembly(fileList) { if (!fileList || fileList.length === 0) { return []; } return fileList.filter(file => isVisualizableAssembly(file.assembly)); } // Not all files can be visualized on the Valis genome browser // Some of these files should be visualizable later, after updates to browser function filterForVisualizableFiles(fileList) { if (!fileList || fileList.length === 0) { return []; } const files = fileList.filter(file => isFileVisualizable(file)); return filterForVisualizableAssembly(files); } /** * Filter the given files to only include those with the `preferred_default` or `pseudo_default` * flag set. * @param {array} fileList Files to filter * * @return {array} Members of `fileList` that have preferred_default flag set. */ const filterForDefaultFiles = fileList => fileList.filter(file => file.preferred_default || file.pseudo_default); /** * Filter the given files to only include those that appear in the given datasets. * @param {array} fileList Files to filter * @param {array} datasets Datasets to check against * * @return {array} Members of `fileList` that the given datasets include */ exports.filterForDefaultFiles = filterForDefaultFiles; const filterForDatasetFiles = (fileList, datasets) => { const datasetFilePaths = datasets.reduce((files, dataset) => dataset.files ? files.concat(dataset.files) : files, []).map(file => file['@id']); return fileList.filter(file => datasetFilePaths.includes(file['@id'])); }; /** * Filter an array of files to ones included in the released analyses in `compiledAnalyses`. If * none of the given compiled analyses have the "released" status, filter to the unreleased * analyses files. * @param {array} fileList Files to filter * @param {array} compiledAnalyses Compiled analysis objects * @returns {array} Filtered `fileList` */ exports.filterForDatasetFiles = filterForDatasetFiles; const filterForReleasedAnalyses = (fileList, compiledAnalyses) => { if (fileList.length > 0 && compiledAnalyses.length > 0) { const releasedAnalyses = compiledAnalyses.filter(analysis => analysis.status === 'released'); const consideredAnalyses = releasedAnalyses.length > 0 ? releasedAnalyses : compiledAnalyses; const consideredAnalysisFiles = consideredAnalyses.reduce((files, analysis) => files.concat(analysis.files), []); return fileList.filter(file => consideredAnalysisFiles.includes(file['@id'])); } return []; }; /** * Displays an item count intended for the tops of table, normally reflecting a search result count. */ exports.filterForReleasedAnalyses = filterForReleasedAnalyses; const TableItemCount = _ref6 => { let { count } = _ref6; return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", { className: "table-item-count", children: count }); }; exports.TableItemCount = TableItemCount; TableItemCount.propTypes = { count: _propTypes.default.string.isRequired }; /** * Display a button that copies the given text when the user clicks the button. */ const CopyButton = _ref7 => { let { label, copyText, css } = _ref7; /** True if browser has clipboard API */ const [hasClipboard, setHasClipboard] = _react.default.useState(false); /** True if user has clicked Copy */ const [hasCopied, setHasCopied] = _react.default.useState(false); /** * Called when the user clicks the Copy button. */ const handleClick = async () => { // Copy given text to clipboard. await navigator.clipboard.writeText(copyText); setHasCopied(true); }; const handleTransitionEnd = () => { setHasCopied(false); }; (0, _hooks.useMount)(() => { // Display Copy button if browser has clipboard API. if (navigator.clipboard) { setHasClipboard(true); } }); if (hasClipboard) { return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", { type: "button", disabled: !copyText, className: "btn btn-copy-action".concat(css ? " ".concat(css) : '').concat(hasCopied ? ' flash' : ''), onClick: handleClick, onTransitionEnd: handleTransitionEnd, "aria-label": label, children: (0, _svgIcons.svgIcon)('clipboard') }); } // No clipboard API. return null; }; exports.CopyButton = CopyButton; CopyButton.propTypes = { /** A11Y label for the button */ label: _propTypes.default.string.isRequired, /** Text to copy */ copyText: _propTypes.default.string, /** CSS classes to add to the copy button */ css: _propTypes.default.string }; CopyButton.defaultProps = { copyText: '', css: 'btn' }; /** * Display a custom-styled, accessible checkbox. Loosely based on: * https://webdesign.tutsplus.com/tutorials/how-to-make-custom-accessible-checkboxes-and-radio-buttons--cms-32074 */ const Checkbox = _ref8 => { let { label, id, checked, disabled, css, clickHandler } = _ref8; return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", { className: "checkbox".concat(disabled ? ' checkbox--disabled' : '').concat(css ? " ".concat(css) : ''), children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", { id: id, name: id, type: "checkbox", checked: checked, disabled: disabled, onChange: clickHandler }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", { htmlFor: id, children: [label, (0, _svgIcons.svgIcon)('checkbox')] })] }); }; exports.Checkbox = Checkbox; Checkbox.propTypes = { /** Label for the checkbox */ label: _propTypes.default.string.isRequired, /** HTML ID for the checkbox */ id: _propTypes.default.string.isRequired, /** True if checkbox is checked */ checked: _propTypes.default.bool.isRequired, /** True if checkbox is disabled */ disabled: _propTypes.default.bool, /** CSS to apply to checkbox wrapper */ css: _propTypes.default.string, /** Called when the user clicks the checkbox */ clickHandler: _propTypes.default.func.isRequired }; Checkbox.defaultProps = { disabled: false, css: '' }; /** * Examines the `examined_loci` property, if any, of the given dataset and formats it into * displayable text. * @param {object} experiment Dataset containing examined_loci to display * @param {boolean} includeMethod True to include expression method following the expression data * @returns {string} Formatted examined_loci display */ function computeExaminedLoci(experiment, includeMethod) { const examinedLoci = []; if (experiment.examined_loci && experiment.examined_loci.length > 0) { experiment.examined_loci.forEach(locus => { let locusData; if (locus.expression_percentile || locus.expression_percentile === 0) { locusData = "".concat(locus.gene.symbol, " (").concat((0, _ordinal_suffix.default)(locus.expression_percentile), " percentile)"); } else if (locus.expression_range_minimum && locus.expression_range_maximum || locus.expression_range_maximum === 0 || locus.expression_range_minimum === 0) { locusData = "".concat(locus.gene.symbol, " (").concat(locus.expression_range_minimum, "-").concat(locus.expression_range_maximum, "%)"); } else { locusData = "".concat(locus.gene.symbol); } examinedLoci.push("".concat(locusData).concat(includeMethod && locus.expression_measurement_method ? " ".concat(locus.expression_measurement_method) : '')); }); } return examinedLoci.join(', '); } /** * Collects the biosamples contained in all replicate libraries within the given dataset; * deduplicated by accession. * @param {object} dataset Dataset from which to extract all biosamples. * @returns {array} Array of all biosamples in all replicates of `dataset`. */ const collectDatasetBiosamples = dataset => { if (dataset.replicates && dataset.replicates.length > 0) { const biosamples = dataset.replicates.reduce((accBiosamples, replicate) => replicate.library && replicate.library.biosample ? accBiosamples.concat(replicate.library.biosample) : accBiosamples, []); return (0, _underscore.default)(biosamples).uniq(biosample => biosample.accession); } return []; }; /** * Display the current and maximum character counter for a