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AAWE,aAAa,UAEzC,IAAKD,EACJ,OAGD,IAAIE,EAAwBF,EAAWG,MAAM,KAAK,GAClDD,EAAwBA,EAAsBC,MAAM,KAAKC,KAAIC,GACvDA,EAAWC,cAAcC,WAAW,eAGiB,IAAtDF,EAAWC,cAAc5E,QAAQ,gBAC7B2E,EAED,aAAaG,mBAAmBnF,OAAOG,SAASiF,QAL/CJ,IAMNK,KAAK,KAERV,EAAa,GAAGA,EAAWG,MAAM,KAAK,MAAMD,IAE5CH,EAAUzD,aAAa,SAAU0D,M","sources":["webpack://aandotcom/./Scripts/src/components/dialog.ts","webpack://aandotcom/./Scripts/src/components/login-dialog.ts","webpack://aandotcom/./Scripts/src/components/main-nav.ts","webpack://aandotcom/./Scripts/src/components/page-actions.ts","webpack://aandotcom/./Scripts/src/components/top-search.ts","webpack://aandotcom/webpack/bootstrap","webpack://aandotcom/./Scripts/src/components/gdpr-banner.ts","webpack://aandotcom/./Scripts/src/components/scroll-top.ts","webpack://aandotcom/./Scripts/src/components/publications-dialog.ts","webpack://aandotcom/./Scripts/src/aan-layout-only-scripts.ts"],"sourcesContent":["class AANDialog {\r\n\tstatic openDialog(dialogId: string): void {\r\n\t\tconst dialog = document.getElementById(dialogId);\r\n\r\n\t\tif(!dialog) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Not all browsers support the dialog element yet. as a result TypeScrupt doesn't recognize it.\r\n\t\t// We are polyfilling it so this will make TypeScript ignore the call.\r\n\t\t(dialog as any).showModal();\r\n\t\t// When displaying the login dialog, disable scrolling on the main body element,\r\n\t\t// not having this causes mobile browsers to get confused as to what element should be scrolled.\r\n\t\tdocument.body.style.overflow = \"hidden\";\r\n\r\n\t\tdialog.addEventListener(\"close\", () => {\r\n\t\t\tdocument.body.style.overflow = \"\";\r\n\t\t});\r\n\t};\r\n\r\n\tinit() {\r\n\t\tconst dialogs = Array.from(document.querySelectorAll(\"dialog\")) as HTMLDialogElement[];\r\n\r\n\t\tif (!dialogs || dialogs.length === 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tdialogs.forEach(dialog => {\r\n\t\t\tconst closeButton = dialog.querySelector(\".btn-close\");\r\n\r\n\t\t\tcloseButton?.addEventListener(\"click\", event => {\r\n\t\t\t\t// Not all browsers support the dialog element yet. as a result TypeScrupt doesn't recognize it.\r\n\t\t\t\t// We are polyfilling it so this will make TypeScript ignore the call.\r\n\t\t\t\t(dialog as any).close();\r\n\t\t\t\tevent.preventDefault();\r\n\t\t\t\tevent.stopPropagation();\r\n\t\t\t});\r\n\r\n\t\t\t// Close the dialog when the backdrop is clicked.\r\n\t\t\tdialog.addEventListener(\"click\", function (event) {\r\n\t\t\t\tconst rect = dialog.getBoundingClientRect();\r\n\t\t\t\tconst isInDialog = (rect.top <= event.clientY && event.clientY <= rect.top + rect.height\r\n\t\t\t\t\t&& rect.left <= event.clientX && event.clientX <= rect.left + rect.width);\r\n\r\n\t\t\t\tif (!isInDialog && !(event.target instanceof HTMLButtonElement)) {\r\n\t\t\t\t\t// Not all browsers support the dialog element yet. as a result TypeScrupt doesn't recognize it.\r\n\t\t\t\t\t// We are polyfilling it so this will make TypeScript ignore the call.\r\n\t\t\t\t\t(dialog as any).close();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}\r\n\r\n// allow AanDialog to be accessable outside of our scripts.\r\n(window as any).AANDialog = AANDialog;\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\tconst dialogs = new AANDialog();\r\n\r\n\tdialogs.init();\r\n});\r\n","class AANLoginDialog {\r\n\tprivate loginDialog?: HTMLDialogElement;\r\n\r\n\tdisplayLoginError() {\r\n\t\tif (window.location.toString().indexOf(\"LoginError=true\") === -1) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst loginErrorElement = document.querySelector(\"#loginDialog .login-error\") as HTMLSpanElement;\r\n\t\tloginErrorElement.innerText = \"The Username or Password provided is incorrect.\";\r\n\t}\r\n\r\n\tinit() {\r\n\t\tthis.loginDialog = document.querySelector(\"#loginDialog\") as HTMLDialogElement;\r\n\r\n\t\tif (!this.loginDialog) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst form: HTMLFormElement | null = this.loginDialog.querySelector(\"form\");\r\n\t\tform?.addEventListener(\"submit\", event => {\r\n\t\t\tthis.loginDialog?.classList.add(\"submitted\");\r\n\t\t});\r\n\r\n\t\tthis.displayLoginError();\r\n\t}\r\n}\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\tconst loginDialog = new AANLoginDialog();\r\n\r\n\tloginDialog.init();\r\n});\r\n","class AANMainNav {\r\n\tsetAriaExpanded(button: HTMLButtonElement, expandValue: boolean) {\r\n\t\tif (button.hasAttribute(\"aria-expanded\")) {\r\n\t\t\tbutton.setAttribute(\"aria-expanded\", expandValue.toString());\r\n\t\t}\r\n\t}\r\n\r\n\ttoggleMobileMenu (button: HTMLButtonElement) {\r\n\t\tif (button.parentElement?.classList.contains(\"submenu-open\")) {\r\n\t\t\tbutton.parentElement.classList.remove(\"submenu-open\");\r\n\t\t\tbutton.parentElement.parentElement?.classList.remove(\"submenu-open\");\r\n\t\t\tthis.setAriaExpanded(button, false);\r\n\t\t} else {\r\n\t\t\tbutton.parentElement?.classList.add(\"submenu-open\");\r\n\t\t\tbutton.parentElement?.parentElement?.classList.add(\"submenu-open\");\r\n\t\t\tthis.setAriaExpanded(button, true);\r\n\t\t}\r\n\t};\r\n\r\n\ttoggleMobileSubnav (button: HTMLButtonElement) {\r\n\t\tif (button.parentElement?.classList.contains(\"submenu-open\")) {\r\n\t\t\tbutton.parentElement.classList.remove(\"submenu-open\");\r\n\t\t\tthis.setAriaExpanded(button, false);\r\n\t\t} else {\r\n\t\t\tbutton.parentElement?.classList.add(\"submenu-open\");\r\n\t\t\tthis.setAriaExpanded(button, true);\r\n\t\t}\r\n\t};\r\n}\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\tconst mainNav = new AANMainNav();\r\n\tconst mainNavButtons: HTMLButtonElement[] = Array.from(document.querySelectorAll(\".main-nav .toggle-nav\"));\r\n\tconst subnavButtons: HTMLButtonElement[] = Array.from(document.querySelectorAll(\".main-nav .toggle-subnav\"));\r\n\r\n\tmainNavButtons.forEach(button => {\r\n\t\tbutton.addEventListener(\"click\", () => {\r\n\t\t\tmainNav.toggleMobileMenu(button);\r\n\t\t});\r\n\t});\r\n\r\n\tsubnavButtons.forEach(subnavButton => {\r\n\t\tsubnavButton.addEventListener(\"click\", () => {\r\n\t\t\tmainNav.toggleMobileSubnav(subnavButton);\r\n\t\t});\r\n\t});\r\n});\r\n","class PageActions {\r\n\tprivate pageActionsElement?: HTMLElement;\r\n\tprivate bannerElement?: HTMLElement | null;\r\n\r\n\tsetPageActionsLocation() {\r\n\r\n\t\tif (!this.pageActionsElement) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (!this.bannerElement) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst bannerStyles = getComputedStyle(this.bannerElement);\r\n\r\n\t\tif (bannerStyles.display === \"none\") {\r\n\t\t\tthis.pageActionsElement.style.bottom = \"35px\";\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tconst gdprBannerHeight = parseInt(bannerStyles.height);\r\n\r\n\t\tthis.pageActionsElement.style.bottom = `${gdprBannerHeight + 1}px`;\r\n\t}\r\n\r\n\tinit() {\r\n\t\tthis.pageActionsElement = document.querySelector(\".page-actions\") as HTMLElement;\r\n\t\tthis.bannerElement = document.querySelector(\".gdpr-banner\");\r\n\r\n\t\tif (!this.bannerElement) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.setPageActionsLocation();\r\n\r\n\t\twindow.addEventListener(\"resize\", () => {\r\n\t\t\tthis.setPageActionsLocation();\r\n\t\t});\r\n\t}\r\n}\r\n\r\nwindow.addEventListener(\"load\", () => {\r\n\tconst pageActions = new PageActions();\r\n\tpageActions.init();\r\n});\r\n","class TopSearch {\r\n\tprivate showSeachButton = document.querySelector(\".show-search\");\r\n\tprivate closeSearchButton = document.querySelector(\".close-search\");\r\n\tprivate pageHeader = document.querySelector(\".page-header\");\r\n\r\n\tinit() {\r\n\t\tthis.showSeachButton?.addEventListener(\"click\", () => {\r\n\t\t\tthis.pageHeader?.classList.add(\"search\");\r\n\t\t});\r\n\t\tthis.closeSearchButton?.addEventListener(\"click\", () => {\r\n\t\t\tthis.pageHeader?.classList.remove(\"search\");\r\n\t\t});\r\n\t}\r\n}\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\tconst topSearch = new TopSearch();\r\n\r\n\ttopSearch.init();\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\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","export class AANGDPRBanner {\r\n\tprivate bannerClick(event: Event, bannerElement: HTMLElement) {\r\n\t\twindow.localStorage.gdprClosed = \"true\";\r\n\t\tbannerElement.style.display = \"none\";\r\n\t};\r\n\r\n\tinit(): void {\r\n\t\tconst bannerElement: HTMLElement | null = document.querySelector(\".gdpr-banner\");\r\n\r\n\t\tif (!bannerElement) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif (window.localStorage.gdprClosed) {\r\n\t\t\tbannerElement.style.display = \"none\";\r\n\t\t}\r\n\r\n\t\tbannerElement.querySelector(\".btn-close\")?.addEventListener(\"click\", (event) => this.bannerClick(event, bannerElement));\r\n\t};\r\n}\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\tconst gdprBanner = new AANGDPRBanner();\r\n\r\n\tgdprBanner.init();\r\n});\r\n","export class AANScrollTop {\r\n\tprivate scrollTopElement?: HTMLElement;\r\n\r\n\tprivate scrollTopVisible() {\r\n\t\tconst windowHeight: number = window.innerHeight\r\n\t\t\t|| Math.max(document.documentElement.clientHeight, document.body.clientHeight);\r\n\t\tconst showpoint: number = windowHeight / 2;\r\n\r\n\t\tif (document.documentElement.scrollTop > showpoint) {\r\n\t\t\tthis.scrollTopElement?.classList.add(\"visible\");\r\n\t\t} else {\r\n\t\t\tthis.scrollTopElement?.classList.remove(\"visible\");\r\n\t\t}\r\n\t}\r\n\r\n\tinit(): void {\r\n\t\tthis.scrollTopElement = document.querySelector(\".scroll-top\") as HTMLElement;\r\n\r\n\t\tif (!this.scrollTopElement) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.scrollTopVisible();\r\n\r\n\t\twindow.addEventListener(\"scroll\", () => {\r\n\t\t\tthis.scrollTopVisible();\r\n\t\t});\r\n\r\n\t\tthis.scrollTopElement.addEventListener(\"click\", () => {\r\n\t\t\tconst windowHeight: number = document.documentElement.scrollTop;\r\n\t\t\tconst animationLength = 500; // milliseconds\r\n\t\t\tconst stepUnit = Math.ceil(windowHeight / (animationLength / 10));\r\n\r\n\t\t\tconst scrollAnimation = () => {\r\n\t\t\t\twindow.scrollTo(document.documentElement.scrollLeft, document.documentElement.scrollTop - stepUnit);\r\n\r\n\t\t\t\tif (document.documentElement.scrollTop <= 10) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tsetTimeout(scrollAnimation, 10);\r\n\t\t\t};\r\n\r\n\t\t\tscrollAnimation();\r\n\t\t});\r\n\t}\r\n}\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\tconst scrollTop = new AANScrollTop();\r\n\r\n\tscrollTop.init();\r\n});\r\n","export class AANPublicationsDialog {\r\n\tinit(): void {\r\n\t\tconst showPublicationsButtons = Array.from(document.querySelectorAll(\"button.show-publications\"));\r\n\t\tconst publicationsDialog = document.getElementById(\"publications\") as HTMLDialogElement;\r\n\r\n\t\tif (!publicationsDialog) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tshowPublicationsButtons.forEach(showPublicationsButton => {\r\n\t\t\tshowPublicationsButton.addEventListener(\"click\", () => {\r\n\t\t\t\tif (!publicationsDialog.hasAttribute(\"open\")) {\r\n\t\t\t\t\t// Not all browsers support the dialog element yet. as a result TypeScrupt doesn't recognize it.\r\n\t\t\t\t\t// We are polyfilling it so this will make TypeScript ignore the call.\r\n\t\t\t\t\t(publicationsDialog as any).showModal();\r\n\t\t\t\t} else {\r\n\t\t\t\t\t(publicationsDialog as any).close();\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n}\r\n\r\n\r\ndocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\tconst publicationsDialog = new AANPublicationsDialog();\r\n\r\n\tpublicationsDialog.init();\r\n});\r\n","// import \"./polyfills\";\r\nimport \"./components/gdpr-banner\";\r\nimport \"./components/main-nav\";\r\nimport \"./components/top-search\";\r\nimport \"./components/scroll-top\";\r\nimport \"./components/page-actions\";\r\nimport \"./components/dialog\";\r\nimport \"./components/login-dialog\";\r\nimport \"./components/publications-dialog\";\r\nimport \"./components/live-chat\";\r\n\r\n(() => {\r\n\tdocument.addEventListener(\"DOMContentLoaded\", () => {\r\n\t\t// When our apps load the layout, the shared layout url is the url put in the\r\n\t\t// returnUrl param for the login form, which is not correct.\r\n\t\tconst loginForm = document.querySelector(\"#loginDialog form\") as HTMLFormElement;\r\n\t\tlet formAction = loginForm?.getAttribute(\"action\");\r\n\r\n\t\tif (!formAction) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet formActionQueryString = formAction.split(\"?\")[1];\r\n\t\tformActionQueryString = formActionQueryString.split(\"&\").map(queryParam => {\r\n\t\t\tif (!queryParam.toLowerCase().startsWith(\"returnurl=\")) {\r\n\t\t\t\treturn queryParam;\r\n\t\t\t}\r\n\t\t\tif (queryParam.toLowerCase().indexOf(\"sharedlayout\") === -1) {\r\n\t\t\t\treturn queryParam;\r\n\t\t\t}\r\n\t\t\treturn `returnUrl=${encodeURIComponent(window.location.href)}`;\r\n\t\t}).join(\"&\");\r\n\r\n\t\tformAction = `${formAction.split(\"?\")[0]}?${formActionQueryString}`;\r\n\r\n\t\tloginForm.setAttribute(\"action\", formAction);\r\n\t});\r\n})();\r\n"],"names":["AANDialog","static","dialogId","dialog","document","getElementById","showModal","body","style","overflow","addEventListener","init","dialogs","Array","from","querySelectorAll","length","forEach","closeButton","querySelector","event","close","preventDefault","stopPropagation","rect","getBoundingClientRect","top","clientY","height","left","clientX","width","target","HTMLButtonElement","window","AANLoginDialog","displayLoginError","location","toString","indexOf","innerText","this","loginDialog","form","classList","add","AANMainNav","setAriaExpanded","button","expandValue","hasAttribute","setAttribute","toggleMobileMenu","parentElement","contains","remove","toggleMobileSubnav","mainNav","mainNavButtons","subnavButtons","subnavButton","PageActions","setPageActionsLocation","pageActionsElement","bannerElement","bannerStyles","getComputedStyle","display","bottom","gdprBannerHeight","parseInt","TopSearch","showSeachButton","closeSearchButton","pageHeader","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","AANGDPRBanner","bannerClick","localStorage","gdprClosed","AANScrollTop","scrollTopVisible","showpoint","innerHeight","Math","max","documentElement","clientHeight","scrollTop","scrollTopElement","windowHeight","stepUnit","ceil","scrollAnimation","scrollTo","scrollLeft","setTimeout","AANPublicationsDialog","showPublicationsButtons","publicationsDialog","showPublicationsButton","loginForm","formAction","getAttribute","formActionQueryString","split","map","queryParam","toLowerCase","startsWith","encodeURIComponent","href","join"],"sourceRoot":""}