@nationalarchives/frontend 0.41.1 → 0.42.0

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 (162) hide show
  1. package/config/.htmlvalidate.json +2 -1
  2. package/nationalarchives/all+analytics.js +1 -1
  3. package/nationalarchives/all+analytics.js.map +1 -1
  4. package/nationalarchives/all+analytics.mjs +5 -3
  5. package/nationalarchives/all.css +1 -1
  6. package/nationalarchives/all.css.map +1 -1
  7. package/nationalarchives/all.js +1 -1
  8. package/nationalarchives/all.js.map +1 -1
  9. package/nationalarchives/all.mjs +44 -30
  10. package/nationalarchives/analytics.js +1 -1
  11. package/nationalarchives/analytics.js.map +1 -1
  12. package/nationalarchives/analytics.mjs +39 -21
  13. package/nationalarchives/components/accordion/accordion.css +1 -1
  14. package/nationalarchives/components/accordion/accordion.css.map +1 -1
  15. package/nationalarchives/components/accordion/accordion.js +1 -1
  16. package/nationalarchives/components/accordion/accordion.js.map +1 -1
  17. package/nationalarchives/components/accordion/accordion.mjs +1 -1
  18. package/nationalarchives/components/back-link/back-link.css.map +1 -1
  19. package/nationalarchives/components/breadcrumbs/breadcrumbs.css.map +1 -1
  20. package/nationalarchives/components/breadcrumbs/breadcrumbs.js.map +1 -1
  21. package/nationalarchives/components/breadcrumbs/breadcrumbs.mjs +2 -1
  22. package/nationalarchives/components/button/button.css +1 -1
  23. package/nationalarchives/components/button/button.css.map +1 -1
  24. package/nationalarchives/components/button/button.scss +2 -1
  25. package/nationalarchives/components/card/card.css +1 -1
  26. package/nationalarchives/components/card/card.css.map +1 -1
  27. package/nationalarchives/components/card/card.scss +4 -4
  28. package/nationalarchives/components/checkboxes/checkboxes.css +1 -1
  29. package/nationalarchives/components/checkboxes/checkboxes.css.map +1 -1
  30. package/nationalarchives/components/checkboxes/checkboxes.scss +2 -2
  31. package/nationalarchives/components/checkboxes/fixtures.json +27 -0
  32. package/nationalarchives/components/checkboxes/macro-options.json +6 -0
  33. package/nationalarchives/components/checkboxes/template.njk +2 -2
  34. package/nationalarchives/components/code-block/code-block.css +1 -1
  35. package/nationalarchives/components/code-block/code-block.css.map +1 -1
  36. package/nationalarchives/components/code-block/code-block.js +1 -1
  37. package/nationalarchives/components/code-block/code-block.js.map +1 -1
  38. package/nationalarchives/components/code-block/code-block.mjs +2 -2
  39. package/nationalarchives/components/code-block/code-block.scss +4 -4
  40. package/nationalarchives/components/code-block/fixtures.json +6 -6
  41. package/nationalarchives/components/code-block/macro-options.json +1 -1
  42. package/nationalarchives/components/code-block/template.njk +12 -12
  43. package/nationalarchives/components/compound-filters/compound-filters.css +1 -1
  44. package/nationalarchives/components/compound-filters/compound-filters.css.map +1 -1
  45. package/nationalarchives/components/compound-filters/compound-filters.scss +2 -2
  46. package/nationalarchives/components/cookie-banner/cookie-banner.css.map +1 -1
  47. package/nationalarchives/components/cookie-banner/cookie-banner.js +1 -1
  48. package/nationalarchives/components/cookie-banner/cookie-banner.js.map +1 -1
  49. package/nationalarchives/components/date-input/date-input.css.map +1 -1
  50. package/nationalarchives/components/date-input/date-input.js +1 -1
  51. package/nationalarchives/components/date-input/date-input.js.map +1 -1
  52. package/nationalarchives/components/date-input/date-input.mjs +5 -2
  53. package/nationalarchives/components/details/analytics.js +1 -1
  54. package/nationalarchives/components/details/details.css.map +1 -1
  55. package/nationalarchives/components/details/macro-options.json +1 -1
  56. package/nationalarchives/components/error-summary/error-summary.css.map +1 -1
  57. package/nationalarchives/components/error-summary/error-summary.js +1 -1
  58. package/nationalarchives/components/error-summary/error-summary.js.map +1 -1
  59. package/nationalarchives/components/error-summary/error-summary.mjs +19 -15
  60. package/nationalarchives/components/fieldset/fieldset.css.map +1 -1
  61. package/nationalarchives/components/file-input/analytics.js +3 -3
  62. package/nationalarchives/components/file-input/file-input.css.map +1 -1
  63. package/nationalarchives/components/file-input/file-input.js +1 -1
  64. package/nationalarchives/components/file-input/file-input.js.map +1 -1
  65. package/nationalarchives/components/file-input/file-input.mjs +33 -17
  66. package/nationalarchives/components/files-list/files-list.css +1 -1
  67. package/nationalarchives/components/files-list/files-list.css.map +1 -1
  68. package/nationalarchives/components/files-list/files-list.scss +8 -8
  69. package/nationalarchives/components/footer/fixtures.json +2 -2
  70. package/nationalarchives/components/footer/footer.css.map +1 -1
  71. package/nationalarchives/components/footer/footer.js +1 -1
  72. package/nationalarchives/components/footer/footer.js.map +1 -1
  73. package/nationalarchives/components/footer/footer.mjs +2 -2
  74. package/nationalarchives/components/footer/template.njk +3 -3
  75. package/nationalarchives/components/gallery/analytics.js +1 -0
  76. package/nationalarchives/components/gallery/gallery.css.map +1 -1
  77. package/nationalarchives/components/gallery/gallery.js +1 -1
  78. package/nationalarchives/components/gallery/gallery.js.map +1 -1
  79. package/nationalarchives/components/gallery/gallery.mjs +16 -4
  80. package/nationalarchives/components/global-header/global-header.css.map +1 -1
  81. package/nationalarchives/components/global-header/global-header.js +1 -1
  82. package/nationalarchives/components/global-header/global-header.js.map +1 -1
  83. package/nationalarchives/components/global-header/global-header.mjs +11 -11
  84. package/nationalarchives/components/global-header/global-header.scss +1 -0
  85. package/nationalarchives/components/header/header.css.map +1 -1
  86. package/nationalarchives/components/header/header.js +1 -1
  87. package/nationalarchives/components/header/header.js.map +1 -1
  88. package/nationalarchives/components/header/header.mjs +11 -11
  89. package/nationalarchives/components/hero/hero.css.map +1 -1
  90. package/nationalarchives/components/index-grid/index-grid.css +1 -1
  91. package/nationalarchives/components/index-grid/index-grid.css.map +1 -1
  92. package/nationalarchives/components/index-grid/index-grid.scss +3 -3
  93. package/nationalarchives/components/pagination/pagination.css.map +1 -1
  94. package/nationalarchives/components/panel/panel.css.map +1 -1
  95. package/nationalarchives/components/phase-banner/phase-banner.css.map +1 -1
  96. package/nationalarchives/components/picture/picture.css.map +1 -1
  97. package/nationalarchives/components/picture/picture.js +1 -1
  98. package/nationalarchives/components/picture/picture.js.map +1 -1
  99. package/nationalarchives/components/picture/picture.mjs +4 -2
  100. package/nationalarchives/components/quick-filters/quick-filters.css.map +1 -1
  101. package/nationalarchives/components/radios/fixtures.json +27 -0
  102. package/nationalarchives/components/radios/macro-options.json +7 -1
  103. package/nationalarchives/components/radios/radios.css +1 -1
  104. package/nationalarchives/components/radios/radios.css.map +1 -1
  105. package/nationalarchives/components/radios/radios.scss +2 -2
  106. package/nationalarchives/components/radios/template.njk +2 -2
  107. package/nationalarchives/components/search-field/analytics.js +0 -1
  108. package/nationalarchives/components/search-field/search-field.css +1 -1
  109. package/nationalarchives/components/search-field/search-field.css.map +1 -1
  110. package/nationalarchives/components/search-field/search-field.scss +2 -2
  111. package/nationalarchives/components/secondary-navigation/secondary-navigation.css +1 -1
  112. package/nationalarchives/components/secondary-navigation/secondary-navigation.css.map +1 -1
  113. package/nationalarchives/components/secondary-navigation/secondary-navigation.scss +4 -3
  114. package/nationalarchives/components/sidebar/fixtures.json +69 -0
  115. package/nationalarchives/components/sidebar/macro-options.json +7 -0
  116. package/nationalarchives/components/sidebar/sidebar.css +1 -1
  117. package/nationalarchives/components/sidebar/sidebar.css.map +1 -1
  118. package/nationalarchives/components/sidebar/sidebar.js +2 -0
  119. package/nationalarchives/components/sidebar/sidebar.js.map +1 -0
  120. package/nationalarchives/components/sidebar/sidebar.mjs +97 -0
  121. package/nationalarchives/components/sidebar/sidebar.scss +2 -2
  122. package/nationalarchives/components/sidebar/template.njk +1 -1
  123. package/nationalarchives/components/skip-link/skip-link.css +1 -1
  124. package/nationalarchives/components/skip-link/skip-link.css.map +1 -1
  125. package/nationalarchives/components/tabs/tabs.css.map +1 -1
  126. package/nationalarchives/components/tabs/tabs.js.map +1 -1
  127. package/nationalarchives/components/tabs/tabs.mjs +11 -3
  128. package/nationalarchives/components/text-input/analytics.js +1 -1
  129. package/nationalarchives/components/text-input/fixtures.json +14 -2
  130. package/nationalarchives/components/text-input/template.njk +1 -1
  131. package/nationalarchives/components/textarea/analytics.js +0 -1
  132. package/nationalarchives/components/textarea/textarea.css +1 -1
  133. package/nationalarchives/components/textarea/textarea.css.map +1 -1
  134. package/nationalarchives/components/textarea/textarea.js +1 -1
  135. package/nationalarchives/components/textarea/textarea.js.map +1 -1
  136. package/nationalarchives/components/textarea/textarea.mjs +19 -13
  137. package/nationalarchives/components/textarea/textarea.scss +2 -2
  138. package/nationalarchives/components/warning/warning.css +1 -1
  139. package/nationalarchives/components/warning/warning.css.map +1 -1
  140. package/nationalarchives/components/warning/warning.scss +2 -2
  141. package/nationalarchives/error-page.css +1 -1
  142. package/nationalarchives/error-page.css.map +1 -1
  143. package/nationalarchives/lib/analytics-helpers.mjs +21 -19
  144. package/nationalarchives/lib/cookie-events.mjs +70 -0
  145. package/nationalarchives/lib/cookies.mjs +54 -92
  146. package/nationalarchives/lib/helpers.mjs +7 -13
  147. package/nationalarchives/lib/uuid.mjs +5 -3
  148. package/nationalarchives/prototype-kit.css +1 -1
  149. package/nationalarchives/prototype-kit.css.map +1 -1
  150. package/nationalarchives/templates/fixtures.json +1 -1
  151. package/nationalarchives/templates/layouts/email.njk +2 -2
  152. package/nationalarchives/templates/prototype-kit/plain-with-sidebar.njk +74 -0
  153. package/nationalarchives/templates/prototype-kit/plain.njk +1 -1
  154. package/nationalarchives/tools/_grid.scss +3 -0
  155. package/nationalarchives/tools/_typography.scss +1 -1
  156. package/nationalarchives/utilities/reset/_index.scss +4 -0
  157. package/nationalarchives/utilities/tables/_index.scss +6 -5
  158. package/nationalarchives/utilities/typography/_index.scss +1 -0
  159. package/package.json +18 -22
  160. package/config/.eslintrc.js +0 -25
  161. package/config/stylelint.config.js +0 -244
  162. package/nationalarchives/templates/prototype-kit/index-grid.njk +0 -146
@@ -6,7 +6,7 @@
6
6
  "options": {
7
7
  "code": "Plaintext code block"
8
8
  },
9
- "html": "<div class=\"tna-code-block\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\"><code class=\"language-plain\">Plaintext code block</code></pre></div>"
9
+ "html": "<div class=\"tna-code-block\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code block\"><code class=\"language-plain\">Plaintext code block</code></pre></div>"
10
10
  },
11
11
  {
12
12
  "name": "with filename",
@@ -14,7 +14,7 @@
14
14
  "filename": "example.txt",
15
15
  "code": "Plaintext code block"
16
16
  },
17
- "html": "<div class=\"tna-code-block\" title=\"example.txt\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\"><code class=\"language-plain\">Plaintext code block</code></pre></div>"
17
+ "html": "<div class=\"tna-code-block\" title=\"example.txt\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code block: example.txt\"><code class=\"language-plain\">Plaintext code block</code></pre></div>"
18
18
  },
19
19
  {
20
20
  "name": "with language",
@@ -22,7 +22,7 @@
22
22
  "language": "json",
23
23
  "code": "{\"foo\": \"bar\"}"
24
24
  },
25
- "html": "<div class=\"tna-code-block\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\"><code class=\"language-json\">{&quot;foo&quot;: &quot;bar&quot;}</code></pre></div>"
25
+ "html": "<div class=\"tna-code-block\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code block\"><code class=\"language-json\">{&quot;foo&quot;: &quot;bar&quot;}</code></pre></div>"
26
26
  },
27
27
  {
28
28
  "name": "with copy button",
@@ -30,7 +30,7 @@
30
30
  "code": "Plaintext code block",
31
31
  "copy": true
32
32
  },
33
- "html": "<div class=\"tna-code-block\" data-module=\"tna-code-block\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\"><code class=\"language-plain\">Plaintext code block</code></pre></div>"
33
+ "html": "<div class=\"tna-code-block\" data-module=\"tna-code-block\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code block\"><code class=\"language-plain\">Plaintext code block</code></pre></div>"
34
34
  },
35
35
  {
36
36
  "name": "with classes",
@@ -55,7 +55,7 @@
55
55
  ],
56
56
  "classes": "code-block__test-class"
57
57
  },
58
- "html": "<div class=\"tna-code-block code-block__test-class\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\"><code class=\"language-plain\"></code></pre></div>"
58
+ "html": "<div class=\"tna-code-block code-block__test-class\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code block\"><code class=\"language-plain\"></code></pre></div>"
59
59
  },
60
60
  {
61
61
  "name": "with attributes",
@@ -82,7 +82,7 @@
82
82
  "data-testattribute": "foobar"
83
83
  }
84
84
  },
85
- "html": "<div class=\"tna-code-block\" data-testattribute=\"foobar\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\"><code class=\"language-plain\"></code></pre></div>"
85
+ "html": "<div class=\"tna-code-block\" data-testattribute=\"foobar\"><button class=\"tna-button tna-code-block__copy tna-button--small tna-button--plain\" type=\"button\" hidden aria-live=\"assertive\">Copy code</button><pre class=\"tna-code-block__pre\" tabindex=\"0\" role=\"region\" aria-label=\"Code block\"><code class=\"language-plain\"></code></pre></div>"
86
86
  }
87
87
  ]
88
88
  }
@@ -10,7 +10,7 @@
10
10
  "name": "code",
11
11
  "type": "string",
12
12
  "required": true,
13
- "description": "The code content to display in the code block."
13
+ "description": "The code content to display in the code block. An alternative is to use the `caller` function to include content from a block."
14
14
  },
15
15
  {
16
16
  "name": "language",
@@ -3,16 +3,16 @@
3
3
  {%- set containerClasses = [params.classes] if params.classes else [] -%}
4
4
  {%- set classes = containerClasses | join(' ') -%}
5
5
  <div class="tna-code-block{% if classes %} {{ classes }}{% endif %}"{% if params.filename %} title="{{ params.filename }}"{% endif %}{%- for attribute, value in params.attributes %} {{ attribute }}{% if value !== '' %}="{{ value }}"{% endif %}{% endfor %}{% if params.copy %} data-module="tna-code-block"{% endif %}>
6
- {{ tnaButton({
7
- text: "Copy code",
8
- plain: true,
9
- small: true,
10
- buttonElement: true,
11
- classes: "tna-code-block__copy",
12
- attributes: {
13
- hidden: "",
14
- "aria-live": "assertive"
15
- }
16
- }) }}
17
- <pre class="tna-code-block__pre"><code class="language-{{ params.language or 'plain' }}">{{ params.code }}</code></pre>
6
+ {{ tnaButton({
7
+ text: "Copy code",
8
+ plain: true,
9
+ small: true,
10
+ buttonElement: true,
11
+ classes: "tna-code-block__copy",
12
+ attributes: {
13
+ hidden: "",
14
+ "aria-live": "assertive"
15
+ }
16
+ }) }}
17
+ <pre class="tna-code-block__pre" tabindex="0" role="region" aria-label="Code block{% if params.filename %}: {{ params.filename }}{% endif %}"><code class="language-{{ params.language or 'plain' }}">{%- if caller -%}{{ caller() }}{%- else -%}{{ params.code }}{%- endif -%}</code></pre>
18
18
  </div>
@@ -1 +1 @@
1
- .tna-compound-filters__link:hover{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);--accent-border: var(--accent-border-bright);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-compound-filters:focus:not(:focus-visible){outline:none !important;box-shadow:none !important}.tna-compound-filters{margin-top:2rem}.tna-compound-filters:first-child{margin-top:0}.tna-compound-filters{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem 0.75rem;list-style:none;border-radius:.1px}.tna-compound-filters:empty{display:none}.tna-compound-filters__item{padding:0 0.125rem 0 0.75rem;display:flex;align-items:center;gap:0.5rem;line-height:1.75;border-radius:2px;font-size:1rem;border:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-compound-filters__item--remove{padding-right:0;padding-left:0;background:none;border:none;border-radius:0}.tna-compound-filters__link{width:1.5rem;height:1.5rem;position:relative;font-size:0;line-height:0;text-decoration:none;background:rgba(0,0,0,0);border:none;cursor:pointer;flex-shrink:0;border-radius:2px}.tna-compound-filters__link::before,.tna-compound-filters__link::after{content:"";height:1rem;margin-left:-1px;display:block;position:absolute;top:.25rem;left:50%;border-left:2px var(--font-base, #343338) solid}.tna-compound-filters__link::before{transform:rotate(45deg)}.tna-compound-filters__link::after{transform:rotate(-45deg)}/*# sourceMappingURL=compound-filters.css.map */
1
+ .tna-compound-filters__link:hover{--background: var(--contrast-background);--font-base: var(--contrast-font-base);--font-dark: var(--contrast-font-dark);--font-light: var(--contrast-font-light);--icon-light: var(--contrast-icon-light);--link: var(--contrast-link);--link-visited: var(--contrast-link-visited);--keyline: var(--contrast-keyline);--keyline-dark: var(--contrast-keyline-dark);--button-text: var(--contrast-button-text);--button-background: var(--contrast-button-background);--button-hover-text: var(--contrast-button-hover-text);--button-hover-background: var(--contrast-button-hover-background);--accent-border: var(--accent-border-bright);background-color:var(--background, #f4f4f4);color:var(--font-base, #343338)}.tna-compound-filters:focus:not(:focus-visible){outline:none !important;box-shadow:none !important}.tna-compound-filters{margin-top:2rem}.tna-compound-filters:first-child{margin-top:0}.tna-compound-filters{display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem 0.75rem;list-style:none;border-radius:.1px}.tna-compound-filters:empty{display:none}.tna-compound-filters__item{padding:0 0.125rem 0 0.75rem;display:flex;align-items:center;gap:0.5rem;line-height:1.75;border-radius:2px;font-size:1rem;border:1px var(--keyline, rgba(38, 38, 42, 0.25)) solid}.tna-compound-filters__item--remove{padding-right:0;padding-left:0;background:none;border:none;border-radius:0}.tna-compound-filters__link{width:1.5rem;height:1.5rem;flex-shrink:0;position:relative;font-size:0;line-height:0;text-decoration:none;background:rgba(0,0,0,0);border:none;cursor:pointer;border-radius:2px}.tna-compound-filters__link::before,.tna-compound-filters__link::after{content:"";height:1rem;margin-left:-1px;display:block;position:absolute;top:.25rem;left:50%;border-left:2px var(--font-base, #343338) solid}.tna-compound-filters__link::before{transform:rotate(45deg)}.tna-compound-filters__link::after{transform:rotate(-45deg)}/*# sourceMappingURL=compound-filters.css.map */
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/compound-filters/compound-filters.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_typography.scss"],"names":[],"mappings":"AA8OA,kCACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEACA,6CA3KA,4CAJA,gCC2DA,gDA9EA,wBAEA,2BClCF,sBACE,gBAUA,kCACE,aChCJ,sBAGE,aACA,eACA,mBACA,mBAEA,gBAEA,mBAIA,4BACE,aAGF,4BACE,6BAEA,aACA,mBACA,WAEA,iBC5BF,cCDsB,ICItB,eNuGI,wDGtEF,oCACE,gBACA,eAEA,gBAEA,YACA,gBAIJ,4BACE,aACA,cAEA,kBAEA,YACA,cAEA,qBAEA,yBAEA,YAEA,eAEA,cChEF,cCDsB,IFqEpB,uEAEE,WAEA,YACA,iBAEA,cAEA,kBACA,WACA,SHiBA,gDGZF,oCACE,wBAGF,mCACE","file":"compound-filters.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"sass:meta\";\n@use \"../variables/borders\";\n@use \"../variables/forms\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n \"keyline\",\n \"keyline-dark\"\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(sass($important): !important; else: null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour)\n if(sass($important): !important; else: null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if(sass($important): !important; else: 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(sass($important): !important; else: null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if(sass($important): !important; else: null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n outline-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if(sass($important): !important; else: null);\n}\n\n%colour-input {\n @include colour-font(\"input-foreground\");\n @include colour-background(\"input-background\");\n @include colour-border(\"input-border\", forms.$form-field-border-width);\n}\n\n@mixin colour-input() {\n @extend %colour-input;\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%always-light {\n @include colour-css-vars;\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast;\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 --accent-border: var(--accent-border-bright);\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 --accent-border: var(--accent-border-bright);\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-border-bright: #{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(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"yellow\")} !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 --accent-border-bright: #{colour.brand-colour(\"grey\")} !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(\"maroon\")} !important;\n --accent-border-bright: #{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(\"chestnut\")} !important;\n --accent-border-bright: #{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(\"forest\")} !important;\n --accent-border-bright: #{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(\"navy\")} !important;\n --accent-border-bright: #{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%image-loader-background {\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 @media (prefers-reduced-motion) {\n animation: none !important;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n @extend %image-loader-background;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n@use \"borders\";\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 -webkit-clip-path: inset(50%) !important;\n clip-path: inset(50%) !important;\n}\n\n%focus-outline {\n outline: a11y.$focus-outline-outer-width colour.brand-colour(\"black\") solid !important;\n outline-offset: a11y.$focus-outline-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition:\n outline-offset 0.1s,\n box-shadow 0.1s;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin focus-outline {\n @extend %focus-outline;\n}\n\n@mixin no-focus-outline {\n outline: none !important;\n\n box-shadow: none !important;\n}\n\n%active-outline {\n outline: a11y.$focus-outline-active-outer-width colour.brand-colour(\"black\")\n solid !important;\n outline-offset: a11y.$focus-outline-active-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition: none;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin active-outline {\n @extend %active-outline;\n}\n\n%faux-full-outline {\n position: relative;\n}\n\n%faux-full-outline-anchor {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 9;\n\n @include borders.rounded-border;\n }\n\n &:focus,\n &:active {\n @include no-focus-outline;\n }\n\n &:focus {\n &::before {\n @include focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include active-outline;\n }\n }\n}\n\n@mixin faux-full-outline($anchor_selector) {\n @extend %faux-full-outline;\n\n #{$anchor_selector} {\n @extend %faux-full-outline-anchor;\n }\n}\n\n%focus-indicator-only-on-keyboard-focus {\n &:focus:not(:focus-visible) {\n @include no-focus-outline;\n }\n}\n\n@mixin focus-indicator-only-on-keyboard-focus {\n @extend %focus-indicator-only-on-keyboard-focus;\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n/*\n * ------------------------------------------\n * Spacing is created with rem rather than px\n * units as when users use a custom font size\n * some browsers handle the resize of rem and\n * em separately from px which causes spacing\n * and layout issues, so to ensure everything\n * remaians consistent we use rem for spacing\n * and typography. The original intention was\n * separation so that we could scale the type\n * without affecting spacing, but in practice\n * there are too many ways to change the font\n * size in various browsers and devices\n * ------------------------------------------\n */\n@function space($size) {\n // @return #{$size * spacing.$spacing-unit-px}px;\n @return #{$size}rem;\n}\n\n%space-above {\n margin-top: space(2);\n @extend %no-space-above-for-first-children;\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n @extend %no-space-above-for-first-children;\n}\n\n%no-space-above-for-first-children {\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 \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-compound-filters {\n @include spacing.space-above;\n\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: spacing.space(0.5) spacing.space(0.75);\n\n list-style: none;\n\n border-radius: 0.1px;\n\n @include a11y.focus-indicator-only-on-keyboard-focus;\n\n &:empty {\n display: none;\n }\n\n &__item {\n padding: 0 spacing.space(0.125) 0 spacing.space(0.75);\n\n display: flex;\n align-items: center;\n gap: spacing.space(0.5);\n\n line-height: 1.75;\n\n @include borders.rounded-border;\n\n @include typography.font-size(16);\n\n @include colour.colour-border(\"keyline\", 1px);\n\n &--remove {\n padding-right: 0;\n padding-left: 0;\n\n background: none;\n\n border: none;\n border-radius: 0;\n }\n }\n\n &__link {\n width: 1.5rem;\n height: 1.5rem;\n\n position: relative;\n\n font-size: 0;\n line-height: 0;\n\n text-decoration: none;\n\n background: transparent;\n\n border: none;\n\n cursor: pointer;\n\n flex-shrink: 0;\n\n @include borders.rounded-border;\n\n &::before,\n &::after {\n content: \"\";\n\n height: 1rem;\n margin-left: -1px;\n\n display: block;\n\n position: absolute;\n top: 0.25rem;\n left: 50%;\n\n @include colour.colour-border(\"font-base\", 2px, solid, left);\n }\n\n &::before {\n transform: rotate(45deg);\n }\n\n &::after {\n transform: rotate(-45deg);\n }\n\n &:hover {\n @include colour.contrast;\n }\n }\n}\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: 2px !default;\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"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/tools/_colour.scss","../../../../src/nationalarchives/tools/_a11y.scss","../../../../src/nationalarchives/tools/_spacing.scss","../../../../src/nationalarchives/components/compound-filters/compound-filters.scss","../../../../src/nationalarchives/tools/_borders.scss","../../../../src/nationalarchives/variables/_borders.scss","../../../../src/nationalarchives/tools/_typography.scss"],"names":[],"mappings":"AA8OA,kCACE,yCACA,uCACA,uCACA,yCACA,yCACA,6BACA,6CACA,mCACA,6CACA,2CACA,uDACA,uDACA,mEACA,6CA3KA,4CAJA,gCC2DA,gDA9EA,wBAEA,2BClCF,sBACE,gBAUA,kCACE,aChCJ,sBAGE,aACA,eACA,mBACA,mBAEA,gBAEA,mBAIA,4BACE,aAGF,4BACE,6BAEA,aACA,mBACA,WAEA,iBC5BF,cCDsB,ICItB,eNuGI,wDGtEF,oCACE,gBACA,eAEA,gBAEA,YACA,gBAIJ,4BACE,aACA,cAEA,cAEA,kBAEA,YACA,cAEA,qBAEA,yBAEA,YAEA,eChEF,cCDsB,IFqEpB,uEAEE,WAEA,YACA,iBAEA,cAEA,kBACA,WACA,SHiBA,gDGZF,oCACE,wBAGF,mCACE","file":"compound-filters.css","sourcesContent":["@use \"sass:list\";\n@use \"sass:map\";\n@use \"sass:meta\";\n@use \"../variables/borders\";\n@use \"../variables/forms\";\n@use \"../variables/colour\";\n@use \"../variables/features\";\n@use \"../tools/media\";\n\n$base-colours: (\n \"background\",\n \"font-base\",\n \"font-dark\",\n \"font-light\",\n \"icon-light\",\n \"link\",\n \"link-visited\",\n \"keyline\",\n \"keyline-dark\"\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(sass($important): !important; else: null);\n}\n\n@mixin colour-background($colour, $important: false) {\n background-color: colour-var($colour)\n if(sass($important): !important; else: null);\n}\n\n@mixin colour-background-brand($brandColour, $important: false) {\n background-color: #{brand-colour($brandColour)}\n if(sass($important): !important; else: 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(sass($important): !important; else: null);\n } @else {\n border-#{$direction}-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n } @else {\n @if $width != \"\" {\n border: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n border-color: var(\n --#{$colour},\n #{map.get(colour.$colour-palette-default, $colour)}\n )\n if(sass($important): !important; else: null);\n }\n }\n}\n\n@mixin colour-outline($colour, $width: \"\", $style: solid, $important: false) {\n @if $width != \"\" {\n outline: $width\n colour-var($colour)\n $style\n if(sass($important): !important; else: null);\n } @else {\n outline-color: colour-var($colour)\n if(sass($important): !important; else: null);\n }\n}\n\n@mixin colour-fill($colour, $important: false) {\n fill: colour-var($colour) if(sass($important): !important; else: null);\n}\n\n%colour-input {\n @include colour-font(\"input-foreground\");\n @include colour-background(\"input-background\");\n @include colour-border(\"input-border\", forms.$form-field-border-width);\n}\n\n@mixin colour-input() {\n @extend %colour-input;\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%always-light {\n @include colour-css-vars;\n\n @media (prefers-contrast: more) {\n @include colour-css-vars-high-contrast;\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 --accent-border: var(--accent-border-bright);\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 --accent-border: var(--accent-border-bright);\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-border-bright: #{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(\"black\")} !important;\n --button-accented-background: #{colour.brand-colour(\"yellow\")} !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 --accent-border-bright: #{colour.brand-colour(\"grey\")} !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(\"maroon\")} !important;\n --accent-border-bright: #{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(\"chestnut\")} !important;\n --accent-border-bright: #{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(\"forest\")} !important;\n --accent-border-bright: #{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(\"navy\")} !important;\n --accent-border-bright: #{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%image-loader-background {\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 @media (prefers-reduced-motion) {\n animation: none !important;\n }\n}\n\n@mixin image-loader-background {\n @if features.$image-loader-animations {\n @extend %image-loader-background;\n }\n}\n","@use \"../variables/a11y\";\n@use \"colour\";\n@use \"borders\";\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 -webkit-clip-path: inset(50%) !important;\n clip-path: inset(50%) !important;\n}\n\n%focus-outline {\n outline: a11y.$focus-outline-outer-width colour.brand-colour(\"black\") solid !important;\n outline-offset: a11y.$focus-outline-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition:\n outline-offset 0.1s,\n box-shadow 0.1s;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin focus-outline {\n @extend %focus-outline;\n}\n\n@mixin no-focus-outline {\n outline: none !important;\n\n box-shadow: none !important;\n}\n\n%active-outline {\n outline: a11y.$focus-outline-active-outer-width colour.brand-colour(\"black\")\n solid !important;\n outline-offset: a11y.$focus-outline-active-inner-width !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"yellow\") !important;\n\n transition: none;\n\n .tna-template--dark-theme & {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n\n .tna-template--system-theme & {\n @media (prefers-color-scheme: dark) {\n outline-color: colour.brand-colour(\"yellow\") !important;\n\n box-shadow: 0 0 0 a11y.$focus-outline-active-inner-width\n colour.brand-colour(\"black\") !important;\n }\n }\n}\n\n@mixin active-outline {\n @extend %active-outline;\n}\n\n%faux-full-outline {\n position: relative;\n}\n\n%faux-full-outline-anchor {\n &::before {\n content: \"\";\n\n position: absolute;\n inset: 0;\n z-index: 9;\n\n @include borders.rounded-border;\n }\n\n &:focus,\n &:active {\n @include no-focus-outline;\n }\n\n &:focus {\n &::before {\n @include focus-outline;\n }\n }\n\n &:active {\n &::before {\n @include active-outline;\n }\n }\n}\n\n@mixin faux-full-outline($anchor_selector) {\n @extend %faux-full-outline;\n\n #{$anchor_selector} {\n @extend %faux-full-outline-anchor;\n }\n}\n\n%focus-indicator-only-on-keyboard-focus {\n &:focus:not(:focus-visible) {\n @include no-focus-outline;\n }\n}\n\n@mixin focus-indicator-only-on-keyboard-focus {\n @extend %focus-indicator-only-on-keyboard-focus;\n}\n","@use \"sass:map\";\n@use \"sass:math\";\n@use \"../variables/spacing\";\n@use \"../variables/typography\";\n@use \"../tools/media\";\n\n/*\n * ------------------------------------------\n * Spacing is created with rem rather than px\n * units as when users use a custom font size\n * some browsers handle the resize of rem and\n * em separately from px which causes spacing\n * and layout issues, so to ensure everything\n * remaians consistent we use rem for spacing\n * and typography. The original intention was\n * separation so that we could scale the type\n * without affecting spacing, but in practice\n * there are too many ways to change the font\n * size in various browsers and devices\n * ------------------------------------------\n */\n@function space($size) {\n // @return #{$size * spacing.$spacing-unit-px}px;\n @return #{$size}rem;\n}\n\n%space-above {\n margin-top: space(2);\n @extend %no-space-above-for-first-children;\n}\n\n%space-only-above {\n margin: #{space(2)} 0 0;\n @extend %no-space-above-for-first-children;\n}\n\n%no-space-above-for-first-children {\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 \"../../tools/a11y\";\n@use \"../../tools/borders\";\n@use \"../../tools/colour\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-compound-filters {\n @include spacing.space-above;\n\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: spacing.space(0.5) spacing.space(0.75);\n\n list-style: none;\n\n border-radius: 0.1px;\n\n @include a11y.focus-indicator-only-on-keyboard-focus;\n\n &:empty {\n display: none;\n }\n\n &__item {\n padding: 0 spacing.space(0.125) 0 spacing.space(0.75);\n\n display: flex;\n align-items: center;\n gap: spacing.space(0.5);\n\n line-height: 1.75;\n\n @include borders.rounded-border;\n\n @include typography.font-size(16);\n\n @include colour.colour-border(\"keyline\", 1px);\n\n &--remove {\n padding-right: 0;\n padding-left: 0;\n\n background: none;\n\n border: none;\n border-radius: 0;\n }\n }\n\n &__link {\n width: 1.5rem;\n height: 1.5rem;\n\n flex-shrink: 0;\n\n position: relative;\n\n font-size: 0;\n line-height: 0;\n\n text-decoration: none;\n\n background: transparent;\n\n border: none;\n\n cursor: pointer;\n\n @include borders.rounded-border;\n\n &::before,\n &::after {\n content: \"\";\n\n height: 1rem;\n margin-left: -1px;\n\n display: block;\n\n position: absolute;\n top: 0.25rem;\n left: 50%;\n\n @include colour.colour-border(\"font-base\", 2px, solid, left);\n }\n\n &::before {\n transform: rotate(45deg);\n }\n\n &::after {\n transform: rotate(-45deg);\n }\n\n &:hover {\n @include colour.contrast;\n }\n }\n}\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: 2px !default;\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-variation-settings: \"wdth\" 100;\n font-style: normal;\n font-optical-sizing: auto;\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"]}
@@ -52,6 +52,8 @@
52
52
  width: 1.5rem;
53
53
  height: 1.5rem;
54
54
 
55
+ flex-shrink: 0;
56
+
55
57
  position: relative;
56
58
 
57
59
  font-size: 0;
@@ -65,8 +67,6 @@
65
67
 
66
68
  cursor: pointer;
67
69
 
68
- flex-shrink: 0;
69
-
70
70
  @include borders.rounded-border;
71
71
 
72
72
  &::before,
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/components/cookie-banner/cookie-banner.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/tools/_typography.scss"],"names":[],"mappings":"AAKA,mBACE,iBACA,oBCmDA,wBDrDF,mBAKI,iBACA,oBELF","file":"cookie-banner.css","sourcesContent":["@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-cookie-banner {\n padding-top: spacing.space(2);\n padding-bottom: spacing.space(2);\n\n @include media.on-tiny {\n padding-top: 1rem;\n padding-bottom: 1rem;\n\n @include typography.font-size(16);\n }\n\n &__message {\n &--prompt {\n }\n\n &--accepted {\n }\n\n &--rejected {\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 \"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"]}
1
+ {"version":3,"sourceRoot":"","sources":["../../../../src/nationalarchives/components/cookie-banner/cookie-banner.scss","../../../../src/nationalarchives/tools/_media.scss","../../../../src/nationalarchives/tools/_typography.scss"],"names":[],"mappings":"AAKA,mBACE,iBACA,oBCmDA,wBDrDF,mBAKI,iBACA,oBELF","file":"cookie-banner.css","sourcesContent":["@use \"../../tools/colour\";\n@use \"../../tools/media\";\n@use \"../../tools/spacing\";\n@use \"../../tools/typography\";\n\n.tna-cookie-banner {\n padding-top: spacing.space(2);\n padding-bottom: spacing.space(2);\n\n @include media.on-tiny {\n padding-top: 1rem;\n padding-bottom: 1rem;\n\n @include typography.font-size(16);\n }\n\n &__message {\n &--prompt {\n }\n\n &--accepted {\n }\n\n &--rejected {\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 \"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-variation-settings: \"wdth\" 100;\n font-style: normal;\n font-optical-sizing: auto;\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"]}
@@ -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,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 s(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 r(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,d(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=d(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function d(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:()=>y}),window.TNAFrontendCookies=window.TNAFrontendCookies||null,window.TNAFrontendCookieEvents=window.TNAFrontendCookieEvents||null;var f=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(r(this.events[e]),[t])}},{key:"once",value:function(e,t){Object.hasOwn(this.oneTimeEvents,e)||(this.oneTimeEvents[e]=[]),this.oneTimeEvents[e]=[].concat(r(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)}}}])}(),v=["usage","settings","marketing","essential"],y=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,s=i.secure,r=i.policiesKey,c=i.defaultAge,l=i.newInstance,u=void 0!==l&&l,d=i.noInit,y=void 0!==d&&d;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===s?"true"!==document.documentElement.dataset.tnaCookiesInsecure:s,this.policiesKey=void 0===r?document.documentElement.dataset.tnaCookiesPoliciesKey||"cookies_policy":r,this.defaultAge=void 0===c?parseInt(document.documentElement.dataset.tnaCookiesDefaultAge)||31536e3:c,this.events=new f(this.debug),this.policiesCorrectOnInit=Object.keys(this.policies).length===v.length&&v.every(function(e){return Object.keys(t.policies).includes(e)&&"boolean"==typeof t.policies[e]}),this.policiesCorrectOnInit||y||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 v.includes(e)}).map(function(t){return[t,e[t]]}));Object.keys(t).length>0&&this.log("Filtered existing policies:",t),this.savePolicies(s(s({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,s=i.sameSite,r=void 0===s?"Lax":s,c=i.domain,a=void 0===c?this.defaultDomain:c,l=i.path,u=void 0===l?this.defaultPath:l,h=i.secure,d=void 0===h?this.secure:h,f=i.session,v=void 0!==f&&f;if(e){var y="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t),"; domain=").concat(a,"; samesite=").concat(r,"; path=").concat(u).concat(v?"":"; max-age=".concat(o)).concat(d?"; secure":"");document.cookie=y,this.log("Set cookie:",{key:e,value:t,maxAge:o,path:u,sameSite:r,domain:a,secure:d,session:v,cookie:y}),this.events.trigger("setCookie",{key:e,value:t,maxAge:o,path:u,sameSite:r,domain:a,secure:d,session:v,cookie:y})}}},{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:",s({key:e,path:t,domain:i},n)),this.events.trigger("deleteCookie",s({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(s(s({},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=s(s({},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 s=t[n]={exports:{}};return e[n](s,s.exports,i),s.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,{CookieBanner:()=>a,Cookies:()=>o.A});var o=i(169);function s(e){return s="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},s(e)}function r(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"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(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.$acceptButton=t&&t.querySelector('[value="accept"]'),this.$rejectButton=t&&t.querySelector('[value="reject"]'),this.$prompt=t&&t.querySelector(".tna-cookie-banner__message--prompt"),this.$acceptedMessage=t&&t.querySelector(".tna-cookie-banner__message--accepted"),this.$rejectedMessage=t&&t.querySelector(".tna-cookie-banner__message--rejected"),this.$closeButtons=t&&t.querySelectorAll('[value="close"]'),this.$module&&this.$acceptButton&&this.$rejectButton&&this.$prompt&&this.$acceptedMessage&&this.$rejectedMessage&&this.$closeButtons&&(this.cookies=new o.A({newInstance:!0}),this.cookiePreferencesSetKey=this.$module.dataset.preferencesKey||"cookie_preferences_set",this.cookies.policiesCorrectOnInit||this.cookies.delete(this.cookiePreferencesSetKey),this.cookies.exists(this.cookiePreferencesSetKey)&&this.cookies.hasValue(this.cookiePreferencesSetKey,"true")||(this.$module.removeAttribute("hidden"),this.$acceptButton.addEventListener("click",function(){return i.accept()}),this.$rejectButton.addEventListener("click",function(){return i.reject()})))},(t=[{key:"accept",value:function(){var e=this;this.$prompt.setAttribute("hidden",""),this.complete(),this.cookies.acceptAllPolicies(),this.$acceptedMessage.removeAttribute("hidden"),this.$acceptedMessage.setAttribute("tabindex","0"),this.$acceptedMessage.focus(),this.$acceptedMessage.addEventListener("blur",function(){e.$acceptedMessage.removeAttribute("tabindex")})}},{key:"reject",value:function(){var e=this;this.$prompt.setAttribute("hidden",""),this.complete(),this.cookies.rejectAllPolicies(),this.$rejectedMessage.removeAttribute("hidden"),this.$rejectedMessage.setAttribute("tabindex","0"),this.$rejectedMessage.focus(),this.$rejectedMessage.addEventListener("blur",function(){e.$rejectedMessage.removeAttribute("tabindex")})}},{key:"complete",value:function(){var e=this;this.cookies.set(this.cookiePreferencesSetKey,!0),this.$closeButtons.forEach(function(t){t.addEventListener("click",function(){return e.close()})})}},{key:"close",value:function(){this.$module.setAttribute("hidden","")}}])&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();return n})());
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={533(e,t,n){function i(e){return i="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},i(e)}var o;function r(e){return function(e){if(Array.isArray(e))return s(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 s(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)?s(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 s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function c(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,l(i.key),i)}}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=function(e){if("object"!=i(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}n.d(t,{A:()=>k}),(o=window).TNAFrontendCookieEvents||(o.TNAFrontendCookieEvents=null);var u,h=function(){return e=function e(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),a(this,"events",{}),a(this,"oneTimeEvents",{}),a(this,"debug",!1),this.debug=t,window.TNAFrontendCookieEvents)return this.log("Using existing TNAFrontendCookieEvents instance"),window.TNAFrontendCookieEvents;window.TNAFrontendCookieEvents=this},t=[{key:"log",value:function(){if(this.debug){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];(e=console).log.apply(e,["[TNA Frontend Cookie Events]"].concat(n))}}},{key:"on",value:function(e,t){Object.hasOwn(this.events,e)||(this.events[e]=[]),this.events[e]=[].concat(r(this.events[e]),[t])}},{key:"once",value:function(e,t){Object.hasOwn(this.oneTimeEvents,e)||(this.oneTimeEvents[e]=[]),this.oneTimeEvents[e]=[].concat(r(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.log("Triggering event: ".concat(e),n),this.events[e].forEach(function(e){return e.call(t,n)})),Object.hasOwn(this.oneTimeEvents,e)){this.log("Triggering one-time event: ".concat(e),n);for(var i=this.oneTimeEvents[e].length-1;i>=0;i-=1)this.oneTimeEvents[e][i].call(this,n),this.oneTimeEvents[e].splice(i,1)}}}],t&&c(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function f(e){return f="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},f(e)}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function p(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,m(i.key),i)}}function g(e,t,n){return(t=m(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function m(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(u=window).TNAFrontendCookies||(u.TNAFrontendCookies=null);var b=["usage","settings","marketing","essential"],k=function(){return e=function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,"defaultDomain",""),g(this,"defaultPath",""),g(this,"secure",!0),g(this,"policiesKey",""),g(this,"events",null),g(this,"defaultAge",null),g(this,"policiesCorrectOnInit",!1),g(this,"debug","true"===document.documentElement.dataset.tnaFrontendDebug);var i=n.defaultDomain,o=n.defaultPath,r=n.secure,s=n.policiesKey,c=n.defaultAge,a=n.newInstance,l=void 0!==a&&a,u=n.noInit,f=void 0!==u&&u;if(!l&&window.TNAFrontendCookies)return window.TNAFrontendCookies;this.defaultDomain=i||document.documentElement.dataset.tnaCookiesDomain||window.location.hostname,this.defaultPath=o||document.documentElement.dataset.tnaCookiesPath||"/",this.secure=r||"true"!==document.documentElement.dataset.tnaCookiesInsecure,this.policiesKey=s||document.documentElement.dataset.tnaCookiesPoliciesKey||"cookies_policy",this.defaultAge=c||parseInt(document.documentElement.dataset.tnaCookiesDefaultAge,10)||31536e3,this.events=new h(this.debug),this.policiesCorrectOnInit=Object.keys(this.policies).length===b.length&&b.every(function(e){return Object.keys(t.policies).includes(e)&&"boolean"==typeof t.policies[e]}),this.policiesCorrectOnInit||f||this.init(),this.log({defaultDomain:this.defaultDomain,defaultPath:this.defaultPath,secure:this.secure,policiesKey:this.policiesKey,defaultAge:this.defaultAge,policiesCorrectOnInit:this.policiesCorrectOnInit}),l||window.TNAFrontendCookies||(window.TNAFrontendCookies=this)},t=[{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 b.includes(e)}).map(function(t){return[t,e[t]]}));Object.keys(t).length&&this.log("Filtered existing policies:",t),this.savePolicies(v(v({usage:!1,settings:!1,marketing:!1},t),{},{essential:!0}))}},{key:"log",value:function(){if(this.debug){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];(e=console).log.apply(e,["[TNA Frontend Cookies]"].concat(n,[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.trim()}).forEach(function(t){var n=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var i,o,r,s,c=[],a=!0,l=!1;try{if(r=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(i=r.call(n)).done)&&(c.push(i.value),c.length!==t);a=!0);}catch(e){l=!0,o=e}finally{try{if(!a&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(l)throw o}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(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)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.trim().split("="),2),i=n[0],o=n[1];i&&(e[i]=decodeURIComponent(o||""))}),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]:{},i=n.maxAge,o=void 0===i?this.defaultAge:i,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,d=n.session,y=void 0!==d&&d;if(e){var v="";f&&(v="; secure");var p="";y||(p="; max-age=".concat(o));var g="".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(t),"; domain=").concat(a,"; samesite=").concat(s,"; path=").concat(u).concat(p).concat(v);document.cookie=g,this.log("Set cookie:",{key:e,value:t,maxAge:o,path:u,sameSite:s,domain:a,secure:f,session:y,cookie:g}),this.events.trigger("setCookie",{key:e,value:t,maxAge:o,path:u,sameSite:s,domain:a,secure:f,session:y,cookie:g})}}},{key:"delete",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.defaultDomain,i={maxAge:-1,path:t,domain:n||this.defaultDomain};this.set(e,"",i),this.log("Deleted cookie:",v({key:e,path:t,domain:n},i)),this.events.trigger("deleteCookie",v({key:e},i))}},{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]:this.defaultDomain;Object.keys(this.all).forEach(function(i){e.delete(i,t,n)}),this.log("Deleted all cookies",{path:t,domain:n}),this.events.trigger("deleteAllCookies",{path:t,domain:n})}},{key:"acceptPolicy",value:function(e){this.log("Accepting policy:",e),this.setPolicy(e,!0),this.events.trigger("acceptPolicy",e),this.events.trigger("changePolicy",g({},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",g({},e,!1))}},{key:"setPolicy",value:function(e,t){"essential"!==e?(this.log("Setting policy ".concat(e," to ").concat(t)),this.savePolicies(v(v({},this.policies),{},g(g({},e,t),"essential",!0))),this.events.trigger("changePolicy",g({},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=v(v({},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&&p(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var r=t[i]={exports:{}};return e[i](r,r.exports,n),r.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},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 i={};n.r(i),n.d(i,{CookieBanner:()=>a,Cookies:()=>o.A});var o=n(533);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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,c(i.key),i)}}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.$acceptButton=t&&t.querySelector('[value="accept"]'),this.$rejectButton=t&&t.querySelector('[value="reject"]'),this.$prompt=t&&t.querySelector(".tna-cookie-banner__message--prompt"),this.$acceptedMessage=t&&t.querySelector(".tna-cookie-banner__message--accepted"),this.$rejectedMessage=t&&t.querySelector(".tna-cookie-banner__message--rejected"),this.$closeButtons=t&&t.querySelectorAll('[value="close"]'),this.$module&&this.$acceptButton&&this.$rejectButton&&this.$prompt&&this.$acceptedMessage&&this.$rejectedMessage&&this.$closeButtons&&(this.cookies=new o.A({newInstance:!0}),this.cookiePreferencesSetKey=this.$module.dataset.preferencesKey||"cookie_preferences_set",this.cookies.policiesCorrectOnInit||this.cookies.delete(this.cookiePreferencesSetKey),this.cookies.exists(this.cookiePreferencesSetKey)&&this.cookies.hasValue(this.cookiePreferencesSetKey,"true")||(this.$module.removeAttribute("hidden"),this.$acceptButton.addEventListener("click",function(){return n.accept()}),this.$rejectButton.addEventListener("click",function(){return n.reject()})))},(t=[{key:"accept",value:function(){var e=this;this.$prompt.setAttribute("hidden",""),this.complete(),this.cookies.acceptAllPolicies(),this.$acceptedMessage.removeAttribute("hidden"),this.$acceptedMessage.setAttribute("tabindex","0"),this.$acceptedMessage.focus(),this.$acceptedMessage.addEventListener("blur",function(){e.$acceptedMessage.removeAttribute("tabindex")})}},{key:"reject",value:function(){var e=this;this.$prompt.setAttribute("hidden",""),this.complete(),this.cookies.rejectAllPolicies(),this.$rejectedMessage.removeAttribute("hidden"),this.$rejectedMessage.setAttribute("tabindex","0"),this.$rejectedMessage.focus(),this.$rejectedMessage.addEventListener("blur",function(){e.$rejectedMessage.removeAttribute("tabindex")})}},{key:"complete",value:function(){var e=this;this.cookies.set(this.cookiePreferencesSetKey,!0),this.$closeButtons.forEach(function(t){t.addEventListener("click",function(){return e.close()})})}},{key:"close",value:function(){this.$module.setAttribute("hidden","")}}])&&s(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();return i})());
2
2
  //# sourceMappingURL=cookie-banner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components/cookie-banner/cookie-banner.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAE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iBQ,iBAAiB,OAAQ,WAC7CzC,EAAKiC,iBAAiBO,gBAAgB,WACxC,EACF,GAAC,CAAAzI,IAAA,WAAAC,MAED,WAAW,IAAAiJ,EAAArJ,KACTA,KAAKwI,QAAQrC,IAAInG,KAAKyI,yBAAyB,GAC/CzI,KAAKsI,cAAchH,QAAQ,SAACgI,GAC1BA,EAAaT,iBAAiB,QAAS,kBAAMQ,EAAKE,OAAO,EAC3D,EACF,GAAC,CAAApJ,IAAA,QAAAC,MAED,WACEJ,KAAK+H,QAAQiB,aAAa,SAAU,GACtC,mFAAC,CA9EsB","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/cookie-banner/cookie-banner.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 { Cookies };\n\nexport class CookieBanner {\n constructor($module) {\n this.$module = $module;\n this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n this.$prompt =\n $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n this.$acceptedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n this.$rejectedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n\n if (\n !this.$module ||\n !this.$acceptButton ||\n !this.$rejectButton ||\n !this.$prompt ||\n !this.$acceptedMessage ||\n !this.$rejectedMessage ||\n !this.$closeButtons\n ) {\n return;\n }\n\n this.cookies = new Cookies({ newInstance: true });\n\n this.cookiePreferencesSetKey =\n this.$module.dataset.preferencesKey || \"cookie_preferences_set\";\n\n if (!this.cookies.policiesCorrectOnInit) {\n this.cookies.delete(this.cookiePreferencesSetKey);\n }\n\n if (\n !this.cookies.exists(this.cookiePreferencesSetKey) ||\n !this.cookies.hasValue(this.cookiePreferencesSetKey, \"true\")\n ) {\n this.$module.removeAttribute(\"hidden\");\n\n this.$acceptButton.addEventListener(\"click\", () => this.accept());\n this.$rejectButton.addEventListener(\"click\", () => this.reject());\n }\n }\n\n accept() {\n this.$prompt.setAttribute(\"hidden\", \"\");\n this.complete();\n this.cookies.acceptAllPolicies();\n this.$acceptedMessage.removeAttribute(\"hidden\");\n this.$acceptedMessage.setAttribute(\"tabindex\", \"0\");\n this.$acceptedMessage.focus();\n this.$acceptedMessage.addEventListener(\"blur\", () => {\n this.$acceptedMessage.removeAttribute(\"tabindex\");\n });\n }\n\n reject() {\n this.$prompt.setAttribute(\"hidden\", \"\");\n this.complete();\n this.cookies.rejectAllPolicies();\n this.$rejectedMessage.removeAttribute(\"hidden\");\n this.$rejectedMessage.setAttribute(\"tabindex\", \"0\");\n this.$rejectedMessage.focus();\n this.$rejectedMessage.addEventListener(\"blur\", () => {\n this.$rejectedMessage.removeAttribute(\"tabindex\");\n });\n }\n\n complete() {\n this.cookies.set(this.cookiePreferencesSetKey, true);\n this.$closeButtons.forEach(($closeButton) => {\n $closeButton.addEventListener(\"click\", () => this.close());\n });\n }\n\n close() {\n this.$module.setAttribute(\"hidden\", \"\");\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","window","TNAFrontendCookies","TNAFrontendCookieEvents","CookieEventHandler","_createClass","debug","arguments","length","undefined","_classCallCheck","this","_defineProperty","log","key","value","_console","_len","args","Array","_key","console","apply","concat","event","callback","Object","hasOwn","events","_toConsumableArray","oneTimeEvents","_this","data","forEach","eventToTrigger","call","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","CookieBanner","$module","$acceptButton","querySelector","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","querySelectorAll","cookies","cookiePreferencesSetKey","preferencesKey","hasValue","removeAttribute","addEventListener","accept","reject","setAttribute","complete","acceptAllPolicies","focus","rejectAllPolicies","_this4","$closeButton","close"],"sourceRoot":""}
1
+ {"version":3,"file":"components/cookie-banner/cookie-banner.js","mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,QAAAA,OAAAC,IACAD,OAAA,iBAAAH,GACA,iBAAAC,QACAA,QAAA,YAAAD,IAEAD,EAAA,YAAAC,GACC,CATD,CASCK,KAAA,8jDCTDC,EAAAC,QAAOC,0BAAPF,EAAOE,wBAA4B,MAE5B,MAAMC,EAAkB,WAa5B,SARD,SAAAA,IAA2B,IAAfC,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GAEf,+FAFuBG,CAAAC,KAAAN,GAAAO,EAAAD,KAAA,SAJhB,CAAC,GAACC,EAAAD,KAAA,gBACK,CAAC,GAACC,EAAAD,KAAA,SACV,GAGNA,KAAKL,MAAQA,EACTH,OAAOC,wBAGT,OAFAO,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A,QAAAC,MAED,WACEJ,KAAK6H,QAAQiB,aAAa,SAAU,GACtC,mFAAC,CA9EsB","sources":["webpack://TNAFrontend/webpack/universalModuleDefinition","webpack://TNAFrontend/./src/nationalarchives/lib/cookie-events.mjs","webpack://TNAFrontend/./src/nationalarchives/lib/cookies.mjs","webpack://TNAFrontend/webpack/bootstrap","webpack://TNAFrontend/webpack/runtime/define property getters","webpack://TNAFrontend/webpack/runtime/hasOwnProperty shorthand","webpack://TNAFrontend/webpack/runtime/make namespace object","webpack://TNAFrontend/./src/nationalarchives/components/cookie-banner/cookie-banner.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"TNAFrontend\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"TNAFrontend\"] = factory();\n\telse\n\t\troot[\"TNAFrontend\"] = factory();\n})(self, () => {\nreturn ","window.TNAFrontendCookieEvents ||= null;\n\nexport class CookieEventHandler {\n events = {};\n oneTimeEvents = {};\n debug = false;\n\n constructor(debug = false) {\n this.debug = debug;\n if (window.TNAFrontendCookieEvents) {\n this.log(\"Using existing TNAFrontendCookieEvents instance\");\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookieEvents;\n }\n window.TNAFrontendCookieEvents = this;\n }\n\n log(...args) {\n if (this.debug) {\n /* eslint-disable-next-line no-console */\n console.log(\"[TNA Frontend Cookie Events]\", ...args);\n }\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n if (!Object.hasOwn(this.events, event)) {\n this.events[event] = [];\n }\n this.events[event] = [...this.events[event], callback];\n }\n\n once(event, callback) {\n if (!Object.hasOwn(this.oneTimeEvents, event)) {\n this.oneTimeEvents[event] = [];\n }\n this.oneTimeEvents[event] = [...this.oneTimeEvents[event], callback];\n }\n\n /** @protected */\n trigger(event, data = {}) {\n if (Object.hasOwn(this.events, event)) {\n this.log(`Triggering event: ${event}`, data);\n this.events[event].forEach((eventToTrigger) =>\n eventToTrigger.call(this, data),\n );\n }\n if (Object.hasOwn(this.oneTimeEvents, event)) {\n this.log(`Triggering one-time event: ${event}`, data);\n\n for (\n /* eslint-disable-next-line no-magic-numbers */\n let eventIndex = this.oneTimeEvents[event].length - 1;\n /* eslint-disable-next-line no-magic-numbers */\n eventIndex >= 0;\n /* eslint-disable-next-line no-magic-numbers */\n eventIndex -= 1\n ) {\n const eventToTrigger = this.oneTimeEvents[event][eventIndex];\n eventToTrigger.call(this, data);\n /* eslint-disable-next-line no-magic-numbers */\n this.oneTimeEvents[event].splice(eventIndex, 1);\n }\n }\n }\n}\n","/* eslint-disable max-lines */\n/* eslint-disable no-console */\n\nimport { CookieEventHandler } from \"./cookie-events.mjs\";\n\nwindow.TNAFrontendCookies ||= null;\n\nconst tnaCookiePolicies = [\"usage\", \"settings\", \"marketing\", \"essential\"];\n\n/**\n * Class to handle cookies.\n * @class Cookies\n * @constructor\n * @public\n */\nexport default class Cookies {\n /** @protected */\n defaultDomain = \"\";\n /** @protected */\n defaultPath = \"\";\n /** @protected */\n secure = true;\n /** @protected */\n policiesKey = \"\";\n /** @protected */\n events = null;\n /** @protected */\n defaultAge = null;\n /** @protected */\n policiesCorrectOnInit = false;\n /** @protected */\n debug = document.documentElement.dataset.tnaFrontendDebug === \"true\";\n\n /**\n * Create a cookie handler.\n * @param {String} [options.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path] - The domain to register the cookie with.\n * @param {Boolean} [options.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.policiesKey] - The name of the cookie.\n * @param {Number} [options.defaultAge] - The default age of non-session cookies.\n * @param {String} [options.newInstance=false] - Create a fresh instance of the cookie class.\n * @param {Boolean} [options.noInit=false] - Don't initialise a blank cookie policy.\n */\n constructor(options = {}) {\n const {\n defaultDomain,\n defaultPath,\n secure,\n policiesKey,\n defaultAge,\n newInstance = false,\n noInit = false,\n } = options;\n if (!newInstance && window.TNAFrontendCookies) {\n /* eslint-disable-next-line no-constructor-return */\n return window.TNAFrontendCookies;\n }\n if (defaultDomain) {\n this.defaultDomain = defaultDomain;\n } else {\n this.defaultDomain =\n document.documentElement.dataset.tnaCookiesDomain ||\n window.location.hostname;\n }\n if (defaultPath) {\n this.defaultPath = defaultPath;\n } else {\n this.defaultPath = document.documentElement.dataset.tnaCookiesPath || \"/\";\n }\n if (secure) {\n this.secure = secure;\n } else {\n this.secure =\n document.documentElement.dataset.tnaCookiesInsecure !== \"true\";\n }\n if (policiesKey) {\n this.policiesKey = policiesKey;\n } else {\n this.policiesKey =\n document.documentElement.dataset.tnaCookiesPoliciesKey ||\n \"cookies_policy\";\n }\n if (defaultAge) {\n this.defaultAge = defaultAge;\n } else {\n /* eslint-disable-next-line no-magic-numbers */\n const secondsInAYear = 365 * 24 * 60 * 60;\n this.defaultAge =\n parseInt(document.documentElement.dataset.tnaCookiesDefaultAge, 10) ||\n secondsInAYear;\n }\n this.events = new CookieEventHandler(this.debug);\n this.policiesCorrectOnInit =\n Object.keys(this.policies).length === tnaCookiePolicies.length &&\n tnaCookiePolicies.every(\n (policy) =>\n Object.keys(this.policies).includes(policy) &&\n typeof this.policies[policy] === \"boolean\",\n );\n if (!this.policiesCorrectOnInit && !noInit) {\n this.init();\n }\n this.log({\n defaultDomain: this.defaultDomain,\n defaultPath: this.defaultPath,\n secure: this.secure,\n policiesKey: this.policiesKey,\n defaultAge: this.defaultAge,\n policiesCorrectOnInit: this.policiesCorrectOnInit,\n });\n if (!newInstance && !window.TNAFrontendCookies) {\n window.TNAFrontendCookies = this;\n }\n }\n\n /** @protected */\n init() {\n const existingPolicies = this.policies;\n this.log(\"Existing policies on init:\", existingPolicies);\n const filteredExistingPolicies = Object.fromEntries(\n Object.keys(existingPolicies)\n .filter((policy) => tnaCookiePolicies.includes(policy))\n .map((policy) => [policy, existingPolicies[policy]]),\n );\n if (Object.keys(filteredExistingPolicies).length) {\n this.log(\"Filtered existing policies:\", filteredExistingPolicies);\n }\n this.savePolicies({\n usage: false,\n settings: false,\n marketing: false,\n ...filteredExistingPolicies,\n essential: true,\n });\n }\n\n log(...args) {\n if (this.debug) {\n console.log(\"[TNA Frontend Cookies]\", ...args, this.all);\n }\n }\n\n destroyInstance() {\n this.log(\"Destroying TNAFrontendCookies instance\");\n window.TNAFrontendCookies = null;\n }\n\n /** @protected */\n /* eslint-disable-next-line class-methods-use-this */\n get all() {\n const deserialised = {};\n document.cookie\n .split(\"; \")\n .filter((cookie) => cookie.trim() !== \"\")\n .forEach((cookie) => {\n const parts = cookie.trim().split(\"=\");\n const [key, value] = parts;\n if (key) {\n deserialised[key] = decodeURIComponent(value || \"\");\n }\n });\n return deserialised;\n }\n\n /** @protected */\n get policies() {\n try {\n return JSON.parse(this.get(this.policiesKey) || \"{}\");\n // eslint-disable-next-line no-unused-vars\n } catch (error) {\n return {};\n }\n }\n\n /**\n * Check to see whether a cookie exists or not.\n * @param {String} key - The cookie name.\n * @returns {Boolean}\n */\n exists(key) {\n return Object.hasOwn(this.all, key);\n }\n\n /**\n * Check to see whether a cookie has a particular value.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The value to check against.\n * @returns\n */\n hasValue(key, value) {\n return this.get(key) === value;\n }\n\n /**\n * Get a cookie.\n * @param {String} key - The cookie name.\n * @returns {String|Number|Boolean|null}\n */\n get(key) {\n if (this.exists(key)) {\n return decodeURIComponent(this.all[key]);\n }\n return null;\n }\n\n /**\n * Set a cookie.\n * @param {String} key - The cookie name.\n * @param {String|Number|Boolean} value - The cookie value.\n * @param {Object} options\n * @param {Number} [options.maxAge=this.defaultAge] - The maximum age of the cookie in seconds.\n * @param {String} [options.path=/] - The path to register the cookie for.\n * @param {String} [options.sameSite=Lax] - The sameSite attribute.\n * @param {String} [options.domain=this.defaultDomain] - The domain to register the cookie with.\n * @param {String} [options.path=this.defaultPath] - The path to register the cookie with.\n * @param {String} [options.secure=this.secure] - Only set cookie in HTTPS environments.\n * @param {String} [options.session=false] - Set a session cookie.\n */\n set(key, value, options = {}) {\n const {\n maxAge = this.defaultAge,\n sameSite = \"Lax\",\n domain = this.defaultDomain,\n path = this.defaultPath,\n secure = this.secure,\n session = false,\n } = options;\n if (!key) {\n return;\n }\n let secureString = \"\";\n if (secure) {\n secureString = \"; secure\";\n }\n let sessionString = \"\";\n if (!session) {\n sessionString = `; max-age=${maxAge}`;\n }\n const cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}; domain=${domain}; samesite=${sameSite}; path=${path}${sessionString}${secureString}`;\n document.cookie = cookie;\n this.log(\"Set cookie:\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n this.events.trigger(\"setCookie\", {\n key,\n value,\n maxAge,\n path,\n sameSite,\n domain,\n secure,\n session,\n cookie,\n });\n }\n\n /**\n * Delete a cookie.\n * @param {String} key - The cookie name.\n * @param {String} [path=/] - The path to the cookie is registered on.\n */\n delete(key, path = \"/\", domain = this.defaultDomain) {\n const options = { maxAge: -1, path, domain: domain || this.defaultDomain };\n this.set(key, \"\", options);\n this.log(\"Deleted cookie:\", { key, path, domain, ...options });\n this.events.trigger(\"deleteCookie\", { key, ...options });\n }\n\n /**\n * Delete all cookies.\n */\n deleteAll(path = \"/\", domain = this.defaultDomain) {\n Object.keys(this.all).forEach((cookie) => {\n this.delete(cookie, path, domain);\n });\n this.log(\"Deleted all cookies\", { path, domain });\n this.events.trigger(\"deleteAllCookies\", { path, domain });\n }\n\n /**\n * Accept a policy.\n * @param {String} policy - The name of the policy.\n */\n acceptPolicy(policy) {\n this.log(\"Accepting policy:\", policy);\n this.setPolicy(policy, true);\n this.events.trigger(\"acceptPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: true });\n }\n\n /**\n * Reject a policy.\n * @param {String} policy - The name of the policy.\n */\n rejectPolicy(policy) {\n this.log(\"Rejecting policy:\", policy);\n this.setPolicy(policy, false);\n this.events.trigger(\"rejectPolicy\", policy);\n this.events.trigger(\"changePolicy\", { [policy]: false });\n }\n\n /**\n * Set a policy.\n * @param {String} policy - The name of the policy.\n * @param {Boolean} accepted - Whether the policy is accepted or not.\n */\n setPolicy(policy, accepted) {\n if (policy === \"essential\") {\n this.log(\"Cannot change essential policy, it is always accepted.\");\n return;\n }\n this.log(`Setting policy ${policy} to ${accepted}`);\n this.savePolicies({\n ...this.policies,\n [policy]: accepted,\n essential: true,\n });\n this.events.trigger(\"changePolicy\", { [policy]: accepted });\n }\n\n /**\n * Accept all the cookie policies.\n */\n acceptAllPolicies() {\n this.log(\"Accepting all policies\");\n const allPolicies = Object.fromEntries(\n Object.keys(this.policies).map((key) => [key.toLowerCase(), true]),\n );\n this.savePolicies(allPolicies);\n this.events.trigger(\"acceptAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Reject all the cookie policies.\n */\n rejectAllPolicies() {\n this.log(\"Rejecting all policies\");\n const allPolicies = {\n ...Object.fromEntries(\n Object.keys(this.policies).map((key) => [key.toLowerCase(), false]),\n ),\n essential: true,\n };\n this.savePolicies(allPolicies);\n this.events.trigger(\"rejectAllPolicies\");\n this.events.trigger(\"changePolicy\", allPolicies);\n }\n\n /**\n * Commit policy preferences to the browser.\n * @param {object} policies - The policies to commit.\n */\n savePolicies(policies) {\n this.log(\"Saving policies:\", policies);\n this.set(this.policiesKey, JSON.stringify(policies));\n }\n\n /**\n * Get the acceptance status of a policy.\n * @param {String} policy - The name of the policy.\n * @returns {Boolean}\n */\n isPolicyAccepted(policy) {\n if (Object.hasOwn(this.policies, policy)) {\n return this.policies[policy] === true;\n }\n return null;\n }\n\n /**\n * Add an event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n on(event, callback) {\n this.log(`Adding event listener for: ${event}`);\n this.events.on(event, callback);\n }\n\n /**\n * Add a one-time event listener.\n * @param {String} event - The event to add a listener for.\n * @param {Function} callback - The callback function to call when the event is triggered.\n */\n once(event, callback) {\n this.log(`Adding one-time event listener for: ${event}`);\n this.events.once(event, callback);\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import Cookies from \"../../lib/cookies.mjs\";\n\nexport { Cookies };\n\nexport class CookieBanner {\n constructor($module) {\n this.$module = $module;\n this.$acceptButton = $module && $module.querySelector('[value=\"accept\"]');\n this.$rejectButton = $module && $module.querySelector('[value=\"reject\"]');\n this.$prompt =\n $module && $module.querySelector(\".tna-cookie-banner__message--prompt\");\n this.$acceptedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--accepted\");\n this.$rejectedMessage =\n $module && $module.querySelector(\".tna-cookie-banner__message--rejected\");\n this.$closeButtons = $module && $module.querySelectorAll('[value=\"close\"]');\n\n if (\n !this.$module ||\n !this.$acceptButton ||\n !this.$rejectButton ||\n !this.$prompt ||\n !this.$acceptedMessage ||\n !this.$rejectedMessage ||\n !this.$closeButtons\n ) {\n return;\n }\n\n this.cookies = new Cookies({ newInstance: true });\n\n this.cookiePreferencesSetKey =\n this.$module.dataset.preferencesKey || \"cookie_preferences_set\";\n\n if (!this.cookies.policiesCorrectOnInit) {\n this.cookies.delete(this.cookiePreferencesSetKey);\n }\n\n if (\n !this.cookies.exists(this.cookiePreferencesSetKey) ||\n !this.cookies.hasValue(this.cookiePreferencesSetKey, \"true\")\n ) {\n this.$module.removeAttribute(\"hidden\");\n\n this.$acceptButton.addEventListener(\"click\", () => this.accept());\n this.$rejectButton.addEventListener(\"click\", () => this.reject());\n }\n }\n\n accept() {\n this.$prompt.setAttribute(\"hidden\", \"\");\n this.complete();\n this.cookies.acceptAllPolicies();\n this.$acceptedMessage.removeAttribute(\"hidden\");\n this.$acceptedMessage.setAttribute(\"tabindex\", \"0\");\n this.$acceptedMessage.focus();\n this.$acceptedMessage.addEventListener(\"blur\", () => {\n this.$acceptedMessage.removeAttribute(\"tabindex\");\n });\n }\n\n reject() {\n this.$prompt.setAttribute(\"hidden\", \"\");\n this.complete();\n this.cookies.rejectAllPolicies();\n this.$rejectedMessage.removeAttribute(\"hidden\");\n this.$rejectedMessage.setAttribute(\"tabindex\", \"0\");\n this.$rejectedMessage.focus();\n this.$rejectedMessage.addEventListener(\"blur\", () => {\n this.$rejectedMessage.removeAttribute(\"tabindex\");\n });\n }\n\n complete() {\n this.cookies.set(this.cookiePreferencesSetKey, true);\n this.$closeButtons.forEach(($closeButton) => {\n $closeButton.addEventListener(\"click\", () => this.close());\n });\n }\n\n close() {\n this.$module.setAttribute(\"hidden\", \"\");\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","_window","window","TNAFrontendCookieEvents","CookieEventHandler","debug","arguments","length","undefined","_classCallCheck","this","_defineProperty","log","key","value","_console","_len","args","Array","_key","console","apply","concat","event","callback","Object","hasOwn","events","_toConsumableArray","oneTimeEvents","_this","data","forEach","eventToTrigger","call","eventIndex","splice","TNAFrontendCookies","tnaCookiePolicies","Cookies","options","document","documentElement","dataset","tnaFrontendDebug","defaultDomain","defaultPath","secure","policiesKey","defaultAge","_options$newInstance","newInstance","_options$noInit","noInit","tnaCookiesDomain","location","hostname","tnaCookiesPath","tnaCookiesInsecure","tnaCookiesPoliciesKey","parseInt","tnaCookiesDefaultAge","policiesCorrectOnInit","keys","policies","every","policy","includes","init","existingPolicies","filteredExistingPolicies","fromEntries","filter","map","savePolicies","_objectSpread","usage","settings","marketing","essential","all","get","deserialised","cookie","split","trim","_parts","_slicedToArray","decodeURIComponent","JSON","parse","error","exists","_options$maxAge","maxAge","_options$sameSite","sameSite","_options$domain","domain","_options$path","path","_options$secure","_options$session","session","secureString","sessionString","encodeURIComponent","trigger","set","_this2","setPolicy","accepted","allPolicies","toLowerCase","stringify","on","once","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","d","definition","o","defineProperty","enumerable","obj","prop","prototype","hasOwnProperty","r","Symbol","toStringTag","CookieBanner","$module","$acceptButton","querySelector","$rejectButton","$prompt","$acceptedMessage","$rejectedMessage","$closeButtons","querySelectorAll","cookies","cookiePreferencesSetKey","preferencesKey","hasValue","removeAttribute","addEventListener","accept","reject","setAttribute","complete","acceptAllPolicies","focus","_this3","rejectAllPolicies","_this4","$closeButton","close"],"sourceRoot":""}