@nationalarchives/frontend 0.43.0 → 0.44.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/nationalarchives/all+analytics.js +1 -2
  2. package/nationalarchives/all+analytics.js.map +1 -1
  3. package/nationalarchives/all.css +1 -1
  4. package/nationalarchives/all.css.map +1 -1
  5. package/nationalarchives/all.js +1 -2
  6. package/nationalarchives/all.js.map +1 -1
  7. package/nationalarchives/analytics.js +1 -1
  8. package/nationalarchives/analytics.js.map +1 -1
  9. package/nationalarchives/components/accordion/accordion.js +1 -1
  10. package/nationalarchives/components/accordion/accordion.js.map +1 -1
  11. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  12. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  13. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +49 -43
  14. package/nationalarchives/components/code-block/code-block.js +1 -2
  15. package/nationalarchives/components/code-block/code-block.js.map +1 -1
  16. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  17. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  18. package/nationalarchives/components/date-input/date-input.js +1 -1
  19. package/nationalarchives/components/date-input/date-input.js.map +1 -1
  20. package/nationalarchives/components/error-summary/error-summary.js +1 -1
  21. package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
  22. package/nationalarchives/components/file-input/file-input.js +1 -1
  23. package/nationalarchives/components/file-input/file-input.js.map +1 -1
  24. package/nationalarchives/components/file-input/file-input.mjs +4 -0
  25. package/nationalarchives/components/footer/footer.js +1 -1
  26. package/nationalarchives/components/footer/footer.js.map +1 -1
  27. package/nationalarchives/components/footer/footer.mjs +6 -2
  28. package/nationalarchives/components/gallery/gallery.js +1 -1
  29. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  30. package/nationalarchives/components/global-header/global-header.js +1 -1
  31. package/nationalarchives/components/global-header/global-header.js.map +1 -1
  32. package/nationalarchives/components/header/header.js +1 -1
  33. package/nationalarchives/components/header/header.js.map +1 -1
  34. package/nationalarchives/components/hero/fixtures.json +42 -0
  35. package/nationalarchives/components/hero/hero.css +1 -1
  36. package/nationalarchives/components/hero/hero.css.map +1 -1
  37. package/nationalarchives/components/hero/hero.scss +10 -4
  38. package/nationalarchives/components/picture/picture.js +1 -1
  39. package/nationalarchives/components/picture/picture.js.map +1 -1
  40. package/nationalarchives/components/sidebar/sidebar.css +1 -1
  41. package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
  42. package/nationalarchives/components/sidebar/sidebar.js +1 -1
  43. package/nationalarchives/components/sidebar/sidebar.js.map +1 -1
  44. package/nationalarchives/components/sidebar/sidebar.mjs +13 -13
  45. package/nationalarchives/components/sidebar/sidebar.scss +18 -18
  46. package/nationalarchives/components/skip-link/skip-link.js +1 -1
  47. package/nationalarchives/components/skip-link/skip-link.js.map +1 -1
  48. package/nationalarchives/components/tabs/tabs.js +1 -1
  49. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  50. package/nationalarchives/components/text-input/text-input.js +1 -1
  51. package/nationalarchives/components/text-input/text-input.js.map +1 -1
  52. package/nationalarchives/components/textarea/textarea.js +1 -1
  53. package/nationalarchives/components/textarea/textarea.js.map +1 -1
  54. package/nationalarchives/components/textarea/textarea.mjs +6 -2
  55. package/nationalarchives/prototype-kit.css +1 -1
  56. package/nationalarchives/prototype-kit.css.map +1 -1
  57. package/package.json +3 -3
  58. package/nationalarchives/all+analytics.js.LICENSE.txt +0 -1
  59. package/nationalarchives/all.js.LICENSE.txt +0 -1
  60. package/nationalarchives/components/code-block/code-block.js.LICENSE.txt +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"components/footer/footer.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEA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AKmC,QAAQ/D,IAAI4B,EAAK2B,gBAAgB,GAEnEsB,GACFpJ,KAAK+I,0BAA0BK,EAEnC,CACKpJ,KAAKsI,QAAQgB,iBAAiB,aACjCtJ,KAAKiI,qBAAqBkB,gBAAgB,SAE9C,GAAC,CAAAhJ,IAAA,WAAAC,MAED,SAASmJ,GACP,GAAc,UAAVA,EACFvJ,KAAKmI,aAAaqB,UAAUC,OAC1B,6BACA,iCAEG,GAAc,SAAVF,EACTvJ,KAAKmI,aAAaqB,UAAUC,OAAO,8BACnCzJ,KAAKmI,aAAaqB,UAAUE,IAAG,gCAC1B,IAAc,WAAVH,EAIT,OAHAvJ,KAAKmI,aAAaqB,UAAUC,OAAO,4BACnCzJ,KAAKmI,aAAaqB,UAAUE,IAAG,6BAGjC,CACA1J,KAAKoI,aAAemB,EAChBvJ,KAAKsI,QAAQgB,iBAAiB,YAChCtJ,KAAKsI,QAAQpC,IAAIlG,KAAK8H,gBAAiB9H,KAAKoI,cAE5CpI,KAAKiI,qBAAqBkB,gBAAgB,SAE9C,GAAC,CAAAhJ,IAAA,4BAAAC,MAED,SAA0BuJ,GACxBnJ,MAAMiI,KAAKzI,KAAKuI,uBAAuBjH,QAAQ,SAACsH,GAC1CA,EAAQxI,QAAUuJ,EAAgBvJ,OACpCwI,EAAQY,UAAUC,OAAO,qBACzBb,EAAQM,aAAa,gBAAgB,KAErCN,EAAQY,UAAUE,IAAI,qBACtBd,EAAQO,gBAAgB,gBAE5B,EACF,mFAAC,CA/GgB","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/cookie-events.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","window.TNAFrontendCookieEvents ||= null;\n\nexport class CookieEventHandler {\n events = {};\n oneTimeEvents = {};\n debug = false;\n\n constructor(debug = false) {\n this.debug = debug;\n if (window.TNAFrontendCookieEvents) {\n this.log(\"Using existing TNAFrontendCookieEvents instance\");\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n log(...args) {\n if (this.debug) {\n /* eslint-disable-next-line no-console */\n console.log(\"[TNA Frontend Cookie Events]\", ...args);\n }\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n if (!Object.hasOwn(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n once(event, callback) {\n if (!Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event] = [];\n }\n this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.log(`Triggering event: ${event}`, data);\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n this.log(`Triggering one-time event: ${event}`, data);\n\n for (\n /* eslint-disable-next-line no-magic-numbers */\n let eventIndex = this.oneTimeEvents[event].length - 1;\n /* eslint-disable-next-line no-magic-numbers */\n eventIndex >= 0;\n /* eslint-disable-next-line no-magic-numbers */\n eventIndex -= 1\n ) {\n const eventToTrigger = this.oneTimeEvents[event][eventIndex];\n eventToTrigger.call(this, data);\n /* eslint-disable-next-line no-magic-numbers */\n this.oneTimeEvents[event].splice(eventIndex, 1);\n }\n }\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable no-console */\n\nimport { CookieEventHandler } from \"./cookie-events.mjs\";\n\nwindow.TNAFrontendCookies ||= null;\n\nconst tnaCookiePolicies = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n policiesCorrectOnInit = false;\n /** @protected */\n debug = document.documentElement.dataset.tnaFrontendDebug === \"true\";\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.policiesKey] - The name of the cookie.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie policy.\n */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n policiesKey,\n defaultAge,\n newInstance = false,\n noInit = false,\n } = options;\n if (!newInstance && window.TNAFrontendCookies) {\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookies;\n }\n if (defaultDomain) {\n this.defaultDomain = defaultDomain;\n } else {\n this.defaultDomain =\n document.documentElement.dataset.tnaCookiesDomain ||\n window.location.hostname;\n }\n if (defaultPath) {\n this.defaultPath = defaultPath;\n } else {\n this.defaultPath = document.documentElement.dataset.tnaCookiesPath || \"/\";\n }\n if (secure) {\n this.secure = secure;\n } else {\n this.secure =\n document.documentElement.dataset.tnaCookiesInsecure !== \"true\";\n }\n if (policiesKey) {\n this.policiesKey = policiesKey;\n } else {\n this.policiesKey =\n document.documentElement.dataset.tnaCookiesPoliciesKey ||\n \"cookies_policy\";\n }\n if (defaultAge) {\n this.defaultAge = defaultAge;\n } else {\n /* eslint-disable-next-line no-magic-numbers */\n const secondsInAYear = 365 * 24 * 60 * 60;\n this.defaultAge =\n parseInt(document.documentElement.dataset.tnaCookiesDefaultAge, 10) ||\n secondsInAYear;\n }\n this.events = new CookieEventHandler(this.debug);\n this.policiesCorrectOnInit =\n Object.keys(this.policies).length === tnaCookiePolicies.length &&\n tnaCookiePolicies.every(\n (policy) =>\n Object.keys(this.policies).includes(policy) &&\n typeof this.policies[policy] === \"boolean\",\n );\n if (!this.policiesCorrectOnInit && !noInit) {\n this.init();\n }\n this.log({\n defaultDomain: this.defaultDomain,\n defaultPath: this.defaultPath,\n secure: this.secure,\n policiesKey: this.policiesKey,\n defaultAge: this.defaultAge,\n policiesCorrectOnInit: this.policiesCorrectOnInit,\n });\n if (!newInstance && !window.TNAFrontendCookies) {\n window.TNAFrontendCookies = this;\n }\n }\n\n /** @protected */\n init() {\n const existingPolicies = this.policies;\n this.log(\"Existing policies on init:\", existingPolicies);\n const filteredExistingPolicies = Object.fromEntries(\n Object.keys(existingPolicies)\n .filter((policy) => tnaCookiePolicies.includes(policy))\n .map((policy) => [policy, existingPolicies[policy]]),\n );\n if (Object.keys(filteredExistingPolicies).length) {\n this.log(\"Filtered existing policies:\", filteredExistingPolicies);\n }\n this.savePolicies({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPolicies,\n essential: true,\n });\n }\n\n log(...args) {\n if (this.debug) {\n console.log(\"[TNA Frontend Cookies]\", ...args, this.all);\n }\n }\n\n destroyInstance() {\n this.log(\"Destroying TNAFrontendCookies instance\");\n window.TNAFrontendCookies = null;\n }\n\n /** @protected */\n /* eslint-disable-next-line class-methods-use-this */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((cookie) => cookie.trim() !== \"\")\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n const [key, value] = parts;\n if (key) {\n deserialised[key] = decodeURIComponent(value || \"\");\n }\n });\n return deserialised;\n }\n\n /** @protected */\n get policies() {\n try {\n return JSON.parse(this.get(this.policiesKey) || \"{}\");\n // eslint-disable-next-line no-unused-vars\n } catch (error) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) === value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean|null}\n */\n get(key) {\n if (this.exists(key)) {\n return decodeURIComponent(this.all[key]);\n }\n return null;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n let secureString = \"\";\n if (secure) {\n secureString = \"; secure\";\n }\n let sessionString = \"\";\n if (!session) {\n sessionString = `; max-age=${maxAge}`;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}; domain=${domain}; samesite=${sameSite}; path=${path}${sessionString}${secureString}`;\n document.cookie = cookie;\n this.log(\"Set cookie:\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = this.defaultDomain) {\n const options = { maxAge: -1, path, domain: domain || this.defaultDomain };\n this.set(key, \"\", options);\n this.log(\"Deleted cookie:\", { key, path, domain, ...options });\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = this.defaultDomain) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n this.log(\"Deleted all cookies\", { path, domain });\n this.events.trigger(\"deleteAllCookies\", { path, domain });\n }\n\n /**\n * Accept a policy.\n * @param {String} policy - The name of the policy.\n */\n acceptPolicy(policy) {\n this.log(\"Accepting policy:\", policy);\n this.setPolicy(policy, true);\n this.events.trigger(\"acceptPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: true });\n }\n\n /**\n * Reject a policy.\n * @param {String} policy - The name of the policy.\n */\n rejectPolicy(policy) {\n this.log(\"Rejecting policy:\", policy);\n this.setPolicy(policy, false);\n this.events.trigger(\"rejectPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: false });\n }\n\n /**\n * Set a policy.\n * @param {String} policy - The name of the policy.\n * @param {Boolean} accepted - Whether the policy is accepted or not.\n */\n setPolicy(policy, accepted) {\n if (policy === \"essential\") {\n this.log(\"Cannot change essential policy, it is always accepted.\");\n return;\n }\n this.log(`Setting policy ${policy} to ${accepted}`);\n this.savePolicies({\n ...this.policies,\n [policy]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePolicy\", { [policy]: accepted });\n }\n\n /**\n * Accept all the cookie policies.\n */\n acceptAllPolicies() {\n this.log(\"Accepting all policies\");\n const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((key) => [key.toLowerCase(), true]),\n );\n this.savePolicies(allPolicies);\n this.events.trigger(\"acceptAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Reject all the cookie policies.\n */\n rejectAllPolicies() {\n this.log(\"Rejecting all policies\");\n const allPolicies = {\n ...Object.fromEntries(\n Object.keys(this.policies).map((key) => [key.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePolicies(allPolicies);\n this.events.trigger(\"rejectAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Commit policy preferences to the browser.\n * @param {object} policies - The policies to commit.\n */\n savePolicies(policies) {\n this.log(\"Saving policies:\", policies);\n this.set(this.policiesKey, JSON.stringify(policies));\n }\n\n /**\n * Get the acceptance status of a policy.\n * @param {String} policy - The name of the policy.\n * @returns {Boolean}\n */\n isPolicyAccepted(policy) {\n if (Object.hasOwn(this.policies, policy)) {\n return this.policies[policy] === true;\n }\n return null;\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.log(`Adding event listener for: ${event}`);\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.log(`Adding one-time event listener for: ${event}`);\n this.events.once(event, callback);\n }\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","// 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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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};","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class Footer {\n constructor($module, themeCookieName = \"theme\") {\n this.$module = $module;\n this.$themeSelector =\n $module && $module.querySelector(\".tna-footer__theme-selector\");\n this.$themeSelectorNotice =\n $module && $module.querySelector(\".tna-footer__theme-selector-notice\");\n this.$themeSelectorEnableSettingsCookiesButton =\n this.$themeSelectorNotice &&\n this.$themeSelectorNotice.querySelector(\n \".tna-footer__theme-selector-enable-settings-cookies\",\n );\n this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n if (\n !this.$module ||\n !this.$themeSelector ||\n !this.$themeSelectorNotice ||\n !this.$themeSelectorEnableSettingsCookiesButton ||\n !this.$tnaTemplate\n ) {\n return;\n }\n\n this.currentTheme = this.$themeSelector.dataset.themeOnLoad;\n\n this.themeCookieName = themeCookieName;\n\n this.cookies = new Cookies();\n\n this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n \"button.tna-footer__theme-selector-button[value]\",\n );\n\n Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n $themeSelectorButton.addEventListener(\"click\", (event) => {\n const $button = event.target;\n this.setTheme($button.value);\n this.selectThemeSelectorButton($button);\n });\n });\n\n this.$themeSelectorEnableSettingsCookiesButton.addEventListener(\n \"click\",\n () => {\n this.cookies.acceptPolicy(\"settings\");\n },\n );\n\n this.showThemeSelector();\n this.cookies.on(\"changePolicy\", (data) => {\n if (Object.hasOwn(data, \"settings\")) {\n if (data.settings === true) {\n this.cookies.set(this.themeCookieName, this.currentTheme);\n this.$themeSelectorNotice.setAttribute(\"hidden\", \"\");\n } else {\n this.cookies.delete(this.themeCookieName);\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n });\n }\n\n showThemeSelector() {\n this.$themeSelector.removeAttribute(\"hidden\");\n if (this.cookies.exists(this.themeCookieName)) {\n const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n ($button) => $button.value === this.cookies.get(this.themeCookieName),\n );\n if ($currentThemeButton) {\n this.selectThemeSelectorButton($currentThemeButton);\n }\n }\n if (!this.cookies.isPolicyAccepted(\"settings\")) {\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n\n setTheme(theme) {\n if (theme === \"light\") {\n this.$tnaTemplate.classList.remove(\n \"tna-template--system-theme\",\n \"tna-template--dark-theme\",\n );\n } else if (theme === \"dark\") {\n this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n } else if (theme === \"system\") {\n this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n } else {\n return;\n }\n this.currentTheme = theme;\n if (this.cookies.isPolicyAccepted(\"settings\")) {\n this.cookies.set(this.themeCookieName, this.currentTheme);\n } else {\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n\n selectThemeSelectorButton($selectedButton) {\n Array.from(this.$themeSelectorButtons).forEach(($button) => {\n if ($button.value === $selectedButton.value) {\n $button.classList.remove(\"tna-button--plain\");\n $button.setAttribute(\"aria-current\", true);\n } else {\n $button.classList.add(\"tna-button--plain\");\n $button.removeAttribute(\"aria-current\");\n }\n });\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","_window","window","TNAFrontendCookieEvents","CookieEventHandler","debug","arguments","length","undefined","_classCallCheck","this","_defineProperty","log","key","value","_console","_len","args","Array","_key","console","apply","concat","event","callback","Object","hasOwn","events","_toConsumableArray","oneTimeEvents","_this","data","forEach","eventToTrigger","call","eventIndex","splice","TNAFrontendCookies","tnaCookiePolicies","Cookies","options","document","documentElement","dataset","tnaFrontendDebug","defaultDomain","defaultPath","secure","policiesKey","defaultAge","_options$newInstance","newInstance","_options$noInit","noInit","tnaCookiesDomain","location","hostname","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPoliciesKey","parseInt","tnaCookiesDefaultAge","policiesCorrectOnInit","keys","policies","every","policy","includes","init","existingPolicies","filteredExistingPolicies","fromEntries","filter","map","savePolicies","_objectSpread","usage","settings","marketing","essential","all","get","deserialised","cookie","split","trim","_parts","_slicedToArray","decodeURIComponent","JSON","parse","error","exists","_options$maxAge","maxAge","_options$sameSite","sameSite","_options$domain","domain","_options$path","path","_options$secure","_options$session","session","secureString","sessionString","encodeURIComponent","trigger","set","_this2","setPolicy","accepted","allPolicies","toLowerCase","stringify","on","once","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","Footer","$module","themeCookieName","$themeSelector","querySelector","$themeSelectorNotice","$themeSelectorEnableSettingsCookiesButton","$tnaTemplate","currentTheme","themeOnLoad","cookies","$themeSelectorButtons","querySelectorAll","from","$themeSelectorButton","addEventListener","$button","target","setTheme","selectThemeSelectorButton","acceptPolicy","showThemeSelector","setAttribute","removeAttribute","$currentThemeButton","find","isPolicyAccepted","theme","classList","remove","add","$selectedButton"],"sourceRoot":""}
1
+ {"version":3,"file":"components/footer/footer.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAA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9I,KAAKyH,aAAasB,UAAUC,OAAO,8BACnChJ,KAAKyH,aAAasB,UAAUE,IAAI,gCAC3B,IAAc,WAAVH,EAIT,OAHA9I,KAAKyH,aAAasB,UAAUC,OAAO,4BACnChJ,KAAKyH,aAAasB,UAAUE,IAAI,6BAGlC,CACAjJ,KAAK0H,aAAeoB,EAChB9I,KAAK4H,QAAQ7B,iBAAiB,YAChC/F,KAAK4H,QAAQjD,IAAI3E,KAAKoH,gBAAiBpH,KAAK0H,cAE5C1H,KAAKuH,qBAAqBoB,gBAAgB,SAE9C,CAEA,yBAAAH,CAA0BU,GACxBjB,MAAMC,KAAKlI,KAAK+H,uBAAuBnH,QAASyH,IAC1CA,EAAQlE,QAAU+E,EAAgB/E,OACpCkE,EAAQU,UAAUC,OAAO,qBACzBX,EAAQK,aAAa,gBAAgB,KAErCL,EAAQU,UAAUE,IAAI,qBACtBZ,EAAQM,gBAAgB,kBAG9B","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/cookie-events.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","window.TNAFrontendCookieEvents ||= null;\n\nexport class CookieEventHandler {\n events = {};\n oneTimeEvents = {};\n debug = false;\n\n constructor(debug = false) {\n this.debug = debug;\n if (window.TNAFrontendCookieEvents) {\n this.log(\"Using existing TNAFrontendCookieEvents instance\");\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n log(...args) {\n if (this.debug) {\n /* eslint-disable-next-line no-console */\n console.log(\"[TNA Frontend Cookie Events]\", ...args);\n }\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n if (!Object.hasOwn(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n once(event, callback) {\n if (!Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event] = [];\n }\n this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.log(`Triggering event: ${event}`, data);\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n this.log(`Triggering one-time event: ${event}`, data);\n\n for (\n /* eslint-disable-next-line no-magic-numbers */\n let eventIndex = this.oneTimeEvents[event].length - 1;\n /* eslint-disable-next-line no-magic-numbers */\n eventIndex >= 0;\n /* eslint-disable-next-line no-magic-numbers */\n eventIndex -= 1\n ) {\n const eventToTrigger = this.oneTimeEvents[event][eventIndex];\n eventToTrigger.call(this, data);\n /* eslint-disable-next-line no-magic-numbers */\n this.oneTimeEvents[event].splice(eventIndex, 1);\n }\n }\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable no-console */\n\nimport { CookieEventHandler } from \"./cookie-events.mjs\";\n\nwindow.TNAFrontendCookies ||= null;\n\nconst tnaCookiePolicies = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n policiesCorrectOnInit = false;\n /** @protected */\n debug = document.documentElement.dataset.tnaFrontendDebug === \"true\";\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.policiesKey] - The name of the cookie.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie policy.\n */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n policiesKey,\n defaultAge,\n newInstance = false,\n noInit = false,\n } = options;\n if (!newInstance && window.TNAFrontendCookies) {\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookies;\n }\n if (defaultDomain) {\n this.defaultDomain = defaultDomain;\n } else {\n this.defaultDomain =\n document.documentElement.dataset.tnaCookiesDomain ||\n window.location.hostname;\n }\n if (defaultPath) {\n this.defaultPath = defaultPath;\n } else {\n this.defaultPath = document.documentElement.dataset.tnaCookiesPath || \"/\";\n }\n if (secure) {\n this.secure = secure;\n } else {\n this.secure =\n document.documentElement.dataset.tnaCookiesInsecure !== \"true\";\n }\n if (policiesKey) {\n this.policiesKey = policiesKey;\n } else {\n this.policiesKey =\n document.documentElement.dataset.tnaCookiesPoliciesKey ||\n \"cookies_policy\";\n }\n if (defaultAge) {\n this.defaultAge = defaultAge;\n } else {\n /* eslint-disable-next-line no-magic-numbers */\n const secondsInAYear = 365 * 24 * 60 * 60;\n this.defaultAge =\n parseInt(document.documentElement.dataset.tnaCookiesDefaultAge, 10) ||\n secondsInAYear;\n }\n this.events = new CookieEventHandler(this.debug);\n this.policiesCorrectOnInit =\n Object.keys(this.policies).length === tnaCookiePolicies.length &&\n tnaCookiePolicies.every(\n (policy) =>\n Object.keys(this.policies).includes(policy) &&\n typeof this.policies[policy] === \"boolean\",\n );\n if (!this.policiesCorrectOnInit && !noInit) {\n this.init();\n }\n this.log({\n defaultDomain: this.defaultDomain,\n defaultPath: this.defaultPath,\n secure: this.secure,\n policiesKey: this.policiesKey,\n defaultAge: this.defaultAge,\n policiesCorrectOnInit: this.policiesCorrectOnInit,\n });\n if (!newInstance && !window.TNAFrontendCookies) {\n window.TNAFrontendCookies = this;\n }\n }\n\n /** @protected */\n init() {\n const existingPolicies = this.policies;\n this.log(\"Existing policies on init:\", existingPolicies);\n const filteredExistingPolicies = Object.fromEntries(\n Object.keys(existingPolicies)\n .filter((policy) => tnaCookiePolicies.includes(policy))\n .map((policy) => [policy, existingPolicies[policy]]),\n );\n if (Object.keys(filteredExistingPolicies).length) {\n this.log(\"Filtered existing policies:\", filteredExistingPolicies);\n }\n this.savePolicies({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPolicies,\n essential: true,\n });\n }\n\n log(...args) {\n if (this.debug) {\n console.log(\"[TNA Frontend Cookies]\", ...args, this.all);\n }\n }\n\n destroyInstance() {\n this.log(\"Destroying TNAFrontendCookies instance\");\n window.TNAFrontendCookies = null;\n }\n\n /** @protected */\n /* eslint-disable-next-line class-methods-use-this */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((cookie) => cookie.trim() !== \"\")\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n const [key, value] = parts;\n if (key) {\n deserialised[key] = decodeURIComponent(value || \"\");\n }\n });\n return deserialised;\n }\n\n /** @protected */\n get policies() {\n try {\n return JSON.parse(this.get(this.policiesKey) || \"{}\");\n // eslint-disable-next-line no-unused-vars\n } catch (error) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) === value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean|null}\n */\n get(key) {\n if (this.exists(key)) {\n return decodeURIComponent(this.all[key]);\n }\n return null;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n let secureString = \"\";\n if (secure) {\n secureString = \"; secure\";\n }\n let sessionString = \"\";\n if (!session) {\n sessionString = `; max-age=${maxAge}`;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}; domain=${domain}; samesite=${sameSite}; path=${path}${sessionString}${secureString}`;\n document.cookie = cookie;\n this.log(\"Set cookie:\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = this.defaultDomain) {\n const options = { maxAge: -1, path, domain: domain || this.defaultDomain };\n this.set(key, \"\", options);\n this.log(\"Deleted cookie:\", { key, path, domain, ...options });\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = this.defaultDomain) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n this.log(\"Deleted all cookies\", { path, domain });\n this.events.trigger(\"deleteAllCookies\", { path, domain });\n }\n\n /**\n * Accept a policy.\n * @param {String} policy - The name of the policy.\n */\n acceptPolicy(policy) {\n this.log(\"Accepting policy:\", policy);\n this.setPolicy(policy, true);\n this.events.trigger(\"acceptPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: true });\n }\n\n /**\n * Reject a policy.\n * @param {String} policy - The name of the policy.\n */\n rejectPolicy(policy) {\n this.log(\"Rejecting policy:\", policy);\n this.setPolicy(policy, false);\n this.events.trigger(\"rejectPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: false });\n }\n\n /**\n * Set a policy.\n * @param {String} policy - The name of the policy.\n * @param {Boolean} accepted - Whether the policy is accepted or not.\n */\n setPolicy(policy, accepted) {\n if (policy === \"essential\") {\n this.log(\"Cannot change essential policy, it is always accepted.\");\n return;\n }\n this.log(`Setting policy ${policy} to ${accepted}`);\n this.savePolicies({\n ...this.policies,\n [policy]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePolicy\", { [policy]: accepted });\n }\n\n /**\n * Accept all the cookie policies.\n */\n acceptAllPolicies() {\n this.log(\"Accepting all policies\");\n const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((key) => [key.toLowerCase(), true]),\n );\n this.savePolicies(allPolicies);\n this.events.trigger(\"acceptAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Reject all the cookie policies.\n */\n rejectAllPolicies() {\n this.log(\"Rejecting all policies\");\n const allPolicies = {\n ...Object.fromEntries(\n Object.keys(this.policies).map((key) => [key.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePolicies(allPolicies);\n this.events.trigger(\"rejectAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Commit policy preferences to the browser.\n * @param {object} policies - The policies to commit.\n */\n savePolicies(policies) {\n this.log(\"Saving policies:\", policies);\n this.set(this.policiesKey, JSON.stringify(policies));\n }\n\n /**\n * Get the acceptance status of a policy.\n * @param {String} policy - The name of the policy.\n * @returns {Boolean}\n */\n isPolicyAccepted(policy) {\n if (Object.hasOwn(this.policies, policy)) {\n return this.policies[policy] === true;\n }\n return null;\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.log(`Adding event listener for: ${event}`);\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.log(`Adding one-time event listener for: ${event}`);\n this.events.once(event, callback);\n }\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","// 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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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};","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class Footer {\n constructor($module, themeCookieName = \"theme\") {\n this.$module = $module;\n this.$themeSelector =\n $module && $module.querySelector(\".tna-footer__theme-selector\");\n this.$themeSelectorNotice =\n $module && $module.querySelector(\".tna-footer__theme-selector-notice\");\n this.$themeSelectorEnableSettingsCookiesButton =\n this.$themeSelectorNotice &&\n this.$themeSelectorNotice.querySelector(\n \".tna-footer__theme-selector-enable-settings-cookies\",\n );\n this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n if (\n !this.$module ||\n !this.$themeSelector ||\n !this.$themeSelectorNotice ||\n !this.$themeSelectorEnableSettingsCookiesButton ||\n !this.$tnaTemplate\n ) {\n return;\n }\n\n this.themeCookieName = themeCookieName;\n\n this.init();\n }\n\n init() {\n this.currentTheme = this.$themeSelector.dataset.themeOnLoad;\n\n this.cookies = new Cookies();\n\n this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n \"button.tna-footer__theme-selector-button[value]\",\n );\n\n Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n $themeSelectorButton.addEventListener(\"click\", (event) => {\n const $button = event.target;\n this.setTheme($button.value);\n this.selectThemeSelectorButton($button);\n });\n });\n\n this.$themeSelectorEnableSettingsCookiesButton.addEventListener(\n \"click\",\n () => {\n this.cookies.acceptPolicy(\"settings\");\n },\n );\n\n this.showThemeSelector();\n this.cookies.on(\"changePolicy\", (data) => {\n if (Object.hasOwn(data, \"settings\")) {\n if (data.settings === true) {\n this.cookies.set(this.themeCookieName, this.currentTheme);\n this.$themeSelectorNotice.setAttribute(\"hidden\", \"\");\n } else {\n this.cookies.delete(this.themeCookieName);\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n });\n }\n\n showThemeSelector() {\n this.$themeSelector.removeAttribute(\"hidden\");\n if (this.cookies.exists(this.themeCookieName)) {\n const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n ($button) => $button.value === this.cookies.get(this.themeCookieName),\n );\n if ($currentThemeButton) {\n this.selectThemeSelectorButton($currentThemeButton);\n }\n }\n if (!this.cookies.isPolicyAccepted(\"settings\")) {\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n\n setTheme(theme) {\n if (theme === \"light\") {\n this.$tnaTemplate.classList.remove(\n \"tna-template--system-theme\",\n \"tna-template--dark-theme\",\n );\n } else if (theme === \"dark\") {\n this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n } else if (theme === \"system\") {\n this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n } else {\n return;\n }\n this.currentTheme = theme;\n if (this.cookies.isPolicyAccepted(\"settings\")) {\n this.cookies.set(this.themeCookieName, this.currentTheme);\n } else {\n this.$themeSelectorNotice.removeAttribute(\"hidden\");\n }\n }\n\n selectThemeSelectorButton($selectedButton) {\n Array.from(this.$themeSelectorButtons).forEach(($button) => {\n if ($button.value === $selectedButton.value) {\n $button.classList.remove(\"tna-button--plain\");\n $button.setAttribute(\"aria-current\", true);\n } else {\n $button.classList.add(\"tna-button--plain\");\n $button.removeAttribute(\"aria-current\");\n }\n });\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","window","TNAFrontendCookieEvents","CookieEventHandler","events","oneTimeEvents","debug","constructor","this","log","args","console","on","event","callback","Object","hasOwn","once","trigger","data","forEach","eventToTrigger","call","eventIndex","length","splice","TNAFrontendCookies","tnaCookiePolicies","Cookies","defaultDomain","defaultPath","secure","policiesKey","defaultAge","policiesCorrectOnInit","document","documentElement","dataset","tnaFrontendDebug","options","newInstance","noInit","tnaCookiesDomain","location","hostname","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPoliciesKey","secondsInAYear","parseInt","tnaCookiesDefaultAge","keys","policies","every","policy","includes","init","existingPolicies","filteredExistingPolicies","fromEntries","filter","map","savePolicies","usage","settings","marketing","essential","all","destroyInstance","deserialised","cookie","split","trim","parts","key","value","decodeURIComponent","JSON","parse","get","error","exists","hasValue","set","maxAge","sameSite","domain","path","session","secureString","sessionString","encodeURIComponent","deleteAll","delete","acceptPolicy","setPolicy","rejectPolicy","accepted","acceptAllPolicies","allPolicies","toLowerCase","rejectAllPolicies","stringify","isPolicyAccepted","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","Footer","$module","themeCookieName","$themeSelector","querySelector","$themeSelectorNotice","$themeSelectorEnableSettingsCookiesButton","$tnaTemplate","currentTheme","themeOnLoad","cookies","_lib_cookies_mjs__WEBPACK_IMPORTED_MODULE_0__","A","$themeSelectorButtons","querySelectorAll","Array","from","$themeSelectorButton","addEventListener","$button","target","setTheme","selectThemeSelectorButton","showThemeSelector","setAttribute","removeAttribute","$currentThemeButton","find","theme","classList","remove","add","$selectedButton"],"sourceRoot":""}
@@ -24,10 +24,14 @@ export class Footer {
24
24
  return;
25
25
  }
26
26
 
27
- this.currentTheme = this.$themeSelector.dataset.themeOnLoad;
28
-
29
27
  this.themeCookieName = themeCookieName;
30
28
 
29
+ this.init();
30
+ }
31
+
32
+ init() {
33
+ this.currentTheme = this.$themeSelector.dataset.themeOnLoad;
34
+
31
35
  this.cookies = new Cookies();
32
36
 
33
37
  this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Gallery:()=>o});var o=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$itemsContainer=e&&e.querySelector(".tna-gallery__items"),this.$items=this.$itemsContainer&&this.$itemsContainer.querySelectorAll(".tna-gallery__item"),this.$navigation=e&&e.querySelector(".tna-gallery__navigation"),this.$navigationItems=this.$navigation&&e.querySelectorAll(".tna-gallery__navigation-item"),this.$navigationButtons=e&&e.querySelector(".tna-gallery__navigation-buttons"),this.$module&&this.$itemsContainer&&this.$items&&!(this.$items.length<2)&&this.$navigation&&this.$navigationItems&&this.$navigationButtons&&(this.$module.classList.add("tna-gallery--interactive"),this.$navigationButtonPrev=this.$navigationButtons.querySelector(".tna-gallery__navigation-prev"),this.$navigationButtonNext=this.$navigationButtons.querySelector(".tna-gallery__navigation-next"),this.setup(),this.currentId=this.$items[0].id,this.showItem(this.currentId))},(e=[{key:"setup",value:function(){var t,e,i,n=this;this.$items.forEach(function(t){var e;t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"),null===(e=t.querySelector(".tna-gallery__item-header"))||void 0===e||e.setAttribute("aria-hidden","true")}),this.$navigation.removeAttribute("hidden"),this.$navigationItems.forEach(function(t){t.addEventListener("click",function(){n.showItem(t.getAttribute("aria-controls")),n.$itemsContainer.setAttribute("tabindex","0"),n.$itemsContainer.focus()})}),this.$module.addEventListener("keydown",function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":n.showPreviousItem(),e=!0;break;case"ArrowRight":case"ArrowDown":n.showNextItem(),e=!0;break;case"Home":n.showFirstItem(),e=!0;break;case"End":n.showLastItem(),e=!0}e&&(t.stopPropagation(),t.preventDefault())}),null===(t=this.$navigationButtons)||void 0===t||t.removeAttribute("hidden"),null===(e=this.$navigationButtonPrev)||void 0===e||e.addEventListener("click",function(){n.showPreviousItem()}),null===(i=this.$navigationButtonNext)||void 0===i||i.addEventListener("click",function(){n.showNextItem()}),this.$liveRegion=document.createElement("div"),this.$liveRegion.setAttribute("aria-live","polite"),this.$liveRegion.setAttribute("aria-atomic","true"),this.$liveRegion.setAttribute("class","tna-gallery__item-header"),this.$itemsContainer.prepend(this.$liveRegion),this.$itemsContainer.classList.add("tna-gallery__items--hide-item-titles"),this.$itemsContainer.addEventListener("blur",function(){return n.$itemsContainer.removeAttribute("tabindex")})}},{key:"showItem",value:function(t){this.$items.forEach(function(e){t&&e.id===t?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))}),this.$navigationItems.forEach(function(e){t&&e.getAttribute("aria-controls")===t?e.setAttribute("aria-current","true"):e.setAttribute("aria-current","false")}),this.currentId=t,this.$liveRegion.textContent="Image ".concat(this.getCurrentItemIndex()+1," of ").concat(this.$items.length)}},{key:"getCurrentItemIndex",value:function(){var t=this;return Array.from(this.$items).findIndex(function(e){return e.id===t.currentId})}},{key:"showPreviousItem",value:function(){var t=this.getCurrentItemIndex()-1;t<0&&(t=this.$items.length-1),this.showItem(this.$items[t].id)}},{key:"showNextItem",value:function(){var t=this.getCurrentItemIndex()+1;t>=this.$items.length&&(t=0),this.showItem(this.$items[t].id)}},{key:"showFirstItem",value:function(){this.showItem(this.$items[0].id)}},{key:"showLastItem",value:function(){this.showItem(this.$items[this.$items.length-1].id)}}])&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var s in i)t.o(i,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:i[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Gallery:()=>i});class i{constructor(t){this.$module=t,this.$itemsContainer=t&&t.querySelector(".tna-gallery__items"),this.$items=this.$itemsContainer&&this.$itemsContainer.querySelectorAll(".tna-gallery__item"),this.$navigation=t&&t.querySelector(".tna-gallery__navigation"),this.$navigationItems=this.$navigation&&t.querySelectorAll(".tna-gallery__navigation-item"),this.$navigationButtons=t&&t.querySelector(".tna-gallery__navigation-buttons"),this.$module&&this.$itemsContainer&&this.$items&&!(this.$items.length<2)&&this.$navigation&&this.$navigationItems&&this.$navigationButtons&&(this.$module.classList.add("tna-gallery--interactive"),this.$navigationButtonPrev=this.$navigationButtons.querySelector(".tna-gallery__navigation-prev"),this.$navigationButtonNext=this.$navigationButtons.querySelector(".tna-gallery__navigation-next"),this.setup(),this.currentId=this.$items[0].id,this.showItem(this.currentId))}setup(){this.$items.forEach(t=>{t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"),t.querySelector(".tna-gallery__item-header")?.setAttribute("aria-hidden","true")}),this.$navigation.removeAttribute("hidden"),this.$navigationItems.forEach(t=>{t.addEventListener("click",()=>{this.showItem(t.getAttribute("aria-controls")),this.$itemsContainer.setAttribute("tabindex","0"),this.$itemsContainer.focus()})}),this.$module.addEventListener("keydown",t=>{let e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":this.showPreviousItem(),e=!0;break;case"ArrowRight":case"ArrowDown":this.showNextItem(),e=!0;break;case"Home":this.showFirstItem(),e=!0;break;case"End":this.showLastItem(),e=!0}e&&(t.stopPropagation(),t.preventDefault())}),this.$navigationButtons?.removeAttribute("hidden"),this.$navigationButtonPrev?.addEventListener("click",()=>{this.showPreviousItem()}),this.$navigationButtonNext?.addEventListener("click",()=>{this.showNextItem()}),this.$liveRegion=document.createElement("div"),this.$liveRegion.setAttribute("aria-live","polite"),this.$liveRegion.setAttribute("aria-atomic","true"),this.$liveRegion.setAttribute("class","tna-gallery__item-header"),this.$itemsContainer.prepend(this.$liveRegion),this.$itemsContainer.classList.add("tna-gallery__items--hide-item-titles"),this.$itemsContainer.addEventListener("blur",()=>this.$itemsContainer.removeAttribute("tabindex"))}showItem(t){this.$items.forEach(e=>{t&&e.id===t?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))}),this.$navigationItems.forEach(e=>{t&&e.getAttribute("aria-controls")===t?e.setAttribute("aria-current","true"):e.setAttribute("aria-current","false")}),this.currentId=t,this.$liveRegion.textContent=`Image ${this.getCurrentItemIndex()+1} of ${this.$items.length}`}getCurrentItemIndex(){return Array.from(this.$items).findIndex(t=>t.id===this.currentId)}showPreviousItem(){let t=this.getCurrentItemIndex()-1;t<0&&(t=this.$items.length-1),this.showItem(this.$items[t].id)}showNextItem(){let t=this.getCurrentItemIndex()+1;t>=this.$items.length&&(t=0),this.showItem(this.$items[t].id)}showFirstItem(){this.showItem(this.$items[0].id)}showLastItem(){this.showItem(this.$items[this.$items.length-1].id)}}return e})());
2
2
  //# sourceMappingURL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kB,GAEpBhD,KAAKgB,SAAShB,KAAKG,OAAO6C,GAAiBjC,GAC7C,GAAC,CAAAhC,IAAA,gBAAAa,MAED,WAEEI,KAAKgB,SAAShB,KAAKG,OAAO,GAAGY,GAC/B,GAAC,CAAAhC,IAAA,eAAAa,MAED,WAEEI,KAAKgB,SAAShB,KAAKG,OAAOH,KAAKG,OAAOK,OAAS,GAAGO,GACpD,mFAAC,CA1KiB","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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};","export class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$itemsContainer =\n $module && $module.querySelector(\".tna-gallery__items\");\n this.$items =\n this.$itemsContainer &&\n this.$itemsContainer.querySelectorAll(\".tna-gallery__item\");\n this.$navigation =\n $module && $module.querySelector(\".tna-gallery__navigation\");\n this.$navigationItems =\n this.$navigation &&\n $module.querySelectorAll(\".tna-gallery__navigation-item\");\n this.$navigationButtons =\n $module && $module.querySelector(\".tna-gallery__navigation-buttons\");\n\n if (\n !this.$module ||\n !this.$itemsContainer ||\n !this.$items ||\n /* eslint-disable-next-line no-magic-numbers */\n this.$items.length < 2 ||\n !this.$navigation ||\n !this.$navigationItems ||\n !this.$navigationButtons\n ) {\n return;\n }\n\n this.$module.classList.add(\"tna-gallery--interactive\");\n\n this.$navigationButtonPrev = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-prev\",\n );\n this.$navigationButtonNext = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-next\",\n );\n\n this.setup();\n /* eslint-disable-next-line no-magic-numbers */\n this.currentId = this.$items[0].id;\n this.showItem(this.currentId);\n }\n\n setup() {\n this.$items.forEach(($item) => {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n $item\n .querySelector(\".tna-gallery__item-header\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n });\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigationItems.forEach(($item) => {\n $item.addEventListener(\"click\", () => {\n this.showItem($item.getAttribute(\"aria-controls\"));\n this.$itemsContainer.setAttribute(\"tabindex\", \"0\");\n this.$itemsContainer.focus();\n });\n });\n this.$module.addEventListener(\"keydown\", (event) => {\n let preventDefaultKeyAction = false;\n switch (event.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.showPreviousItem();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.showNextItem();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.showFirstItem();\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.showLastItem();\n preventDefaultKeyAction = true;\n break;\n default:\n break;\n }\n if (preventDefaultKeyAction) {\n event.stopPropagation();\n event.preventDefault();\n }\n });\n\n this.$navigationButtons?.removeAttribute(\"hidden\");\n this.$navigationButtonPrev?.addEventListener(\"click\", () => {\n this.showPreviousItem();\n });\n this.$navigationButtonNext?.addEventListener(\"click\", () => {\n this.showNextItem();\n });\n\n this.$liveRegion = document.createElement(\"div\");\n this.$liveRegion.setAttribute(\"aria-live\", \"polite\");\n this.$liveRegion.setAttribute(\"aria-atomic\", \"true\");\n this.$liveRegion.setAttribute(\"class\", \"tna-gallery__item-header\");\n this.$itemsContainer.prepend(this.$liveRegion);\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-item-titles\");\n this.$itemsContainer.addEventListener(\"blur\", () =>\n this.$itemsContainer.removeAttribute(\"tabindex\"),\n );\n }\n\n showItem(id) {\n this.$items.forEach(($item) => {\n if (id && $item.id === id) {\n $item.removeAttribute(\"hidden\");\n $item.removeAttribute(\"aria-hidden\");\n } else {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n }\n });\n this.$navigationItems.forEach(($item) => {\n if (id) {\n if ($item.getAttribute(\"aria-controls\") === id) {\n $item.setAttribute(\"aria-current\", \"true\");\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n });\n this.currentId = id;\n /* eslint-disable-next-line no-magic-numbers */\n this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;\n }\n\n getCurrentItemIndex() {\n return Array.from(this.$items).findIndex(\n ($item) => $item.id === this.currentId,\n );\n }\n\n showPreviousItem() {\n /* eslint-disable-next-line no-magic-numbers */\n let nextIndexToShow = this.getCurrentItemIndex() - 1;\n /* eslint-disable-next-line no-magic-numbers */\n if (nextIndexToShow < 0) {\n /* eslint-disable-next-line no-magic-numbers */\n nextIndexToShow = this.$items.length - 1;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showNextItem() {\n /* eslint-disable-next-line no-magic-numbers */\n let nextIndexToShow = this.getCurrentItemIndex() + 1;\n if (nextIndexToShow >= this.$items.length) {\n /* eslint-disable-next-line no-magic-numbers */\n nextIndexToShow = 0;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showFirstItem() {\n /* eslint-disable-next-line no-magic-numbers */\n this.showItem(this.$items[0].id);\n }\n\n showLastItem() {\n /* eslint-disable-next-line no-magic-numbers */\n this.showItem(this.$items[this.$items.length - 1].id);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Gallery","$module","_classCallCheck","this","$itemsContainer","querySelector","$items","querySelectorAll","$navigation","$navigationItems","$navigationButtons","length","classList","add","$navigationButtonPrev","$navigationButtonNext","setup","currentId","id","showItem","_this$$navigationButt","_this$$navigationButt2","_this$$navigationButt3","_this","forEach","$item","_$item$querySelector","setAttribute","removeAttribute","addEventListener","getAttribute","focus","event","preventDefaultKeyAction","showPreviousItem","showNextItem","showFirstItem","showLastItem","stopPropagation","preventDefault","$liveRegion","document","createElement","prepend","textContent","concat","getCurrentItemIndex","_this2","Array","from","findIndex","nextIndexToShow"],"sourceRoot":""}
1
+ {"version":3,"file":"components/gallery/gallery.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,uBCRD,IAAAC,EAAA,CCAAA,EAAA,CAAAL,EAAAM,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAAF,EAAAG,EAAAR,EAAAO,IACAE,OAAAC,eAAAV,EAAAO,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCF,EAAA,CAAAQ,EAAAC,IAA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CAEA,gBAAAY,GAEE,IAAIe,EAAkBzC,KAAKqC,sBAAwB,EAE/CI,EAAkB,IAEpBA,EAAkBzC,KAAKG,OAAOK,OAAS,GAEzCR,KAAKgB,SAAShB,KAAKG,OAAOsC,GAAiB1B,GAC7C,CAEA,YAAAY,GAEE,IAAIc,EAAkBzC,KAAKqC,sBAAwB,EAC/CI,GAAmBzC,KAAKG,OAAOK,SAEjCiC,EAAkB,GAEpBzC,KAAKgB,SAAShB,KAAKG,OAAOsC,GAAiB1B,GAC7C,CAEA,aAAAa,GAEE5B,KAAKgB,SAAShB,KAAKG,OAAO,GAAGY,GAC/B,CAEA,YAAAc,GAEE7B,KAAKgB,SAAShB,KAAKG,OAAOH,KAAKG,OAAOK,OAAS,GAAGO,GACpD","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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};","export class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$itemsContainer =\n $module && $module.querySelector(\".tna-gallery__items\");\n this.$items =\n this.$itemsContainer &&\n this.$itemsContainer.querySelectorAll(\".tna-gallery__item\");\n this.$navigation =\n $module && $module.querySelector(\".tna-gallery__navigation\");\n this.$navigationItems =\n this.$navigation &&\n $module.querySelectorAll(\".tna-gallery__navigation-item\");\n this.$navigationButtons =\n $module && $module.querySelector(\".tna-gallery__navigation-buttons\");\n\n if (\n !this.$module ||\n !this.$itemsContainer ||\n !this.$items ||\n /* eslint-disable-next-line no-magic-numbers */\n this.$items.length < 2 ||\n !this.$navigation ||\n !this.$navigationItems ||\n !this.$navigationButtons\n ) {\n return;\n }\n\n this.$module.classList.add(\"tna-gallery--interactive\");\n\n this.$navigationButtonPrev = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-prev\",\n );\n this.$navigationButtonNext = this.$navigationButtons.querySelector(\n \".tna-gallery__navigation-next\",\n );\n\n this.setup();\n /* eslint-disable-next-line no-magic-numbers */\n this.currentId = this.$items[0].id;\n this.showItem(this.currentId);\n }\n\n setup() {\n this.$items.forEach(($item) => {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n $item\n .querySelector(\".tna-gallery__item-header\")\n ?.setAttribute(\"aria-hidden\", \"true\");\n });\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigationItems.forEach(($item) => {\n $item.addEventListener(\"click\", () => {\n this.showItem($item.getAttribute(\"aria-controls\"));\n this.$itemsContainer.setAttribute(\"tabindex\", \"0\");\n this.$itemsContainer.focus();\n });\n });\n this.$module.addEventListener(\"keydown\", (event) => {\n let preventDefaultKeyAction = false;\n switch (event.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.showPreviousItem();\n preventDefaultKeyAction = true;\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.showNextItem();\n preventDefaultKeyAction = true;\n break;\n case \"Home\":\n this.showFirstItem();\n preventDefaultKeyAction = true;\n break;\n case \"End\":\n this.showLastItem();\n preventDefaultKeyAction = true;\n break;\n default:\n break;\n }\n if (preventDefaultKeyAction) {\n event.stopPropagation();\n event.preventDefault();\n }\n });\n\n this.$navigationButtons?.removeAttribute(\"hidden\");\n this.$navigationButtonPrev?.addEventListener(\"click\", () => {\n this.showPreviousItem();\n });\n this.$navigationButtonNext?.addEventListener(\"click\", () => {\n this.showNextItem();\n });\n\n this.$liveRegion = document.createElement(\"div\");\n this.$liveRegion.setAttribute(\"aria-live\", \"polite\");\n this.$liveRegion.setAttribute(\"aria-atomic\", \"true\");\n this.$liveRegion.setAttribute(\"class\", \"tna-gallery__item-header\");\n this.$itemsContainer.prepend(this.$liveRegion);\n this.$itemsContainer.classList.add(\"tna-gallery__items--hide-item-titles\");\n this.$itemsContainer.addEventListener(\"blur\", () =>\n this.$itemsContainer.removeAttribute(\"tabindex\"),\n );\n }\n\n showItem(id) {\n this.$items.forEach(($item) => {\n if (id && $item.id === id) {\n $item.removeAttribute(\"hidden\");\n $item.removeAttribute(\"aria-hidden\");\n } else {\n $item.setAttribute(\"hidden\", \"\");\n $item.setAttribute(\"aria-hidden\", \"true\");\n }\n });\n this.$navigationItems.forEach(($item) => {\n if (id) {\n if ($item.getAttribute(\"aria-controls\") === id) {\n $item.setAttribute(\"aria-current\", \"true\");\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n } else {\n $item.setAttribute(\"aria-current\", \"false\");\n }\n });\n this.currentId = id;\n /* eslint-disable-next-line no-magic-numbers */\n this.$liveRegion.textContent = `Image ${this.getCurrentItemIndex() + 1} of ${this.$items.length}`;\n }\n\n getCurrentItemIndex() {\n return Array.from(this.$items).findIndex(\n ($item) => $item.id === this.currentId,\n );\n }\n\n showPreviousItem() {\n /* eslint-disable-next-line no-magic-numbers */\n let nextIndexToShow = this.getCurrentItemIndex() - 1;\n /* eslint-disable-next-line no-magic-numbers */\n if (nextIndexToShow < 0) {\n /* eslint-disable-next-line no-magic-numbers */\n nextIndexToShow = this.$items.length - 1;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showNextItem() {\n /* eslint-disable-next-line no-magic-numbers */\n let nextIndexToShow = this.getCurrentItemIndex() + 1;\n if (nextIndexToShow >= this.$items.length) {\n /* eslint-disable-next-line no-magic-numbers */\n nextIndexToShow = 0;\n }\n this.showItem(this.$items[nextIndexToShow].id);\n }\n\n showFirstItem() {\n /* eslint-disable-next-line no-magic-numbers */\n this.showItem(this.$items[0].id);\n }\n\n showLastItem() {\n /* eslint-disable-next-line no-magic-numbers */\n this.showItem(this.$items[this.$items.length - 1].id);\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Gallery","constructor","$module","this","$itemsContainer","querySelector","$items","querySelectorAll","$navigation","$navigationItems","$navigationButtons","length","classList","add","$navigationButtonPrev","$navigationButtonNext","setup","currentId","id","showItem","forEach","$item","setAttribute","removeAttribute","addEventListener","getAttribute","focus","event","preventDefaultKeyAction","showPreviousItem","showNextItem","showFirstItem","showLastItem","stopPropagation","preventDefault","$liveRegion","document","createElement","prepend","textContent","getCurrentItemIndex","Array","from","findIndex","nextIndexToShow"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function o(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{GlobalHeader:()=>a});var a=function(){return t=function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$toggleButton=e&&e.querySelector(".tna-global-header__navigation-button"),this.$navigation=e&&e.querySelector(".tna-global-header__navigation-wrapper"),this.$topNavigation=e&&e.querySelector(".tna-global-header__top-navigation-wrapper"),this.$links=e&&(this.$navigation&&this.$navigation.querySelectorAll("[tabindex='0']")||this.$topNavigation&&this.$topNavigation.querySelectorAll("[tabindex='0']")),this.menuOpened=!1,this.mql=window.matchMedia("(max-width: 48em)"),this.$module&&this.$toggleButton&&(this.$navigation||this.$topNavigation)&&(this.$toggleButton.removeAttribute("hidden"),this.syncState(),this.$toggleButton.addEventListener("click",function(){return i.handleToggleNavigation()}),"addEventListener"in this.mql?this.mql.addEventListener("change",function(){return i.syncState()}):this.mql.addListener(function(){return i.syncState()}),this.$module.addEventListener("keyup",function(t){"Escape"===t.code&&i.mql.matches&&i.menuOpened&&(i.menuOpened=!1,i.syncState(),i.$toggleButton.focus())}))},(e=[{key:"handleToggleNavigation",value:function(){this.menuOpened=!this.menuOpened,this.syncState()}},{key:"syncState",value:function(){this.mql.matches?this.menuOpened?this.show():this.hide():this.show()}},{key:"hide",value:function(){this.$navigation&&(this.$navigation.hidden=!0,this.$navigation.setAttribute("aria-hidden","true")),this.$topNavigation&&(this.$topNavigation.hidden=!0,this.$topNavigation.setAttribute("aria-hidden","true")),this.$toggleButton.setAttribute("aria-expanded","false"),this.$toggleButton.setAttribute("title","Open menu"),this.$toggleButton.classList.remove("tna-global-header__navigation-button--opened");for(var t=0;t<this.$links.length;t+=1)this.$links[t].setAttribute("tabindex","-1")}},{key:"show",value:function(){this.$navigation&&(this.$navigation.hidden=!1,this.$navigation.setAttribute("aria-hidden","false")),this.$topNavigation&&(this.$topNavigation.hidden=!1,this.$topNavigation.setAttribute("aria-hidden","false")),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu"),this.$toggleButton.classList.add("tna-global-header__navigation-button--opened");for(var t=0;t<this.$links.length;t+=1)this.$links[t].setAttribute("tabindex","0")}}])&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{GlobalHeader:()=>i});class i{constructor(t){this.$module=t,this.$toggleButton=t&&t.querySelector(".tna-global-header__navigation-button"),this.$navigation=t&&t.querySelector(".tna-global-header__navigation-wrapper"),this.$topNavigation=t&&t.querySelector(".tna-global-header__top-navigation-wrapper"),this.$links=t&&(this.$navigation&&this.$navigation.querySelectorAll("[tabindex='0']")||this.$topNavigation&&this.$topNavigation.querySelectorAll("[tabindex='0']")),this.menuOpened=!1,this.mql=window.matchMedia("(max-width: 48em)"),this.$module&&this.$toggleButton&&(this.$navigation||this.$topNavigation)&&(this.$toggleButton.removeAttribute("hidden"),this.syncState(),this.$toggleButton.addEventListener("click",()=>this.handleToggleNavigation()),"addEventListener"in this.mql?this.mql.addEventListener("change",()=>this.syncState()):this.mql.addListener(()=>this.syncState()),this.$module.addEventListener("keyup",t=>{"Escape"===t.code&&this.mql.matches&&this.menuOpened&&(this.menuOpened=!1,this.syncState(),this.$toggleButton.focus())}))}handleToggleNavigation(){this.menuOpened=!this.menuOpened,this.syncState()}syncState(){this.mql.matches?this.menuOpened?this.show():this.hide():this.show()}hide(){this.$navigation&&(this.$navigation.hidden=!0,this.$navigation.setAttribute("aria-hidden","true")),this.$topNavigation&&(this.$topNavigation.hidden=!0,this.$topNavigation.setAttribute("aria-hidden","true")),this.$toggleButton.setAttribute("aria-expanded","false"),this.$toggleButton.setAttribute("title","Open menu"),this.$toggleButton.classList.remove("tna-global-header__navigation-button--opened");for(let t=0;t<this.$links.length;t+=1)this.$links[t].setAttribute("tabindex","-1")}show(){this.$navigation&&(this.$navigation.hidden=!1,this.$navigation.setAttribute("aria-hidden","false")),this.$topNavigation&&(this.$topNavigation.hidden=!1,this.$topNavigation.setAttribute("aria-hidden","false")),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu"),this.$toggleButton.classList.add("tna-global-header__navigation-button--opened");for(let t=0;t<this.$links.length;t+=1)this.$links[t].setAttribute("tabindex","0")}}return e})());
2
2
  //# sourceMappingURL=global-header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/global-header/global-header.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAA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pack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/global-header/global-header.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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};","export class GlobalHeader {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-global-header__navigation-button\");\n this.$navigation =\n $module &&\n $module.querySelector(\".tna-global-header__navigation-wrapper\");\n this.$topNavigation =\n $module &&\n $module.querySelector(\".tna-global-header__top-navigation-wrapper\");\n this.$links =\n $module &&\n ((this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\")) ||\n (this.$topNavigation &&\n this.$topNavigation.querySelectorAll(\"[tabindex='0']\")));\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (\n !this.$module ||\n !this.$toggleButton ||\n (!this.$navigation && !this.$topNavigation)\n ) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$module.addEventListener(\"keyup\", (event) => {\n if (event.code === \"Escape\" && this.mql.matches && this.menuOpened) {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n hide() {\n if (this.$navigation) {\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = true;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"true\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-global-header__navigation-button--opened\",\n );\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"-1\");\n }\n }\n\n show() {\n if (this.$navigation) {\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = false;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"false\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-global-header__navigation-button--opened\",\n );\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"0\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","GlobalHeader","$module","_this","this","_classCallCheck","$toggleButton","querySelector","$navigation","$topNavigation","$links","querySelectorAll","menuOpened","mql","window","matchMedia","removeAttribute","syncState","addEventListener","handleToggleNavigation","addListener","event","code","matches","focus","show","hide","hidden","setAttribute","classList","remove","index","length","add"],"sourceRoot":""}
1
+ {"version":3,"file":"components/global-header/global-header.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,uBCRD,IAAAC,EAAA,CCAAA,EAAA,CAAAL,EAAAM,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAAF,EAAAG,EAAAR,EAAAO,IACAE,OAAAC,eAAAV,EAAAO,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCF,EAAA,CAAAQ,EAAAC,IAAAL,OAAAM,UAAAC,eAAAC,KAAAJ,EAAAC,GCCAT,EAAAL,IACA,oBAAAkB,QAAAA,OAAAC,aACAV,OAAAC,eAAAV,EAAAkB,OAAAC,YAAA,CAAuDC,MAAA,WAEvDX,OAAAC,eAAAV,EAAA,cAAgDoB,OAAA,8CCLzC,MAAMC,EACX,WAAAC,CAAYC,GACVC,KAAKD,QAAUA,EACfC,KAAKC,cACHF,GAAWA,EAAQG,cAAc,yCACnCF,KAAKG,YACHJ,GACAA,EAAQG,cAAc,0CACxBF,KAAKI,eACHL,GACAA,EAAQG,cAAc,8CACxBF,KAAKK,OACHN,IACEC,KAAKG,aACLH,KAAKG,YAAYG,iBAAiB,mBACjC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I,iBACPJ,KAAKI,eAAekB,QAAS,EAC7BtB,KAAKI,eAAemB,aAAa,cAAe,UAElDvB,KAAKC,cAAcsB,aAAa,gBAAiB,QACjDvB,KAAKC,cAAcsB,aAAa,QAAS,cACzCvB,KAAKC,cAAcuB,UAAUI,IAC3B,gDAGF,IAAK,IAAIF,EAAQ,EAAGA,EAAQ1B,KAAKK,OAAOsB,OAAQD,GAAS,EACvD1B,KAAKK,OAAOqB,GAAOH,aAAa,WAAY,IAEhD","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/global-header/global-header.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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};","export class GlobalHeader {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-global-header__navigation-button\");\n this.$navigation =\n $module &&\n $module.querySelector(\".tna-global-header__navigation-wrapper\");\n this.$topNavigation =\n $module &&\n $module.querySelector(\".tna-global-header__top-navigation-wrapper\");\n this.$links =\n $module &&\n ((this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\")) ||\n (this.$topNavigation &&\n this.$topNavigation.querySelectorAll(\"[tabindex='0']\")));\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (\n !this.$module ||\n !this.$toggleButton ||\n (!this.$navigation && !this.$topNavigation)\n ) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$module.addEventListener(\"keyup\", (event) => {\n if (event.code === \"Escape\" && this.mql.matches && this.menuOpened) {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n hide() {\n if (this.$navigation) {\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = true;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"true\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-global-header__navigation-button--opened\",\n );\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"-1\");\n }\n }\n\n show() {\n if (this.$navigation) {\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n }\n if (this.$topNavigation) {\n this.$topNavigation.hidden = false;\n this.$topNavigation.setAttribute(\"aria-hidden\", \"false\");\n }\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\n \"tna-global-header__navigation-button--opened\",\n );\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"0\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","GlobalHeader","constructor","$module","this","$toggleButton","querySelector","$navigation","$topNavigation","$links","querySelectorAll","menuOpened","mql","window","matchMedia","removeAttribute","syncState","addEventListener","handleToggleNavigation","addListener","event","code","matches","focus","show","hide","hidden","setAttribute","classList","remove","index","length","add"],"sourceRoot":""}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function o(t){var e=function(t){if("object"!=n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==n(e)?e:e+""}t.r(e),t.d(e,{Header:()=>a});var a=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$toggleButton=e&&e.querySelector(".tna-header__navigation-button"),this.$navigation=e&&e.querySelector(".tna-header__navigation"),this.$links=e&&this.$navigation&&this.$navigation.querySelectorAll("[tabindex='0']"),this.menuOpened=!1,this.mql=window.matchMedia("(max-width: 48em)"),this.$module&&this.$toggleButton&&this.$navigation&&(this.$toggleButton.removeAttribute("hidden"),this.syncState(),this.$toggleButton.addEventListener("click",function(){return n.handleToggleNavigation()}),"addEventListener"in this.mql?this.mql.addEventListener("change",function(){return n.syncState()}):this.mql.addListener(function(){return n.syncState()}),this.$module.addEventListener("keyup",function(t){"Escape"===t.code&&n.menuOpened&&n.mql.matches&&(n.menuOpened=!1,n.syncState(),n.$toggleButton.focus())}))},(e=[{key:"handleToggleNavigation",value:function(){this.menuOpened=!this.menuOpened,this.syncState()}},{key:"syncState",value:function(){this.mql.matches?this.menuOpened?this.show():this.hide():this.show()}},{key:"show",value:function(){this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.removeAttribute("hidden"),this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu"),this.$toggleButton.classList.add("tna-header__navigation-button--opened");for(var t=0;t<this.$links.length;t+=1)this.$links[t].setAttribute("tabindex","0")}},{key:"hide",value:function(){this.$navigation.classList.remove("tna-header__navigation--open"),this.$navigation.hidden=!0,this.$navigation.setAttribute("aria-hidden","true"),this.$toggleButton.setAttribute("aria-expanded","false"),this.$toggleButton.setAttribute("title","Open menu"),this.$toggleButton.classList.remove("tna-header__navigation-button--opened");for(var t=0;t<this.$links.length;t+=1)this.$links[t].setAttribute("tabindex","-1")}}])&&i(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Header:()=>i});class i{constructor(t){this.$module=t,this.$toggleButton=t&&t.querySelector(".tna-header__navigation-button"),this.$navigation=t&&t.querySelector(".tna-header__navigation"),this.$links=t&&this.$navigation&&this.$navigation.querySelectorAll("[tabindex='0']"),this.menuOpened=!1,this.mql=window.matchMedia("(max-width: 48em)"),this.$module&&this.$toggleButton&&this.$navigation&&(this.$toggleButton.removeAttribute("hidden"),this.syncState(),this.$toggleButton.addEventListener("click",()=>this.handleToggleNavigation()),"addEventListener"in this.mql?this.mql.addEventListener("change",()=>this.syncState()):this.mql.addListener(()=>this.syncState()),this.$module.addEventListener("keyup",t=>{"Escape"===t.code&&this.menuOpened&&this.mql.matches&&(this.menuOpened=!1,this.syncState(),this.$toggleButton.focus())}))}handleToggleNavigation(){this.menuOpened=!this.menuOpened,this.syncState()}syncState(){this.mql.matches?this.menuOpened?this.show():this.hide():this.show()}show(){this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.removeAttribute("hidden"),this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu"),this.$toggleButton.classList.add("tna-header__navigation-button--opened");for(let t=0;t<this.$links.length;t+=1)this.$links[t].setAttribute("tabindex","0")}hide(){this.$navigation.classList.remove("tna-header__navigation--open"),this.$navigation.hidden=!0,this.$navigation.setAttribute("aria-hidden","true"),this.$toggleButton.setAttribute("aria-expanded","false"),this.$toggleButton.setAttribute("title","Open menu"),this.$toggleButton.classList.remove("tna-header__navigation-button--opened");for(let t=0;t<this.$links.length;t+=1)this.$links[t].setAttribute("tabindex","-1")}}return e})());
2
2
  //# sourceMappingURL=header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/header/header.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,uBCRD,IAAAC,EAAA,CCAAA,EAAA,CAAAL,EAAAM,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAAF,EAAAG,EAAAR,EAAAO,IACAE,OAAAC,eAAAV,EAAAO,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCF,EAAA,CAAAQ,EAAAC,IAAAL,OAAAM,UAAAC,eAAAC,KAAAJ,EAAAC,GCCAT,EAAAL,IACA,oBAAAkB,QAAAA,OAAAC,aACAV,OAAAC,eAAAV,EAAAkB,OAAAC,YAAA,CAAuDC,MAAA,WAEvDX,OAAAC,eAAAV,EAAA,cAAgDoB,OAAA,0sBCLzC,IAAMC,EAAM,WAoChB,SAnCD,SAAAA,EAAYC,GAAS,IAAAC,EAAAC,kGAAAC,CAAAD,KAAAH,GACnBG,KAAKF,QAAUA,EACfE,KAAKE,cACHJ,GAAWA,EAAQK,cAAc,kCACnCH,KAAKI,YACHN,GAAWA,EAAQK,cAAc,2BACnCH,KA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AKI,YAAYwB,QAAS,EAC1B5B,KAAKI,YAAYoB,aAAa,cAAe,QAC7CxB,KAAKE,cAAcsB,aAAa,gBAAiB,SACjDxB,KAAKE,cAAcsB,aAAa,QAAS,aACzCxB,KAAKE,cAAcoB,UAAUK,OAC3B,yCAIF,IAAK,IAAIF,EAAQ,EAAGA,EAAQzB,KAAKK,OAAOqB,OAAQD,GAAS,EACvDzB,KAAKK,OAAOoB,GAAOD,aAAa,WAAY,KAEhD,mFAAC,CAnFgB","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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};","export class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-header__navigation-button\");\n this.$navigation =\n $module && $module.querySelector(\".tna-header__navigation\");\n this.$links =\n $module &&\n this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\");\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (!this.$module || !this.$toggleButton || !this.$navigation) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$module.addEventListener(\"keyup\", (event) => {\n if (event.code === \"Escape\" && this.menuOpened && this.mql.matches) {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n show() {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\"tna-header__navigation-button--opened\");\n\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"0\");\n }\n }\n\n hide() {\n this.$navigation.classList.remove(\"tna-header__navigation--open\");\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-header__navigation-button--opened\",\n );\n\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"-1\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Header","$module","_this","this","_classCallCheck","$toggleButton","querySelector","$navigation","$links","querySelectorAll","menuOpened","mql","window","matchMedia","removeAttribute","syncState","addEventListener","handleToggleNavigation","addListener","event","code","matches","focus","show","hide","classList","add","setAttribute","index","length","remove","hidden"],"sourceRoot":""}
1
+ {"version":3,"file":"components/header/header.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,uBCRD,IAAAC,EAAA,CCAAA,EAAA,CAAAL,EAAAM,KACA,QAAAC,KAAAD,EACAD,EAAAG,EAAAF,EAAAC,KAAAF,EAAAG,EAAAR,EAAAO,IACAE,OAAAC,eAAAV,EAAAO,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCF,EAAA,CAAAQ,EAAAC,IAAAL,OAAAM,UAAAC,eAAAC,KAAAJ,EAAAC,GCCAT,EAAAL,IACA,oBAAAkB,QAAAA,OAAAC,aACAV,OAAAC,eAAAV,EAAAkB,OAAAC,YAAA,CAAuDC,MAAA,WAEvDX,OAAAC,eAAAV,EAAA,cAAgDoB,OAAA,wCCLzC,MAAMC,EACX,WAAAC,CAAYC,GACVC,KAAKD,QAAUA,EACfC,KAAKC,cACHF,GAAWA,EAAQG,cAAc,kCACnCF,KAAKG,YACHJ,GAAWA,EAAQG,cAAc,2BACnCF,KAAKI,OACHL,GACAC,KAAKG,aACLH,KAAKG,YAAYE,iBAAiB,kBACpCL,KAAKM,YAAa,EAClBN,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GA,EAAQxB,KAAKI,OAAOqB,OAAQD,GAAS,EACvDxB,KAAKI,OAAOoB,GAAOD,aAAa,WAAY,KAEhD","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\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__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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};","export class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButton =\n $module && $module.querySelector(\".tna-header__navigation-button\");\n this.$navigation =\n $module && $module.querySelector(\".tna-header__navigation\");\n this.$links =\n $module &&\n this.$navigation &&\n this.$navigation.querySelectorAll(\"[tabindex='0']\");\n this.menuOpened = false;\n this.mql = window.matchMedia(\"(max-width: 48em)\");\n\n if (!this.$module || !this.$toggleButton || !this.$navigation) {\n return;\n }\n\n this.$toggleButton.removeAttribute(\"hidden\");\n this.syncState();\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\n if (\"addEventListener\" in this.mql) {\n this.mql.addEventListener(\"change\", () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n\n this.$module.addEventListener(\"keyup\", (event) => {\n if (event.code === \"Escape\" && this.menuOpened && this.mql.matches) {\n this.menuOpened = false;\n this.syncState();\n this.$toggleButton.focus();\n }\n });\n }\n\n handleToggleNavigation() {\n this.menuOpened = !this.menuOpened;\n this.syncState();\n }\n\n syncState() {\n if (this.mql.matches) {\n if (this.menuOpened) {\n this.show();\n } else {\n this.hide();\n }\n } else {\n this.show();\n }\n }\n\n show() {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.removeAttribute(\"hidden\");\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n this.$toggleButton.classList.add(\"tna-header__navigation-button--opened\");\n\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"0\");\n }\n }\n\n hide() {\n this.$navigation.classList.remove(\"tna-header__navigation--open\");\n this.$navigation.hidden = true;\n this.$navigation.setAttribute(\"aria-hidden\", \"true\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"false\");\n this.$toggleButton.setAttribute(\"title\", \"Open menu\");\n this.$toggleButton.classList.remove(\n \"tna-header__navigation-button--opened\",\n );\n\n /* eslint-disable-next-line no-magic-numbers */\n for (let index = 0; index < this.$links.length; index += 1) {\n this.$links[index].setAttribute(\"tabindex\", \"-1\");\n }\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","Header","constructor","$module","this","$toggleButton","querySelector","$navigation","$links","querySelectorAll","menuOpened","mql","window","matchMedia","removeAttribute","syncState","addEventListener","handleToggleNavigation","addListener","event","code","matches","focus","show","hide","classList","add","setAttribute","index","length","remove","hidden"],"sourceRoot":""}
@@ -185,6 +185,33 @@
185
185
  },
186
186
  "html": "<header class=\"tna-hero tna-background-accent tna-hero--split\"><figure class=\"tna-hero__figure\"><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner tna-background-accent\"><h1 class=\"tna-heading-xl tna-hero__heading\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></header>"
187
187
  },
188
+ {
189
+ "name": "over",
190
+ "options": {
191
+ "title": "Title",
192
+ "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
193
+ "imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
194
+ "imageAlt": "The National Archives office",
195
+ "imageWidth": 499,
196
+ "imageHeight": 333,
197
+ "layout": "over"
198
+ },
199
+ "html": "<header class=\"tna-hero tna-hero--over\"><figure class=\"tna-hero__figure\"><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner \"><h1 class=\"tna-heading-xl tna-hero__heading\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></header>"
200
+ },
201
+ {
202
+ "name": "over with style",
203
+ "options": {
204
+ "title": "Title",
205
+ "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
206
+ "imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
207
+ "imageAlt": "The National Archives office",
208
+ "imageWidth": 499,
209
+ "imageHeight": 333,
210
+ "style": "accent",
211
+ "layout": "over"
212
+ },
213
+ "html": "<header class=\"tna-hero tna-background-accent tna-hero--over\"><figure class=\"tna-hero__figure\"><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner tna-background-accent\"><h1 class=\"tna-heading-xl tna-hero__heading\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></header>"
214
+ },
188
215
  {
189
216
  "name": "large",
190
217
  "options": {
@@ -198,6 +225,21 @@
198
225
  },
199
226
  "html": "<header class=\"tna-hero tna-hero--large\"><figure class=\"tna-hero__figure\"><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner \"><h1 class=\"tna-heading-xl tna-hero__heading\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></header>"
200
227
  },
228
+ {
229
+ "name": "large with style and layout",
230
+ "options": {
231
+ "title": "Title",
232
+ "text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
233
+ "imageSrc": "https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg",
234
+ "imageAlt": "The National Archives office",
235
+ "imageWidth": 499,
236
+ "imageHeight": 333,
237
+ "large": true,
238
+ "style": "accent",
239
+ "layout": "split"
240
+ },
241
+ "html": "<header class=\"tna-hero tna-background-accent tna-hero--split tna-hero--large\"><figure class=\"tna-hero__figure\"><div class=\"tna-container tna-hero__inner\"><div class=\"tna-column tna-column--width-2-3 tna-column--width-5-6-medium tna-column--full-small tna-column--full-tiny tna-hero__content\"><div class=\"tna-hero__content-inner tna-background-accent\"><h1 class=\"tna-heading-xl tna-hero__heading\">Title</h1><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p></div></div></div><picture class=\"tna-hero__image\"><img src=\"https://www.nationalarchives.gov.uk/wp-content/uploads/sites/24/2023/07/tna-building-compress.jpg\" alt=\"The National Archives office\" width=\"499\" height=\"333\"></picture></figure></header>"
242
+ },
201
243
  {
202
244
  "name": "with caption",
203
245
  "options": {
@@ -1 +1 @@
1
- .tna-hero__details[open] .tna-hero__details-summary,.tna-hero__information{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);--accent-border: var(--accent-border-bright);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-hero{position:relative}.tna-hero::before{content:"";position:absolute;inset:auto 0 0;z-index:-1;border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-hero__figure{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end}.tna-hero__caption{width:100%;overflow:visible;position:absolute;top:0;right:0;z-index:10;order:2}.tna-hero__details{width:100%;overflow:visible}.tna-hero__details-summary{position:absolute;top:0.5rem;right:0.5rem;z-index:2}.tna-hero__details-summary:hover{color:var(--font-dark, rgb(1, 1, 1)) !important;background-color:var(--background, #f4f4f4) !important}.tna-hero__details[open] .tna-hero__details-summary{width:2rem;height:2rem;padding:0;font-size:0;line-height:2rem;text-align:center;border:none}.tna-hero__details[open] .tna-hero__details-summary::before,.tna-hero__details[open] .tna-hero__details-summary::after{content:"";width:1.5rem;height:.125rem;display:block;position:absolute;top:50%;left:50%;background-color:var(--font-dark, rgb(1, 1, 1))}.tna-hero__details[open] .tna-hero__details-summary::before{transform:translate(-50%, -50%) rotate(45deg)}.tna-hero__details[open] .tna-hero__details-summary::after{transform:translate(-50%, -50%) rotate(-45deg)}.tna-hero__details[open] .tna-hero__details-summary:hover::before,.tna-hero__details[open] .tna-hero__details-summary:hover::after{height:.25rem}.tna-hero__details[open] .tna-hero__details-summary-icon{font-size:0}.tna-hero__information{padding:0.625rem 3.25rem 0.625rem 1rem;position:absolute;top:0;right:0;left:0;z-index:1;font-size:1rem}.tna-hero__information p+p{margin-top:0.5rem}.tna-hero__image{width:100%;order:1}.tna-hero__image img{width:100%}.tna-hero__inner{order:3}.tna-hero__content{padding-top:2rem;padding-bottom:2rem}.tna-hero__content-inner{padding-right:0;padding-left:0;border-left:none;background-color:var(--background, #f4f4f4)}@media(min-width: 48.0625em){.tna-hero__figure{min-height:clamp(5rem,30vw,20rem)}.tna-hero--large .tna-hero__figure{min-height:clamp(12rem,33vw,50rem)}.tna-hero__inner{z-index:4}.tna-hero__image{width:auto;position:absolute;inset:0;z-index:1}.tna-hero__image img{height:100%;object-fit:cover}.tna-hero__content{padding-top:12rem;padding-bottom:2rem}.tna-hero__content-inner{padding:2rem;border-radius:2px}.tna-hero--split .tna-hero__content{width:50%;padding-top:2rem;padding-bottom:2rem}.tna-hero--split .tna-hero__content-inner{padding:0 1rem 0 0}.tna-hero--split .tna-hero__image{left:50%}.tna-hero--shift{margin-bottom:2rem}.tna-hero--shift .tna-hero__content-inner{position:relative;top:4rem}.tna-hero--over{margin-bottom:2rem}.tna-hero--over .tna-hero__details{max-width:1280px;margin:0 auto;position:relative}.tna-hero--over .tna-hero__details-summary{top:0.5rem;right:2.5rem}.tna-hero--over .tna-hero__information{max-width:calc(50% - 2rem);box-sizing:border-box;top:0;right:2rem;left:auto;border-radius:2px}.tna-hero--over .tna-hero__content{width:50%;padding-top:2rem}.tna-hero--over .tna-hero__content-inner{padding:0}.tna-hero--over .tna-hero__image{max-width:calc(640px - 2rem);margin-right:32px;overflow:hidden;bottom:-2rem;left:50%;z-index:5;border-radius:2px}.tna-hero--split .tna-hero__figure,.tna-hero--over .tna-hero__figure{justify-content:center}.tna-hero--shift .tna-hero__content-inner,.tna-hero--over .tna-hero__image{box-shadow:0 .25rem 1rem -0.25rem rgba(0,0,0,.25),0 .125rem .5rem -0.25rem rgba(0,0,0,.75)}}/*# sourceMappingURL=hero.css.map */
1
+ .tna-hero__details[open] .tna-hero__details-summary,.tna-hero__information{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);--accent-border: var(--accent-border-bright);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-hero{position:relative}.tna-hero::before{content:"";position:absolute;inset:auto 0 0;z-index:-1;border-bottom:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-hero__figure{display:flex;flex-direction:column;align-items:flex-end;justify-content:flex-end}.tna-hero__caption{width:100%;overflow:visible;position:absolute;top:0;right:0;z-index:10;order:2}.tna-hero__details{width:100%;overflow:visible}.tna-hero__details-summary{position:absolute;top:0.5rem;right:0.5rem;z-index:2}.tna-hero__details-summary:hover{color:var(--font-dark, rgb(1, 1, 1)) !important;background-color:var(--background, #f4f4f4) !important}.tna-hero__details[open] .tna-hero__details-summary{width:2rem;height:2rem;padding:0;font-size:0;line-height:2rem;text-align:center;border:none}.tna-hero__details[open] .tna-hero__details-summary::before,.tna-hero__details[open] .tna-hero__details-summary::after{content:"";width:1.5rem;height:.125rem;display:block;position:absolute;top:50%;left:50%;background-color:var(--font-dark, rgb(1, 1, 1))}.tna-hero__details[open] .tna-hero__details-summary::before{transform:translate(-50%, -50%) rotate(45deg)}.tna-hero__details[open] .tna-hero__details-summary::after{transform:translate(-50%, -50%) rotate(-45deg)}.tna-hero__details[open] .tna-hero__details-summary:hover::before,.tna-hero__details[open] .tna-hero__details-summary:hover::after{height:.25rem}.tna-hero__details[open] .tna-hero__details-summary-icon{font-size:0}.tna-hero__information{padding:0.625rem 3.25rem 0.625rem 1rem;position:absolute;top:0;right:0;left:0;z-index:1;font-size:1rem}.tna-hero__information p+p{margin-top:0.5rem}.tna-hero__image{width:100%;order:1}.tna-hero__image img{width:100%}.tna-hero__inner{order:3}.tna-hero__content{padding-top:2rem;padding-bottom:2rem}.tna-hero__content-inner{padding-right:0;padding-left:0;border-left:none;background-color:var(--background, #f4f4f4)}@media(min-width: 48.0625em){.tna-hero__figure{min-height:clamp(5rem,30vw,20rem)}.tna-hero--large .tna-hero__figure{min-height:clamp(12rem,33vw,50rem)}.tna-hero__inner{z-index:4}.tna-hero__image{width:auto;position:absolute;inset:0;z-index:1}.tna-hero__image img{height:100%;object-fit:cover}.tna-hero__content{padding-top:12rem;padding-bottom:3rem}.tna-hero__content-inner{padding:2rem;border-radius:2px}.tna-hero__information{max-width:640px;left:auto}.tna-hero--split .tna-hero__content{width:50%;padding-top:3rem;padding-bottom:3rem}.tna-hero--split .tna-hero__content-inner{padding:0 1rem 0 0}.tna-hero--split .tna-hero__image{left:50%}.tna-hero--shift{margin-bottom:3rem}.tna-hero--shift .tna-hero__content-inner{position:relative;top:6rem}.tna-hero--over{margin-bottom:3rem}.tna-hero--over .tna-hero__details{max-width:1280px;margin:0 auto;position:relative}.tna-hero--over .tna-hero__details-summary{top:0.5rem;right:2.5rem}.tna-hero--over .tna-hero__information{max-width:calc(50% - 2rem);box-sizing:border-box;top:0;right:2rem;left:auto;border-radius:2px}.tna-hero--over .tna-hero__content{width:50%;padding-top:3rem}.tna-hero--over .tna-hero__content-inner{padding:0}.tna-hero--over .tna-hero__image{max-width:calc(640px - (2rem + 1rem));margin-right:32px;overflow:hidden;bottom:-3rem;left:calc(50% + 1rem);z-index:5;border-radius:2px}.tna-hero--split .tna-hero__figure,.tna-hero--over .tna-hero__figure{justify-content:center}.tna-hero--shift .tna-hero__content-inner,.tna-hero--over .tna-hero__image{box-shadow:0 .25rem 1rem -0.25rem rgba(0,0,0,.25),0 .125rem .5rem -0.25rem rgba(0,0,0,.75)}}/*# sourceMappingURL=hero.css.map */