{"version":3,"file":"newsletter-banner-B3GEtv-_.js","sources":["../../../assets/javascripts/common/base/togglable.js","../../../node_modules/js-cookie/src/js.cookie.js","../../../node_modules/js-utils/src/function.js","../../../assets/javascripts/common/base/omasks.js","../../../assets/javascripts/common/components/analytics.js","../../../node_modules/ahoy.js/dist/ahoy.esm.js","../../../assets/javascripts/common/components/analytics-events.js","../../../node_modules/ev-emitter/ev-emitter.js","../../../node_modules/imagesloaded/imagesloaded.js","../../../assets/javascripts/common/components/grille.js","../../../node_modules/accessiblenav.js/src/index.js","../../../assets/javascripts/common/components/header.js","../../../node_modules/a11y-dialog/a11y-dialog.js","../../../assets/javascripts/common/components/a11ydialog.js","../../../assets/javascripts/common/components/search-aside.js","../../../assets/javascripts/common/components/categories-search-filter.js","../../../assets/javascripts/common/components/date-search-filter.js","../../../assets/javascripts/common/components/bundle-folders.js","../../../node_modules/fuse.js/dist/fuse.esm.js","../../../assets/javascripts/common/components/bundle-search.js","../../../node_modules/underscore/modules/_setup.js","../../../node_modules/underscore/modules/restArguments.js","../../../node_modules/underscore/modules/isObject.js","../../../node_modules/underscore/modules/isNull.js","../../../node_modules/underscore/modules/isUndefined.js","../../../node_modules/underscore/modules/isBoolean.js","../../../node_modules/underscore/modules/isElement.js","../../../node_modules/underscore/modules/_tagTester.js","../../../node_modules/underscore/modules/isString.js","../../../node_modules/underscore/modules/isNumber.js","../../../node_modules/underscore/modules/isDate.js","../../../node_modules/underscore/modules/isRegExp.js","../../../node_modules/underscore/modules/isError.js","../../../node_modules/underscore/modules/isSymbol.js","../../../node_modules/underscore/modules/isArrayBuffer.js","../../../node_modules/underscore/modules/isFunction.js","../../../node_modules/underscore/modules/_hasObjectTag.js","../../../node_modules/underscore/modules/_stringTagBug.js","../../../node_modules/underscore/modules/isDataView.js","../../../node_modules/underscore/modules/isArray.js","../../../node_modules/underscore/modules/_has.js","../../../node_modules/underscore/modules/isArguments.js","../../../node_modules/underscore/modules/isFinite.js","../../../node_modules/underscore/modules/isNaN.js","../../../node_modules/underscore/modules/constant.js","../../../node_modules/underscore/modules/_createSizePropertyCheck.js","../../../node_modules/underscore/modules/_shallowProperty.js","../../../node_modules/underscore/modules/_getByteLength.js","../../../node_modules/underscore/modules/_isBufferLike.js","../../../node_modules/underscore/modules/isTypedArray.js","../../../node_modules/underscore/modules/_getLength.js","../../../node_modules/underscore/modules/_collectNonEnumProps.js","../../../node_modules/underscore/modules/keys.js","../../../node_modules/underscore/modules/isEmpty.js","../../../node_modules/underscore/modules/isMatch.js","../../../node_modules/underscore/modules/underscore.js","../../../node_modules/underscore/modules/_toBufferView.js","../../../node_modules/underscore/modules/isEqual.js","../../../node_modules/underscore/modules/allKeys.js","../../../node_modules/underscore/modules/_methodFingerprint.js","../../../node_modules/underscore/modules/isMap.js","../../../node_modules/underscore/modules/isWeakMap.js","../../../node_modules/underscore/modules/isSet.js","../../../node_modules/underscore/modules/isWeakSet.js","../../../node_modules/underscore/modules/values.js","../../../node_modules/underscore/modules/pairs.js","../../../node_modules/underscore/modules/invert.js","../../../node_modules/underscore/modules/functions.js","../../../node_modules/underscore/modules/_createAssigner.js","../../../node_modules/underscore/modules/extend.js","../../../node_modules/underscore/modules/extendOwn.js","../../../node_modules/underscore/modules/defaults.js","../../../node_modules/underscore/modules/_baseCreate.js","../../../node_modules/underscore/modules/create.js","../../../node_modules/underscore/modules/clone.js","../../../node_modules/underscore/modules/tap.js","../../../node_modules/underscore/modules/toPath.js","../../../node_modules/underscore/modules/_toPath.js","../../../node_modules/underscore/modules/_deepGet.js","../../../node_modules/underscore/modules/get.js","../../../node_modules/underscore/modules/has.js","../../../node_modules/underscore/modules/identity.js","../../../node_modules/underscore/modules/matcher.js","../../../node_modules/underscore/modules/property.js","../../../node_modules/underscore/modules/_optimizeCb.js","../../../node_modules/underscore/modules/_baseIteratee.js","../../../node_modules/underscore/modules/iteratee.js","../../../node_modules/underscore/modules/_cb.js","../../../node_modules/underscore/modules/mapObject.js","../../../node_modules/underscore/modules/noop.js","../../../node_modules/underscore/modules/propertyOf.js","../../../node_modules/underscore/modules/times.js","../../../node_modules/underscore/modules/random.js","../../../node_modules/underscore/modules/now.js","../../../node_modules/underscore/modules/_createEscaper.js","../../../node_modules/underscore/modules/_escapeMap.js","../../../node_modules/underscore/modules/escape.js","../../../node_modules/underscore/modules/_unescapeMap.js","../../../node_modules/underscore/modules/unescape.js","../../../node_modules/underscore/modules/templateSettings.js","../../../node_modules/underscore/modules/template.js","../../../node_modules/underscore/modules/result.js","../../../node_modules/underscore/modules/uniqueId.js","../../../node_modules/underscore/modules/chain.js","../../../node_modules/underscore/modules/_executeBound.js","../../../node_modules/underscore/modules/partial.js","../../../node_modules/underscore/modules/bind.js","../../../node_modules/underscore/modules/_isArrayLike.js","../../../node_modules/underscore/modules/_flatten.js","../../../node_modules/underscore/modules/bindAll.js","../../../node_modules/underscore/modules/memoize.js","../../../node_modules/underscore/modules/delay.js","../../../node_modules/underscore/modules/defer.js","../../../node_modules/underscore/modules/throttle.js","../../../node_modules/underscore/modules/debounce.js","../../../node_modules/underscore/modules/wrap.js","../../../node_modules/underscore/modules/negate.js","../../../node_modules/underscore/modules/compose.js","../../../node_modules/underscore/modules/after.js","../../../node_modules/underscore/modules/before.js","../../../node_modules/underscore/modules/once.js","../../../node_modules/underscore/modules/findKey.js","../../../node_modules/underscore/modules/_createPredicateIndexFinder.js","../../../node_modules/underscore/modules/findIndex.js","../../../node_modules/underscore/modules/findLastIndex.js","../../../node_modules/underscore/modules/sortedIndex.js","../../../node_modules/underscore/modules/_createIndexFinder.js","../../../node_modules/underscore/modules/indexOf.js","../../../node_modules/underscore/modules/lastIndexOf.js","../../../node_modules/underscore/modules/find.js","../../../node_modules/underscore/modules/findWhere.js","../../../node_modules/underscore/modules/each.js","../../../node_modules/underscore/modules/map.js","../../../node_modules/underscore/modules/_createReduce.js","../../../node_modules/underscore/modules/reduce.js","../../../node_modules/underscore/modules/reduceRight.js","../../../node_modules/underscore/modules/filter.js","../../../node_modules/underscore/modules/reject.js","../../../node_modules/underscore/modules/every.js","../../../node_modules/underscore/modules/some.js","../../../node_modules/underscore/modules/contains.js","../../../node_modules/underscore/modules/invoke.js","../../../node_modules/underscore/modules/pluck.js","../../../node_modules/underscore/modules/where.js","../../../node_modules/underscore/modules/max.js","../../../node_modules/underscore/modules/min.js","../../../node_modules/underscore/modules/toArray.js","../../../node_modules/underscore/modules/sample.js","../../../node_modules/underscore/modules/shuffle.js","../../../node_modules/underscore/modules/sortBy.js","../../../node_modules/underscore/modules/_group.js","../../../node_modules/underscore/modules/groupBy.js","../../../node_modules/underscore/modules/indexBy.js","../../../node_modules/underscore/modules/countBy.js","../../../node_modules/underscore/modules/partition.js","../../../node_modules/underscore/modules/size.js","../../../node_modules/underscore/modules/_keyInObj.js","../../../node_modules/underscore/modules/pick.js","../../../node_modules/underscore/modules/omit.js","../../../node_modules/underscore/modules/initial.js","../../../node_modules/underscore/modules/first.js","../../../node_modules/underscore/modules/rest.js","../../../node_modules/underscore/modules/last.js","../../../node_modules/underscore/modules/compact.js","../../../node_modules/underscore/modules/flatten.js","../../../node_modules/underscore/modules/difference.js","../../../node_modules/underscore/modules/without.js","../../../node_modules/underscore/modules/uniq.js","../../../node_modules/underscore/modules/union.js","../../../node_modules/underscore/modules/intersection.js","../../../node_modules/underscore/modules/unzip.js","../../../node_modules/underscore/modules/zip.js","../../../node_modules/underscore/modules/object.js","../../../node_modules/underscore/modules/range.js","../../../node_modules/underscore/modules/chunk.js","../../../node_modules/underscore/modules/_chainResult.js","../../../node_modules/underscore/modules/mixin.js","../../../node_modules/underscore/modules/underscore-array-methods.js","../../../node_modules/underscore/modules/index-default.js","../../../assets/javascripts/common/components/bundle-search-api.js","../../../assets/javascripts/common/components/newsletter-banner.js"],"sourcesContent":["// TODO: a11y\n\nimport { getElements } from 'js-utils/src/selector';\n\nimport init from './init';\n\ninit(() => {\n const toggleTrigger = getElements('.toggle');\n if(!toggleTrigger.length) return;\n\n toggleTrigger.forEach((trigger) => {\n trigger.addEventListener('click', (e) => {\n e.preventDefault();\n const targets = getElements('.' + trigger.getAttribute('data-target'));\n\n targets.forEach((target) => {\n const parent = target.closest('.togglable');\n const classOpen = 'open';\n const classClose = 'closed';\n\n if(parent.classList.contains(classOpen)) {\n parent.classList.remove(classOpen);\n parent.classList.add(classClose);\n }\n else {\n parent.classList.remove(classClose);\n parent.classList.add(classOpen);\n parent.classList.add('open-triggered');\n }\n });\n });\n });\n});\n","/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","/*\n ------------------------------------------------------------------------------\n Throttles execution of a function.\n Borrowed from: https://medium.com/@_jh3y/throttling-and-debouncing-in-javascript-b01cad5c8edf\n\n @param {Integer} delay Miliseconds between function calls\n @param {Function} fn The function to call\n*/\n\nconst throttle = (delay, fn) => {\n let inThrottle\n return function (...args) {\n const context = this\n if (!inThrottle) {\n fn.apply(context, args)\n inThrottle = true\n setTimeout(() => (inThrottle = false), delay)\n }\n }\n}\n\n/*\n ------------------------------------------------------------------------------\n Debounces execution of a function.\n Borrowed from: https://medium.com/@_jh3y/throttling-and-debouncing-in-javascript-b01cad5c8edf\n\n @param {Integer} delay Miliseconds after when the function is called\n @param {Function} fn The function to call\n*/\n\nconst debounce = (delay, fn) => {\n let inDebounce\n return function (...args) {\n const context = this\n clearTimeout(inDebounce)\n inDebounce = setTimeout(() => fn.apply(context, args), delay)\n }\n}\n\n/*\n ------------------------------------------------------------------------------\n*/\n\nexport { throttle, debounce }\n","import { getElements } from 'js-utils/src/selector';\nimport { debounce } from 'js-utils/src/function';\n\nimport init from './init';\n\n// sets [data-omasks] on an element\n\ninit(() => {\n var elems = getElements('.js--omasks');\n if(!elems.length) return;\n\n const setAttrs = (elem) => {\n let edges = [];\n\n if(elem.scrollWidth > elem.offsetWidth) {\n if(elem.scrollLeft > 5) edges.push('left');\n if(elem.scrollLeft + elem.offsetWidth <= elem.scrollWidth - 5) edges.push('right');\n }\n\n // if(elem.scrollHeight > elem.offsetHeight) {\n // if(elem.scrollTop > 5) edges.push('top');\n // if(elem.scrollTop + elem.offsetHeight <= elem.scrollHeight - 5) edges.push('bottom');\n // }\n\n if(edges.length) {\n elem.setAttribute('data-omasks', edges.join(' '));\n }\n else {\n elem.removeAttribute('data-omasks');\n }\n };\n\n elems.forEach((elem) => {\n elem.addEventListener('scroll', () => {\n setAttrs(elem);\n });\n\n window.addEventListener('resize', debounce(300, () => {\n setAttrs(elem);\n }));\n\n setAttrs(elem);\n });\n});\n","import init from '../base/init';\n\n// Rails example\n// <%= link_to image_tag(\"logos/#{bg_color_type == 'dark' ? 'white' : 'purple'}.svg\", alt: 'Bilda logo'), root_path, data: { 'track-event': 'click', 'ga-category': 'ga cat', 'ga-action': 'ga action', 'ga-label': 'ga label', 'ga-value': '1' } %>\n\n// HTML Example\n// CLICK ME\n\ninit(() => {\n let internal = location.host.replace(\"www.\", \"\");\n internal = new RegExp(internal, \"i\");\n\n const a = document.getElementsByTagName(\"a\");\n\n for (let i = 0; i < a.length; i++) {\n const href = a[i].host; // set the host of each link\n if (!internal.test(href)) {\n a[i].setAttribute(\"target\", \"_blank\");\n a[i].setAttribute(\"rel\", \"noopener\");\n a[i].setAttribute(\"data-external\", \"true\");\n }\n }\n});\n\n/**\n * To track GA add the following properties to the data-track attribute:\n * ga_category (required)\n * ga_action (required)\n * ga_label\n * ga_value\n */\n\nfunction trackGoogleAnalyticsEvent(obj) {\n // Make sure GA is loaded\n // Set value to null unless it's a number.\n if(isNaN(obj.ga_value)) {\n obj.ga_value = null;\n }\n\n // Make sure both category and action is a string to send track event.\n if (\n typeof obj.ga_category === \"string\" &&\n typeof obj.ga_action === \"string\"\n ) {\n window.dataLayer.push({\n event: \"ga_event\",\n category: obj.ga_category,\n action: obj.ga_action,\n label: obj.ga_label,\n value: obj.ga_value,\n })\n }\n}\n\n// Select all elements with data-track-event=\"click\"\n// and setup event tracking for them\n\ninit(() => {\n if(!window.LEXNOVA.tracking.do_not_track) {\n const ga_event_clicks = document.querySelectorAll(\n \"[data-track-event='click']\"\n );\n\n ga_event_clicks.forEach(function(item) {\n item.addEventListener(\"click\", () => {\n trackGoogleAnalyticsEvent({\n ga_category: item.dataset.gaCategory || null,\n ga_action: item.dataset.gaAction || null,\n ga_label: item.dataset.gaLabel || null,\n ga_value: item.dataset.gaValue || null,\n });\n });\n });\n }\n});\n\n// Add event listener to any element with the data attribute\n// [data-external='true']\n\ninit(() => {\n const external_links = document.querySelectorAll(\n \"[data-external='true']\"\n );\n external_links.forEach(function(item) {\n item.addEventListener(\"click\", () => {\n trackGoogleAnalyticsEvent({\n ga_category: \"External Link\",\n ga_action: item.getAttribute(\"href\"),\n });\n });\n });\n});\n","/*!\n * Ahoy.js\n * Simple, powerful JavaScript analytics\n * https://github.com/ankane/ahoy.js\n * v0.3.9\n * MIT License\n */\n\n// https://www.quirksmode.org/js/cookies.html\n\nvar Cookies = {\n set: function (name, value, ttl, domain) {\n var expires = \"\";\n var cookieDomain = \"\";\n if (ttl) {\n var date = new Date();\n date.setTime(date.getTime() + (ttl * 60 * 1000));\n expires = \"; expires=\" + date.toGMTString();\n }\n if (domain) {\n cookieDomain = \"; domain=\" + domain;\n }\n document.cookie = name + \"=\" + escape(value) + expires + cookieDomain + \"; path=/\";\n },\n get: function (name) {\n var i, c;\n var nameEQ = name + \"=\";\n var ca = document.cookie.split(';');\n for (i = 0; i < ca.length; i++) {\n c = ca[i];\n while (c.charAt(0) === ' ') {\n c = c.substring(1, c.length);\n }\n if (c.indexOf(nameEQ) === 0) {\n return unescape(c.substring(nameEQ.length, c.length));\n }\n }\n return null;\n }\n};\n\nvar config = {\n urlPrefix: \"\",\n visitsUrl: \"/ahoy/visits\",\n eventsUrl: \"/ahoy/events\",\n page: null,\n platform: \"Web\",\n useBeacon: true,\n startOnReady: true,\n trackVisits: true,\n cookies: true,\n cookieDomain: null,\n headers: {},\n visitParams: {},\n withCredentials: false,\n visitDuration: 4 * 60, // default 4 hours\n visitorDuration: 2 * 365 * 24 * 60 // default 2 years\n};\n\nvar ahoy = window.ahoy || window.Ahoy || {};\n\nahoy.configure = function (options) {\n for (var key in options) {\n if (options.hasOwnProperty(key)) {\n config[key] = options[key];\n }\n }\n};\n\n// legacy\nahoy.configure(ahoy);\n\nvar $ = window.jQuery || window.Zepto || window.$;\nvar visitId, visitorId, track;\nvar isReady = false;\nvar queue = [];\nvar canStringify = typeof(JSON) !== \"undefined\" && typeof(JSON.stringify) !== \"undefined\";\nvar eventQueue = [];\n\nfunction visitsUrl() {\n return config.urlPrefix + config.visitsUrl;\n}\n\nfunction eventsUrl() {\n return config.urlPrefix + config.eventsUrl;\n}\n\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\nfunction canTrackNow() {\n return (config.useBeacon || config.trackNow) && isEmpty(config.headers) && canStringify && typeof(window.navigator.sendBeacon) !== \"undefined\" && !config.withCredentials;\n}\n\nfunction serialize(object) {\n var data = new FormData();\n for (var key in object) {\n if (object.hasOwnProperty(key)) {\n data.append(key, object[key]);\n }\n }\n return data;\n}\n\n// cookies\n\nfunction setCookie(name, value, ttl) {\n Cookies.set(name, value, ttl, config.cookieDomain || config.domain);\n}\n\nfunction getCookie(name) {\n return Cookies.get(name);\n}\n\nfunction destroyCookie(name) {\n Cookies.set(name, \"\", -1);\n}\n\nfunction log(message) {\n if (getCookie(\"ahoy_debug\")) {\n window.console.log(message);\n }\n}\n\nfunction setReady() {\n var callback;\n while ((callback = queue.shift())) {\n callback();\n }\n isReady = true;\n}\n\nahoy.ready = function (callback) {\n if (isReady) {\n callback();\n } else {\n queue.push(callback);\n }\n};\n\nfunction matchesSelector(element, selector) {\n var matches = element.matches ||\n element.matchesSelector ||\n element.mozMatchesSelector ||\n element.msMatchesSelector ||\n element.oMatchesSelector ||\n element.webkitMatchesSelector;\n\n if (matches) {\n if (matches.apply(element, [selector])) {\n return element;\n } else if (element.parentElement) {\n return matchesSelector(element.parentElement, selector);\n }\n return null;\n } else {\n log(\"Unable to match\");\n return null;\n }\n}\n\nfunction onEvent(eventName, selector, callback) {\n document.addEventListener(eventName, function (e) {\n var matchedElement = matchesSelector(e.target, selector);\n if (matchedElement) {\n callback.call(matchedElement, e);\n }\n });\n}\n\n// http://beeker.io/jquery-document-ready-equivalent-vanilla-javascript\nfunction documentReady(callback) {\n if (document.readyState === \"interactive\" || document.readyState === \"complete\") {\n setTimeout(callback, 0);\n } else {\n document.addEventListener(\"DOMContentLoaded\", callback);\n }\n}\n\n// https://stackoverflow.com/a/2117523/1177228\nfunction generateId() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n var r = Math.random()*16|0, v = c == 'x' ? r : (r&0x3|0x8);\n return v.toString(16);\n });\n}\n\nfunction saveEventQueue() {\n if (config.cookies && canStringify) {\n setCookie(\"ahoy_events\", JSON.stringify(eventQueue), 1);\n }\n}\n\n// from rails-ujs\n\nfunction csrfToken() {\n var meta = document.querySelector(\"meta[name=csrf-token]\");\n return meta && meta.content;\n}\n\nfunction csrfParam() {\n var meta = document.querySelector(\"meta[name=csrf-param]\");\n return meta && meta.content;\n}\n\nfunction CSRFProtection(xhr) {\n var token = csrfToken();\n if (token) { xhr.setRequestHeader(\"X-CSRF-Token\", token); }\n}\n\nfunction sendRequest(url, data, success) {\n if (canStringify) {\n if ($ && $.ajax) {\n $.ajax({\n type: \"POST\",\n url: url,\n data: JSON.stringify(data),\n contentType: \"application/json; charset=utf-8\",\n dataType: \"json\",\n beforeSend: CSRFProtection,\n success: success,\n headers: config.headers,\n xhrFields: {\n withCredentials: config.withCredentials\n }\n });\n } else {\n var xhr = new XMLHttpRequest();\n xhr.open(\"POST\", url, true);\n xhr.withCredentials = config.withCredentials;\n xhr.setRequestHeader(\"Content-Type\", \"application/json\");\n for (var header in config.headers) {\n if (config.headers.hasOwnProperty(header)) {\n xhr.setRequestHeader(header, config.headers[header]);\n }\n }\n xhr.onload = function() {\n if (xhr.status === 200) {\n success();\n }\n };\n CSRFProtection(xhr);\n xhr.send(JSON.stringify(data));\n }\n }\n}\n\nfunction eventData(event) {\n var data = {\n events: [event]\n };\n if (config.cookies) {\n data.visit_token = event.visit_token;\n data.visitor_token = event.visitor_token;\n }\n delete event.visit_token;\n delete event.visitor_token;\n return data;\n}\n\nfunction trackEvent(event) {\n ahoy.ready( function () {\n sendRequest(eventsUrl(), eventData(event), function() {\n // remove from queue\n for (var i = 0; i < eventQueue.length; i++) {\n if (eventQueue[i].id == event.id) {\n eventQueue.splice(i, 1);\n break;\n }\n }\n saveEventQueue();\n });\n });\n}\n\nfunction trackEventNow(event) {\n ahoy.ready( function () {\n var data = eventData(event);\n var param = csrfParam();\n var token = csrfToken();\n if (param && token) { data[param] = token; }\n // stringify so we keep the type\n data.events_json = JSON.stringify(data.events);\n delete data.events;\n window.navigator.sendBeacon(eventsUrl(), serialize(data));\n });\n}\n\nfunction page() {\n return config.page || window.location.pathname;\n}\n\nfunction presence(str) {\n return (str && str.length > 0) ? str : null;\n}\n\nfunction cleanObject(obj) {\n for (var key in obj) {\n if (obj.hasOwnProperty(key)) {\n if (obj[key] === null) {\n delete obj[key];\n }\n }\n }\n return obj;\n}\n\nfunction eventProperties() {\n return cleanObject({\n tag: this.tagName.toLowerCase(),\n id: presence(this.id),\n \"class\": presence(this.className),\n page: page(),\n section: getClosestSection(this)\n });\n}\n\nfunction getClosestSection(element) {\n for ( ; element && element !== document; element = element.parentNode) {\n if (element.hasAttribute('data-section')) {\n return element.getAttribute('data-section');\n }\n }\n\n return null;\n}\n\nfunction createVisit() {\n isReady = false;\n\n visitId = ahoy.getVisitId();\n visitorId = ahoy.getVisitorId();\n track = getCookie(\"ahoy_track\");\n\n if (config.cookies === false || config.trackVisits === false) {\n log(\"Visit tracking disabled\");\n setReady();\n } else if (visitId && visitorId && !track) {\n // TODO keep visit alive?\n log(\"Active visit\");\n setReady();\n } else {\n if (!visitId) {\n visitId = generateId();\n setCookie(\"ahoy_visit\", visitId, config.visitDuration);\n }\n\n // make sure cookies are enabled\n if (getCookie(\"ahoy_visit\")) {\n log(\"Visit started\");\n\n if (!visitorId) {\n visitorId = generateId();\n setCookie(\"ahoy_visitor\", visitorId, config.visitorDuration);\n }\n\n var data = {\n visit_token: visitId,\n visitor_token: visitorId,\n platform: config.platform,\n landing_page: window.location.href,\n screen_width: window.screen.width,\n screen_height: window.screen.height,\n js: true\n };\n\n // referrer\n if (document.referrer.length > 0) {\n data.referrer = document.referrer;\n }\n\n for (var key in config.visitParams) {\n if (config.visitParams.hasOwnProperty(key)) {\n data[key] = config.visitParams[key];\n }\n }\n\n log(data);\n\n sendRequest(visitsUrl(), data, function () {\n // wait until successful to destroy\n destroyCookie(\"ahoy_track\");\n setReady();\n });\n } else {\n log(\"Cookies disabled\");\n setReady();\n }\n }\n}\n\nahoy.getVisitId = ahoy.getVisitToken = function () {\n return getCookie(\"ahoy_visit\");\n};\n\nahoy.getVisitorId = ahoy.getVisitorToken = function () {\n return getCookie(\"ahoy_visitor\");\n};\n\nahoy.reset = function () {\n destroyCookie(\"ahoy_visit\");\n destroyCookie(\"ahoy_visitor\");\n destroyCookie(\"ahoy_events\");\n destroyCookie(\"ahoy_track\");\n return true;\n};\n\nahoy.debug = function (enabled) {\n if (enabled === false) {\n destroyCookie(\"ahoy_debug\");\n } else {\n setCookie(\"ahoy_debug\", \"t\", 365 * 24 * 60); // 1 year\n }\n return true;\n};\n\nahoy.track = function (name, properties) {\n // generate unique id\n var event = {\n name: name,\n properties: properties || {},\n time: (new Date()).getTime() / 1000.0,\n id: generateId(),\n js: true\n };\n\n ahoy.ready( function () {\n if (config.cookies && !ahoy.getVisitId()) {\n createVisit();\n }\n\n ahoy.ready( function () {\n log(event);\n\n event.visit_token = ahoy.getVisitId();\n event.visitor_token = ahoy.getVisitorId();\n\n if (canTrackNow()) {\n trackEventNow(event);\n } else {\n eventQueue.push(event);\n saveEventQueue();\n\n // wait in case navigating to reduce duplicate events\n setTimeout( function () {\n trackEvent(event);\n }, 1000);\n }\n });\n });\n\n return true;\n};\n\nahoy.trackView = function (additionalProperties) {\n var properties = {\n url: window.location.href,\n title: document.title,\n page: page()\n };\n\n if (additionalProperties) {\n for(var propName in additionalProperties) {\n if (additionalProperties.hasOwnProperty(propName)) {\n properties[propName] = additionalProperties[propName];\n }\n }\n }\n ahoy.track(\"$view\", properties);\n};\n\nahoy.trackClicks = function (selector) {\n if (selector === undefined) {\n log(\"trackClicks will require a selector in 0.4.0\");\n selector = \"a, button, input[type=submit]\";\n }\n onEvent(\"click\", selector, function (e) {\n var properties = eventProperties.call(this, e);\n properties.text = properties.tag == \"input\" ? this.value : (this.textContent || this.innerText || this.innerHTML).replace(/[\\s\\r\\n]+/g, \" \").trim();\n properties.href = this.href;\n ahoy.track(\"$click\", properties);\n });\n};\n\nahoy.trackSubmits = function (selector) {\n if (selector === undefined) {\n log(\"trackSubmits will require a selector in 0.4.0\");\n selector = \"form\";\n }\n onEvent(\"submit\", selector, function (e) {\n var properties = eventProperties.call(this, e);\n ahoy.track(\"$submit\", properties);\n });\n};\n\nahoy.trackChanges = function (selector) {\n if (selector === undefined) {\n // put here instead of above to prevent message with trackAll\n log(\"trackChanges is deprecated and will be removed in 0.4.0\");\n selector = \"input, textarea, select\";\n }\n onEvent(\"change\", selector, function (e) {\n var properties = eventProperties.call(this, e);\n ahoy.track(\"$change\", properties);\n });\n};\n\nahoy.trackAll = function() {\n log(\"trackAll is deprecated and will be removed in 0.4.0\");\n ahoy.trackView();\n ahoy.trackClicks(\"a, button, input[type=submit]\");\n ahoy.trackSubmits(\"form\");\n ahoy.trackChanges(\"input, textarea, select\");\n};\n\n// push events from queue\ntry {\n eventQueue = JSON.parse(getCookie(\"ahoy_events\") || \"[]\");\n} catch (e) {\n // do nothing\n}\n\nfor (var i = 0; i < eventQueue.length; i++) {\n trackEvent(eventQueue[i]);\n}\n\nahoy.start = function () {\n createVisit();\n\n ahoy.start = function () {};\n};\n\ndocumentReady(function() {\n if (config.startOnReady) {\n ahoy.start();\n }\n});\n\nexport default ahoy;\n","import ahoy from \"ahoy.js\";\n\n// Rails example\n// <%= link_to image_tag(\"logos/#{bg_color_type == 'dark' ? 'white' : 'purple'}.svg\", alt: 'Bilda logo'), root_path, data: { 'track-event': 'click', 'ga-category': 'ga cat', 'ga-action': 'ga action', 'ga-label': 'ga label', 'ga-value': '1' } %>\n\n// HTML Example\n// CLICK ME\n\nfunction eventTracking() {\n if (window.LEXNOVA.tracking.do_not_track) return;\n else if (ahoy || window.mixpanel) {\n return true;\n } else {\n return;\n }\n}\n\nfunction eventTrackingProps(props) {\n try {\n JSON.parse(props);\n } catch (e) {\n return;\n }\n return JSON.parse(props);\n}\n\nfunction eventTrackingTrack(name, props) {\n if (eventTracking() && typeof name === \"string\") {\n if (ahoy) {\n ahoy.track(name, props);\n }\n\n if (window.mixpanel) {\n window.mixpanel.track(name, props);\n }\n }\n}\n\nif (eventTracking()) {\n // Add event listener to any element with the data attribute\n // [data-track-event='click']\n document.addEventListener(\n \"DOMContentLoaded\",\n function() {\n const event_analytics_clicks = document.querySelectorAll(\n \"[data-track-event='click']\"\n );\n event_analytics_clicks.forEach(function(item) {\n item.addEventListener(\"click\", () => {\n eventTrackingTrack(\n item.dataset.eventName,\n eventTrackingProps(item.dataset.eventProperties)\n );\n });\n });\n },\n false\n );\n\n // Add event listener to any element with the data attribute\n // [data-external='true']\n document.addEventListener(\n \"DOMContentLoaded\",\n function() {\n const external_links = document.querySelectorAll(\n \"[data-external='true']\"\n );\n external_links.forEach(function(item) {\n item.addEventListener(\"click\", () => {\n eventTrackingTrack(\"External Link\", {\n url: item.getAttribute(\"href\")\n });\n });\n });\n },\n false\n );\n\n // Track any events defined in AET\n if (window.AET) {\n window.AET.forEach(item => {\n eventTrackingTrack(item.name, item.props);\n });\n }\n\n window.addEventListener(\"AET\", e => {\n eventTrackingTrack(e.detail.name, e.detail.props);\n });\n}\n","/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n( function( global, factory ) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, window */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory();\n } else {\n // Browser globals\n global.EvEmitter = factory();\n }\n\n}( typeof window != 'undefined' ? window : this, function() {\n\n\"use strict\";\n\nfunction EvEmitter() {}\n\nvar proto = EvEmitter.prototype;\n\nproto.on = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // set events hash\n var events = this._events = this._events || {};\n // set listeners array\n var listeners = events[ eventName ] = events[ eventName ] || [];\n // only add once\n if ( listeners.indexOf( listener ) == -1 ) {\n listeners.push( listener );\n }\n\n return this;\n};\n\nproto.once = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // add event\n this.on( eventName, listener );\n // set once flag\n // set onceEvents hash\n var onceEvents = this._onceEvents = this._onceEvents || {};\n // set onceListeners object\n var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};\n // set flag\n onceListeners[ listener ] = true;\n\n return this;\n};\n\nproto.off = function( eventName, listener ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n var index = listeners.indexOf( listener );\n if ( index != -1 ) {\n listeners.splice( index, 1 );\n }\n\n return this;\n};\n\nproto.emitEvent = function( eventName, args ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n // copy over to avoid interference if .off() in listener\n listeners = listeners.slice(0);\n args = args || [];\n // once stuff\n var onceListeners = this._onceEvents && this._onceEvents[ eventName ];\n\n for ( var i=0; i < listeners.length; i++ ) {\n var listener = listeners[i]\n var isOnce = onceListeners && onceListeners[ listener ];\n if ( isOnce ) {\n // remove listener\n // remove before trigger to prevent recursion\n this.off( eventName, listener );\n // unset once flag\n delete onceListeners[ listener ];\n }\n // trigger listener\n listener.apply( this, args );\n }\n\n return this;\n};\n\nproto.allOff = function() {\n delete this._events;\n delete this._onceEvents;\n};\n\nreturn EvEmitter;\n\n}));\n","/*!\n * imagesLoaded v4.1.4\n * JavaScript is all like \"You images are done yet or what?\"\n * MIT License\n */\n\n( function( window, factory ) { 'use strict';\n // universal module definition\n\n /*global define: false, module: false, require: false */\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'ev-emitter/ev-emitter'\n ], function( EvEmitter ) {\n return factory( window, EvEmitter );\n });\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n window,\n require('ev-emitter')\n );\n } else {\n // browser global\n window.imagesLoaded = factory(\n window,\n window.EvEmitter\n );\n }\n\n})( typeof window !== 'undefined' ? window : this,\n\n// -------------------------- factory -------------------------- //\n\nfunction factory( window, EvEmitter ) {\n\n'use strict';\n\nvar $ = window.jQuery;\nvar console = window.console;\n\n// -------------------------- helpers -------------------------- //\n\n// extend objects\nfunction extend( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n}\n\nvar arraySlice = Array.prototype.slice;\n\n// turn element or nodeList into an array\nfunction makeArray( obj ) {\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n return obj;\n }\n\n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if ( isArrayLike ) {\n // convert nodeList to array\n return arraySlice.call( obj );\n }\n\n // array of single index\n return [ obj ];\n}\n\n// -------------------------- imagesLoaded -------------------------- //\n\n/**\n * @param {Array, Element, NodeList, String} elem\n * @param {Object or Function} options - if function, use as callback\n * @param {Function} onAlways - callback function\n */\nfunction ImagesLoaded( elem, options, onAlways ) {\n // coerce ImagesLoaded() without new, to be new ImagesLoaded()\n if ( !( this instanceof ImagesLoaded ) ) {\n return new ImagesLoaded( elem, options, onAlways );\n }\n // use elem as selector string\n var queryElem = elem;\n if ( typeof elem == 'string' ) {\n queryElem = document.querySelectorAll( elem );\n }\n // bail if bad element\n if ( !queryElem ) {\n console.error( 'Bad element for imagesLoaded ' + ( queryElem || elem ) );\n return;\n }\n\n this.elements = makeArray( queryElem );\n this.options = extend( {}, this.options );\n // shift arguments if no options set\n if ( typeof options == 'function' ) {\n onAlways = options;\n } else {\n extend( this.options, options );\n }\n\n if ( onAlways ) {\n this.on( 'always', onAlways );\n }\n\n this.getImages();\n\n if ( $ ) {\n // add jQuery Deferred object\n this.jqDeferred = new $.Deferred();\n }\n\n // HACK check async to allow time to bind listeners\n setTimeout( this.check.bind( this ) );\n}\n\nImagesLoaded.prototype = Object.create( EvEmitter.prototype );\n\nImagesLoaded.prototype.options = {};\n\nImagesLoaded.prototype.getImages = function() {\n this.images = [];\n\n // filter & find items if we have an item selector\n this.elements.forEach( this.addElementImages, this );\n};\n\n/**\n * @param {Node} element\n */\nImagesLoaded.prototype.addElementImages = function( elem ) {\n // filter siblings\n if ( elem.nodeName == 'IMG' ) {\n this.addImage( elem );\n }\n // get background image on element\n if ( this.options.background === true ) {\n this.addElementBackgroundImages( elem );\n }\n\n // find children\n // no non-element nodes, #143\n var nodeType = elem.nodeType;\n if ( !nodeType || !elementNodeTypes[ nodeType ] ) {\n return;\n }\n var childImgs = elem.querySelectorAll('img');\n // concat childElems to filterFound array\n for ( var i=0; i < childImgs.length; i++ ) {\n var img = childImgs[i];\n this.addImage( img );\n }\n\n // get child background images\n if ( typeof this.options.background == 'string' ) {\n var children = elem.querySelectorAll( this.options.background );\n for ( i=0; i < children.length; i++ ) {\n var child = children[i];\n this.addElementBackgroundImages( child );\n }\n }\n};\n\nvar elementNodeTypes = {\n 1: true,\n 9: true,\n 11: true\n};\n\nImagesLoaded.prototype.addElementBackgroundImages = function( elem ) {\n var style = getComputedStyle( elem );\n if ( !style ) {\n // Firefox returns null if in a hidden iframe https://bugzil.la/548397\n return;\n }\n // get url inside url(\"...\")\n var reURL = /url\\((['\"])?(.*?)\\1\\)/gi;\n var matches = reURL.exec( style.backgroundImage );\n while ( matches !== null ) {\n var url = matches && matches[2];\n if ( url ) {\n this.addBackground( url, elem );\n }\n matches = reURL.exec( style.backgroundImage );\n }\n};\n\n/**\n * @param {Image} img\n */\nImagesLoaded.prototype.addImage = function( img ) {\n var loadingImage = new LoadingImage( img );\n this.images.push( loadingImage );\n};\n\nImagesLoaded.prototype.addBackground = function( url, elem ) {\n var background = new Background( url, elem );\n this.images.push( background );\n};\n\nImagesLoaded.prototype.check = function() {\n var _this = this;\n this.progressedCount = 0;\n this.hasAnyBroken = false;\n // complete if no images\n if ( !this.images.length ) {\n this.complete();\n return;\n }\n\n function onProgress( image, elem, message ) {\n // HACK - Chrome triggers event before object properties have changed. #83\n setTimeout( function() {\n _this.progress( image, elem, message );\n });\n }\n\n this.images.forEach( function( loadingImage ) {\n loadingImage.once( 'progress', onProgress );\n loadingImage.check();\n });\n};\n\nImagesLoaded.prototype.progress = function( image, elem, message ) {\n this.progressedCount++;\n this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded;\n // progress event\n this.emitEvent( 'progress', [ this, image, elem ] );\n if ( this.jqDeferred && this.jqDeferred.notify ) {\n this.jqDeferred.notify( this, image );\n }\n // check if completed\n if ( this.progressedCount == this.images.length ) {\n this.complete();\n }\n\n if ( this.options.debug && console ) {\n console.log( 'progress: ' + message, image, elem );\n }\n};\n\nImagesLoaded.prototype.complete = function() {\n var eventName = this.hasAnyBroken ? 'fail' : 'done';\n this.isComplete = true;\n this.emitEvent( eventName, [ this ] );\n this.emitEvent( 'always', [ this ] );\n if ( this.jqDeferred ) {\n var jqMethod = this.hasAnyBroken ? 'reject' : 'resolve';\n this.jqDeferred[ jqMethod ]( this );\n }\n};\n\n// -------------------------- -------------------------- //\n\nfunction LoadingImage( img ) {\n this.img = img;\n}\n\nLoadingImage.prototype = Object.create( EvEmitter.prototype );\n\nLoadingImage.prototype.check = function() {\n // If complete is true and browser supports natural sizes,\n // try to check for image status manually.\n var isComplete = this.getIsImageComplete();\n if ( isComplete ) {\n // report based on naturalWidth\n this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );\n return;\n }\n\n // If none of the checks above matched, simulate loading on detached element.\n this.proxyImage = new Image();\n this.proxyImage.addEventListener( 'load', this );\n this.proxyImage.addEventListener( 'error', this );\n // bind to image as well for Firefox. #191\n this.img.addEventListener( 'load', this );\n this.img.addEventListener( 'error', this );\n this.proxyImage.src = this.img.src;\n};\n\nLoadingImage.prototype.getIsImageComplete = function() {\n // check for non-zero, non-undefined naturalWidth\n // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671\n return this.img.complete && this.img.naturalWidth;\n};\n\nLoadingImage.prototype.confirm = function( isLoaded, message ) {\n this.isLoaded = isLoaded;\n this.emitEvent( 'progress', [ this, this.img, message ] );\n};\n\n// ----- events ----- //\n\n// trigger specified handler for event type\nLoadingImage.prototype.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\nLoadingImage.prototype.onload = function() {\n this.confirm( true, 'onload' );\n this.unbindEvents();\n};\n\nLoadingImage.prototype.onerror = function() {\n this.confirm( false, 'onerror' );\n this.unbindEvents();\n};\n\nLoadingImage.prototype.unbindEvents = function() {\n this.proxyImage.removeEventListener( 'load', this );\n this.proxyImage.removeEventListener( 'error', this );\n this.img.removeEventListener( 'load', this );\n this.img.removeEventListener( 'error', this );\n};\n\n// -------------------------- Background -------------------------- //\n\nfunction Background( url, element ) {\n this.url = url;\n this.element = element;\n this.img = new Image();\n}\n\n// inherit LoadingImage prototype\nBackground.prototype = Object.create( LoadingImage.prototype );\n\nBackground.prototype.check = function() {\n this.img.addEventListener( 'load', this );\n this.img.addEventListener( 'error', this );\n this.img.src = this.url;\n // check if image is already complete\n var isComplete = this.getIsImageComplete();\n if ( isComplete ) {\n this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' );\n this.unbindEvents();\n }\n};\n\nBackground.prototype.unbindEvents = function() {\n this.img.removeEventListener( 'load', this );\n this.img.removeEventListener( 'error', this );\n};\n\nBackground.prototype.confirm = function( isLoaded, message ) {\n this.isLoaded = isLoaded;\n this.emitEvent( 'progress', [ this, this.element, message ] );\n};\n\n// -------------------------- jQuery -------------------------- //\n\nImagesLoaded.makeJQueryPlugin = function( jQuery ) {\n jQuery = jQuery || window.jQuery;\n if ( !jQuery ) {\n return;\n }\n // set local variable\n $ = jQuery;\n // $().imagesLoaded()\n $.fn.imagesLoaded = function( options, callback ) {\n var instance = new ImagesLoaded( this, options, callback );\n return instance.jqDeferred.promise( $(this) );\n };\n};\n// try making plugin\nImagesLoaded.makeJQueryPlugin();\n\n// -------------------------- -------------------------- //\n\nreturn ImagesLoaded;\n\n});\n","// Grille: Masonry\n// Inspired by: https://medium.com/@andybarefoot/a-masonry-style-layout-using-css-grid-8c663d355ebb\n\nimport { getElements } from 'js-utils/src/selector';\nimport imagesLoaded from 'imagesloaded';\n\nimport init from '../base/init';\n\ninit(() => {\n if(!('gridTemplateRows' in document.createElement('div').style)) return;\n\n const containers = getElements('.grille--do-masonry');\n if(!containers.length) return;\n\n containers.forEach((container) => {\n const grid = container.querySelector('.grille__inner');\n\n const resizeItem = (item) => {\n const rowHeight = parseInt(window.getComputedStyle(grid).getPropertyValue('grid-auto-rows'));\n const rowGap = parseInt(window.getComputedStyle(grid).getPropertyValue('grid-row-gap'));\n const rowSpan = Math.ceil((item.querySelector('.grille__item__inner').getBoundingClientRect().height+rowGap)/(rowHeight+rowGap));\n item.style.gridRowEnd = `span ${rowSpan}`;\n };\n\n const resizeAllItems = () => {\n const allItems = grid.querySelectorAll('.grille__item');\n for(let x=0; x {\n const item = instance.elements[0];\n resizeItem(item);\n };\n\n container.classList.add('grille--masonry');\n window.addEventListener('resize', resizeAllItems);\n resizeAllItems();\n\n const allItems = grid.querySelectorAll('.grille__item');\n for(let x=0; x {\n const activeItems = containerEl.querySelectorAll(`${options.selItem}.${options.classItemActive}`)\n if(activeItems.length) {\n activeItems.forEach((activeItem) => {\n activeItem.classList.remove(options.classItemActive)\n })\n }\n }\n\n const addClassesUpTheTree = (button) => {\n let parentItem = button.closest(options.selItem)\n while(parentItem) {\n parentItem.classList.add(options.classItemActive)\n parentItem = parentItem.parentNode.closest(options.selItem)\n }\n }\n\n const onButtonKeyup = (e) => {\n if(e.keyCode != 9) return\n removeAllActiveClasses()\n addClassesUpTheTree(e.target)\n }\n\n const onItemMouseenter = (e) => {\n addClassesUpTheTree(e.target)\n }\n\n const onItemMouseleave = () => {\n removeAllActiveClasses()\n }\n\n const onButtonClick = (e) => {\n let parentItem = e.target.closest(options.selItem)\n if(parentItem.querySelector(options.selSub)) {\n e.preventDefault()\n const isActive = parentItem.classList.contains(options.classItemActive)\n removeAllActiveClasses()\n if(!isActive) {\n parentItem.classList.add(options.classItemActive)\n }\n // TODO: minify code with a custom parents(selector) function\n parentItem = parentItem.parentNode.closest(options.selItem)\n while(parentItem) {\n parentItem.classList.add(options.classItemActive)\n parentItem = parentItem.parentNode.closest(options.selItem)\n }\n // ---\n }\n }\n\n const onDocumentClick = (e) => { // remove all active classes on outside click\n let doRemove = true\n // TODO: minify code with a custom closest(selector/element) function\n let el = e.target.parentNode\n while(el) {\n if(el === containerEl) {\n doRemove = false\n break\n }\n el = el.parentNode\n }\n // ---\n if(doRemove) {\n removeAllActiveClasses()\n }\n }\n\n const onDocumentKeyup = (e) => { // remove all active classes on ESC key press\n if(e.keyCode != 27) return\n removeAllActiveClasses()\n }\n\n // instance public methods\n\n\t\tpublicMethods.destroy = () => { // destroy plugin, deassign tasks\n isInited = false\n removeAllActiveClasses()\n\n if(options.classEnabled) {\n containerEl.classList.remove(options.classEnabled)\n }\n\n // TODO: use kollegorna/js-utils/event/addEventListener to minify this\n // code with event namespaces\n buttons.forEach((button) => {\n if(options.click) {\n button.removeEventListener('click', onButtonClick)\n }\n\n if(options.mouseover) {\n const item = button.closest(options.selItem)\n item.removeEventListener('mouseenter', onItemMouseenter)\n item.removeEventListener('mouseleave', onItemMouseleave)\n }\n\n if(options.keypress) {\n button.removeEventListener('keyup', onButtonKeyup)\n }\n })\n\n if(options.outsideClick) {\n document.removeEventListener('click', onDocumentClick)\n }\n\n if(options.escPress) {\n document.removeEventListener('keyup', onDocumentKeyup)\n }\n // ---\n\t\t}\n\n\t\tpublicMethods.init = (optionsNew) => { // init plugin, assign tasks\n if(isInited) return\n\n isInited = true\n options = Object.assign({}, optionsDefault, optionsNew)\n buttons = containerEl.querySelectorAll(options.selButton)\n\n buttons.forEach((button) => {\n if(options.click) {\n button.addEventListener('click', onButtonClick)\n }\n\n if(options.mouseover) {\n const item = button.closest(options.selItem)\n item.addEventListener('mouseenter', onItemMouseenter)\n item.addEventListener('mouseleave', onItemMouseleave)\n }\n\n if(options.keypress) {\n button.addEventListener('keyup', onButtonKeyup)\n }\n })\n\n if(options.outsideClick) {\n document.addEventListener('click', onDocumentClick)\n }\n\n if(options.escPress) {\n document.addEventListener('keyup', onDocumentKeyup)\n }\n\n if(options.classEnabled) {\n containerEl.classList.add(options.classEnabled)\n }\n\t\t}\n\n\t\tpublicMethods.init(optionsNew)\n\n\t\treturn publicMethods\n\t}\n\n\treturn Plugin\n}))\n","import { getElements } from 'js-utils/src/selector';\nimport { addEventListener } from 'js-utils/src/event';\nimport { removeClass, toggleClass } from 'js-utils/src/attribute';\nimport accessibleNav from 'accessiblenav.js';\n\nimport init from '../base/init';\n\ninit(() => {\n // scrolled\n const header = document.querySelector('.header');\n if(header) {\n const setScrolled = () => toggleClass(header, 'header--scrolled', window.pageYOffset > 0);\n window.addEventListener('scroll', setScrolled);\n setScrolled();\n }\n\n // nav toggling\n const togglers = getElements('.header-tgl');\n if(togglers.length) {\n addEventListener(togglers, 'click', function(e, triggerEl) {\n e.preventDefault();\n const nav = triggerEl.closest('.header-nav');\n if(nav) {\n const isActive = nav.classList.contains('--active');\n removeClass('.header-nav', '--active');\n nav.classList.toggle('--active', !isActive);\n }\n });\n }\n\n // dropdown for main nav\n const navMain = document.querySelector('.header-nav--main');\n if(navMain) {\n accessibleNav(navMain, {\n selSub: 'ul',\n selItem: 'li',\n selButton: 'a',\n classItemActive: 'do-show-sub', // doesn't work in IE with -- prefix\n classEnabled: false,\n click: true,\n mouseover: false,\n keypress: true,\n outsideClick: true,\n escPress: true,\n });\n }\n\n // dropdown for hnav\n const navBar = document.querySelector('.nav-bar__container');\n if(navBar) {\n accessibleNav(navBar, {\n selSub: 'ul',\n selItem: 'li',\n selButton: 'a',\n classItemActive: 'do-show-sub', // doesn't work in IE with -- prefix\n classEnabled: false,\n click: true,\n mouseover: false,\n keypress: true,\n outsideClick: true,\n escPress: true,\n });\n }\n\n // test button\n const testBtn = document.querySelector('.header .-test-btn');\n if(testBtn) {\n window.addEventListener('scroll', () => {\n toggleClass(testBtn, '--visible', window.pageYOffset > 400);\n });\n }\n});\n","/* global NodeList, Element, Event, define */\n\n;(function (global) {\n 'use strict'\n\n var FOCUSABLE_ELEMENTS = [\n 'a[href]:not([tabindex^=\"-\"]):not([inert])',\n 'area[href]:not([tabindex^=\"-\"]):not([inert])',\n 'input:not([disabled]):not([inert])',\n 'select:not([disabled]):not([inert])',\n 'textarea:not([disabled]):not([inert])',\n 'button:not([disabled]):not([inert])',\n 'iframe:not([tabindex^=\"-\"]):not([inert])',\n 'audio:not([tabindex^=\"-\"]):not([inert])',\n 'video:not([tabindex^=\"-\"]):not([inert])',\n '[contenteditable]:not([tabindex^=\"-\"]):not([inert])',\n '[tabindex]:not([tabindex^=\"-\"]):not([inert])',\n ]\n var TAB_KEY = 9\n var ESCAPE_KEY = 27\n var focusedBeforeDialog\n\n /**\n * Define the constructor to instantiate a dialog\n *\n * @constructor\n * @param {Element} node\n * @param {(NodeList | Element | string)} targets\n */\n function A11yDialog(node, targets) {\n // Prebind the functions that will be bound in addEventListener and\n // removeEventListener to avoid losing references\n this._show = this.show.bind(this)\n this._hide = this.hide.bind(this)\n this._maintainFocus = this._maintainFocus.bind(this)\n this._bindKeypress = this._bindKeypress.bind(this)\n\n // Keep a reference of the node and the actual dialog on the instance\n this.container = node\n this.dialog = node.querySelector(\n 'dialog, [role=\"dialog\"], [role=\"alertdialog\"]'\n )\n this.role = this.dialog.getAttribute('role') || 'dialog'\n this.useDialog =\n 'show' in document.createElement('dialog') &&\n this.dialog.nodeName === 'DIALOG'\n\n // Keep an object of listener types mapped to callback functions\n this._listeners = {}\n\n // Initialise everything needed for the dialog to work properly\n this.create(targets)\n }\n\n /**\n * Set up everything necessary for the dialog to be functioning\n *\n * @param {(NodeList | Element | string)} targets\n * @return {this}\n */\n A11yDialog.prototype.create = function (targets) {\n // Keep a collection of nodes to disable/enable when toggling the dialog\n this._targets =\n this._targets || collect(targets) || getSiblings(this.container)\n\n // Set the `shown` property to match the status from the DOM\n this.shown = this.dialog.hasAttribute('open')\n\n // Despite using a `` element, `role=\"dialog\"` is not necessarily\n // implied by all screen-readers (yet)\n // See: https://github.com/edenspiekermann/a11y-dialog/commit/6ba711a777aed0dbda0719a18a02f742098c64d9#commitcomment-28694166\n this.dialog.setAttribute('role', this.role)\n\n if (!this.useDialog) {\n if (this.shown) {\n this.container.removeAttribute('aria-hidden')\n } else {\n this.container.setAttribute('aria-hidden', true)\n }\n } else {\n this.container.setAttribute('data-a11y-dialog-native', '')\n // Remove initial `aria-hidden` from container\n // See: https://github.com/edenspiekermann/a11y-dialog/pull/117#issuecomment-706056246\n this.container.removeAttribute('aria-hidden')\n }\n\n // Keep a collection of dialog openers, each of which will be bound a click\n // event listener to open the dialog\n this._openers = $$('[data-a11y-dialog-show=\"' + this.container.id + '\"]')\n this._openers.forEach(\n function (opener) {\n opener.addEventListener('click', this._show)\n }.bind(this)\n )\n\n // Keep a collection of dialog closers, each of which will be bound a click\n // event listener to close the dialog\n this._closers = $$('[data-a11y-dialog-hide]', this.container).concat(\n $$('[data-a11y-dialog-hide=\"' + this.container.id + '\"]')\n )\n this._closers.forEach(\n function (closer) {\n closer.addEventListener('click', this._hide)\n }.bind(this)\n )\n\n // Execute all callbacks registered for the `create` event\n this._fire('create')\n\n return this\n }\n\n /**\n * Show the dialog element, disable all the targets (siblings), trap the\n * current focus within it, listen for some specific key presses and fire all\n * registered callbacks for `show` event\n *\n * @param {Event} event\n * @return {this}\n */\n A11yDialog.prototype.show = function (event) {\n // If the dialog is already open, abort\n if (this.shown) {\n return this\n }\n\n this.shown = true\n\n // Keep a reference to the currently focused element to be able to restore\n // it later\n focusedBeforeDialog = document.activeElement\n\n if (this.useDialog) {\n this.dialog.showModal(event instanceof Event ? void 0 : event)\n } else {\n this.dialog.setAttribute('open', '')\n this.container.removeAttribute('aria-hidden')\n\n // Iterate over the targets to disable them by setting their `aria-hidden`\n // attribute to `true` and, if present, storing the current value of `aria-hidden`\n this._targets.forEach(function (target) {\n if (target.hasAttribute('aria-hidden')) {\n target.setAttribute(\n 'data-a11y-dialog-original-aria-hidden',\n target.getAttribute('aria-hidden')\n )\n }\n target.setAttribute('aria-hidden', 'true')\n })\n }\n\n // Set the focus to the first focusable child of the dialog element\n setFocusToFirstItem(this.dialog)\n\n // Bind a focus event listener to the body element to make sure the focus\n // stays trapped inside the dialog while open, and start listening for some\n // specific key presses (TAB and ESC)\n document.body.addEventListener('focus', this._maintainFocus, true)\n document.addEventListener('keydown', this._bindKeypress)\n\n // Execute all callbacks registered for the `show` event\n this._fire('show', event)\n\n return this\n }\n\n /**\n * Hide the dialog element, enable all the targets (siblings), restore the\n * focus to the previously active element, stop listening for some specific\n * key presses and fire all registered callbacks for `hide` event\n *\n * @param {Event} event\n * @return {this}\n */\n A11yDialog.prototype.hide = function (event) {\n // If the dialog is already closed, abort\n if (!this.shown) {\n return this\n }\n\n this.shown = false\n\n if (this.useDialog) {\n this.dialog.close(event instanceof Event ? void 0 : event)\n } else {\n this.dialog.removeAttribute('open')\n this.container.setAttribute('aria-hidden', 'true')\n\n // Iterate over the targets to enable them by removing their `aria-hidden`\n // attribute or resetting it to its original value\n this._targets.forEach(function (target) {\n if (target.hasAttribute('data-a11y-dialog-original-aria-hidden')) {\n target.setAttribute(\n 'aria-hidden',\n target.getAttribute('data-a11y-dialog-original-aria-hidden')\n )\n target.removeAttribute('data-a11y-dialog-original-aria-hidden')\n } else {\n target.removeAttribute('aria-hidden')\n }\n })\n }\n\n // If there was a focused element before the dialog was opened (and it has a\n // `focus` method), restore the focus back to it\n // See: https://github.com/edenspiekermann/a11y-dialog/issues/108\n if (focusedBeforeDialog && focusedBeforeDialog.focus) {\n focusedBeforeDialog.focus()\n }\n\n // Remove the focus event listener to the body element and stop listening\n // for specific key presses\n document.body.removeEventListener('focus', this._maintainFocus, true)\n document.removeEventListener('keydown', this._bindKeypress)\n\n // Execute all callbacks registered for the `hide` event\n this._fire('hide', event)\n\n return this\n }\n\n /**\n * Destroy the current instance (after making sure the dialog has been hidden)\n * and remove all associated listeners from dialog openers and closers\n *\n * @return {this}\n */\n A11yDialog.prototype.destroy = function () {\n // Hide the dialog to avoid destroying an open instance\n this.hide()\n\n // Remove the click event listener from all dialog openers\n this._openers.forEach(\n function (opener) {\n opener.removeEventListener('click', this._show)\n }.bind(this)\n )\n\n // Remove the click event listener from all dialog closers\n this._closers.forEach(\n function (closer) {\n closer.removeEventListener('click', this._hide)\n }.bind(this)\n )\n\n // Execute all callbacks registered for the `destroy` event\n this._fire('destroy')\n\n // Keep an object of listener types mapped to callback functions\n this._listeners = {}\n\n return this\n }\n\n /**\n * Register a new callback for the given event type\n *\n * @param {string} type\n * @param {Function} handler\n */\n A11yDialog.prototype.on = function (type, handler) {\n if (typeof this._listeners[type] === 'undefined') {\n this._listeners[type] = []\n }\n\n this._listeners[type].push(handler)\n\n return this\n }\n\n /**\n * Unregister an existing callback for the given event type\n *\n * @param {string} type\n * @param {Function} handler\n */\n A11yDialog.prototype.off = function (type, handler) {\n var index = this._listeners[type].indexOf(handler)\n\n if (index > -1) {\n this._listeners[type].splice(index, 1)\n }\n\n return this\n }\n\n /**\n * Iterate over all registered handlers for given type and call them all with\n * the dialog element as first argument, event as second argument (if any).\n *\n * @access private\n * @param {string} type\n * @param {Event} event\n */\n A11yDialog.prototype._fire = function (type, event) {\n var listeners = this._listeners[type] || []\n\n listeners.forEach(\n function (listener) {\n listener(this.container, event)\n }.bind(this)\n )\n }\n\n /**\n * Private event handler used when listening to some specific key presses\n * (namely ESCAPE and TAB)\n *\n * @access private\n * @param {Event} event\n */\n A11yDialog.prototype._bindKeypress = function (event) {\n // If the dialog is shown and the ESCAPE key is being pressed, prevent any\n // further effects from the ESCAPE key and hide the dialog, unless its role\n // is 'alertdialog', which should be modal\n if (\n this.shown &&\n event.which === ESCAPE_KEY &&\n this.role !== 'alertdialog'\n ) {\n event.preventDefault()\n this.hide(event)\n }\n\n // If the dialog is shown and the TAB key is being pressed, make sure the\n // focus stays trapped within the dialog element\n if (this.shown && event.which === TAB_KEY) {\n trapTabKey(this.dialog, event)\n }\n }\n\n /**\n * Private event handler used when making sure the focus stays within the\n * currently open dialog\n *\n * @access private\n * @param {Event} event\n */\n A11yDialog.prototype._maintainFocus = function (event) {\n // If the dialog is shown and the focus is not within the dialog element,\n // move it back to its first focusable child\n if (this.shown && !this.container.contains(event.target)) {\n setFocusToFirstItem(this.dialog)\n }\n }\n\n /**\n * Convert a NodeList into an array\n *\n * @param {NodeList} collection\n * @return {Array}\n */\n function toArray(collection) {\n return Array.prototype.slice.call(collection)\n }\n\n /**\n * Query the DOM for nodes matching the given selector, scoped to context (or\n * the whole document)\n *\n * @param {String} selector\n * @param {Element} [context = document]\n * @return {Array}\n */\n function $$(selector, context) {\n return toArray((context || document).querySelectorAll(selector))\n }\n\n /**\n * Return an array of Element based on given argument (NodeList, Element or\n * string representing a selector)\n *\n * @param {(NodeList | Element | string)} target\n * @return {Array}\n */\n function collect(target) {\n if (NodeList.prototype.isPrototypeOf(target)) {\n return toArray(target)\n }\n\n if (Element.prototype.isPrototypeOf(target)) {\n return [target]\n }\n\n if (typeof target === 'string') {\n return $$(target)\n }\n }\n\n /**\n * Set the focus to the first element with `autofocus` or the first focusable\n * child of the given element\n *\n * @param {Element} node\n */\n function setFocusToFirstItem(node) {\n var focusableChildren = getFocusableChildren(node)\n var focused = node.querySelector('[autofocus]') || focusableChildren[0]\n\n if (focused) {\n focused.focus()\n }\n }\n\n /**\n * Get the focusable children of the given element\n *\n * @param {Element} node\n * @return {Array}\n */\n function getFocusableChildren(node) {\n return $$(FOCUSABLE_ELEMENTS.join(','), node).filter(function (child) {\n return !!(\n child.offsetWidth ||\n child.offsetHeight ||\n child.getClientRects().length\n )\n })\n }\n\n /**\n * Trap the focus inside the given element\n *\n * @param {Element} node\n * @param {Event} event\n */\n function trapTabKey(node, event) {\n var focusableChildren = getFocusableChildren(node)\n var focusedItemIndex = focusableChildren.indexOf(document.activeElement)\n\n // If the SHIFT key is being pressed while tabbing (moving backwards) and\n // the currently focused item is the first one, move the focus to the last\n // focusable item from the dialog element\n if (event.shiftKey && focusedItemIndex === 0) {\n focusableChildren[focusableChildren.length - 1].focus()\n event.preventDefault()\n // If the SHIFT key is not being pressed (moving forwards) and the currently\n // focused item is the last one, move the focus to the first focusable item\n // from the dialog element\n } else if (\n !event.shiftKey &&\n focusedItemIndex === focusableChildren.length - 1\n ) {\n focusableChildren[0].focus()\n event.preventDefault()\n }\n }\n\n /**\n * Retrieve siblings from given element\n *\n * @param {Element} node\n * @return {Array}\n */\n function getSiblings(node) {\n var nodes = toArray(node.parentNode.childNodes)\n var siblings = nodes.filter(function (node) {\n return node.nodeType === 1\n })\n\n siblings.splice(siblings.indexOf(node), 1)\n\n return siblings\n }\n\n function instantiateDialogs() {\n $$('[data-a11y-dialog]').forEach(function (node) {\n new A11yDialog(node, node.getAttribute('data-a11y-dialog') || undefined)\n })\n }\n\n if (typeof global.document !== 'undefined') {\n var document = global.document\n\n if (document.readyState === 'loading') {\n document.addEventListener('DOMContentLoaded', instantiateDialogs)\n } else {\n if (global.requestAnimationFrame) {\n global.requestAnimationFrame(instantiateDialogs)\n } else {\n global.setTimeout(instantiateDialogs, 16)\n }\n }\n }\n\n if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {\n module.exports = A11yDialog\n } else if (typeof define === 'function' && define.amd) {\n define('A11yDialog', [], function () {\n return A11yDialog\n })\n } else if (typeof global === 'object') {\n global.A11yDialog = A11yDialog\n }\n})(typeof global !== 'undefined' ? global : window)\n","import A11yDialog from \"a11y-dialog\";\nimport { getElements, hasClosest } from \"js-utils/src/selector\";\nimport { delegateEventListener } from \"js-utils/src/event\";\nimport Cookies from \"js-cookie\";\n\nimport init from \"../base/init\";\n\ninit(() => {\n const elements = getElements(\".a11ydialog\");\n if (!elements.length) return;\n\n elements.forEach((element) => {\n const Dialog = new A11yDialog(\n element,\n document.querySelectorAll(\"body > *:not(.a11ydialog)\")\n );\n\n element.A11yDialogInstance = Dialog;\n\n Dialog.on(\"show\", () =>\n document.documentElement.classList.add(\"--disable-scroll\")\n );\n Dialog.on(\"hide\", () =>\n document.documentElement.classList.remove(\"--disable-scroll\")\n );\n\n element.addEventListener(\"scroll-to-top\", () => {\n element.querySelector(\".a11ydialog__vcenter > div\").scrollTop = 0;\n });\n\n // close on outside click\n if (element.classList.contains(\"js--a11ydialog-close-outside-click\")) {\n const contentEl = element.querySelector(\".js--a11ydialog-content\");\n if (contentEl) {\n element.addEventListener(\"click\", (e) => {\n if (!hasClosest(e.target, contentEl)) {\n Dialog.hide();\n }\n });\n }\n }\n\n // Open the Save to Library modal automatically, if the URL param includes it\n const saveToLibrary = document.querySelector(\n 'input[name=\"save_to_library\"]'\n );\n\n if (saveToLibrary) {\n if (\n element.id === \"library-save-form-modal\" &&\n saveToLibrary.value === \"true\"\n ) {\n if (element.A11yDialogInstance) element.A11yDialogInstance.show();\n }\n }\n\n // Open the migration modal, if the URL param includes it\n const showMigration = document.querySelector(\n 'input[name=\"show_migration\"]'\n );\n\n if (showMigration) {\n if (\n element.id === \"sign-migration-dialog\" &&\n showMigration.value === \"true\"\n ) {\n if (element.A11yDialogInstance) element.A11yDialogInstance.show();\n }\n }\n\n // Open the newsletter modal only if the element exists and the cookie is not set\n // const showNewsletter = document.querySelector(\n // 'input[name=\"show_newsletter\"]'\n // );\n\n // if (showNewsletter) {\n // if (element.id === \"newsletter-modal\") {\n // setTimeout(function () {\n // if (element.A11yDialogInstance && !Cookies.get(\"newsletter_seen\")) {\n // element.A11yDialogInstance.show();\n // Cookies.set(\"newsletter_seen\", \"true\", { expires: 121 });\n // }\n // }, 5000);\n // }\n // }\n });\n\n delegateEventListener(\"[data-a11y-dialog-show]\", \"click\", (e) => {\n e.preventDefault();\n });\n});\n","// filter's panel toggler for mobile\n\nimport init from '../base/init';\n\ninit(() => {\n const toggler = document.querySelector('.search-aside__toggler button');\n if(!toggler) return;\n\n const container = toggler.closest('.search-aside');\n const closeBtn = container.querySelector('.search-aside__form__close');\n\n toggler.addEventListener('click', (e) => {\n e.preventDefault();\n container.classList.toggle('--toggled-on');\n document.documentElement.classList.toggle('--disable-scroll');\n if(container.classList.contains('--toggled-on')) {\n closeBtn.focus();\n }\n });\n\n closeBtn.addEventListener('click', (e) => {\n e.preventDefault();\n toggler.click();\n });\n});\n","import { getElements } from 'js-utils/src/selector';\nimport { removeClass } from 'js-utils/src/attribute';\nimport { addEventListener } from 'js-utils/src/event';\nimport init from '../base/init';\n\n// toggle children checkboxes on parental checkbox change\n\ninit(() => {\n const triggers = getElements('.categories-search-filter .checkbox.\\\\--root input[type=checkbox]');\n if(!triggers.length) return;\n\n triggers.forEach((trigger) => {\n trigger.addEventListener('change', () => {\n getElements('ul .checkbox input[type=checkbox]', trigger.closest('li')).forEach((checkbox) => {\n checkbox.checked = trigger.checked;\n });\n });\n });\n});\n\n// expand/collapse children checkbox lists on toggle click\n\ninit(() => {\n const togglers = getElements('.categories-search-filter li button');\n if(!togglers.length) return;\n\n togglers.forEach((toggler) => {\n toggler.addEventListener('click', (e) => {\n e.preventDefault();\n const sub = toggler.closest('li').querySelector('ul');\n sub.classList.toggle('--display');\n sub.classList.add('--display-triggered');\n toggler.classList.toggle('--expanded');\n });\n });\n});\n\n// display sublists that have at least one checkbox checked on page load\n\ninit(() => {\n const roots = getElements('.categories-search-filter > ul > li');\n if(!roots.length) return;\n\n roots.forEach((root) => {\n const subTotal = root.querySelectorAll('.checkbox:not(.\\\\--root) input[type=checkbox]').length;\n if(subTotal) {\n const subChecked = root.querySelectorAll('.checkbox:not(.\\\\--root) input[type=checkbox]:checked').length;\n if(subChecked && subChecked != subTotal) {\n root.querySelector('button').classList.add('--expanded');\n root.querySelector('ul').classList.add('--display');\n }\n }\n });\n});\n\n// toggle all checkboxes\n\ninit(() => {\n const togglers = document.querySelectorAll('.categories-search-filter .-toggle-all');\n if(!togglers.length) return;\n\n togglers.forEach(toggler => {\n const checkboxes = toggler.closest('.categories-search-filter').querySelectorAll('.checkbox input[type=checkbox]');\n\n toggler.addEventListener('click', (e) => {\n e.preventDefault();\n checkboxes.forEach(i => i.checked = true);\n });\n });\n});\n\n// untoggle all checkboxes\n\ninit(() => {\n const togglers = document.querySelectorAll('.categories-search-filter .-untoggle-all');\n if(!togglers.length) return;\n\n togglers.forEach(toggler => {\n const checkboxes = toggler.closest('.categories-search-filter').querySelectorAll('.checkbox input[type=checkbox]');\n\n toggler.addEventListener('click', (e) => {\n e.preventDefault();\n checkboxes.forEach(i => i.checked = false);\n });\n });\n});\n\n// visually preselect parent categories\n\ninit(() => {\n const checkboxes = getElements('.categories-search-filter li li input[type=checkbox]');\n if(!checkboxes.length) return;\n\n checkboxes.forEach(checkbox => {\n const parent = checkbox.closest('ul');\n const parentCheck = parent.closest('li').querySelector('.checkbox.\\\\--root');\n const parentCheckbox = parentCheck.querySelector('input[type=checkbox]');\n\n if(checkbox.checked) {\n parentCheck.classList.add('checkbox--preselected');\n }\n\n parentCheckbox.addEventListener('change', () =>\n parentCheck.classList.remove('checkbox--preselected')\n );\n\n checkbox.addEventListener('change', () => {\n const childCheckboxes = parent.querySelectorAll('input[type=checkbox]');\n const childCheckboxesChecked = parent.querySelectorAll('input[type=checkbox]:checked');\n\n parentCheck.classList.toggle('checkbox--preselected', childCheckboxesChecked.length > 0);\n parentCheckbox.checked = childCheckboxes.length === childCheckboxesChecked.length;\n });\n });\n\n addEventListener(\n document.querySelectorAll('.categories-search-filter .-untoggle-all'),\n 'click',\n () => removeClass(\n document.querySelectorAll('.categories-search-filter .checkbox--preselected'),\n 'checkbox--preselected'\n ),\n );\n});\n","import init from \"../base/init\";\nimport { addEventListener } from \"js-utils/src/event\";\nimport { addClass, removeClass } from \"js-utils/src/attribute\";\nimport { getElements } from \"js-utils/src/selector\";\n\ninit(() => {\n const dateTypeInput = getElements(\".js--date-filter-type\");\n const dateFromInput = getElements(\".js--date-filter-from\")[0];\n const dateToInput = getElements(\".js--date-filter-to\")[0];\n\n if (dateTypeInput.length >= 1) {\n const ToggleHiddenInputs = value => {\n if (value === \"\" || value === undefined) {\n addClass(dateFromInput.parentElement, \"is-hidden\");\n addClass(dateToInput.parentElement, \"is-hidden\");\n return;\n }\n removeClass(dateFromInput.parentElement, \"is-hidden\");\n removeClass(dateToInput.parentElement, \"is-hidden\");\n };\n const ToggleDisableInputs = value => {\n if (value === \"\" || value === undefined) {\n dateFromInput.setAttribute(\"disabled\", true);\n dateFromInput.value = \"\";\n dateToInput.setAttribute(\"disabled\", true);\n dateToInput.value = \"\";\n return;\n }\n if (dateFromInput.getAttribute(\"disabled\")) {\n dateFromInput.removeAttribute(\"disabled\");\n dateToInput.removeAttribute(\"disabled\");\n return;\n }\n };\n\n addEventListener(dateTypeInput, \"change\", e => {\n ToggleHiddenInputs(e.currentTarget.value);\n ToggleDisableInputs(e.currentTarget.value);\n });\n\n if (dateTypeInput.value !== \"\") {\n ToggleHiddenInputs(dateTypeInput[0].value);\n ToggleDisableInputs(dateTypeInput[0].value);\n }\n }\n});\n","import { getElements } from 'js-utils/src/selector';\n\nimport init from '../../common/base/init';\n\nconst makeToggable = (toggler) => {\n const list = toggler.closest(`ul`);\n const listItem = toggler.closest(`li`);\n list.classList.add(`--display-triggered`)\n listItem.querySelector(`button`).classList.toggle(`--expanded`)\n\n // Toggle sub folders\n Array.from(list.querySelectorAll(`:scope > li > ul`)).map(x => x.classList.toggle(`--display`))\n}\n\ninit(() => {\n const togglers = getElements('.library-folders li label.-folder');\n if(!togglers.length) return;\n\n togglers.forEach((toggler) => {\n toggler.addEventListener('click', e => {\n e.preventDefault();\n\n if(window.location.href.includes(\"ordlista\")) {\n const sub = toggler.closest('li').querySelectorAll(':scope > ul');\n\n sub.forEach(function(ul) {\n ul.classList.toggle('--display');\n ul.classList.add('--display-triggered');\n });\n\n toggler.closest('li').querySelector('button').classList.toggle('--expanded');\n } else {\n fetchContents(e, toggler)\n\n makeToggable(toggler)\n }\n });\n });\n});\n\nconst fetchContents = (e) => {\n const folderList = e.currentTarget.closest(`ul`)\n const folderId = folderList.dataset.folderId\n const folderName = folderList.dataset.folderName\n const parentName = folderList.dataset.parentName\n\n let url\n if (window.location.href.includes(\"arkiv\")){\n let root_url = `${window.location.href.replace(\"/arkiv\", \"\")}/api`\n if (folderId === '' || folderId === 'null'){\n url = `${root_url}?archive=${true}&archive_type=court_case&folder_name=${folderName}&parent_name=${parentName}`\n } else {\n url = `${root_url}/${folderId}?archive=${true}`\n }\n }else{\n url = `${window.location.href}/api/${folderId}`\n }\n\n if(!folderList.dataset.fetched) {\n fetch(`${url}`).then(response => response.json()).then(json => {\n const folders = []\n const files = []\n const fileContainer = document.createElement(`ul`)\n fileContainer.classList.add(`--display`)\n fileContainer.classList.add(`--display-triggered`)\n const dataLastVisitedAtEl = document.querySelector('[data-last-visited-at]')\n\n Array.from(json.folders).map(folder => {\n const list = document.createElement(`ul`)\n const labelContainer = document.createElement(`li`)\n const folderSvg = document.getElementsByClassName(`pkg-folder-icon`)[0].cloneNode(true)\n\n folderSvg.classList.remove(`pkg-folder-icon`)\n\n list.classList.add(`--display`);\n list.classList.add(`--display-triggered`);\n list.dataset.newItems = false;\n list.dataset.folderId = folder.id;\n list.dataset.folderName = folder.name;\n list.dataset.parentName = folder.parent_name;\n\n const isNew = new Date(dataLastVisitedAtEl.dataset.lastVisitedAt) < new Date(folder.last_published_at);\n\n labelContainer.classList.add(`--expandable-any`)\n labelContainer.insertAdjacentHTML(`afterbegin`, `\n \n ${folder.name}\n ${isNew || folder.is_new ? `Nytt` : ``}\n \n Toggle list\n `);\n\n labelContainer.querySelector(`label`) .insertAdjacentElement(`afterbegin`, folderSvg)\n list.insertAdjacentElement(`beforeend`, labelContainer)\n\n list.addEventListener(`click`, e => fetchContents(e))\n\n folders.push(list)\n })\n\n Array.from(json.files).map(file => {\n const labelContainer = document.createElement(`li`)\n labelContainer.className = `--searchable-files`\n\n const fileSvg = document.getElementsByClassName(`pkg-file-icon`)[0].cloneNode(true)\n\n fileSvg.classList.remove(`pkg-file-icon`)\n const isNew = new Date(dataLastVisitedAtEl.dataset.lastVisitedAt) < new Date(file.created_at);\n\n labelContainer.insertAdjacentHTML(`afterbegin`, `\n \n \n ${file.packageable.title}\n ${isNew || file.is_new ? `Nytt` : ``}\n\n ${file.packageable.introduction ? `${file.packageable.introduction}` : ``}\n \n \n `)\n\n labelContainer.querySelector(`label`).insertAdjacentElement(`afterbegin`, fileSvg)\n\n files.push(labelContainer)\n });\n\n if (json.is_demo === true && json.package_count > 2) {\n const notificationContainer = document.createElement(`li`)\n notificationContainer.className = `--additional-resources-banner`\n\n notificationContainer.insertAdjacentHTML(`afterbegin`, `\n Beställ nu för att se alla nyheter under denna mapp. (${json.package_count})\n `)\n files.push(notificationContainer)\n }\n\n folders.map(folder => {\n folderList.querySelector(`li`).insertAdjacentElement(`beforeend`, folder)\n const folderItem = folder.querySelector(`.-folder`)\n folderItem.addEventListener(`click`, () => makeToggable(folderItem))\n });\n files.map(file=> {\n fileContainer.insertAdjacentElement(`beforeend`, file)\n });\n\n folderList.querySelector(`li`).insertAdjacentElement(`beforeend`, fileContainer)\n }).catch(e => console.log(e))\n }\n\n folderList.dataset.fetched = true\n}\n","/**\n * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2022 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n return !Array.isArray\n ? getTag(value) === '[object Array]'\n : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value\n }\n let result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value)\n}\n\nfunction isString(value) {\n return typeof value === 'string'\n}\n\nfunction isNumber(value) {\n return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n return (\n value === true ||\n value === false ||\n (isObjectLike(value) && getTag(value) == '[object Boolean]')\n )\n}\n\nfunction isObject(value) {\n return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n return isObject(value) && value !== null\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null\n}\n\nfunction isBlank(value) {\n return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n return value == null\n ? value === undefined\n ? '[object Undefined]'\n : '[object Null]'\n : Object.prototype.toString.call(value)\n}\n\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\n\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\n\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n `Invalid value for key ${key}`;\n\nconst PATTERN_LENGTH_TOO_LARGE = (max) =>\n `Pattern length exceeds max of ${max}.`;\n\nconst MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;\n\nconst INVALID_KEY_WEIGHT_VALUE = (key) =>\n `Property 'weight' in key '${key}' must be a positive integer`;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nclass KeyStore {\n constructor(keys) {\n this._keys = [];\n this._keyMap = {};\n\n let totalWeight = 0;\n\n keys.forEach((key) => {\n let obj = createKey(key);\n\n totalWeight += obj.weight;\n\n this._keys.push(obj);\n this._keyMap[obj.id] = obj;\n\n totalWeight += obj.weight;\n });\n\n // Normalize weights so that their sum is equal to 1\n this._keys.forEach((key) => {\n key.weight /= totalWeight;\n });\n }\n get(keyId) {\n return this._keyMap[keyId]\n }\n keys() {\n return this._keys\n }\n toJSON() {\n return JSON.stringify(this._keys)\n }\n}\n\nfunction createKey(key) {\n let path = null;\n let id = null;\n let src = null;\n let weight = 1;\n let getFn = null;\n\n if (isString(key) || isArray(key)) {\n src = key;\n path = createKeyPath(key);\n id = createKeyId(key);\n } else {\n if (!hasOwn.call(key, 'name')) {\n throw new Error(MISSING_KEY_PROPERTY('name'))\n }\n\n const name = key.name;\n src = name;\n\n if (hasOwn.call(key, 'weight')) {\n weight = key.weight;\n\n if (weight <= 0) {\n throw new Error(INVALID_KEY_WEIGHT_VALUE(name))\n }\n }\n\n path = createKeyPath(name);\n id = createKeyId(name);\n getFn = key.getFn;\n }\n\n return { path, id, weight, src, getFn }\n}\n\nfunction createKeyPath(key) {\n return isArray(key) ? key : key.split('.')\n}\n\nfunction createKeyId(key) {\n return isArray(key) ? key.join('.') : key\n}\n\nfunction get(obj, path) {\n let list = [];\n let arr = false;\n\n const deepGet = (obj, path, index) => {\n if (!isDefined(obj)) {\n return\n }\n if (!path[index]) {\n // If there's no path left, we've arrived at the object we care about.\n list.push(obj);\n } else {\n let key = path[index];\n\n const value = obj[key];\n\n if (!isDefined(value)) {\n return\n }\n\n // If we're at the last value in the path, and if it's a string/number/bool,\n // add it to the list\n if (\n index === path.length - 1 &&\n (isString(value) || isNumber(value) || isBoolean(value))\n ) {\n list.push(toString(value));\n } else if (isArray(value)) {\n arr = true;\n // Search each item in the array.\n for (let i = 0, len = value.length; i < len; i += 1) {\n deepGet(value[i], path, index + 1);\n }\n } else if (path.length) {\n // An object. Recurse further.\n deepGet(value, path, index + 1);\n }\n }\n };\n\n // Backwards compatibility (since path used to be a string)\n deepGet(obj, isString(path) ? path.split('.') : path, 0);\n\n return arr ? list : list[0]\n}\n\nconst MatchOptions = {\n // Whether the matches should be included in the result set. When `true`, each record in the result\n // set will include the indices of the matched characters.\n // These can consequently be used for highlighting purposes.\n includeMatches: false,\n // When `true`, the matching function will continue to the end of a search pattern even if\n // a perfect match has already been located in the string.\n findAllMatches: false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength: 1\n};\n\nconst BasicOptions = {\n // When `true`, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n isCaseSensitive: false,\n // When true, the matching function will continue to the end of a search pattern even if\n includeScore: false,\n // List of properties that will be searched. This also supports nested properties.\n keys: [],\n // Whether to sort the result list, by score\n shouldSort: true,\n // Default sort function: sort by ascending score, ascending index\n sortFn: (a, b) =>\n a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n};\n\nconst FuzzyOptions = {\n // Approximately where in the text is the pattern expected to be found?\n location: 0,\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold: 0.6,\n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance: 100\n};\n\nconst AdvancedOptions = {\n // When `true`, it enables the use of unix-like search commands\n useExtendedSearch: false,\n // The get function to use when fetching an object's properties.\n // The default will search nested paths *ie foo.bar.baz*\n getFn: get,\n // When `true`, search will ignore `location` and `distance`, so it won't matter\n // where in the string the pattern appears.\n // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n ignoreLocation: false,\n // When `true`, the calculation for the relevance score (used for sorting) will\n // ignore the field-length norm.\n // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n ignoreFieldNorm: false,\n // The weight to determine how much field length norm effects scoring.\n fieldNormWeight: 1\n};\n\nvar Config = {\n ...BasicOptions,\n ...MatchOptions,\n ...FuzzyOptions,\n ...AdvancedOptions\n};\n\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm(weight = 1, mantissa = 3) {\n const cache = new Map();\n const m = Math.pow(10, mantissa);\n\n return {\n get(value) {\n const numTokens = value.match(SPACE).length;\n\n if (cache.has(numTokens)) {\n return cache.get(numTokens)\n }\n\n // Default function is 1/sqrt(x), weight makes that variable\n const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n // In place of `toFixed(mantissa)`, for faster computation\n const n = parseFloat(Math.round(norm * m) / m);\n\n cache.set(numTokens, n);\n\n return n\n },\n clear() {\n cache.clear();\n }\n }\n}\n\nclass FuseIndex {\n constructor({\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = {}) {\n this.norm = norm(fieldNormWeight, 3);\n this.getFn = getFn;\n this.isCreated = false;\n\n this.setIndexRecords();\n }\n setSources(docs = []) {\n this.docs = docs;\n }\n setIndexRecords(records = []) {\n this.records = records;\n }\n setKeys(keys = []) {\n this.keys = keys;\n this._keysMap = {};\n keys.forEach((key, idx) => {\n this._keysMap[key.id] = idx;\n });\n }\n create() {\n if (this.isCreated || !this.docs.length) {\n return\n }\n\n this.isCreated = true;\n\n // List is Array\n if (isString(this.docs[0])) {\n this.docs.forEach((doc, docIndex) => {\n this._addString(doc, docIndex);\n });\n } else {\n // List is Array\n this.docs.forEach((doc, docIndex) => {\n this._addObject(doc, docIndex);\n });\n }\n\n this.norm.clear();\n }\n // Adds a doc to the end of the index\n add(doc) {\n const idx = this.size();\n\n if (isString(doc)) {\n this._addString(doc, idx);\n } else {\n this._addObject(doc, idx);\n }\n }\n // Removes the doc at the specified index of the index\n removeAt(idx) {\n this.records.splice(idx, 1);\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1;\n }\n }\n getValueForItemAtKeyId(item, keyId) {\n return item[this._keysMap[keyId]]\n }\n size() {\n return this.records.length\n }\n _addString(doc, docIndex) {\n if (!isDefined(doc) || isBlank(doc)) {\n return\n }\n\n let record = {\n v: doc,\n i: docIndex,\n n: this.norm.get(doc)\n };\n\n this.records.push(record);\n }\n _addObject(doc, docIndex) {\n let record = { i: docIndex, $: {} };\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n this.keys.forEach((key, keyIndex) => {\n let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n\n if (!isDefined(value)) {\n return\n }\n\n if (isArray(value)) {\n let subRecords = [];\n const stack = [{ nestedArrIndex: -1, value }];\n\n while (stack.length) {\n const { nestedArrIndex, value } = stack.pop();\n\n if (!isDefined(value)) {\n continue\n }\n\n if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n i: nestedArrIndex,\n n: this.norm.get(value)\n };\n\n subRecords.push(subRecord);\n } else if (isArray(value)) {\n value.forEach((item, k) => {\n stack.push({\n nestedArrIndex: k,\n value: item\n });\n });\n } else ;\n }\n record.$[keyIndex] = subRecords;\n } else if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n n: this.norm.get(value)\n };\n\n record.$[keyIndex] = subRecord;\n }\n });\n\n this.records.push(record);\n }\n toJSON() {\n return {\n keys: this.keys,\n records: this.records\n }\n }\n}\n\nfunction createIndex(\n keys,\n docs,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys.map(createKey));\n myIndex.setSources(docs);\n myIndex.create();\n return myIndex\n}\n\nfunction parseIndex(\n data,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const { keys, records } = data;\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys);\n myIndex.setIndexRecords(records);\n return myIndex\n}\n\nfunction computeScore$1(\n pattern,\n {\n errors = 0,\n currentLocation = 0,\n expectedLocation = 0,\n distance = Config.distance,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n const accuracy = errors / pattern.length;\n\n if (ignoreLocation) {\n return accuracy\n }\n\n const proximity = Math.abs(expectedLocation - currentLocation);\n\n if (!distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n\n return accuracy + proximity / distance\n}\n\nfunction convertMaskToIndices(\n matchmask = [],\n minMatchCharLength = Config.minMatchCharLength\n) {\n let indices = [];\n let start = -1;\n let end = -1;\n let i = 0;\n\n for (let len = matchmask.length; i < len; i += 1) {\n let match = matchmask[i];\n if (match && start === -1) {\n start = i;\n } else if (!match && start !== -1) {\n end = i - 1;\n if (end - start + 1 >= minMatchCharLength) {\n indices.push([start, end]);\n }\n start = -1;\n }\n }\n\n // (i-1 - start) + 1 => i - start\n if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n indices.push([start, i - 1]);\n }\n\n return indices\n}\n\n// Machine word size\nconst MAX_BITS = 32;\n\nfunction search(\n text,\n pattern,\n patternAlphabet,\n {\n location = Config.location,\n distance = Config.distance,\n threshold = Config.threshold,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n includeMatches = Config.includeMatches,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n if (pattern.length > MAX_BITS) {\n throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n }\n\n const patternLen = pattern.length;\n // Set starting location at beginning text and initialize the alphabet.\n const textLen = text.length;\n // Handle the case when location > text.length\n const expectedLocation = Math.max(0, Math.min(location, textLen));\n // Highest score beyond which we give up.\n let currentThreshold = threshold;\n // Is there a nearby exact match? (speedup)\n let bestLocation = expectedLocation;\n\n // Performance: only computer matches when the minMatchCharLength > 1\n // OR if `includeMatches` is true.\n const computeMatches = minMatchCharLength > 1 || includeMatches;\n // A mask of the matches, used for building the indices\n const matchMask = computeMatches ? Array(textLen) : [];\n\n let index;\n\n // Get all exact matches, here for speed up\n while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n let score = computeScore$1(pattern, {\n currentLocation: index,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n currentThreshold = Math.min(score, currentThreshold);\n bestLocation = index + patternLen;\n\n if (computeMatches) {\n let i = 0;\n while (i < patternLen) {\n matchMask[index + i] = 1;\n i += 1;\n }\n }\n }\n\n // Reset the best location\n bestLocation = -1;\n\n let lastBitArr = [];\n let finalScore = 1;\n let binMax = patternLen + textLen;\n\n const mask = 1 << (patternLen - 1);\n\n for (let i = 0; i < patternLen; i += 1) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from the match location we can stray\n // at this error level.\n let binMin = 0;\n let binMid = binMax;\n\n while (binMin < binMid) {\n const score = computeScore$1(pattern, {\n errors: i,\n currentLocation: expectedLocation + binMid,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score <= currentThreshold) {\n binMin = binMid;\n } else {\n binMax = binMid;\n }\n\n binMid = Math.floor((binMax - binMin) / 2 + binMin);\n }\n\n // Use the result from this iteration as the maximum for the next.\n binMax = binMid;\n\n let start = Math.max(1, expectedLocation - binMid + 1);\n let finish = findAllMatches\n ? textLen\n : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n // Initialize the bit array\n let bitArr = Array(finish + 2);\n\n bitArr[finish + 1] = (1 << i) - 1;\n\n for (let j = finish; j >= start; j -= 1) {\n let currentLocation = j - 1;\n let charMatch = patternAlphabet[text.charAt(currentLocation)];\n\n if (computeMatches) {\n // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n matchMask[currentLocation] = +!!charMatch;\n }\n\n // First pass: exact match\n bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;\n\n // Subsequent passes: fuzzy match\n if (i) {\n bitArr[j] |=\n ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];\n }\n\n if (bitArr[j] & mask) {\n finalScore = computeScore$1(pattern, {\n errors: i,\n currentLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (finalScore <= currentThreshold) {\n // Indeed it is\n currentThreshold = finalScore;\n bestLocation = currentLocation;\n\n // Already passed `loc`, downhill from here on in.\n if (bestLocation <= expectedLocation) {\n break\n }\n\n // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n start = Math.max(1, 2 * expectedLocation - bestLocation);\n }\n }\n }\n\n // No hope for a (better) match at greater error levels.\n const score = computeScore$1(pattern, {\n errors: i + 1,\n currentLocation: expectedLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score > currentThreshold) {\n break\n }\n\n lastBitArr = bitArr;\n }\n\n const result = {\n isMatch: bestLocation >= 0,\n // Count exact matches (those with a score of 0) to be \"almost\" exact\n score: Math.max(0.001, finalScore)\n };\n\n if (computeMatches) {\n const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n if (!indices.length) {\n result.isMatch = false;\n } else if (includeMatches) {\n result.indices = indices;\n }\n }\n\n return result\n}\n\nfunction createPatternAlphabet(pattern) {\n let mask = {};\n\n for (let i = 0, len = pattern.length; i < len; i += 1) {\n const char = pattern.charAt(i);\n mask[char] = (mask[char] || 0) | (1 << (len - i - 1));\n }\n\n return mask\n}\n\nclass BitapSearch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n this.options = {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n\n this.chunks = [];\n\n if (!this.pattern.length) {\n return\n }\n\n const addChunk = (pattern, startIndex) => {\n this.chunks.push({\n pattern,\n alphabet: createPatternAlphabet(pattern),\n startIndex\n });\n };\n\n const len = this.pattern.length;\n\n if (len > MAX_BITS) {\n let i = 0;\n const remainder = len % MAX_BITS;\n const end = len - remainder;\n\n while (i < end) {\n addChunk(this.pattern.substr(i, MAX_BITS), i);\n i += MAX_BITS;\n }\n\n if (remainder) {\n const startIndex = len - MAX_BITS;\n addChunk(this.pattern.substr(startIndex), startIndex);\n }\n } else {\n addChunk(this.pattern, 0);\n }\n }\n\n searchIn(text) {\n const { isCaseSensitive, includeMatches } = this.options;\n\n if (!isCaseSensitive) {\n text = text.toLowerCase();\n }\n\n // Exact match\n if (this.pattern === text) {\n let result = {\n isMatch: true,\n score: 0\n };\n\n if (includeMatches) {\n result.indices = [[0, text.length - 1]];\n }\n\n return result\n }\n\n // Otherwise, use Bitap algorithm\n const {\n location,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n ignoreLocation\n } = this.options;\n\n let allIndices = [];\n let totalScore = 0;\n let hasMatches = false;\n\n this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n const { isMatch, score, indices } = search(text, pattern, alphabet, {\n location: location + startIndex,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n includeMatches,\n ignoreLocation\n });\n\n if (isMatch) {\n hasMatches = true;\n }\n\n totalScore += score;\n\n if (isMatch && indices) {\n allIndices = [...allIndices, ...indices];\n }\n });\n\n let result = {\n isMatch: hasMatches,\n score: hasMatches ? totalScore / this.chunks.length : 1\n };\n\n if (hasMatches && includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n}\n\nclass BaseMatch {\n constructor(pattern) {\n this.pattern = pattern;\n }\n static isMultiMatch(pattern) {\n return getMatch(pattern, this.multiRegex)\n }\n static isSingleMatch(pattern) {\n return getMatch(pattern, this.singleRegex)\n }\n search(/*text*/) {}\n}\n\nfunction getMatch(pattern, exp) {\n const matches = pattern.match(exp);\n return matches ? matches[1] : null\n}\n\n// Token: 'file\n\nclass ExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'exact'\n }\n static get multiRegex() {\n return /^=\"(.*)\"$/\n }\n static get singleRegex() {\n return /^=(.*)$/\n }\n search(text) {\n const isMatch = text === this.pattern;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !fire\n\nclass InverseExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!(.*)$/\n }\n search(text) {\n const index = text.indexOf(this.pattern);\n const isMatch = index === -1;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: ^file\n\nclass PrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'prefix-exact'\n }\n static get multiRegex() {\n return /^\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^\\^(.*)$/\n }\n search(text) {\n const isMatch = text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !^fire\n\nclass InversePrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-prefix-exact'\n }\n static get multiRegex() {\n return /^!\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!\\^(.*)$/\n }\n search(text) {\n const isMatch = !text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: .file$\n\nclass SuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'suffix-exact'\n }\n static get multiRegex() {\n return /^\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^(.*)\\$$/\n }\n search(text) {\n const isMatch = text.endsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [text.length - this.pattern.length, text.length - 1]\n }\n }\n}\n\n// Token: !.file$\n\nclass InverseSuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-suffix-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^!(.*)\\$$/\n }\n search(text) {\n const isMatch = !text.endsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\nclass FuzzyMatch extends BaseMatch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n super(pattern);\n this._bitapSearch = new BitapSearch(pattern, {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n });\n }\n static get type() {\n return 'fuzzy'\n }\n static get multiRegex() {\n return /^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^(.*)$/\n }\n search(text) {\n return this._bitapSearch.searchIn(text)\n }\n}\n\n// Token: 'file\n\nclass IncludeMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'include'\n }\n static get multiRegex() {\n return /^'\"(.*)\"$/\n }\n static get singleRegex() {\n return /^'(.*)$/\n }\n search(text) {\n let location = 0;\n let index;\n\n const indices = [];\n const patternLen = this.pattern.length;\n\n // Get all exact matches\n while ((index = text.indexOf(this.pattern, location)) > -1) {\n location = index + patternLen;\n indices.push([index, location - 1]);\n }\n\n const isMatch = !!indices.length;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices\n }\n }\n}\n\n// ❗Order is important. DO NOT CHANGE.\nconst searchers = [\n ExactMatch,\n IncludeMatch,\n PrefixExactMatch,\n InversePrefixExactMatch,\n InverseSuffixExactMatch,\n SuffixExactMatch,\n InverseExactMatch,\n FuzzyMatch\n];\n\nconst searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nconst OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern, options = {}) {\n return pattern.split(OR_TOKEN).map((item) => {\n let query = item\n .trim()\n .split(SPACE_RE)\n .filter((item) => item && !!item.trim());\n\n let results = [];\n for (let i = 0, len = query.length; i < len; i += 1) {\n const queryItem = query[i];\n\n // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n let found = false;\n let idx = -1;\n while (!found && ++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isMultiMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n found = true;\n }\n }\n\n if (found) {\n continue\n }\n\n // 2. Handle single query matches (i.e, once that are *not* quoted)\n idx = -1;\n while (++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isSingleMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n break\n }\n }\n }\n\n return results\n })\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token | Match type | Description |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |\n * | `=scheme` | exact-match | Items that are `scheme` |\n * | `'python` | include-match | Items that include `python` |\n * | `!ruby` | inverse-exact-match | Items that do not include `ruby` |\n * | `^java` | prefix-exact-match | Items that start with `java` |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$` | suffix-exact-match | Items that end with `.js` |\n * | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nclass ExtendedSearch {\n constructor(\n pattern,\n {\n isCaseSensitive = Config.isCaseSensitive,\n includeMatches = Config.includeMatches,\n minMatchCharLength = Config.minMatchCharLength,\n ignoreLocation = Config.ignoreLocation,\n findAllMatches = Config.findAllMatches,\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance\n } = {}\n ) {\n this.query = null;\n this.options = {\n isCaseSensitive,\n includeMatches,\n minMatchCharLength,\n findAllMatches,\n ignoreLocation,\n location,\n threshold,\n distance\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n this.query = parseQuery(this.pattern, this.options);\n }\n\n static condition(_, options) {\n return options.useExtendedSearch\n }\n\n searchIn(text) {\n const query = this.query;\n\n if (!query) {\n return {\n isMatch: false,\n score: 1\n }\n }\n\n const { includeMatches, isCaseSensitive } = this.options;\n\n text = isCaseSensitive ? text : text.toLowerCase();\n\n let numMatches = 0;\n let allIndices = [];\n let totalScore = 0;\n\n // ORs\n for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n const searchers = query[i];\n\n // Reset indices\n allIndices.length = 0;\n numMatches = 0;\n\n // ANDs\n for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n const searcher = searchers[j];\n const { isMatch, indices, score } = searcher.search(text);\n\n if (isMatch) {\n numMatches += 1;\n totalScore += score;\n if (includeMatches) {\n const type = searcher.constructor.type;\n if (MultiMatchSet.has(type)) {\n allIndices = [...allIndices, ...indices];\n } else {\n allIndices.push(indices);\n }\n }\n } else {\n totalScore = 0;\n numMatches = 0;\n allIndices.length = 0;\n break\n }\n }\n\n // OR condition, so if TRUE, return\n if (numMatches) {\n let result = {\n isMatch: true,\n score: totalScore / numMatches\n };\n\n if (includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n }\n\n // Nothing was matched\n return {\n isMatch: false,\n score: 1\n }\n }\n}\n\nconst registeredSearchers = [];\n\nfunction register(...args) {\n registeredSearchers.push(...args);\n}\n\nfunction createSearcher(pattern, options) {\n for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n let searcherClass = registeredSearchers[i];\n if (searcherClass.condition(pattern, options)) {\n return new searcherClass(pattern, options)\n }\n }\n\n return new BitapSearch(pattern, options)\n}\n\nconst LogicalOperator = {\n AND: '$and',\n OR: '$or'\n};\n\nconst KeyType = {\n PATH: '$path',\n PATTERN: '$val'\n};\n\nconst isExpression = (query) =>\n !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n\nconst isPath = (query) => !!query[KeyType.PATH];\n\nconst isLeaf = (query) =>\n !isArray(query) && isObject(query) && !isExpression(query);\n\nconst convertToExplicit = (query) => ({\n [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n [key]: query[key]\n }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options, { auto = true } = {}) {\n const next = (query) => {\n let keys = Object.keys(query);\n\n const isQueryPath = isPath(query);\n\n if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n return next(convertToExplicit(query))\n }\n\n if (isLeaf(query)) {\n const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n\n const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n\n if (!isString(pattern)) {\n throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n }\n\n const obj = {\n keyId: createKeyId(key),\n pattern\n };\n\n if (auto) {\n obj.searcher = createSearcher(pattern, options);\n }\n\n return obj\n }\n\n let node = {\n children: [],\n operator: keys[0]\n };\n\n keys.forEach((key) => {\n const value = query[key];\n\n if (isArray(value)) {\n value.forEach((item) => {\n node.children.push(next(item));\n });\n }\n });\n\n return node\n };\n\n if (!isExpression(query)) {\n query = convertToExplicit(query);\n }\n\n return next(query)\n}\n\n// Practical scoring function\nfunction computeScore(\n results,\n { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n results.forEach((result) => {\n let totalScore = 1;\n\n result.matches.forEach(({ key, norm, score }) => {\n const weight = key ? key.weight : null;\n\n totalScore *= Math.pow(\n score === 0 && weight ? Number.EPSILON : score,\n (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n );\n });\n\n result.score = totalScore;\n });\n}\n\nfunction transformMatches(result, data) {\n const matches = result.matches;\n data.matches = [];\n\n if (!isDefined(matches)) {\n return\n }\n\n matches.forEach((match) => {\n if (!isDefined(match.indices) || !match.indices.length) {\n return\n }\n\n const { indices, value } = match;\n\n let obj = {\n indices,\n value\n };\n\n if (match.key) {\n obj.key = match.key.src;\n }\n\n if (match.idx > -1) {\n obj.refIndex = match.idx;\n }\n\n data.matches.push(obj);\n });\n}\n\nfunction transformScore(result, data) {\n data.score = result.score;\n}\n\nfunction format(\n results,\n docs,\n {\n includeMatches = Config.includeMatches,\n includeScore = Config.includeScore\n } = {}\n) {\n const transformers = [];\n\n if (includeMatches) transformers.push(transformMatches);\n if (includeScore) transformers.push(transformScore);\n\n return results.map((result) => {\n const { idx } = result;\n\n const data = {\n item: docs[idx],\n refIndex: idx\n };\n\n if (transformers.length) {\n transformers.forEach((transformer) => {\n transformer(result, data);\n });\n }\n\n return data\n })\n}\n\nclass Fuse {\n constructor(docs, options = {}, index) {\n this.options = { ...Config, ...options };\n\n if (\n this.options.useExtendedSearch &&\n !true\n ) {\n throw new Error(EXTENDED_SEARCH_UNAVAILABLE)\n }\n\n this._keyStore = new KeyStore(this.options.keys);\n\n this.setCollection(docs, index);\n }\n\n setCollection(docs, index) {\n this._docs = docs;\n\n if (index && !(index instanceof FuseIndex)) {\n throw new Error(INCORRECT_INDEX_TYPE)\n }\n\n this._myIndex =\n index ||\n createIndex(this.options.keys, this._docs, {\n getFn: this.options.getFn,\n fieldNormWeight: this.options.fieldNormWeight\n });\n }\n\n add(doc) {\n if (!isDefined(doc)) {\n return\n }\n\n this._docs.push(doc);\n this._myIndex.add(doc);\n }\n\n remove(predicate = (/* doc, idx */) => false) {\n const results = [];\n\n for (let i = 0, len = this._docs.length; i < len; i += 1) {\n const doc = this._docs[i];\n if (predicate(doc, i)) {\n this.removeAt(i);\n i -= 1;\n len -= 1;\n\n results.push(doc);\n }\n }\n\n return results\n }\n\n removeAt(idx) {\n this._docs.splice(idx, 1);\n this._myIndex.removeAt(idx);\n }\n\n getIndex() {\n return this._myIndex\n }\n\n search(query, { limit = -1 } = {}) {\n const {\n includeMatches,\n includeScore,\n shouldSort,\n sortFn,\n ignoreFieldNorm\n } = this.options;\n\n let results = isString(query)\n ? isString(this._docs[0])\n ? this._searchStringList(query)\n : this._searchObjectList(query)\n : this._searchLogical(query);\n\n computeScore(results, { ignoreFieldNorm });\n\n if (shouldSort) {\n results.sort(sortFn);\n }\n\n if (isNumber(limit) && limit > -1) {\n results = results.slice(0, limit);\n }\n\n return format(results, this._docs, {\n includeMatches,\n includeScore\n })\n }\n\n _searchStringList(query) {\n const searcher = createSearcher(query, this.options);\n const { records } = this._myIndex;\n const results = [];\n\n // Iterate over every string in the index\n records.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n results.push({\n item: text,\n idx,\n matches: [{ score, value: text, norm, indices }]\n });\n }\n });\n\n return results\n }\n\n _searchLogical(query) {\n\n const expression = parse(query, this.options);\n\n const evaluate = (node, item, idx) => {\n if (!node.children) {\n const { keyId, searcher } = node;\n\n const matches = this._findMatches({\n key: this._keyStore.get(keyId),\n value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n searcher\n });\n\n if (matches && matches.length) {\n return [\n {\n idx,\n item,\n matches\n }\n ]\n }\n\n return []\n }\n\n const res = [];\n for (let i = 0, len = node.children.length; i < len; i += 1) {\n const child = node.children[i];\n const result = evaluate(child, item, idx);\n if (result.length) {\n res.push(...result);\n } else if (node.operator === LogicalOperator.AND) {\n return []\n }\n }\n return res\n };\n\n const records = this._myIndex.records;\n const resultMap = {};\n const results = [];\n\n records.forEach(({ $: item, i: idx }) => {\n if (isDefined(item)) {\n let expResults = evaluate(expression, item, idx);\n\n if (expResults.length) {\n // Dedupe when adding\n if (!resultMap[idx]) {\n resultMap[idx] = { idx, item, matches: [] };\n results.push(resultMap[idx]);\n }\n expResults.forEach(({ matches }) => {\n resultMap[idx].matches.push(...matches);\n });\n }\n }\n });\n\n return results\n }\n\n _searchObjectList(query) {\n const searcher = createSearcher(query, this.options);\n const { keys, records } = this._myIndex;\n const results = [];\n\n // List is Array\n records.forEach(({ $: item, i: idx }) => {\n if (!isDefined(item)) {\n return\n }\n\n let matches = [];\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n keys.forEach((key, keyIndex) => {\n matches.push(\n ...this._findMatches({\n key,\n value: item[keyIndex],\n searcher\n })\n );\n });\n\n if (matches.length) {\n results.push({\n idx,\n item,\n matches\n });\n }\n });\n\n return results\n }\n _findMatches({ key, value, searcher }) {\n if (!isDefined(value)) {\n return []\n }\n\n let matches = [];\n\n if (isArray(value)) {\n value.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({\n score,\n key,\n value: text,\n idx,\n norm,\n indices\n });\n }\n });\n } else {\n const { v: text, n: norm } = value;\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({ score, key, value: text, norm, indices });\n }\n }\n\n return matches\n }\n}\n\nFuse.version = '6.6.2';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n\n{\n Fuse.parseQuery = parse;\n}\n\n{\n register(ExtendedSearch);\n}\n\nexport { Fuse as default };\n","import { getElements } from 'js-utils/src/selector';\nimport { addClass, removeClass } from 'js-utils/src/attribute';\nimport Fuse from 'fuse.js';\nimport init from '../../common/base/init';\n\n// expand/collapse children checkbox lists on toggle click\n\ninit(() => {\n const containers = getElements('.bundle-list');\n if (!containers.length) return;\n\n const searchAttrs = ['title', 'excerpt'];\n\n Array.from(containers).map(container => {\n const input = container.querySelector('.-search input');\n const emptyState = container.querySelector('.-empty-state');\n const fullTree = getElements('li', container);\n const objects = getElements('.\\\\--searchable-files', container);\n if (!input || !objects.length) return;\n const searchData = [];\n\n Array.from(objects).map((object, index) => {\n const data = { index };\n Array.from(searchAttrs).map(\n attr => (data[attr] = object.getAttribute('data-' + attr))\n );\n searchData.push(data);\n });\n\n const fuse = new Fuse(searchData, {\n threshold: 0.2,\n keys: searchAttrs,\n ignoreLocation: true,\n });\n\n input.addEventListener('input', () => {\n const searchString = input.value.trim();\n\n if (searchString) {\n container.classList.add('--searching');\n\n removeClass(fullTree, '--revealed');\n removeClass(fullTree, '--highlighted');\n addClass(fullTree, '--hidden');\n addClass('ul.--root', '--no-search-hits');\n const results = searchString.length\n ? fuse.search(searchString)\n : searchData;\n\n if (results.length) {\n Array.from(results).map(result => {\n const index = searchData.findIndex(i => i.index === result.refIndex);\n let resultInDom = objects[index];\n\n addClass(resultInDom, '--highlighted');\n\n while (resultInDom.nodeName === 'LI') {\n removeClass(resultInDom, '--hidden');\n addClass(resultInDom, '--revealed');\n\n resultInDom = resultInDom.parentElement.parentElement;\n\n removeClass(resultInDom.parentElement, '--no-search-hits');\n }\n });\n\n removeClass(emptyState, '--visible');\n } else {\n addClass(emptyState, '--visible');\n }\n } else {\n container.classList.remove('--searching');\n removeClass(emptyState, '--visible');\n }\n });\n });\n});\n","// Current version.\nexport var VERSION = '1.13.7';\n\n// Establish the root object, `window` (`self`) in the browser, `global`\n// on the server, or `this` in some virtual machines. We use `self`\n// instead of `window` for `WebWorker` support.\nexport var root = (typeof self == 'object' && self.self === self && self) ||\n (typeof global == 'object' && global.global === global && global) ||\n Function('return this')() ||\n {};\n\n// Save bytes in the minified (but not gzipped) version:\nexport var ArrayProto = Array.prototype, ObjProto = Object.prototype;\nexport var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n// Create quick reference variables for speed access to core prototypes.\nexport var push = ArrayProto.push,\n slice = ArrayProto.slice,\n toString = ObjProto.toString,\n hasOwnProperty = ObjProto.hasOwnProperty;\n\n// Modern feature detection.\nexport var supportsArrayBuffer = typeof ArrayBuffer !== 'undefined',\n supportsDataView = typeof DataView !== 'undefined';\n\n// All **ECMAScript 5+** native function implementations that we hope to use\n// are declared here.\nexport var nativeIsArray = Array.isArray,\n nativeKeys = Object.keys,\n nativeCreate = Object.create,\n nativeIsView = supportsArrayBuffer && ArrayBuffer.isView;\n\n// Create references to these builtin functions because we override them.\nexport var _isNaN = isNaN,\n _isFinite = isFinite;\n\n// Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\nexport var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\nexport var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n// The largest integer that can be represented exactly.\nexport var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n","// Some functions take a variable number of arguments, or a few expected\n// arguments at the beginning and then a variable number of values to operate\n// on. This helper accumulates all remaining arguments past the function’s\n// argument length (or an explicit `startIndex`), into an array that becomes\n// the last argument. Similar to ES6’s \"rest parameter\".\nexport default function restArguments(func, startIndex) {\n startIndex = startIndex == null ? func.length - 1 : +startIndex;\n return function() {\n var length = Math.max(arguments.length - startIndex, 0),\n rest = Array(length),\n index = 0;\n for (; index < length; index++) {\n rest[index] = arguments[index + startIndex];\n }\n switch (startIndex) {\n case 0: return func.call(this, rest);\n case 1: return func.call(this, arguments[0], rest);\n case 2: return func.call(this, arguments[0], arguments[1], rest);\n }\n var args = Array(startIndex + 1);\n for (index = 0; index < startIndex; index++) {\n args[index] = arguments[index];\n }\n args[startIndex] = rest;\n return func.apply(this, args);\n };\n}\n","// Is a given variable an object?\nexport default function isObject(obj) {\n var type = typeof obj;\n return type === 'function' || (type === 'object' && !!obj);\n}\n","// Is a given value equal to null?\nexport default function isNull(obj) {\n return obj === null;\n}\n","// Is a given variable undefined?\nexport default function isUndefined(obj) {\n return obj === void 0;\n}\n","import { toString } from './_setup.js';\n\n// Is a given value a boolean?\nexport default function isBoolean(obj) {\n return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n}\n","// Is a given value a DOM element?\nexport default function isElement(obj) {\n return !!(obj && obj.nodeType === 1);\n}\n","import { toString } from './_setup.js';\n\n// Internal function for creating a `toString`-based type tester.\nexport default function tagTester(name) {\n var tag = '[object ' + name + ']';\n return function(obj) {\n return toString.call(obj) === tag;\n };\n}\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('String');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Number');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Date');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('RegExp');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Error');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Symbol');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('ArrayBuffer');\n","import tagTester from './_tagTester.js';\nimport { root } from './_setup.js';\n\nvar isFunction = tagTester('Function');\n\n// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old\n// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\nvar nodelist = root.document && root.document.childNodes;\nif (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n isFunction = function(obj) {\n return typeof obj == 'function' || false;\n };\n}\n\nexport default isFunction;\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('Object');\n","import { supportsDataView } from './_setup.js';\nimport hasObjectTag from './_hasObjectTag.js';\n\n// In IE 10 - Edge 13, `DataView` has string tag `'[object Object]'`.\n// In IE 11, the most common among them, this problem also applies to\n// `Map`, `WeakMap` and `Set`.\n// Also, there are cases where an application can override the native\n// `DataView` object, in cases like that we can't use the constructor\n// safely and should just rely on alternate `DataView` checks\nexport var hasDataViewBug = (\n supportsDataView && (!/\\[native code\\]/.test(String(DataView)) || hasObjectTag(new DataView(new ArrayBuffer(8))))\n ),\n isIE11 = (typeof Map !== 'undefined' && hasObjectTag(new Map));\n","import tagTester from './_tagTester.js';\nimport isFunction from './isFunction.js';\nimport isArrayBuffer from './isArrayBuffer.js';\nimport { hasDataViewBug } from './_stringTagBug.js';\n\nvar isDataView = tagTester('DataView');\n\n// In IE 10 - Edge 13, we need a different heuristic\n// to determine whether an object is a `DataView`.\n// Also, in cases where the native `DataView` is\n// overridden we can't rely on the tag itself.\nfunction alternateIsDataView(obj) {\n return obj != null && isFunction(obj.getInt8) && isArrayBuffer(obj.buffer);\n}\n\nexport default (hasDataViewBug ? alternateIsDataView : isDataView);\n","import { nativeIsArray } from './_setup.js';\nimport tagTester from './_tagTester.js';\n\n// Is a given value an array?\n// Delegates to ECMA5's native `Array.isArray`.\nexport default nativeIsArray || tagTester('Array');\n","import { hasOwnProperty } from './_setup.js';\n\n// Internal function to check whether `key` is an own property name of `obj`.\nexport default function has(obj, key) {\n return obj != null && hasOwnProperty.call(obj, key);\n}\n","import tagTester from './_tagTester.js';\nimport has from './_has.js';\n\nvar isArguments = tagTester('Arguments');\n\n// Define a fallback version of the method in browsers (ahem, IE < 9), where\n// there isn't any inspectable \"Arguments\" type.\n(function() {\n if (!isArguments(arguments)) {\n isArguments = function(obj) {\n return has(obj, 'callee');\n };\n }\n}());\n\nexport default isArguments;\n","import { _isFinite } from './_setup.js';\nimport isSymbol from './isSymbol.js';\n\n// Is a given object a finite number?\nexport default function isFinite(obj) {\n return !isSymbol(obj) && _isFinite(obj) && !isNaN(parseFloat(obj));\n}\n","import { _isNaN } from './_setup.js';\nimport isNumber from './isNumber.js';\n\n// Is the given value `NaN`?\nexport default function isNaN(obj) {\n return isNumber(obj) && _isNaN(obj);\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function constant(value) {\n return function() {\n return value;\n };\n}\n","import { MAX_ARRAY_INDEX } from './_setup.js';\n\n// Common internal logic for `isArrayLike` and `isBufferLike`.\nexport default function createSizePropertyCheck(getSizeProperty) {\n return function(collection) {\n var sizeProperty = getSizeProperty(collection);\n return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;\n }\n}\n","// Internal helper to generate a function to obtain property `key` from `obj`.\nexport default function shallowProperty(key) {\n return function(obj) {\n return obj == null ? void 0 : obj[key];\n };\n}\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `byteLength` property of an object.\nexport default shallowProperty('byteLength');\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getByteLength from './_getByteLength.js';\n\n// Internal helper to determine whether we should spend extensive checks against\n// `ArrayBuffer` et al.\nexport default createSizePropertyCheck(getByteLength);\n","import { supportsArrayBuffer, nativeIsView, toString } from './_setup.js';\nimport isDataView from './isDataView.js';\nimport constant from './constant.js';\nimport isBufferLike from './_isBufferLike.js';\n\n// Is a given value a typed array?\nvar typedArrayPattern = /\\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\\]/;\nfunction isTypedArray(obj) {\n // `ArrayBuffer.isView` is the most future-proof, so use it when available.\n // Otherwise, fall back on the above regular expression.\n return nativeIsView ? (nativeIsView(obj) && !isDataView(obj)) :\n isBufferLike(obj) && typedArrayPattern.test(toString.call(obj));\n}\n\nexport default supportsArrayBuffer ? isTypedArray : constant(false);\n","import shallowProperty from './_shallowProperty.js';\n\n// Internal helper to obtain the `length` property of an object.\nexport default shallowProperty('length');\n","import { nonEnumerableProps, ObjProto } from './_setup.js';\nimport isFunction from './isFunction.js';\nimport has from './_has.js';\n\n// Internal helper to create a simple lookup structure.\n// `collectNonEnumProps` used to depend on `_.contains`, but this led to\n// circular imports. `emulatedSet` is a one-off solution that only works for\n// arrays of strings.\nfunction emulatedSet(keys) {\n var hash = {};\n for (var l = keys.length, i = 0; i < l; ++i) hash[keys[i]] = true;\n return {\n contains: function(key) { return hash[key] === true; },\n push: function(key) {\n hash[key] = true;\n return keys.push(key);\n }\n };\n}\n\n// Internal helper. Checks `keys` for the presence of keys in IE < 9 that won't\n// be iterated by `for key in ...` and thus missed. Extends `keys` in place if\n// needed.\nexport default function collectNonEnumProps(obj, keys) {\n keys = emulatedSet(keys);\n var nonEnumIdx = nonEnumerableProps.length;\n var constructor = obj.constructor;\n var proto = (isFunction(constructor) && constructor.prototype) || ObjProto;\n\n // Constructor is a special case.\n var prop = 'constructor';\n if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);\n\n while (nonEnumIdx--) {\n prop = nonEnumerableProps[nonEnumIdx];\n if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) {\n keys.push(prop);\n }\n }\n}\n","import isObject from './isObject.js';\nimport { nativeKeys, hasEnumBug } from './_setup.js';\nimport has from './_has.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve the names of an object's own properties.\n// Delegates to **ECMAScript 5**'s native `Object.keys`.\nexport default function keys(obj) {\n if (!isObject(obj)) return [];\n if (nativeKeys) return nativeKeys(obj);\n var keys = [];\n for (var key in obj) if (has(obj, key)) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import getLength from './_getLength.js';\nimport isArray from './isArray.js';\nimport isString from './isString.js';\nimport isArguments from './isArguments.js';\nimport keys from './keys.js';\n\n// Is a given array, string, or object empty?\n// An \"empty\" object has no enumerable own-properties.\nexport default function isEmpty(obj) {\n if (obj == null) return true;\n // Skip the more expensive `toString`-based type checks if `obj` has no\n // `.length`.\n var length = getLength(obj);\n if (typeof length == 'number' && (\n isArray(obj) || isString(obj) || isArguments(obj)\n )) return length === 0;\n return getLength(keys(obj)) === 0;\n}\n","import keys from './keys.js';\n\n// Returns whether an object has a given set of `key:value` pairs.\nexport default function isMatch(object, attrs) {\n var _keys = keys(attrs), length = _keys.length;\n if (object == null) return !length;\n var obj = Object(object);\n for (var i = 0; i < length; i++) {\n var key = _keys[i];\n if (attrs[key] !== obj[key] || !(key in obj)) return false;\n }\n return true;\n}\n","import { VERSION } from './_setup.js';\n\n// If Underscore is called as a function, it returns a wrapped object that can\n// be used OO-style. This wrapper holds altered versions of all functions added\n// through `_.mixin`. Wrapped objects may be chained.\nexport default function _(obj) {\n if (obj instanceof _) return obj;\n if (!(this instanceof _)) return new _(obj);\n this._wrapped = obj;\n}\n\n_.VERSION = VERSION;\n\n// Extracts the result from a wrapped and chained object.\n_.prototype.value = function() {\n return this._wrapped;\n};\n\n// Provide unwrapping proxies for some methods used in engine operations\n// such as arithmetic and JSON stringification.\n_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n_.prototype.toString = function() {\n return String(this._wrapped);\n};\n","import getByteLength from './_getByteLength.js';\n\n// Internal function to wrap or shallow-copy an ArrayBuffer,\n// typed array or DataView to a new view, reusing the buffer.\nexport default function toBufferView(bufferSource) {\n return new Uint8Array(\n bufferSource.buffer || bufferSource,\n bufferSource.byteOffset || 0,\n getByteLength(bufferSource)\n );\n}\n","import _ from './underscore.js';\nimport { toString, SymbolProto } from './_setup.js';\nimport getByteLength from './_getByteLength.js';\nimport isTypedArray from './isTypedArray.js';\nimport isFunction from './isFunction.js';\nimport { hasDataViewBug } from './_stringTagBug.js';\nimport isDataView from './isDataView.js';\nimport keys from './keys.js';\nimport has from './_has.js';\nimport toBufferView from './_toBufferView.js';\n\n// We use this string twice, so give it a name for minification.\nvar tagDataView = '[object DataView]';\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction eq(a, b, aStack, bStack) {\n // Identical objects are equal. `0 === -0`, but they aren't identical.\n // See the [Harmony `egal` proposal](https://wiki.ecmascript.org/doku.php?id=harmony:egal).\n if (a === b) return a !== 0 || 1 / a === 1 / b;\n // `null` or `undefined` only equal to itself (strict comparison).\n if (a == null || b == null) return false;\n // `NaN`s are equivalent, but non-reflexive.\n if (a !== a) return b !== b;\n // Exhaust primitive checks\n var type = typeof a;\n if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n return deepEq(a, b, aStack, bStack);\n}\n\n// Internal recursive comparison function for `_.isEqual`.\nfunction deepEq(a, b, aStack, bStack) {\n // Unwrap any wrapped objects.\n if (a instanceof _) a = a._wrapped;\n if (b instanceof _) b = b._wrapped;\n // Compare `[[Class]]` names.\n var className = toString.call(a);\n if (className !== toString.call(b)) return false;\n // Work around a bug in IE 10 - Edge 13.\n if (hasDataViewBug && className == '[object Object]' && isDataView(a)) {\n if (!isDataView(b)) return false;\n className = tagDataView;\n }\n switch (className) {\n // These types are compared by value.\n case '[object RegExp]':\n // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n case '[object String]':\n // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n // equivalent to `new String(\"5\")`.\n return '' + a === '' + b;\n case '[object Number]':\n // `NaN`s are equivalent, but non-reflexive.\n // Object(NaN) is equivalent to NaN.\n if (+a !== +a) return +b !== +b;\n // An `egal` comparison is performed for other numeric values.\n return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n case '[object Date]':\n case '[object Boolean]':\n // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n // millisecond representations. Note that invalid dates with millisecond representations\n // of `NaN` are not equivalent.\n return +a === +b;\n case '[object Symbol]':\n return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n case '[object ArrayBuffer]':\n case tagDataView:\n // Coerce to typed array so we can fall through.\n return deepEq(toBufferView(a), toBufferView(b), aStack, bStack);\n }\n\n var areArrays = className === '[object Array]';\n if (!areArrays && isTypedArray(a)) {\n var byteLength = getByteLength(a);\n if (byteLength !== getByteLength(b)) return false;\n if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true;\n areArrays = true;\n }\n if (!areArrays) {\n if (typeof a != 'object' || typeof b != 'object') return false;\n\n // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n // from different frames are.\n var aCtor = a.constructor, bCtor = b.constructor;\n if (aCtor !== bCtor && !(isFunction(aCtor) && aCtor instanceof aCtor &&\n isFunction(bCtor) && bCtor instanceof bCtor)\n && ('constructor' in a && 'constructor' in b)) {\n return false;\n }\n }\n // Assume equality for cyclic structures. The algorithm for detecting cyclic\n // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n // Initializing stack of traversed objects.\n // It's done here since we only need them for objects and arrays comparison.\n aStack = aStack || [];\n bStack = bStack || [];\n var length = aStack.length;\n while (length--) {\n // Linear search. Performance is inversely proportional to the number of\n // unique nested structures.\n if (aStack[length] === a) return bStack[length] === b;\n }\n\n // Add the first object to the stack of traversed objects.\n aStack.push(a);\n bStack.push(b);\n\n // Recursively compare objects and arrays.\n if (areArrays) {\n // Compare array lengths to determine if a deep comparison is necessary.\n length = a.length;\n if (length !== b.length) return false;\n // Deep compare the contents, ignoring non-numeric properties.\n while (length--) {\n if (!eq(a[length], b[length], aStack, bStack)) return false;\n }\n } else {\n // Deep compare objects.\n var _keys = keys(a), key;\n length = _keys.length;\n // Ensure that both objects contain the same number of properties before comparing deep equality.\n if (keys(b).length !== length) return false;\n while (length--) {\n // Deep compare each member\n key = _keys[length];\n if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n }\n }\n // Remove the first object from the stack of traversed objects.\n aStack.pop();\n bStack.pop();\n return true;\n}\n\n// Perform a deep comparison to check if two objects are equal.\nexport default function isEqual(a, b) {\n return eq(a, b);\n}\n","import isObject from './isObject.js';\nimport { hasEnumBug } from './_setup.js';\nimport collectNonEnumProps from './_collectNonEnumProps.js';\n\n// Retrieve all the enumerable property names of an object.\nexport default function allKeys(obj) {\n if (!isObject(obj)) return [];\n var keys = [];\n for (var key in obj) keys.push(key);\n // Ahem, IE < 9.\n if (hasEnumBug) collectNonEnumProps(obj, keys);\n return keys;\n}\n","import getLength from './_getLength.js';\nimport isFunction from './isFunction.js';\nimport allKeys from './allKeys.js';\n\n// Since the regular `Object.prototype.toString` type tests don't work for\n// some types in IE 11, we use a fingerprinting heuristic instead, based\n// on the methods. It's not great, but it's the best we got.\n// The fingerprint method lists are defined below.\nexport function ie11fingerprint(methods) {\n var length = getLength(methods);\n return function(obj) {\n if (obj == null) return false;\n // `Map`, `WeakMap` and `Set` have no enumerable keys.\n var keys = allKeys(obj);\n if (getLength(keys)) return false;\n for (var i = 0; i < length; i++) {\n if (!isFunction(obj[methods[i]])) return false;\n }\n // If we are testing against `WeakMap`, we need to ensure that\n // `obj` doesn't have a `forEach` method in order to distinguish\n // it from a regular `Map`.\n return methods !== weakMapMethods || !isFunction(obj[forEachName]);\n };\n}\n\n// In the interest of compact minification, we write\n// each string in the fingerprints only once.\nvar forEachName = 'forEach',\n hasName = 'has',\n commonInit = ['clear', 'delete'],\n mapTail = ['get', hasName, 'set'];\n\n// `Map`, `WeakMap` and `Set` each have slightly different\n// combinations of the above sublists.\nexport var mapMethods = commonInit.concat(forEachName, mapTail),\n weakMapMethods = commonInit.concat(mapTail),\n setMethods = ['add'].concat(commonInit, forEachName, hasName);\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, mapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(mapMethods) : tagTester('Map');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, weakMapMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(weakMapMethods) : tagTester('WeakMap');\n","import tagTester from './_tagTester.js';\nimport { isIE11 } from './_stringTagBug.js';\nimport { ie11fingerprint, setMethods } from './_methodFingerprint.js';\n\nexport default isIE11 ? ie11fingerprint(setMethods) : tagTester('Set');\n","import tagTester from './_tagTester.js';\n\nexport default tagTester('WeakSet');\n","import keys from './keys.js';\n\n// Retrieve the values of an object's properties.\nexport default function values(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var values = Array(length);\n for (var i = 0; i < length; i++) {\n values[i] = obj[_keys[i]];\n }\n return values;\n}\n","import keys from './keys.js';\n\n// Convert an object into a list of `[key, value]` pairs.\n// The opposite of `_.object` with one argument.\nexport default function pairs(obj) {\n var _keys = keys(obj);\n var length = _keys.length;\n var pairs = Array(length);\n for (var i = 0; i < length; i++) {\n pairs[i] = [_keys[i], obj[_keys[i]]];\n }\n return pairs;\n}\n","import keys from './keys.js';\n\n// Invert the keys and values of an object. The values must be serializable.\nexport default function invert(obj) {\n var result = {};\n var _keys = keys(obj);\n for (var i = 0, length = _keys.length; i < length; i++) {\n result[obj[_keys[i]]] = _keys[i];\n }\n return result;\n}\n","import isFunction from './isFunction.js';\n\n// Return a sorted list of the function names available on the object.\nexport default function functions(obj) {\n var names = [];\n for (var key in obj) {\n if (isFunction(obj[key])) names.push(key);\n }\n return names.sort();\n}\n","// An internal function for creating assigner functions.\nexport default function createAssigner(keysFunc, defaults) {\n return function(obj) {\n var length = arguments.length;\n if (defaults) obj = Object(obj);\n if (length < 2 || obj == null) return obj;\n for (var index = 1; index < length; index++) {\n var source = arguments[index],\n keys = keysFunc(source),\n l = keys.length;\n for (var i = 0; i < l; i++) {\n var key = keys[i];\n if (!defaults || obj[key] === void 0) obj[key] = source[key];\n }\n }\n return obj;\n };\n}\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Extend a given object with all the properties in passed-in object(s).\nexport default createAssigner(allKeys);\n","import createAssigner from './_createAssigner.js';\nimport keys from './keys.js';\n\n// Assigns a given object with all the own properties in the passed-in\n// object(s).\n// (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\nexport default createAssigner(keys);\n","import createAssigner from './_createAssigner.js';\nimport allKeys from './allKeys.js';\n\n// Fill in a given object with default properties.\nexport default createAssigner(allKeys, true);\n","import isObject from './isObject.js';\nimport { nativeCreate } from './_setup.js';\n\n// Create a naked function reference for surrogate-prototype-swapping.\nfunction ctor() {\n return function(){};\n}\n\n// An internal function for creating a new object that inherits from another.\nexport default function baseCreate(prototype) {\n if (!isObject(prototype)) return {};\n if (nativeCreate) return nativeCreate(prototype);\n var Ctor = ctor();\n Ctor.prototype = prototype;\n var result = new Ctor;\n Ctor.prototype = null;\n return result;\n}\n","import baseCreate from './_baseCreate.js';\nimport extendOwn from './extendOwn.js';\n\n// Creates an object that inherits from the given prototype object.\n// If additional properties are provided then they will be added to the\n// created object.\nexport default function create(prototype, props) {\n var result = baseCreate(prototype);\n if (props) extendOwn(result, props);\n return result;\n}\n","import isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport extend from './extend.js';\n\n// Create a (shallow-cloned) duplicate of an object.\nexport default function clone(obj) {\n if (!isObject(obj)) return obj;\n return isArray(obj) ? obj.slice() : extend({}, obj);\n}\n","// Invokes `interceptor` with the `obj` and then returns `obj`.\n// The primary purpose of this method is to \"tap into\" a method chain, in\n// order to perform operations on intermediate results within the chain.\nexport default function tap(obj, interceptor) {\n interceptor(obj);\n return obj;\n}\n","import _ from './underscore.js';\nimport isArray from './isArray.js';\n\n// Normalize a (deep) property `path` to array.\n// Like `_.iteratee`, this function can be customized.\nexport default function toPath(path) {\n return isArray(path) ? path : [path];\n}\n_.toPath = toPath;\n","import _ from './underscore.js';\nimport './toPath.js';\n\n// Internal wrapper for `_.toPath` to enable minification.\n// Similar to `cb` for `_.iteratee`.\nexport default function toPath(path) {\n return _.toPath(path);\n}\n","// Internal function to obtain a nested property in `obj` along `path`.\nexport default function deepGet(obj, path) {\n var length = path.length;\n for (var i = 0; i < length; i++) {\n if (obj == null) return void 0;\n obj = obj[path[i]];\n }\n return length ? obj : void 0;\n}\n","import toPath from './_toPath.js';\nimport deepGet from './_deepGet.js';\nimport isUndefined from './isUndefined.js';\n\n// Get the value of the (deep) property on `path` from `object`.\n// If any property in `path` does not exist or if the value is\n// `undefined`, return `defaultValue` instead.\n// The `path` is normalized through `_.toPath`.\nexport default function get(object, path, defaultValue) {\n var value = deepGet(object, toPath(path));\n return isUndefined(value) ? defaultValue : value;\n}\n","import _has from './_has.js';\nimport toPath from './_toPath.js';\n\n// Shortcut function for checking if an object has a given property directly on\n// itself (in other words, not on a prototype). Unlike the internal `has`\n// function, this public version can also traverse nested properties.\nexport default function has(obj, path) {\n path = toPath(path);\n var length = path.length;\n for (var i = 0; i < length; i++) {\n var key = path[i];\n if (!_has(obj, key)) return false;\n obj = obj[key];\n }\n return !!length;\n}\n","// Keep the identity function around for default iteratees.\nexport default function identity(value) {\n return value;\n}\n","import extendOwn from './extendOwn.js';\nimport isMatch from './isMatch.js';\n\n// Returns a predicate for checking whether an object has a given set of\n// `key:value` pairs.\nexport default function matcher(attrs) {\n attrs = extendOwn({}, attrs);\n return function(obj) {\n return isMatch(obj, attrs);\n };\n}\n","import deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Creates a function that, when passed an object, will traverse that object’s\n// properties down the given `path`, specified as an array of keys or indices.\nexport default function property(path) {\n path = toPath(path);\n return function(obj) {\n return deepGet(obj, path);\n };\n}\n","// Internal function that returns an efficient (for current engines) version\n// of the passed-in callback, to be repeatedly applied in other Underscore\n// functions.\nexport default function optimizeCb(func, context, argCount) {\n if (context === void 0) return func;\n switch (argCount == null ? 3 : argCount) {\n case 1: return function(value) {\n return func.call(context, value);\n };\n // The 2-argument case is omitted because we’re not using it.\n case 3: return function(value, index, collection) {\n return func.call(context, value, index, collection);\n };\n case 4: return function(accumulator, value, index, collection) {\n return func.call(context, accumulator, value, index, collection);\n };\n }\n return function() {\n return func.apply(context, arguments);\n };\n}\n","import identity from './identity.js';\nimport isFunction from './isFunction.js';\nimport isObject from './isObject.js';\nimport isArray from './isArray.js';\nimport matcher from './matcher.js';\nimport property from './property.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// An internal function to generate callbacks that can be applied to each\n// element in a collection, returning the desired result — either `_.identity`,\n// an arbitrary callback, a property matcher, or a property accessor.\nexport default function baseIteratee(value, context, argCount) {\n if (value == null) return identity;\n if (isFunction(value)) return optimizeCb(value, context, argCount);\n if (isObject(value) && !isArray(value)) return matcher(value);\n return property(value);\n}\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\n\n// External wrapper for our callback generator. Users may customize\n// `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n// This abstraction hides the internal-only `argCount` argument.\nexport default function iteratee(value, context) {\n return baseIteratee(value, context, Infinity);\n}\n_.iteratee = iteratee;\n","import _ from './underscore.js';\nimport baseIteratee from './_baseIteratee.js';\nimport iteratee from './iteratee.js';\n\n// The function we call internally to generate a callback. It invokes\n// `_.iteratee` if overridden, otherwise `baseIteratee`.\nexport default function cb(value, context, argCount) {\n if (_.iteratee !== iteratee) return _.iteratee(value, context);\n return baseIteratee(value, context, argCount);\n}\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the results of applying the `iteratee` to each element of `obj`.\n// In contrast to `_.map` it returns an object.\nexport default function mapObject(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = keys(obj),\n length = _keys.length,\n results = {};\n for (var index = 0; index < length; index++) {\n var currentKey = _keys[index];\n results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","// Predicate-generating function. Often useful outside of Underscore.\nexport default function noop(){}\n","import noop from './noop.js';\nimport get from './get.js';\n\n// Generates a function for a given object that returns a given property.\nexport default function propertyOf(obj) {\n if (obj == null) return noop;\n return function(path) {\n return get(obj, path);\n };\n}\n","import optimizeCb from './_optimizeCb.js';\n\n// Run a function **n** times.\nexport default function times(n, iteratee, context) {\n var accum = Array(Math.max(0, n));\n iteratee = optimizeCb(iteratee, context, 1);\n for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n return accum;\n}\n","// Return a random integer between `min` and `max` (inclusive).\nexport default function random(min, max) {\n if (max == null) {\n max = min;\n min = 0;\n }\n return min + Math.floor(Math.random() * (max - min + 1));\n}\n","// A (possibly faster) way to get the current timestamp as an integer.\nexport default Date.now || function() {\n return new Date().getTime();\n};\n","import keys from './keys.js';\n\n// Internal helper to generate functions for escaping and unescaping strings\n// to/from HTML interpolation.\nexport default function createEscaper(map) {\n var escaper = function(match) {\n return map[match];\n };\n // Regexes for identifying a key that needs to be escaped.\n var source = '(?:' + keys(map).join('|') + ')';\n var testRegexp = RegExp(source);\n var replaceRegexp = RegExp(source, 'g');\n return function(string) {\n string = string == null ? '' : '' + string;\n return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n };\n}\n","// Internal list of HTML entities for escaping.\nexport default {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '`': '`'\n};\n","import createEscaper from './_createEscaper.js';\nimport escapeMap from './_escapeMap.js';\n\n// Function for escaping strings to HTML interpolation.\nexport default createEscaper(escapeMap);\n","import invert from './invert.js';\nimport escapeMap from './_escapeMap.js';\n\n// Internal list of HTML entities for unescaping.\nexport default invert(escapeMap);\n","import createEscaper from './_createEscaper.js';\nimport unescapeMap from './_unescapeMap.js';\n\n// Function for unescaping strings from HTML interpolation.\nexport default createEscaper(unescapeMap);\n","import _ from './underscore.js';\n\n// By default, Underscore uses ERB-style template delimiters. Change the\n// following template settings to use alternative delimiters.\nexport default _.templateSettings = {\n evaluate: /<%([\\s\\S]+?)%>/g,\n interpolate: /<%=([\\s\\S]+?)%>/g,\n escape: /<%-([\\s\\S]+?)%>/g\n};\n","import defaults from './defaults.js';\nimport _ from './underscore.js';\nimport './templateSettings.js';\n\n// When customizing `_.templateSettings`, if you don't want to define an\n// interpolation, evaluation or escaping regex, we need one that is\n// guaranteed not to match.\nvar noMatch = /(.)^/;\n\n// Certain characters need to be escaped so that they can be put into a\n// string literal.\nvar escapes = {\n \"'\": \"'\",\n '\\\\': '\\\\',\n '\\r': 'r',\n '\\n': 'n',\n '\\u2028': 'u2028',\n '\\u2029': 'u2029'\n};\n\nvar escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\nfunction escapeChar(match) {\n return '\\\\' + escapes[match];\n}\n\n// In order to prevent third-party code injection through\n// `_.templateSettings.variable`, we test it against the following regular\n// expression. It is intentionally a bit more liberal than just matching valid\n// identifiers, but still prevents possible loopholes through defaults or\n// destructuring assignment.\nvar bareIdentifier = /^\\s*(\\w|\\$)+\\s*$/;\n\n// JavaScript micro-templating, similar to John Resig's implementation.\n// Underscore templating handles arbitrary delimiters, preserves whitespace,\n// and correctly escapes quotes within interpolated code.\n// NB: `oldSettings` only exists for backwards compatibility.\nexport default function template(text, settings, oldSettings) {\n if (!settings && oldSettings) settings = oldSettings;\n settings = defaults({}, settings, _.templateSettings);\n\n // Combine delimiters into one regular expression via alternation.\n var matcher = RegExp([\n (settings.escape || noMatch).source,\n (settings.interpolate || noMatch).source,\n (settings.evaluate || noMatch).source\n ].join('|') + '|$', 'g');\n\n // Compile the template source, escaping string literals appropriately.\n var index = 0;\n var source = \"__p+='\";\n text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n index = offset + match.length;\n\n if (escape) {\n source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n } else if (interpolate) {\n source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n } else if (evaluate) {\n source += \"';\\n\" + evaluate + \"\\n__p+='\";\n }\n\n // Adobe VMs need the match returned to produce the correct offset.\n return match;\n });\n source += \"';\\n\";\n\n var argument = settings.variable;\n if (argument) {\n // Insure against third-party code injection. (CVE-2021-23358)\n if (!bareIdentifier.test(argument)) throw new Error(\n 'variable is not a bare identifier: ' + argument\n );\n } else {\n // If a variable is not specified, place data values in local scope.\n source = 'with(obj||{}){\\n' + source + '}\\n';\n argument = 'obj';\n }\n\n source = \"var __t,__p='',__j=Array.prototype.join,\" +\n \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n source + 'return __p;\\n';\n\n var render;\n try {\n render = new Function(argument, '_', source);\n } catch (e) {\n e.source = source;\n throw e;\n }\n\n var template = function(data) {\n return render.call(this, data, _);\n };\n\n // Provide the compiled source as a convenience for precompilation.\n template.source = 'function(' + argument + '){\\n' + source + '}';\n\n return template;\n}\n","import isFunction from './isFunction.js';\nimport toPath from './_toPath.js';\n\n// Traverses the children of `obj` along `path`. If a child is a function, it\n// is invoked with its parent as context. Returns the value of the final\n// child, or `fallback` if any child is undefined.\nexport default function result(obj, path, fallback) {\n path = toPath(path);\n var length = path.length;\n if (!length) {\n return isFunction(fallback) ? fallback.call(obj) : fallback;\n }\n for (var i = 0; i < length; i++) {\n var prop = obj == null ? void 0 : obj[path[i]];\n if (prop === void 0) {\n prop = fallback;\n i = length; // Ensure we don't continue iterating.\n }\n obj = isFunction(prop) ? prop.call(obj) : prop;\n }\n return obj;\n}\n","// Generate a unique integer id (unique within the entire client session).\n// Useful for temporary DOM ids.\nvar idCounter = 0;\nexport default function uniqueId(prefix) {\n var id = ++idCounter + '';\n return prefix ? prefix + id : id;\n}\n","import _ from './underscore.js';\n\n// Start chaining a wrapped Underscore object.\nexport default function chain(obj) {\n var instance = _(obj);\n instance._chain = true;\n return instance;\n}\n","import baseCreate from './_baseCreate.js';\nimport isObject from './isObject.js';\n\n// Internal function to execute `sourceFunc` bound to `context` with optional\n// `args`. Determines whether to execute a function as a constructor or as a\n// normal function.\nexport default function executeBound(sourceFunc, boundFunc, context, callingContext, args) {\n if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n var self = baseCreate(sourceFunc.prototype);\n var result = sourceFunc.apply(self, args);\n if (isObject(result)) return result;\n return self;\n}\n","import restArguments from './restArguments.js';\nimport executeBound from './_executeBound.js';\nimport _ from './underscore.js';\n\n// Partially apply a function by creating a version that has had some of its\n// arguments pre-filled, without changing its dynamic `this` context. `_` acts\n// as a placeholder by default, allowing any combination of arguments to be\n// pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\nvar partial = restArguments(function(func, boundArgs) {\n var placeholder = partial.placeholder;\n var bound = function() {\n var position = 0, length = boundArgs.length;\n var args = Array(length);\n for (var i = 0; i < length; i++) {\n args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n }\n while (position < arguments.length) args.push(arguments[position++]);\n return executeBound(func, bound, this, this, args);\n };\n return bound;\n});\n\npartial.placeholder = _;\nexport default partial;\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport executeBound from './_executeBound.js';\n\n// Create a function bound to a given object (assigning `this`, and arguments,\n// optionally).\nexport default restArguments(function(func, context, args) {\n if (!isFunction(func)) throw new TypeError('Bind must be called on a function');\n var bound = restArguments(function(callArgs) {\n return executeBound(func, bound, context, this, args.concat(callArgs));\n });\n return bound;\n});\n","import createSizePropertyCheck from './_createSizePropertyCheck.js';\nimport getLength from './_getLength.js';\n\n// Internal helper for collection methods to determine whether a collection\n// should be iterated as an array or as an object.\n// Related: https://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n// Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\nexport default createSizePropertyCheck(getLength);\n","import getLength from './_getLength.js';\nimport isArrayLike from './_isArrayLike.js';\nimport isArray from './isArray.js';\nimport isArguments from './isArguments.js';\n\n// Internal implementation of a recursive `flatten` function.\nexport default function flatten(input, depth, strict, output) {\n output = output || [];\n if (!depth && depth !== 0) {\n depth = Infinity;\n } else if (depth <= 0) {\n return output.concat(input);\n }\n var idx = output.length;\n for (var i = 0, length = getLength(input); i < length; i++) {\n var value = input[i];\n if (isArrayLike(value) && (isArray(value) || isArguments(value))) {\n // Flatten current level of array or arguments object.\n if (depth > 1) {\n flatten(value, depth - 1, strict, output);\n idx = output.length;\n } else {\n var j = 0, len = value.length;\n while (j < len) output[idx++] = value[j++];\n }\n } else if (!strict) {\n output[idx++] = value;\n }\n }\n return output;\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport bind from './bind.js';\n\n// Bind a number of an object's methods to that object. Remaining arguments\n// are the method names to be bound. Useful for ensuring that all callbacks\n// defined on an object belong to it.\nexport default restArguments(function(obj, keys) {\n keys = flatten(keys, false, false);\n var index = keys.length;\n if (index < 1) throw new Error('bindAll must be passed function names');\n while (index--) {\n var key = keys[index];\n obj[key] = bind(obj[key], obj);\n }\n return obj;\n});\n","import has from './_has.js';\n\n// Memoize an expensive function by storing its results.\nexport default function memoize(func, hasher) {\n var memoize = function(key) {\n var cache = memoize.cache;\n var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n return cache[address];\n };\n memoize.cache = {};\n return memoize;\n}\n","import restArguments from './restArguments.js';\n\n// Delays a function for the given number of milliseconds, and then calls\n// it with the arguments supplied.\nexport default restArguments(function(func, wait, args) {\n return setTimeout(function() {\n return func.apply(null, args);\n }, wait);\n});\n","import partial from './partial.js';\nimport delay from './delay.js';\nimport _ from './underscore.js';\n\n// Defers a function, scheduling it to run after the current call stack has\n// cleared.\nexport default partial(delay, _, 1);\n","import now from './now.js';\n\n// Returns a function, that, when invoked, will only be triggered at most once\n// during a given window of time. Normally, the throttled function will run\n// as much as it can, without ever going more than once per `wait` duration;\n// but if you'd like to disable the execution on the leading edge, pass\n// `{leading: false}`. To disable execution on the trailing edge, ditto.\nexport default function throttle(func, wait, options) {\n var timeout, context, args, result;\n var previous = 0;\n if (!options) options = {};\n\n var later = function() {\n previous = options.leading === false ? 0 : now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n\n var throttled = function() {\n var _now = now();\n if (!previous && options.leading === false) previous = _now;\n var remaining = wait - (_now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = _now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n\n throttled.cancel = function() {\n clearTimeout(timeout);\n previous = 0;\n timeout = context = args = null;\n };\n\n return throttled;\n}\n","import restArguments from './restArguments.js';\nimport now from './now.js';\n\n// When a sequence of calls of the returned function ends, the argument\n// function is triggered. The end of a sequence is defined by the `wait`\n// parameter. If `immediate` is passed, the argument function will be\n// triggered at the beginning of the sequence instead of at the end.\nexport default function debounce(func, wait, immediate) {\n var timeout, previous, args, result, context;\n\n var later = function() {\n var passed = now() - previous;\n if (wait > passed) {\n timeout = setTimeout(later, wait - passed);\n } else {\n timeout = null;\n if (!immediate) result = func.apply(context, args);\n // This check is needed because `func` can recursively invoke `debounced`.\n if (!timeout) args = context = null;\n }\n };\n\n var debounced = restArguments(function(_args) {\n context = this;\n args = _args;\n previous = now();\n if (!timeout) {\n timeout = setTimeout(later, wait);\n if (immediate) result = func.apply(context, args);\n }\n return result;\n });\n\n debounced.cancel = function() {\n clearTimeout(timeout);\n timeout = args = context = null;\n };\n\n return debounced;\n}\n","import partial from './partial.js';\n\n// Returns the first function passed as an argument to the second,\n// allowing you to adjust arguments, run code before and after, and\n// conditionally execute the original function.\nexport default function wrap(func, wrapper) {\n return partial(wrapper, func);\n}\n","// Returns a negated version of the passed-in predicate.\nexport default function negate(predicate) {\n return function() {\n return !predicate.apply(this, arguments);\n };\n}\n","// Returns a function that is the composition of a list of functions, each\n// consuming the return value of the function that follows.\nexport default function compose() {\n var args = arguments;\n var start = args.length - 1;\n return function() {\n var i = start;\n var result = args[start].apply(this, arguments);\n while (i--) result = args[i].call(this, result);\n return result;\n };\n}\n","// Returns a function that will only be executed on and after the Nth call.\nexport default function after(times, func) {\n return function() {\n if (--times < 1) {\n return func.apply(this, arguments);\n }\n };\n}\n","// Returns a function that will only be executed up to (but not including) the\n// Nth call.\nexport default function before(times, func) {\n var memo;\n return function() {\n if (--times > 0) {\n memo = func.apply(this, arguments);\n }\n if (times <= 1) func = null;\n return memo;\n };\n}\n","import partial from './partial.js';\nimport before from './before.js';\n\n// Returns a function that will be executed at most one time, no matter how\n// often you call it. Useful for lazy initialization.\nexport default partial(before, 2);\n","import cb from './_cb.js';\nimport keys from './keys.js';\n\n// Returns the first key on an object that passes a truth test.\nexport default function findKey(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = keys(obj), key;\n for (var i = 0, length = _keys.length; i < length; i++) {\n key = _keys[i];\n if (predicate(obj[key], key, obj)) return key;\n }\n}\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Internal function to generate `_.findIndex` and `_.findLastIndex`.\nexport default function createPredicateIndexFinder(dir) {\n return function(array, predicate, context) {\n predicate = cb(predicate, context);\n var length = getLength(array);\n var index = dir > 0 ? 0 : length - 1;\n for (; index >= 0 && index < length; index += dir) {\n if (predicate(array[index], index, array)) return index;\n }\n return -1;\n };\n}\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the first index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(1);\n","import createPredicateIndexFinder from './_createPredicateIndexFinder.js';\n\n// Returns the last index on an array-like that passes a truth test.\nexport default createPredicateIndexFinder(-1);\n","import cb from './_cb.js';\nimport getLength from './_getLength.js';\n\n// Use a comparator function to figure out the smallest index at which\n// an object should be inserted so as to maintain order. Uses binary search.\nexport default function sortedIndex(array, obj, iteratee, context) {\n iteratee = cb(iteratee, context, 1);\n var value = iteratee(obj);\n var low = 0, high = getLength(array);\n while (low < high) {\n var mid = Math.floor((low + high) / 2);\n if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n }\n return low;\n}\n","import getLength from './_getLength.js';\nimport { slice } from './_setup.js';\nimport isNaN from './isNaN.js';\n\n// Internal function to generate the `_.indexOf` and `_.lastIndexOf` functions.\nexport default function createIndexFinder(dir, predicateFind, sortedIndex) {\n return function(array, item, idx) {\n var i = 0, length = getLength(array);\n if (typeof idx == 'number') {\n if (dir > 0) {\n i = idx >= 0 ? idx : Math.max(idx + length, i);\n } else {\n length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n }\n } else if (sortedIndex && idx && length) {\n idx = sortedIndex(array, item);\n return array[idx] === item ? idx : -1;\n }\n if (item !== item) {\n idx = predicateFind(slice.call(array, i, length), isNaN);\n return idx >= 0 ? idx + i : -1;\n }\n for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n if (array[idx] === item) return idx;\n }\n return -1;\n };\n}\n","import sortedIndex from './sortedIndex.js';\nimport findIndex from './findIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the first occurrence of an item in an array,\n// or -1 if the item is not included in the array.\n// If the array is large and already in sort order, pass `true`\n// for **isSorted** to use binary search.\nexport default createIndexFinder(1, findIndex, sortedIndex);\n","import findLastIndex from './findLastIndex.js';\nimport createIndexFinder from './_createIndexFinder.js';\n\n// Return the position of the last occurrence of an item in an array,\n// or -1 if the item is not included in the array.\nexport default createIndexFinder(-1, findLastIndex);\n","import isArrayLike from './_isArrayLike.js';\nimport findIndex from './findIndex.js';\nimport findKey from './findKey.js';\n\n// Return the first value which passes a truth test.\nexport default function find(obj, predicate, context) {\n var keyFinder = isArrayLike(obj) ? findIndex : findKey;\n var key = keyFinder(obj, predicate, context);\n if (key !== void 0 && key !== -1) return obj[key];\n}\n","import find from './find.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.find`: getting the first\n// object containing specific `key:value` pairs.\nexport default function findWhere(obj, attrs) {\n return find(obj, matcher(attrs));\n}\n","import optimizeCb from './_optimizeCb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// The cornerstone for collection functions, an `each`\n// implementation, aka `forEach`.\n// Handles raw objects in addition to array-likes. Treats all\n// sparse array-likes as if they were dense.\nexport default function each(obj, iteratee, context) {\n iteratee = optimizeCb(iteratee, context);\n var i, length;\n if (isArrayLike(obj)) {\n for (i = 0, length = obj.length; i < length; i++) {\n iteratee(obj[i], i, obj);\n }\n } else {\n var _keys = keys(obj);\n for (i = 0, length = _keys.length; i < length; i++) {\n iteratee(obj[_keys[i]], _keys[i], obj);\n }\n }\n return obj;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the results of applying the iteratee to each element.\nexport default function map(obj, iteratee, context) {\n iteratee = cb(iteratee, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n results = Array(length);\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n results[index] = iteratee(obj[currentKey], currentKey, obj);\n }\n return results;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\nimport optimizeCb from './_optimizeCb.js';\n\n// Internal helper to create a reducing function, iterating left or right.\nexport default function createReduce(dir) {\n // Wrap code that reassigns argument variables in a separate function than\n // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n var reducer = function(obj, iteratee, memo, initial) {\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length,\n index = dir > 0 ? 0 : length - 1;\n if (!initial) {\n memo = obj[_keys ? _keys[index] : index];\n index += dir;\n }\n for (; index >= 0 && index < length; index += dir) {\n var currentKey = _keys ? _keys[index] : index;\n memo = iteratee(memo, obj[currentKey], currentKey, obj);\n }\n return memo;\n };\n\n return function(obj, iteratee, memo, context) {\n var initial = arguments.length >= 3;\n return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n };\n}\n","import createReduce from './_createReduce.js';\n\n// **Reduce** builds up a single result from a list of values, aka `inject`,\n// or `foldl`.\nexport default createReduce(1);\n","import createReduce from './_createReduce.js';\n\n// The right-associative version of reduce, also known as `foldr`.\nexport default createReduce(-1);\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// Return all the elements that pass a truth test.\nexport default function filter(obj, predicate, context) {\n var results = [];\n predicate = cb(predicate, context);\n each(obj, function(value, index, list) {\n if (predicate(value, index, list)) results.push(value);\n });\n return results;\n}\n","import filter from './filter.js';\nimport negate from './negate.js';\nimport cb from './_cb.js';\n\n// Return all the elements for which a truth test fails.\nexport default function reject(obj, predicate, context) {\n return filter(obj, negate(cb(predicate)), context);\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine whether all of the elements pass a truth test.\nexport default function every(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (!predicate(obj[currentKey], currentKey, obj)) return false;\n }\n return true;\n}\n","import cb from './_cb.js';\nimport isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Determine if at least one element in the object passes a truth test.\nexport default function some(obj, predicate, context) {\n predicate = cb(predicate, context);\n var _keys = !isArrayLike(obj) && keys(obj),\n length = (_keys || obj).length;\n for (var index = 0; index < length; index++) {\n var currentKey = _keys ? _keys[index] : index;\n if (predicate(obj[currentKey], currentKey, obj)) return true;\n }\n return false;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport indexOf from './indexOf.js';\n\n// Determine if the array or object contains a given item (using `===`).\nexport default function contains(obj, item, fromIndex, guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n return indexOf(obj, item, fromIndex) >= 0;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport map from './map.js';\nimport deepGet from './_deepGet.js';\nimport toPath from './_toPath.js';\n\n// Invoke a method (with arguments) on every item in a collection.\nexport default restArguments(function(obj, path, args) {\n var contextPath, func;\n if (isFunction(path)) {\n func = path;\n } else {\n path = toPath(path);\n contextPath = path.slice(0, -1);\n path = path[path.length - 1];\n }\n return map(obj, function(context) {\n var method = func;\n if (!method) {\n if (contextPath && contextPath.length) {\n context = deepGet(context, contextPath);\n }\n if (context == null) return void 0;\n method = context[path];\n }\n return method == null ? method : method.apply(context, args);\n });\n});\n","import map from './map.js';\nimport property from './property.js';\n\n// Convenience version of a common use case of `_.map`: fetching a property.\nexport default function pluck(obj, key) {\n return map(obj, property(key));\n}\n","import filter from './filter.js';\nimport matcher from './matcher.js';\n\n// Convenience version of a common use case of `_.filter`: selecting only\n// objects containing specific `key:value` pairs.\nexport default function where(obj, attrs) {\n return filter(obj, matcher(attrs));\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the maximum element (or element-based computation).\nexport default function max(obj, iteratee, context) {\n var result = -Infinity, lastComputed = -Infinity,\n value, computed;\n if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value > result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport cb from './_cb.js';\nimport each from './each.js';\n\n// Return the minimum element (or element-based computation).\nexport default function min(obj, iteratee, context) {\n var result = Infinity, lastComputed = Infinity,\n value, computed;\n if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) {\n obj = isArrayLike(obj) ? obj : values(obj);\n for (var i = 0, length = obj.length; i < length; i++) {\n value = obj[i];\n if (value != null && value < result) {\n result = value;\n }\n }\n } else {\n iteratee = cb(iteratee, context);\n each(obj, function(v, index, list) {\n computed = iteratee(v, index, list);\n if (computed < lastComputed || (computed === Infinity && result === Infinity)) {\n result = v;\n lastComputed = computed;\n }\n });\n }\n return result;\n}\n","import isArray from './isArray.js';\nimport { slice } from './_setup.js';\nimport isString from './isString.js';\nimport isArrayLike from './_isArrayLike.js';\nimport map from './map.js';\nimport identity from './identity.js';\nimport values from './values.js';\n\n// Safely create a real, live array from anything iterable.\nvar reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\nexport default function toArray(obj) {\n if (!obj) return [];\n if (isArray(obj)) return slice.call(obj);\n if (isString(obj)) {\n // Keep surrogate pair characters together.\n return obj.match(reStrSymbol);\n }\n if (isArrayLike(obj)) return map(obj, identity);\n return values(obj);\n}\n","import isArrayLike from './_isArrayLike.js';\nimport values from './values.js';\nimport getLength from './_getLength.js';\nimport random from './random.js';\nimport toArray from './toArray.js';\n\n// Sample **n** random values from a collection using the modern version of the\n// [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n// If **n** is not specified, returns a single random element.\n// The internal `guard` argument allows it to work with `_.map`.\nexport default function sample(obj, n, guard) {\n if (n == null || guard) {\n if (!isArrayLike(obj)) obj = values(obj);\n return obj[random(obj.length - 1)];\n }\n var sample = toArray(obj);\n var length = getLength(sample);\n n = Math.max(Math.min(n, length), 0);\n var last = length - 1;\n for (var index = 0; index < n; index++) {\n var rand = random(index, last);\n var temp = sample[index];\n sample[index] = sample[rand];\n sample[rand] = temp;\n }\n return sample.slice(0, n);\n}\n","import sample from './sample.js';\n\n// Shuffle a collection.\nexport default function shuffle(obj) {\n return sample(obj, Infinity);\n}\n","import cb from './_cb.js';\nimport pluck from './pluck.js';\nimport map from './map.js';\n\n// Sort the object's values by a criterion produced by an iteratee.\nexport default function sortBy(obj, iteratee, context) {\n var index = 0;\n iteratee = cb(iteratee, context);\n return pluck(map(obj, function(value, key, list) {\n return {\n value: value,\n index: index++,\n criteria: iteratee(value, key, list)\n };\n }).sort(function(left, right) {\n var a = left.criteria;\n var b = right.criteria;\n if (a !== b) {\n if (a > b || a === void 0) return 1;\n if (a < b || b === void 0) return -1;\n }\n return left.index - right.index;\n }), 'value');\n}\n","import cb from './_cb.js';\nimport each from './each.js';\n\n// An internal function used for aggregate \"group by\" operations.\nexport default function group(behavior, partition) {\n return function(obj, iteratee, context) {\n var result = partition ? [[], []] : {};\n iteratee = cb(iteratee, context);\n each(obj, function(value, index) {\n var key = iteratee(value, index, obj);\n behavior(result, value, key);\n });\n return result;\n };\n}\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Groups the object's values by a criterion. Pass either a string attribute\n// to group by, or a function that returns the criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key].push(value); else result[key] = [value];\n});\n","import group from './_group.js';\n\n// Indexes the object's values by a criterion, similar to `_.groupBy`, but for\n// when you know that your index values will be unique.\nexport default group(function(result, value, key) {\n result[key] = value;\n});\n","import group from './_group.js';\nimport has from './_has.js';\n\n// Counts instances of an object that group by a certain criterion. Pass\n// either a string attribute to count by, or a function that returns the\n// criterion.\nexport default group(function(result, value, key) {\n if (has(result, key)) result[key]++; else result[key] = 1;\n});\n","import group from './_group.js';\n\n// Split a collection into two arrays: one whose elements all pass the given\n// truth test, and one whose elements all do not pass the truth test.\nexport default group(function(result, value, pass) {\n result[pass ? 0 : 1].push(value);\n}, true);\n","import isArrayLike from './_isArrayLike.js';\nimport keys from './keys.js';\n\n// Return the number of elements in a collection.\nexport default function size(obj) {\n if (obj == null) return 0;\n return isArrayLike(obj) ? obj.length : keys(obj).length;\n}\n","// Internal `_.pick` helper function to determine whether `key` is an enumerable\n// property name of `obj`.\nexport default function keyInObj(value, key, obj) {\n return key in obj;\n}\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport optimizeCb from './_optimizeCb.js';\nimport allKeys from './allKeys.js';\nimport keyInObj from './_keyInObj.js';\nimport flatten from './_flatten.js';\n\n// Return a copy of the object only containing the allowed properties.\nexport default restArguments(function(obj, keys) {\n var result = {}, iteratee = keys[0];\n if (obj == null) return result;\n if (isFunction(iteratee)) {\n if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n keys = allKeys(obj);\n } else {\n iteratee = keyInObj;\n keys = flatten(keys, false, false);\n obj = Object(obj);\n }\n for (var i = 0, length = keys.length; i < length; i++) {\n var key = keys[i];\n var value = obj[key];\n if (iteratee(value, key, obj)) result[key] = value;\n }\n return result;\n});\n","import restArguments from './restArguments.js';\nimport isFunction from './isFunction.js';\nimport negate from './negate.js';\nimport map from './map.js';\nimport flatten from './_flatten.js';\nimport contains from './contains.js';\nimport pick from './pick.js';\n\n// Return a copy of the object without the disallowed properties.\nexport default restArguments(function(obj, keys) {\n var iteratee = keys[0], context;\n if (isFunction(iteratee)) {\n iteratee = negate(iteratee);\n if (keys.length > 1) context = keys[1];\n } else {\n keys = map(flatten(keys, false, false), String);\n iteratee = function(value, key) {\n return !contains(keys, key);\n };\n }\n return pick(obj, iteratee, context);\n});\n","import { slice } from './_setup.js';\n\n// Returns everything but the last entry of the array. Especially useful on\n// the arguments object. Passing **n** will return all the values in\n// the array, excluding the last N.\nexport default function initial(array, n, guard) {\n return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n}\n","import initial from './initial.js';\n\n// Get the first element of an array. Passing **n** will return the first N\n// values in the array. The **guard** check allows it to work with `_.map`.\nexport default function first(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[0];\n return initial(array, array.length - n);\n}\n","import { slice } from './_setup.js';\n\n// Returns everything but the first entry of the `array`. Especially useful on\n// the `arguments` object. Passing an **n** will return the rest N values in the\n// `array`.\nexport default function rest(array, n, guard) {\n return slice.call(array, n == null || guard ? 1 : n);\n}\n","import rest from './rest.js';\n\n// Get the last element of an array. Passing **n** will return the last N\n// values in the array.\nexport default function last(array, n, guard) {\n if (array == null || array.length < 1) return n == null || guard ? void 0 : [];\n if (n == null || guard) return array[array.length - 1];\n return rest(array, Math.max(0, array.length - n));\n}\n","import filter from './filter.js';\n\n// Trim out all falsy values from an array.\nexport default function compact(array) {\n return filter(array, Boolean);\n}\n","import _flatten from './_flatten.js';\n\n// Flatten out an array, either recursively (by default), or up to `depth`.\n// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.\nexport default function flatten(array, depth) {\n return _flatten(array, depth, false);\n}\n","import restArguments from './restArguments.js';\nimport flatten from './_flatten.js';\nimport filter from './filter.js';\nimport contains from './contains.js';\n\n// Take the difference between one array and a number of other arrays.\n// Only the elements present in just the first array will remain.\nexport default restArguments(function(array, rest) {\n rest = flatten(rest, true, true);\n return filter(array, function(value){\n return !contains(rest, value);\n });\n});\n","import restArguments from './restArguments.js';\nimport difference from './difference.js';\n\n// Return a version of the array that does not contain the specified value(s).\nexport default restArguments(function(array, otherArrays) {\n return difference(array, otherArrays);\n});\n","import isBoolean from './isBoolean.js';\nimport cb from './_cb.js';\nimport getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce a duplicate-free version of the array. If the array has already\n// been sorted, you have the option of using a faster algorithm.\n// The faster algorithm will not work with an iteratee if the iteratee\n// is not a one-to-one function, so providing an iteratee will disable\n// the faster algorithm.\nexport default function uniq(array, isSorted, iteratee, context) {\n if (!isBoolean(isSorted)) {\n context = iteratee;\n iteratee = isSorted;\n isSorted = false;\n }\n if (iteratee != null) iteratee = cb(iteratee, context);\n var result = [];\n var seen = [];\n for (var i = 0, length = getLength(array); i < length; i++) {\n var value = array[i],\n computed = iteratee ? iteratee(value, i, array) : value;\n if (isSorted && !iteratee) {\n if (!i || seen !== computed) result.push(value);\n seen = computed;\n } else if (iteratee) {\n if (!contains(seen, computed)) {\n seen.push(computed);\n result.push(value);\n }\n } else if (!contains(result, value)) {\n result.push(value);\n }\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport uniq from './uniq.js';\nimport flatten from './_flatten.js';\n\n// Produce an array that contains the union: each distinct element from all of\n// the passed-in arrays.\nexport default restArguments(function(arrays) {\n return uniq(flatten(arrays, true, true));\n});\n","import getLength from './_getLength.js';\nimport contains from './contains.js';\n\n// Produce an array that contains every item shared between all the\n// passed-in arrays.\nexport default function intersection(array) {\n var result = [];\n var argsLength = arguments.length;\n for (var i = 0, length = getLength(array); i < length; i++) {\n var item = array[i];\n if (contains(result, item)) continue;\n var j;\n for (j = 1; j < argsLength; j++) {\n if (!contains(arguments[j], item)) break;\n }\n if (j === argsLength) result.push(item);\n }\n return result;\n}\n","import max from './max.js';\nimport getLength from './_getLength.js';\nimport pluck from './pluck.js';\n\n// Complement of zip. Unzip accepts an array of arrays and groups\n// each array's elements on shared indices.\nexport default function unzip(array) {\n var length = (array && max(array, getLength).length) || 0;\n var result = Array(length);\n\n for (var index = 0; index < length; index++) {\n result[index] = pluck(array, index);\n }\n return result;\n}\n","import restArguments from './restArguments.js';\nimport unzip from './unzip.js';\n\n// Zip together multiple lists into a single array -- elements that share\n// an index go together.\nexport default restArguments(unzip);\n","import getLength from './_getLength.js';\n\n// Converts lists into objects. Pass either a single array of `[key, value]`\n// pairs, or two parallel arrays of the same length -- one of keys, and one of\n// the corresponding values. Passing by pairs is the reverse of `_.pairs`.\nexport default function object(list, values) {\n var result = {};\n for (var i = 0, length = getLength(list); i < length; i++) {\n if (values) {\n result[list[i]] = values[i];\n } else {\n result[list[i][0]] = list[i][1];\n }\n }\n return result;\n}\n","// Generate an integer Array containing an arithmetic progression. A port of\n// the native Python `range()` function. See\n// [the Python documentation](https://docs.python.org/library/functions.html#range).\nexport default function range(start, stop, step) {\n if (stop == null) {\n stop = start || 0;\n start = 0;\n }\n if (!step) {\n step = stop < start ? -1 : 1;\n }\n\n var length = Math.max(Math.ceil((stop - start) / step), 0);\n var range = Array(length);\n\n for (var idx = 0; idx < length; idx++, start += step) {\n range[idx] = start;\n }\n\n return range;\n}\n","import { slice } from './_setup.js';\n\n// Chunk a single array into multiple arrays, each containing `count` or fewer\n// items.\nexport default function chunk(array, count) {\n if (count == null || count < 1) return [];\n var result = [];\n var i = 0, length = array.length;\n while (i < length) {\n result.push(slice.call(array, i, i += count));\n }\n return result;\n}\n","import _ from './underscore.js';\n\n// Helper function to continue chaining intermediate results.\nexport default function chainResult(instance, obj) {\n return instance._chain ? _(obj).chain() : obj;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport functions from './functions.js';\nimport { push } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add your own custom functions to the Underscore object.\nexport default function mixin(obj) {\n each(functions(obj), function(name) {\n var func = _[name] = obj[name];\n _.prototype[name] = function() {\n var args = [this._wrapped];\n push.apply(args, arguments);\n return chainResult(this, func.apply(_, args));\n };\n });\n return _;\n}\n","import _ from './underscore.js';\nimport each from './each.js';\nimport { ArrayProto } from './_setup.js';\nimport chainResult from './_chainResult.js';\n\n// Add all mutator `Array` functions to the wrapper.\neach(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) {\n method.apply(obj, arguments);\n if ((name === 'shift' || name === 'splice') && obj.length === 0) {\n delete obj[0];\n }\n }\n return chainResult(this, obj);\n };\n});\n\n// Add all accessor `Array` functions to the wrapper.\neach(['concat', 'join', 'slice'], function(name) {\n var method = ArrayProto[name];\n _.prototype[name] = function() {\n var obj = this._wrapped;\n if (obj != null) obj = method.apply(obj, arguments);\n return chainResult(this, obj);\n };\n});\n\nexport default _;\n","// Default Export\n// ==============\n// In this module, we mix our bundled exports into the `_` object and export\n// the result. This is analogous to setting `module.exports = _` in CommonJS.\n// Hence, this module is also the entry point of our UMD bundle and the package\n// entry point for CommonJS and AMD users. In other words, this is (the source\n// of) the module you are interfacing with when you do any of the following:\n//\n// ```js\n// // CommonJS\n// var _ = require('underscore');\n//\n// // AMD\n// define(['underscore'], function(_) {...});\n//\n// // UMD in the browser\n// // _ is available as a global variable\n// ```\nimport * as allExports from './index.js';\nimport { mixin } from './index.js';\n\n// Add all of the Underscore functions to the wrapper object.\nvar _ = mixin(allExports);\n// Legacy Node.js API.\n_._ = _;\n// Export the Underscore API.\nexport default _;\n","import { getElements } from \"js-utils/src/selector\"\nimport { addClass, removeClass } from \"js-utils/src/attribute\"\nimport { debounce } from \"underscore\"\nimport init from \"../../common/base/init\"\n\ninit(() => {\n const containers = getElements(\".bundle-list\")\n if (!containers.length) return\n\n Array.from(containers).map((container) => {\n const input = container.querySelector(\".-search-api input\")\n const emptyState = container.querySelector(\".-empty-state\")\n const fullTree = getElements(\"li\", container)\n\n if (!input) return\n\n input.addEventListener(\n \"input\",\n debounce(async () => {\n const searchString = input.value.trim()\n\n if (searchString) {\n container.classList.add(\"--searching\")\n\n removeClass(fullTree, \"--revealed\")\n removeClass(fullTree, \"--highlighted\")\n addClass(fullTree, \"--hidden\")\n addClass(\"ul.--root\", \"--no-search-hits\")\n\n const url = `${window.location.href}/api/search?q=${searchString}`\n\n let searchResultsContainer =\n document.querySelector(`.search-api-results`)\n\n if (!searchResultsContainer) {\n searchResultsContainer = document.createElement(`ul`)\n searchResultsContainer.classList.add(`search-api-results`)\n document\n .querySelector(`.bundle-list`)\n .appendChild(searchResultsContainer)\n }\n\n searchResultsContainer.innerHTML = ``\n\n let resultsJSON\n const results = await fetch(`${url}`)\n\n if (results) resultsJSON = await results.json()\n\n if (resultsJSON && resultsJSON.files && resultsJSON.files.length) {\n resultsJSON.files.forEach((file) => {\n const item = document.createElement(`li`)\n item.innerHTML = `\n \n \n \n \n ${file.packageable.title}\n ${file.packageable.introduction}\n \n \n \n `\n searchResultsContainer.appendChild(item)\n })\n\n removeClass(emptyState, \"--visible\")\n } else {\n addClass(emptyState, \"--visible\")\n }\n } else {\n container.classList.remove(\"--searching\")\n removeClass(emptyState, \"--visible\")\n }\n }, 500)\n )\n })\n})\n","import init from \"../../common/base/init\";\n\n// onClick handler\n\ninit(() => {\n const newsletterBannerBtn = document.querySelector(\n \".newsletter-banner__text\"\n );\n\n const newsletterModal = document.getElementById(\"newsletter-modal\");\n\n if (newsletterBannerBtn && newsletterModal) {\n newsletterBannerBtn.onclick = () => {\n newsletterModal.A11yDialogInstance.show();\n };\n }\n});\n"],"names":["init","toggleTrigger","getElements","trigger","e","target","parent","classOpen","classClose","factory","registeredInModuleLoader","module","OldCookies","api","extend","result","attributes","key","decode","s","converter","set","value","stringifiedAttributes","attributeName","get","json","jar","cookies","i","parts","cookie","name","debounce","delay","fn","inDebounce","args","context","elems","setAttrs","elem","edges","internal","a","href","trackGoogleAnalyticsEvent","obj","item","Cookies","ttl","domain","expires","cookieDomain","date","c","nameEQ","ca","config","ahoy","options","$","visitId","visitorId","track","isReady","queue","canStringify","eventQueue","visitsUrl","eventsUrl","isEmpty","canTrackNow","serialize","object","data","setCookie","getCookie","destroyCookie","log","message","setReady","callback","matchesSelector","element","selector","matches","onEvent","eventName","matchedElement","documentReady","generateId","r","v","saveEventQueue","csrfToken","meta","csrfParam","CSRFProtection","xhr","token","sendRequest","url","success","header","eventData","event","trackEvent","trackEventNow","param","page","presence","str","cleanObject","eventProperties","getClosestSection","createVisit","enabled","properties","additionalProperties","propName","eventTracking","eventTrackingProps","props","eventTrackingTrack","global","this","EvEmitter","proto","listener","events","listeners","onceEvents","onceListeners","index","isOnce","window","require$$0","console","b","prop","arraySlice","makeArray","isArrayLike","ImagesLoaded","onAlways","queryElem","nodeType","elementNodeTypes","childImgs","img","children","child","style","reURL","loadingImage","LoadingImage","background","Background","_this","onProgress","image","jqMethod","isComplete","isLoaded","method","jQuery","instance","containers","container","grid","resizeItem","rowHeight","rowGap","rowSpan","resizeAllItems","allItems","x","resizeInstance","imagesLoaded","optionsDefault","containerEl","optionsNew","publicMethods","isInited","buttons","removeAllActiveClasses","activeItems","activeItem","addClassesUpTheTree","button","parentItem","onButtonKeyup","onItemMouseenter","onItemMouseleave","onButtonClick","isActive","onDocumentClick","doRemove","el","onDocumentKeyup","setScrolled","toggleClass","togglers","addEventListener","triggerEl","nav","removeClass","navMain","accessibleNav","navBar","testBtn","FOCUSABLE_ELEMENTS","TAB_KEY","ESCAPE_KEY","focusedBeforeDialog","A11yDialog","node","targets","document","collect","getSiblings","$$","opener","closer","setFocusToFirstItem","type","handler","trapTabKey","toArray","collection","focusableChildren","getFocusableChildren","focused","focusedItemIndex","nodes","siblings","instantiateDialogs","elements","Dialog","contentEl","hasClosest","saveToLibrary","showMigration","delegateEventListener","toggler","closeBtn","triggers","checkbox","sub","roots","root","subTotal","subChecked","checkboxes","parentCheck","parentCheckbox","childCheckboxes","childCheckboxesChecked","dateTypeInput","dateFromInput","dateToInput","ToggleHiddenInputs","addClass","ToggleDisableInputs","makeToggable","list","listItem","ul","fetchContents","folderList","folderId","folderName","parentName","root_url","response","folders","files","fileContainer","dataLastVisitedAtEl","folder","labelContainer","folderSvg","isNew","file","fileSvg","notificationContainer","folderItem","isArray","getTag","baseToString","toString","isString","isNumber","isBoolean","isObjectLike","isObject","isDefined","isBlank","INCORRECT_INDEX_TYPE","LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY","PATTERN_LENGTH_TOO_LARGE","max","MISSING_KEY_PROPERTY","INVALID_KEY_WEIGHT_VALUE","hasOwn","KeyStore","keys","totalWeight","createKey","keyId","path","id","src","weight","getFn","createKeyPath","createKeyId","arr","deepGet","len","MatchOptions","BasicOptions","FuzzyOptions","AdvancedOptions","Config","SPACE","norm","mantissa","cache","m","numTokens","n","FuseIndex","fieldNormWeight","docs","records","idx","doc","docIndex","record","keyIndex","subRecords","stack","nestedArrIndex","subRecord","k","createIndex","myIndex","parseIndex","computeScore$1","pattern","errors","currentLocation","expectedLocation","distance","ignoreLocation","accuracy","proximity","convertMaskToIndices","matchmask","minMatchCharLength","indices","start","end","match","MAX_BITS","search","text","patternAlphabet","location","threshold","findAllMatches","includeMatches","patternLen","textLen","currentThreshold","bestLocation","computeMatches","matchMask","score","lastBitArr","finalScore","binMax","mask","binMin","binMid","finish","bitArr","j","charMatch","createPatternAlphabet","char","BitapSearch","isCaseSensitive","addChunk","startIndex","remainder","allIndices","totalScore","hasMatches","alphabet","isMatch","BaseMatch","getMatch","exp","ExactMatch","InverseExactMatch","PrefixExactMatch","InversePrefixExactMatch","SuffixExactMatch","InverseSuffixExactMatch","FuzzyMatch","IncludeMatch","searchers","searchersLen","SPACE_RE","OR_TOKEN","parseQuery","query","results","queryItem","found","searcher","MultiMatchSet","ExtendedSearch","_","numMatches","qLen","pLen","registeredSearchers","register","createSearcher","searcherClass","LogicalOperator","KeyType","isExpression","isPath","isLeaf","convertToExplicit","parse","auto","next","isQueryPath","computeScore","ignoreFieldNorm","transformMatches","transformScore","format","includeScore","transformers","transformer","Fuse","predicate","limit","shouldSort","sortFn","expression","evaluate","res","resultMap","expResults","searchAttrs","input","emptyState","fullTree","objects","searchData","attr","fuse","searchString","resultInDom","VERSION","ArrayProto","ObjProto","SymbolProto","push","slice","hasOwnProperty","supportsArrayBuffer","supportsDataView","nativeIsArray","nativeKeys","nativeCreate","nativeIsView","_isNaN","_isFinite","hasEnumBug","nonEnumerableProps","MAX_ARRAY_INDEX","restArguments","func","length","rest","isNull","isUndefined","isElement","tagTester","tag","isDate","isRegExp","isError","isSymbol","isArrayBuffer","isFunction","nodelist","isFunction$1","hasObjectTag","hasDataViewBug","isIE11","isDataView","alternateIsDataView","isDataView$1","has","isArguments","isArguments$1","isFinite","isNaN","constant","createSizePropertyCheck","getSizeProperty","sizeProperty","shallowProperty","getByteLength","isBufferLike","typedArrayPattern","isTypedArray","isTypedArray$1","getLength","emulatedSet","hash","l","collectNonEnumProps","nonEnumIdx","constructor","attrs","_keys","toBufferView","bufferSource","tagDataView","eq","aStack","bStack","deepEq","className","areArrays","byteLength","aCtor","bCtor","isEqual","allKeys","ie11fingerprint","methods","weakMapMethods","forEachName","hasName","commonInit","mapTail","mapMethods","setMethods","isMap","isWeakMap","isSet","isWeakSet","values","pairs","invert","functions","names","createAssigner","keysFunc","defaults","source","extendOwn","ctor","baseCreate","prototype","Ctor","create","clone","tap","interceptor","toPath","defaultValue","_has","identity","matcher","property","optimizeCb","argCount","accumulator","baseIteratee","iteratee","cb","mapObject","currentKey","noop","propertyOf","times","accum","random","min","now","createEscaper","map","escaper","testRegexp","replaceRegexp","string","escapeMap","escape$1","unescapeMap","unescape$1","noMatch","escapes","escapeRegExp","escapeChar","bareIdentifier","template","settings","oldSettings","escape","interpolate","offset","argument","render","fallback","idCounter","uniqueId","prefix","chain","executeBound","sourceFunc","boundFunc","callingContext","self","partial","boundArgs","placeholder","bound","position","bind","callArgs","flatten","depth","strict","output","bindAll","memoize","hasher","address","wait","defer","throttle","timeout","previous","later","throttled","_now","remaining","immediate","passed","debounced","_args","wrap","wrapper","negate","compose","after","before","memo","once","findKey","createPredicateIndexFinder","dir","array","findIndex","findLastIndex","sortedIndex","low","high","mid","createIndexFinder","predicateFind","indexOf","lastIndexOf","find","keyFinder","findWhere","each","createReduce","reducer","initial","reduce","reduceRight","filter","reject","every","some","contains","fromIndex","guard","invoke","contextPath","pluck","where","lastComputed","computed","reStrSymbol","sample","last","rand","temp","shuffle","sortBy","left","right","group","behavior","partition","groupBy","indexBy","countBy","pass","size","keyInObj","pick","omit","first","compact","_flatten","difference","without","otherArrays","uniq","isSorted","seen","union","arrays","intersection","argsLength","unzip","zip","range","stop","step","chunk","count","chainResult","mixin","allExports","searchResultsContainer","resultsJSON","newsletterBannerBtn","newsletterModal"],"mappings":"oKAMAA,EAAK,IAAM,CACT,MAAMC,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EAEhC8T,IAAS4U,EAAc,MAAM5U,EAAQ,KAAI,GAEzC4U,GAAeA,EAAY,OAASA,EAAY,MAAM,QACxDA,EAAY,MAAM,QAASpd,GAAS,CAClC,MAAM5O,EAAO,SAAS,cAAc,IAAI,EACxCA,EAAK,UAAY;AAAA;AAAA,6BAEF4O,EAAK,GAAG;AAAA;AAAA,oDAEenH,EAAU,QAAQ,UAAU;AAAA,mDAC7BmH,EAAK,YAAY,KAAK;AAAA,iEACRA,EAAK,YAAY,YAAY;AAAA;AAAA;AAAA;AAAA,gBAKhFmd,EAAuB,YAAY/rB,CAAI,CACxC,CAAA,EAED+J,EAAYiQ,EAAY,WAAW,GAEnCzM,EAASyM,EAAY,WAAW,CAE5C,MACUvS,EAAU,UAAU,OAAO,aAAa,EACxCsC,EAAYiQ,EAAY,WAAW,CAE7C,EAAS,GAAG,CACZ,CACG,CAAA,CACH,CAAC,ECzEDhd,EAAK,IAAM,CACT,MAAMivB,EAAsB,SAAS,cACnC,0BACD,EAEKC,EAAkB,SAAS,eAAe,kBAAkB,EAE9DD,GAAuBC,IACzBD,EAAoB,QAAU,IAAM,CAClCC,EAAgB,mBAAmB,KAAM,CAC1C,EAEL,CAAC","x_google_ignoreList":[1,2,5,7,8,10,12,18,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178]}