{"version":3,"file":"Gorm.Agency.Project.Setup.bundle.js","sources":["webpack://AlmenNet.Setup/./Src/Scripts/architecture/componentRepository.js","webpack://AlmenNet.Setup/webpack/bootstrap","webpack://AlmenNet.Setup/webpack/runtime/define property getters","webpack://AlmenNet.Setup/webpack/runtime/ensure chunk","webpack://AlmenNet.Setup/webpack/runtime/get javascript chunk filename","webpack://AlmenNet.Setup/webpack/runtime/global","webpack://AlmenNet.Setup/webpack/runtime/hasOwnProperty shorthand","webpack://AlmenNet.Setup/webpack/runtime/load script","webpack://AlmenNet.Setup/webpack/runtime/make namespace object","webpack://AlmenNet.Setup/webpack/runtime/publicPath","webpack://AlmenNet.Setup/webpack/runtime/jsonp chunk loading","webpack://AlmenNet.Setup/./Src/Scripts/index.js"],"sourcesContent":["export default class ComponentRepository {\r\n constructor(componentSourceMap) {\r\n // The property name is the key used to instantiate the component.\r\n // The property value is the path of the file (navigated from the scripts folder) excluded the file ending.\r\n // The order they appear in the sourcemap will affect the order they are instantiated in.\r\n // Shared components should generally be instantiated before controllers.\r\n this.componentSourceMap = componentSourceMap;\r\n\r\n this.componentClassPromiseMap = {}; // Will hold promises for all for classes needed to instantiate components\r\n this.globalInstances = {}; // Will hold components with a data-component-id, that can be queried globally\r\n this.loadedComponents = {}; // Will hold all loaded component instances\r\n\r\n // initializedPromise will resolve when the load function has run and all components have been initialized.\r\n this.initializedPromiseResolve = null;\r\n this.initializedPromiseReject = null;\r\n this.initializedPromise = new Promise((resolve, reject) => {\r\n this.initializedPromiseResolve = resolve;\r\n this.initializedPromiseReject = reject;\r\n });\r\n\r\n // Load all classes required for the components on the current page.\r\n for (const componentKey in this.componentSourceMap) {\r\n if (document.querySelector('[data-component=\"' + componentKey + '\"]')) {\r\n this.loadComponentClass(componentKey);\r\n }\r\n }\r\n\r\n this.load();\r\n }\r\n\r\n /*\r\n * Iterates all elements in the DOM with the 'data-component' attribute,\r\n * and instantiates the corresponding component.\r\n * Returns a promise that will resolve when all components have been instantiated or have failed.\r\n */\r\n load() {\r\n const loadComponentsPromiseArray = [];\r\n\r\n document.querySelectorAll('[data-component]').forEach(c => {\r\n const componentKey = c.getAttribute('data-component');\r\n const componentId = c.getAttribute('data-component-id');\r\n const componentArgs = c.getAttribute('data-component-args');\r\n\r\n\r\n\r\n if (this.componentClassPromiseMap[componentKey]) {\r\n const loadPromise = new Promise((resolve, reject) => {\r\n this.componentClassPromiseMap[componentKey]\r\n .then(Component => {\r\n let args = null;\r\n if (componentArgs) {\r\n args = JSON.parse(componentArgs);\r\n }\r\n\r\n const newComponentInstance = new Component(c, args);\r\n\r\n if (!this.loadedComponents[componentKey]) {\r\n this.loadedComponents[componentKey] = [];\r\n }\r\n this.loadedComponents[componentKey].push(newComponentInstance);\r\n\r\n // If the component has a component ID, add it to globalInstances\r\n if (componentId) {\r\n this.globalInstances[componentId] = newComponentInstance;\r\n }\r\n\r\n resolve(newComponentInstance);\r\n })\r\n .catch(error => {\r\n console.error('Error instantiating component: ', componentKey, error);\r\n reject();\r\n });\r\n });\r\n loadComponentsPromiseArray.push(loadPromise);\r\n } else {\r\n console.warn('unable to find component: ', componentKey);\r\n }\r\n });\r\n\r\n return Promise.all(loadComponentsPromiseArray)\r\n .then(() => {\r\n this.initializedPromiseResolve();\r\n });\r\n }\r\n\r\n /**\r\n * Returns a promise that will eventually resolve with\r\n * the class corresponsing the component key.\r\n */\r\n loadComponentClass(key) {\r\n if (this.componentClassPromiseMap[key]) {\r\n return this.componentClassPromiseMap[key];\r\n }\r\n\r\n // If the requested class is not specified in the source map, return a failed promise.\r\n if (!this.componentSourceMap[key])\r\n {\r\n return new Promise((resolve, reject) => {\r\n reject();\r\n });\r\n }\r\n\r\n this.componentClassPromiseMap[key] = this.componentSourceMap[key]()\r\n .then(componentLoad => {\r\n return componentLoad.default;\r\n });\r\n return this.componentClassPromiseMap[key];\r\n }\r\n\r\n\r\n /**\r\n * Returns a promise that will eventually resolve with\r\n * a specific instance of a component, based on its ID.\r\n */\r\n getGlobalInstance(instanceId) {\r\n return this.initializedPromise\r\n .then(() => {\r\n return instanceId ? this.globalInstances[instanceId] : undefined;\r\n });\r\n }\r\n\r\n\r\n /**\r\n * Returns a promise that will eventually resolve with\r\n * all instances of a specific type.\r\n */\r\n getInstancesOfType(key) {\r\n return this.initializedPromise\r\n .then(() => {\r\n return this.loadedComponents[key];\r\n });\r\n }\r\n}\r\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\tif(__webpack_module_cache__[moduleId]) {\n\t\treturn __webpack_module_cache__[moduleId].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// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((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 = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + chunkId + \".\" + {\"Src_Scripts_components_top-navigation_js\":\"e98191aaf8d77f7af290\",\"Src_Scripts_components_mobile-navigation_js\":\"4ba81610c94d09bd7480\",\"Src_Scripts_components_site-search_js\":\"661958e04c6a584142ff\",\"Src_Scripts_components_project-page_js\":\"63fe7d8e785a719fb804\",\"vendors-node_modules_swiper_swiper_esm_js\":\"1d34cd552c3ca784ccc8\",\"Src_Scripts_components_project-swiper_js\":\"1793c5dba54017b8df96\",\"Src_Scripts_components_hero-swiper_js\":\"da05f50be8af99b959bb\",\"Src_Scripts_components_hero-video_js\":\"80e8d08b257b19478e1b\",\"Src_Scripts_components_short-content_js\":\"89a8da70030e002a53bd\",\"Src_Scripts_components_short-content-swiper_js\":\"d1459c88ac31df823c68\",\"Src_Scripts_components_image-gallery_js\":\"f18283a6035e46832099\",\"Src_Scripts_components_accordion_js\":\"373a06f0bb290f82b8ef\",\"Src_Scripts_components_media-swiper_js\":\"74ea2e3795a96512b33a\",\"Src_Scripts_components_nav-swiper_js\":\"a13e47c402eb2ced249f\",\"Src_Scripts_components_slider-section_js\":\"a4e2ab59c75cfeb7c7da\",\"vendors-node_modules_swiper_swiper-bundle_js\":\"94f163f95f2176493ce5\",\"vendors-node_modules_vimeo_player_dist_player_es_js\":\"408177646d89f1000288\",\"Src_Scripts_components_modal_js\":\"7ea1a15edf6adc6f0c48\",\"Src_Scripts_components_map_js\":\"9fc4aa36a902c217bc28\",\"Src_Scripts_components_slider-swiper_js\":\"a07804ac8b1ada4d5dfd\",\"Src_Scripts_components_data-baseline_js\":\"9b0f51e114c60d5f3004\",\"Src_Scripts_components_nice-select_js\":\"5e85ab43f549b7b5be37\",\"Src_Scripts_components_newsletter-signup_js\":\"7b11eaa981039d7d2c6d\",\"Src_Scripts_components_global-tools_js\":\"873b6c874c21c71a43a9\",\"Src_Scripts_components_form-effects_js\":\"0f390b3586428b837849\",\"Src_Scripts_components_news-overview_js\":\"3be6a7b1788200fa7748\",\"Src_Scripts_components_project-overview_js\":\"2534285dbfc18ff9ec1e\",\"Src_Scripts_components_document-swiper_js\":\"256cb312226689f203db\",\"Src_Scripts_components_news-page-hero_js\":\"7678d9a92cb5520556d7\",\"Src_Scripts_components_document-macro_js\":\"bc4f6fa8091d0d84b805\"}[chunkId] + \".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 = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop)","var inProgress = {};\nvar dataWebpackPrefix = \"AlmenNet.Setup:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key) => {\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\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (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((fn) => fn(event));\n\t\tif(prev) return prev(event);\n\t}\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};","// define __esModule on exports\n__webpack_require__.r = (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 = \"/Frontend/Scripts/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// Promise = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"Gorm.Agency.Project.Setup\": 0\n};\n\n\n__webpack_require__.f.j = (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((resolve, reject) => {\n\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n\t\t\t\t\t});\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 = (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);\n\t\t\t\t} else installedChunks[chunkId] = 0;\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 deferred startup\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\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, resolves = [];\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tresolves.push(installedChunks[chunkId][0]);\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\tfor(moduleId in moreModules) {\n\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t}\n\t}\n\tif(runtime) runtime(__webpack_require__);\n\tparentChunkLoadingFunction(data);\n\twhile(resolves.length) {\n\t\tresolves.shift()();\n\t}\n\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkAlmenNet_Setup\"] = globalThis[\"webpackChunkAlmenNet_Setup\"] || [];\nvar parentChunkLoadingFunction = chunkLoadingGlobal.push.bind(chunkLoadingGlobal);\nchunkLoadingGlobal.push = webpackJsonpCallback;","import ComponentRepository from './architecture/componentRepository';\r\n\r\ndocument.addEventListener('DOMContentLoaded', function () {\r\n window.cr = new ComponentRepository({\r\n 'header': () => import('./components/top-navigation'),\r\n 'mobile-navigation': () => import('./components/mobile-navigation'),\r\n 'site-search': () => import('./components/site-search'),\r\n 'project-page': () => import('./components/project-page'),\r\n 'project-swiper': () => import('./components/project-swiper'),\r\n 'hero-swiper': () => import('./components/hero-swiper'),\r\n 'hero-video': () => import('./components/hero-video'),\r\n 'short-content': () => import('./components/short-content'),\r\n 'short-content-swiper': () => import('./components/short-content-swiper'),\r\n 'image-gallery': () => import('./components/image-gallery'),\r\n 'accordion': () => import('./components/accordion'),\r\n 'top-navigation': () => import('./components/top-navigation'),\r\n 'media-swiper': () => import('./components/media-swiper'),\r\n 'nav-swiper': () => import('./components/nav-swiper'),\r\n 'slider-section': () => import('./components/slider-section'),\r\n 'swiper': () => import('../../node_modules/swiper/swiper-bundle.js'),\r\n 'modal': () => import('./components/modal'),\r\n 'map': () => import('./components/map'),\r\n 'slider-swiper': () => import('./components/slider-swiper'),\r\n 'data-baseline': () => import('./components/data-baseline'),\r\n 'nice-select': () => import('./components/nice-select'),\r\n 'newsletter-signup': () => import('./components/newsletter-signup'),\r\n 'global-tools': () => import('./components/global-tools'),\r\n 'form-effects': () => import('./components/form-effects'),\r\n 'news-overview': () => import('./components/news-overview'),\r\n 'project-overview': () => import('./components/project-overview'),\r\n 'document-swiper': () => import('./components/document-swiper'),\r\n 'news-page-hero': () => import('./components/news-page-hero'),\r\n 'document-macro': () => import('./components/document-macro'),\r\n /*\r\n This is an example component that demonstrates how to implement a filterable map. It should not be used in production sites as is but can serve as inspiration.\r\n 'domain-filterable-map': () => import('./components/example-components/example-domain-filterable-map'),\r\n */\r\n });\r\n});\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAA;AACA;AAAA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AAEA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AAEA;AACA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AAEA;AACA;AACA;AAGA;AACA;AACA;AACA;AACA;AACA;AADA;AACA;AAEA;AACA;AACA;AACA;AApIA;AACA;A;;A;;;;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACRA;AACA;AACA;AACA;AACA;;;;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACPA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;ACNA;;;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;ACzFA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAlCA;AAmCA;;;;A","sourceRoot":""}