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EAAuB,EAG9D,CA7EqB,GA+EtBtB,OAAOC,aAAa+B,M,GC/EhBE,EAA2B,CAAC,GAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CCrBA,CAAQ,K","sources":["webpack://frontendv2/./src/js/library/conditionals.js","webpack://frontendv2/webpack/bootstrap","webpack://frontendv2/./src/js/scripts/conditionals.js"],"sourcesContent":["/* eslint-disable no-magic-numbers */\nwindow.conditionals = (function() {\n 'use strict';\n\n function cssExists(filename) {\n let links = document.getElementsByTagName('link');\n\n for (let idx = 0; idx < links.length; idx = idx + 1) {\n if (links[idx].href.includes(filename)) {\n return true;\n }\n }\n return false;\n }\n\n function getStylingPath() {\n let scriptsLocation = '/scripts/',\n cssLocation = '';\n const scripts = document.getElementsByTagName('script');\n\n for (let idx = 0; idx <= scripts.length; idx = idx + 1) {\n if (scripts[idx].src.indexOf('conditionals.min.js') > -1) {\n scriptsLocation = scripts[idx].src.replace('conditionals.min.js', '');\n break;\n }\n }\n cssLocation = scriptsLocation.replace('/scripts/', '/assets/css/');\n return cssLocation;\n }\n\n function appendPreload(filename) {\n let styleSheet = document.createElement('link');\n\n styleSheet.rel = 'preload';\n /* eslint-disable id-length */\n styleSheet.as = 'style';\n /* eslint-enable id-length */\n styleSheet.href = filename;\n document.head.appendChild(styleSheet);\n }\n\n function appendStyling(filename) {\n let styleSheet = document.createElement('link');\n\n styleSheet.rel = 'stylesheet';\n styleSheet.type = 'text/css';\n styleSheet.href = filename;\n document.head.appendChild(styleSheet);\n }\n\n function addCss(cssPath, filename) {\n if (cssExists(filename)) {\n return;\n }\n appendPreload(cssPath + filename);\n appendStyling(cssPath + filename);\n }\n\n function loadConditionalStyling() {\n let cssPath = getStylingPath();\n\n if (window.matchMedia('(min-width: 692px)').matches) {\n addCss(cssPath, 'base-small.css');\n }\n if (window.matchMedia('(min-width: 997px)').matches) {\n addCss(cssPath, 'base-medium.css');\n }\n if (window.matchMedia('(min-width: 1176px)').matches) {\n addCss(cssPath, 'base-large.css');\n }\n }\n\n return {\n init: () => {\n loadConditionalStyling();\n window.addEventListener('resize', loadConditionalStyling);\n }\n };\n})();\n\nwindow.conditionals.init();\n","// 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](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// needs to be executed as soon as possible\nrequire('../library/conditionals.js');\n\n"],"names":["window","conditionals","addCss","cssPath","filename","links","document","getElementsByTagName","idx","length","href","includes","cssExists","styleSheet","createElement","rel","as","head","appendChild","appendPreload","type","appendStyling","loadConditionalStyling","scriptsLocation","cssLocation","scripts","src","indexOf","replace","getStylingPath","matchMedia","matches","init","addEventListener","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__"],"sourceRoot":""}