{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"foundation\"","webpack:///../@valtech/utilities/src/utilities/throttle.js","webpack:///../@valtech/utilities/src/utilities/customVhProperty.js","webpack:///../@valtech/utilities/src/utilities/debounce.js","webpack:///../@valtech/utilities/src/index.js","webpack:///./src/js/main-navigation.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","foundation","throttle","func","limit","lastFunc","lastRan","args","context","this","clearTimeout","setTimeout","Date","now","apply","setValue","vh","window","innerHeight","document","documentElement","style","setProperty","debounce","delay","timer","customVhProperty","addEventListener","flyouts","updateFlyouts","viewport","is","firstItem","firstItemLeftOffset","getBoundingClientRect","left","forEach","flyoutNode","flyout","width","innerWidth","Array","from","querySelectorAll","push"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAAS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AAMC,EAAUC,KAChBC,aAAae,GACbA,EAAQd,WAAW,IAAMR,EAAKW,MAAMN,EAASD,GAAOiB,I,kCCN7CE,IFYA,WACbX,IAEAE,OAAOU,iBAAiB,SAAUzB,EAAS,KACzCa,KACC,MAEHE,OAAOU,iBAAiB,SAAUzB,EAAS,KACzCa,KACC,Q,gCG1BL,yBAUA,MAAMa,EAAU,GAMhB,SAASC,IAGP,GAAIC,WAASC,GAAG,QAAS,CAEvB,MAAOC,GAAaJ,EAEpB,IAAKI,EACH,OAGF,MAAMC,EAAsBD,EAAUE,wBAAwBC,KAE9DP,EAAQQ,QAASC,IACf,MAAMC,EAASD,EACXC,IACFA,EAAOjB,MAAMc,KAAO,QACpBG,EAAOjB,MAAMkB,MAAWtB,OAAOuB,WAAaP,EAhBxB,GAgBC,SAO7BhB,OAAOU,iBAAiB,SAAUJ,YAASM,EAAe,MAAM,GAGhEV,SAASQ,iBAAiB,mBAAoB,KAC5Cc,MAAMC,KAAKvB,SAASwB,iBAAiB,uDAClCP,QAAQE,GAAUV,EAAQgB,KAAKN,IAElCT","file":"js/main-navigation.min.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","module.exports = foundation;","/**\n * Throttle function: ensures the function is called at most once in the given time interval.\n * @param {Function} func - Function to throttle.\n * @param {number} limit - Time in milliseconds to wait before allowing the next execution.\n * @returns {Function} - Throttled function.\n */\nexport function throttle(func, limit) {\n let lastFunc;\n let lastRan;\n \n return function (...args) {\n const context = this;\n if (!lastRan) {\n func.apply(context, args);\n lastRan = Date.now();\n } else {\n clearTimeout(lastFunc);\n lastFunc = setTimeout(() => {\n if (Date.now() - lastRan >= limit) {\n func.apply(context, args);\n lastRan = Date.now();\n }\n }, limit - (Date.now() - lastRan));\n }\n };\n}","import { throttle } from './throttle';\n\n/**\n * Get the viewport height and multiple it by 1% to get a value for a vh unit\n * Set the value in the --vh custom property to the root of the document\n * @returns {undefined}\n */\nfunction setValue() {\n const vh = window.innerHeight * 0.01;\n document.documentElement.style.setProperty('--vh', `${vh}px`);\n}\n\n/**\n * Sets a CSS Custom Property for actual vh value and updates it on resize\n * @see {https://css-tricks.com/the-trick-to-viewport-units-on-mobile} for detailled explanation\n * @returns {undefined}\n */\nexport default function customVhProperty() {\n setValue();\n\n window.addEventListener('resize', throttle(() => {\n setValue();\n }, 100));\n\n window.addEventListener('scroll', throttle(() => {\n setValue();\n }, 100));\n}\n","/**\n * Debounce function: ensures the function is only called after a delay once no calls are made in that period.\n * @param {Function} func - Function to debounce.\n * @param {number} delay - Time in milliseconds to wait before executing the function.\n * @returns {Function} - Debounced function.\n */\nexport function debounce(func, delay) {\n let timer;\n return function (...args) {\n const context = this;\n clearTimeout(timer);\n timer = setTimeout(() => func.apply(context, args), delay);\n };\n}","import customVhProperty from './utilities/customVhProperty';\nimport { throttle } from './utilities/throttle';\nimport { debounce } from './utilities/debounce';\n\nexport { throttle, debounce };\nexport default customVhProperty;\n","/**\n * Main Navigation functionality.\n *\n * @module feature-navigation\n * @version 1.0.0\n * @author Rocco Janse, rocco.janse@valtech.nl\n */\nimport { viewport } from 'foundation-theming';\nimport { debounce } from '@valtech/utilities';\n\nconst flyouts = [];\n\n/**\n * Updates the flyout widths based on window width.\n * @returns void\n */\nfunction updateFlyouts() {\n const defaultLeftOffset = 80;\n\n if (viewport.is('>=lg')) {\n // get first item (key) of flyouts map\n const [firstItem] = flyouts;\n\n if (!firstItem) {\n return;\n }\n\n const firstItemLeftOffset = firstItem.getBoundingClientRect().left;\n\n flyouts.forEach((flyoutNode) => {\n const flyout = flyoutNode;\n if (flyout) {\n flyout.style.left = `${-defaultLeftOffset}px`;\n flyout.style.width = `${window.innerWidth - firstItemLeftOffset + defaultLeftOffset}px`;\n }\n });\n }\n}\n\n// update flyouts on window debounced resize event\nwindow.addEventListener('resize', debounce(updateFlyouts, 200), false);\n\n// on document ready\ndocument.addEventListener('DOMContentLoaded', () => {\n Array.from(document.querySelectorAll('.list-inline-item--flyout .main-navigation__flyout'))\n .forEach(flyout => flyouts.push(flyout));\n\n updateFlyouts();\n});\n"],"sourceRoot":""}