{"version":3,"file":"global-bundle.js","sources":["webpack:///webpack/bootstrap","webpack:///./Static-Adage/typescript/classes/headerSkip.ts","webpack:///./Static-Adage/typescript/classes/pdfDownloadBlock.ts","webpack:///./Static-Adage/typescript/entries/global.ts"],"sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"global\": 0\n \t};\n\n \tvar deferredModules = [];\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 \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"common\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { nav } from '../inits/navigation';\r\n\r\nexport class HeaderSkip {\r\n link: HTMLAnchorElement;\r\n target: HTMLElement;\r\n targetLocation: number;\r\n\r\n constructor(element: HTMLAnchorElement) {\r\n this.link = element;\r\n this.getDOM();\r\n this.init();\r\n }\r\n\r\n getDOM() {\r\n this.target = document.querySelector(this.link.getAttribute('href')) as HTMLElement;\r\n\r\n // Tag block container if the first child is full bleed so that it can jump to the correct location when triggered\r\n const blockContainer = document.querySelector('[data-blocks]') as HTMLElement;\r\n if (blockContainer) {\r\n const firstBlock = blockContainer.firstElementChild as HTMLElement;\r\n if (firstBlock && firstBlock.hasAttribute('data-full-bleed')) {\r\n const range = firstBlock.getAttribute('data-full-bleed');\r\n this.target.classList.add(`skip-target-spaced${range ? `-${range}` : ''}`);\r\n }\r\n }\r\n }\r\n\r\n init() {\r\n if (this.link && this.target) {\r\n const navClearance = nav.desktopNavActive() ? nav.desktopShort : nav.mobileShort;\r\n this.link.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n this.targetLocation = this.target.offsetTop - navClearance;\r\n this.target.focus();\r\n window.scrollTo(0, this.targetLocation);\r\n });\r\n }\r\n }\r\n}","import { nodeListToArray } from \"../helpers/nodeListToArray\";\r\n\r\nexport class PdfDownloadBlock {\r\n pdfCheckboxes: HTMLInputElement[];\r\n selectAllCheckbox: HTMLInputElement;\r\n downloadButton: HTMLButtonElement;\r\n loadingMessage: HTMLElement;\r\n pdfFileName: string;\r\n defaultPdfUrl: string;\r\n optionNotSelectedErrorContainer: HTMLElement;\r\n\r\n readonly hideErrorsClass = \"validation-summary-valid\";\r\n\r\n constructor(container: HTMLElement) {\r\n if (!container)\r\n return;\r\n\r\n const pdfFileName = container.querySelector(\"[data-pdf-filename]\");\r\n if (pdfFileName) {\r\n this.pdfFileName = (pdfFileName as HTMLInputElement).value;\r\n }\r\n\r\n const defaultPdfUrl = container.querySelector(\"[data-default-pdf]\");\r\n if (defaultPdfUrl) {\r\n this.defaultPdfUrl = (defaultPdfUrl as HTMLInputElement).value;\r\n }\r\n\r\n const optionNotSelectedErrorContainer = container.querySelector(\"[data-option-not-selected-error]\");\r\n if (optionNotSelectedErrorContainer) {\r\n this.optionNotSelectedErrorContainer = optionNotSelectedErrorContainer as HTMLElement;\r\n }\r\n\r\n this.pdfCheckboxes = nodeListToArray(container.querySelectorAll(\"[data-pdf-checkbox]\")) as HTMLInputElement[];\r\n this.pdfCheckboxes.forEach(checkbox => {\r\n checkbox.addEventListener(\"change\", this.handleSelectAllState);\r\n });\r\n\r\n const downloadButton = container.querySelector(\"[data-download-button]\") as HTMLInputElement;\r\n if (downloadButton) {\r\n this.downloadButton = downloadButton;\r\n this.downloadButton.addEventListener(\"click\", this.downloadPdf);\r\n }\r\n\r\n const selectAllCheckbox = container.querySelector(\"[data-pdf-select-all]\") as HTMLInputElement;\r\n if (selectAllCheckbox) {\r\n this.selectAllCheckbox = selectAllCheckbox;\r\n this.selectAllCheckbox.addEventListener(\"change\", this.toggleSelectAll);\r\n }\r\n\r\n const loadingMessage = container.querySelector(\"[data-loading-message]\") as HTMLElement;\r\n this.loadingMessage = loadingMessage;\r\n this.loadingMessage.style.display = \"none\";\r\n }\r\n\r\n toggleSelectAll = (e) => {\r\n if (this.selectAllCheckbox.checked) {\r\n this.pdfCheckboxes.forEach(item => {\r\n item.checked = true;\r\n });\r\n }\r\n else {\r\n this.pdfCheckboxes.forEach(item => {\r\n item.checked = false;\r\n });\r\n }\r\n }\r\n\r\n downloadPdf = (): void => {\r\n let selectedPdfUrls = this.getSelectedUrls();\r\n if (selectedPdfUrls.length > 0) {\r\n this.optionNotSelectedErrorContainer.classList.add(this.hideErrorsClass);\r\n\r\n if (this.defaultPdfUrl && this.defaultPdfUrl.length > 0) {\r\n selectedPdfUrls = [this.defaultPdfUrl].concat(selectedPdfUrls);\r\n }\r\n\r\n window.location.href = `/PdfDownloadContainerBlock/GetConcatenatedPdf/?pdfUrls=`\r\n + selectedPdfUrls.map(x => encodeURIComponent(x)).join(\"&pdfUrls=\")\r\n + `&fileName=` + encodeURIComponent(this.pdfFileName);\r\n this.loadingMessage.style.display = \"block\";\r\n }\r\n else {\r\n this.optionNotSelectedErrorContainer.classList.remove(this.hideErrorsClass);\r\n }\r\n }\r\n\r\n handleSelectAllState = (): void => {\r\n const numberSelectedItems = this.getSelectedItems().length;\r\n if (numberSelectedItems == this.pdfCheckboxes.length) {\r\n this.selectAllCheckbox.checked = true;\r\n }\r\n else {\r\n this.selectAllCheckbox.checked = false;\r\n }\r\n }\r\n\r\n getSelectedItems = (): HTMLInputElement[] => {\r\n const selectedItems: HTMLInputElement[] = [];\r\n\r\n this.pdfCheckboxes.forEach(item => {\r\n if (item.checked) {\r\n selectedItems.push(item);\r\n }\r\n });\r\n\r\n return selectedItems;\r\n }\r\n\r\n getSelectedUrls = (): string[] => {\r\n const selectedItems = this.getSelectedItems();\r\n return selectedItems.map(item => item.value);\r\n }\r\n}","import { HeaderSkip } from '../classes/headerSkip';\r\nimport { nav } from '../inits/navigation';\r\nimport { PdfDownloadBlock } from '../classes/pdfDownloadBlock';\r\n\nconst debounce = require('lodash.debounce');\n\nconst initAll = () => {\n const headerSkipLink = initHeaderSkip();\n initResizeHandlers(headerSkipLink);\n initPdfDownloadBlock();\n}\n\nconst initHeaderSkip = () => {\n // Link in hero to skip down to content\n const headerSkipLinkEl = document.querySelector('[data-header-skip]') as HTMLAnchorElement;\n let headerSkip: HeaderSkip;\n if (headerSkipLinkEl) {\n headerSkip = new HeaderSkip(headerSkipLinkEl);\n }\n return headerSkip;\n}\n\nconst initResizeHandlers = (headerSkipLink: HeaderSkip) => {\n window.addEventListener('resize', debounce(() => {\n if (headerSkipLink) {\n headerSkipLink.init();\n }\n if (nav) {\n nav.setClearance();\n }\n }, 50));\n}\n\nconst initPdfDownloadBlock = () => {\n const pdfDownloadContainers = [].slice.call(document.querySelectorAll('[data-pdf-download-container]'));\n pdfDownloadContainers.forEach(container => {\n new PdfDownloadBlock(container);\n });\r\n}\n\ninitAll();"],"mappings":";AAAA;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;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;;;;;;;;;;;;;;;;ACvJA;AAEA;AAKA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AApCA;;;;;;;;;;;;;;;;ACFA;AAEA;AAWA;AAAA;AAFA;AA2CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AAEA;AACA;AACA;AACA;AAjGA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AA4DA;AAAA;AA9GA;;;;;;;;;;;;;;;ACFA;AACA;AACA;AAEA;AAEA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AAEA;;;;;;;;;;;;;;;;;;A","sourceRoot":""}