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,CAC/B,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,yBAA0B,CACzB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MAED,yBAA0B,CACzB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,yCAA0C,CACzC,KACA,KACA,KACA,KACA,KACA,MAED,iCAAkC,CACjC,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,iCAAkC,CACjC,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,MAED,uDAAwD,CACvD,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MAED,mDAAoD,CACnD,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MAED,+BAAgC,CAC/B,IACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,yDAA0D,CACzD,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAED,yBAA0B,CACzB,IACA,KAED,iBAAkB,CACjB,GACA,IAED,2CAA4C,CAC3C,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,mBAAoB,CACnB,KACA,MAED,iCAAkC,CACjC,KACA,KACA,KACA,KACA,KACA,IACA,MAED,mCAAoC,CACnC,KACA,KACA,KACA,KACA,KACA,IACA,MAED,6BAA8B,CAC7B,KACA,KACA,KACA,KACA,KACA,IACA,MAED,+BAAgC,CAC/B,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MAED,mBAAoB,CACnB,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,KAED,mCAAoC,CACnC,KACA,KACA,MAED,yCAA0C,CACzC,KACA,MAED,iCAAkC,CACjC,KACA,MAED,+BAAgC,CAC/B,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,qBAAsB,CACrB,KACA,MAED,iCAAkC,CACjC,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,iDAAkD,CACjD,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,2DAA4D,CAC3D,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,yDAA0D,CACzD,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,IACA,KACA,MAED,iCAAkC,CACjC,KACA,KACA,KACA,KACA,KACA,KACA,KACA,MAED,gCAAiC,CAChC,KACA,KACA,MAED,oCAAqC,CACpC,IACA,KAED,iCAAkC,CACjC,IACA,KAED,iCAAkC,CACjC,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,iCAAkC,CACjC,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,MAED,mCAAoC,CACnC,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,KACA,KACA,OAGF,SAASqC,EAAoBC,GAC5B,IAAIC,EAAoBC,EAAExC,EAAKsC,GAC9B,OAAOG,QAAQC,UAAUC,MAAK,WAC7B,IAAIC,EAAI,IAAIhD,MAAM,uBAAyB0C,EAAM,KAEjD,MADAM,EAAEC,KAAO,mBACHD,CACP,IAGD,IAAIE,EAAM9C,EAAIsC,GAAMhL,EAAKwL,EAAI,GAC7B,OAAOL,QAAQM,IAAID,EAAIxC,MAAM,GAAGN,IAAIuC,EAAoBK,IAAID,MAAK,WAChE,OAAOJ,EAAoBjL,EAC5B,GACD,CACA+K,EAAoB5B,KAAO,WAAa,OAAO3B,OAAO2B,KAAKT,EAAM,EACjEqC,EAAoB/K,GAAK,KACzB0D,EAAOJ,QAAUyH,C,GClbbW,EAA2B,CAAC,EAGhC,SAAST,EAAoBU,GAE5B,IAAIC,EAAeF,EAAyBC,GAC5C,QAAqB5L,IAAjB6L,EACH,OAAOA,EAAatI,QAGrB,IAAII,EAASgI,EAAyBC,GAAY,CAGjDrI,QAAS,CAAC,GAOX,OAHAuI,EAAoBF,GAAUvE,KAA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/runtime/load script","webpack://frontend-build-tools/./src/foundation/utilities/pubsub.js","webpack://frontend-build-tools/./src/foundation/utilities/id.js","webpack://frontend-build-tools/./src/foundation/utilities/screenSize.js","webpack://frontend-build-tools/./src/foundation/base/base.js","webpack://frontend-build-tools/./src/foundation/utilities/case.js","webpack://frontend-build-tools/./src/foundation/utilities/debounce.js","webpack://frontend-build-tools/./node_modules/debug/src/browser.js","webpack://frontend-build-tools/./node_modules/debug/src/common.js","webpack://frontend-build-tools/./node_modules/element-closest-polyfill/index.js","webpack://frontend-build-tools/./node_modules/ms/index.js","webpack://frontend-build-tools/./src/feature/ lazy ^\\.\\/.*\\.js$ namespace object","webpack://frontend-build-tools/webpack/bootstrap","webpack://frontend-build-tools/webpack/runtime/compat get default export","webpack://frontend-build-tools/webpack/runtime/define property getters","webpack://frontend-build-tools/webpack/runtime/ensure chunk","webpack://frontend-build-tools/webpack/runtime/get javascript chunk filename","webpack://frontend-build-tools/webpack/runtime/global","webpack://frontend-build-tools/webpack/runtime/hasOwnProperty shorthand","webpack://frontend-build-tools/webpack/runtime/make namespace object","webpack://frontend-build-tools/webpack/runtime/publicPath","webpack://frontend-build-tools/webpack/runtime/jsonp chunk loading","webpack://frontend-build-tools/./src/foundation/featureLoader.js"],"sourcesContent":["var inProgress = {};\nvar dataWebpackPrefix = \"frontend-build-tools:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","class PubSub {\r\n constructor() {\r\n this.subscriptions = {};\r\n }\r\n\r\n publish(topic, ...args) {\r\n if (this.subscriptions[topic]) {\r\n // eslint-disable-next-line no-restricted-syntax\r\n for (const fn of this.subscriptions[topic]) {\r\n fn(...args);\r\n }\r\n }\r\n }\r\n\r\n subscribe(topic, fn) {\r\n this.subscriptions[topic] = this.subscriptions[topic] || [];\r\n this.subscriptions[topic].push(fn);\r\n }\r\n\r\n unsubscribe(topic, fn) {\r\n if (this.subscriptions[topic]) {\r\n this.subscriptions[topic].forEach((value, index) => {\r\n if (value === fn) {\r\n this.subscriptions[topic].splice(index, 1);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n\r\nconst pubsub = new PubSub();\r\n\r\nexport default pubsub;\r\n","const alphabet = '23456789ABDEGJKMNPQRVWXYZ';\r\n\r\nexport function generateId(length = 6) {\r\n let id = '';\r\n\r\n for (let i = 0; i < length; i++) {\r\n id += alphabet.charAt(Math.floor(Math.random() * alphabet.length));\r\n }\r\n\r\n return id;\r\n}\r\n","export const defaultWidths = {\r\n sm: 768,\r\n md: 1024,\r\n lg: 1280,\r\n xl: 1400\r\n};\r\n\r\n// function :: String -> ?Object -> Boolean\r\nexport default (size, widths = defaultWidths) => {\r\n if (typeof size !== 'string') {\r\n throw new Error('size must be a string');\r\n } else if (!Object.prototype.hasOwnProperty.call(widths, size)) {\r\n throw new Error(`size must be one of: ${Object.keys(widths).join(', ')}`);\r\n }\r\n return window.innerWidth < widths[size];\r\n};\r\n\r\n// getBreakpoint :: Void -> String\r\nexport const getBreakpoint = () => window\r\n .getComputedStyle(document.querySelector('body'), ':before')\r\n .getPropertyValue('content')\r\n .replace(/\"/g, '');\r\n","import debug from 'debug';\r\nimport pubsub from '../utilities/pubsub';\r\nimport { generateId } from '../utilities/id';\r\nimport { camelCaseToDashCase, dashCaseToCamelCase } from '../utilities/case';\r\nimport { getBreakpoint } from '../utilities/screenSize';\r\nimport { debounce } from '../utilities/debounce';\r\nimport 'element-closest-polyfill';\r\n\r\nconst log = debug('Framework:base');\r\n\r\nexport default class BaseBehavior {\r\n constructor(element) {\r\n this.element = element;\r\n this.settings = {};\r\n this.setBehaviorName();\r\n this.log = debug(`Feature: ${this.behaviorName}`);\r\n this.setInstanceId();\r\n this.initEventsCache();\r\n this.initSubscriptionsCache();\r\n this.initSettings();\r\n }\r\n\r\n setBehaviorName() {\r\n const behaviorName = camelCaseToDashCase(this.element.getAttribute('data-behavior'));\r\n this.behaviorName = behaviorName;\r\n }\r\n\r\n setInstanceId() {\r\n let behaviorAttribute = this.element.getAttribute('data-behavior');\r\n\r\n this.instanceId = generateId();\r\n\r\n if (behaviorAttribute.indexOf(this.behaviorName) > -1) {\r\n behaviorAttribute = behaviorAttribute.replace(\r\n this.behaviorName,\r\n `${this.behaviorName}__${this.instanceId}`\r\n );\r\n this.element.setAttribute('data-instance', behaviorAttribute);\r\n } else {\r\n console.error(`Unable to correctly initialize behavior \"${this.behaviorName}\" are you use you have used the correct case?`);\r\n }\r\n }\r\n\r\n initDomCache() {\r\n this.dom = {};\r\n\r\n // Filter out ref's that embedded in another instance of the same behavior.\r\n const elements = [\r\n ...this.element.querySelectorAll(`[data-ref^=${this.behaviorName}]`)\r\n ].filter((element) => {\r\n const closestInstance = element.closest(`[data-behavior*=\"${this.behaviorName}\"]`);\r\n return closestInstance === this.element;\r\n });\r\n\r\n log('initDomCache elements:', elements);\r\n\r\n for (let a = 0; a < elements.length; a++) {\r\n const element = elements[a];\r\n const ref = element.getAttribute('data-ref');\r\n const key = dashCaseToCamelCase(ref).split('__')[1];\r\n\r\n if (key) {\r\n this.dom[key] = element;\r\n } else {\r\n // eslint-disable-next-line no-console,max-len\r\n console.error(`DOM element cannot be correctly cached, have you used the correct pattern? Reference \"${ref}\" is expected to have the format \"behavior-name__element-name\"`);\r\n }\r\n }\r\n }\r\n\r\n initEventsCache() {\r\n this.events = {};\r\n }\r\n\r\n publishBreakpointOnResize(delay = 250) {\r\n this.breakpoint = getBreakpoint();\r\n this.publish('SITE.BREAKPOINT', this.breakpoint);\r\n\r\n const debouncedGetBreakpoint = debounce(() => {\r\n const newBreakPoint = getBreakpoint();\r\n if (this.breakpoint !== newBreakPoint) {\r\n this.publish('SITE.BREAKPOINT', newBreakPoint);\r\n this.breakpoint = newBreakPoint;\r\n }\r\n }, delay);\r\n\r\n window.addEventListener('resize', debouncedGetBreakpoint);\r\n }\r\n\r\n addEventListener(element, event, fn) {\r\n this.events[event] = fn;\r\n element.addEventListener(event.split('.')[0], this.events[event]);\r\n }\r\n\r\n removeEventListener(element, event) {\r\n element.removeEventListener(event.split('.')[0], this.events[event]);\r\n this.events[event] = null;\r\n delete this.events[event];\r\n }\r\n\r\n initSubscriptionsCache() {\r\n this.subscriptions = {};\r\n }\r\n\r\n initSettings() {\r\n let dataSettings = this.element.getAttribute('data-settings');\r\n\r\n if (!dataSettings) {\r\n return;\r\n }\r\n\r\n try {\r\n dataSettings = JSON.parse(dataSettings);\r\n } catch (err) {\r\n console.error(`Invalid data-settings from data-behavior=\"${this.behaviorName} (InstanceID: ${this.instanceId})\". Invalid JSON. ${err}`);\r\n return;\r\n }\r\n\r\n this.settings = dataSettings;\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n publish(topic, obj) {\r\n pubsub.publish(topic, obj);\r\n }\r\n\r\n subscribe(topic, fn) {\r\n this.subscriptions[topic] = fn;\r\n pubsub.subscribe(topic, fn);\r\n }\r\n\r\n unsubscribe(topic) {\r\n pubsub.unsubscribe(topic, this.subscriptions[topic]);\r\n this.subscriptions[topic] = null;\r\n delete this.subscriptions[topic];\r\n }\r\n\r\n static findInstance(targetElement, behaviorName) {\r\n const rootElement = targetElement.closest(\r\n `[data-behavior${behaviorName ? `=${behaviorName}` : ''}]`\r\n );\r\n if (!rootElement) {\r\n return null;\r\n }\r\n return BaseBehavior.instances.find(instance => instance.element === rootElement);\r\n }\r\n}\r\n\r\nBaseBehavior.instances = [];\r\n","export function camelCaseToDashCase(str) {\r\n return str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();\r\n}\r\n\r\nexport function dashCaseToCamelCase(str) {\r\n return str.replace(/\\W+(.)/g, (ignorex, chr) => chr.toUpperCase());\r\n}\r\n","// debounce :: Function, Number, Bool -> (Any -> Void)\r\nexport function debounce(func, wait, immediate) {\r\n let timeout;\r\n return function debounced(...args) {\r\n const later = () => {\r\n timeout = null;\r\n if (!immediate) func(args);\r\n };\r\n const callNow = immediate && !timeout;\r\n clearTimeout(timeout);\r\n timeout = setTimeout(later, wait);\r\n if (callNow) func(args);\r\n };\r\n}\r\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","if (typeof Element !== \"undefined\") {\n if (!Element.prototype.matches) {\n Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s) {\n var el = this;\n\n do {\n if (el.matches(s)) return el;\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n \n return null;\n };\n }\n}\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","var map = {\n\t\"./accordion/accordion.js\": [\n\t\t9777,\n\t\t9777\n\t],\n\t\"./add-to-homescreen/add-to-homescreen.js\": [\n\t\t6058,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t6058\n\t],\n\t\"./alert/alert.js\": [\n\t\t6097,\n\t\t6097\n\t],\n\t\"./app-wrapper/app-wrapper.js\": [\n\t\t1855,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t1203,\n\t\t6036,\n\t\t603,\n\t\t7092,\n\t\t5799,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t3159,\n\t\t1063,\n\t\t9848,\n\t\t1855\n\t],\n\t\"./bonus-explainer/bonus-explainer.js\": [\n\t\t9198,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t6352\n\t],\n\t\"./bonus-indicator/bonus-indicator.js\": [\n\t\t9209,\n\t\t9209\n\t],\n\t\"./cardlist/cardlist.js\": [\n\t\t7785,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t4589,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t8575\n\t],\n\t\"./cardlistwithdescription/cardlistwithdescription.js\": [\n\t\t7652,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t4938\n\t],\n\t\"./cardoverlay/cardoverlay.js\": [\n\t\t705,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t9223\n\t],\n\t\"./carousel/carousel.js\": [\n\t\t8632,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t4589,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t8632\n\t],\n\t\"./category/category.js\": [\n\t\t9778,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t2377,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t9778\n\t],\n\t\"./compliance-watch/compliance-watch.js\": [\n\t\t4231,\n\t\t1083,\n\t\t2423,\n\t\t5043,\n\t\t7855,\n\t\t8558\n\t],\n\t\"./credit-cards/credit-cards.js\": [\n\t\t2086,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t7512\n\t],\n\t\"./deposit-flow/deposit-flow.js\": [\n\t\t3289,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t1203,\n\t\t6036,\n\t\t7092,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t3159,\n\t\t3289\n\t],\n\t\"./exclusion-close-account/exclusion-close-account.js\": [\n\t\t9302,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t9302\n\t],\n\t\"./game-overview-buttons/game-overview-buttons.js\": [\n\t\t8759,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t8759\n\t],\n\t\"./gamehistory/gamehistory.js\": [\n\t\t341,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t6107\n\t],\n\t\"./gamelauncher-header-link/gamelauncher-header-link.js\": [\n\t\t6559,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t6559\n\t],\n\t\"./hero-usp/hero-usp.js\": [\n\t\t689,\n\t\t689\n\t],\n\t\"./hero/hero.js\": [\n\t\t31,\n\t\t31\n\t],\n\t\"./limit-your-gaming/limit-your-gaming.js\": [\n\t\t8958,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t1203,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t8958\n\t],\n\t\"./modal/modal.js\": [\n\t\t8757,\n\t\t8757\n\t],\n\t\"./notification/notification.js\": [\n\t\t6133,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t3370,\n\t\t702,\n\t\t6133\n\t],\n\t\"./notifications/notifications.js\": [\n\t\t4717,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t3370,\n\t\t702,\n\t\t4717\n\t],\n\t\"./occurrence/occurrence.js\": [\n\t\t7657,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t3370,\n\t\t702,\n\t\t7657\n\t],\n\t\"./permissions/permissions.js\": [\n\t\t7261,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t7261\n\t],\n\t\"./popup/popup.js\": [\n\t\t8478,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t1203,\n\t\t6036,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t9848,\n\t\t195\n\t],\n\t\"./reality-check/reality-check.js\": [\n\t\t5026,\n\t\t1083,\n\t\t5026\n\t],\n\t\"./return-url-check/return-url-check.js\": [\n\t\t1433,\n\t\t1433\n\t],\n\t\"./search-field/search-field.js\": [\n\t\t6569,\n\t\t6569\n\t],\n\t\"./selfexclude/selfexclude.js\": [\n\t\t7179,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t8789\n\t],\n\t\"./toggle/toggle.js\": [\n\t\t6043,\n\t\t6043\n\t],\n\t\"./transactions/transactions.js\": [\n\t\t6362,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t1164\n\t],\n\t\"./user-account-balance/user-account-balance.js\": [\n\t\t7710,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t6800\n\t],\n\t\"./user-account-game-profile/user-account-game-profile.js\": [\n\t\t8026,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t1203,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t8026\n\t],\n\t\"./user-account-information/user-account-information.js\": [\n\t\t4308,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t1203,\n\t\t603,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t4308\n\t],\n\t\"./user-account/user-account.js\": [\n\t\t1219,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t1219\n\t],\n\t\"./winners-list/api/winners.js\": [\n\t\t9843,\n\t\t1083,\n\t\t9843\n\t],\n\t\"./winners-list/helpers/winners.js\": [\n\t\t330,\n\t\t330\n\t],\n\t\"./winners-list/model/winner.js\": [\n\t\t479,\n\t\t479\n\t],\n\t\"./winners-list/winners-list.js\": [\n\t\t9996,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t4589,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t8754\n\t],\n\t\"./winners-page/winners-page.js\": [\n\t\t4422,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t9432\n\t],\n\t\"./withdraw-flow/withdraw-flow.js\": [\n\t\t2641,\n\t\t1083,\n\t\t2423,\n\t\t6708,\n\t\t5043,\n\t\t1203,\n\t\t6036,\n\t\t3370,\n\t\t7855,\n\t\t702,\n\t\t6124,\n\t\t1063,\n\t\t8489\n\t]\n};\nfunction webpackAsyncContext(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\treturn Promise.resolve().then(function() {\n\t\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\t\te.code = 'MODULE_NOT_FOUND';\n\t\t\tthrow e;\n\t\t});\n\t}\n\n\tvar ids = map[req], id = ids[0];\n\treturn Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() {\n\t\treturn __webpack_require__(id);\n\t});\n}\nwebpackAsyncContext.keys = function() { return Object.keys(map); };\nwebpackAsyncContext.id = 5336;\nmodule.exports = webpackAsyncContext;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \"-\" + {\"31\":\"716939a8\",\"195\":\"69f7c53f\",\"330\":\"4e91701f\",\"479\":\"1647f04f\",\"603\":\"4452923f\",\"689\":\"31970860\",\"702\":\"7881095a\",\"1063\":\"52d6ce3a\",\"1083\":\"2e01dfc0\",\"1164\":\"5de74a3a\",\"1203\":\"cea7444e\",\"1219\":\"e2e1fd10\",\"1433\":\"1d0f9d03\",\"1855\":\"d71ec9cd\",\"2377\":\"0d069673\",\"2423\":\"782e7e28\",\"3159\":\"4c252fc3\",\"3289\":\"7e29660e\",\"3370\":\"b34c17f3\",\"4308\":\"72cfa525\",\"4589\":\"52435e5b\",\"4717\":\"c5779b51\",\"4938\":\"fa59c9e3\",\"5026\":\"4c17c8ca\",\"5043\":\"aa7c1ee6\",\"5799\":\"9c605f55\",\"6036\":\"20e0b95e\",\"6043\":\"84fee395\",\"6058\":\"b5a1fcf7\",\"6097\":\"efd4d9e9\",\"6107\":\"f4ba7f70\",\"6124\":\"5c9896c1\",\"6133\":\"4b7f22a9\",\"6352\":\"a6ed4925\",\"6559\":\"79b65c3b\",\"6569\":\"09a8aef5\",\"6708\":\"7c29ad25\",\"6800\":\"3f7f39ca\",\"7092\":\"c383910d\",\"7261\":\"f18ff059\",\"7512\":\"0c94518a\",\"7657\":\"d78151dd\",\"7855\":\"75b0734f\",\"8026\":\"4b80c973\",\"8489\":\"95130122\",\"8558\":\"266b6947\",\"8575\":\"48013ddd\",\"8632\":\"c9d649d0\",\"8754\":\"d6918d4a\",\"8757\":\"bfdbdca1\",\"8759\":\"c00ad9be\",\"8789\":\"1a683503\",\"8958\":\"6eab0a44\",\"9209\":\"a0f1ef7f\",\"9223\":\"59e11920\",\"9302\":\"e1d747d4\",\"9432\":\"03b79842\",\"9777\":\"de2d86f9\",\"9778\":\"72202f10\",\"9843\":\"183fed76\",\"9848\":\"f876afdb\"}[chunkId] + \".pkg.js\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.p = \"/dist/js/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1732: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkfrontend_build_tools\"] = self[\"webpackChunkfrontend_build_tools\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","import debug from 'debug';\r\nimport BaseBehavior from './base/base'; // eslint-disable-line no-unused-vars\r\n\r\nconst log = debug('Framework:FeatureLoader');\r\n\r\nexport function initBehaviors({ context = document } = {}) {\r\n const elements = [...context.querySelectorAll('[data-behavior]')];\r\n\r\n window.features = window.features || {\r\n behaviors: {},\r\n behaviorInstances: {},\r\n dom: {},\r\n };\r\n\r\n window.features.dom.body = document.querySelector('body');\r\n\r\n // Add context element itself to array if behavior present\r\n if (context.hasAttribute && context.hasAttribute('data-behavior')) {\r\n elements.unshift(context);\r\n }\r\n\r\n for (let a = 0; a < elements.length; a++) {\r\n const element = elements[a];\r\n\r\n // Init behaviors\r\n const behaviorAttribute = element.getAttribute('data-behavior');\r\n const behaviors = behaviorAttribute.split(' ');\r\n\r\n for (let b = 0; b < behaviors.length; b++) {\r\n const behaviorPath = behaviors[b].indexOf('/') === -1 ? `${behaviors[b]}/${behaviors[b]}` : behaviors[b];\r\n\r\n import('../feature/' + behaviorPath + '.js')\r\n .then(({ default: Component }) => {\r\n log(`loaded ${behaviorPath}`, element);\r\n\r\n element.component = new Component(element);\r\n const behaviorInstance = element.component;\r\n\r\n window.features = window.features || {\r\n behaviors: {},\r\n behaviorInstances: {},\r\n dom: {},\r\n };\r\n\r\n window.features.behaviorInstances[behaviorInstance.instanceId] = behaviorInstance;\r\n\r\n BaseBehavior.instances.push(behaviorInstance);\r\n })\r\n .catch((err) => {\r\n log(`Failed to load ${behaviorPath}`, err);\r\n throw err;\r\n });\r\n }\r\n }\r\n}\r\n\r\nexport function destroyBehaviors({ context = null, destroyInstances = true } = {}) {\r\n if (context) {\r\n const elements = [...context.querySelectorAll('[data-behavior][data-instance]')];\r\n\r\n // Add context element itself to array if behavior present\r\n if (context.hasAttribute\r\n\t\t\t&& context.hasAttribute('data-behavior')\r\n\t\t\t&& context.hasAttribute('data-instance')\r\n ) {\r\n elements.unshift(context);\r\n }\r\n\r\n for (let a = 0; a < elements.length; a++) {\r\n const element = elements[a];\r\n const instanceAttribute = element.getAttribute('data-instance');\r\n const instances = instanceAttribute.split(' ');\r\n\r\n for (let b = 0; b < instances.length; b++) {\r\n const instanceName = instances[b];\r\n const instanceId = instanceName.split('__')[1];\r\n const windowInstances = window.features.behaviorInstances;\r\n\r\n if (instanceId && destroyInstances) {\r\n BaseBehavior.instances = BaseBehavior.instances\r\n .filter(instance => instance === windowInstances[instanceId]);\r\n if (windowInstances[instanceId].cleanup) {\r\n windowInstances[instanceId].cleanup();\r\n }\r\n windowInstances[instanceId] = null;\r\n delete windowInstances[instanceId];\r\n }\r\n }\r\n }\r\n } else {\r\n // eslint-disable-next-line no-console\r\n console.error('To destroy behaviors you must provide a context to the function in the form \"destroyBehaviors(domElement)\"');\r\n }\r\n}\r\n\r\nexport function resetBehaviorNames({ context = null } = {}) {\r\n if (context) {\r\n destroyBehaviors({\r\n context,\r\n destroyInstances: false,\r\n });\r\n } else {\r\n // eslint-disable-next-line no-console\r\n console.error('To reset behavior names you must provide a context to the function in the form \"destroyBehaviors(domElement)\"');\r\n }\r\n}\r\n\r\nexport function cleanupBehaviors({ context = document } = {}) {\r\n Object.keys(window.features.behaviorInstances).forEach((instanceId) => {\r\n const element = context.querySelector(`[data-instance*=__${instanceId}]`);\r\n\r\n if (!element) {\r\n window.features.behaviorInstances[instanceId].cleanup();\r\n window.features.behaviorInstances[instanceId] = null;\r\n delete window.features.behaviorInstances[instanceId];\r\n }\r\n });\r\n}\r\n\r\ninitBehaviors();\r\n"],"names":["inProgress","dataWebpackPrefix","pubsub","constructor","this","subscriptions","publish","topic","_len","arguments","length","args","Array","_key","fn","subscribe","push","unsubscribe","forEach","value","index","splice","getBreakpoint","window","getComputedStyle","document","querySelector","getPropertyValue","replace","log","debug","BaseBehavior","element","settings","setBehaviorName","behaviorName","setInstanceId","initEventsCache","initSubscriptionsCache","initSettings","getAttribute","toLowerCase","behaviorAttribute","instanceId","undefined","id","i","charAt","Math","floor","alphabet","random","generateId","indexOf","setAttribute","console","error","initDomCache","dom","elements","querySelectorAll","filter","closest","a","ref","key","str","ignorex","chr","toUpperCase","split","events","publishBreakpointOnResize","delay","breakpoint","debouncedGetBreakpoint","func","wait","immediate","timeout","clearTimeout","setTimeout","later","debounce","newBreakPoint","addEventListener","event","removeEventListener","dataSettings","JSON","parse","err","obj","findInstance","targetElement","rootElement","instances","find","instance","exports","formatArgs","useColors","namespace","module","humanize","diff","c","color","lastC","match","save","namespaces","storage","setItem","removeItem","load","r","getItem","process","DEBUG","type","__nwjs","navigator","userAgent","m","documentElement","style","WebkitAppearance","firebug","exception","table","parseInt","localStorage","localstorage","destroy","warned","warn","colors","formatters","j","v","stringify","message","env","createDebug","prevTime","namespacesCache","enabledCache","enableOverride","enabled","self","curr","Number","Date","ms","prev","coerce","unshift","format","formatter","val","call","apply","selectColor","extend","Object","defineProperty","enumerable","configurable","get","set","init","delimiter","newDebug","toNamespace","regexp","toString","substring","default","Error","stack","disable","names","map","skips","join","enable","len","RegExp","slice","name","test","keys","hash","charCodeAt","abs","Element","prototype","matches","msMatchesSelector","webkitMatchesSelector","s","el","parentElement","parentNode","nodeType","h","d","plural","msAbs","n","isPlural","round","options","String","exec","parseFloat","isFinite","long","fmtShort","webpackAsyncContext","req","__webpack_require__","o","Promise","resolve","then","e","code","ids","all","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","getter","__esModule","definition","f","chunkId","reduce","promises","u","g","globalThis","Function","prop","hasOwnProperty","l","url","done","script","needAttach","scripts","getElementsByTagName","createElement","charset","nc","src","onScriptComplete","onerror","onload","doneFns","removeChild","bind","target","head","appendChild","Symbol","toStringTag","p","installedChunks","installedChunkData","promise","reject","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","data","chunkIds","moreModules","runtime","some","chunkLoadingGlobal","context","features","behaviors","behaviorInstances","body","hasAttribute","b","behaviorPath","_ref","Component","component","behaviorInstance","catch","initBehaviors"],"sourceRoot":""}