@nationalarchives/frontend 0.1.25-prerelease → 0.1.26-prerelease
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.
- package/nationalarchives/all.css +2 -2
- package/nationalarchives/all.css.map +1 -1
- package/nationalarchives/all.js +1 -1
- package/nationalarchives/all.js.map +1 -1
- package/nationalarchives/all.mjs +0 -11
- package/nationalarchives/components/_index.scss +8 -0
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +1 -1
- package/nationalarchives/components/breadcrumbs/breadcrumbs.scss +1 -1
- package/nationalarchives/components/button/_button-group.scss +4 -0
- package/nationalarchives/components/button/button.css +1 -1
- package/nationalarchives/components/button/button.css.map +1 -1
- package/nationalarchives/components/button/button.scss +89 -26
- package/nationalarchives/components/button/button.stories.js +52 -5
- package/nationalarchives/components/button/macro-options.json +18 -0
- package/nationalarchives/components/button/template.njk +15 -6
- package/nationalarchives/components/card/card.css +1 -1
- package/nationalarchives/components/card/card.css.map +1 -1
- package/nationalarchives/components/card/card.scss +4 -38
- package/nationalarchives/components/card/fixtures.json +1 -1
- package/nationalarchives/components/card/template.njk +8 -6
- package/nationalarchives/components/checkboxes/_index.scss +1 -0
- package/nationalarchives/components/checkboxes/checkboxes.css +1 -0
- package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -0
- package/nationalarchives/components/checkboxes/checkboxes.scss +143 -0
- package/nationalarchives/components/checkboxes/checkboxes.stories.js +238 -0
- package/nationalarchives/components/checkboxes/fixtures.json +4 -0
- package/nationalarchives/components/checkboxes/macro-options.json +102 -0
- package/nationalarchives/components/checkboxes/macro.njk +3 -0
- package/nationalarchives/components/checkboxes/template.njk +35 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.css +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
- package/nationalarchives/components/cookie-banner/cookie-banner.mjs +2 -0
- package/nationalarchives/components/cookie-banner/cookie-banner.stories.js +11 -0
- package/nationalarchives/components/cookie-banner/fixtures.json +28 -9
- package/nationalarchives/components/cookie-banner/macro-options.json +12 -0
- package/nationalarchives/components/cookie-banner/template.njk +1 -1
- package/nationalarchives/components/date-input/_index.scss +1 -0
- package/nationalarchives/components/date-input/date-input.css +1 -0
- package/nationalarchives/components/date-input/date-input.css.map +1 -0
- package/nationalarchives/components/date-input/date-input.scss +48 -0
- package/nationalarchives/components/date-input/date-input.stories.js +116 -0
- package/nationalarchives/components/date-input/fixtures.json +4 -0
- package/nationalarchives/components/date-input/macro-options.json +96 -0
- package/nationalarchives/components/date-input/macro.njk +3 -0
- package/nationalarchives/components/date-input/template.njk +45 -0
- package/nationalarchives/components/date-search/_index.scss +1 -0
- package/nationalarchives/components/date-search/date-search.css +1 -0
- package/nationalarchives/components/date-search/date-search.css.map +1 -0
- package/nationalarchives/components/date-search/date-search.scss +27 -0
- package/nationalarchives/components/date-search/date-search.stories.js +121 -0
- package/nationalarchives/components/date-search/fixtures.json +4 -0
- package/nationalarchives/components/date-search/macro-options.json +94 -0
- package/nationalarchives/components/date-search/macro.njk +3 -0
- package/nationalarchives/components/date-search/template.njk +27 -0
- package/nationalarchives/components/featured-records/featured-records.css +1 -1
- package/nationalarchives/components/featured-records/featured-records.css.map +1 -1
- package/nationalarchives/components/filters/filters.css +1 -1
- package/nationalarchives/components/filters/filters.css.map +1 -1
- package/nationalarchives/components/filters/filters.scss +0 -8
- package/nationalarchives/components/filters/template.njk +1 -1
- package/nationalarchives/components/footer/footer.css +1 -1
- package/nationalarchives/components/footer/footer.css.map +1 -1
- package/nationalarchives/components/footer/footer.scss +3 -5
- package/nationalarchives/components/footer/template.njk +10 -6
- package/nationalarchives/components/gallery/gallery.css +1 -1
- package/nationalarchives/components/gallery/gallery.css.map +1 -1
- package/nationalarchives/components/gallery/gallery.scss +0 -11
- package/nationalarchives/components/gallery/gallery.stories.js +8 -10
- package/nationalarchives/components/gallery/template.njk +1 -1
- package/nationalarchives/components/grid/grid.css +1 -1
- package/nationalarchives/components/grid/grid.css.map +1 -1
- package/nationalarchives/components/header/header.css +1 -1
- package/nationalarchives/components/header/header.css.map +1 -1
- package/nationalarchives/components/header/header.scss +30 -29
- package/nationalarchives/components/header/header.stories.js +0 -41
- package/nationalarchives/components/header/template.njk +1 -1
- package/nationalarchives/components/hero/hero.css +1 -1
- package/nationalarchives/components/hero/hero.css.map +1 -1
- package/nationalarchives/components/hero/hero.scss +1 -5
- package/nationalarchives/components/index-grid/fixtures.json +324 -1
- package/nationalarchives/components/index-grid/index-grid.css +1 -1
- package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
- package/nationalarchives/components/index-grid/index-grid.scss +13 -10
- package/nationalarchives/components/index-grid/index-grid.stories.js +24 -13
- package/nationalarchives/components/index-grid/macro-options.json +34 -29
- package/nationalarchives/components/index-grid/template.njk +13 -8
- package/nationalarchives/components/message/message.css +1 -1
- package/nationalarchives/components/message/message.css.map +1 -1
- package/nationalarchives/components/message/message.scss +1 -6
- package/nationalarchives/components/message/template.njk +1 -1
- package/nationalarchives/components/pagination/pagination.css +1 -1
- package/nationalarchives/components/pagination/pagination.css.map +1 -1
- package/nationalarchives/components/pagination/template.njk +32 -17
- package/nationalarchives/components/phase-banner/phase-banner.css +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
- package/nationalarchives/components/phase-banner/phase-banner.scss +2 -3
- package/nationalarchives/components/picture/picture.css +1 -1
- package/nationalarchives/components/picture/picture.css.map +1 -1
- package/nationalarchives/components/picture/picture.js.map +1 -1
- package/nationalarchives/components/picture/picture.mjs +0 -4
- package/nationalarchives/components/picture/picture.scss +1 -1
- package/nationalarchives/components/picture/template.njk +1 -1
- package/nationalarchives/components/radios/_index.scss +1 -0
- package/nationalarchives/components/radios/fixtures.json +4 -0
- package/nationalarchives/components/radios/macro-options.json +102 -0
- package/nationalarchives/components/radios/macro.njk +3 -0
- package/nationalarchives/components/radios/radios.css +1 -0
- package/nationalarchives/components/radios/radios.css.map +1 -0
- package/nationalarchives/components/radios/radios.scss +131 -0
- package/nationalarchives/components/radios/radios.stories.js +241 -0
- package/nationalarchives/components/radios/template.njk +35 -0
- package/nationalarchives/components/search-field/_index.scss +1 -0
- package/nationalarchives/components/search-field/fixtures.json +4 -0
- package/nationalarchives/components/search-field/macro-options.json +68 -0
- package/nationalarchives/components/search-field/macro.njk +3 -0
- package/nationalarchives/components/search-field/search-field.css +1 -0
- package/nationalarchives/components/search-field/search-field.css.map +1 -0
- package/nationalarchives/components/search-field/search-field.scss +32 -0
- package/nationalarchives/components/search-field/search-field.stories.js +88 -0
- package/nationalarchives/components/search-field/template.njk +32 -0
- package/nationalarchives/components/select/_index.scss +1 -0
- package/nationalarchives/components/select/fixtures.json +4 -0
- package/nationalarchives/components/select/macro-options.json +114 -0
- package/nationalarchives/components/select/macro.njk +3 -0
- package/nationalarchives/components/select/select.css +1 -0
- package/nationalarchives/components/select/select.css.map +1 -0
- package/nationalarchives/components/select/select.scss +51 -0
- package/nationalarchives/components/select/select.stories.js +194 -0
- package/nationalarchives/components/select/template.njk +29 -0
- package/nationalarchives/components/sensitive-image/sensitive-image.css +1 -1
- package/nationalarchives/components/sensitive-image/sensitive-image.css.map +1 -1
- package/nationalarchives/components/sensitive-image/template.njk +1 -1
- package/nationalarchives/components/skip-link/skip-link.css +1 -1
- package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
- package/nationalarchives/components/skip-link/template.njk +1 -1
- package/nationalarchives/components/tabs/tabs.css +1 -1
- package/nationalarchives/components/tabs/tabs.css.map +1 -1
- package/nationalarchives/components/tabs/tabs.js +1 -1
- package/nationalarchives/components/tabs/tabs.js.map +1 -1
- package/nationalarchives/components/tabs/tabs.mjs +1 -1
- package/nationalarchives/components/tabs/tabs.scss +11 -1
- package/nationalarchives/components/tabs/template.njk +1 -1
- package/nationalarchives/components/text-input/_index.scss +1 -0
- package/nationalarchives/components/text-input/fixtures.json +4 -0
- package/nationalarchives/components/text-input/macro-options.json +118 -0
- package/nationalarchives/components/text-input/macro.njk +3 -0
- package/nationalarchives/components/text-input/template.njk +30 -0
- package/nationalarchives/components/text-input/text-input.css +1 -0
- package/nationalarchives/components/text-input/text-input.css.map +1 -0
- package/nationalarchives/components/text-input/text-input.scss +44 -0
- package/nationalarchives/components/text-input/text-input.stories.js +188 -0
- package/nationalarchives/components/textarea/_index.scss +1 -0
- package/nationalarchives/components/textarea/fixtures.json +4 -0
- package/nationalarchives/components/textarea/macro-options.json +106 -0
- package/nationalarchives/components/textarea/macro.njk +3 -0
- package/nationalarchives/components/textarea/template.njk +27 -0
- package/nationalarchives/components/textarea/textarea.css +1 -0
- package/nationalarchives/components/textarea/textarea.css.map +1 -0
- package/nationalarchives/components/textarea/textarea.scss +45 -0
- package/nationalarchives/components/textarea/textarea.stories.js +127 -0
- package/nationalarchives/lib/cookies.mjs +7 -1
- package/nationalarchives/prototype-kit.css +2 -2
- package/nationalarchives/prototype-kit.css.map +1 -1
- package/nationalarchives/prototype-kit.scss +0 -8
- package/nationalarchives/stories/utilities/colour-schemes/colour-schemes.stories.js +301 -31
- package/nationalarchives/stories/utilities/forms/forms.mdx +117 -0
- package/nationalarchives/stories/utilities/typography/typography.stories.js +0 -6
- package/nationalarchives/templates/layouts/_generic.njk +1 -1
- package/nationalarchives/tools/_colour.scss +48 -27
- package/nationalarchives/tools/_typography.scss +0 -1
- package/nationalarchives/utilities/_a11y.scss +6 -2
- package/nationalarchives/utilities/_colour.scss +10 -6
- package/nationalarchives/utilities/_debug.scss +3 -4
- package/nationalarchives/utilities/_forms.scss +93 -0
- package/nationalarchives/utilities/_index.scss +1 -0
- package/nationalarchives/utilities/_lists.scss +1 -1
- package/nationalarchives/utilities/_overrides.scss +1 -1
- package/nationalarchives/utilities/_typography.scss +66 -57
- package/nationalarchives/variables/_colour.scss +14 -10
- package/nationalarchives/variables/_forms.scss +2 -0
- package/nationalarchives/variables/_index.scss +1 -0
- package/nationalarchives/variables/_typography.scss +2 -2
- package/package.json +15 -15
- package/nationalarchives/stories/utilities/overrides/overrides.mdx +0 -53
package/nationalarchives/all.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={908:(t,e,i)=>{i.d(e,{Breadcrumbs:()=>a});var n=i(948);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$breadcrumbsList=e&&e.querySelector(".tna-breadcrumbs__list"),this.$breadcrumbs=e&&this.$breadcrumbsList&&e.querySelectorAll(".tna-breadcrumbs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$breadcrumbsList&&this.$breadcrumbs&&this.$breadcrumbs.length>2&&!this.$module.classList.contains("tna-breadcrumbs--no-collapse")){var e="tna-breadcrumbs-".concat((0,n.Z)()),i=document.createElement("li");i.classList.add("tna-breadcrumbs__item","tna-breadcrumbs__item--expandable"),i.style.display="none";var r=document.createElement("button");r.classList.add("tna-breadcrumbs__link"),r.innerHTML="<span class='tna-visually-hidden'>Expand breadcrumbs</span>…",r.setAttribute("aria-expanded","false"),r.setAttribute("aria-controls",e),r.addEventListener("click",(function(){t.$module.classList.remove("tna-breadcrumbs--collapsed"),i.remove(),t.$module.setAttribute("tabindex","0"),t.$module.focus(),t.$module.setAttribute("tabindex","-1")})),i.appendChild(r),this.$breadcrumbsList.setAttribute("id",e),this.$breadcrumbsList.insertBefore(i,this.$breadcrumbs[this.$breadcrumbs.length-2].nextSibling),this.$module.classList.add("tna-breadcrumbs--collapsed")}}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},780:(t,e,i)=>{i.d(e,{CookieBanner:()=>a});var n=i(774);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$acceptButton=e&&e.querySelector('[value="accept"]'),this.$rejectButton=e&&e.querySelector('[value="reject"]'),this.$prompt=e&&e.querySelector(".tna-cookie-banner__message--prompt"),this.$acceptedMessage=e&&e.querySelector(".tna-cookie-banner__message--accepted"),this.$rejectedMessage=e&&e.querySelector(".tna-cookie-banner__message--rejected"),this.$closeButtons=e&&e.querySelectorAll('[value="close"]')}var e,i;return e=t,(i=[{key:"init",value:function(){var t,e=this;if(this.$module&&this.$acceptButton&&this.$rejectButton&&this.$prompt&&this.$acceptedMessage&&this.$rejectedMessage&&this.$closeButtons){var i=this.$module.getAttribute("data-policies")||"",r=this.$module.getAttribute("data-domain")||void 0,o=this.$module.getAttribute("data-secure")||void 0,a=this.$module.getAttribute("data-policies-key")||void 0;this.cookies=new((null===(t=window.TNAFrontend)||void 0===t?void 0:t.Cookies)||n.Z)(i.split(",").filter((function(t){return t})).map((function(t){return t.trim()})),{domain:r,secure:o,policiesKey:a}),this.cookiePreferencesSet=this.$module.getAttribute("data-preferenceskey")||"cookie_preferences_set",this.cookies.hasValue(this.cookiePreferencesSet,"true")||(this.$module.removeAttribute("hidden"),this.$acceptButton.addEventListener("click",(function(){return e.accept()})),this.$rejectButton.addEventListener("click",(function(){return e.reject()})))}}},{key:"accept",value:function(){this.$prompt.setAttribute("hidden",!0),this.complete(),this.$acceptedMessage.removeAttribute("hidden"),this.$acceptedMessage.focus(),this.$acceptedMessage.setAttribute("tabindex","-1"),this.cookies.acceptAllPolicies()}},{key:"reject",value:function(){this.$prompt.setAttribute("hidden",!0),this.complete(),this.$rejectedMessage.removeAttribute("hidden"),this.$rejectedMessage.focus(),this.$rejectedMessage.setAttribute("tabindex","-1"),this.cookies.rejectAllPolicies()}},{key:"complete",value:function(){var t=this;this.cookies.set(this.cookiePreferencesSet,!0),this.$closeButtons.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))}},{key:"close",value:function(){this.$module.setAttribute("hidden",!0)}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},540:(t,e,i)=>{i.d(e,{Gallery:()=>a});var n=i(948);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$items=e&&e.querySelector(".tna-gallery__items"),this.opened=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$items&&(this.items=this.$module.querySelectorAll(".tna-gallery__item").length,this.items>1)){var e="tna-gallery-".concat((0,n.Z)());this.$module.classList.add("tna-gallery--collapsed"),this.$items.setAttribute("tabindex","-1"),this.$galleryToggle=document.createElement("button"),this.$galleryToggle.classList.add("tna-gallery__toggle","tna-button","tna-button--accent"),this.$galleryToggle.setAttribute("aria-controls",e),this.$galleryToggle.setAttribute("aria-expanded",!1),this.$galleryToggle.innerText="View ".concat(this.items," images"),this.$galleryToggle.addEventListener("click",(function(){t.handleToggleGallery()})),this.$galleryToggleWrapper=document.createElement("div"),this.$galleryToggleWrapper.classList.add("tna-column","tna-column--full","tna-gallery__toggle-wrapper"),this.$galleryToggleWrapper.appendChild(this.$galleryToggle),this.$items.parentElement.appendChild(this.$galleryToggleWrapper),this.$items.setAttribute("id",e)}}},{key:"handleToggleGallery",value:function(){this.opened=!this.opened,this.opened?(this.$module.classList.remove("tna-gallery--collapsed"),this.$galleryToggle.setAttribute("aria-expanded",!0),this.$galleryToggle.innerText="Close images",this.$items.setAttribute("tabindex","0"),this.$items.focus(),this.$items.setAttribute("tabindex","-1")):(this.$module.classList.add("tna-gallery--collapsed"),this.$galleryToggle.setAttribute("aria-expanded",!1),this.$galleryToggle.innerText="View ".concat(this.items," images"))}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},8:(t,e,i)=>{i.d(e,{Header:()=>a});var n=i(948);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$toggleButtonWrapper=e&&e.querySelector(".tna-header__navigation-toggle"),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: 768px)")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$toggleButtonWrapper&&this.$navigation){var e="tna-menu-content-".concat((0,n.Z)());this.$navigation.setAttribute("id",e),this.$toggleButton=document.createElement("button"),this.$toggleButton.innerText="Menu",this.$toggleButton.setAttribute("aria-controls",e),this.$toggleButton.setAttribute("aria-haspopup","true"),this.$toggleButton.classList.add("tna-header__navigation-toggle-button"),this.$hamburger=document.createElement("div"),this.$hamburger.classList.add("tna-header__hamburger"),this.$toggleButton.appendChild(this.$hamburger),this.$toggleButtonWrapper.appendChild(this.$toggleButton),this.syncState(),this.$toggleButton.addEventListener("click",(function(){return t.handleToggleNavigation()})),"addEventListener"in this.mql?this.mql.addEventListener("change",(function(){return t.syncState()})):this.mql.addListener((function(){return t.syncState()}))}}},{key:"handleToggleNavigation",value:function(){this.menuOpened=!this.menuOpened,this.syncState()}},{key:"syncState",value:function(){if(this.mql.matches)if(this.menuOpened){this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.hidden=!1,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-toggle-button--opened");for(var t=0;t<this.$links.length;t++)this.$links[t].setAttribute("tabindex","0")}else{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-toggle-button--opened");for(var e=0;e<this.$links.length;e++)this.$links[e].setAttribute("tabindex","-1")}else{this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.hidden=!1,this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu");for(var i=0;i<this.$links.length;i++)this.$links[i].setAttribute("tabindex","0")}}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},765:(t,e,i)=>{i.d(e,{Picture:()=>a});var n=i(948);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$imageWrapper=e&&e.querySelector(".tna-picture__image-wrapper"),this.$transcript=e&&e.querySelector(".tna-picture__transcript"),this.transcriptOpened=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$imageWrapper&&this.$transcript){var e="tna-picture-".concat((0,n.Z)());this.$transcriptToggle=document.createElement("button"),this.$transcriptToggle.classList.add("tna-picture__toggle-transcript","tna-button","tna-button--small","tna-button--accent","tna-button--solid-hover"),this.$transcriptToggle.setAttribute("aria-controls",e),this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText="Open transcript",this.$transcriptToggle.addEventListener("click",(function(){return t.handleToggleTranscript()})),this.$imageWrapper.appendChild(this.$transcriptToggle),this.$transcript.setAttribute("id",e),this.$transcript.setAttribute("hidden",!0)}}},{key:"handleToggleTranscript",value:function(){var t="tna-picture__toggle-transcript--opened";this.transcriptOpened=!this.transcriptOpened,this.transcriptOpened?(this.$transcriptToggle.classList.add(t),this.$transcriptToggle.setAttribute("aria-expanded",!0),this.$transcriptToggle.innerText="Close transcript",this.$transcript.removeAttribute("hidden")):(this.$transcriptToggle.classList.remove(t),this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText="Open transcript",this.$transcript.setAttribute("hidden",!0))}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},554:(t,e,i)=>{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 r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(o)?o:String(o)),r)}var o}i.d(e,{SensitiveImage:()=>o});var o=function(){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.$imageDetails=e&&e.querySelector(".tna-sensitive-image__details"),this.$image=e&&e.querySelector(".tna-sensitive-image__image"),this.imageIsVisible=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;this.$module&&this.$imageDetails&&this.$image&&this.$imageDetails.addEventListener("toggle",(function(){return t.handleImageDetailsToggle()}))}},{key:"handleImageDetailsToggle",value:function(){this.$imageDetails.hasAttribute("open")&&this.$image.focus({preventScroll:!0,focusVisible:!0})}}])&&r(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},73:(t,e,i)=>{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 r(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,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}i.d(e,{SkipLink:()=>a});var a=function(){function t(e){var i,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,(n=o(n="linkedElementListener"))in i?Object.defineProperty(i,n,{value:false,enumerable:!0,configurable:!0,writable:!0}):i[n]=false,this.$module=e,this.linkedElementId=e.getAttribute("href").split("#").pop(),this.$linkedElement=e&&this.linkedElementId&&document.getElementById(this.linkedElementId)}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;this.$module&&this.$linkedElement&&this.$module.addEventListener("click",(function(){return t.focusLinkedElement()}))}},{key:"focusLinkedElement",value:function(){var t=this;this.$linkedElement.getAttribute("tabindex")||(this.$linkedElement.setAttribute("tabindex","-1"),this.$linkedElement.classList.add("tna-!--no-focus-style"),this.linkedElementListener||(this.$linkedElement.addEventListener("blur",(function(){return t.removeFocusProperties()})),this.linkedElementListener=!0)),this.$linkedElement.focus()}},{key:"removeFocusProperties",value:function(){this.$linkedElement.removeAttribute("tabindex"),this.$linkedElement.classList.remove("tna-!--no-focus-style")}}])&&r(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},973:(t,e,i)=>{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 r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function a(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(o)?o:String(o)),r)}var o}i.d(e,{Tabs:()=>s});var s=function(){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.$tabList=e&&e.querySelector(".tna-tabs__list"),this.$tabListItemLinks=e&&this.$tabList&&e.querySelectorAll(".tna-tabs__list-item-link"),this.$tabItems=e&&e.querySelectorAll(".tna-tabs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$tabList&&this.$tabListItemLinks&&this.$tabItems&&this.$tabListItemLinks.length===this.$tabItems.length){this.sticky=this.$module.classList.contains("tna-tabs--sticky");var e=window.location.hash.replace(/^#/,""),i=r(this.$tabItems).some((function(t){return t.getAttribute("id")===e}));this.$newTabList=document.createElement("div"),this.$newTabList.setAttribute("role","tablist"),this.$newTabList.setAttribute("class",this.$tabList.getAttribute("class")),this.$tabItems.forEach((function(t,n){t.setAttribute("role","tabpanel"),t.setAttribute("aria-labelledby","".concat(t.getAttribute("id"),"-tab")),t.setAttribute("tabindex","0"),(i&&t.getAttribute("id")!==e||!i&&n>0)&&t.setAttribute("hidden",!0)})),this.$tabListItemLinks.forEach((function(e){var i=document.createElement("button");i.innerText=e.innerText,i.setAttribute("class",e.getAttribute("class")),i.setAttribute("role","tab"),i.setAttribute("id",e.getAttribute("id")),i.setAttribute("aria-controls",e.getAttribute("href").replace(/^#/,"")),i.setAttribute("tabindex","-1"),t.$newTabList.appendChild(i)})),this.$tabList.replaceWith(this.$newTabList),this.$tabListItemLinks=this.$module.querySelectorAll(".tna-tabs__list-item-link"),this.$tabListItemLinks.forEach((function(i,n){e&&i.getAttribute("aria-controls")==="".concat(e)||!e&&0===n?(i.classList.add("tna-tabs__list-item-link--selected"),i.setAttribute("aria-selected",!0),i.setAttribute("tabindex","0")):i.setAttribute("aria-selected",!1),i.addEventListener("keydown",(function(e){return t.handleItemLinkKeyDown(e)}),!0),i.addEventListener("click",(function(e){return t.handleItemLinkClick(e)}),!0)}))}}},{key:"handleItemLinkClick",value:function(t){t.preventDefault();var e=t.currentTarget.getAttribute("aria-controls");this.switchTab(e)}},{key:"handleItemLinkKeyDown",value:function(t){var e=t.currentTarget,i=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":this.setSelectedToPreviousTab(e),i=!0;break;case"ArrowRight":case"ArrowDown":this.setSelectedToNextTab(e),i=!0;break;case"Home":this.switchTab(this.$tabListItemLinks[0].getAttribute("aria-controls")),i=!0;break;case"End":this.switchTab(this.$tabListItemLinks[this.$tabListItemLinks.length-1].getAttribute("aria-controls")),i=!0}i&&(t.stopPropagation(),t.preventDefault())}},{key:"setSelectedToNextTab",value:function(t){var e,i=r(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i<this.$tabListItemLinks.length-1?i+1:0,this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"setSelectedToPreviousTab",value:function(t){var e,i=r(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i>=1?i-1:this.$tabListItemLinks.length-1,this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"switchTab",value:function(t){this.$tabListItemLinks.forEach((function(e){e.getAttribute("aria-controls")===t?(e.classList.add("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!0),e.setAttribute("tabindex","0"),e.focus()):(e.classList.remove("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"))})),this.$tabItems.forEach((function(e){e.getAttribute("id")===t?(e.removeAttribute("hidden"),e.setAttribute("tabindex","0")):(e.setAttribute("hidden",!0),e.setAttribute("tabindex","-1"))})),this.sticky&&(history.replaceState?history.replaceState(null,null,"#".concat(t)):location.hash="#".concat(t))}}])&&a(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},774:(t,e,i)=>{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 r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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,d(n.key),n)}}function c(t,e,i){return e&&l(t.prototype,e),i&&l(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e,i){return(e=d(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function d(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}i.d(e,{Z:()=>b});var h=function(){function t(){if(s(this,t),u(this,"events",{}),t._instance)return t._instance;t._instance=this}return c(t,[{key:"on",value:function(t,e){var i;Object.prototype.hasOwnProperty.call(this.events,t)||(this.events[t]=[]),this.events[t]=[].concat(function(t){if(Array.isArray(t))return a(t)}(i=this.events[t])||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e])}},{key:"trigger",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.prototype.hasOwnProperty.call(this.events,t)&&this.events[t].forEach((function(t){return t.call(e,i)}))}}]),t}(),b=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,t),u(this,"extraPolicies",[]),u(this,"domain",""),u(this,"secure",!0),u(this,"policiesKey","");var n=i.domain,r=void 0===n?"":n,o=i.secure,a=void 0===o||o,l=i.policiesKey,c=void 0===l?"cookies_policy":l;this.extraPolicies=e,this.domain=r,this.secure=a,this.policiesKey=c,this.events=new h,this.init()}return c(t,[{key:"init",value:function(){this.savePolicies(o(o(o({},Object.fromEntries(this.extraPolicies.map((function(t){return[t.toLowerCase(),!1]})))),{},{usage:!1,settings:!1},this.policies),{},{essential:!0}))}},{key:"all",get:function(){var t={};return document.cookie.split("; ").filter((function(t){return t})).forEach((function(e){var i=e.trim().split("=");i[0]&&(t[i[0]]=i[1])})),t}},{key:"policies",get:function(){try{return JSON.parse(this.get(this.policiesKey)||"{}")}catch(t){return{}}}},{key:"exists",value:function(t){return Object.prototype.hasOwnProperty.call(this.all,t)}},{key:"hasValue",value:function(t,e){return this.get(t)==e}},{key:"get",value:function(t){return this.exists(t)?decodeURIComponent(this.all[t]):null}},{key:"set",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.maxAge,r=void 0===n?31536e3:n,o=i.path,a=void 0===o?"/":o,s=i.sameSite,l=void 0===s?"Lax":s,c=i.domain,u=void 0===c?this.domain:c,d=i.secure,h=void 0===d?this.secure:d;if(t){var b="".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e),";").concat(u?" domain=".concat(u,"; "):""," samesite=").concat(l,"; path=").concat(a,"; max-age=").concat(r).concat(h?"; secure":"");document.cookie=b,this.events.trigger("setCookie",{key:t,value:e,maxAge:r,path:a,sameSite:l,domain:u,secure:h,cookie:b})}}},{key:"delete",value:function(t){var e={maxAge:-1,path:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",domain:(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)||void 0};this.set(t,"",e),this.events.trigger("deleteCookie",o({key:t},e))}},{key:"deleteAll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Object.keys(this.all).forEach((function(n){t.delete(n,e,i)})),this.events.trigger("deleteAllCookies",{path:e,domain:i})}},{key:"acceptPolicy",value:function(t){this.setPolicy(t,!0),this.events.trigger("acceptPolicy",t),this.events.trigger("changePolicy",u({},t,!0))}},{key:"rejectPolicy",value:function(t){this.setPolicy(t,!1),this.events.trigger("rejectPolicy",t),this.events.trigger("changePolicy",u({},t,!1))}},{key:"setPolicy",value:function(t,e){var i;"essential"!==t&&(this.savePolicies(o(o({},this.policies),{},(u(i={},t,e),u(i,"essential",!0),i))),this.events.trigger("changePolicy",u({},t,e)))}},{key:"acceptAllPolicies",value:function(){var t=Object.fromEntries(Object.keys(this.policies).map((function(t){return[t.toLowerCase(),!0]})));this.savePolicies(t),this.events.trigger("acceptAllPolicies"),this.events.trigger("changePolicy",t)}},{key:"rejectAllPolicies",value:function(){var t=o(o({},Object.fromEntries(Object.keys(this.policies).map((function(t){return[t.toLowerCase(),!1]})))),{},{essential:!0});this.savePolicies(t),this.events.trigger("rejectAllPolicies"),this.events.trigger("changePolicy",t)}},{key:"savePolicies",value:function(t){this.set(this.policiesKey,JSON.stringify(t))}},{key:"isPolicyAccepted",value:function(t){return Object.prototype.hasOwnProperty.call(this.policies,t)?!0===this.policies[t]:null}},{key:"on",value:function(t,e){this.events.on(t,e)}}]),t}()},948:(t,e,i)=>{i.d(e,{Z:()=>n});const n=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,i),o.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{i.r(n),i.d(n,{Breadcrumbs:()=>t.Breadcrumbs,CookieBanner:()=>e.CookieBanner,Cookies:()=>u.Z,Gallery:()=>r.Gallery,Header:()=>o.Header,Picture:()=>a.Picture,SensitiveImage:()=>s.SensitiveImage,SkipLink:()=>l.SkipLink,Tabs:()=>c.Tabs,initAll:()=>h});var t=i(908),e=i(780),r=i(540),o=i(8),a=i(765),s=i(554),l=i(73),c=i(973),u=i(774),d=document.documentElement;d.classList.add("tna-template--js-enabled"),window.addEventListener("touchstart",(function t(){window.removeEventListener("touchstart",t),d.classList.add("tna-template--touched")})),window.addEventListener("keydown",(function(t){"Tab"===t.key&&(d.classList.add("tna-template--tabbed"),d.classList.remove("tna-template--clicked"))})),window.addEventListener("mousedown",(function(){d.classList.add("tna-template--clicked"),d.classList.remove("tna-template--tabbed")}));var h=function(i){var n=(i=void 0!==i?i:{}).scope instanceof HTMLElement?i.scope:document,u=n.querySelector('[data-module="tna-breadcrumbs"]');u&&new t.Breadcrumbs(u).init();var d=n.querySelector('[data-module="tna-cookie-banner"]');d&&new e.CookieBanner(d).init(),n.querySelectorAll('[data-module="tna-gallery"]').forEach((function(t){new r.Gallery(t).init()}));var h=n.querySelector('[data-module="tna-header"]');h&&new o.Header(h).init(),n.querySelectorAll('[data-module="tna-picture"]').forEach((function(t){new a.Picture(t).init()})),n.querySelectorAll('[data-module="tna-sensitive-image"]').forEach((function(t){new s.SensitiveImage(t).init()})),n.querySelectorAll('[data-module="tna-skip-link"]').forEach((function(t){new l.SkipLink(t).init()})),n.querySelectorAll('[data-module="tna-tabs"]').forEach((function(t){new c.Tabs(t).init()}))}})(),n})()));
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={908:(t,e,i)=>{i.d(e,{Breadcrumbs:()=>a});var n=i(948);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$breadcrumbsList=e&&e.querySelector(".tna-breadcrumbs__list"),this.$breadcrumbs=e&&this.$breadcrumbsList&&e.querySelectorAll(".tna-breadcrumbs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$breadcrumbsList&&this.$breadcrumbs&&this.$breadcrumbs.length>2&&!this.$module.classList.contains("tna-breadcrumbs--no-collapse")){var e="tna-breadcrumbs-".concat((0,n.Z)()),i=document.createElement("li");i.classList.add("tna-breadcrumbs__item","tna-breadcrumbs__item--expandable"),i.style.display="none";var r=document.createElement("button");r.classList.add("tna-breadcrumbs__link"),r.innerHTML="<span class='tna-!--visually-hidden'>Expand breadcrumbs</span>…",r.setAttribute("aria-expanded","false"),r.setAttribute("aria-controls",e),r.addEventListener("click",(function(){t.$module.classList.remove("tna-breadcrumbs--collapsed"),i.remove(),t.$module.setAttribute("tabindex","0"),t.$module.focus(),t.$module.setAttribute("tabindex","-1")})),i.appendChild(r),this.$breadcrumbsList.setAttribute("id",e),this.$breadcrumbsList.insertBefore(i,this.$breadcrumbs[this.$breadcrumbs.length-2].nextSibling),this.$module.classList.add("tna-breadcrumbs--collapsed")}}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},780:(t,e,i)=>{i.d(e,{CookieBanner:()=>a});var n=i(774);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$acceptButton=e&&e.querySelector('[value="accept"]'),this.$rejectButton=e&&e.querySelector('[value="reject"]'),this.$prompt=e&&e.querySelector(".tna-cookie-banner__message--prompt"),this.$acceptedMessage=e&&e.querySelector(".tna-cookie-banner__message--accepted"),this.$rejectedMessage=e&&e.querySelector(".tna-cookie-banner__message--rejected"),this.$closeButtons=e&&e.querySelectorAll('[value="close"]')}var e,i;return e=t,(i=[{key:"init",value:function(){var t,e=this;if(this.$module&&this.$acceptButton&&this.$rejectButton&&this.$prompt&&this.$acceptedMessage&&this.$rejectedMessage&&this.$closeButtons){var i=this.$module.getAttribute("data-policies")||"",r=this.$module.getAttribute("data-domain")||void 0,o=this.$module.getAttribute("data-path")||void 0,a=this.$module.getAttribute("data-secure")||void 0,s=this.$module.getAttribute("data-policies-key")||void 0;this.cookies=new((null===(t=window.TNAFrontend)||void 0===t?void 0:t.Cookies)||n.Z)(i.split(",").filter((function(t){return t})).map((function(t){return t.trim()})),{domain:r,path:o,secure:a,policiesKey:s}),this.cookiePreferencesSet=this.$module.getAttribute("data-preferenceskey")||"cookie_preferences_set",this.cookies.hasValue(this.cookiePreferencesSet,"true")||(this.$module.removeAttribute("hidden"),this.$acceptButton.addEventListener("click",(function(){return e.accept()})),this.$rejectButton.addEventListener("click",(function(){return e.reject()})))}}},{key:"accept",value:function(){this.$prompt.setAttribute("hidden",!0),this.complete(),this.$acceptedMessage.removeAttribute("hidden"),this.$acceptedMessage.focus(),this.$acceptedMessage.setAttribute("tabindex","-1"),this.cookies.acceptAllPolicies()}},{key:"reject",value:function(){this.$prompt.setAttribute("hidden",!0),this.complete(),this.$rejectedMessage.removeAttribute("hidden"),this.$rejectedMessage.focus(),this.$rejectedMessage.setAttribute("tabindex","-1"),this.cookies.rejectAllPolicies()}},{key:"complete",value:function(){var t=this;this.cookies.set(this.cookiePreferencesSet,!0),this.$closeButtons.forEach((function(e){e.addEventListener("click",(function(){return t.close()}))}))}},{key:"close",value:function(){this.$module.setAttribute("hidden",!0)}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},540:(t,e,i)=>{i.d(e,{Gallery:()=>a});var n=i(948);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$items=e&&e.querySelector(".tna-gallery__items"),this.opened=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$items&&(this.items=this.$module.querySelectorAll(".tna-gallery__item").length,this.items>1)){var e="tna-gallery-".concat((0,n.Z)());this.$module.classList.add("tna-gallery--collapsed"),this.$items.setAttribute("tabindex","-1"),this.$galleryToggle=document.createElement("button"),this.$galleryToggle.classList.add("tna-gallery__toggle","tna-button","tna-button--accent"),this.$galleryToggle.setAttribute("aria-controls",e),this.$galleryToggle.setAttribute("aria-expanded",!1),this.$galleryToggle.innerText="View ".concat(this.items," images"),this.$galleryToggle.addEventListener("click",(function(){t.handleToggleGallery()})),this.$galleryToggleWrapper=document.createElement("div"),this.$galleryToggleWrapper.classList.add("tna-column","tna-column--full","tna-gallery__toggle-wrapper"),this.$galleryToggleWrapper.appendChild(this.$galleryToggle),this.$items.parentElement.appendChild(this.$galleryToggleWrapper),this.$items.setAttribute("id",e)}}},{key:"handleToggleGallery",value:function(){this.opened=!this.opened,this.opened?(this.$module.classList.remove("tna-gallery--collapsed"),this.$galleryToggle.setAttribute("aria-expanded",!0),this.$galleryToggle.innerText="Close images",this.$items.setAttribute("tabindex","0"),this.$items.focus(),this.$items.setAttribute("tabindex","-1")):(this.$module.classList.add("tna-gallery--collapsed"),this.$galleryToggle.setAttribute("aria-expanded",!1),this.$galleryToggle.innerText="View ".concat(this.items," images"))}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},8:(t,e,i)=>{i.d(e,{Header:()=>a});var n=i(948);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$toggleButtonWrapper=e&&e.querySelector(".tna-header__navigation-toggle"),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: 768px)")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$toggleButtonWrapper&&this.$navigation){var e="tna-menu-content-".concat((0,n.Z)());this.$navigation.setAttribute("id",e),this.$toggleButton=document.createElement("button"),this.$toggleButton.innerText="Menu",this.$toggleButton.setAttribute("aria-controls",e),this.$toggleButton.setAttribute("aria-haspopup","true"),this.$toggleButton.classList.add("tna-header__navigation-toggle-button"),this.$hamburger=document.createElement("div"),this.$hamburger.classList.add("tna-header__hamburger"),this.$toggleButton.appendChild(this.$hamburger),this.$toggleButtonWrapper.appendChild(this.$toggleButton),this.syncState(),this.$toggleButton.addEventListener("click",(function(){return t.handleToggleNavigation()})),"addEventListener"in this.mql?this.mql.addEventListener("change",(function(){return t.syncState()})):this.mql.addListener((function(){return t.syncState()}))}}},{key:"handleToggleNavigation",value:function(){this.menuOpened=!this.menuOpened,this.syncState()}},{key:"syncState",value:function(){if(this.mql.matches)if(this.menuOpened){this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.hidden=!1,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-toggle-button--opened");for(var t=0;t<this.$links.length;t++)this.$links[t].setAttribute("tabindex","0")}else{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-toggle-button--opened");for(var e=0;e<this.$links.length;e++)this.$links[e].setAttribute("tabindex","-1")}else{this.$navigation.classList.add("tna-header__navigation--open"),this.$navigation.hidden=!1,this.$navigation.setAttribute("aria-hidden","false"),this.$toggleButton.setAttribute("aria-expanded","true"),this.$toggleButton.setAttribute("title","Close menu");for(var i=0;i<this.$links.length;i++)this.$links[i].setAttribute("tabindex","0")}}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},765:(t,e,i)=>{i.d(e,{Picture:()=>a});var n=i(948);function r(t){return r="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},r(t)}function o(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,(void 0,o=function(t,e){if("object"!==r(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===r(o)?o:String(o)),n)}var o}var a=function(){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.$imageWrapper=e&&e.querySelector(".tna-picture__image-wrapper"),this.$transcript=e&&e.querySelector(".tna-picture__transcript"),this.transcriptOpened=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$imageWrapper&&this.$transcript){var e="tna-picture-".concat((0,n.Z)());this.$transcriptToggle=document.createElement("button"),this.$transcriptToggle.classList.add("tna-picture__toggle-transcript","tna-button","tna-button--small","tna-button--accent","tna-button--solid-hover"),this.$transcriptToggle.setAttribute("aria-controls",e),this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText="Open transcript",this.$transcriptToggle.addEventListener("click",(function(){return t.handleToggleTranscript()})),this.$imageWrapper.appendChild(this.$transcriptToggle),this.$transcript.setAttribute("id",e),this.$transcript.setAttribute("hidden",!0)}}},{key:"handleToggleTranscript",value:function(){var t="tna-picture__toggle-transcript--opened";this.transcriptOpened=!this.transcriptOpened,this.transcriptOpened?(this.$transcriptToggle.classList.add(t),this.$transcriptToggle.setAttribute("aria-expanded",!0),this.$transcriptToggle.innerText="Close transcript",this.$transcript.removeAttribute("hidden")):(this.$transcriptToggle.classList.remove(t),this.$transcriptToggle.setAttribute("aria-expanded",!1),this.$transcriptToggle.innerText="Open transcript",this.$transcript.setAttribute("hidden",!0))}}])&&o(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},554:(t,e,i)=>{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 r(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(o)?o:String(o)),r)}var o}i.d(e,{SensitiveImage:()=>o});var o=function(){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.$imageDetails=e&&e.querySelector(".tna-sensitive-image__details"),this.$image=e&&e.querySelector(".tna-sensitive-image__image"),this.imageIsVisible=!1}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;this.$module&&this.$imageDetails&&this.$image&&this.$imageDetails.addEventListener("toggle",(function(){return t.handleImageDetailsToggle()}))}},{key:"handleImageDetailsToggle",value:function(){this.$imageDetails.hasAttribute("open")&&this.$image.focus({preventScroll:!0,focusVisible:!0})}}])&&r(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},73:(t,e,i)=>{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 r(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,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}i.d(e,{SkipLink:()=>a});var a=function(){function t(e){var i,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),i=this,(n=o(n="linkedElementListener"))in i?Object.defineProperty(i,n,{value:false,enumerable:!0,configurable:!0,writable:!0}):i[n]=false,this.$module=e,this.linkedElementId=e.getAttribute("href").split("#").pop(),this.$linkedElement=e&&this.linkedElementId&&document.getElementById(this.linkedElementId)}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;this.$module&&this.$linkedElement&&this.$module.addEventListener("click",(function(){return t.focusLinkedElement()}))}},{key:"focusLinkedElement",value:function(){var t=this;this.$linkedElement.getAttribute("tabindex")||(this.$linkedElement.setAttribute("tabindex","-1"),this.$linkedElement.classList.add("tna-!--no-focus-style"),this.linkedElementListener||(this.$linkedElement.addEventListener("blur",(function(){return t.removeFocusProperties()})),this.linkedElementListener=!0)),this.$linkedElement.focus()}},{key:"removeFocusProperties",value:function(){this.$linkedElement.removeAttribute("tabindex"),this.$linkedElement.classList.remove("tna-!--no-focus-style")}}])&&r(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},973:(t,e,i)=>{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 r(t){return function(t){if(Array.isArray(t))return o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return o(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function a(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===n(o)?o:String(o)),r)}var o}i.d(e,{Tabs:()=>s});var s=function(){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.$tabList=e&&e.querySelector(".tna-tabs__list"),this.$tabListItemLinks=e&&this.$tabList&&e.querySelectorAll(".tna-tabs__list-item-link"),this.$tabItems=e&&e.querySelectorAll(".tna-tabs__item")}var e,i;return e=t,(i=[{key:"init",value:function(){var t=this;if(this.$module&&this.$tabList&&this.$tabListItemLinks&&this.$tabItems&&this.$tabListItemLinks.length===this.$tabItems.length){this.sticky=this.$module.classList.contains("tna-tabs--sticky");var e=window.location.hash.replace(/^#/,""),i=r(this.$tabItems).some((function(t){return t.getAttribute("id")===e}));this.$newTabList=document.createElement("div"),this.$newTabList.setAttribute("role","tablist"),this.$newTabList.setAttribute("class",this.$tabList.getAttribute("class")),this.$tabItems.forEach((function(t,n){t.setAttribute("role","tabpanel"),t.setAttribute("aria-labelledby","".concat(t.getAttribute("id"),"-tab")),t.setAttribute("tabindex","0"),(i&&t.getAttribute("id")!==e||!i&&n>0)&&t.setAttribute("hidden",!0)})),this.$tabListItemLinks.forEach((function(e){var i,n=document.createElement("button");n.innerText=e.innerText,n.setAttribute("class",e.getAttribute("class")),n.setAttribute("role","tab"),n.setAttribute("id",e.getAttribute("id")),n.setAttribute("aria-controls",null===(i=e.getAttribute("href"))||void 0===i?void 0:i.replace(/^#/,"")),n.setAttribute("tabindex","-1"),t.$newTabList.appendChild(n)})),this.$tabList.replaceWith(this.$newTabList),this.$tabListItemLinks=this.$module.querySelectorAll(".tna-tabs__list-item-link"),this.$tabListItemLinks.forEach((function(i,n){e&&i.getAttribute("aria-controls")==="".concat(e)||!e&&0===n?(i.classList.add("tna-tabs__list-item-link--selected"),i.setAttribute("aria-selected",!0),i.setAttribute("tabindex","0")):i.setAttribute("aria-selected",!1),i.addEventListener("keydown",(function(e){return t.handleItemLinkKeyDown(e)}),!0),i.addEventListener("click",(function(e){return t.handleItemLinkClick(e)}),!0)}))}}},{key:"handleItemLinkClick",value:function(t){t.preventDefault();var e=t.currentTarget.getAttribute("aria-controls");this.switchTab(e)}},{key:"handleItemLinkKeyDown",value:function(t){var e=t.currentTarget,i=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":this.setSelectedToPreviousTab(e),i=!0;break;case"ArrowRight":case"ArrowDown":this.setSelectedToNextTab(e),i=!0;break;case"Home":this.switchTab(this.$tabListItemLinks[0].getAttribute("aria-controls")),i=!0;break;case"End":this.switchTab(this.$tabListItemLinks[this.$tabListItemLinks.length-1].getAttribute("aria-controls")),i=!0}i&&(t.stopPropagation(),t.preventDefault())}},{key:"setSelectedToNextTab",value:function(t){var e,i=r(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i<this.$tabListItemLinks.length-1?i+1:0,this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"setSelectedToPreviousTab",value:function(t){var e,i=r(this.$tabListItemLinks).findIndex((function(e){return e.getAttribute("id")===t.getAttribute("id")}));e=i>=1?i-1:this.$tabListItemLinks.length-1,this.switchTab(this.$tabListItemLinks[e].getAttribute("aria-controls"))}},{key:"switchTab",value:function(t){this.$tabListItemLinks.forEach((function(e){e.getAttribute("aria-controls")===t?(e.classList.add("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!0),e.setAttribute("tabindex","0"),e.focus()):(e.classList.remove("tna-tabs__list-item-link--selected"),e.setAttribute("aria-selected",!1),e.setAttribute("tabindex","-1"))})),this.$tabItems.forEach((function(e){e.getAttribute("id")===t?(e.removeAttribute("hidden"),e.setAttribute("tabindex","0")):(e.setAttribute("hidden",!0),e.setAttribute("tabindex","-1"))})),this.sticky&&(history.replaceState?history.replaceState(null,null,"#".concat(t)):location.hash="#".concat(t))}}])&&a(e.prototype,i),Object.defineProperty(e,"prototype",{writable:!1}),t}()},774:(t,e,i)=>{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 r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function o(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(Object(i),!0).forEach((function(e){u(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function l(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,d(n.key),n)}}function c(t,e,i){return e&&l(t.prototype,e),i&&l(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function u(t,e,i){return(e=d(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function d(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}i.d(e,{Z:()=>b});var h=function(){function t(){if(s(this,t),u(this,"events",{}),t._instance)return t._instance;t._instance=this}return c(t,[{key:"on",value:function(t,e){var i;Object.prototype.hasOwnProperty.call(this.events,t)||(this.events[t]=[]),this.events[t]=[].concat(function(t){if(Array.isArray(t))return a(t)}(i=this.events[t])||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[e])}},{key:"trigger",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object.prototype.hasOwnProperty.call(this.events,t)&&this.events[t].forEach((function(t){return t.call(e,i)}))}}]),t}(),b=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};s(this,t),u(this,"extraPolicies",[]),u(this,"domain",""),u(this,"path",""),u(this,"secure",!0),u(this,"policiesKey","");var n=i.domain,r=void 0===n?"":n,o=i.path,a=void 0===o?"/":o,l=i.secure,c=void 0===l||l,d=i.policiesKey,b=void 0===d?"cookies_policy":d;this.extraPolicies=e,this.domain=r,this.path=a,this.secure=c,this.policiesKey=b,this.events=new h,this.init()}return c(t,[{key:"init",value:function(){this.savePolicies(o(o(o({},Object.fromEntries(this.extraPolicies.map((function(t){return[t.toLowerCase(),!1]})))),{},{usage:!1,settings:!1},this.policies),{},{essential:!0}))}},{key:"all",get:function(){var t={};return document.cookie.split("; ").filter((function(t){return t})).forEach((function(e){var i=e.trim().split("=");i[0]&&(t[i[0]]=i[1])})),t}},{key:"policies",get:function(){try{return JSON.parse(this.get(this.policiesKey)||"{}")}catch(t){return{}}}},{key:"exists",value:function(t){return Object.prototype.hasOwnProperty.call(this.all,t)}},{key:"hasValue",value:function(t,e){return this.get(t)==e}},{key:"get",value:function(t){return this.exists(t)?decodeURIComponent(this.all[t]):null}},{key:"set",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.maxAge,r=void 0===n?31536e3:n,o=i.sameSite,a=void 0===o?"Lax":o,s=i.domain,l=void 0===s?this.domain:s,c=i.path,u=void 0===c?this.path:c,d=i.secure,h=void 0===d?this.secure:d;if(t){var b="".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e),";").concat(l?" domain=".concat(l,"; "):""," samesite=").concat(a,"; path=").concat(u,"; max-age=").concat(r).concat(h?"; secure":"");document.cookie=b,this.events.trigger("setCookie",{key:t,value:e,maxAge:r,path:u,sameSite:a,domain:l,secure:h,cookie:b})}}},{key:"delete",value:function(t){var e={maxAge:-1,path:arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",domain:(arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)||void 0};this.set(t,"",e),this.events.trigger("deleteCookie",o({key:t},e))}},{key:"deleteAll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Object.keys(this.all).forEach((function(n){t.delete(n,e,i)})),this.events.trigger("deleteAllCookies",{path:e,domain:i})}},{key:"acceptPolicy",value:function(t){this.setPolicy(t,!0),this.events.trigger("acceptPolicy",t),this.events.trigger("changePolicy",u({},t,!0))}},{key:"rejectPolicy",value:function(t){this.setPolicy(t,!1),this.events.trigger("rejectPolicy",t),this.events.trigger("changePolicy",u({},t,!1))}},{key:"setPolicy",value:function(t,e){"essential"!==t&&(this.savePolicies(o(o({},this.policies),{},u(u({},t,e),"essential",!0))),this.events.trigger("changePolicy",u({},t,e)))}},{key:"acceptAllPolicies",value:function(){var t=Object.fromEntries(Object.keys(this.policies).map((function(t){return[t.toLowerCase(),!0]})));this.savePolicies(t),this.events.trigger("acceptAllPolicies"),this.events.trigger("changePolicy",t)}},{key:"rejectAllPolicies",value:function(){var t=o(o({},Object.fromEntries(Object.keys(this.policies).map((function(t){return[t.toLowerCase(),!1]})))),{},{essential:!0});this.savePolicies(t),this.events.trigger("rejectAllPolicies"),this.events.trigger("changePolicy",t)}},{key:"savePolicies",value:function(t){this.set(this.policiesKey,JSON.stringify(t))}},{key:"isPolicyAccepted",value:function(t){return Object.prototype.hasOwnProperty.call(this.policies,t)?!0===this.policies[t]:null}},{key:"on",value:function(t,e){this.events.on(t,e)}}]),t}()},948:(t,e,i)=>{i.d(e,{Z:()=>n});const n=function(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(t){return(t^crypto.getRandomValues(new Uint8Array(1))[0]&15>>t/4).toString(16)}))}}},e={};function i(n){var r=e[n];if(void 0!==r)return r.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,i),o.exports}i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{i.r(n),i.d(n,{Breadcrumbs:()=>t.Breadcrumbs,CookieBanner:()=>e.CookieBanner,Cookies:()=>u.Z,Gallery:()=>r.Gallery,Header:()=>o.Header,Picture:()=>a.Picture,SensitiveImage:()=>s.SensitiveImage,SkipLink:()=>l.SkipLink,Tabs:()=>c.Tabs,initAll:()=>h});var t=i(908),e=i(780),r=i(540),o=i(8),a=i(765),s=i(554),l=i(73),c=i(973),u=i(774),d=document.documentElement;d.classList.add("tna-template--js-enabled"),window.addEventListener("touchstart",(function t(){window.removeEventListener("touchstart",t),d.classList.add("tna-template--touched")})),window.addEventListener("keydown",(function(t){"Tab"===t.key&&(d.classList.add("tna-template--tabbed"),d.classList.remove("tna-template--clicked"))})),window.addEventListener("mousedown",(function(){d.classList.add("tna-template--clicked"),d.classList.remove("tna-template--tabbed")}));var h=function(i){var n=(i=void 0!==i?i:{}).scope instanceof HTMLElement?i.scope:document,u=n.querySelector('[data-module="tna-breadcrumbs"]');u&&new t.Breadcrumbs(u).init();var d=n.querySelector('[data-module="tna-cookie-banner"]');d&&new e.CookieBanner(d).init(),n.querySelectorAll('[data-module="tna-gallery"]').forEach((function(t){new r.Gallery(t).init()}));var h=n.querySelector('[data-module="tna-header"]');h&&new o.Header(h).init(),n.querySelectorAll('[data-module="tna-picture"]').forEach((function(t){new a.Picture(t).init()})),n.querySelectorAll('[data-module="tna-sensitive-image"]').forEach((function(t){new s.SensitiveImage(t).init()})),n.querySelectorAll('[data-module="tna-skip-link"]').forEach((function(t){new l.SkipLink(t).init()})),n.querySelectorAll('[data-module="tna-tabs"]').forEach((function(t){new c.Tabs(t).init()}))}})(),n})()));
|
2
2
|
//# sourceMappingURL=all.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"all.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mvBCPF,IAAMC,EAAW,WACtB,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,iBACHH,GAAWA,EAAQI,cAAc,0BACnCF,KAAKG,aACHL,GACAE,KAAKC,kBACLH,EAAQM,iBAAiB,yBAC7B,C,QA4CC,O,EA5CAP,G,EAAA,EAAAQ,IAAA,OAAAC,MAED,WAAO,IAAAC,EAAA,KACL,GAAKP,KAAKF,SAAYE,KAAKC,kBAAqBD,KAAKG,cAKnDH,KAAKG,aAAaK,OAAS,IAC1BR,KAAKF,QAAQW,UAAUC,SAAS,gCACjC,CAC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alModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs","webpack://TNAFrontend/./src/nationalarchives/components/cookie-banner/cookie-banner.mjs","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs","webpack://TNAFrontend/./src/nationalarchives/components/sensitive-image/sensitive-image.mjs","webpack://TNAFrontend/./src/nationalarchives/components/skip-link/skip-link.mjs","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.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/all.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([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n constructor($module) {\n this.$module = $module;\n this.$breadcrumbsList =\n $module && $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n }\n\n init() {\n if (!this.$module || !this.$breadcrumbsList || !this.$breadcrumbs) {\n return;\n }\n\n if (\n this.$breadcrumbs.length > 2 &&\n !this.$module.classList.contains(\"tna-breadcrumbs--no-collapse\")\n ) {\n const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n const $expandable = document.createElement(\"li\");\n $expandable.classList.add(\n \"tna-breadcrumbs__item\",\n \"tna-breadcrumbs__item--expandable\",\n );\n $expandable.style.display = \"none\";\n\n const $expandButton = document.createElement(\"button\");\n $expandButton.classList.add(\"tna-breadcrumbs__link\");\n $expandButton.innerHTML =\n \"<span class='tna-visually-hidden'>Expand breadcrumbs</span>…\";\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n $expandButton.addEventListener(\"click\", () => {\n this.$module.classList.remove(\"tna-breadcrumbs--collapsed\");\n $expandable.remove();\n this.$module.setAttribute(\"tabindex\", \"0\");\n this.$module.focus();\n this.$module.setAttribute(\"tabindex\", \"-1\");\n });\n\n $expandable.appendChild($expandButton);\n\n this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n this.$breadcrumbsList.insertBefore(\n $expandable,\n this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n );\n\n this.$module.classList.add(\"tna-breadcrumbs--collapsed\");\n }\n }\n}\n","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class CookieBanner {\n constructor($module) {\n this.$module = $module;\n this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n this.$prompt =\n $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n this.$acceptedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n this.$rejectedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n }\n\n init() {\n if (\n !this.$module ||\n !this.$acceptButton ||\n !this.$rejectButton ||\n !this.$prompt ||\n !this.$acceptedMessage ||\n !this.$rejectedMessage ||\n !this.$closeButtons\n ) {\n return;\n }\n\n const policies = this.$module.getAttribute(\"data-policies\") || \"\";\n const domain = this.$module.getAttribute(\"data-domain\") || undefined;\n const secure = this.$module.getAttribute(\"data-secure\") || undefined;\n const policiesKey =\n this.$module.getAttribute(\"data-policies-key\") || undefined;\n\n this.cookies = new (window.TNAFrontend?.Cookies || Cookies)(\n policies\n .split(\",\")\n .filter((x) => x)\n .map((policy) => policy.trim()),\n {\n domain,\n secure,\n policiesKey,\n },\n );\n\n this.cookiePreferencesSet =\n this.$module.getAttribute(\"data-preferenceskey\") ||\n \"cookie_preferences_set\";\n const cookiePreferencesSet = this.cookies.hasValue(\n this.cookiePreferencesSet,\n \"true\",\n );\n\n if (!cookiePreferencesSet) {\n this.$module.removeAttribute(\"hidden\");\n\n this.$acceptButton.addEventListener(\"click\", () => this.accept());\n this.$rejectButton.addEventListener(\"click\", () => this.reject());\n }\n }\n\n accept() {\n this.$prompt.setAttribute(\"hidden\", true);\n this.complete();\n this.$acceptedMessage.removeAttribute(\"hidden\");\n this.$acceptedMessage.focus();\n this.$acceptedMessage.setAttribute(\"tabindex\", \"-1\");\n this.cookies.acceptAllPolicies();\n }\n\n reject() {\n this.$prompt.setAttribute(\"hidden\", true);\n this.complete();\n this.$rejectedMessage.removeAttribute(\"hidden\");\n this.$rejectedMessage.focus();\n this.$rejectedMessage.setAttribute(\"tabindex\", \"-1\");\n this.cookies.rejectAllPolicies();\n }\n\n complete() {\n this.cookies.set(this.cookiePreferencesSet, true);\n this.$closeButtons.forEach(($closeButton) => {\n $closeButton.addEventListener(\"click\", () => this.close());\n });\n }\n\n close() {\n this.$module.setAttribute(\"hidden\", true);\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$items = $module && $module.querySelector(\".tna-gallery__items\");\n this.opened = false;\n }\n\n init() {\n if (!this.$module || !this.$items) {\n return;\n }\n\n const supportTouchHorizontal = false;\n\n this.items = this.$module.querySelectorAll(\".tna-gallery__item\").length;\n\n if (this.items > 1) {\n const uniqueId = `tna-gallery-${uuidv4()}`;\n\n this.$module.classList.add(\"tna-gallery--collapsed\");\n this.$items.setAttribute(\"tabindex\", \"-1\");\n\n this.$galleryToggle = document.createElement(\"button\");\n this.$galleryToggle.classList.add(\n \"tna-gallery__toggle\",\n \"tna-button\",\n \"tna-button--accent\",\n );\n this.$galleryToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n this.$galleryToggle.innerText = `View ${this.items} images`;\n\n const onFirstTouch = () => {\n this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n this.$module.classList.add(\"tna-gallery--touchable\");\n };\n\n if (supportTouchHorizontal) {\n this.$module.addEventListener(\"touchstart\", onFirstTouch);\n }\n\n this.$galleryToggle.addEventListener(\"click\", () => {\n if (supportTouchHorizontal) {\n this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n }\n this.handleToggleGallery();\n });\n\n this.$galleryToggleWrapper = document.createElement(\"div\");\n this.$galleryToggleWrapper.classList.add(\n \"tna-column\",\n \"tna-column--full\",\n \"tna-gallery__toggle-wrapper\",\n );\n\n this.$galleryToggleWrapper.appendChild(this.$galleryToggle);\n this.$items.parentElement.appendChild(this.$galleryToggleWrapper);\n\n this.$items.setAttribute(\"id\", uniqueId);\n }\n }\n\n handleToggleGallery() {\n this.opened = !this.opened;\n if (this.opened) {\n this.$module.classList.remove(\"tna-gallery--collapsed\");\n this.$galleryToggle.setAttribute(\"aria-expanded\", true);\n this.$galleryToggle.innerText = \"Close images\";\n this.$items.setAttribute(\"tabindex\", \"0\");\n this.$items.focus();\n this.$items.setAttribute(\"tabindex\", \"-1\");\n } else {\n this.$module.classList.add(\"tna-gallery--collapsed\");\n this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n this.$galleryToggle.innerText = `View ${this.items} images`;\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButtonWrapper =\n $module && $module.querySelector(\".tna-header__navigation-toggle\");\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: 768px)\");\n }\n\n init() {\n if (!this.$module || !this.$toggleButtonWrapper || !this.$navigation) {\n return;\n }\n\n const uniqueId = `tna-menu-content-${uuidv4()}`;\n this.$navigation.setAttribute(\"id\", uniqueId);\n\n this.$toggleButton = document.createElement(\"button\");\n this.$toggleButton.innerText = \"Menu\";\n this.$toggleButton.setAttribute(\"aria-controls\", uniqueId);\n this.$toggleButton.setAttribute(\"aria-haspopup\", \"true\");\n this.$toggleButton.classList.add(\"tna-header__navigation-toggle-button\");\n\n this.$hamburger = document.createElement(\"div\");\n this.$hamburger.classList.add(\"tna-header__hamburger\");\n\n this.$toggleButton.appendChild(this.$hamburger);\n this.$toggleButtonWrapper.appendChild(this.$toggleButton);\n\n this.syncState();\n\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\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\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.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\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(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n } else {\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-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n } else {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n }\n\n init() {\n if (!this.$module || !this.$imageWrapper || !this.$transcript) {\n return;\n }\n\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle = document.createElement(\"button\");\n this.$transcriptToggle.classList.add(\n \"tna-picture__toggle-transcript\",\n \"tna-button\",\n \"tna-button--small\",\n \"tna-button--accent\",\n \"tna-button--solid-hover\",\n );\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = \"Open transcript\";\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.handleToggleTranscript(),\n );\n this.$imageWrapper.appendChild(this.$transcriptToggle);\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", true);\n // this.$transcript.setAttribute(\"tabindex\", \"-1\");\n }\n\n handleToggleTranscript() {\n const transcriptToggleOpenedClass =\n \"tna-picture__toggle-transcript--opened\";\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.classList.add(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = \"Close transcript\";\n this.$transcript.removeAttribute(\"hidden\");\n // this.$transcript.setAttribute(\"tabindex\", \"0\");\n // this.$transcript.focus();\n // this.$transcript.setAttribute(\"tabindex\", \"-1\");\n } else {\n this.$transcriptToggle.classList.remove(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = \"Open transcript\";\n this.$transcript.setAttribute(\"hidden\", true);\n }\n }\n}\n","export class SensitiveImage {\n constructor($module) {\n this.$module = $module;\n this.$imageDetails =\n $module && $module.querySelector(\".tna-sensitive-image__details\");\n this.$image =\n $module && $module.querySelector(\".tna-sensitive-image__image\");\n this.imageIsVisible = false;\n }\n\n init() {\n if (!this.$module || !this.$imageDetails || !this.$image) {\n return;\n }\n this.$imageDetails.addEventListener(\"toggle\", () =>\n this.handleImageDetailsToggle(),\n );\n }\n\n handleImageDetailsToggle() {\n if (this.$imageDetails.hasAttribute(\"open\")) {\n this.$image.focus({ preventScroll: true, focusVisible: true });\n }\n }\n}\n","export class SkipLink {\n linkedElementListener = false;\n\n constructor($module) {\n this.$module = $module;\n this.linkedElementId = $module.getAttribute(\"href\").split(\"#\").pop();\n this.$linkedElement =\n $module &&\n this.linkedElementId &&\n document.getElementById(this.linkedElementId);\n }\n\n init() {\n if (!this.$module || !this.$linkedElement) {\n return;\n }\n this.$module.addEventListener(\"click\", () => this.focusLinkedElement());\n }\n\n focusLinkedElement() {\n if (!this.$linkedElement.getAttribute(\"tabindex\")) {\n this.$linkedElement.setAttribute(\"tabindex\", \"-1\");\n this.$linkedElement.classList.add(\"tna-!--no-focus-style\");\n\n if (!this.linkedElementListener) {\n this.$linkedElement.addEventListener(\"blur\", () =>\n this.removeFocusProperties(),\n );\n this.linkedElementListener = true;\n }\n }\n\n this.$linkedElement.focus();\n }\n\n removeFocusProperties() {\n this.$linkedElement.removeAttribute(\"tabindex\");\n this.$linkedElement.classList.remove(\"tna-!--no-focus-style\");\n }\n}\n","export class Tabs {\n constructor($module) {\n this.$module = $module;\n this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n this.$tabListItemLinks =\n $module &&\n this.$tabList &&\n $module.querySelectorAll(\".tna-tabs__list-item-link\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n const startingTarget = window.location.hash.replace(/^#/, \"\");\n const doesStartingTargetExist = [...this.$tabItems].some(\n ($tabItem) => $tabItem.getAttribute(\"id\") === startingTarget,\n );\n\n this.$newTabList = document.createElement(\"div\");\n this.$newTabList.setAttribute(\"role\", \"tablist\");\n this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n this.$tabItems.forEach(($tabItem, index) => {\n $tabItem.setAttribute(\"role\", \"tabpanel\");\n $tabItem.setAttribute(\n \"aria-labelledby\",\n `${$tabItem.getAttribute(\"id\")}-tab`,\n );\n $tabItem.setAttribute(\"tabindex\", \"0\");\n if (\n (doesStartingTargetExist &&\n $tabItem.getAttribute(\"id\") !== startingTarget) ||\n (!doesStartingTargetExist && index > 0)\n ) {\n $tabItem.setAttribute(\"hidden\", true);\n }\n });\n\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const $replacementButton = document.createElement(\"button\");\n $replacementButton.innerText = $tabListItemLink.innerText;\n $replacementButton.setAttribute(\n \"class\",\n $tabListItemLink.getAttribute(\"class\"),\n );\n $replacementButton.setAttribute(\"role\", \"tab\");\n $replacementButton.setAttribute(\n \"id\",\n $tabListItemLink.getAttribute(\"id\"),\n );\n $replacementButton.setAttribute(\n \"aria-controls\",\n $tabListItemLink.getAttribute(\"href\").replace(/^#/, \"\"),\n );\n $replacementButton.setAttribute(\"tabindex\", \"-1\");\n this.$newTabList.appendChild($replacementButton);\n });\n\n this.$tabList.replaceWith(this.$newTabList);\n\n this.$tabListItemLinks = this.$module.querySelectorAll(\n \".tna-tabs__list-item-link\",\n );\n\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (\n (startingTarget &&\n $tabListItemLink.getAttribute(\"aria-controls\") ===\n `${startingTarget}`) ||\n (!startingTarget && index === 0)\n ) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n }\n\n $tabListItemLink.addEventListener(\n \"keydown\",\n (e) => this.handleItemLinkKeyDown(e),\n true,\n );\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n this.switchTab(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n const targetItem = itemLinkKeyDownEvent.currentTarget;\n let overwriteKeyAction = false;\n\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.setSelectedToPreviousTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.setSelectedToNextTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"Home\":\n this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n overwriteKeyAction = true;\n break;\n\n case \"End\":\n this.switchTab(\n this.$tabListItemLinks[\n this.$tabListItemLinks.length - 1\n ].getAttribute(\"aria-controls\"),\n );\n overwriteKeyAction = true;\n break;\n\n default:\n break;\n }\n\n if (overwriteKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n setSelectedToNextTab(targetItem) {\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex < this.$tabListItemLinks.length - 1) {\n newIndex = currentIndex + 1;\n } else {\n newIndex = 0;\n }\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n setSelectedToPreviousTab(targetItem) {\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex >= 1) {\n newIndex = currentIndex - 1;\n } else {\n newIndex = this.$tabListItemLinks.length - 1;\n }\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n switchTab(targetId) {\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n $tabListItemLink.focus();\n } else {\n $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n this.$tabItems.forEach(($tabItem) => {\n if ($tabItem.getAttribute(\"id\") === targetId) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", true);\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n if (this.sticky) {\n if (history.replaceState) {\n history.replaceState(null, null, `#${targetId}`);\n } else {\n location.hash = `#${targetId}`;\n }\n }\n }\n}\n","export class CookieEventHandler {\n events = {};\n\n constructor() {\n if (CookieEventHandler._instance) {\n return CookieEventHandler._instance;\n }\n CookieEventHandler._instance = this;\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.prototype.hasOwnProperty.call(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.prototype.hasOwnProperty.call(this.events, event)) {\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n }\n}\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n extraPolicies = [];\n /** @protected */\n domain = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n\n /**\n * Create a cookie handler.\n * @param {string[]} [extraPolicies=[]] - The extra cookie policies to manage in addition to essential, settings and usage.\n * @param {string} [options.domain=\"\"] - The domain to register the cookie with.\n * @param {string} [options.secure=true] - Only set cookie in HTTPS environments.\n * @param {string} [options.policiesKey=cookies_policy] - The name of the cookie.\n */\n constructor(extraPolicies = [], options = {}) {\n const {\n domain = \"\",\n secure = true,\n policiesKey = \"cookies_policy\",\n } = options;\n this.extraPolicies = extraPolicies;\n this.domain = domain;\n this.secure = secure;\n this.policiesKey = policiesKey;\n this.events = new CookieEventHandler();\n this.init();\n }\n\n /** @protected */\n init() {\n this.savePolicies({\n ...Object.fromEntries(\n this.extraPolicies.map((k) => [k.toLowerCase(), false]),\n ),\n usage: false,\n settings: false,\n ...this.policies,\n essential: true,\n });\n }\n\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((x) => x)\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n if (parts[0]) {\n deserialised[parts[0]] = parts[1];\n }\n });\n return deserialised;\n }\n\n get policies() {\n try {\n return JSON.parse(this.get(this.policiesKey) || \"{}\");\n } catch (e) {\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.prototype.hasOwnProperty.call(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}\n */\n get(key) {\n return this.exists(key) ? decodeURIComponent(this.all[key]) : 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=31536000] - 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.domain] - The domain to register the cookie with.\n * @param {string} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n */\n set(key, value, options = {}) {\n const {\n maxAge = 60 * 60 * 24 * 365,\n path = \"/\",\n sameSite = \"Lax\",\n domain = this.domain,\n secure = this.secure,\n } = options;\n if (!key) {\n return;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)};${\n domain ? ` domain=${domain}; ` : \"\"\n } samesite=${sameSite}; path=${path}; max-age=${maxAge}${\n secure ? \"; secure\" : \"\"\n }`;\n document.cookie = cookie;\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\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 = null) {\n const options = { maxAge: -1, path, domain: domain || undefined };\n this.set(key, \"\", options);\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = null) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\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.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.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 return;\n }\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 const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((k) => [k.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 const allPolicies = {\n ...Object.fromEntries(\n Object.keys(this.policies).map((k) => [k.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.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 return Object.prototype.hasOwnProperty.call(this.policies, policy)\n ? this.policies[policy] === true\n : 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.events.on(event, callback);\n }\n}\n","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\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 { Breadcrumbs } from \"./components/breadcrumbs/breadcrumbs.mjs\";\nimport { CookieBanner } from \"./components/cookie-banner/cookie-banner.mjs\";\nimport { Gallery } from \"./components/gallery/gallery.mjs\";\nimport { Header } from \"./components/header/header.mjs\";\nimport { Picture } from \"./components/picture/picture.mjs\";\nimport { SensitiveImage } from \"./components/sensitive-image/sensitive-image.mjs\";\nimport { SkipLink } from \"./components/skip-link/skip-link.mjs\";\nimport { Tabs } from \"./components/tabs/tabs.mjs\";\nimport Cookies from \"./lib/cookies.mjs\";\n\nconst $body = document.documentElement;\n$body.classList.add(\"tna-template--js-enabled\");\n\nconst onFirstTouch = () => {\n window.removeEventListener(\"touchstart\", onFirstTouch);\n $body.classList.add(\"tna-template--touched\");\n};\n\nconst onKeyDown = (e) => {\n if (e.key === \"Tab\") {\n $body.classList.add(\"tna-template--tabbed\");\n $body.classList.remove(\"tna-template--clicked\");\n }\n};\n\nconst onMouseDown = () => {\n $body.classList.add(\"tna-template--clicked\");\n $body.classList.remove(\"tna-template--tabbed\");\n};\n\nwindow.addEventListener(\"touchstart\", onFirstTouch);\nwindow.addEventListener(\"keydown\", onKeyDown);\nwindow.addEventListener(\"mousedown\", onMouseDown);\n\n// if (document.documentElement.classList.contains(\"tna-template--system-theme\")) {\n// document.documentElement.classList.add(\n// window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n// ? \"tna-template--dark-theme\"\n// : \"tna-template--light-theme\",\n// );\n// if (window.matchMedia(\"(prefers-contrast: more)\").matches) {\n// document.documentElement.classList.add(\"tna-template--high-contrast-theme\");\n// }\n// }\n\nconst initAll = (options) => {\n options = typeof options !== \"undefined\" ? options : {};\n const $scope =\n options.scope instanceof HTMLElement ? options.scope : document;\n\n const $breadcrumbs = $scope.querySelector('[data-module=\"tna-breadcrumbs\"]');\n if ($breadcrumbs) {\n new Breadcrumbs($breadcrumbs).init();\n }\n\n const $cookieBanner = $scope.querySelector(\n '[data-module=\"tna-cookie-banner\"]',\n );\n if ($cookieBanner) {\n new CookieBanner($cookieBanner).init();\n }\n\n const $galleries = $scope.querySelectorAll('[data-module=\"tna-gallery\"]');\n $galleries.forEach(($gallery) => {\n new Gallery($gallery).init();\n });\n\n const $header = $scope.querySelector('[data-module=\"tna-header\"]');\n if ($header) {\n new Header($header).init();\n }\n\n const $pictures = $scope.querySelectorAll('[data-module=\"tna-picture\"]');\n $pictures.forEach(($picture) => {\n new Picture($picture).init();\n });\n\n const $sensitiveImages = $scope.querySelectorAll(\n '[data-module=\"tna-sensitive-image\"]',\n );\n $sensitiveImages.forEach(($sensitiveImage) => {\n new SensitiveImage($sensitiveImage).init();\n });\n\n const $skipLinks = $scope.querySelectorAll('[data-module=\"tna-skip-link\"]');\n $skipLinks.forEach(($skipLink) => {\n new SkipLink($skipLink).init();\n });\n\n const $tabs = $scope.querySelectorAll('[data-module=\"tna-tabs\"]');\n $tabs.forEach(($tabModule) => {\n new Tabs($tabModule).init();\n });\n};\n\nexport {\n initAll,\n Cookies,\n Breadcrumbs,\n CookieBanner,\n Gallery,\n Header,\n Picture,\n SensitiveImage,\n SkipLink,\n Tabs,\n};\n"],"names":["root","factory","exports","module","define","amd","self","Breadcrumbs","$module","_classCallCheck","this","$breadcrumbsList","querySelector","$breadcrumbs","querySelectorAll","key","value","_this","length","classList","contains","uniqueId","concat","uuidv4","$expandable","document","createElement","add","style","display","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling","CookieBanner","$acceptButton","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","_window$TNAFrontend","policies","getAttribute","domain","undefined","secure","policiesKey","cookies","window","TNAFrontend","Cookies","split","filter","x","map","policy","trim","cookiePreferencesSet","hasValue","removeAttribute","accept","reject","complete","acceptAllPolicies","rejectAllPolicies","_this2","set","forEach","$closeButton","close","Gallery","$items","opened","items","$galleryToggle","innerText","handleToggleGallery","$galleryToggleWrapper","parentElement","Header","$toggleButtonWrapper","$navigation","$links","menuOpened","mql","matchMedia","$toggleButton","$hamburger","syncState","handleToggleNavigation","addListener","matches","hidden","i","Picture","$imageWrapper","$transcript","transcriptOpened","$transcriptToggle","handleToggleTranscript","transcriptToggleOpenedClass","SensitiveImage","$imageDetails","$image","imageIsVisible","handleImageDetailsToggle","hasAttribute","preventScroll","focusVisible","SkipLink","linkedElementId","pop","$linkedElement","getElementById","focusLinkedElement","linkedElementListener","removeFocusProperties","Tabs","$tabList","$tabListItemLinks","$tabItems","sticky","startingTarget","location","hash","replace","doesStartingTargetExist","_toConsumableArray","some","$tabItem","$newTabList","index","$tabListItemLink","$replacementButton","replaceWith","e","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","newIndex","currentIndex","findIndex","targetId","history","replaceState","CookieEventHandler","_defineProperty","_instance","_createClass","event","callback","Object","prototype","hasOwnProperty","call","events","data","arguments","eventToTrigger","extraPolicies","options","_options$domain","_options$secure","_options$policiesKey","init","savePolicies","_objectSpread","fromEntries","k","toLowerCase","usage","settings","essential","get","deserialised","cookie","parts","JSON","parse","all","exists","decodeURIComponent","_options$maxAge","maxAge","_options$path","path","_options$sameSite","sameSite","_options$domain2","_options$secure2","encodeURIComponent","trigger","keys","setPolicy","accepted","_objectSpread2","allPolicies","stringify","on","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","r","Symbol","toStringTag","$body","documentElement","onFirstTouch","removeEventListener","initAll","$scope","scope","HTMLElement","$cookieBanner","$gallery","$header","$picture","$sensitiveImage","$skipLink","$tabModule"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"all.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,mvBCPF,IAAMC,EAAW,WACtB,SAAAA,EAAYC,I,4FAASC,CAAA,KAAAF,GACnBG,KAAKF,QAAUA,EACfE,KAAKC,iBACHH,GAAWA,EAAQI,cAAc,0BACnCF,KAAK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/J,EAAAA,OAAO+J,GAAS/D,OAGJ0D,EAAOlO,iBAAiB,+BAChC4D,SAAQ,SAAC4K,GACjB,IAAIjJ,EAAAA,QAAQiJ,GAAUhE,MACxB,IAEyB0D,EAAOlO,iBAC9B,uCAEe4D,SAAQ,SAAC6K,GACxB,IAAI3I,EAAAA,eAAe2I,GAAiBjE,MACtC,IAEmB0D,EAAOlO,iBAAiB,iCAChC4D,SAAQ,SAAC8K,GAClB,IAAIpI,EAAAA,SAASoI,GAAWlE,MAC1B,IAEc0D,EAAOlO,iBAAiB,4BAChC4D,SAAQ,SAAC+K,GACb,IAAI7H,EAAAA,KAAK6H,GAAYnE,MACvB,GACF,C","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/components/breadcrumbs/breadcrumbs.mjs","webpack://TNAFrontend/./src/nationalarchives/components/cookie-banner/cookie-banner.mjs","webpack://TNAFrontend/./src/nationalarchives/components/gallery/gallery.mjs","webpack://TNAFrontend/./src/nationalarchives/components/header/header.mjs","webpack://TNAFrontend/./src/nationalarchives/components/picture/picture.mjs","webpack://TNAFrontend/./src/nationalarchives/components/sensitive-image/sensitive-image.mjs","webpack://TNAFrontend/./src/nationalarchives/components/skip-link/skip-link.mjs","webpack://TNAFrontend/./src/nationalarchives/components/tabs/tabs.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/uuid.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/all.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([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Breadcrumbs {\n constructor($module) {\n this.$module = $module;\n this.$breadcrumbsList =\n $module && $module.querySelector(\".tna-breadcrumbs__list\");\n this.$breadcrumbs =\n $module &&\n this.$breadcrumbsList &&\n $module.querySelectorAll(\".tna-breadcrumbs__item\");\n }\n\n init() {\n if (!this.$module || !this.$breadcrumbsList || !this.$breadcrumbs) {\n return;\n }\n\n if (\n this.$breadcrumbs.length > 2 &&\n !this.$module.classList.contains(\"tna-breadcrumbs--no-collapse\")\n ) {\n const uniqueId = `tna-breadcrumbs-${uuidv4()}`;\n\n const $expandable = document.createElement(\"li\");\n $expandable.classList.add(\n \"tna-breadcrumbs__item\",\n \"tna-breadcrumbs__item--expandable\",\n );\n $expandable.style.display = \"none\";\n\n const $expandButton = document.createElement(\"button\");\n $expandButton.classList.add(\"tna-breadcrumbs__link\");\n $expandButton.innerHTML =\n \"<span class='tna-!--visually-hidden'>Expand breadcrumbs</span>…\";\n $expandButton.setAttribute(\"aria-expanded\", \"false\");\n $expandButton.setAttribute(\"aria-controls\", uniqueId);\n $expandButton.addEventListener(\"click\", () => {\n this.$module.classList.remove(\"tna-breadcrumbs--collapsed\");\n $expandable.remove();\n this.$module.setAttribute(\"tabindex\", \"0\");\n this.$module.focus();\n this.$module.setAttribute(\"tabindex\", \"-1\");\n });\n\n $expandable.appendChild($expandButton);\n\n this.$breadcrumbsList.setAttribute(\"id\", uniqueId);\n this.$breadcrumbsList.insertBefore(\n $expandable,\n this.$breadcrumbs[this.$breadcrumbs.length - 2].nextSibling,\n );\n\n this.$module.classList.add(\"tna-breadcrumbs--collapsed\");\n }\n }\n}\n","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class CookieBanner {\n constructor($module) {\n this.$module = $module;\n this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n this.$prompt =\n $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n this.$acceptedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n this.$rejectedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n }\n\n init() {\n if (\n !this.$module ||\n !this.$acceptButton ||\n !this.$rejectButton ||\n !this.$prompt ||\n !this.$acceptedMessage ||\n !this.$rejectedMessage ||\n !this.$closeButtons\n ) {\n return;\n }\n\n const policies = this.$module.getAttribute(\"data-policies\") || \"\";\n const domain = this.$module.getAttribute(\"data-domain\") || undefined;\n const path = this.$module.getAttribute(\"data-path\") || undefined;\n const secure = this.$module.getAttribute(\"data-secure\") || undefined;\n const policiesKey =\n this.$module.getAttribute(\"data-policies-key\") || undefined;\n\n this.cookies = new (window.TNAFrontend?.Cookies || Cookies)(\n policies\n .split(\",\")\n .filter((x) => x)\n .map((policy) => policy.trim()),\n {\n domain,\n path,\n secure,\n policiesKey,\n },\n );\n\n this.cookiePreferencesSet =\n this.$module.getAttribute(\"data-preferenceskey\") ||\n \"cookie_preferences_set\";\n const cookiePreferencesSet = this.cookies.hasValue(\n this.cookiePreferencesSet,\n \"true\",\n );\n\n if (!cookiePreferencesSet) {\n this.$module.removeAttribute(\"hidden\");\n\n this.$acceptButton.addEventListener(\"click\", () => this.accept());\n this.$rejectButton.addEventListener(\"click\", () => this.reject());\n }\n }\n\n accept() {\n this.$prompt.setAttribute(\"hidden\", true);\n this.complete();\n this.$acceptedMessage.removeAttribute(\"hidden\");\n this.$acceptedMessage.focus();\n this.$acceptedMessage.setAttribute(\"tabindex\", \"-1\");\n this.cookies.acceptAllPolicies();\n }\n\n reject() {\n this.$prompt.setAttribute(\"hidden\", true);\n this.complete();\n this.$rejectedMessage.removeAttribute(\"hidden\");\n this.$rejectedMessage.focus();\n this.$rejectedMessage.setAttribute(\"tabindex\", \"-1\");\n this.cookies.rejectAllPolicies();\n }\n\n complete() {\n this.cookies.set(this.cookiePreferencesSet, true);\n this.$closeButtons.forEach(($closeButton) => {\n $closeButton.addEventListener(\"click\", () => this.close());\n });\n }\n\n close() {\n this.$module.setAttribute(\"hidden\", true);\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Gallery {\n constructor($module) {\n this.$module = $module;\n this.$items = $module && $module.querySelector(\".tna-gallery__items\");\n this.opened = false;\n }\n\n init() {\n if (!this.$module || !this.$items) {\n return;\n }\n\n const supportTouchHorizontal = false;\n\n this.items = this.$module.querySelectorAll(\".tna-gallery__item\").length;\n\n if (this.items > 1) {\n const uniqueId = `tna-gallery-${uuidv4()}`;\n\n this.$module.classList.add(\"tna-gallery--collapsed\");\n this.$items.setAttribute(\"tabindex\", \"-1\");\n\n this.$galleryToggle = document.createElement(\"button\");\n this.$galleryToggle.classList.add(\n \"tna-gallery__toggle\",\n \"tna-button\",\n \"tna-button--accent\",\n );\n this.$galleryToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n this.$galleryToggle.innerText = `View ${this.items} images`;\n\n const onFirstTouch = () => {\n this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n this.$module.classList.add(\"tna-gallery--touchable\");\n };\n\n if (supportTouchHorizontal) {\n this.$module.addEventListener(\"touchstart\", onFirstTouch);\n }\n\n this.$galleryToggle.addEventListener(\"click\", () => {\n if (supportTouchHorizontal) {\n this.$module.removeEventListener(\"touchstart\", onFirstTouch);\n }\n this.handleToggleGallery();\n });\n\n this.$galleryToggleWrapper = document.createElement(\"div\");\n this.$galleryToggleWrapper.classList.add(\n \"tna-column\",\n \"tna-column--full\",\n \"tna-gallery__toggle-wrapper\",\n );\n\n this.$galleryToggleWrapper.appendChild(this.$galleryToggle);\n this.$items.parentElement.appendChild(this.$galleryToggleWrapper);\n\n this.$items.setAttribute(\"id\", uniqueId);\n }\n }\n\n handleToggleGallery() {\n this.opened = !this.opened;\n if (this.opened) {\n this.$module.classList.remove(\"tna-gallery--collapsed\");\n this.$galleryToggle.setAttribute(\"aria-expanded\", true);\n this.$galleryToggle.innerText = \"Close images\";\n this.$items.setAttribute(\"tabindex\", \"0\");\n this.$items.focus();\n this.$items.setAttribute(\"tabindex\", \"-1\");\n } else {\n this.$module.classList.add(\"tna-gallery--collapsed\");\n this.$galleryToggle.setAttribute(\"aria-expanded\", false);\n this.$galleryToggle.innerText = `View ${this.items} images`;\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Header {\n constructor($module) {\n this.$module = $module;\n this.$toggleButtonWrapper =\n $module && $module.querySelector(\".tna-header__navigation-toggle\");\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: 768px)\");\n }\n\n init() {\n if (!this.$module || !this.$toggleButtonWrapper || !this.$navigation) {\n return;\n }\n\n const uniqueId = `tna-menu-content-${uuidv4()}`;\n this.$navigation.setAttribute(\"id\", uniqueId);\n\n this.$toggleButton = document.createElement(\"button\");\n this.$toggleButton.innerText = \"Menu\";\n this.$toggleButton.setAttribute(\"aria-controls\", uniqueId);\n this.$toggleButton.setAttribute(\"aria-haspopup\", \"true\");\n this.$toggleButton.classList.add(\"tna-header__navigation-toggle-button\");\n\n this.$hamburger = document.createElement(\"div\");\n this.$hamburger.classList.add(\"tna-header__hamburger\");\n\n this.$toggleButton.appendChild(this.$hamburger);\n this.$toggleButtonWrapper.appendChild(this.$toggleButton);\n\n this.syncState();\n\n this.$toggleButton.addEventListener(\"click\", () =>\n this.handleToggleNavigation(),\n );\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\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.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\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(\n \"tna-header__navigation-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n } else {\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-toggle-button--opened\",\n );\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"-1\");\n }\n }\n } else {\n this.$navigation.classList.add(\"tna-header__navigation--open\");\n this.$navigation.hidden = false;\n this.$navigation.setAttribute(\"aria-hidden\", \"false\");\n this.$toggleButton.setAttribute(\"aria-expanded\", \"true\");\n this.$toggleButton.setAttribute(\"title\", \"Close menu\");\n\n for (let i = 0; i < this.$links.length; i++) {\n this.$links[i].setAttribute(\"tabindex\", \"0\");\n }\n }\n }\n}\n","import uuidv4 from \"../../lib/uuid.mjs\";\n\nexport class Picture {\n constructor($module) {\n this.$module = $module;\n this.$imageWrapper =\n $module && $module.querySelector(\".tna-picture__image-wrapper\");\n this.$transcript =\n $module && $module.querySelector(\".tna-picture__transcript\");\n this.transcriptOpened = false;\n }\n\n init() {\n if (!this.$module || !this.$imageWrapper || !this.$transcript) {\n return;\n }\n\n const uniqueId = `tna-picture-${uuidv4()}`;\n\n this.$transcriptToggle = document.createElement(\"button\");\n this.$transcriptToggle.classList.add(\n \"tna-picture__toggle-transcript\",\n \"tna-button\",\n \"tna-button--small\",\n \"tna-button--accent\",\n \"tna-button--solid-hover\",\n );\n this.$transcriptToggle.setAttribute(\"aria-controls\", uniqueId);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = \"Open transcript\";\n this.$transcriptToggle.addEventListener(\"click\", () =>\n this.handleToggleTranscript(),\n );\n this.$imageWrapper.appendChild(this.$transcriptToggle);\n\n this.$transcript.setAttribute(\"id\", uniqueId);\n this.$transcript.setAttribute(\"hidden\", true);\n }\n\n handleToggleTranscript() {\n const transcriptToggleOpenedClass =\n \"tna-picture__toggle-transcript--opened\";\n this.transcriptOpened = !this.transcriptOpened;\n if (this.transcriptOpened) {\n this.$transcriptToggle.classList.add(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", true);\n this.$transcriptToggle.innerText = \"Close transcript\";\n this.$transcript.removeAttribute(\"hidden\");\n } else {\n this.$transcriptToggle.classList.remove(transcriptToggleOpenedClass);\n this.$transcriptToggle.setAttribute(\"aria-expanded\", false);\n this.$transcriptToggle.innerText = \"Open transcript\";\n this.$transcript.setAttribute(\"hidden\", true);\n }\n }\n}\n","export class SensitiveImage {\n constructor($module) {\n this.$module = $module;\n this.$imageDetails =\n $module && $module.querySelector(\".tna-sensitive-image__details\");\n this.$image =\n $module && $module.querySelector(\".tna-sensitive-image__image\");\n this.imageIsVisible = false;\n }\n\n init() {\n if (!this.$module || !this.$imageDetails || !this.$image) {\n return;\n }\n this.$imageDetails.addEventListener(\"toggle\", () =>\n this.handleImageDetailsToggle(),\n );\n }\n\n handleImageDetailsToggle() {\n if (this.$imageDetails.hasAttribute(\"open\")) {\n this.$image.focus({ preventScroll: true, focusVisible: true });\n }\n }\n}\n","export class SkipLink {\n linkedElementListener = false;\n\n constructor($module) {\n this.$module = $module;\n this.linkedElementId = $module.getAttribute(\"href\").split(\"#\").pop();\n this.$linkedElement =\n $module &&\n this.linkedElementId &&\n document.getElementById(this.linkedElementId);\n }\n\n init() {\n if (!this.$module || !this.$linkedElement) {\n return;\n }\n this.$module.addEventListener(\"click\", () => this.focusLinkedElement());\n }\n\n focusLinkedElement() {\n if (!this.$linkedElement.getAttribute(\"tabindex\")) {\n this.$linkedElement.setAttribute(\"tabindex\", \"-1\");\n this.$linkedElement.classList.add(\"tna-!--no-focus-style\");\n\n if (!this.linkedElementListener) {\n this.$linkedElement.addEventListener(\"blur\", () =>\n this.removeFocusProperties(),\n );\n this.linkedElementListener = true;\n }\n }\n\n this.$linkedElement.focus();\n }\n\n removeFocusProperties() {\n this.$linkedElement.removeAttribute(\"tabindex\");\n this.$linkedElement.classList.remove(\"tna-!--no-focus-style\");\n }\n}\n","export class Tabs {\n constructor($module) {\n this.$module = $module;\n this.$tabList = $module && $module.querySelector(\".tna-tabs__list\");\n this.$tabListItemLinks =\n $module &&\n this.$tabList &&\n $module.querySelectorAll(\".tna-tabs__list-item-link\");\n this.$tabItems = $module && $module.querySelectorAll(\".tna-tabs__item\");\n }\n\n init() {\n if (\n !this.$module ||\n !this.$tabList ||\n !this.$tabListItemLinks ||\n !this.$tabItems ||\n this.$tabListItemLinks.length !== this.$tabItems.length\n ) {\n return;\n }\n\n this.sticky = this.$module.classList.contains(\"tna-tabs--sticky\");\n\n const startingTarget = window.location.hash.replace(/^#/, \"\");\n const doesStartingTargetExist = [...this.$tabItems].some(\n ($tabItem) => $tabItem.getAttribute(\"id\") === startingTarget,\n );\n\n this.$newTabList = document.createElement(\"div\");\n this.$newTabList.setAttribute(\"role\", \"tablist\");\n this.$newTabList.setAttribute(\"class\", this.$tabList.getAttribute(\"class\"));\n\n this.$tabItems.forEach(($tabItem, index) => {\n $tabItem.setAttribute(\"role\", \"tabpanel\");\n $tabItem.setAttribute(\n \"aria-labelledby\",\n `${$tabItem.getAttribute(\"id\")}-tab`,\n );\n $tabItem.setAttribute(\"tabindex\", \"0\");\n if (\n (doesStartingTargetExist &&\n $tabItem.getAttribute(\"id\") !== startingTarget) ||\n (!doesStartingTargetExist && index > 0)\n ) {\n $tabItem.setAttribute(\"hidden\", true);\n }\n });\n\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n const $replacementButton = document.createElement(\"button\");\n $replacementButton.innerText = $tabListItemLink.innerText;\n $replacementButton.setAttribute(\n \"class\",\n $tabListItemLink.getAttribute(\"class\"),\n );\n $replacementButton.setAttribute(\"role\", \"tab\");\n $replacementButton.setAttribute(\n \"id\",\n $tabListItemLink.getAttribute(\"id\"),\n );\n $replacementButton.setAttribute(\n \"aria-controls\",\n $tabListItemLink.getAttribute(\"href\")?.replace(/^#/, \"\"),\n );\n $replacementButton.setAttribute(\"tabindex\", \"-1\");\n this.$newTabList.appendChild($replacementButton);\n });\n\n this.$tabList.replaceWith(this.$newTabList);\n\n this.$tabListItemLinks = this.$module.querySelectorAll(\n \".tna-tabs__list-item-link\",\n );\n\n this.$tabListItemLinks.forEach(($tabListItemLink, index) => {\n if (\n (startingTarget &&\n $tabListItemLink.getAttribute(\"aria-controls\") ===\n `${startingTarget}`) ||\n (!startingTarget && index === 0)\n ) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n }\n\n $tabListItemLink.addEventListener(\n \"keydown\",\n (e) => this.handleItemLinkKeyDown(e),\n true,\n );\n $tabListItemLink.addEventListener(\n \"click\",\n (e) => this.handleItemLinkClick(e),\n true,\n );\n });\n }\n\n handleItemLinkClick(itemLinkClickEvent) {\n itemLinkClickEvent.preventDefault();\n const targetItem =\n itemLinkClickEvent.currentTarget.getAttribute(\"aria-controls\");\n\n this.switchTab(targetItem);\n }\n\n handleItemLinkKeyDown(itemLinkKeyDownEvent) {\n const targetItem = itemLinkKeyDownEvent.currentTarget;\n let overwriteKeyAction = false;\n\n switch (itemLinkKeyDownEvent.key) {\n case \"ArrowLeft\":\n case \"ArrowUp\":\n this.setSelectedToPreviousTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"ArrowRight\":\n case \"ArrowDown\":\n this.setSelectedToNextTab(targetItem);\n overwriteKeyAction = true;\n break;\n\n case \"Home\":\n this.switchTab(this.$tabListItemLinks[0].getAttribute(\"aria-controls\"));\n overwriteKeyAction = true;\n break;\n\n case \"End\":\n this.switchTab(\n this.$tabListItemLinks[\n this.$tabListItemLinks.length - 1\n ].getAttribute(\"aria-controls\"),\n );\n overwriteKeyAction = true;\n break;\n\n default:\n break;\n }\n\n if (overwriteKeyAction) {\n itemLinkKeyDownEvent.stopPropagation();\n itemLinkKeyDownEvent.preventDefault();\n }\n }\n\n setSelectedToNextTab(targetItem) {\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex < this.$tabListItemLinks.length - 1) {\n newIndex = currentIndex + 1;\n } else {\n newIndex = 0;\n }\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n setSelectedToPreviousTab(targetItem) {\n const currentIndex = [...this.$tabListItemLinks].findIndex(\n ($tabListItemLink) =>\n $tabListItemLink.getAttribute(\"id\") === targetItem.getAttribute(\"id\"),\n );\n let newIndex;\n if (currentIndex >= 1) {\n newIndex = currentIndex - 1;\n } else {\n newIndex = this.$tabListItemLinks.length - 1;\n }\n this.switchTab(\n this.$tabListItemLinks[newIndex].getAttribute(\"aria-controls\"),\n );\n }\n\n switchTab(targetId) {\n this.$tabListItemLinks.forEach(($tabListItemLink) => {\n if ($tabListItemLink.getAttribute(\"aria-controls\") === targetId) {\n $tabListItemLink.classList.add(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", true);\n $tabListItemLink.setAttribute(\"tabindex\", \"0\");\n $tabListItemLink.focus();\n } else {\n $tabListItemLink.classList.remove(\"tna-tabs__list-item-link--selected\");\n $tabListItemLink.setAttribute(\"aria-selected\", false);\n $tabListItemLink.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n this.$tabItems.forEach(($tabItem) => {\n if ($tabItem.getAttribute(\"id\") === targetId) {\n $tabItem.removeAttribute(\"hidden\");\n $tabItem.setAttribute(\"tabindex\", \"0\");\n } else {\n $tabItem.setAttribute(\"hidden\", true);\n $tabItem.setAttribute(\"tabindex\", \"-1\");\n }\n });\n\n if (this.sticky) {\n if (history.replaceState) {\n history.replaceState(null, null, `#${targetId}`);\n } else {\n location.hash = `#${targetId}`;\n }\n }\n }\n}\n","export class CookieEventHandler {\n events = {};\n\n constructor() {\n if (CookieEventHandler._instance) {\n return CookieEventHandler._instance;\n }\n CookieEventHandler._instance = this;\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.prototype.hasOwnProperty.call(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.prototype.hasOwnProperty.call(this.events, event)) {\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n }\n}\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n extraPolicies = [];\n /** @protected */\n domain = \"\";\n /** @protected */\n path = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n\n /**\n * Create a cookie handler.\n * @param {string[]} [extraPolicies=[]] - The extra cookie policies to manage in addition to essential, settings and usage.\n * @param {string} [options.domain=\"\"] - The domain to register the cookie with.\n * @param {string} [options.path=\"\"] - The domain to register the cookie with.\n * @param {string} [options.secure=true] - Only set cookie in HTTPS environments.\n * @param {string} [options.policiesKey=cookies_policy] - The name of the cookie.\n */\n constructor(extraPolicies = [], options = {}) {\n const {\n domain = \"\",\n path = \"/\",\n secure = true,\n policiesKey = \"cookies_policy\",\n } = options;\n this.extraPolicies = extraPolicies;\n this.domain = domain;\n this.path = path;\n this.secure = secure;\n this.policiesKey = policiesKey;\n this.events = new CookieEventHandler();\n this.init();\n }\n\n /** @protected */\n init() {\n this.savePolicies({\n ...Object.fromEntries(\n this.extraPolicies.map((k) => [k.toLowerCase(), false]),\n ),\n usage: false,\n settings: false,\n ...this.policies,\n essential: true,\n });\n }\n\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((x) => x)\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n if (parts[0]) {\n deserialised[parts[0]] = parts[1];\n }\n });\n return deserialised;\n }\n\n get policies() {\n try {\n return JSON.parse(this.get(this.policiesKey) || \"{}\");\n } catch (e) {\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.prototype.hasOwnProperty.call(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}\n */\n get(key) {\n return this.exists(key) ? decodeURIComponent(this.all[key]) : 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=31536000] - 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.domain] - The domain to register the cookie with.\n * @param {string} [options.path=this.path] - The path to register the cookie with.\n * @param {string} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n */\n set(key, value, options = {}) {\n const {\n maxAge = 60 * 60 * 24 * 365,\n sameSite = \"Lax\",\n domain = this.domain,\n path = this.path,\n secure = this.secure,\n } = options;\n if (!key) {\n return;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)};${\n domain ? ` domain=${domain}; ` : \"\"\n } samesite=${sameSite}; path=${path}; max-age=${maxAge}${\n secure ? \"; secure\" : \"\"\n }`;\n document.cookie = cookie;\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\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 = null) {\n const options = { maxAge: -1, path, domain: domain || undefined };\n this.set(key, \"\", options);\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = null) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\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.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.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 return;\n }\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 const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((k) => [k.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 const allPolicies = {\n ...Object.fromEntries(\n Object.keys(this.policies).map((k) => [k.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.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 return Object.prototype.hasOwnProperty.call(this.policies, policy)\n ? this.policies[policy] === true\n : 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.events.on(event, callback);\n }\n}\n","const uuidv4 = () =>\n ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16),\n );\n\nexport default uuidv4;\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 { Breadcrumbs } from \"./components/breadcrumbs/breadcrumbs.mjs\";\nimport { CookieBanner } from \"./components/cookie-banner/cookie-banner.mjs\";\nimport { Gallery } from \"./components/gallery/gallery.mjs\";\nimport { Header } from \"./components/header/header.mjs\";\nimport { Picture } from \"./components/picture/picture.mjs\";\nimport { SensitiveImage } from \"./components/sensitive-image/sensitive-image.mjs\";\nimport { SkipLink } from \"./components/skip-link/skip-link.mjs\";\nimport { Tabs } from \"./components/tabs/tabs.mjs\";\nimport Cookies from \"./lib/cookies.mjs\";\n\nconst $body = document.documentElement;\n$body.classList.add(\"tna-template--js-enabled\");\n\nconst onFirstTouch = () => {\n window.removeEventListener(\"touchstart\", onFirstTouch);\n $body.classList.add(\"tna-template--touched\");\n};\n\nconst onKeyDown = (e) => {\n if (e.key === \"Tab\") {\n $body.classList.add(\"tna-template--tabbed\");\n $body.classList.remove(\"tna-template--clicked\");\n }\n};\n\nconst onMouseDown = () => {\n $body.classList.add(\"tna-template--clicked\");\n $body.classList.remove(\"tna-template--tabbed\");\n};\n\nwindow.addEventListener(\"touchstart\", onFirstTouch);\nwindow.addEventListener(\"keydown\", onKeyDown);\nwindow.addEventListener(\"mousedown\", onMouseDown);\n\nconst initAll = (options) => {\n options = typeof options !== \"undefined\" ? options : {};\n const $scope =\n options.scope instanceof HTMLElement ? options.scope : document;\n\n const $breadcrumbs = $scope.querySelector('[data-module=\"tna-breadcrumbs\"]');\n if ($breadcrumbs) {\n new Breadcrumbs($breadcrumbs).init();\n }\n\n const $cookieBanner = $scope.querySelector(\n '[data-module=\"tna-cookie-banner\"]',\n );\n if ($cookieBanner) {\n new CookieBanner($cookieBanner).init();\n }\n\n const $galleries = $scope.querySelectorAll('[data-module=\"tna-gallery\"]');\n $galleries.forEach(($gallery) => {\n new Gallery($gallery).init();\n });\n\n const $header = $scope.querySelector('[data-module=\"tna-header\"]');\n if ($header) {\n new Header($header).init();\n }\n\n const $pictures = $scope.querySelectorAll('[data-module=\"tna-picture\"]');\n $pictures.forEach(($picture) => {\n new Picture($picture).init();\n });\n\n const $sensitiveImages = $scope.querySelectorAll(\n '[data-module=\"tna-sensitive-image\"]',\n );\n $sensitiveImages.forEach(($sensitiveImage) => {\n new SensitiveImage($sensitiveImage).init();\n });\n\n const $skipLinks = $scope.querySelectorAll('[data-module=\"tna-skip-link\"]');\n $skipLinks.forEach(($skipLink) => {\n new SkipLink($skipLink).init();\n });\n\n const $tabs = $scope.querySelectorAll('[data-module=\"tna-tabs\"]');\n $tabs.forEach(($tabModule) => {\n new Tabs($tabModule).init();\n });\n};\n\nexport {\n initAll,\n Cookies,\n Breadcrumbs,\n CookieBanner,\n Gallery,\n Header,\n Picture,\n SensitiveImage,\n SkipLink,\n Tabs,\n};\n"],"names":["root","factory","exports","module","define","amd","self","Breadcrumbs","$module","_classCallCheck","this","$breadcrumbsList","querySelector","$breadcrumbs","querySelectorAll","key","value","_this","length","classList","contains","uniqueId","concat","uuidv4","$expandable","document","createElement","add","style","display","$expandButton","innerHTML","setAttribute","addEventListener","remove","focus","appendChild","insertBefore","nextSibling","CookieBanner","$acceptButton","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","_window$TNAFrontend","policies","getAttribute","domain","undefined","path","secure","policiesKey","cookies","window","TNAFrontend","Cookies","split","filter","x","map","policy","trim","cookiePreferencesSet","hasValue","removeAttribute","accept","reject","complete","acceptAllPolicies","rejectAllPolicies","_this2","set","forEach","$closeButton","close","Gallery","$items","opened","items","$galleryToggle","innerText","handleToggleGallery","$galleryToggleWrapper","parentElement","Header","$toggleButtonWrapper","$navigation","$links","menuOpened","mql","matchMedia","$toggleButton","$hamburger","syncState","handleToggleNavigation","addListener","matches","hidden","i","Picture","$imageWrapper","$transcript","transcriptOpened","$transcriptToggle","handleToggleTranscript","transcriptToggleOpenedClass","SensitiveImage","$imageDetails","$image","imageIsVisible","handleImageDetailsToggle","hasAttribute","preventScroll","focusVisible","SkipLink","linkedElementId","pop","$linkedElement","getElementById","focusLinkedElement","linkedElementListener","removeFocusProperties","Tabs","$tabList","$tabListItemLinks","$tabItems","sticky","startingTarget","location","hash","replace","doesStartingTargetExist","_toConsumableArray","some","$tabItem","$newTabList","index","$tabListItemLink","_$tabListItemLink$get","$replacementButton","replaceWith","e","handleItemLinkKeyDown","handleItemLinkClick","itemLinkClickEvent","preventDefault","targetItem","currentTarget","switchTab","itemLinkKeyDownEvent","overwriteKeyAction","setSelectedToPreviousTab","setSelectedToNextTab","stopPropagation","newIndex","currentIndex","findIndex","targetId","history","replaceState","CookieEventHandler","_defineProperty","_instance","_createClass","event","callback","Object","prototype","hasOwnProperty","call","events","data","arguments","eventToTrigger","extraPolicies","options","_options$domain","_options$path","_options$secure","_options$policiesKey","init","savePolicies","_objectSpread","fromEntries","k","toLowerCase","usage","settings","essential","get","deserialised","cookie","parts","JSON","parse","all","exists","decodeURIComponent","_options$maxAge","maxAge","_options$sameSite","sameSite","_options$domain2","_options$path2","_options$secure2","encodeURIComponent","trigger","keys","setPolicy","accepted","allPolicies","stringify","on","c","crypto","getRandomValues","Uint8Array","toString","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","r","Symbol","toStringTag","$body","documentElement","onFirstTouch","removeEventListener","initAll","$scope","scope","HTMLElement","$cookieBanner","$gallery","$header","$picture","$sensitiveImage","$skipLink","$tabModule"],"sourceRoot":""}
|
package/nationalarchives/all.mjs
CHANGED
@@ -32,17 +32,6 @@ window.addEventListener("touchstart", onFirstTouch);
|
|
32
32
|
window.addEventListener("keydown", onKeyDown);
|
33
33
|
window.addEventListener("mousedown", onMouseDown);
|
34
34
|
|
35
|
-
// if (document.documentElement.classList.contains("tna-template--system-theme")) {
|
36
|
-
// document.documentElement.classList.add(
|
37
|
-
// window.matchMedia("(prefers-color-scheme: dark)").matches
|
38
|
-
// ? "tna-template--dark-theme"
|
39
|
-
// : "tna-template--light-theme",
|
40
|
-
// );
|
41
|
-
// if (window.matchMedia("(prefers-contrast: more)").matches) {
|
42
|
-
// document.documentElement.classList.add("tna-template--high-contrast-theme");
|
43
|
-
// }
|
44
|
-
// }
|
45
|
-
|
46
35
|
const initAll = (options) => {
|
47
36
|
options = typeof options !== "undefined" ? options : {};
|
48
37
|
const $scope =
|
@@ -1,7 +1,10 @@
|
|
1
1
|
@use "breadcrumbs";
|
2
2
|
@use "button";
|
3
3
|
@use "card";
|
4
|
+
@use "checkboxes";
|
4
5
|
@use "cookie-banner";
|
6
|
+
@use "date-input";
|
7
|
+
@use "date-search";
|
5
8
|
@use "featured-records";
|
6
9
|
@use "filters";
|
7
10
|
@use "footer";
|
@@ -14,6 +17,11 @@
|
|
14
17
|
@use "pagination";
|
15
18
|
@use "phase-banner";
|
16
19
|
@use "picture";
|
20
|
+
@use "radios";
|
17
21
|
@use "sensitive-image";
|
22
|
+
@use "search-field";
|
23
|
+
@use "select";
|
18
24
|
@use "skip-link";
|
19
25
|
@use "tabs";
|
26
|
+
@use "text-input";
|
27
|
+
@use "textarea";
|