{"version":3,"file":"header.bundle.js","mappings":";kFAAAA,EAAOC,QAAU,6hMCIjBD,EAAOC,QAAU,SAASC,GACzB,SAASC,EAAIC,GACQ,oBAAZC,UACJA,QAAQD,OAASC,QAAQF,KAAK,kBAAmBC,EACtD,CAOA,IAC2B,oBAAfE,YAJmB,oBAAhBC,aAA2D,oBAArBC,iBAKnDF,WAAWJ,GACe,oBAATO,KACjBA,KAAKC,KAAK,KAAMR,GAEhBC,EAAI,wCAEN,CAAE,MAAOC,GACRD,EAAIC,EACL,CACD,ICzBIO,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAab,QAGrB,IAAID,EAASW,EAAyBE,GAAY,CAGjDZ,QAAS,CAAC,GAOX,OAHAe,EAAoBH,GAAUb,EAAQA,EAAOC,QAASW,GAG/CZ,EAAOC,OACf,CCtBA,EAAQ,4CAAR,CAAmJ,EAAQ","sources":["webpack://RNA Brisbane Showground/./wwwroot/scripts/header.js","webpack://RNA Brisbane Showground/./node_modules/script-loader/addScript.js","webpack://RNA Brisbane Showground/webpack/bootstrap","webpack://RNA Brisbane Showground/./wwwroot/scripts/header.js?b05a"],"sourcesContent":["module.exports = \"/* eslint-disable indent */\\r\\nwindow.addEventListener('load', function () {\\r\\n const Menu = {\\r\\n RemoveAll: 0,\\r\\n RemoveActive: 1\\r\\n };\\r\\n\\r\\n const menuWithSubmenu = document.querySelectorAll('header .nav-item');\\r\\n for (let i = 0; i < menuWithSubmenu.length; i++) {\\r\\n menuWithSubmenu[i].addEventListener('mouseover', function (e) {\\r\\n e.preventDefault();\\r\\n e.stopPropagation();\\r\\n \\r\\n if (!this.classList.contains('has-sub')) {\\r\\n setMenuState(Menu.RemoveAll);\\r\\n return;\\r\\n }\\r\\n setMenuState(Menu.RemoveActive);\\r\\n\\r\\n if (document.body.clientWidth > 1100) {\\r\\n // Add padding to header to prevent page from shifting\\r\\n document.querySelector(\\\".header\\\").style.paddingRight = \\\"77px\\\";\\r\\n }\\r\\n\\r\\n this.classList.toggle('hover');\\r\\n if (!document.querySelector('.mega-menu-overlay').classList.contains('active')) {\\r\\n document.querySelector('.mega-menu-overlay').classList.add('active');\\r\\n }\\r\\n\\r\\n const subMenu = document.querySelector('.submenu-container .dropdown-menu[data-menu-title=\\\"' + this.dataset.navTitle + '\\\"]');\\r\\n if (subMenu) {\\r\\n document.querySelector('.submenu-container').classList.add('active');\\r\\n subMenu.classList.add('active');\\r\\n }\\r\\n\\r\\n document.body.classList.add('no-scroll');\\r\\n });\\r\\n }\\r\\n\\r\\n const megaMenuOverlay = document.querySelector('.mega-menu-overlay');\\r\\n megaMenuOverlay.addEventListener('mouseenter', function (e) {\\r\\n e.preventDefault();\\r\\n e.stopPropagation();\\r\\n\\r\\n closeSlidedownMenu();\\r\\n });\\r\\n\\r\\n document.addEventListener('keydown', function (event) {\\r\\n if (event.key === 'Escape' || event.key === 'Esc') {\\r\\n closeSlidedownMenu();\\r\\n }\\r\\n });\\r\\n\\r\\n function closeSlidedownMenu() {\\r\\n setMenuState(Menu.RemoveAll);\\r\\n }\\r\\n\\r\\n function setMenuState(state) {\\r\\n switch (state) {\\r\\n case Menu.RemoveActive:\\r\\n if (document.querySelector('.nav-item.hover')) { document.querySelector('.nav-item.hover').classList.remove('hover'); }\\r\\n\\r\\n if (document.querySelector('.submenu-container .dropdown-menu.active')) { document.querySelector('.submenu-container .dropdown-menu.active').classList.remove('active'); }\\r\\n break;\\r\\n case Menu.RemoveAll:\\r\\n default:\\r\\n if (document.querySelector('.nav-item.hover')) { document.querySelector('.nav-item.hover').classList.remove('hover'); }\\r\\n\\r\\n if (document.querySelector('.submenu-container.active')) { document.querySelector('.submenu-container.active').classList.remove('active'); }\\r\\n\\r\\n if (document.querySelector('.dropdown-menu.active')) { document.querySelector('.dropdown-menu.active').classList.remove('active'); }\\r\\n\\r\\n if (document.querySelector('.mega-menu-overlay')) { document.querySelector('.mega-menu-overlay').classList.remove('active'); }\\r\\n break;\\r\\n }\\r\\n\\r\\n document.querySelector(\\\".header\\\").style.paddingRight = \\\"\\\";\\r\\n document.body.classList.remove('no-scroll');\\r\\n }\\r\\n\\r\\n displayBreadcrumbs();\\r\\n function displayBreadcrumbs() {\\r\\n const breadcrumbs = document.querySelector('.breadcrumbs');\\r\\n if (breadcrumbs == null || breadcrumbs.length <= 0) { return; }\\r\\n\\r\\n const initialSection = document.querySelector('.umb-block-list section:first-child');\\r\\n if (initialSection) {\\r\\n if (initialSection.classList.contains('sec-nested-section')) {\\r\\n const nestedFirstSection = initialSection.querySelector('.sec-nested-umb-block-list section:first-child');\\r\\n nestedFirstSection.prepend(breadcrumbs);\\r\\n } else {\\r\\n const whatsOnPage = document.querySelector('.whats-on-page');\\r\\n breadcrumbs.classList.add('center');\\r\\n\\r\\n if (whatsOnPage) {\\r\\n const coverImageDiv = whatsOnPage.querySelector('.cover-image');\\r\\n coverImageDiv.after(breadcrumbs);\\r\\n } else {\\r\\n initialSection.prepend(breadcrumbs);\\r\\n }\\r\\n }\\r\\n } else {\\r\\n breadcrumbs.classList.add('center');\\r\\n }\\r\\n breadcrumbs.classList.add('display');\\r\\n }\\r\\n\\r\\n document.querySelector('.mobile-nav-handler').addEventListener('click', function (e) {\\r\\n document.querySelector('body').classList.toggle('no-scroll');\\r\\n document.querySelector('.submenu-container').classList.toggle('mob-active');\\r\\n\\r\\n const toggleNav = document.querySelector('#toggle-nav');\\r\\n\\r\\n if (toggleNav.classList.contains('active')) {\\r\\n toggleNav.innerHTML = 'Menu';\\r\\n } else {\\r\\n toggleNav.innerHTML = 'Close';\\r\\n }\\r\\n\\r\\n toggleNav.classList.toggle('active');\\r\\n });\\r\\n\\r\\n //adjustElements();\\r\\n //document.addEventListener(\\\"resize\\\", adjustElements);\\r\\n //function adjustElements() {\\r\\n //// Adjust Content with image (large image size)\\r\\n // if (document.body.clientWidth > 1201) {\\r\\n // var sideWidth = (document.body.clientWidth - 1140) / 2;\\r\\n // document.querySelectorAll(\\\".sec-content-with-image.img-large .img-left .sec-content-image .sec-content-image--container\\\").forEach(function (element) {\\r\\n // element.style.marginLeft = `-${sideWidth}px`;\\r\\n // });\\r\\n\\r\\n // document.querySelectorAll(\\\".sec-content-with-image.img-large .img-right .sec-content-image .sec-content-image--container\\\").forEach(function (element) {\\r\\n // element.style.marginLeft = `${sideWidth}px`;\\r\\n // });\\r\\n // }\\r\\n //}\\r\\n});\\r\\n\"","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\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","require(\"!!C:\\\\Users\\\\cge\\\\Documents\\\\Projects\\\\brisbane-showground-umbraco-website\\\\RNABrisbaine.Web\\\\node_modules\\\\script-loader\\\\addScript.js\")(require(\"!!C:\\\\Users\\\\cge\\\\Documents\\\\Projects\\\\brisbane-showground-umbraco-website\\\\RNABrisbaine.Web\\\\node_modules\\\\raw-loader\\\\index.js!C:\\\\Users\\\\cge\\\\Documents\\\\Projects\\\\brisbane-showground-umbraco-website\\\\RNABrisbaine.Web\\\\wwwroot\\\\scripts\\\\header.js\"))"],"names":["module","exports","src","log","error","console","execScript","attachEvent","addEventListener","eval","call","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__"],"sourceRoot":""}