@nationalarchives/frontend 0.22.0 → 0.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/nationalarchives/all+analytics.js +1 -1
  2. package/nationalarchives/all+analytics.js.map +1 -1
  3. package/nationalarchives/all.css +1 -1
  4. package/nationalarchives/all.css.map +1 -1
  5. package/nationalarchives/all.js +1 -1
  6. package/nationalarchives/all.js.map +1 -1
  7. package/nationalarchives/analytics.js +1 -1
  8. package/nationalarchives/analytics.js.map +1 -1
  9. package/nationalarchives/analytics.mjs +12 -4
  10. package/nationalarchives/assets/fonts/fa-brands-400.woff2 +0 -0
  11. package/nationalarchives/assets/fonts/fa-solid-900.woff2 +0 -0
  12. package/nationalarchives/components/accordion/accordion.js +1 -1
  13. package/nationalarchives/components/accordion/accordion.js.map +1 -1
  14. package/nationalarchives/components/accordion/accordion.mjs +1 -1
  15. package/nationalarchives/components/accordion/fixtures.json +26 -7
  16. package/nationalarchives/components/accordion/macro-options.json +9 -2
  17. package/nationalarchives/components/accordion/template.njk +2 -2
  18. package/nationalarchives/components/breadcrumbs/breadcrumbs.js +1 -1
  19. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  20. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +1 -0
  21. package/nationalarchives/components/card/card.css +1 -1
  22. package/nationalarchives/components/card/card.css.map +1 -1
  23. package/nationalarchives/components/card/card.scss +10 -4
  24. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  25. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  26. package/nationalarchives/components/cookie-banner/cookie-banner.mjs +1 -1
  27. package/nationalarchives/components/date-input/date-input.css +1 -1
  28. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  29. package/nationalarchives/components/date-input/date-input.js +1 -1
  30. package/nationalarchives/components/date-input/date-input.js.map +1 -1
  31. package/nationalarchives/components/date-input/date-input.scss +4 -0
  32. package/nationalarchives/components/error-summary/error-summary.js +1 -1
  33. package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
  34. package/nationalarchives/components/file-input/file-input.css.map +1 -1
  35. package/nationalarchives/components/file-input/file-input.js +1 -1
  36. package/nationalarchives/components/file-input/file-input.js.map +1 -1
  37. package/nationalarchives/components/file-input/file-input.scss +3 -3
  38. package/nationalarchives/components/footer/fixtures.json +3 -3
  39. package/nationalarchives/components/footer/footer.js +1 -1
  40. package/nationalarchives/components/footer/footer.js.map +1 -1
  41. package/nationalarchives/components/footer/template.njk +1 -1
  42. package/nationalarchives/components/gallery/gallery.css +1 -1
  43. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  44. package/nationalarchives/components/gallery/gallery.js +1 -1
  45. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  46. package/nationalarchives/components/gallery/gallery.scss +2 -2
  47. package/nationalarchives/components/global-header/global-header.js +1 -1
  48. package/nationalarchives/components/global-header/global-header.js.map +1 -1
  49. package/nationalarchives/components/header/header.js +1 -1
  50. package/nationalarchives/components/header/header.js.map +1 -1
  51. package/nationalarchives/components/hero/fixtures.json +7 -7
  52. package/nationalarchives/components/hero/hero.css +1 -1
  53. package/nationalarchives/components/hero/hero.css.map +1 -1
  54. package/nationalarchives/components/hero/hero.scss +20 -24
  55. package/nationalarchives/components/hero/template.njk +3 -3
  56. package/nationalarchives/components/picture/picture.css.map +1 -1
  57. package/nationalarchives/components/picture/picture.js +1 -1
  58. package/nationalarchives/components/picture/picture.js.map +1 -1
  59. package/nationalarchives/components/picture/picture.scss +2 -3
  60. package/nationalarchives/components/skip-link/skip-link.js +1 -1
  61. package/nationalarchives/components/skip-link/skip-link.js.map +1 -1
  62. package/nationalarchives/components/tabs/tabs.js +1 -1
  63. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  64. package/nationalarchives/components/text-input/text-input.js +1 -1
  65. package/nationalarchives/components/text-input/text-input.js.map +1 -1
  66. package/nationalarchives/font-awesome.css +9 -9
  67. package/nationalarchives/font-awesome.css.map +1 -1
  68. package/nationalarchives/font-awesome.scss +6 -5
  69. package/nationalarchives/lib/analytics-helpers.mjs +9 -13
  70. package/nationalarchives/lib/cookies.mjs +69 -14
  71. package/nationalarchives/lib/font-awesome/_animated.scss +93 -98
  72. package/nationalarchives/lib/font-awesome/_bordered.scss +27 -0
  73. package/nationalarchives/lib/font-awesome/_core.scss +20 -40
  74. package/nationalarchives/lib/font-awesome/_fa.scss +3 -0
  75. package/nationalarchives/lib/font-awesome/_functions.scss +3 -52
  76. package/nationalarchives/lib/font-awesome/_icons.scss +6 -4
  77. package/nationalarchives/lib/font-awesome/_list.scss +9 -6
  78. package/nationalarchives/lib/font-awesome/_mixins.scss +23 -60
  79. package/nationalarchives/lib/font-awesome/_pulled.scss +15 -0
  80. package/nationalarchives/lib/font-awesome/_rotated-flipped.scss +10 -9
  81. package/nationalarchives/lib/font-awesome/_shims.scss +1255 -1250
  82. package/nationalarchives/lib/font-awesome/_sizing.scss +6 -4
  83. package/nationalarchives/lib/font-awesome/_stacked.scss +11 -10
  84. package/nationalarchives/lib/font-awesome/_variables.scss +5110 -5025
  85. package/nationalarchives/lib/font-awesome/_widths.scss +12 -0
  86. package/nationalarchives/lib/font-awesome/brands.css +3 -3
  87. package/nationalarchives/lib/font-awesome/brands.css.map +1 -1
  88. package/nationalarchives/lib/font-awesome/brands.scss +29 -16
  89. package/nationalarchives/lib/font-awesome/fontawesome.css +3 -3
  90. package/nationalarchives/lib/font-awesome/fontawesome.css.map +1 -1
  91. package/nationalarchives/lib/font-awesome/fontawesome.scss +12 -15
  92. package/nationalarchives/lib/font-awesome/solid.css +3 -3
  93. package/nationalarchives/lib/font-awesome/solid.css.map +1 -1
  94. package/nationalarchives/lib/font-awesome/solid.scss +39 -14
  95. package/nationalarchives/lib/font-awesome/v4-shims.css +3 -3
  96. package/nationalarchives/lib/font-awesome/v4-shims.css.map +1 -1
  97. package/nationalarchives/lib/font-awesome/v4-shims.scss +5 -5
  98. package/nationalarchives/prototype-kit.css +1 -1
  99. package/nationalarchives/prototype-kit.css.map +1 -1
  100. package/nationalarchives/templates/fixtures.json +6 -6
  101. package/nationalarchives/tools/_index.scss +1 -0
  102. package/nationalarchives/tools/_shadows.scss +5 -0
  103. package/nationalarchives/utilities/lists/_index.scss +0 -1
  104. package/package.json +2 -2
  105. package/nationalarchives/assets/fonts/fa-brands-400.ttf +0 -0
  106. package/nationalarchives/assets/fonts/fa-solid-900.ttf +0 -0
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("TNAFrontend",[],t):"object"==typeof exports?exports.TNAFrontend=t():e.TNAFrontend=t()}(self,(()=>(()=>{"use strict";var e={169:(e,t,n)=>{function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function r(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function u(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}n.d(t,{A:()=>y}),window.TNAFrontendCookies=window.TNAFrontendCookies||null,window.TNAFrontendCookieEvents=window.TNAFrontendCookieEvents||null;var m=function(){return u((function e(){if(a(this,e),h(this,"events",{}),h(this,"oneTimeEvents",{}),window.TNAFrontendCookieEvents)return window.TNAFrontendCookieEvents;window.TNAFrontendCookieEvents=this}),[{key:"on",value:function(e,t){Object.hasOwn(this.events,e)||(this.events[e]=[]),this.events[e]=[].concat(s(this.events[e]),[t])}},{key:"once",value:function(e,t){Object.hasOwn(this.oneTimeEvents,e)||(this.oneTimeEvents[e]=[]),this.oneTimeEvents[e]=[].concat(s(this.oneTimeEvents[e]),[t])}},{key:"trigger",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Object.hasOwn(this.events,e)&&this.events[e].forEach((function(e){return e.call(t,n)})),Object.hasOwn(this.oneTimeEvents,e))for(var o=this.oneTimeEvents[e].length-1;o>=0;o--)this.oneTimeEvents[e][o].call(this,n),this.oneTimeEvents[e].splice(o,1)}}])}(),v=["usage","settings","marketing","essential"],y=function(){return u((function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),h(this,"defaultDomain",""),h(this,"defaultPath",""),h(this,"secure",!0),h(this,"policiesKey",""),h(this,"events",null),h(this,"defaultAge",null),h(this,"completePoliciesOnInit",!1);var o=n.defaultDomain,i=n.defaultPath,r=n.secure,s=n.policiesKey,c=n.newInstance,l=void 0!==c&&c,u=n.defaultAge,f=n.noInit,y=void 0!==f&&f;if(!l&&window.TNAFrontendCookies)return window.TNAFrontendCookies;this.defaultDomain=void 0===o?document.documentElement.dataset.tnaCookiesDomain||"":o,this.defaultPath=void 0===i?document.documentElement.dataset.tnaCookiesPath||"/":i,this.secure=void 0===r?"true"!==document.documentElement.dataset.tnaCookiesInsecure:r,this.policiesKey=void 0===s?document.documentElement.dataset.tnaCookiesPoliciesKey||"cookies_policy":s,this.defaultAge=void 0===u?parseInt(document.documentElement.dataset.tnaCookiesDefaultAge)||31536e3:u,this.events=new m,this.completePoliciesOnInit=Object.keys(this.policies).length===v.length&&v.every((function(e){return Object.keys(t.policies).includes(e)&&"boolean"==typeof t.policies[e]})),this.completePoliciesOnInit||y||this.init(),window.TNAFrontendCookies=this}),[{key:"init",value:function(){var e=this.policies,t=Object.fromEntries(Object.keys(e).filter((function(e){return v.includes(e)})).map((function(t){return[t,e[t]]})));this.savePolicies(r(r({usage:!1,settings:!1,marketing:!1},t),{},{essential:!0}))}},{key:"destroyInstance",value:function(){window.TNAFrontendCookies=null}},{key:"all",get:function(){var e={};return document.cookie.split("; ").filter((function(e){return e})).forEach((function(t){var n=t.trim().split("=");n[0]&&(e[n[0]]=n[1])})),e}},{key:"policies",get:function(){try{return JSON.parse(this.get(this.policiesKey)||"{}")}catch(e){return{}}}},{key:"exists",value:function(e){return Object.hasOwn(this.all,e)}},{key:"hasValue",value:function(e,t){return this.get(e)==t}},{key:"get",value:function(e){return this.exists(e)?decodeURIComponent(this.all[e]):null}},{key:"set",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.maxAge,i=void 0===o?this.defaultAge:o,r=n.sameSite,s=void 0===r?"Lax":r,c=n.domain,a=void 0===c?this.defaultDomain:c,l=n.path,u=void 0===l?this.defaultPath:l,h=n.secure,f=void 0===h?this.secure:h,m=n.session,v=void 0!==m&&m;if(e){var y="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t),";").concat(a?" domain=".concat(a,"; "):""," samesite=").concat(s,"; path=").concat(u).concat(v?"":"; max-age=".concat(i)).concat(f?"; secure":"");document.cookie=y,this.events.trigger("setCookie",{key:e,value:t,maxAge:i,path:u,sameSite:s,domain:a,secure:f,session:v,cookie:y})}}},{key:"delete",value:function(e){var t={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(e,"",t),this.events.trigger("deleteCookie",r({key:e},t))}},{key:"deleteAll",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;Object.keys(this.all).forEach((function(o){e.delete(o,t,n)})),this.events.trigger("deleteAllCookies",{path:t,domain:n})}},{key:"acceptPolicy",value:function(e){this.setPolicy(e,!0),this.events.trigger("acceptPolicy",e),this.events.trigger("changePolicy",h({},e,!0))}},{key:"rejectPolicy",value:function(e){this.setPolicy(e,!1),this.events.trigger("rejectPolicy",e),this.events.trigger("changePolicy",h({},e,!1))}},{key:"setPolicy",value:function(e,t){"essential"!==e&&(this.savePolicies(r(r({},this.policies),{},h(h({},e,t),"essential",!0))),this.events.trigger("changePolicy",h({},e,t)))}},{key:"acceptAllPolicies",value:function(){var e=Object.fromEntries(Object.keys(this.policies).map((function(e){return[e.toLowerCase(),!0]})));this.savePolicies(e),this.events.trigger("acceptAllPolicies"),this.events.trigger("changePolicy",e)}},{key:"rejectAllPolicies",value:function(){var e=r(r({},Object.fromEntries(Object.keys(this.policies).map((function(e){return[e.toLowerCase(),!1]})))),{},{essential:!0});this.savePolicies(e),this.events.trigger("rejectAllPolicies"),this.events.trigger("changePolicy",e)}},{key:"savePolicies",value:function(e){this.set(this.policiesKey,JSON.stringify(e))}},{key:"isPolicyAccepted",value:function(e){return Object.hasOwn(this.policies,e)?!0===this.policies[e]:null}},{key:"on",value:function(e,t){this.events.on(e,t)}},{key:"once",value:function(e,t){this.events.once(e,t)}}])}()}},t={};function n(o){var i=t[o];if(void 0!==i)return i.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};n.r(o),n.d(o,{Footer:()=>a});var i=n(169);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,c(o.key),o)}}function c(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}var a=function(){return e=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$module=t,this.$themeSelector=t&&t.querySelector(".tna-footer__theme-selector"),this.$tnaTemplate=document.querySelector(".tna-template"),this.$module&&this.$themeSelector&&this.$tnaTemplate&&(this.$themeSelectorButtons=this.$themeSelector.querySelectorAll("button.tna-footer__theme-selector-button[value]"),Array.from(this.$themeSelectorButtons).forEach((function(e){e.addEventListener("click",(function(e){var t=e.target;n.setTheme(t.value),n.selectThemeSelectorButton(t)}))})),this.cookies=new i.A,this.cookies.isPolicyAccepted("settings")&&this.showThemeSelector(),this.cookies.on("changePolicy",(function(e){Object.hasOwn(e,"settings")&&(!0===e.settings?n.showThemeSelector():(n.cookies.delete("theme"),n.hideThemeSelector()))})))},(t=[{key:"showThemeSelector",value:function(){var e=this;if(this.$themeSelector.removeAttribute("hidden"),this.cookies.exists("theme")){var t=Array.from(this.$themeSelectorButtons).find((function(t){return t.value===e.cookies.get("theme")}));t&&this.selectThemeSelectorButton(t)}}},{key:"hideThemeSelector",value:function(){this.$themeSelector.setAttribute("hidden","")}},{key:"setTheme",value:function(e){if("light"===e)this.$tnaTemplate.classList.remove("tna-template--system-theme","tna-template--dark-theme");else if("dark"===e)this.$tnaTemplate.classList.remove("tna-template--system-theme"),this.$tnaTemplate.classList.add("tna-template--dark-theme");else{if("system"!==e)return;this.$tnaTemplate.classList.remove("tna-template--dark-theme"),this.$tnaTemplate.classList.add("tna-template--system-theme")}this.cookies.set("theme",e)}},{key:"selectThemeSelectorButton",value:function(e){Array.from(this.$themeSelectorButtons).forEach((function(t){t.value===e.value?(t.classList.remove("tna-button--plain"),t.setAttribute("aria-current",!0)):(t.classList.add("tna-button--plain"),t.removeAttribute("aria-current"))}))}}])&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();return o})()));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("TNAFrontend",[],t):"object"==typeof exports?exports.TNAFrontend=t():e.TNAFrontend=t()}(self,()=>(()=>{"use strict";var e={169:(e,t,i)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,n)}return i}function r(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?o(Object(i),!0).forEach(function(t){h(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):o(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function s(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?c(e,t):void 0}}(e)||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 c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=Array(t);i<t;i++)n[i]=e[i];return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,f(n.key),n)}}function u(e,t,i){return t&&l(e.prototype,t),i&&l(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,i){return(t=f(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function f(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}i.d(t,{A:()=>v}),window.TNAFrontendCookies=window.TNAFrontendCookies||null,window.TNAFrontendCookieEvents=window.TNAFrontendCookieEvents||null;var d=function(){return u(function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(a(this,e),h(this,"events",{}),h(this,"oneTimeEvents",{}),h(this,"debug",!1),this.debug=t,window.TNAFrontendCookieEvents)return this.log("Using existing TNAFrontendCookieEvents instance"),window.TNAFrontendCookieEvents;window.TNAFrontendCookieEvents=this},[{key:"log",value:function(){if(this.debug){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];(e=console).log.apply(e,["[TNA Frontend Cookie Events]"].concat(i))}}},{key:"on",value:function(e,t){Object.hasOwn(this.events,e)||(this.events[e]=[]),this.events[e]=[].concat(s(this.events[e]),[t])}},{key:"once",value:function(e,t){Object.hasOwn(this.oneTimeEvents,e)||(this.oneTimeEvents[e]=[]),this.oneTimeEvents[e]=[].concat(s(this.oneTimeEvents[e]),[t])}},{key:"trigger",value:function(e){var t=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Object.hasOwn(this.events,e)&&(this.log("Triggering event: ".concat(e),i),this.events[e].forEach(function(e){return e.call(t,i)})),Object.hasOwn(this.oneTimeEvents,e)){this.log("Triggering one-time event: ".concat(e),i);for(var n=this.oneTimeEvents[e].length-1;n>=0;n--)this.oneTimeEvents[e][n].call(this,i),this.oneTimeEvents[e].splice(n,1)}}}])}(),m=["usage","settings","marketing","essential"],v=function(){return u(function e(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,e),h(this,"defaultDomain",""),h(this,"defaultPath",""),h(this,"secure",!0),h(this,"policiesKey",""),h(this,"events",null),h(this,"defaultAge",null),h(this,"policiesCorrectOnInit",!1),h(this,"debug","true"===document.documentElement.dataset.tnaFrontendDebug);var n=i.defaultDomain,o=i.defaultPath,r=i.secure,s=i.policiesKey,c=i.defaultAge,l=i.newInstance,u=void 0!==l&&l,f=i.noInit,v=void 0!==f&&f;if(!u&&window.TNAFrontendCookies)return window.TNAFrontendCookies;this.defaultDomain=void 0===n?document.documentElement.dataset.tnaCookiesDomain||window.location.hostname:n,this.defaultPath=void 0===o?document.documentElement.dataset.tnaCookiesPath||"/":o,this.secure=void 0===r?"true"!==document.documentElement.dataset.tnaCookiesInsecure:r,this.policiesKey=void 0===s?document.documentElement.dataset.tnaCookiesPoliciesKey||"cookies_policy":s,this.defaultAge=void 0===c?parseInt(document.documentElement.dataset.tnaCookiesDefaultAge)||31536e3:c,this.events=new d(this.debug),this.policiesCorrectOnInit=Object.keys(this.policies).length===m.length&&m.every(function(e){return Object.keys(t.policies).includes(e)&&"boolean"==typeof t.policies[e]}),this.policiesCorrectOnInit||v||this.init(),this.log({defaultDomain:this.defaultDomain,defaultPath:this.defaultPath,secure:this.secure,policiesKey:this.policiesKey,defaultAge:this.defaultAge,policiesCorrectOnInit:this.policiesCorrectOnInit}),u||window.TNAFrontendCookies||(window.TNAFrontendCookies=this)},[{key:"init",value:function(){var e=this.policies;this.log("Existing policies on init:",e);var t=Object.fromEntries(Object.keys(e).filter(function(e){return m.includes(e)}).map(function(t){return[t,e[t]]}));Object.keys(t).length>0&&this.log("Filtered existing policies:",t),this.savePolicies(r(r({usage:!1,settings:!1,marketing:!1},t),{},{essential:!0}))}},{key:"log",value:function(){if(this.debug){for(var e,t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];(e=console).log.apply(e,["[TNA Frontend Cookies]"].concat(i,[this.all]))}}},{key:"destroyInstance",value:function(){this.log("Destroying TNAFrontendCookies instance"),window.TNAFrontendCookies=null}},{key:"all",get:function(){var e={};return document.cookie.split("; ").filter(function(e){return e}).forEach(function(t){var i=t.trim().split("=");i[0]&&(e[i[0]]=i[1])}),e}},{key:"policies",get:function(){try{return JSON.parse(this.get(this.policiesKey)||"{}")}catch(e){return{}}}},{key:"exists",value:function(e){return Object.hasOwn(this.all,e)}},{key:"hasValue",value:function(e,t){return this.get(e)==t}},{key:"get",value:function(e){return this.exists(e)?decodeURIComponent(this.all[e]):null}},{key:"set",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=i.maxAge,o=void 0===n?this.defaultAge:n,r=i.sameSite,s=void 0===r?"Lax":r,c=i.domain,a=void 0===c?this.defaultDomain:c,l=i.path,u=void 0===l?this.defaultPath:l,h=i.secure,f=void 0===h?this.secure:h,d=i.session,m=void 0!==d&&d;if(e){var v="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t),"; domain=").concat(a,"; samesite=").concat(s,"; path=").concat(u).concat(m?"":"; max-age=".concat(o)).concat(f?"; secure":"");document.cookie=v,this.log("Set cookie:",{key:e,value:t,maxAge:o,path:u,sameSite:s,domain:a,secure:f,session:m,cookie:v}),this.events.trigger("setCookie",{key:e,value:t,maxAge:o,path:u,sameSite:s,domain:a,secure:f,session:m,cookie:v})}}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultDomain,n={maxAge:-1,path:t,domain:i||void 0};this.set(e,"",n),this.log("Deleted cookie:",r({key:e,path:t,domain:i},n)),this.events.trigger("deleteCookie",r({key:e},n))}},{key:"deleteAll",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"/",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.defaultDomain;Object.keys(this.all).forEach(function(n){e.delete(n,t,i)}),this.log("Deleted all cookies",{path:t,domain:i}),this.events.trigger("deleteAllCookies",{path:t,domain:i})}},{key:"acceptPolicy",value:function(e){this.log("Accepting policy:",e),this.setPolicy(e,!0),this.events.trigger("acceptPolicy",e),this.events.trigger("changePolicy",h({},e,!0))}},{key:"rejectPolicy",value:function(e){this.log("Rejecting policy:",e),this.setPolicy(e,!1),this.events.trigger("rejectPolicy",e),this.events.trigger("changePolicy",h({},e,!1))}},{key:"setPolicy",value:function(e,t){"essential"!==e?(this.log("Setting policy ".concat(e," to ").concat(t)),this.savePolicies(r(r({},this.policies),{},h(h({},e,t),"essential",!0))),this.events.trigger("changePolicy",h({},e,t))):this.log("Cannot change essential policy, it is always accepted.")}},{key:"acceptAllPolicies",value:function(){this.log("Accepting all policies");var e=Object.fromEntries(Object.keys(this.policies).map(function(e){return[e.toLowerCase(),!0]}));this.savePolicies(e),this.events.trigger("acceptAllPolicies"),this.events.trigger("changePolicy",e)}},{key:"rejectAllPolicies",value:function(){this.log("Rejecting all policies");var e=r(r({},Object.fromEntries(Object.keys(this.policies).map(function(e){return[e.toLowerCase(),!1]}))),{},{essential:!0});this.savePolicies(e),this.events.trigger("rejectAllPolicies"),this.events.trigger("changePolicy",e)}},{key:"savePolicies",value:function(e){this.log("Saving policies:",e),this.set(this.policiesKey,JSON.stringify(e))}},{key:"isPolicyAccepted",value:function(e){return Object.hasOwn(this.policies,e)?!0===this.policies[e]:null}},{key:"on",value:function(e,t){this.log("Adding event listener for: ".concat(e)),this.events.on(e,t)}},{key:"once",value:function(e,t){this.log("Adding one-time event listener for: ".concat(e)),this.events.once(e,t)}}])}()}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,i),r.exports}i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};i.r(n),i.d(n,{Footer:()=>a});var o=i(169);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function s(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,c(n.key),n)}}function c(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=r(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}var a=function(){return e=function e(t){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$module=t,this.$themeSelector=t&&t.querySelector(".tna-footer__theme-selector"),this.$tnaTemplate=document.querySelector(".tna-template"),this.$module&&this.$themeSelector&&this.$tnaTemplate&&(this.$themeSelectorButtons=this.$themeSelector.querySelectorAll("button.tna-footer__theme-selector-button[value]"),Array.from(this.$themeSelectorButtons).forEach(function(e){e.addEventListener("click",function(e){var t=e.target;i.setTheme(t.value),i.selectThemeSelectorButton(t)})}),this.cookies=new o.A,this.cookies.isPolicyAccepted("settings")&&this.showThemeSelector(),this.cookies.on("changePolicy",function(e){Object.hasOwn(e,"settings")&&(!0===e.settings?i.showThemeSelector():(i.cookies.delete("theme"),i.hideThemeSelector()))}))},(t=[{key:"showThemeSelector",value:function(){var e=this;if(this.$themeSelector.removeAttribute("hidden"),this.cookies.exists("theme")){var t=Array.from(this.$themeSelectorButtons).find(function(t){return t.value===e.cookies.get("theme")});t&&this.selectThemeSelectorButton(t)}}},{key:"hideThemeSelector",value:function(){this.$themeSelector.setAttribute("hidden","")}},{key:"setTheme",value:function(e){if("light"===e)this.$tnaTemplate.classList.remove("tna-template--system-theme","tna-template--dark-theme");else if("dark"===e)this.$tnaTemplate.classList.remove("tna-template--system-theme"),this.$tnaTemplate.classList.add("tna-template--dark-theme");else{if("system"!==e)return;this.$tnaTemplate.classList.remove("tna-template--dark-theme"),this.$tnaTemplate.classList.add("tna-template--system-theme")}this.cookies.set("theme",e)}},{key:"selectThemeSelectorButton",value:function(e){Array.from(this.$themeSelectorButtons).forEach(function(t){t.value===e.value?(t.classList.remove("tna-button--plain"),t.setAttribute("aria-current",!0)):(t.classList.add("tna-button--plain"),t.removeAttribute("aria-current"))})}}])&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();return n})());
2
2
  //# sourceMappingURL=footer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/footer/footer.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,MAAM,I,+zECTTC,OAAOC,mBAAqBD,OAAOC,oBAAsB,KACzDD,OAAOE,wBAA0BF,OAAOE,yBAA2B,KAE5D,IAAMC,EAAkB,WAW7B,OAAAC,GAPA,SAAAD,IACE,GADYE,EAAA,KAAAF,GAAAG,EAAA,cAHL,CAAC,GAACA,EAAA,qBACK,CAAC,GAGXN,OAAOE,wBACT,OAAOF,OAAOE,wBAEhBF,OAAOE,wBAA0BK,IACnC,GAEA,EAAAC,IAAA,KAAAC,MAKA,SAAGC,EAAOC,GACHC,OAAOC,OAAON,KAAKO,OAAQJ,KAC9BH,KAAKO,OAAOJ,GAAS,IAEvBH,KAAKO,OAAOJ,GAAS,GAAHK,OAAAC,EAAOT,KAAKO,OAAOJ,IAAM,CAAEC,GAC/C,GAAC,CAAAH,IAAA,OAAAC,MAED,SAAKC,EAAOC,GACLC,OAAOC,OAAON,KAAKU,cAAeP,KACrCH,KAAKU,cAAcP,GAAS,IAE9BH,KAAKU,cAAcP,GAAS,GAAHK,OAAAC,EAAOT,KAAKU,cAAcP,IAAM,CAAEC,GAC7D,GAEA,CA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CX,EAAQa,UAAUE,IAAI,qBACtBf,EAAQQ,gBAAgB,gBAE5B,GACF,M,6EAAC,CAnFgB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","window.TNAFrontendCookies = window.TNAFrontendCookies || null;\nwindow.TNAFrontendCookieEvents = window.TNAFrontendCookieEvents || null;\n\nexport class CookieEventHandler {\n events = {};\n oneTimeEvents = {};\n\n constructor() {\n if (window.TNAFrontendCookieEvents) {\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = 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.hasOwn(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n once(event, callback) {\n if (!Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event] = [];\n }\n this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n for (let i = this.oneTimeEvents[event].length - 1; i >= 0; i--) {\n const eventToTrigger = this.oneTimeEvents[event][i];\n eventToTrigger.call(this, data);\n this.oneTimeEvents[event].splice(i, 1);\n }\n }\n }\n}\n\nconst tnaCookiePolicies = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n completePoliciesOnInit = false;\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.policiesKey] - The name of the cookie.\n * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie policy.\n */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n policiesKey,\n newInstance = false,\n defaultAge,\n noInit = false,\n } = options;\n if (!newInstance && window.TNAFrontendCookies) {\n return window.TNAFrontendCookies;\n }\n if (defaultDomain === undefined) {\n this.defaultDomain =\n document.documentElement.dataset.tnaCookiesDomain || \"\";\n } else {\n this.defaultDomain = defaultDomain;\n }\n if (defaultPath === undefined) {\n this.defaultPath = document.documentElement.dataset.tnaCookiesPath || \"/\";\n } else {\n this.defaultPath = defaultPath;\n }\n if (secure === undefined) {\n this.secure =\n document.documentElement.dataset.tnaCookiesInsecure !== \"true\";\n } else {\n this.secure = secure;\n }\n if (policiesKey === undefined) {\n this.policiesKey =\n document.documentElement.dataset.tnaCookiesPoliciesKey ||\n \"cookies_policy\";\n } else {\n this.policiesKey = policiesKey;\n }\n if (defaultAge === undefined) {\n this.defaultAge =\n parseInt(document.documentElement.dataset.tnaCookiesDefaultAge) ||\n 31536000; // 365 days;\n } else {\n this.defaultAge = defaultAge;\n }\n this.events = new CookieEventHandler();\n this.completePoliciesOnInit =\n Object.keys(this.policies).length === tnaCookiePolicies.length &&\n tnaCookiePolicies.every(\n (policy) =>\n Object.keys(this.policies).includes(policy) &&\n typeof this.policies[policy] === \"boolean\",\n );\n if (!this.completePoliciesOnInit && !noInit) {\n this.init();\n }\n window.TNAFrontendCookies = this;\n }\n\n /** @protected */\n init() {\n const existingPolicies = this.policies;\n const filteredExistingPolicies = Object.fromEntries(\n Object.keys(existingPolicies)\n .filter((policy) => tnaCookiePolicies.includes(policy))\n .map((policy) => [policy, existingPolicies[policy]]),\n );\n this.savePolicies({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPolicies,\n essential: true,\n });\n }\n\n destroyInstance() {\n window.TNAFrontendCookies = null;\n }\n\n /** @protected */\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 /** @protected */\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.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) == value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean}\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=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)};${\n domain ? ` domain=${domain}; ` : \"\"\n } samesite=${sameSite}; path=${path}${!session ? `; 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 session,\n cookie,\n });\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = 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.hasOwn(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 /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.events.once(event, callback);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class Footer {\n constructor($module) {\n this.$module = $module;\n this.$themeSelector =\n $module && $module.querySelector(\".tna-footer__theme-selector\");\n this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n if (!this.$module || !this.$themeSelector || !this.$tnaTemplate) {\n return;\n }\n\n this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n \"button.tna-footer__theme-selector-button[value]\",\n );\n\n Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n $themeSelectorButton.addEventListener(\"click\", (e) => {\n const $button = e.target;\n this.setTheme($button.value);\n this.selectThemeSelectorButton($button);\n });\n });\n\n this.cookies = new Cookies();\n if (this.cookies.isPolicyAccepted(\"settings\")) {\n this.showThemeSelector();\n }\n this.cookies.on(\"changePolicy\", (data) => {\n if (Object.hasOwn(data, \"settings\")) {\n if (data.settings === true) {\n this.showThemeSelector();\n } else {\n this.cookies.delete(\"theme\");\n this.hideThemeSelector();\n }\n }\n });\n }\n\n showThemeSelector() {\n this.$themeSelector.removeAttribute(\"hidden\");\n if (this.cookies.exists(\"theme\")) {\n const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n ($button) => $button.value === this.cookies.get(\"theme\"),\n );\n if ($currentThemeButton) {\n this.selectThemeSelectorButton($currentThemeButton);\n }\n }\n }\n\n hideThemeSelector() {\n this.$themeSelector.setAttribute(\"hidden\", \"\");\n }\n\n setTheme(theme) {\n if (theme === \"light\") {\n this.$tnaTemplate.classList.remove(\n \"tna-template--system-theme\",\n \"tna-template--dark-theme\",\n );\n } else if (theme === \"dark\") {\n this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n } else if (theme === \"system\") {\n this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n } else {\n return;\n }\n this.cookies.set(\"theme\", theme);\n }\n\n selectThemeSelectorButton($selectedButton) {\n Array.from(this.$themeSelectorButtons).forEach(($button) => {\n if ($button.value === $selectedButton.value) {\n $button.classList.remove(\"tna-button--plain\");\n $button.setAttribute(\"aria-current\", true);\n } else {\n $button.classList.add(\"tna-button--plain\");\n $button.removeAttribute(\"aria-current\");\n }\n });\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","window","TNAFrontendCookies","TNAFrontendCookieEvents","CookieEventHandler","_createClass","_classCallCheck","_defineProperty","this","key","value","event","callback","Object","hasOwn","events","concat","_toConsumableArray","oneTimeEvents","_this","data","arguments","length","undefined","forEach","eventToTrigger","call","i","splice","tnaCookiePolicies","Cookies","_this2","options","defaultDomain","defaultPath","secure","policiesKey","_options$newInstance","newInstance","defaultAge","_options$noInit","noInit","document","documentElement","dataset","tnaCookiesDomain","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPoliciesKey","parseInt","tnaCookiesDefaultAge","completePoliciesOnInit","keys","policies","every","policy","includes","init","existingPolicies","filteredExistingPolicies","fromEntries","filter","map","savePolicies","_objectSpread","usage","settings","marketing","essential","get","deserialised","cookie","split","x","parts","trim","JSON","parse","e","all","exists","decodeURIComponent","_options$maxAge","maxAge","_options$sameSite","sameSite","_options$domain","domain","_options$path","path","_options$secure","_options$session","session","encodeURIComponent","trigger","set","_this3","setPolicy","accepted","allPolicies","k","toLowerCase","stringify","on","once","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","Footer","$module","$themeSelector","querySelector","$tnaTemplate","$themeSelectorButtons","querySelectorAll","Array","from","$themeSelectorButton","addEventListener","$button","target","setTheme","selectThemeSelectorButton","cookies","isPolicyAccepted","showThemeSelector","hideThemeSelector","removeAttribute","$currentThemeButton","find","setAttribute","theme","classList","remove","add","$selectedButton"],"sourceRoot":""}
1
+ {"version":3,"file":"components/footer/footer.js","mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,cAAe,GAAIH,GACA,iBAAZC,QACdA,QAAqB,YAAID,IAEzBD,EAAkB,YAAIC,GACvB,CATD,CASGK,KAAM,I,yzECTTC,OAAOC,mBAAqBD,OAAOC,oBAAsB,KACzDD,OAAOE,wBAA0BF,OAAOE,yBAA2B,KAE5D,IAAMC,EAAkB,WAY5B,OAAAC,EAPD,SAAAD,IAA2B,IAAfE,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAEf,GAFuBG,EAAA,KAAAN,GAAAO,EAAA,cAJhB,CAAC,GAACA,EAAA,qBACK,CAAC,GAACA,EAAA,cACV,GAGNC,KAAKN,MAAQA,EACTL,OAAOE,wBAET,OADAS,KAAKC,IAAI,mDACFZ,OAAOE,wBAEhBF,OAAOE,wBAA0BS,IACnC,EAAC,EAAAE,IAAA,MAAAC,MAED,WACE,GAAIH,KAAKN,MAAO,SAAAU,EAAAC,EAAAV,U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O,SAAU,CAChC,IAAM6D,EAAsBzI,MAAM6H,KAAKpI,KAAKkI,uBAAuBe,KACjE,SAACV,GAAO,OAAKA,EAAQpI,QAAUyB,EAAK+G,QAAQlE,IAAI,QAAQ,GAEtDuE,GACFhJ,KAAK0I,0BAA0BM,EAEnC,CACF,GAAC,CAAA9I,IAAA,oBAAAC,MAED,WACEH,KAAK+H,eAAemB,aAAa,SAAU,GAC7C,GAAC,CAAAhJ,IAAA,WAAAC,MAED,SAASgJ,GACP,GAAc,UAAVA,EACFnJ,KAAKiI,aAAamB,UAAUC,OAC1B,6BACA,iCAEG,GAAc,SAAVF,EACTnJ,KAAKiI,aAAamB,UAAUC,OAAO,8BACnCrJ,KAAKiI,aAAamB,UAAUE,IAAI,gCAC3B,IAAc,WAAVH,EAIT,OAHAnJ,KAAKiI,aAAamB,UAAUC,OAAO,4BACnCrJ,KAAKiI,aAAamB,UAAUE,IAAI,6BAGlC,CACAtJ,KAAK2I,QAAQzC,IAAI,QAASiD,EAC5B,GAAC,CAAAjJ,IAAA,4BAAAC,MAED,SAA0BoJ,GACxBhJ,MAAM6H,KAAKpI,KAAKkI,uBAAuB7G,QAAQ,SAACkH,GAC1CA,EAAQpI,QAAUoJ,EAAgBpJ,OACpCoI,EAAQa,UAAUC,OAAO,qBACzBd,EAAQW,aAAa,gBAAgB,KAErCX,EAAQa,UAAUE,IAAI,qBACtBf,EAAQQ,gBAAgB,gBAE5B,EACF,M,6EAAC,CAnFgB,G","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/footer/footer.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","window.TNAFrontendCookies = window.TNAFrontendCookies || null;\nwindow.TNAFrontendCookieEvents = window.TNAFrontendCookieEvents || null;\n\nexport class CookieEventHandler {\n events = {};\n oneTimeEvents = {};\n debug = false;\n\n constructor(debug = false) {\n this.debug = debug;\n if (window.TNAFrontendCookieEvents) {\n this.log(\"Using existing TNAFrontendCookieEvents instance\");\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n log(...args) {\n if (this.debug) {\n console.log(\"[TNA Frontend Cookie Events]\", ...args);\n }\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n if (!Object.hasOwn(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n once(event, callback) {\n if (!Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event] = [];\n }\n this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.log(`Triggering event: ${event}`, data);\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n this.log(`Triggering one-time event: ${event}`, data);\n for (let i = this.oneTimeEvents[event].length - 1; i >= 0; i--) {\n const eventToTrigger = this.oneTimeEvents[event][i];\n eventToTrigger.call(this, data);\n this.oneTimeEvents[event].splice(i, 1);\n }\n }\n }\n}\n\nconst tnaCookiePolicies = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n policiesCorrectOnInit = false;\n /** @protected */\n debug = document.documentElement.dataset.tnaFrontendDebug === \"true\";\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.policiesKey] - The name of the cookie.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie policy.\n */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n policiesKey,\n defaultAge,\n newInstance = false,\n noInit = false,\n } = options;\n if (!newInstance && window.TNAFrontendCookies) {\n return window.TNAFrontendCookies;\n }\n if (defaultDomain === undefined) {\n this.defaultDomain =\n document.documentElement.dataset.tnaCookiesDomain ||\n window.location.hostname;\n } else {\n this.defaultDomain = defaultDomain;\n }\n if (defaultPath === undefined) {\n this.defaultPath = document.documentElement.dataset.tnaCookiesPath || \"/\";\n } else {\n this.defaultPath = defaultPath;\n }\n if (secure === undefined) {\n this.secure =\n document.documentElement.dataset.tnaCookiesInsecure !== \"true\";\n } else {\n this.secure = secure;\n }\n if (policiesKey === undefined) {\n this.policiesKey =\n document.documentElement.dataset.tnaCookiesPoliciesKey ||\n \"cookies_policy\";\n } else {\n this.policiesKey = policiesKey;\n }\n if (defaultAge === undefined) {\n this.defaultAge =\n parseInt(document.documentElement.dataset.tnaCookiesDefaultAge) ||\n 31536000; // 365 days;\n } else {\n this.defaultAge = defaultAge;\n }\n this.events = new CookieEventHandler(this.debug);\n this.policiesCorrectOnInit =\n Object.keys(this.policies).length === tnaCookiePolicies.length &&\n tnaCookiePolicies.every(\n (policy) =>\n Object.keys(this.policies).includes(policy) &&\n typeof this.policies[policy] === \"boolean\",\n );\n if (!this.policiesCorrectOnInit && !noInit) {\n this.init();\n }\n this.log({\n defaultDomain: this.defaultDomain,\n defaultPath: this.defaultPath,\n secure: this.secure,\n policiesKey: this.policiesKey,\n defaultAge: this.defaultAge,\n policiesCorrectOnInit: this.policiesCorrectOnInit,\n });\n if (!newInstance && !window.TNAFrontendCookies) {\n window.TNAFrontendCookies = this;\n }\n }\n\n /** @protected */\n init() {\n const existingPolicies = this.policies;\n this.log(\"Existing policies on init:\", existingPolicies);\n const filteredExistingPolicies = Object.fromEntries(\n Object.keys(existingPolicies)\n .filter((policy) => tnaCookiePolicies.includes(policy))\n .map((policy) => [policy, existingPolicies[policy]]),\n );\n if (Object.keys(filteredExistingPolicies).length > 0) {\n this.log(\"Filtered existing policies:\", filteredExistingPolicies);\n }\n this.savePolicies({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPolicies,\n essential: true,\n });\n }\n\n log(...args) {\n if (this.debug) {\n console.log(\"[TNA Frontend Cookies]\", ...args, this.all);\n }\n }\n\n destroyInstance() {\n this.log(\"Destroying TNAFrontendCookies instance\");\n window.TNAFrontendCookies = null;\n }\n\n /** @protected */\n 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 /** @protected */\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.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) == value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean}\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=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}; domain=${domain}; samesite=${sameSite}; path=${path}${!session ? `; max-age=${maxAge}` : \"\"}${\n secure ? \"; secure\" : \"\"\n }`;\n document.cookie = cookie;\n this.log(\"Set cookie:\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = this.defaultDomain) {\n const options = { maxAge: -1, path, domain: domain || undefined };\n this.set(key, \"\", options);\n this.log(\"Deleted cookie:\", { key, path, domain, ...options });\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = this.defaultDomain) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n this.log(\"Deleted all cookies\", { path, domain });\n this.events.trigger(\"deleteAllCookies\", { path, domain });\n }\n\n /**\n * Accept a policy.\n * @param {String} policy - The name of the policy.\n */\n acceptPolicy(policy) {\n this.log(\"Accepting policy:\", policy);\n this.setPolicy(policy, true);\n this.events.trigger(\"acceptPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: true });\n }\n\n /**\n * Reject a policy.\n * @param {String} policy - The name of the policy.\n */\n rejectPolicy(policy) {\n this.log(\"Rejecting policy:\", policy);\n this.setPolicy(policy, false);\n this.events.trigger(\"rejectPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: false });\n }\n\n /**\n * Set a policy.\n * @param {String} policy - The name of the policy.\n * @param {Boolean} accepted - Whether the policy is accepted or not.\n */\n setPolicy(policy, accepted) {\n if (policy === \"essential\") {\n this.log(\"Cannot change essential policy, it is always accepted.\");\n return;\n }\n this.log(`Setting policy ${policy} to ${accepted}`);\n this.savePolicies({\n ...this.policies,\n [policy]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePolicy\", { [policy]: accepted });\n }\n\n /**\n * Accept all the cookie policies.\n */\n acceptAllPolicies() {\n this.log(\"Accepting all policies\");\n const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((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 this.log(\"Rejecting all policies\");\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.log(\"Saving policies:\", policies);\n this.set(this.policiesKey, JSON.stringify(policies));\n }\n\n /**\n * Get the acceptance status of a policy.\n * @param {String} policy - The name of the policy.\n * @returns {Boolean}\n */\n isPolicyAccepted(policy) {\n return Object.hasOwn(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.log(`Adding event listener for: ${event}`);\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.log(`Adding one-time event listener for: ${event}`);\n this.events.once(event, callback);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Cookies from \"../../lib/cookies.mjs\";\n\nexport class Footer {\n constructor($module) {\n this.$module = $module;\n this.$themeSelector =\n $module && $module.querySelector(\".tna-footer__theme-selector\");\n this.$tnaTemplate = document.querySelector(\".tna-template\");\n\n if (!this.$module || !this.$themeSelector || !this.$tnaTemplate) {\n return;\n }\n\n this.$themeSelectorButtons = this.$themeSelector.querySelectorAll(\n \"button.tna-footer__theme-selector-button[value]\",\n );\n\n Array.from(this.$themeSelectorButtons).forEach(($themeSelectorButton) => {\n $themeSelectorButton.addEventListener(\"click\", (e) => {\n const $button = e.target;\n this.setTheme($button.value);\n this.selectThemeSelectorButton($button);\n });\n });\n\n this.cookies = new Cookies();\n if (this.cookies.isPolicyAccepted(\"settings\")) {\n this.showThemeSelector();\n }\n this.cookies.on(\"changePolicy\", (data) => {\n if (Object.hasOwn(data, \"settings\")) {\n if (data.settings === true) {\n this.showThemeSelector();\n } else {\n this.cookies.delete(\"theme\");\n this.hideThemeSelector();\n }\n }\n });\n }\n\n showThemeSelector() {\n this.$themeSelector.removeAttribute(\"hidden\");\n if (this.cookies.exists(\"theme\")) {\n const $currentThemeButton = Array.from(this.$themeSelectorButtons).find(\n ($button) => $button.value === this.cookies.get(\"theme\"),\n );\n if ($currentThemeButton) {\n this.selectThemeSelectorButton($currentThemeButton);\n }\n }\n }\n\n hideThemeSelector() {\n this.$themeSelector.setAttribute(\"hidden\", \"\");\n }\n\n setTheme(theme) {\n if (theme === \"light\") {\n this.$tnaTemplate.classList.remove(\n \"tna-template--system-theme\",\n \"tna-template--dark-theme\",\n );\n } else if (theme === \"dark\") {\n this.$tnaTemplate.classList.remove(\"tna-template--system-theme\");\n this.$tnaTemplate.classList.add(`tna-template--dark-theme`);\n } else if (theme === \"system\") {\n this.$tnaTemplate.classList.remove(\"tna-template--dark-theme\");\n this.$tnaTemplate.classList.add(`tna-template--system-theme`);\n } else {\n return;\n }\n this.cookies.set(\"theme\", theme);\n }\n\n selectThemeSelectorButton($selectedButton) {\n Array.from(this.$themeSelectorButtons).forEach(($button) => {\n if ($button.value === $selectedButton.value) {\n $button.classList.remove(\"tna-button--plain\");\n $button.setAttribute(\"aria-current\", true);\n } else {\n $button.classList.add(\"tna-button--plain\");\n $button.removeAttribute(\"aria-current\");\n }\n });\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","window","TNAFrontendCookies","TNAFrontendCookieEvents","CookieEventHandler","_createClass","debug","arguments","length","undefined","_classCallCheck","_defineProperty","this","log","key","value","_console","_len","args","Array","_key","console","apply","concat","event","callback","Object","hasOwn","events","_toConsumableArray","oneTimeEvents","_this","data","forEach","eventToTrigger","call","i","splice","tnaCookiePolicies","Cookies","_this2","options","document","documentElement","dataset","tnaFrontendDebug","defaultDomain","defaultPath","secure","policiesKey","defaultAge","_options$newInstance","newInstance","_options$noInit","noInit","tnaCookiesDomain","location","hostname","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPoliciesKey","parseInt","tnaCookiesDefaultAge","policiesCorrectOnInit","keys","policies","every","policy","includes","init","existingPolicies","filteredExistingPolicies","fromEntries","filter","map","savePolicies","_objectSpread","usage","settings","marketing","essential","_console2","_len2","_key2","all","get","deserialised","cookie","split","x","parts","trim","JSON","parse","e","exists","decodeURIComponent","_options$maxAge","maxAge","_options$sameSite","sameSite","_options$domain","domain","_options$path","path","_options$secure","_options$session","session","encodeURIComponent","trigger","set","_this3","setPolicy","accepted","allPolicies","k","toLowerCase","stringify","on","once","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","Footer","$module","$themeSelector","querySelector","$tnaTemplate","$themeSelectorButtons","querySelectorAll","from","$themeSelectorButton","addEventListener","$button","target","setTheme","selectThemeSelectorButton","cookies","isPolicyAccepted","showThemeSelector","hideThemeSelector","removeAttribute","$currentThemeButton","find","setAttribute","theme","classList","remove","add","$selectedButton"],"sourceRoot":""}
@@ -67,7 +67,7 @@
67
67
  <meta itemprop="streetAddress" content="Bessant Drive">
68
68
  <span itemprop="addressLocality">Kew</span>, <span itemprop="addressRegion">Richmond</span><br>
69
69
  <span itemprop="postalCode">TW9 4DU</span>
70
- <meta itemprop="addressCountry" content="UK">
70
+ <meta itemprop="addressCountry" content="GB">
71
71
  </address>
72
72
  <meta itemprop="foundingDate" content="2003-04">
73
73
  <div itemprop="parentOrganization" itemscope itemtype="https://schema.org/Organization">
@@ -1 +1 @@
1
- .tna-gallery__item-figure-inner,.tna-gallery__navigation-item{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-gallery--bounded,.tna-gallery:fullscreen{--background: var(--background-tint);background-color:var(--background, #f4f4f4)}.tna-gallery__navigation-button-label,.tna-gallery__navigation-item[aria-current=true]{--background: var(--accent-background);--font-base: var(--accent-font-base);--font-dark: var(--accent-font-dark);--font-light: var(--accent-font-light);--icon-light: var(--accent-icon-light);--link: var(--accent-link);--link-visited: var(--accent-link);--keyline: var(--accent-keyline);--keyline-dark: var(--accent-keyline-dark);--accent-border: var(--accent-font-dark);--button-text: var(--accent-button-text);--button-background: var(--accent-button-background);--button-hover-text: var(--accent-button-hover-text);--button-hover-background: var(--accent-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-gallery{margin-top:32px}.tna-gallery:first-child{margin-top:0}.tna-gallery{display:grid;grid-template:min-content min-content 1fr/2fr 1fr;gap:0 16px;border-radius:.1px}.tna-gallery__header{grid-column:1/3;grid-row:1;display:flex;gap:32px}.tna-gallery__header-inner{flex:1}.tna-gallery__options{margin-top:0;flex-direction:column;align-items:flex-end;justify-content:flex-start}.tna-gallery__options .tna-button{white-space:nowrap}@media(max-width: 48em){.tna-gallery__options .tna-button[value=enter-fullscreen]{display:none}}.tna-gallery__items,.tna-gallery__navigation-buttons{grid-column:1/3;grid-row:2}.tna-gallery__items{position:relative;z-index:1;border-radius:.1px}.tna-template--clicked .tna-gallery__items:focus{outline:none}.tna-gallery__item{display:flex;flex-direction:column;align-items:stretch;justify-content:center}.tna-gallery__item-header{padding:16px;line-height:1;text-align:center;font-weight:700;font-size:1rem}.tna-gallery__item-figure{display:flex;flex-direction:column;align-items:stretch;gap:16px}.tna-gallery__item-figure-inner{width:100%;position:relative;border-radius:4px}.tna-gallery__item-image{margin:0 auto}.tna-gallery__item-description{margin-bottom:16px;padding:8px 16px;align-self:flex-start;border-left:5px var(--keyline-dark, rgb(38, 38, 42)) solid}.tna-gallery__navigation-buttons{width:100%;max-height:50vh;aspect-ratio:3/2;position:relative;top:3rem;z-index:2;pointer-events:none}.tna-template--touched .tna-gallery__navigation-buttons{display:none}.tna-gallery__navigation-button{width:35%;display:flex;align-items:center;position:absolute;top:0;bottom:0;background:rgba(0,0,0,0);border:none;border-radius:.1px;opacity:0;cursor:pointer;pointer-events:auto;font-weight:700}.tna-gallery__navigation-button:hover,.tna-gallery__navigation-button:focus-visible{opacity:1}.tna-gallery__navigation-prev{padding-left:1rem;justify-content:flex-start;left:0}.tna-gallery__navigation-next{padding-right:1rem;justify-content:flex-end;right:0}.tna-gallery__navigation-button-label{padding:.5rem .75rem;display:flex;align-items:center;gap:.5rem;border-radius:4px}.tna-gallery__navigation-button-icon{content:"";width:.75rem;height:.75rem;display:block;flex:none;border-top:4px var(--font-dark, rgb(1, 1, 1)) solid;border-right:4px var(--font-dark, rgb(1, 1, 1)) solid;transform-origin:50% 50%}.tna-gallery__navigation-prev .tna-gallery__navigation-button-icon{transform:rotate(-135deg)}.tna-gallery__navigation-next .tna-gallery__navigation-button-icon{transform:rotate(45deg)}.tna-gallery__items--hide-item-titles .tna-gallery__item .tna-gallery__item-header,.tna-gallery__items--hide-items,.tna-gallery__items--hide-items+.tna-gallery__navigation-buttons{display:none}.tna-gallery__navigation{max-height:40rem;max-height:clamp(15rem,100vh - 32px,40rem);padding:16px;grid-column:1/3;grid-row:3;display:grid;grid-template-columns:repeat(6, 1fr);grid-auto-rows:min-content;gap:16px;overflow:auto}.tna-gallery__navigation-item{min-width:0;min-height:0;aspect-ratio:1;position:relative;border:none;border-radius:4px;cursor:pointer;background:linear-gradient(-45deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.25));background-size:500% 500%;background-position:0 50%;animation:image-loader-background ease-in-out 1.2s infinite}.tna-gallery__navigation-item:hover::after{content:"";position:absolute;inset:0;z-index:2;border:5px var(--accent-border, rgb(140, 150, 148)) solid}.tna-gallery__navigation-item[aria-current=true]::after{content:"";position:absolute;inset:0;z-index:2;border:5px rgb(1, 1, 1) solid}.tna-gallery__navigation-item-image{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}.tna-gallery__navigation-item-label{padding:4px 12px;display:inline-block;position:absolute;top:0;left:0;z-index:4;text-transform:capitalize;color:var(--font-dark, rgb(1, 1, 1));font-size:1.5rem;font-weight:700;background-color:var(--background, #f4f4f4);border-radius:0 0 4px 0}.tna-gallery--interactive .tna-gallery__item-figure-inner{max-height:50vh;aspect-ratio:3/2}.tna-gallery--interactive .tna-gallery__item-image{width:100%;height:100%;position:absolute;inset:0;z-index:1;object-fit:contain}@media(min-width: 48.0625em)and (max-width: 64em){.tna-gallery__navigation{grid-template-columns:repeat(4, 1fr)}}@media(max-width: 48em){.tna-gallery__options{flex-direction:row-reverse;align-items:flex-start}.tna-gallery__navigation{grid-template-columns:repeat(3, 1fr)}}@media(max-width: 30em){.tna-gallery__navigation-item-label{font-size:1.125rem}}.tna-gallery--bounded{border-radius:4px}.tna-gallery--bounded .tna-gallery__header,.tna-gallery:fullscreen .tna-gallery__header{padding:16px}.tna-gallery:fullscreen .tna-gallery__header-inner{display:none}.tna-gallery:fullscreen .tna-gallery__options{flex:1;flex-direction:row;align-items:flex-start;justify-content:flex-end}.tna-gallery:fullscreen .tna-gallery__options .tna-button[value=show-index]{display:none}.tna-gallery--bounded .tna-gallery__item-figure-inner{border-radius:.1px}.tna-gallery--bounded .tna-gallery__item-description,.tna-gallery:fullscreen .tna-gallery__item-description{margin-right:16px;margin-left:16px}.tna-gallery:fullscreen .tna-gallery__item-description{max-height:6rem;overflow:auto}.tna-gallery:fullscreen .tna-gallery__navigation{max-height:none}@media(aspect-ratio >= 1/1){.tna-gallery:fullscreen .tna-gallery__header{grid-column:2/3}.tna-gallery:fullscreen .tna-gallery__items{grid-column:1;grid-row:1/4;display:flex;flex-direction:column}.tna-gallery:fullscreen .tna-gallery__item{flex:1}.tna-gallery:fullscreen .tna-gallery__item-figure{flex:1}.tna-gallery:fullscreen .tna-gallery__item-figure-inner{border-radius:0 4px 4px 0}.tna-gallery:fullscreen .tna-gallery__item-description{margin-right:0;margin-bottom:0}.tna-gallery:fullscreen .tna-gallery__item-figure-inner,.tna-gallery:fullscreen .tna-gallery__navigation-buttons{max-height:none;flex:1;aspect-ratio:auto}.tna-gallery:fullscreen .tna-gallery__navigation-buttons{width:auto;padding:16px;grid-column:1;grid-row:4;display:flex;align-items:center;justify-content:space-between;top:0}.tna-gallery:fullscreen .tna-gallery__navigation-button{width:auto;padding:0;position:static;opacity:1}.tna-gallery:fullscreen .tna-gallery__navigation{grid-column:2/3;grid-row:2/4;grid-template-columns:repeat(3, 1fr);gap:8px}}/*# sourceMappingURL=gallery.css.map */
1
+ .tna-gallery__item-figure-inner,.tna-gallery__navigation-item,.tna-gallery:fullscreen{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-gallery--bounded{--background: var(--background-tint);background-color:var(--background, #f4f4f4)}.tna-gallery__navigation-button-label,.tna-gallery__navigation-item[aria-current=true]{--background: var(--accent-background);--font-base: var(--accent-font-base);--font-dark: var(--accent-font-dark);--font-light: var(--accent-font-light);--icon-light: var(--accent-icon-light);--link: var(--accent-link);--link-visited: var(--accent-link);--keyline: var(--accent-keyline);--keyline-dark: var(--accent-keyline-dark);--accent-border: var(--accent-font-dark);--button-text: var(--accent-button-text);--button-background: var(--accent-button-background);--button-hover-text: var(--accent-button-hover-text);--button-hover-background: var(--accent-button-hover-background);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-gallery{margin-top:32px}.tna-gallery:first-child{margin-top:0}.tna-gallery{display:grid;grid-template:min-content min-content 1fr/2fr 1fr;gap:0 16px;border-radius:.1px}.tna-gallery__header{grid-column:1/3;grid-row:1;display:flex;gap:32px}.tna-gallery__header-inner{flex:1}.tna-gallery__options{margin-top:0;flex-direction:column;align-items:flex-end;justify-content:flex-start}.tna-gallery__options .tna-button{white-space:nowrap}@media(max-width: 48em){.tna-gallery__options .tna-button[value=enter-fullscreen]{display:none}}.tna-gallery__items,.tna-gallery__navigation-buttons{grid-column:1/3;grid-row:2}.tna-gallery__items{position:relative;z-index:1;border-radius:.1px}.tna-template--clicked .tna-gallery__items:focus{outline:none}.tna-gallery__item{display:flex;flex-direction:column;align-items:stretch;justify-content:center}.tna-gallery__item-header{padding:16px;line-height:1;text-align:center;font-weight:700;font-size:1rem}.tna-gallery__item-figure{display:flex;flex-direction:column;align-items:stretch;gap:16px}.tna-gallery__item-figure-inner{width:100%;position:relative;border-radius:4px}.tna-gallery__item-image{margin:0 auto}.tna-gallery__item-description{margin-bottom:16px;padding:8px 16px;align-self:flex-start;border-left:5px var(--keyline-dark, rgb(38, 38, 42)) solid}.tna-gallery__navigation-buttons{width:100%;max-height:50vh;aspect-ratio:3/2;position:relative;top:3rem;z-index:2;pointer-events:none}.tna-template--touched .tna-gallery__navigation-buttons{display:none}.tna-gallery__navigation-button{width:35%;display:flex;align-items:center;position:absolute;top:0;bottom:0;background:rgba(0,0,0,0);border:none;border-radius:.1px;opacity:0;cursor:pointer;pointer-events:auto;font-weight:700}.tna-gallery__navigation-button:hover,.tna-gallery__navigation-button:focus-visible{opacity:1}.tna-gallery__navigation-prev{padding-left:1rem;justify-content:flex-start;left:0}.tna-gallery__navigation-next{padding-right:1rem;justify-content:flex-end;right:0}.tna-gallery__navigation-button-label{padding:.5rem .75rem;display:flex;align-items:center;gap:.5rem;border-radius:4px}.tna-gallery__navigation-button-icon{content:"";width:.75rem;height:.75rem;display:block;flex:none;border-top:4px var(--font-dark, rgb(1, 1, 1)) solid;border-right:4px var(--font-dark, rgb(1, 1, 1)) solid;transform-origin:50% 50%}.tna-gallery__navigation-prev .tna-gallery__navigation-button-icon{transform:rotate(-135deg)}.tna-gallery__navigation-next .tna-gallery__navigation-button-icon{transform:rotate(45deg)}.tna-gallery__items--hide-item-titles .tna-gallery__item .tna-gallery__item-header,.tna-gallery__items--hide-items,.tna-gallery__items--hide-items+.tna-gallery__navigation-buttons{display:none}.tna-gallery__navigation{max-height:40rem;max-height:clamp(15rem,100vh - 32px,40rem);padding:16px;grid-column:1/3;grid-row:3;display:grid;grid-template-columns:repeat(6, 1fr);grid-auto-rows:min-content;gap:16px;overflow:auto}.tna-gallery__navigation-item{min-width:0;min-height:0;aspect-ratio:1;position:relative;border:none;border-radius:4px;cursor:pointer;background:linear-gradient(-45deg, rgba(0, 0, 0, 0.25), rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.25));background-size:500% 500%;background-position:0 50%;animation:image-loader-background ease-in-out 1.2s infinite}.tna-gallery__navigation-item:hover::after{content:"";position:absolute;inset:0;z-index:2;border:5px var(--accent-border, rgb(140, 150, 148)) solid}.tna-gallery__navigation-item[aria-current=true]::after{content:"";position:absolute;inset:0;z-index:2;border:5px rgb(1, 1, 1) solid}.tna-gallery__navigation-item-image{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}.tna-gallery__navigation-item-label{padding:4px 12px;display:inline-block;position:absolute;top:0;left:0;z-index:4;text-transform:capitalize;color:var(--font-dark, rgb(1, 1, 1));font-size:1.5rem;font-weight:700;background-color:var(--background, #f4f4f4);border-radius:0 0 4px 0}.tna-gallery--interactive .tna-gallery__item-figure-inner{max-height:50vh;aspect-ratio:3/2}.tna-gallery--interactive .tna-gallery__item-image{width:100%;height:100%;position:absolute;inset:0;z-index:1;object-fit:contain}@media(min-width: 48.0625em)and (max-width: 64em){.tna-gallery__navigation{grid-template-columns:repeat(4, 1fr)}}@media(max-width: 48em){.tna-gallery__options{flex-direction:row-reverse;align-items:flex-start}.tna-gallery__navigation{grid-template-columns:repeat(3, 1fr)}}@media(max-width: 30em){.tna-gallery__navigation-item-label{font-size:1.125rem}}.tna-gallery--bounded{border-radius:4px}.tna-gallery--bounded .tna-gallery__header,.tna-gallery:fullscreen .tna-gallery__header{padding:16px}.tna-gallery:fullscreen .tna-gallery__header-inner{display:none}.tna-gallery:fullscreen .tna-gallery__options{flex:1;flex-direction:row;align-items:flex-start;justify-content:flex-end}.tna-gallery:fullscreen .tna-gallery__options .tna-button[value=show-index]{display:none}.tna-gallery--bounded .tna-gallery__item-figure-inner{border-radius:.1px}.tna-gallery--bounded .tna-gallery__item-description,.tna-gallery:fullscreen .tna-gallery__item-description{margin-right:16px;margin-left:16px}.tna-gallery:fullscreen .tna-gallery__item-description{max-height:6rem;overflow:auto}.tna-gallery:fullscreen .tna-gallery__navigation{max-height:none}@media(aspect-ratio >= 1/1){.tna-gallery:fullscreen .tna-gallery__header{grid-column:2/3}.tna-gallery:fullscreen .tna-gallery__items{grid-column:1;grid-row:1/4;display:flex;flex-direction:column}.tna-gallery:fullscreen .tna-gallery__item{flex:1}.tna-gallery:fullscreen .tna-gallery__item-figure{flex:1}.tna-gallery:fullscreen .tna-gallery__item-figure-inner{border-radius:0 4px 4px 0}.tna-gallery:fullscreen .tna-gallery__item-description{margin-right:0;margin-bottom:0}.tna-gallery:fullscreen .tna-gallery__item-figure-inner,.tna-gallery:fullscreen .tna-gallery__navigation-buttons{max-height:none;flex:1;aspect-ratio:auto}.tna-gallery:fullscreen .tna-gallery__navigation-buttons{width:auto;padding:16px;grid-column:1;grid-row:4;display:flex;align-items:center;justify-content:space-between;top:0}.tna-gallery:fullscreen .tna-gallery__navigation-button{width:auto;padding:0;position:static;opacity:1}.tna-gallery:fullscreen .tna-gallery__navigation{grid-column:2/3;grid-row:2/4;grid-template-columns:repeat(3, 1fr);gap:8px}}/*# sourceMappingURL=gallery.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/gallery/gallery.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss"],"names":[],"mappings":"AA4OA,8DACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEA/JA,4CAJA,gCAsNF,8CACE,qCAnNA,4CA4NF,uFACE,uCACA,qCACA,qCACA,uCACA,uCACA,2BACA,mCACA,iCACA,2CACA,yCACA,yCACA,qDACA,qDACA,iEA1OA,4CAJA,gCC5EF,aACE,gBAEA,yBACE,aCLJ,aAGE,aACA,kDACA,WAEA,mBAEA,qBACE,gBACA,WAEA,aACA,SAGF,2BACE,OAGF,sBACE,aAEA,sBACA,qBACA,2BAEA,kCACE,mBC4CJ,wBD1CI,0DAEI,cAMR,qDAEE,gBACA,WAGF,oBACE,kBACA,UAEA,mBEZF,iDACE,aFgBF,mBACE,aACA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gBAGF,4CACE,cACA,aAEA,aACA,sBAGF,2CACE,OAGF,kDACE,OAGF,wDACE,0BAIF,uDACE,eACA,gBAGF,iHAEE,gBACA,OAEA,kBAGF,yDACE,WACA,aAEA,cACA,WAEA,aACA,mBACA,8BAEA,MAGF,wDACE,WACA,UAEA,gBAEA,UAGF,iDAIE,gBACA,aAEA,qCACA","file":"gallery.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"../../variables/a11y\" as a11yVariables;\n@use \"../../variables/borders\" as bordersVars;\n@use \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-gallery {\n @include spacing.space-above;\n\n display: grid;\n grid-template: min-content min-content 1fr / 2fr 1fr;\n gap: 0 spacing.space(1);\n\n border-radius: 0.1px;\n\n &__header {\n grid-column: 1 / 3;\n grid-row: 1;\n\n display: flex;\n gap: spacing.space(2);\n }\n\n &__header-inner {\n flex: 1;\n }\n\n &__options {\n margin-top: 0;\n\n flex-direction: column;\n align-items: flex-end;\n justify-content: flex-start;\n\n .tna-button {\n white-space: nowrap;\n\n &[value=\"enter-fullscreen\"] {\n @include media.on-mobile {\n display: none;\n }\n }\n }\n }\n\n &__items,\n &__navigation-buttons {\n grid-column: 1 / 3;\n grid-row: 2;\n }\n\n &__items {\n position: relative;\n z-index: 1;\n\n border-radius: 0.1px;\n\n @include a11y.no-focus-outline-on-click;\n }\n\n &__item {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: center;\n }\n\n &__item-header {\n padding: spacing.space(1);\n\n line-height: 1;\n text-align: center;\n\n @include typography.main-font-weight-bold;\n @include typography.font-size(16);\n }\n\n &__item-figure {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: spacing.space(1);\n }\n\n &__item-figure-inner {\n width: 100%;\n\n position: relative;\n\n @include colour.contrast;\n\n @include borders.rounded-border;\n }\n\n &__item-image {\n margin: 0 auto;\n }\n\n &__item-description {\n margin-bottom: spacing.space(1);\n padding: spacing.space(0.5) spacing.space(1);\n\n align-self: flex-start;\n\n @include colour.thick-keyline-dark(left);\n }\n\n &__navigation-buttons {\n width: 100%;\n max-height: 50vh;\n aspect-ratio: 3 / 2;\n\n position: relative;\n top: 3rem;\n z-index: 2;\n\n pointer-events: none;\n\n .tna-template--touched & {\n display: none;\n }\n }\n\n &__navigation-button {\n width: 35%;\n\n display: flex;\n align-items: center;\n\n position: absolute;\n top: 0;\n bottom: 0;\n\n background: transparent;\n\n border: none;\n border-radius: 0.1px;\n\n opacity: 0;\n\n cursor: pointer;\n pointer-events: auto;\n @include typography.main-font-weight-bold;\n\n &:hover,\n &:focus-visible {\n opacity: 1;\n }\n }\n\n &__navigation-prev {\n padding-left: 1rem;\n\n justify-content: flex-start;\n\n left: 0;\n }\n\n &__navigation-next {\n padding-right: 1rem;\n\n justify-content: flex-end;\n\n right: 0;\n }\n\n &__navigation-button-label {\n padding: 0.5rem 0.75rem;\n\n display: flex;\n align-items: center;\n gap: 0.5rem;\n\n @include colour.accent;\n\n @include borders.rounded-border;\n }\n\n &__navigation-button-icon {\n content: \"\";\n\n width: 0.75rem;\n height: 0.75rem;\n\n display: block;\n flex: none;\n\n @include colour.colour-border(\"font-dark\", 4px, solid, top);\n @include colour.colour-border(\"font-dark\", 4px, solid, right);\n\n transform-origin: 50% 50%;\n }\n\n &__navigation-prev &__navigation-button-icon {\n transform: rotate(-135deg);\n }\n\n &__navigation-next &__navigation-button-icon {\n transform: rotate(45deg);\n }\n\n &__items--hide-item-titles &__item &__item-header,\n &__items--hide-items,\n &__items--hide-items + &__navigation-buttons {\n display: none;\n }\n\n &__navigation {\n max-height: 40rem;\n max-height: clamp(15rem, calc(100vh - #{spacing.space(2)}), 40rem);\n padding: spacing.space(1);\n\n grid-column: 1 / 3;\n grid-row: 3;\n\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n grid-auto-rows: min-content;\n gap: spacing.space(1);\n\n overflow: auto;\n }\n\n &__navigation-item {\n min-width: 0;\n min-height: 0;\n aspect-ratio: 1;\n\n position: relative;\n\n border: none;\n @include borders.rounded-border;\n\n cursor: pointer;\n\n @include colour.contrast;\n\n @include colour.image-loader-background;\n\n &:hover {\n &::after {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 2;\n\n @include colour.thick-keyline-accent;\n }\n }\n\n &[aria-current=\"true\"] {\n @include colour.accent;\n\n &::after {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 2;\n\n @include colour.thick-keyline-brand(\"\", \"black\");\n }\n }\n }\n\n &__navigation-item-image {\n width: 100%;\n height: 100%;\n\n position: absolute;\n inset: 0;\n object-fit: cover;\n }\n\n &__navigation-item-label {\n padding: spacing.space(0.25) spacing.space(0.75);\n\n display: inline-block;\n\n position: absolute;\n top: 0;\n left: 0;\n z-index: 4;\n\n text-transform: capitalize;\n\n @include colour.colour-font(\"font-dark\");\n @include typography.font-size(24);\n @include typography.main-font-weight-bold;\n\n @include colour.colour-background(\"background\");\n\n // @include borders.rounded-border;\n border-radius: 0 0 bordersVars.$rounded-border-radius 0;\n }\n\n &--interactive &__item-figure-inner {\n max-height: 50vh;\n aspect-ratio: 3 / 2;\n }\n\n &--interactive &__item-image {\n width: 100%;\n height: 100%;\n\n position: absolute;\n inset: 0;\n z-index: 1;\n object-fit: contain;\n }\n\n @include media.on-medium {\n &__navigation {\n grid-template-columns: repeat(4, 1fr);\n }\n }\n\n @include media.on-mobile {\n &__options {\n flex-direction: row-reverse;\n align-items: flex-start;\n }\n\n &__navigation {\n grid-template-columns: repeat(3, 1fr);\n }\n }\n\n @include media.on-tiny {\n &__navigation-item-label {\n @include typography.font-size(18);\n }\n }\n\n &--bounded {\n @include borders.rounded-border;\n }\n\n &--bounded,\n &:fullscreen {\n @include colour.tint;\n }\n\n &--bounded &__header,\n &:fullscreen &__header {\n padding: spacing.space(1);\n }\n\n &:fullscreen &__header-inner {\n display: none;\n }\n\n &:fullscreen &__options {\n flex: 1;\n\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-end;\n\n .tna-button[value=\"show-index\"] {\n display: none;\n }\n }\n\n &--bounded &__item-figure-inner {\n border-radius: 0.1px;\n }\n\n &--bounded &__item-description,\n &:fullscreen &__item-description {\n margin-right: spacing.space(1);\n margin-left: spacing.space(1);\n }\n\n &:fullscreen &__item-description {\n max-height: 6rem;\n\n overflow: auto;\n }\n\n &:fullscreen &__navigation {\n max-height: none;\n }\n\n @media (aspect-ratio >= 1/1) {\n &:fullscreen &__header {\n grid-column: 2 / 3;\n }\n\n &:fullscreen &__items {\n grid-column: 1;\n grid-row: 1 / 4;\n\n display: flex;\n flex-direction: column;\n }\n\n &:fullscreen &__item {\n flex: 1;\n }\n\n &:fullscreen &__item-figure {\n flex: 1;\n }\n\n &:fullscreen &__item-figure-inner {\n border-radius: 0 bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0;\n }\n\n &:fullscreen &__item-description {\n margin-right: 0;\n margin-bottom: 0;\n }\n\n &:fullscreen &__item-figure-inner,\n &:fullscreen &__navigation-buttons {\n max-height: none;\n flex: 1;\n\n aspect-ratio: auto;\n }\n\n &:fullscreen &__navigation-buttons {\n width: auto;\n padding: spacing.space(1);\n\n grid-column: 1;\n grid-row: 4;\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n top: 0;\n }\n\n &:fullscreen &__navigation-button {\n width: auto;\n padding: 0;\n\n position: static;\n\n opacity: 1;\n }\n\n &:fullscreen &__navigation {\n // padding-top: 0;\n // padding-left: 0;\n\n grid-column: 2 / 3;\n grid-row: 2 / 4;\n\n grid-template-columns: repeat(3, 1fr);\n gap: spacing.space(0.5);\n }\n }\n}\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n\n@mixin visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n overflow: hidden !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n background-color: transparent !important;\n\n border: 0 !important;\n\n clip: rect(0, 0, 0, 0) !important;\n\n // &::before,\n // &::after {\n // content: \"\\00a0\";\n // }\n}\n\n@mixin focus-outline-without-offset {\n @include colour.colour-outline(\n \"focus-outline\",\n a11y.$focus-outline-width,\n solid\n );\n}\n\n@mixin focus-outline {\n @include focus-outline-without-offset;\n outline-offset: a11y.$focus-outline-offset;\n}\n\n@mixin active-outline {\n outline-offset: 0;\n}\n\n@mixin no-focus-outline-on-click {\n .tna-template--clicked &:focus {\n outline: none;\n }\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n\n/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 19 !default;\n$body-font-size-px-medium: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactable-text-decoration-offset: 0.125em !default;\n$interactable-text-decoration-thickness: #{math.div(1.5, $relative-1rem-px)}rem !default;\n$interactive-text-decoration-thickness: #{math.div(4, $relative-1rem-px)}rem !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 32 !default;\n$heading-l-font-size-small: 29 !default;\n$heading-l-font-size-tiny: $heading-l-font-size-small !default;\n$heading-l-line-height: 1.15 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: $heading-m-font-size-default !default;\n$heading-m-font-size-small: 21 !default;\n$heading-m-font-size-tiny: $heading-m-font-size-small !default;\n$heading-m-line-height: 1.4 !default;\n\n$heading-s-font-size-default: 19 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.5 !default;\n","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$very-thick-border-width: 8px !default;\n$rounded-border-radius: 4px !default;\n"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/gallery/gallery.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/tools/_typography.scss","../../../../src/nationalarchives/variables/_typography.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss"],"names":[],"mappings":"AA4OA,sFACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEA/JA,4CAJA,gCAsNF,sBACE,qCAnNA,4CA4NF,uFACE,uCACA,qCACA,qCACA,uCACA,uCACA,2BACA,mCACA,iCACA,2CACA,yCACA,yCACA,qDACA,qDACA,iEA1OA,4CAJA,gCC5EF,aACE,gBAEA,yBACE,aCLJ,aAGE,aACA,kDACA,WAEA,mBAEA,qBACE,gBACA,WAEA,aACA,SAGF,2BACE,OAGF,sBACE,aAEA,sBACA,qBACA,2BAEA,kCACE,mBC4CJ,wBD1CI,0DAEI,cAMR,qDAEE,gBACA,WAGF,oBACE,kBACA,UAEA,mBEZ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iDACE,gBAGF,4BACE,6CACE,gBAGF,4CACE,cACA,aAEA,aACA,sBAGF,2CACE,OAGF,kDACE,OAGF,wDACE,0BAIF,uDACE,eACA,gBAGF,iHAEE,gBACA,OAEA,kBAGF,yDACE,WACA,aAEA,cACA,WAEA,aACA,mBACA,8BAEA,MAGF,wDACE,WACA,UAEA,gBAEA,UAGF,iDAIE,gBACA,aAEA,qCACA","file":"gallery.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"../variables/borders\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n // \"background-tint\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n // \"focus-outline\",\n \"keyline\",\n \"keyline-dark\",\n // \"input-foreground\",\n // \"input-background\",\n // \"input-border\",\n // \"form-error-border\",\n // \"form-error-text\",\n // \"button-text\",\n // \"button-background\",\n // \"button-hover-text\",\n // \"button-hover-background\",\n);\n\n@function brand-colour($colour, $opacity: 1) {\n @return colour.brand-colour($colour, $opacity);\n}\n\n@mixin colour-css-vars($excludes...) {\n @each $name, $value in colour.$colour-palette-default {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index($base-colours, $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@mixin colour-css-vars-high-contrast-dark($excludes...) {\n @each $name, $value in colour.$colour-palette-high-contrast-dark {\n @if not list.index($excludes, $name) {\n --#{$name}: #{$value};\n @if list.index((\"keyline\", \"keyline-dark\"), $name) {\n --base-#{$name}: #{$value};\n }\n }\n }\n}\n\n@function colour-var($colour) {\n @return var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n );\n}\n\n@mixin colour-font($colour, $important: false) {\n color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour) if($important, !important, null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if($important, !important, null);\n}\n\n@mixin colour-border(\n $colour,\n $width: \"\",\n $style: solid,\n $direction: \"\",\n $important: false\n) {\n @if $direction != \"\" {\n @if $width != \"\" {\n border-#{$direction}: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if($important, !important, null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if($important, !important, null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if($important, !important, null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width colour-var($colour) $style if($important, !important, null);\n } @else {\n outline-color: colour-var($colour) if($important, !important, null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if($important, !important, null);\n}\n\n@mixin thick-keyline($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-dark($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"keyline-dark\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"keyline-dark\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-accent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\"accent-border\", $border-width, solid, $direction);\n } @else {\n @include colour-border(\"accent-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-error($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n @include colour-border(\n \"form-error-border\",\n $border-width,\n solid,\n $direction\n );\n } @else {\n @include colour-border(\"form-error-border\", $border-width, solid);\n }\n}\n\n@mixin thick-keyline-brand($direction: \"\", $brandColour, $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width #{brand-colour($brandColour)} solid;\n } @else {\n border: $border-width #{brand-colour($brandColour)} solid;\n }\n}\n\n@mixin thick-keyline-transparent($direction: \"\", $veryThick: false) {\n $border-width: borders.$thick-border-width;\n @if $veryThick {\n $border-width: borders.$very-thick-border-width;\n }\n @if $direction != \"\" {\n border-#{$direction}: $border-width transparent solid;\n } @else {\n border: $border-width transparent solid;\n }\n}\n\n// Use light theme colours (except for \"form-error-border\")\n%always-light {\n @include colour-css-vars(\"form-error-border\", \"focus-outline\");\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast(\n \"form-error-border\",\n \"focus-outline\"\n );\n }\n}\n\n@mixin always-light {\n @extend %always-light;\n}\n\n%contrast {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin contrast {\n @extend %contrast;\n}\n\n%contrast-on-mobile {\n @include media.on-mobile {\n --background: var(--contrast-background);\n --font-base: var(--contrast-font-base);\n --font-dark: var(--contrast-font-dark);\n --font-light: var(--contrast-font-light);\n --icon-light: var(--contrast-icon-light);\n --link: var(--contrast-link);\n --link-visited: var(--contrast-link-visited);\n --keyline: var(--contrast-keyline);\n --keyline-dark: var(--contrast-keyline-dark);\n --button-text: var(--contrast-button-text);\n --button-background: var(--contrast-button-background);\n --button-hover-text: var(--contrast-button-hover-text);\n --button-hover-background: var(--contrast-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n }\n}\n\n@mixin contrast-on-mobile {\n @extend %contrast-on-mobile;\n}\n\n%base {\n @each $name, $value in $base-colours {\n --#{$name}: var(--base-#{$value});\n }\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin base {\n @extend %base;\n}\n\n%tint {\n --background: var(--background-tint);\n\n @include colour-background(\"background\");\n}\n\n@mixin tint {\n @extend %tint;\n}\n\n%accent {\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n\n @include colour-background(\"background\");\n\n @include colour-font(\"font-base\");\n}\n\n@mixin accent {\n @extend %accent;\n}\n\n%accent-light {\n --background: var(--accent-background-light);\n --font-base: #{map.get(colour.$colour-palette-default, \"font-base\")};\n --font-dark: #{map.get(colour.$colour-palette-default, \"font-dark\")};\n --font-light: #{map.get(colour.$colour-palette-default, \"font-light\")};\n --icon-light: #{map.get(colour.$colour-palette-default, \"icon-light\")};\n --keyline: #{map.get(colour.$colour-palette-default, \"keyline\")};\n --keyline-dark: #{map.get(colour.$colour-palette-default, \"keyline-dark\")};\n --button-text: #{map.get(colour.$colour-palette-default, \"button-text\")};\n --button-background: #{map.get(\n colour.$colour-palette-default,\n \"button-background\"\n )};\n --button-hover-text: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-text\"\n )};\n --button-hover-background: #{map.get(\n colour.$colour-palette-default,\n \"button-hover-background\"\n )};\n --accent-border: var(--accent-background);\n\n @include colour-background(\"background\");\n @include colour-font(\"font-base\");\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n }\n\n .tna-template--dark-theme & {\n // --link: #{map.get(colour.$colour-palette-default, \"link\")};\n // --link-visited: #{map.get(colour.$colour-palette-default, \"link-visited\")};\n\n --background: var(--accent-background);\n --font-base: var(--accent-font-base);\n --font-dark: var(--accent-font-dark);\n --font-light: var(--accent-font-light);\n --icon-light: var(--accent-icon-light);\n --link: var(--accent-link);\n --link-visited: var(--accent-link);\n --keyline: var(--accent-keyline);\n --keyline-dark: var(--accent-keyline-dark);\n --accent-border: var(--accent-font-dark);\n --button-text: var(--accent-button-text);\n --button-background: var(--accent-button-background);\n --button-hover-text: var(--accent-button-hover-text);\n --button-hover-background: var(--accent-button-hover-background);\n }\n}\n\n@mixin accent-light {\n @extend %accent-light;\n}\n\n%yellow-accent {\n --accent-background: #{colour.brand-colour(\"yellow\")} !important;\n --accent-background-light: #{colour.brand-colour(\"cream\")} !important;\n --accent-border: #{colour.brand-colour(\"yellow\")} !important;\n --accent-font-base: #{colour.brand-colour(\"black\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"black\")} !important;\n --accent-font-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"black\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"black\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"black\")} !important;\n --accent-keyline: #{colour.brand-colour(\"black\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"black\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n --button-accented-background: #{colour.brand-colour(\"brown\")} !important;\n}\n\n@mixin yellow-accent {\n @extend %yellow-accent;\n}\n\n%accent-lighter-text {\n --accent-font-base: #{colour.brand-colour(\"white\")} !important;\n --accent-font-dark: #{colour.brand-colour(\"white\")} !important;\n --accent-font-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-icon-light: #{colour.brand-colour(\"white\", 0.7)} !important;\n --accent-link: #{colour.brand-colour(\"white\")} !important;\n --accent-link-visited: #{colour.brand-colour(\"white\")} !important;\n --accent-keyline: #{colour.brand-colour(\"white\", 0.5)} !important;\n --accent-keyline-dark: #{colour.brand-colour(\"white\", 0.8)} !important;\n --button-accented-text: #{colour.brand-colour(\"white\")} !important;\n}\n\n%black-accent {\n --accent-background: #{colour.brand-colour(\"black\")} !important;\n --accent-background-light: #{colour.brand-colour(\"light-grey\")} !important;\n --accent-border: #{colour.brand-colour(\"black\")} !important;\n --button-accented-text: #{colour.brand-colour(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"grey\")} !important;\n}\n\n@mixin black-accent {\n @extend %accent-lighter-text;\n @extend %black-accent;\n}\n\n%pink-accent {\n --accent-background: #{colour.brand-colour(\"maroon\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-pink\")} !important;\n --accent-border: #{colour.brand-colour(\"pink\")} !important;\n --button-accented-background: #{colour.brand-colour(\"maroon\")} !important;\n}\n\n@mixin pink-accent {\n @extend %accent-lighter-text;\n @extend %pink-accent;\n}\n\n%orange-accent {\n --accent-background: #{colour.brand-colour(\"chestnut\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-orange\")} !important;\n --accent-border: #{colour.brand-colour(\"orange\")} !important;\n --button-accented-background: #{colour.brand-colour(\"chestnut\")} !important;\n}\n\n@mixin orange-accent {\n @extend %accent-lighter-text;\n @extend %orange-accent;\n}\n\n%green-accent {\n --accent-background: #{colour.brand-colour(\"forest\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-green\")} !important;\n --accent-border: #{colour.brand-colour(\"green\")} !important;\n --button-accented-background: #{colour.brand-colour(\"forest\")} !important;\n}\n\n@mixin green-accent {\n @extend %accent-lighter-text;\n @extend %green-accent;\n}\n\n%blue-accent {\n --accent-background: #{colour.brand-colour(\"navy\")} !important;\n --accent-background-light: #{colour.brand-colour(\"pastel-blue\")} !important;\n --accent-border: #{colour.brand-colour(\"blue\")} !important;\n --button-accented-background: #{colour.brand-colour(\"navy\")} !important;\n}\n\n@mixin blue-accent {\n @extend %accent-lighter-text;\n @extend %blue-accent;\n}\n\n@mixin on-high-contrast {\n @media (prefers-contrast: more) {\n @content;\n }\n}\n\n@mixin on-forced-colours {\n @media (forced-colors: active) {\n @content;\n }\n}\n\n@mixin on-high-contrast-and-forced-colours {\n @include on-forced-colours {\n @content;\n }\n\n @include on-high-contrast {\n @content;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n background: linear-gradient(\n -45deg,\n rgb(0 0 0 / 25%),\n rgb(255 255 255 / 25%),\n rgb(0 0 0 / 25%)\n );\n background-size: 500% 500%;\n background-position: 0 50%;\n\n animation: image-loader-background ease-in-out 1.2s infinite;\n }\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n@function space($size) {\n @return #{$size * spacing.$spacing-unit-px}px;\n}\n\n%space-above {\n margin-top: space(2);\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n\n &:first-child {\n margin-top: 0;\n }\n}\n\n@mixin space-above($zero-other-margins: false) {\n @if $zero-other-margins {\n @extend %space-only-above;\n } @else {\n @extend %space-above;\n }\n}\n\n@mixin no-spacing-generator($suffix: \"\") {\n @if $suffix != \"\" {\n $suffix: \"-\" + $suffix;\n }\n @each $property in margin, padding {\n @each $direction in top, bottom {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix},\n .tna-\\!--no-#{$property}-#{$combined-direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n } @else {\n .tna-\\!--no-#{$property}-#{$direction}#{$suffix} {\n #{$property}-#{$direction}: 0 !important;\n }\n }\n }\n }\n}\n\n@mixin spacing-generator($suffix: \"\") {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n\n @include media.on-mobile {\n @each $property in margin, padding {\n @each $direction in top, bottom {\n @each $size, $amount in spacing.$spacing-mobile {\n @if $direction == all {\n .tna-\\!--#{$property}-#{$size} {\n #{$property}: #{space($amount)} !important;\n }\n } @else {\n $combined-direction: \"\";\n @if $direction == top or $direction == bottom {\n $combined-direction: vertical;\n } @else if $direction == right or $direction == left {\n $combined-direction: horizontal;\n }\n @if $combined-direction {\n .tna-\\!--#{$property}-#{$direction}-#{$size},\n .tna-\\!--#{$property}-#{$combined-direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n } @else {\n .tna-\\!--#{$property}-#{$direction}-#{$size} {\n #{$property}-#{$direction}: #{space($amount)} !important;\n }\n }\n }\n }\n }\n }\n }\n}\n","@use \"../../variables/a11y\" as a11yVariables;\n@use \"../../variables/borders\" as bordersVars;\n@use \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-gallery {\n @include spacing.space-above;\n\n display: grid;\n grid-template: min-content min-content 1fr / 2fr 1fr;\n gap: 0 spacing.space(1);\n\n border-radius: 0.1px;\n\n &__header {\n grid-column: 1 / 3;\n grid-row: 1;\n\n display: flex;\n gap: spacing.space(2);\n }\n\n &__header-inner {\n flex: 1;\n }\n\n &__options {\n margin-top: 0;\n\n flex-direction: column;\n align-items: flex-end;\n justify-content: flex-start;\n\n .tna-button {\n white-space: nowrap;\n\n &[value=\"enter-fullscreen\"] {\n @include media.on-mobile {\n display: none;\n }\n }\n }\n }\n\n &__items,\n &__navigation-buttons {\n grid-column: 1 / 3;\n grid-row: 2;\n }\n\n &__items {\n position: relative;\n z-index: 1;\n\n border-radius: 0.1px;\n\n @include a11y.no-focus-outline-on-click;\n }\n\n &__item {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n justify-content: center;\n }\n\n &__item-header {\n padding: spacing.space(1);\n\n line-height: 1;\n text-align: center;\n\n @include typography.main-font-weight-bold;\n @include typography.font-size(16);\n }\n\n &__item-figure {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n gap: spacing.space(1);\n }\n\n &__item-figure-inner {\n width: 100%;\n\n position: relative;\n\n @include colour.contrast;\n\n @include borders.rounded-border;\n }\n\n &__item-image {\n margin: 0 auto;\n }\n\n &__item-description {\n margin-bottom: spacing.space(1);\n padding: spacing.space(0.5) spacing.space(1);\n\n align-self: flex-start;\n\n @include colour.thick-keyline-dark(left);\n }\n\n &__navigation-buttons {\n width: 100%;\n max-height: 50vh;\n aspect-ratio: 3 / 2;\n\n position: relative;\n top: 3rem;\n z-index: 2;\n\n pointer-events: none;\n\n .tna-template--touched & {\n display: none;\n }\n }\n\n &__navigation-button {\n width: 35%;\n\n display: flex;\n align-items: center;\n\n position: absolute;\n top: 0;\n bottom: 0;\n\n background: transparent;\n\n border: none;\n border-radius: 0.1px;\n\n opacity: 0;\n\n cursor: pointer;\n pointer-events: auto;\n @include typography.main-font-weight-bold;\n\n &:hover,\n &:focus-visible {\n opacity: 1;\n }\n }\n\n &__navigation-prev {\n padding-left: 1rem;\n\n justify-content: flex-start;\n\n left: 0;\n }\n\n &__navigation-next {\n padding-right: 1rem;\n\n justify-content: flex-end;\n\n right: 0;\n }\n\n &__navigation-button-label {\n padding: 0.5rem 0.75rem;\n\n display: flex;\n align-items: center;\n gap: 0.5rem;\n\n @include colour.accent;\n\n @include borders.rounded-border;\n }\n\n &__navigation-button-icon {\n content: \"\";\n\n width: 0.75rem;\n height: 0.75rem;\n\n display: block;\n flex: none;\n\n @include colour.colour-border(\"font-dark\", 4px, solid, top);\n @include colour.colour-border(\"font-dark\", 4px, solid, right);\n\n transform-origin: 50% 50%;\n }\n\n &__navigation-prev &__navigation-button-icon {\n transform: rotate(-135deg);\n }\n\n &__navigation-next &__navigation-button-icon {\n transform: rotate(45deg);\n }\n\n &__items--hide-item-titles &__item &__item-header,\n &__items--hide-items,\n &__items--hide-items + &__navigation-buttons {\n display: none;\n }\n\n &__navigation {\n max-height: 40rem;\n max-height: clamp(15rem, calc(100vh - #{spacing.space(2)}), 40rem);\n padding: spacing.space(1);\n\n grid-column: 1 / 3;\n grid-row: 3;\n\n display: grid;\n grid-template-columns: repeat(6, 1fr);\n grid-auto-rows: min-content;\n gap: spacing.space(1);\n\n overflow: auto;\n }\n\n &__navigation-item {\n min-width: 0;\n min-height: 0;\n aspect-ratio: 1;\n\n position: relative;\n\n border: none;\n @include borders.rounded-border;\n\n cursor: pointer;\n\n @include colour.contrast;\n\n @include colour.image-loader-background;\n\n &:hover {\n &::after {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 2;\n\n @include colour.thick-keyline-accent;\n }\n }\n\n &[aria-current=\"true\"] {\n @include colour.accent;\n\n &::after {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 2;\n\n @include colour.thick-keyline-brand(\"\", \"black\");\n }\n }\n }\n\n &__navigation-item-image {\n width: 100%;\n height: 100%;\n\n position: absolute;\n inset: 0;\n object-fit: cover;\n }\n\n &__navigation-item-label {\n padding: spacing.space(0.25) spacing.space(0.75);\n\n display: inline-block;\n\n position: absolute;\n top: 0;\n left: 0;\n z-index: 4;\n\n text-transform: capitalize;\n\n @include colour.colour-font(\"font-dark\");\n @include typography.font-size(24);\n @include typography.main-font-weight-bold;\n\n @include colour.colour-background(\"background\");\n\n // @include borders.rounded-border;\n border-radius: 0 0 bordersVars.$rounded-border-radius 0;\n }\n\n &--interactive &__item-figure-inner {\n max-height: 50vh;\n aspect-ratio: 3 / 2;\n }\n\n &--interactive &__item-image {\n width: 100%;\n height: 100%;\n\n position: absolute;\n inset: 0;\n z-index: 1;\n object-fit: contain;\n }\n\n @include media.on-medium {\n &__navigation {\n grid-template-columns: repeat(4, 1fr);\n }\n }\n\n @include media.on-mobile {\n &__options {\n flex-direction: row-reverse;\n align-items: flex-start;\n }\n\n &__navigation {\n grid-template-columns: repeat(3, 1fr);\n }\n }\n\n @include media.on-tiny {\n &__navigation-item-label {\n @include typography.font-size(18);\n }\n }\n\n &--bounded {\n @include borders.rounded-border;\n @include colour.tint;\n }\n\n &:fullscreen {\n @include colour.contrast;\n }\n\n &--bounded &__header,\n &:fullscreen &__header {\n padding: spacing.space(1);\n }\n\n &:fullscreen &__header-inner {\n display: none;\n }\n\n &:fullscreen &__options {\n flex: 1;\n\n flex-direction: row;\n align-items: flex-start;\n justify-content: flex-end;\n\n .tna-button[value=\"show-index\"] {\n display: none;\n }\n }\n\n &--bounded &__item-figure-inner {\n border-radius: 0.1px;\n }\n\n &--bounded &__item-description,\n &:fullscreen &__item-description {\n margin-right: spacing.space(1);\n margin-left: spacing.space(1);\n }\n\n &:fullscreen &__item-description {\n max-height: 6rem;\n\n overflow: auto;\n }\n\n &:fullscreen &__navigation {\n max-height: none;\n }\n\n @media (aspect-ratio >= 1/1) {\n &:fullscreen &__header {\n grid-column: 2 / 3;\n }\n\n &:fullscreen &__items {\n grid-column: 1;\n grid-row: 1 / 4;\n\n display: flex;\n flex-direction: column;\n }\n\n &:fullscreen &__item {\n flex: 1;\n }\n\n &:fullscreen &__item-figure {\n flex: 1;\n }\n\n &:fullscreen &__item-figure-inner {\n border-radius: 0 bordersVars.$rounded-border-radius\n bordersVars.$rounded-border-radius 0;\n }\n\n &:fullscreen &__item-description {\n margin-right: 0;\n margin-bottom: 0;\n }\n\n &:fullscreen &__item-figure-inner,\n &:fullscreen &__navigation-buttons {\n max-height: none;\n flex: 1;\n\n aspect-ratio: auto;\n }\n\n &:fullscreen &__navigation-buttons {\n width: auto;\n padding: spacing.space(1);\n\n grid-column: 1;\n grid-row: 4;\n\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n top: 0;\n }\n\n &:fullscreen &__navigation-button {\n width: auto;\n padding: 0;\n\n position: static;\n\n opacity: 1;\n }\n\n &:fullscreen &__navigation {\n // padding-top: 0;\n // padding-left: 0;\n\n grid-column: 2 / 3;\n grid-row: 2 / 4;\n\n grid-template-columns: repeat(3, 1fr);\n gap: spacing.space(0.5);\n }\n }\n}\n","@use \"sass:math\";\n@use \"../variables/media\";\n@use \"../variables/typography\";\n\n$smallest-large-device-em: #{math.div(\n media.$largest-medium-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-medium-device-em: #{math.div(\n media.$largest-medium-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-medium-device-em: #{math.div(\n media.$largest-small-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-small-device-em: #{math.div(\n media.$largest-small-device-px,\n typography.$relative-1rem-px\n )}em;\n$smallest-small-device-em: #{math.div(\n media.$largest-tiny-device-px + 1,\n typography.$relative-1rem-px\n )}em;\n$largest-tiny-device-em: #{math.div(\n media.$largest-tiny-device-px,\n typography.$relative-1rem-px\n )}em;\n\n$media-large: \"(min-width: #{$smallest-large-device-em})\";\n$media-lt-large: \"(max-width: #{$largest-medium-device-em})\";\n$media-medium: \"(min-width: #{$smallest-medium-device-em}) and (max-width: #{$largest-medium-device-em})\";\n$media-gt-mobile: \"(min-width: #{$smallest-medium-device-em})\";\n$media-mobile: \"(max-width: #{$largest-small-device-em})\";\n$media-small: \"(min-width: #{$smallest-small-device-em}) and (max-width: #{$largest-small-device-em})\";\n$media-gt-tiny: \"(min-width: #{$smallest-small-device-em})\";\n$media-tiny: \"(max-width: #{$largest-tiny-device-em})\";\n\n// https://nationalarchives.github.io/design-system/styles/media/#media-queries\n@mixin on-large() {\n @media #{$media-large} {\n @content;\n }\n}\n\n@mixin on-medium() {\n @media #{$media-medium} {\n @content;\n }\n}\n\n@mixin on-small() {\n @media #{$media-small} {\n @content;\n }\n}\n\n@mixin on-tiny() {\n @media #{$media-tiny} {\n @content;\n }\n}\n\n@mixin on-larger-than-mobile() {\n @media #{$media-gt-mobile} {\n @content;\n }\n}\n\n@mixin on-larger-than-tiny() {\n @media #{$media-gt-tiny} {\n @content;\n }\n}\n\n@mixin on-smaller-than-large() {\n @media #{$media-lt-large} {\n @content;\n }\n}\n\n@mixin on-mobile() {\n @media #{$media-mobile} {\n @content;\n }\n}\n\n@mixin on-print() {\n @media print {\n @content;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n\n@mixin visually-hidden {\n width: 1px !important;\n height: 1px !important;\n margin: 0 !important;\n padding: 0 !important;\n\n overflow: hidden !important;\n\n position: absolute !important;\n top: -9999px !important;\n left: -9999px !important;\n z-index: -1 !important;\n\n background-color: transparent !important;\n\n border: 0 !important;\n\n clip: rect(0, 0, 0, 0) !important;\n\n // &::before,\n // &::after {\n // content: \"\\00a0\";\n // }\n}\n\n@mixin focus-outline-without-offset {\n @include colour.colour-outline(\n \"focus-outline\",\n a11y.$focus-outline-width,\n solid\n );\n}\n\n@mixin focus-outline {\n @include focus-outline-without-offset;\n outline-offset: a11y.$focus-outline-offset;\n}\n\n@mixin active-outline {\n outline-offset: 0;\n}\n\n@mixin no-focus-outline-on-click {\n .tna-template--clicked &:focus {\n outline: none;\n }\n}\n","@use \"sass:math\";\n@use \"../variables/typography\";\n@use \"colour\";\n@use \"media\";\n\n@mixin font-size($font-size-px) {\n font-size: #{math.div($font-size-px, typography.$relative-1rem-px)}rem;\n}\n\n@mixin relative-font-size($font-size-px) {\n @warn \"relative-font-size() will soon be deprecated in favour of font-size().\";\n @include font-size($font-size-px);\n}\n\n@mixin main-font-weight {\n font-weight: typography.$main-font-weight;\n}\n\n@mixin main-font-weight-medium {\n font-weight: typography.$main-font-weight-medium;\n}\n\n@mixin main-font-weight-bold {\n font-weight: typography.$main-font-weight-bold;\n}\n\n@mixin main-font($bold: false) {\n font-family: typography.$main-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n font-variation-settings: \"wdth\" 100;\n @if $bold {\n @include main-font-weight-bold;\n } @else {\n @include main-font-weight;\n }\n}\n\n@mixin heading-font {\n font-family: typography.$heading-font-family;\n font-weight: typography.$heading-font-weight;\n}\n\n@mixin detail-font($bold: false) {\n font-family: typography.$detail-font-family;\n font-style: normal;\n font-optical-sizing: auto;\n @if $bold {\n font-weight: typography.$detail-font-weight-bold;\n } @else {\n font-weight: typography.$detail-font-weight;\n }\n}\n\n@mixin detail-font-small {\n @include detail-font;\n @include font-size(14);\n line-height: 1.1;\n text-transform: uppercase;\n}\n\n@mixin interactable-text-decoration {\n text-decoration-thickness: typography.$interactable-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin interacted-text-decoration {\n text-decoration: underline;\n text-decoration-thickness: typography.$interactive-text-decoration-thickness;\n text-underline-offset: typography.$interactable-text-decoration-offset;\n}\n\n@mixin heading-generator(\n $font-size-default,\n $font-size-medium,\n $font-size-small,\n $font-size-tiny,\n $line-height\n) {\n $small-and-tiny-identical: $font-size-small == $font-size-tiny;\n $medium-small-and-tiny-identical: $font-size-medium == $font-size-small and\n $small-and-tiny-identical;\n $all-identical: $font-size-default == $font-size-medium and\n $medium-small-and-tiny-identical and $small-and-tiny-identical;\n line-height: $line-height;\n @include font-size($font-size-default);\n\n @if $all-identical != true {\n @if $medium-small-and-tiny-identical != true {\n @include media.on-medium {\n @include font-size($font-size-medium);\n }\n\n @if $small-and-tiny-identical != true {\n @include media.on-small {\n @include font-size($font-size-small);\n }\n\n @include media.on-tiny {\n @include font-size($font-size-tiny);\n }\n } @else {\n @include media.on-mobile {\n @include font-size($font-size-small);\n }\n }\n } @else {\n @include media.on-smaller-than-large {\n @include font-size($font-size-medium);\n }\n }\n }\n}\n","@use \"sass:math\";\n\n/*\n * ------------------------------------------\n * The typefaces, sizes and spacings that are\n * defined in this file have been selected to\n * ensure 100% match with the latest National\n * Archives brand guidelines - avoid changing\n * or overwriting any of these values without\n * signing off with the Digital Services team\n * first\n * ------------------------------------------\n */\n\n$relative-1rem-px: 16; // 16px = 1rem\n\n/*\n * ------------------------------------------\n * When true, use the included font files for\n * Open Sans and Roboto Mono, rather than the\n * versions hosted by Google Fonts\n * ------------------------------------------\n */\n$use-local-fonts: false !default;\n\n$body-font-size-px: 19 !default;\n$body-font-size-px-medium: 18 !default;\n$body-font-size-px-mobile: 17 !default;\n$body-line-height: 1.75 !default;\n\n$interactable-text-decoration-offset: 0.125em !default;\n$interactable-text-decoration-thickness: #{math.div(1.5, $relative-1rem-px)}rem !default;\n$interactive-text-decoration-thickness: #{math.div(4, $relative-1rem-px)}rem !default;\n\n$main-font-family-name: \"Open Sans\" !default;\n$main-font-family:\n #{$main-font-family-name},\n sans-serif;\n$main-font-weight: 400 !default;\n$main-font-weight-medium: 600 !default;\n$main-font-weight-bold: 700 !default;\n$main-font-file: \"OpenSans-Regular.ttf\" !default;\n$main-font-file-medium: \"OpenSans-SemiBold.ttf\" !default;\n$main-font-file-bold: \"OpenSans-Bold.ttf\" !default;\n\n/*\n * ------------------------------------------\n * To use Supria Sans Condensed (which is the\n * approved heading typeface for The National\n * Archives), you need to obtain a licence to\n * properly embed the CSS files with the font\n * definitions in your service - check with a\n * member of the Digital Services team on how\n * to get a licence\n * ------------------------------------------\n */\n$heading-font-family-name: \"supria-sans-condensed\" !default;\n$heading-font-family:\n #{$heading-font-family-name},\n \"Arial Narrow\",\n sans-serif;\n$heading-font-weight: 500 !default;\n\n/*\n * ------------------------------------------\n * The detail font should be a monospace font\n * and is used for chips, supertitles as well\n * as the date search component\n * ------------------------------------------\n */\n$detail-font-family-name: \"Roboto Mono\" !default;\n$detail-font-family:\n #{$detail-font-family-name},\n monospace;\n$detail-font-weight: 400 !default;\n$detail-font-weight-bold: 500 !default;\n$detail-font-file: \"RobotoMono-Regular.ttf\" !default;\n$detail-font-file-bold: \"RobotoMono-Medium.ttf\" !default;\n\n$heading-xl-font-size-default: 64 !default;\n$heading-xl-font-size-medium: 48 !default;\n$heading-xl-font-size-small: 36 !default;\n$heading-xl-font-size-tiny: $heading-xl-font-size-small !default;\n$heading-xl-line-height: 1.1 !default;\n\n$heading-l-font-size-default: 36 !default;\n$heading-l-font-size-medium: 32 !default;\n$heading-l-font-size-small: 29 !default;\n$heading-l-font-size-tiny: $heading-l-font-size-small !default;\n$heading-l-line-height: 1.15 !default;\n\n$heading-m-font-size-default: 22 !default;\n$heading-m-font-size-medium: $heading-m-font-size-default !default;\n$heading-m-font-size-small: 21 !default;\n$heading-m-font-size-tiny: $heading-m-font-size-small !default;\n$heading-m-line-height: 1.4 !default;\n\n$heading-s-font-size-default: 19 !default;\n$heading-s-font-size-medium: $heading-s-font-size-default !default;\n$heading-s-font-size-small: $heading-s-font-size-default !default;\n$heading-s-font-size-tiny: $heading-s-font-size-default !default;\n$heading-s-line-height: 1.5 !default;\n","@use \"../variables/borders\";\n\n@mixin rounded-border {\n border-radius: borders.$rounded-border-radius;\n}\n","$thick-border-width: 5px !default;\n$very-thick-border-width: 8px !default;\n$rounded-border-radius: 4px !default;\n"]}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,(()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Gallery:()=>o});var o=function(){return t=function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$itemsContainer=e&&e.querySelector(".tna-gallery__items"),this.$items=this.$itemsContainer&&this.$itemsContainer.querySelectorAll(".tna-gallery__item"),this.$navigation=e&&e.querySelector(".tna-gallery__navigation"),this.$navigationItems=this.$navigation&&e.querySelectorAll(".tna-gallery__navigation-item"),this.$options=e&&e.querySelector(".tna-gallery__options"),this.$navigationButtons=e&&e.querySelector(".tna-gallery__navigation-buttons"),this.$module&&this.$itemsContainer&&this.$items&&!(this.$items.length<2)&&this.$navigation&&this.$navigationItems&&this.$options&&this.$navigationButtons&&(this.$module.classList.add("tna-gallery--interactive"),this.$showIndex=this.$options.querySelector('button[value="show-index"]'),this.$enterFullscreen=this.$options.querySelector('button[value="enter-fullscreen"]'),this.$exitFullscreen=this.$options.querySelector('button[value="exit-fullscreen"]'),this.$navigationButtonPrev=this.$navigationButtons.querySelector(".tna-gallery__navigation-prev"),this.$navigationButtonNext=this.$navigationButtons.querySelector(".tna-gallery__navigation-next"),this.$module.addEventListener("fullscreenchange",(function(){return i.syncFullScreen()})),this.setup(),this.allowGridIndex=this.$module.dataset.showgrid||!1,this.allowGridIndex?this.showIndex():(this.currentId=this.$items[0].id,this.showItem(this.currentId)))},e=[{key:"setup",value:function(){var t,e,i,n,r,o,s,l=this;this.$items.forEach((function(t){var e;t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"),null===(e=t.querySelector(".tna-gallery__item-header"))||void 0===e||e.setAttribute("aria-hidden","true")})),this.$navigation.removeAttribute("hidden"),this.$navigationItems.forEach((function(t){t.addEventListener("click",(function(){l.showItem(t.getAttribute("aria-controls")),l.$itemsContainer.setAttribute("tabindex","0"),l.$itemsContainer.focus()}))})),this.$module.addEventListener("keydown",(function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":l.showPreviousItem(),e=!0;break;case"ArrowRight":case"ArrowDown":l.showNextItem(),e=!0;break;case"Home":l.showFirstItem(),e=!0;break;case"End":l.showLastItem(),e=!0}e&&(t.stopPropagation(),t.preventDefault())})),this.$options.removeAttribute("hidden"),document.fullscreenEnabled&&this.$enterFullscreen&&this.$exitFullscreen&&(null===(r=this.$enterFullscreen)||void 0===r||r.addEventListener("click",(function(){return l.enterFullScreen()})),null===(o=this.$exitFullscreen)||void 0===o||o.addEventListener("click",(function(){return l.exitFullScreen()})),null===(s=this.$enterFullscreen)||void 0===s||s.removeAttribute("hidden")),null===(t=this.$showIndex)||void 0===t||t.addEventListener("click",(function(){return l.showIndex()})),null===(e=this.$navigationButtons)||void 0===e||e.removeAttribute("hidden"),null===(i=this.$navigationButtonPrev)||void 0===i||i.addEventListener("click",(function(){l.showPreviousItem()})),null===(n=this.$navigationButtonNext)||void 0===n||n.addEventListener("click",(function(){l.showNextItem()})),this.$liveRegion=document.createElement("div"),this.$liveRegion.setAttribute("aria-live","polite"),this.$liveRegion.setAttribute("aria-atomic","true"),this.$liveRegion.setAttribute("class","tna-gallery__item-header"),this.$itemsContainer.prepend(this.$liveRegion),this.$itemsContainer.classList.add("tna-gallery__items--hide-item-titles"),this.$itemsContainer.addEventListener("blur",(function(){return l.$itemsContainer.removeAttribute("tabindex")}))}},{key:"showIndex",value:function(){var t;this.showItem(""),this.$itemsContainer.classList.add("tna-gallery__items--hide-items"),null===(t=this.$showIndex)||void 0===t||t.setAttribute("hidden","")}},{key:"showItem",value:function(t){var e,i=this;this.$items.forEach((function(e){t&&e.id===t?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))})),this.$navigationItems.forEach((function(e){t&&e.getAttribute("aria-controls")===t?(e.setAttribute("aria-current","true"),i.isFullScreen()&&e.scrollIntoView({block:"nearest"})):e.setAttribute("aria-current","false")})),this.allowGridIndex&&(null===(e=this.$showIndex)||void 0===e||e.removeAttribute("hidden")),this.$itemsContainer.classList.remove("tna-gallery__items--hide-items"),this.currentId=t,this.$liveRegion.textContent="Image ".concat(this.getCurrentItemIndex()+1," of ").concat(this.$items.length)}},{key:"getCurrentItemIndex",value:function(){var t=this;return Array.from(this.$items).findIndex((function(e){return e.id===t.currentId}))}},{key:"showPreviousItem",value:function(){var t=this.getCurrentItemIndex()-1;t<0&&(t=this.$items.length-1),this.showItem(this.$items[t].id)}},{key:"showNextItem",value:function(){var t=this.getCurrentItemIndex()+1;t>=this.$items.length&&(t=0),this.showItem(this.$items[t].id)}},{key:"showFirstItem",value:function(){this.showItem(this.$items[0].id)}},{key:"showLastItem",value:function(){this.showItem(this.$items[this.$items.length-1].id)}},{key:"isFullScreen",value:function(){return document.fullscreenElement}},{key:"enterFullScreen",value:function(){this.$module.requestFullscreen(),this.syncFullScreen(),this.$module.focus()}},{key:"exitFullScreen",value:function(){document.exitFullscreen(),this.syncFullScreen()}},{key:"syncFullScreen",value:function(){this.isFullScreen()?(this.$enterFullscreen.setAttribute("hidden",""),this.$exitFullscreen.removeAttribute("hidden")):(this.$exitFullscreen.setAttribute("hidden",""),this.$enterFullscreen.removeAttribute("hidden"))}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})()));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("TNAFrontend",[],e):"object"==typeof exports?exports.TNAFrontend=e():t.TNAFrontend=e()}(self,()=>(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function n(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,r(n.key),n)}}function r(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}t.r(e),t.d(e,{Gallery:()=>o});var o=function(){return t=function t(e){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$module=e,this.$itemsContainer=e&&e.querySelector(".tna-gallery__items"),this.$items=this.$itemsContainer&&this.$itemsContainer.querySelectorAll(".tna-gallery__item"),this.$navigation=e&&e.querySelector(".tna-gallery__navigation"),this.$navigationItems=this.$navigation&&e.querySelectorAll(".tna-gallery__navigation-item"),this.$options=e&&e.querySelector(".tna-gallery__options"),this.$navigationButtons=e&&e.querySelector(".tna-gallery__navigation-buttons"),this.$module&&this.$itemsContainer&&this.$items&&!(this.$items.length<2)&&this.$navigation&&this.$navigationItems&&this.$options&&this.$navigationButtons&&(this.$module.classList.add("tna-gallery--interactive"),this.$showIndex=this.$options.querySelector('button[value="show-index"]'),this.$enterFullscreen=this.$options.querySelector('button[value="enter-fullscreen"]'),this.$exitFullscreen=this.$options.querySelector('button[value="exit-fullscreen"]'),this.$navigationButtonPrev=this.$navigationButtons.querySelector(".tna-gallery__navigation-prev"),this.$navigationButtonNext=this.$navigationButtons.querySelector(".tna-gallery__navigation-next"),this.$module.addEventListener("fullscreenchange",function(){return i.syncFullScreen()}),this.setup(),this.allowGridIndex=this.$module.dataset.showgrid||!1,this.allowGridIndex?this.showIndex():(this.currentId=this.$items[0].id,this.showItem(this.currentId)))},e=[{key:"setup",value:function(){var t,e,i,n,r,o,s,l=this;this.$items.forEach(function(t){var e;t.setAttribute("hidden",""),t.setAttribute("aria-hidden","true"),null===(e=t.querySelector(".tna-gallery__item-header"))||void 0===e||e.setAttribute("aria-hidden","true")}),this.$navigation.removeAttribute("hidden"),this.$navigationItems.forEach(function(t){t.addEventListener("click",function(){l.showItem(t.getAttribute("aria-controls")),l.$itemsContainer.setAttribute("tabindex","0"),l.$itemsContainer.focus()})}),this.$module.addEventListener("keydown",function(t){var e=!1;switch(t.key){case"ArrowLeft":case"ArrowUp":l.showPreviousItem(),e=!0;break;case"ArrowRight":case"ArrowDown":l.showNextItem(),e=!0;break;case"Home":l.showFirstItem(),e=!0;break;case"End":l.showLastItem(),e=!0}e&&(t.stopPropagation(),t.preventDefault())}),this.$options.removeAttribute("hidden"),document.fullscreenEnabled&&this.$enterFullscreen&&this.$exitFullscreen&&(null===(r=this.$enterFullscreen)||void 0===r||r.addEventListener("click",function(){return l.enterFullScreen()}),null===(o=this.$exitFullscreen)||void 0===o||o.addEventListener("click",function(){return l.exitFullScreen()}),null===(s=this.$enterFullscreen)||void 0===s||s.removeAttribute("hidden")),null===(t=this.$showIndex)||void 0===t||t.addEventListener("click",function(){return l.showIndex()}),null===(e=this.$navigationButtons)||void 0===e||e.removeAttribute("hidden"),null===(i=this.$navigationButtonPrev)||void 0===i||i.addEventListener("click",function(){l.showPreviousItem()}),null===(n=this.$navigationButtonNext)||void 0===n||n.addEventListener("click",function(){l.showNextItem()}),this.$liveRegion=document.createElement("div"),this.$liveRegion.setAttribute("aria-live","polite"),this.$liveRegion.setAttribute("aria-atomic","true"),this.$liveRegion.setAttribute("class","tna-gallery__item-header"),this.$itemsContainer.prepend(this.$liveRegion),this.$itemsContainer.classList.add("tna-gallery__items--hide-item-titles"),this.$itemsContainer.addEventListener("blur",function(){return l.$itemsContainer.removeAttribute("tabindex")})}},{key:"showIndex",value:function(){var t;this.showItem(""),this.$itemsContainer.classList.add("tna-gallery__items--hide-items"),null===(t=this.$showIndex)||void 0===t||t.setAttribute("hidden","")}},{key:"showItem",value:function(t){var e,i=this;this.$items.forEach(function(e){t&&e.id===t?(e.removeAttribute("hidden"),e.removeAttribute("aria-hidden")):(e.setAttribute("hidden",""),e.setAttribute("aria-hidden","true"))}),this.$navigationItems.forEach(function(e){t&&e.getAttribute("aria-controls")===t?(e.setAttribute("aria-current","true"),i.isFullScreen()&&e.scrollIntoView({block:"nearest"})):e.setAttribute("aria-current","false")}),this.allowGridIndex&&(null===(e=this.$showIndex)||void 0===e||e.removeAttribute("hidden")),this.$itemsContainer.classList.remove("tna-gallery__items--hide-items"),this.currentId=t,this.$liveRegion.textContent="Image ".concat(this.getCurrentItemIndex()+1," of ").concat(this.$items.length)}},{key:"getCurrentItemIndex",value:function(){var t=this;return Array.from(this.$items).findIndex(function(e){return e.id===t.currentId})}},{key:"showPreviousItem",value:function(){var t=this.getCurrentItemIndex()-1;t<0&&(t=this.$items.length-1),this.showItem(this.$items[t].id)}},{key:"showNextItem",value:function(){var t=this.getCurrentItemIndex()+1;t>=this.$items.length&&(t=0),this.showItem(this.$items[t].id)}},{key:"showFirstItem",value:function(){this.showItem(this.$items[0].id)}},{key:"showLastItem",value:function(){this.showItem(this.$items[this.$items.length-1].id)}},{key:"isFullScreen",value:function(){return document.fullscreenElement}},{key:"enterFullScreen",value:function(){this.$module.requestFullscreen(),this.syncFullScreen(),this.$module.focus()}},{key:"exitFullScreen",value:function(){document.exitFullscreen(),this.syncFullScreen()}},{key:"syncFullScreen",value:function(){this.isFullScreen()?(this.$enterFullscreen.setAttribute("hidden",""),this.$exitFullscreen.removeAttribute("hidden")):(this.$exitFullscreen.setAttribute("hidden",""),this.$enterFullscreen.removeAttribute("hidden"))}}],e&&n(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();return e})());
2
2
  //# sourceMappingURL=gallery.js.map