@moduk/frontend 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/images/favicon.ico +0 -0
- package/assets/images/favicon.svg +1 -0
- package/assets/images/govuk-icon-180.png +0 -0
- package/assets/images/govuk-icon-192.png +0 -0
- package/assets/images/govuk-icon-512.png +0 -0
- package/assets/images/govuk-icon-mask.svg +1 -0
- package/assets/images/govuk-opengraph-image.png +0 -0
- package/client/moduk-frontend.umd.js +1 -1
- package/client/moduk-frontend.umd.js.LICENSE.txt +6 -0
- package/client/moduk-frontend.umd.js.map +1 -1
- package/css/index.css +1 -1
- package/dist/assets/images/favicon.ico +0 -0
- package/dist/assets/images/favicon.svg +1 -0
- package/dist/assets/images/govuk-icon-180.png +0 -0
- package/dist/assets/images/govuk-icon-192.png +0 -0
- package/dist/assets/images/govuk-icon-512.png +0 -0
- package/dist/assets/images/govuk-icon-mask.svg +1 -0
- package/dist/assets/images/govuk-opengraph-image.png +0 -0
- package/dist/client/moduk-frontend.umd.js +1 -1
- package/dist/client/moduk-frontend.umd.js.LICENSE.txt +6 -0
- package/dist/client/moduk-frontend.umd.js.map +1 -1
- package/dist/css/index.css +1 -1
- package/dist/nunjucks/moduk/components/header/macro.njk +1 -1
- package/nunjucks/moduk/components/header/macro.njk +1 -1
- package/package.json +2 -2
- package/react/MODUKBody/MODUKBody.d.ts.map +1 -1
- package/react/accordion/AccordionItem.d.ts.map +1 -1
- package/react/esm/MODUKBody/MODUKBody.js +1 -1
- package/react/esm/accordion/AccordionItem.js +0 -1
- package/react/esm/footer/Footer.js +1 -2
- package/react/esm/header/Header.js +0 -1
- package/react/esm/summary-list/SummaryListActions.js +8 -4
- package/react/header/Header.d.ts.map +1 -1
- package/react/index.js +1 -1
- package/react/index.js.map +1 -1
- package/react/summary-list/SummaryListActions.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moduk-frontend.umd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/bootstrap","webpack://MODUK/webpack/runtime/define property getters","webpack://MODUK/webpack/runtime/hasOwnProperty shorthand","webpack://MODUK/webpack/runtime/make namespace object","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/index.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/errors/index.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/i18n.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/button/button.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/header/header.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/all.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MODUK\"] = factory();\n\telse\n\t\troot[\"MODUK\"] = factory();\n})(self, function() {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","const version = '5.0.0';\n\nexport { version };\n//# sourceMappingURL=govuk-frontend-version.mjs.map\n","function mergeConfigs(...configObjects) {\n function flattenObject(configObject) {\n const flattenedObject = {};\n function flattenLoop(obj, prefix) {\n for (const [key, value] of Object.entries(obj)) {\n const prefixedKey = prefix ? `${prefix}.${key}` : key;\n if (value && typeof value === 'object') {\n flattenLoop(value, prefixedKey);\n } else {\n flattenedObject[prefixedKey] = value;\n }\n }\n }\n flattenLoop(configObject);\n return flattenedObject;\n }\n const formattedConfigObject = {};\n for (const configObject of configObjects) {\n const obj = flattenObject(configObject);\n for (const [key, value] of Object.entries(obj)) {\n formattedConfigObject[key] = value;\n }\n }\n return formattedConfigObject;\n}\nfunction extractConfigByNamespace(configObject, namespace) {\n const newObject = {};\n for (const [key, value] of Object.entries(configObject)) {\n const keyParts = key.split('.');\n if (keyParts[0] === namespace) {\n if (keyParts.length > 1) {\n keyParts.shift();\n }\n const newKey = keyParts.join('.');\n newObject[newKey] = value;\n }\n }\n return newObject;\n}\nfunction getFragmentFromUrl(url) {\n if (!url.includes('#')) {\n return undefined;\n }\n return url.split('#').pop();\n}\nfunction isSupported($scope = document.body) {\n if (!$scope) {\n return false;\n }\n return $scope.classList.contains('govuk-frontend-supported');\n}\nfunction validateConfig(schema, config) {\n const validationErrors = [];\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = [];\n for (const {\n required,\n errorMessage\n } of conditions) {\n if (!required.every(key => !!config[key])) {\n errors.push(errorMessage);\n }\n }\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors);\n }\n }\n return validationErrors;\n}\n\n/**\n * Schema for component config\n *\n * @typedef {object} Schema\n * @property {SchemaCondition[]} [anyOf] - List of schema conditions\n */\n\n/**\n * Schema condition for component config\n *\n * @typedef {object} SchemaCondition\n * @property {string[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n\nexport { extractConfigByNamespace, getFragmentFromUrl, isSupported, mergeConfigs, validateConfig };\n//# sourceMappingURL=index.mjs.map\n","function normaliseString(value) {\n if (typeof value !== 'string') {\n return value;\n }\n const trimmedValue = value.trim();\n if (trimmedValue === 'true') {\n return true;\n }\n if (trimmedValue === 'false') {\n return false;\n }\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n return Number(trimmedValue);\n }\n return value;\n}\nfunction normaliseDataset(dataset) {\n const out = {};\n for (const [key, value] of Object.entries(dataset)) {\n out[key] = normaliseString(value);\n }\n return out;\n}\n\nexport { normaliseDataset, normaliseString };\n//# sourceMappingURL=normalise-dataset.mjs.map\n","class GOVUKFrontendError extends Error {\n constructor(...args) {\n super(...args);\n this.name = 'GOVUKFrontendError';\n }\n}\nclass SupportError extends GOVUKFrontendError {\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n */\n constructor($scope = document.body) {\n const supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';\n super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type=\"module\">`');\n this.name = 'SupportError';\n }\n}\nclass ConfigError extends GOVUKFrontendError {\n constructor(...args) {\n super(...args);\n this.name = 'ConfigError';\n }\n}\nclass ElementError extends GOVUKFrontendError {\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';\n if (typeof messageOrOptions === 'object') {\n const {\n componentName,\n identifier,\n element,\n expectedType\n } = messageOrOptions;\n message = `${componentName}: ${identifier}`;\n message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';\n }\n super(message);\n this.name = 'ElementError';\n }\n}\n\nexport { ConfigError, ElementError, GOVUKFrontendError, SupportError };\n//# sourceMappingURL=index.mjs.map\n","import { isSupported } from './common/index.mjs';\nimport { SupportError } from './errors/index.mjs';\n\nclass GOVUKFrontendComponent {\n constructor() {\n this.checkSupport();\n }\n checkSupport() {\n if (!isSupported()) {\n throw new SupportError();\n }\n }\n}\n\nexport { GOVUKFrontendComponent };\n//# sourceMappingURL=govuk-frontend-component.mjs.map\n","class I18n {\n constructor(translations = {}, config = {}) {\n var _config$locale;\n this.translations = void 0;\n this.locale = void 0;\n this.translations = translations;\n this.locale = (_config$locale = config.locale) != null ? _config$locale : document.documentElement.lang || 'en';\n }\n t(lookupKey, options) {\n if (!lookupKey) {\n throw new Error('i18n: lookup key missing');\n }\n if (typeof (options == null ? void 0 : options.count) === 'number') {\n lookupKey = `${lookupKey}.${this.getPluralSuffix(lookupKey, options.count)}`;\n }\n const translationString = this.translations[lookupKey];\n if (typeof translationString === 'string') {\n if (translationString.match(/%{(.\\S+)}/)) {\n if (!options) {\n throw new Error('i18n: cannot replace placeholders in string if no option data provided');\n }\n return this.replacePlaceholders(translationString, options);\n }\n return translationString;\n }\n return lookupKey;\n }\n replacePlaceholders(translationString, options) {\n const formatter = Intl.NumberFormat.supportedLocalesOf(this.locale).length ? new Intl.NumberFormat(this.locale) : undefined;\n return translationString.replace(/%{(.\\S+)}/g, function (placeholderWithBraces, placeholderKey) {\n if (Object.prototype.hasOwnProperty.call(options, placeholderKey)) {\n const placeholderValue = options[placeholderKey];\n if (placeholderValue === false || typeof placeholderValue !== 'number' && typeof placeholderValue !== 'string') {\n return '';\n }\n if (typeof placeholderValue === 'number') {\n return formatter ? formatter.format(placeholderValue) : `${placeholderValue}`;\n }\n return placeholderValue;\n }\n throw new Error(`i18n: no data found to replace ${placeholderWithBraces} placeholder in string`);\n });\n }\n hasIntlPluralRulesSupport() {\n return Boolean('PluralRules' in window.Intl && Intl.PluralRules.supportedLocalesOf(this.locale).length);\n }\n getPluralSuffix(lookupKey, count) {\n count = Number(count);\n if (!isFinite(count)) {\n return 'other';\n }\n const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : this.selectPluralFormUsingFallbackRules(count);\n if (`${lookupKey}.${preferredForm}` in this.translations) {\n return preferredForm;\n } else if (`${lookupKey}.other` in this.translations) {\n console.warn(`i18n: Missing plural form \".${preferredForm}\" for \"${this.locale}\" locale. Falling back to \".other\".`);\n return 'other';\n }\n throw new Error(`i18n: Plural form \".other\" is required for \"${this.locale}\" locale`);\n }\n selectPluralFormUsingFallbackRules(count) {\n count = Math.abs(Math.floor(count));\n const ruleset = this.getPluralRulesForLocale();\n if (ruleset) {\n return I18n.pluralRules[ruleset](count);\n }\n return 'other';\n }\n getPluralRulesForLocale() {\n const localeShort = this.locale.split('-')[0];\n for (const pluralRule in I18n.pluralRulesMap) {\n const languages = I18n.pluralRulesMap[pluralRule];\n if (languages.includes(this.locale) || languages.includes(localeShort)) {\n return pluralRule;\n }\n }\n }\n}\nI18n.pluralRulesMap = {\n arabic: ['ar'],\n chinese: ['my', 'zh', 'id', 'ja', 'jv', 'ko', 'ms', 'th', 'vi'],\n french: ['hy', 'bn', 'fr', 'gu', 'hi', 'fa', 'pa', 'zu'],\n german: ['af', 'sq', 'az', 'eu', 'bg', 'ca', 'da', 'nl', 'en', 'et', 'fi', 'ka', 'de', 'el', 'hu', 'lb', 'no', 'so', 'sw', 'sv', 'ta', 'te', 'tr', 'ur'],\n irish: ['ga'],\n russian: ['ru', 'uk'],\n scottish: ['gd'],\n spanish: ['pt-PT', 'it', 'es'],\n welsh: ['cy']\n};\nI18n.pluralRules = {\n arabic(n) {\n if (n === 0) {\n return 'zero';\n }\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n % 100 >= 3 && n % 100 <= 10) {\n return 'few';\n }\n if (n % 100 >= 11 && n % 100 <= 99) {\n return 'many';\n }\n return 'other';\n },\n chinese() {\n return 'other';\n },\n french(n) {\n return n === 0 || n === 1 ? 'one' : 'other';\n },\n german(n) {\n return n === 1 ? 'one' : 'other';\n },\n irish(n) {\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n >= 3 && n <= 6) {\n return 'few';\n }\n if (n >= 7 && n <= 10) {\n return 'many';\n }\n return 'other';\n },\n russian(n) {\n const lastTwo = n % 100;\n const last = lastTwo % 10;\n if (last === 1 && lastTwo !== 11) {\n return 'one';\n }\n if (last >= 2 && last <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {\n return 'few';\n }\n if (last === 0 || last >= 5 && last <= 9 || lastTwo >= 11 && lastTwo <= 14) {\n return 'many';\n }\n return 'other';\n },\n scottish(n) {\n if (n === 1 || n === 11) {\n return 'one';\n }\n if (n === 2 || n === 12) {\n return 'two';\n }\n if (n >= 3 && n <= 10 || n >= 13 && n <= 19) {\n return 'few';\n }\n return 'other';\n },\n spanish(n) {\n if (n === 1) {\n return 'one';\n }\n if (n % 1000000 === 0 && n !== 0) {\n return 'many';\n }\n return 'other';\n },\n welsh(n) {\n if (n === 0) {\n return 'zero';\n }\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n === 3) {\n return 'few';\n }\n if (n === 6) {\n return 'many';\n }\n return 'other';\n }\n};\n\nexport { I18n };\n//# sourceMappingURL=i18n.mjs.map\n","import { mergeConfigs, extractConfigByNamespace } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Accordion component\n *\n * This allows a collection of sections to be collapsed by default, showing only\n * their headers. Sections can be expanded or collapsed individually by clicking\n * their headers. A \"Show all sections\" button is also added to the top of the\n * accordion, which switches to \"Hide all sections\" when all the sections are\n * expanded.\n *\n * The state of each section is saved to the DOM via the `aria-expanded`\n * attribute, which also provides accessibility.\n *\n * @preserve\n */\nclass Accordion extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for accordion\n * @param {AccordionConfig} [config] - Accordion config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.i18n = void 0;\n this.controlsClass = 'govuk-accordion__controls';\n this.showAllClass = 'govuk-accordion__show-all';\n this.showAllTextClass = 'govuk-accordion__show-all-text';\n this.sectionClass = 'govuk-accordion__section';\n this.sectionExpandedClass = 'govuk-accordion__section--expanded';\n this.sectionButtonClass = 'govuk-accordion__section-button';\n this.sectionHeaderClass = 'govuk-accordion__section-header';\n this.sectionHeadingClass = 'govuk-accordion__section-heading';\n this.sectionHeadingDividerClass = 'govuk-accordion__section-heading-divider';\n this.sectionHeadingTextClass = 'govuk-accordion__section-heading-text';\n this.sectionHeadingTextFocusClass = 'govuk-accordion__section-heading-text-focus';\n this.sectionShowHideToggleClass = 'govuk-accordion__section-toggle';\n this.sectionShowHideToggleFocusClass = 'govuk-accordion__section-toggle-focus';\n this.sectionShowHideTextClass = 'govuk-accordion__section-toggle-text';\n this.upChevronIconClass = 'govuk-accordion-nav__chevron';\n this.downChevronIconClass = 'govuk-accordion-nav__chevron--down';\n this.sectionSummaryClass = 'govuk-accordion__section-summary';\n this.sectionSummaryFocusClass = 'govuk-accordion__section-summary-focus';\n this.sectionContentClass = 'govuk-accordion__section-content';\n this.$sections = void 0;\n this.browserSupportsSessionStorage = false;\n this.$showAllButton = null;\n this.$showAllIcon = null;\n this.$showAllText = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Accordion',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(Accordion.defaults, config, normaliseDataset($module.dataset));\n this.i18n = new I18n(extractConfigByNamespace(this.config, 'i18n'));\n const $sections = this.$module.querySelectorAll(`.${this.sectionClass}`);\n if (!$sections.length) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Sections (\\`<div class=\"${this.sectionClass}\">\\`)`\n });\n }\n this.$sections = $sections;\n this.browserSupportsSessionStorage = helper.checkForSessionStorage();\n this.initControls();\n this.initSectionHeaders();\n const areAllSectionsOpen = this.checkIfAllSectionsOpen();\n this.updateShowAllButton(areAllSectionsOpen);\n }\n initControls() {\n this.$showAllButton = document.createElement('button');\n this.$showAllButton.setAttribute('type', 'button');\n this.$showAllButton.setAttribute('class', this.showAllClass);\n this.$showAllButton.setAttribute('aria-expanded', 'false');\n this.$showAllIcon = document.createElement('span');\n this.$showAllIcon.classList.add(this.upChevronIconClass);\n this.$showAllButton.appendChild(this.$showAllIcon);\n const $accordionControls = document.createElement('div');\n $accordionControls.setAttribute('class', this.controlsClass);\n $accordionControls.appendChild(this.$showAllButton);\n this.$module.insertBefore($accordionControls, this.$module.firstChild);\n this.$showAllText = document.createElement('span');\n this.$showAllText.classList.add(this.showAllTextClass);\n this.$showAllButton.appendChild(this.$showAllText);\n this.$showAllButton.addEventListener('click', () => this.onShowOrHideAllToggle());\n if ('onbeforematch' in document) {\n document.addEventListener('beforematch', event => this.onBeforeMatch(event));\n }\n }\n initSectionHeaders() {\n this.$sections.forEach(($section, i) => {\n const $header = $section.querySelector(`.${this.sectionHeaderClass}`);\n if (!$header) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section headers (\\`<div class=\"${this.sectionHeaderClass}\">\\`)`\n });\n }\n this.constructHeaderMarkup($header, i);\n this.setExpanded(this.isExpanded($section), $section);\n $header.addEventListener('click', () => this.onSectionToggle($section));\n this.setInitialState($section);\n });\n }\n constructHeaderMarkup($header, index) {\n const $span = $header.querySelector(`.${this.sectionButtonClass}`);\n const $heading = $header.querySelector(`.${this.sectionHeadingClass}`);\n const $summary = $header.querySelector(`.${this.sectionSummaryClass}`);\n if (!$heading) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section heading (\\`.${this.sectionHeadingClass}\\`)`\n });\n }\n if (!$span) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section button placeholder (\\`<span class=\"${this.sectionButtonClass}\">\\`)`\n });\n }\n const $button = document.createElement('button');\n $button.setAttribute('type', 'button');\n $button.setAttribute('aria-controls', `${this.$module.id}-content-${index + 1}`);\n for (const attr of Array.from($span.attributes)) {\n if (attr.nodeName !== 'id') {\n $button.setAttribute(attr.nodeName, `${attr.nodeValue}`);\n }\n }\n const $headingText = document.createElement('span');\n $headingText.classList.add(this.sectionHeadingTextClass);\n $headingText.id = $span.id;\n const $headingTextFocus = document.createElement('span');\n $headingTextFocus.classList.add(this.sectionHeadingTextFocusClass);\n $headingText.appendChild($headingTextFocus);\n $headingTextFocus.innerHTML = $span.innerHTML;\n const $showHideToggle = document.createElement('span');\n $showHideToggle.classList.add(this.sectionShowHideToggleClass);\n $showHideToggle.setAttribute('data-nosnippet', '');\n const $showHideToggleFocus = document.createElement('span');\n $showHideToggleFocus.classList.add(this.sectionShowHideToggleFocusClass);\n $showHideToggle.appendChild($showHideToggleFocus);\n const $showHideText = document.createElement('span');\n const $showHideIcon = document.createElement('span');\n $showHideIcon.classList.add(this.upChevronIconClass);\n $showHideToggleFocus.appendChild($showHideIcon);\n $showHideText.classList.add(this.sectionShowHideTextClass);\n $showHideToggleFocus.appendChild($showHideText);\n $button.appendChild($headingText);\n $button.appendChild(this.getButtonPunctuationEl());\n if ($summary != null && $summary.parentNode) {\n const $summarySpan = document.createElement('span');\n const $summarySpanFocus = document.createElement('span');\n $summarySpanFocus.classList.add(this.sectionSummaryFocusClass);\n $summarySpan.appendChild($summarySpanFocus);\n for (const attr of Array.from($summary.attributes)) {\n $summarySpan.setAttribute(attr.nodeName, `${attr.nodeValue}`);\n }\n $summarySpanFocus.innerHTML = $summary.innerHTML;\n $summary.parentNode.replaceChild($summarySpan, $summary);\n $button.appendChild($summarySpan);\n $button.appendChild(this.getButtonPunctuationEl());\n }\n $button.appendChild($showHideToggle);\n $heading.removeChild($span);\n $heading.appendChild($button);\n }\n onBeforeMatch(event) {\n const $fragment = event.target;\n if (!($fragment instanceof Element)) {\n return;\n }\n const $section = $fragment.closest(`.${this.sectionClass}`);\n if ($section) {\n this.setExpanded(true, $section);\n }\n }\n onSectionToggle($section) {\n const expanded = this.isExpanded($section);\n this.setExpanded(!expanded, $section);\n this.storeState($section);\n }\n onShowOrHideAllToggle() {\n const nowExpanded = !this.checkIfAllSectionsOpen();\n this.$sections.forEach($section => {\n this.setExpanded(nowExpanded, $section);\n this.storeState($section);\n });\n this.updateShowAllButton(nowExpanded);\n }\n setExpanded(expanded, $section) {\n const $showHideIcon = $section.querySelector(`.${this.upChevronIconClass}`);\n const $showHideText = $section.querySelector(`.${this.sectionShowHideTextClass}`);\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n const $content = $section.querySelector(`.${this.sectionContentClass}`);\n if (!$content) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section content (\\`<div class=\"${this.sectionContentClass}\">\\`)`\n });\n }\n if (!$showHideIcon || !$showHideText || !$button) {\n return;\n }\n const newButtonText = expanded ? this.i18n.t('hideSection') : this.i18n.t('showSection');\n $showHideText.textContent = newButtonText;\n $button.setAttribute('aria-expanded', `${expanded}`);\n const ariaLabelParts = [];\n const $headingText = $section.querySelector(`.${this.sectionHeadingTextClass}`);\n if ($headingText) {\n ariaLabelParts.push(`${$headingText.textContent}`.trim());\n }\n const $summary = $section.querySelector(`.${this.sectionSummaryClass}`);\n if ($summary) {\n ariaLabelParts.push(`${$summary.textContent}`.trim());\n }\n const ariaLabelMessage = expanded ? this.i18n.t('hideSectionAriaLabel') : this.i18n.t('showSectionAriaLabel');\n ariaLabelParts.push(ariaLabelMessage);\n $button.setAttribute('aria-label', ariaLabelParts.join(' , '));\n if (expanded) {\n $content.removeAttribute('hidden');\n $section.classList.add(this.sectionExpandedClass);\n $showHideIcon.classList.remove(this.downChevronIconClass);\n } else {\n $content.setAttribute('hidden', 'until-found');\n $section.classList.remove(this.sectionExpandedClass);\n $showHideIcon.classList.add(this.downChevronIconClass);\n }\n const areAllSectionsOpen = this.checkIfAllSectionsOpen();\n this.updateShowAllButton(areAllSectionsOpen);\n }\n isExpanded($section) {\n return $section.classList.contains(this.sectionExpandedClass);\n }\n checkIfAllSectionsOpen() {\n const sectionsCount = this.$sections.length;\n const expandedSectionCount = this.$module.querySelectorAll(`.${this.sectionExpandedClass}`).length;\n const areAllSectionsOpen = sectionsCount === expandedSectionCount;\n return areAllSectionsOpen;\n }\n updateShowAllButton(expanded) {\n if (!this.$showAllButton || !this.$showAllText || !this.$showAllIcon) {\n return;\n }\n this.$showAllButton.setAttribute('aria-expanded', expanded.toString());\n this.$showAllText.textContent = expanded ? this.i18n.t('hideAllSections') : this.i18n.t('showAllSections');\n this.$showAllIcon.classList.toggle(this.downChevronIconClass, !expanded);\n }\n storeState($section) {\n if (this.browserSupportsSessionStorage && this.config.rememberExpanded) {\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n if ($button) {\n const contentId = $button.getAttribute('aria-controls');\n const contentState = $button.getAttribute('aria-expanded');\n if (contentId && contentState) {\n window.sessionStorage.setItem(contentId, contentState);\n }\n }\n }\n }\n setInitialState($section) {\n if (this.browserSupportsSessionStorage && this.config.rememberExpanded) {\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n if ($button) {\n const contentId = $button.getAttribute('aria-controls');\n const contentState = contentId ? window.sessionStorage.getItem(contentId) : null;\n if (contentState !== null) {\n this.setExpanded(contentState === 'true', $section);\n }\n }\n }\n }\n getButtonPunctuationEl() {\n const $punctuationEl = document.createElement('span');\n $punctuationEl.classList.add('govuk-visually-hidden', this.sectionHeadingDividerClass);\n $punctuationEl.innerHTML = ', ';\n return $punctuationEl;\n }\n}\nAccordion.moduleName = 'govuk-accordion';\nAccordion.defaults = Object.freeze({\n i18n: {\n hideAllSections: 'Hide all sections',\n hideSection: 'Hide',\n hideSectionAriaLabel: 'Hide this section',\n showAllSections: 'Show all sections',\n showSection: 'Show',\n showSectionAriaLabel: 'Show this section'\n },\n rememberExpanded: true\n});\nconst helper = {\n /**\n * Check for `window.sessionStorage`, and that it actually works.\n *\n * @returns {boolean} True if session storage is available\n */\n checkForSessionStorage: function () {\n const testString = 'this is the test string';\n let result;\n try {\n window.sessionStorage.setItem(testString, testString);\n result = window.sessionStorage.getItem(testString) === testString.toString();\n window.sessionStorage.removeItem(testString);\n return result;\n } catch (exception) {\n return false;\n }\n }\n};\n\n/**\n * Accordion config\n *\n * @see {@link Accordion.defaults}\n * @typedef {object} AccordionConfig\n * @property {AccordionTranslations} [i18n=Accordion.defaults.i18n] - Accordion translations\n * @property {boolean} [rememberExpanded] - Whether the expanded and collapsed\n * state of each section is remembered and restored when navigating.\n */\n\n/**\n * Accordion translations\n *\n * @see {@link Accordion.defaults.i18n}\n * @typedef {object} AccordionTranslations\n *\n * Messages used by the component for the labels of its buttons. This includes\n * the visible text shown on screen, and text to help assistive technology users\n * for the buttons toggling each section.\n * @property {string} [hideAllSections] - The text content for the 'Hide all\n * sections' button, used when at least one section is expanded.\n * @property {string} [hideSection] - The text content for the 'Hide'\n * button, used when a section is expanded.\n * @property {string} [hideSectionAriaLabel] - The text content appended to the\n * 'Hide' button's accessible name when a section is expanded.\n * @property {string} [showAllSections] - The text content for the 'Show all\n * sections' button, used when all sections are collapsed.\n * @property {string} [showSection] - The text content for the 'Show'\n * button, used when a section is collapsed.\n * @property {string} [showSectionAriaLabel] - The text content appended to the\n * 'Show' button's accessible name when a section is expanded.\n */\n\nexport { Accordion };\n//# sourceMappingURL=accordion.mjs.map\n","import { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\nconst KEY_SPACE = 32;\nconst DEBOUNCE_TIMEOUT_IN_SECONDS = 1;\n\n/**\n * JavaScript enhancements for the Button component\n *\n * @preserve\n */\nclass Button extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for button\n * @param {ButtonConfig} [config] - Button config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.debounceFormSubmitTimer = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Button',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(Button.defaults, config, normaliseDataset($module.dataset));\n this.$module.addEventListener('keydown', event => this.handleKeyDown(event));\n this.$module.addEventListener('click', event => this.debounce(event));\n }\n handleKeyDown(event) {\n const $target = event.target;\n if (event.keyCode !== KEY_SPACE) {\n return;\n }\n if ($target instanceof HTMLElement && $target.getAttribute('role') === 'button') {\n event.preventDefault();\n $target.click();\n }\n }\n debounce(event) {\n if (!this.config.preventDoubleClick) {\n return;\n }\n if (this.debounceFormSubmitTimer) {\n event.preventDefault();\n return false;\n }\n this.debounceFormSubmitTimer = window.setTimeout(() => {\n this.debounceFormSubmitTimer = null;\n }, DEBOUNCE_TIMEOUT_IN_SECONDS * 1000);\n }\n}\n\n/**\n * Button config\n *\n * @typedef {object} ButtonConfig\n * @property {boolean} [preventDoubleClick=false] - Prevent accidental double\n * clicks on submit buttons from submitting forms multiple times.\n */\nButton.moduleName = 'govuk-button';\nButton.defaults = Object.freeze({\n preventDoubleClick: false\n});\n\nexport { Button };\n//# sourceMappingURL=button.mjs.map\n","function closestAttributeValue($element, attributeName) {\n const $closestElementWithAttribute = $element.closest(`[${attributeName}]`);\n return $closestElementWithAttribute ? $closestElementWithAttribute.getAttribute(attributeName) : null;\n}\n\nexport { closestAttributeValue };\n//# sourceMappingURL=closest-attribute-value.mjs.map\n","import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';\nimport { mergeConfigs, validateConfig, extractConfigByNamespace } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError, ConfigError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Character count component\n *\n * Tracks the number of characters or words in the `.govuk-js-character-count`\n * `<textarea>` inside the element. Displays a message with the remaining number\n * of characters/words available, or the number of characters/words in excess.\n *\n * You can configure the message to only appear after a certain percentage\n * of the available characters/words has been entered.\n *\n * @preserve\n */\nclass CharacterCount extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for character count\n * @param {CharacterCountConfig} [config] - Character count config\n */\n constructor($module, config = {}) {\n var _ref, _this$config$maxwords;\n super();\n this.$module = void 0;\n this.$textarea = void 0;\n this.$visibleCountMessage = void 0;\n this.$screenReaderCountMessage = void 0;\n this.lastInputTimestamp = null;\n this.lastInputValue = '';\n this.valueChecker = null;\n this.config = void 0;\n this.i18n = void 0;\n this.maxLength = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Character count',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $textarea = $module.querySelector('.govuk-js-character-count');\n if (!($textarea instanceof HTMLTextAreaElement || $textarea instanceof HTMLInputElement)) {\n throw new ElementError({\n componentName: 'Character count',\n element: $textarea,\n expectedType: 'HTMLTextareaElement or HTMLInputElement',\n identifier: 'Form field (`.govuk-js-character-count`)'\n });\n }\n const datasetConfig = normaliseDataset($module.dataset);\n let configOverrides = {};\n if ('maxwords' in datasetConfig || 'maxlength' in datasetConfig) {\n configOverrides = {\n maxlength: undefined,\n maxwords: undefined\n };\n }\n this.config = mergeConfigs(CharacterCount.defaults, config, configOverrides, datasetConfig);\n const errors = validateConfig(CharacterCount.schema, this.config);\n if (errors[0]) {\n throw new ConfigError(`Character count: ${errors[0]}`);\n }\n this.i18n = new I18n(extractConfigByNamespace(this.config, 'i18n'), {\n locale: closestAttributeValue($module, 'lang')\n });\n this.maxLength = (_ref = (_this$config$maxwords = this.config.maxwords) != null ? _this$config$maxwords : this.config.maxlength) != null ? _ref : Infinity;\n this.$module = $module;\n this.$textarea = $textarea;\n const textareaDescriptionId = `${this.$textarea.id}-info`;\n const $textareaDescription = document.getElementById(textareaDescriptionId);\n if (!$textareaDescription) {\n throw new ElementError({\n componentName: 'Character count',\n element: $textareaDescription,\n identifier: `Count message (\\`id=\"${textareaDescriptionId}\"\\`)`\n });\n }\n if (`${$textareaDescription.textContent}`.match(/^\\s*$/)) {\n $textareaDescription.textContent = this.i18n.t('textareaDescription', {\n count: this.maxLength\n });\n }\n this.$textarea.insertAdjacentElement('afterend', $textareaDescription);\n const $screenReaderCountMessage = document.createElement('div');\n $screenReaderCountMessage.className = 'govuk-character-count__sr-status govuk-visually-hidden';\n $screenReaderCountMessage.setAttribute('aria-live', 'polite');\n this.$screenReaderCountMessage = $screenReaderCountMessage;\n $textareaDescription.insertAdjacentElement('afterend', $screenReaderCountMessage);\n const $visibleCountMessage = document.createElement('div');\n $visibleCountMessage.className = $textareaDescription.className;\n $visibleCountMessage.classList.add('govuk-character-count__status');\n $visibleCountMessage.setAttribute('aria-hidden', 'true');\n this.$visibleCountMessage = $visibleCountMessage;\n $textareaDescription.insertAdjacentElement('afterend', $visibleCountMessage);\n $textareaDescription.classList.add('govuk-visually-hidden');\n this.$textarea.removeAttribute('maxlength');\n this.bindChangeEvents();\n window.addEventListener('pageshow', () => this.updateCountMessage());\n this.updateCountMessage();\n }\n bindChangeEvents() {\n this.$textarea.addEventListener('keyup', () => this.handleKeyUp());\n this.$textarea.addEventListener('focus', () => this.handleFocus());\n this.$textarea.addEventListener('blur', () => this.handleBlur());\n }\n handleKeyUp() {\n this.updateVisibleCountMessage();\n this.lastInputTimestamp = Date.now();\n }\n handleFocus() {\n this.valueChecker = window.setInterval(() => {\n if (!this.lastInputTimestamp || Date.now() - 500 >= this.lastInputTimestamp) {\n this.updateIfValueChanged();\n }\n }, 1000);\n }\n handleBlur() {\n if (this.valueChecker) {\n window.clearInterval(this.valueChecker);\n }\n }\n updateIfValueChanged() {\n if (this.$textarea.value !== this.lastInputValue) {\n this.lastInputValue = this.$textarea.value;\n this.updateCountMessage();\n }\n }\n updateCountMessage() {\n this.updateVisibleCountMessage();\n this.updateScreenReaderCountMessage();\n }\n updateVisibleCountMessage() {\n const remainingNumber = this.maxLength - this.count(this.$textarea.value);\n const isError = remainingNumber < 0;\n this.$visibleCountMessage.classList.toggle('govuk-character-count__message--disabled', !this.isOverThreshold());\n this.$textarea.classList.toggle('govuk-textarea--error', isError);\n this.$visibleCountMessage.classList.toggle('govuk-error-message', isError);\n this.$visibleCountMessage.classList.toggle('govuk-hint', !isError);\n this.$visibleCountMessage.textContent = this.getCountMessage();\n }\n updateScreenReaderCountMessage() {\n if (this.isOverThreshold()) {\n this.$screenReaderCountMessage.removeAttribute('aria-hidden');\n } else {\n this.$screenReaderCountMessage.setAttribute('aria-hidden', 'true');\n }\n this.$screenReaderCountMessage.textContent = this.getCountMessage();\n }\n count(text) {\n if (this.config.maxwords) {\n var _text$match;\n const tokens = (_text$match = text.match(/\\S+/g)) != null ? _text$match : [];\n return tokens.length;\n }\n return text.length;\n }\n getCountMessage() {\n const remainingNumber = this.maxLength - this.count(this.$textarea.value);\n const countType = this.config.maxwords ? 'words' : 'characters';\n return this.formatCountMessage(remainingNumber, countType);\n }\n formatCountMessage(remainingNumber, countType) {\n if (remainingNumber === 0) {\n return this.i18n.t(`${countType}AtLimit`);\n }\n const translationKeySuffix = remainingNumber < 0 ? 'OverLimit' : 'UnderLimit';\n return this.i18n.t(`${countType}${translationKeySuffix}`, {\n count: Math.abs(remainingNumber)\n });\n }\n isOverThreshold() {\n if (!this.config.threshold) {\n return true;\n }\n const currentLength = this.count(this.$textarea.value);\n const maxLength = this.maxLength;\n const thresholdValue = maxLength * this.config.threshold / 100;\n return thresholdValue <= currentLength;\n }\n}\n\n/**\n * Character count config\n *\n * @see {@link CharacterCount.defaults}\n * @typedef {object} CharacterCountConfig\n * @property {number} [maxlength] - The maximum number of characters.\n * If maxwords is provided, the maxlength option will be ignored.\n * @property {number} [maxwords] - The maximum number of words. If maxwords is\n * provided, the maxlength option will be ignored.\n * @property {number} [threshold=0] - The percentage value of the limit at\n * which point the count message is displayed. If this attribute is set, the\n * count message will be hidden by default.\n * @property {CharacterCountTranslations} [i18n=CharacterCount.defaults.i18n] - Character count translations\n */\n\n/**\n * Character count translations\n *\n * @see {@link CharacterCount.defaults.i18n}\n * @typedef {object} CharacterCountTranslations\n *\n * Messages shown to users as they type. It provides feedback on how many words\n * or characters they have remaining or if they are over the limit. This also\n * includes a message used as an accessible description for the textarea.\n * @property {TranslationPluralForms} [charactersUnderLimit] - Message displayed\n * when the number of characters is under the configured maximum, `maxlength`.\n * This message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining characters. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {string} [charactersAtLimit] - Message displayed when the number of\n * characters reaches the configured maximum, `maxlength`. This message is\n * displayed visually and through assistive technologies.\n * @property {TranslationPluralForms} [charactersOverLimit] - Message displayed\n * when the number of characters is over the configured maximum, `maxlength`.\n * This message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining characters. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {TranslationPluralForms} [wordsUnderLimit] - Message displayed when\n * the number of words is under the configured maximum, `maxlength`. This\n * message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining words. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {string} [wordsAtLimit] - Message displayed when the number of\n * words reaches the configured maximum, `maxlength`. This message is\n * displayed visually and through assistive technologies.\n * @property {TranslationPluralForms} [wordsOverLimit] - Message displayed when\n * the number of words is over the configured maximum, `maxlength`. This\n * message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining words. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {TranslationPluralForms} [textareaDescription] - Message made\n * available to assistive technologies, if none is already present in the\n * HTML, to describe that the component accepts only a limited amount of\n * content. It is visible on the page when JavaScript is unavailable. The\n * component will replace the `%{count}` placeholder with the value of the\n * `maxlength` or `maxwords` parameter.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n * @typedef {import('../../i18n.mjs').TranslationPluralForms} TranslationPluralForms\n */\nCharacterCount.moduleName = 'govuk-character-count';\nCharacterCount.defaults = Object.freeze({\n threshold: 0,\n i18n: {\n charactersUnderLimit: {\n one: 'You have %{count} character remaining',\n other: 'You have %{count} characters remaining'\n },\n charactersAtLimit: 'You have 0 characters remaining',\n charactersOverLimit: {\n one: 'You have %{count} character too many',\n other: 'You have %{count} characters too many'\n },\n wordsUnderLimit: {\n one: 'You have %{count} word remaining',\n other: 'You have %{count} words remaining'\n },\n wordsAtLimit: 'You have 0 words remaining',\n wordsOverLimit: {\n one: 'You have %{count} word too many',\n other: 'You have %{count} words too many'\n },\n textareaDescription: {\n other: ''\n }\n }\n});\nCharacterCount.schema = Object.freeze({\n anyOf: [{\n required: ['maxwords'],\n errorMessage: 'Either \"maxlength\" or \"maxwords\" must be provided'\n }, {\n required: ['maxlength'],\n errorMessage: 'Either \"maxlength\" or \"maxwords\" must be provided'\n }]\n});\n\nexport { CharacterCount };\n//# sourceMappingURL=character-count.mjs.map\n","import { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Checkboxes component\n *\n * @preserve\n */\nclass Checkboxes extends GOVUKFrontendComponent {\n /**\n * Checkboxes can be associated with a 'conditionally revealed' content block\n * – for example, a checkbox for 'Phone' could reveal an additional form field\n * for the user to enter their phone number.\n *\n * These associations are made using a `data-aria-controls` attribute, which\n * is promoted to an aria-controls attribute during initialisation.\n *\n * We also need to restore the state of any conditional reveals on the page\n * (for example if the user has navigated back), and set up event handlers to\n * keep the reveal in sync with the checkbox state.\n *\n * @param {Element | null} $module - HTML element to use for checkboxes\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$inputs = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Checkboxes',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $inputs = $module.querySelectorAll('input[type=\"checkbox\"]');\n if (!$inputs.length) {\n throw new ElementError({\n componentName: 'Checkboxes',\n identifier: 'Form inputs (`<input type=\"checkbox\">`)'\n });\n }\n this.$module = $module;\n this.$inputs = $inputs;\n this.$inputs.forEach($input => {\n const targetId = $input.getAttribute('data-aria-controls');\n if (!targetId) {\n return;\n }\n if (!document.getElementById(targetId)) {\n throw new ElementError({\n componentName: 'Checkboxes',\n identifier: `Conditional reveal (\\`id=\"${targetId}\"\\`)`\n });\n }\n $input.setAttribute('aria-controls', targetId);\n $input.removeAttribute('data-aria-controls');\n });\n window.addEventListener('pageshow', () => this.syncAllConditionalReveals());\n this.syncAllConditionalReveals();\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n syncAllConditionalReveals() {\n this.$inputs.forEach($input => this.syncConditionalRevealWithInputState($input));\n }\n syncConditionalRevealWithInputState($input) {\n const targetId = $input.getAttribute('aria-controls');\n if (!targetId) {\n return;\n }\n const $target = document.getElementById(targetId);\n if ($target && $target.classList.contains('govuk-checkboxes__conditional')) {\n const inputIsChecked = $input.checked;\n $input.setAttribute('aria-expanded', inputIsChecked.toString());\n $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);\n }\n }\n unCheckAllInputsExcept($input) {\n const allInputsWithSameName = document.querySelectorAll(`input[type=\"checkbox\"][name=\"${$input.name}\"]`);\n allInputsWithSameName.forEach($inputWithSameName => {\n const hasSameFormOwner = $input.form === $inputWithSameName.form;\n if (hasSameFormOwner && $inputWithSameName !== $input) {\n $inputWithSameName.checked = false;\n this.syncConditionalRevealWithInputState($inputWithSameName);\n }\n });\n }\n unCheckExclusiveInputs($input) {\n const allInputsWithSameNameAndExclusiveBehaviour = document.querySelectorAll(`input[data-behaviour=\"exclusive\"][type=\"checkbox\"][name=\"${$input.name}\"]`);\n allInputsWithSameNameAndExclusiveBehaviour.forEach($exclusiveInput => {\n const hasSameFormOwner = $input.form === $exclusiveInput.form;\n if (hasSameFormOwner) {\n $exclusiveInput.checked = false;\n this.syncConditionalRevealWithInputState($exclusiveInput);\n }\n });\n }\n handleClick(event) {\n const $clickedInput = event.target;\n if (!($clickedInput instanceof HTMLInputElement) || $clickedInput.type !== 'checkbox') {\n return;\n }\n const hasAriaControls = $clickedInput.getAttribute('aria-controls');\n if (hasAriaControls) {\n this.syncConditionalRevealWithInputState($clickedInput);\n }\n if (!$clickedInput.checked) {\n return;\n }\n const hasBehaviourExclusive = $clickedInput.getAttribute('data-behaviour') === 'exclusive';\n if (hasBehaviourExclusive) {\n this.unCheckAllInputsExcept($clickedInput);\n } else {\n this.unCheckExclusiveInputs($clickedInput);\n }\n }\n}\nCheckboxes.moduleName = 'govuk-checkboxes';\n\nexport { Checkboxes };\n//# sourceMappingURL=checkboxes.mjs.map\n","import { mergeConfigs, getFragmentFromUrl } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Error summary component\n *\n * Takes focus on initialisation for accessible announcement, unless disabled in\n * configuration.\n *\n * @preserve\n */\nclass ErrorSummary extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for error summary\n * @param {ErrorSummaryConfig} [config] - Error summary config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Error summary',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(ErrorSummary.defaults, config, normaliseDataset($module.dataset));\n this.setFocus();\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n setFocus() {\n if (this.config.disableAutoFocus) {\n return;\n }\n this.$module.setAttribute('tabindex', '-1');\n this.$module.addEventListener('blur', () => {\n this.$module.removeAttribute('tabindex');\n });\n this.$module.focus();\n }\n handleClick(event) {\n const $target = event.target;\n if ($target && this.focusTarget($target)) {\n event.preventDefault();\n }\n }\n focusTarget($target) {\n if (!($target instanceof HTMLAnchorElement)) {\n return false;\n }\n const inputId = getFragmentFromUrl($target.href);\n if (!inputId) {\n return false;\n }\n const $input = document.getElementById(inputId);\n if (!$input) {\n return false;\n }\n const $legendOrLabel = this.getAssociatedLegendOrLabel($input);\n if (!$legendOrLabel) {\n return false;\n }\n $legendOrLabel.scrollIntoView();\n $input.focus({\n preventScroll: true\n });\n return true;\n }\n getAssociatedLegendOrLabel($input) {\n var _document$querySelect;\n const $fieldset = $input.closest('fieldset');\n if ($fieldset) {\n const $legends = $fieldset.getElementsByTagName('legend');\n if ($legends.length) {\n const $candidateLegend = $legends[0];\n if ($input instanceof HTMLInputElement && ($input.type === 'checkbox' || $input.type === 'radio')) {\n return $candidateLegend;\n }\n const legendTop = $candidateLegend.getBoundingClientRect().top;\n const inputRect = $input.getBoundingClientRect();\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return $candidateLegend;\n }\n }\n }\n }\n return (_document$querySelect = document.querySelector(`label[for='${$input.getAttribute('id')}']`)) != null ? _document$querySelect : $input.closest('label');\n }\n}\n\n/**\n * Error summary config\n *\n * @typedef {object} ErrorSummaryConfig\n * @property {boolean} [disableAutoFocus=false] - If set to `true` the error\n * summary will not be focussed when the page loads.\n */\nErrorSummary.moduleName = 'govuk-error-summary';\nErrorSummary.defaults = Object.freeze({\n disableAutoFocus: false\n});\n\nexport { ErrorSummary };\n//# sourceMappingURL=error-summary.mjs.map\n","import { mergeConfigs, extractConfigByNamespace } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Exit this page component\n *\n * @preserve\n */\nclass ExitThisPage extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element that wraps the Exit This Page button\n * @param {ExitThisPageConfig} [config] - Exit This Page config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.i18n = void 0;\n this.$button = void 0;\n this.$skiplinkButton = null;\n this.$updateSpan = null;\n this.$indicatorContainer = null;\n this.$overlay = null;\n this.keypressCounter = 0;\n this.lastKeyWasModified = false;\n this.timeoutTime = 5000;\n this.keypressTimeoutId = null;\n this.timeoutMessageId = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Exit this page',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $button = $module.querySelector('.govuk-exit-this-page__button');\n if (!($button instanceof HTMLAnchorElement)) {\n throw new ElementError({\n componentName: 'Exit this page',\n element: $button,\n expectedType: 'HTMLAnchorElement',\n identifier: 'Button (`.govuk-exit-this-page__button`)'\n });\n }\n this.config = mergeConfigs(ExitThisPage.defaults, config, normaliseDataset($module.dataset));\n this.i18n = new I18n(extractConfigByNamespace(this.config, 'i18n'));\n this.$module = $module;\n this.$button = $button;\n const $skiplinkButton = document.querySelector('.govuk-js-exit-this-page-skiplink');\n if ($skiplinkButton instanceof HTMLAnchorElement) {\n this.$skiplinkButton = $skiplinkButton;\n }\n this.buildIndicator();\n this.initUpdateSpan();\n this.initButtonClickHandler();\n if (!('govukFrontendExitThisPageKeypress' in document.body.dataset)) {\n document.addEventListener('keyup', this.handleKeypress.bind(this), true);\n document.body.dataset.govukFrontendExitThisPageKeypress = 'true';\n }\n window.addEventListener('pageshow', this.resetPage.bind(this));\n }\n initUpdateSpan() {\n this.$updateSpan = document.createElement('span');\n this.$updateSpan.setAttribute('role', 'status');\n this.$updateSpan.className = 'govuk-visually-hidden';\n this.$module.appendChild(this.$updateSpan);\n }\n initButtonClickHandler() {\n this.$button.addEventListener('click', this.handleClick.bind(this));\n if (this.$skiplinkButton) {\n this.$skiplinkButton.addEventListener('click', this.handleClick.bind(this));\n }\n }\n buildIndicator() {\n this.$indicatorContainer = document.createElement('div');\n this.$indicatorContainer.className = 'govuk-exit-this-page__indicator';\n this.$indicatorContainer.setAttribute('aria-hidden', 'true');\n for (let i = 0; i < 3; i++) {\n const $indicator = document.createElement('div');\n $indicator.className = 'govuk-exit-this-page__indicator-light';\n this.$indicatorContainer.appendChild($indicator);\n }\n this.$button.appendChild(this.$indicatorContainer);\n }\n updateIndicator() {\n if (!this.$indicatorContainer) {\n return;\n }\n this.$indicatorContainer.classList.toggle('govuk-exit-this-page__indicator--visible', this.keypressCounter > 0);\n const $indicators = this.$indicatorContainer.querySelectorAll('.govuk-exit-this-page__indicator-light');\n $indicators.forEach(($indicator, index) => {\n $indicator.classList.toggle('govuk-exit-this-page__indicator-light--on', index < this.keypressCounter);\n });\n }\n exitPage() {\n if (!this.$updateSpan) {\n return;\n }\n this.$updateSpan.textContent = '';\n document.body.classList.add('govuk-exit-this-page-hide-content');\n this.$overlay = document.createElement('div');\n this.$overlay.className = 'govuk-exit-this-page-overlay';\n this.$overlay.setAttribute('role', 'alert');\n document.body.appendChild(this.$overlay);\n this.$overlay.textContent = this.i18n.t('activated');\n window.location.href = this.$button.href;\n }\n handleClick(event) {\n event.preventDefault();\n this.exitPage();\n }\n handleKeypress(event) {\n if (!this.$updateSpan) {\n return;\n }\n if ((event.key === 'Shift' || event.keyCode === 16 || event.which === 16) && !this.lastKeyWasModified) {\n this.keypressCounter += 1;\n this.updateIndicator();\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId);\n this.timeoutMessageId = null;\n }\n if (this.keypressCounter >= 3) {\n this.keypressCounter = 0;\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n this.keypressTimeoutId = null;\n }\n this.exitPage();\n } else {\n if (this.keypressCounter === 1) {\n this.$updateSpan.textContent = this.i18n.t('pressTwoMoreTimes');\n } else {\n this.$updateSpan.textContent = this.i18n.t('pressOneMoreTime');\n }\n }\n this.setKeypressTimer();\n } else if (this.keypressTimeoutId) {\n this.resetKeypressTimer();\n }\n this.lastKeyWasModified = event.shiftKey;\n }\n setKeypressTimer() {\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n }\n this.keypressTimeoutId = window.setTimeout(this.resetKeypressTimer.bind(this), this.timeoutTime);\n }\n resetKeypressTimer() {\n if (!this.$updateSpan) {\n return;\n }\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n this.keypressTimeoutId = null;\n }\n const $updateSpan = this.$updateSpan;\n this.keypressCounter = 0;\n $updateSpan.textContent = this.i18n.t('timedOut');\n this.timeoutMessageId = window.setTimeout(() => {\n $updateSpan.textContent = '';\n }, this.timeoutTime);\n this.updateIndicator();\n }\n resetPage() {\n document.body.classList.remove('govuk-exit-this-page-hide-content');\n if (this.$overlay) {\n this.$overlay.remove();\n this.$overlay = null;\n }\n if (this.$updateSpan) {\n this.$updateSpan.setAttribute('role', 'status');\n this.$updateSpan.textContent = '';\n }\n this.updateIndicator();\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n }\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId);\n }\n }\n}\n\n/**\n * Exit this Page config\n *\n * @see {@link ExitThisPage.defaults}\n * @typedef {object} ExitThisPageConfig\n * @property {ExitThisPageTranslations} [i18n=ExitThisPage.defaults.i18n] - Exit this page translations\n */\n\n/**\n * Exit this Page translations\n *\n * @see {@link ExitThisPage.defaults.i18n}\n * @typedef {object} ExitThisPageTranslations\n *\n * Messages used by the component programatically inserted text, including\n * overlay text and screen reader announcements.\n * @property {string} [activated] - Screen reader announcement for when EtP\n * keypress functionality has been successfully activated.\n * @property {string} [timedOut] - Screen reader announcement for when the EtP\n * keypress functionality has timed out.\n * @property {string} [pressTwoMoreTimes] - Screen reader announcement informing\n * the user they must press the activation key two more times.\n * @property {string} [pressOneMoreTime] - Screen reader announcement informing\n * the user they must press the activation key one more time.\n */\nExitThisPage.moduleName = 'govuk-exit-this-page';\nExitThisPage.defaults = Object.freeze({\n i18n: {\n activated: 'Loading.',\n timedOut: 'Exit this page expired.',\n pressTwoMoreTimes: 'Shift, press 2 more times to exit.',\n pressOneMoreTime: 'Shift, press 1 more time to exit.'\n }\n});\n\nexport { ExitThisPage };\n//# sourceMappingURL=exit-this-page.mjs.map\n","import { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Header component\n *\n * @preserve\n */\nclass Header extends GOVUKFrontendComponent {\n /**\n * Apply a matchMedia for desktop which will trigger a state sync if the\n * browser viewport moves between states.\n *\n * @param {Element | null} $module - HTML element to use for header\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$menuButton = void 0;\n this.$menu = void 0;\n this.menuIsOpen = false;\n this.mql = null;\n if (!$module) {\n throw new ElementError({\n componentName: 'Header',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n const $menuButton = $module.querySelector('.govuk-js-header-toggle');\n if (!$menuButton) {\n return this;\n }\n const menuId = $menuButton.getAttribute('aria-controls');\n if (!menuId) {\n throw new ElementError({\n componentName: 'Header',\n identifier: 'Navigation button (`<button class=\"govuk-js-header-toggle\">`) attribute (`aria-controls`)'\n });\n }\n const $menu = document.getElementById(menuId);\n if (!$menu) {\n throw new ElementError({\n componentName: 'Header',\n element: $menu,\n identifier: `Navigation (\\`<ul id=\"${menuId}\">\\`)`\n });\n }\n this.$menu = $menu;\n this.$menuButton = $menuButton;\n this.mql = window.matchMedia('(min-width: 48.0625em)');\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.syncState());\n } else {\n this.mql.addListener(() => this.syncState());\n }\n this.syncState();\n this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());\n }\n syncState() {\n if (!this.mql || !this.$menu || !this.$menuButton) {\n return;\n }\n if (this.mql.matches) {\n this.$menu.removeAttribute('hidden');\n this.$menuButton.setAttribute('hidden', '');\n } else {\n this.$menuButton.removeAttribute('hidden');\n this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());\n if (this.menuIsOpen) {\n this.$menu.removeAttribute('hidden');\n } else {\n this.$menu.setAttribute('hidden', '');\n }\n }\n }\n handleMenuButtonClick() {\n this.menuIsOpen = !this.menuIsOpen;\n this.syncState();\n }\n}\nHeader.moduleName = 'govuk-header';\n\nexport { Header };\n//# sourceMappingURL=header.mjs.map\n","import { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Notification Banner component\n *\n * @preserve\n */\nclass NotificationBanner extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Notification banner',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(NotificationBanner.defaults, config, normaliseDataset($module.dataset));\n this.setFocus();\n }\n setFocus() {\n if (this.config.disableAutoFocus) {\n return;\n }\n if (this.$module.getAttribute('role') !== 'alert') {\n return;\n }\n if (!this.$module.getAttribute('tabindex')) {\n this.$module.setAttribute('tabindex', '-1');\n this.$module.addEventListener('blur', () => {\n this.$module.removeAttribute('tabindex');\n });\n }\n this.$module.focus();\n }\n}\n\n/**\n * Notification banner config\n *\n * @typedef {object} NotificationBannerConfig\n * @property {boolean} [disableAutoFocus=false] - If set to `true` the\n * notification banner will not be focussed when the page loads. This only\n * applies if the component has a `role` of `alert` – in other cases the\n * component will not be focused on page load, regardless of this option.\n */\nNotificationBanner.moduleName = 'govuk-notification-banner';\nNotificationBanner.defaults = Object.freeze({\n disableAutoFocus: false\n});\n\nexport { NotificationBanner };\n//# sourceMappingURL=notification-banner.mjs.map\n","import { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Radios component\n *\n * @preserve\n */\nclass Radios extends GOVUKFrontendComponent {\n /**\n * Radios can be associated with a 'conditionally revealed' content block –\n * for example, a radio for 'Phone' could reveal an additional form field for\n * the user to enter their phone number.\n *\n * These associations are made using a `data-aria-controls` attribute, which\n * is promoted to an aria-controls attribute during initialisation.\n *\n * We also need to restore the state of any conditional reveals on the page\n * (for example if the user has navigated back), and set up event handlers to\n * keep the reveal in sync with the radio state.\n *\n * @param {Element | null} $module - HTML element to use for radios\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$inputs = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Radios',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $inputs = $module.querySelectorAll('input[type=\"radio\"]');\n if (!$inputs.length) {\n throw new ElementError({\n componentName: 'Radios',\n identifier: 'Form inputs (`<input type=\"radio\">`)'\n });\n }\n this.$module = $module;\n this.$inputs = $inputs;\n this.$inputs.forEach($input => {\n const targetId = $input.getAttribute('data-aria-controls');\n if (!targetId) {\n return;\n }\n if (!document.getElementById(targetId)) {\n throw new ElementError({\n componentName: 'Radios',\n identifier: `Conditional reveal (\\`id=\"${targetId}\"\\`)`\n });\n }\n $input.setAttribute('aria-controls', targetId);\n $input.removeAttribute('data-aria-controls');\n });\n window.addEventListener('pageshow', () => this.syncAllConditionalReveals());\n this.syncAllConditionalReveals();\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n syncAllConditionalReveals() {\n this.$inputs.forEach($input => this.syncConditionalRevealWithInputState($input));\n }\n syncConditionalRevealWithInputState($input) {\n const targetId = $input.getAttribute('aria-controls');\n if (!targetId) {\n return;\n }\n const $target = document.getElementById(targetId);\n if ($target != null && $target.classList.contains('govuk-radios__conditional')) {\n const inputIsChecked = $input.checked;\n $input.setAttribute('aria-expanded', inputIsChecked.toString());\n $target.classList.toggle('govuk-radios__conditional--hidden', !inputIsChecked);\n }\n }\n handleClick(event) {\n const $clickedInput = event.target;\n if (!($clickedInput instanceof HTMLInputElement) || $clickedInput.type !== 'radio') {\n return;\n }\n const $allInputs = document.querySelectorAll('input[type=\"radio\"][aria-controls]');\n const $clickedInputForm = $clickedInput.form;\n const $clickedInputName = $clickedInput.name;\n $allInputs.forEach($input => {\n const hasSameFormOwner = $input.form === $clickedInputForm;\n const hasSameName = $input.name === $clickedInputName;\n if (hasSameName && hasSameFormOwner) {\n this.syncConditionalRevealWithInputState($input);\n }\n });\n }\n}\nRadios.moduleName = 'govuk-radios';\n\nexport { Radios };\n//# sourceMappingURL=radios.mjs.map\n","import { getFragmentFromUrl } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Skip link component\n *\n * @preserve\n */\nclass SkipLink extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for skip link\n * @throws {ElementError} when $module is not set or the wrong type\n * @throws {ElementError} when $module.hash does not contain a hash\n * @throws {ElementError} when the linked element is missing or the wrong type\n */\n constructor($module) {\n var _this$$module$getAttr;\n super();\n this.$module = void 0;\n this.$linkedElement = void 0;\n this.linkedElementListener = false;\n if (!($module instanceof HTMLAnchorElement)) {\n throw new ElementError({\n componentName: 'Skip link',\n element: $module,\n expectedType: 'HTMLAnchorElement',\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n const hash = this.$module.hash;\n const href = (_this$$module$getAttr = this.$module.getAttribute('href')) != null ? _this$$module$getAttr : '';\n let url;\n try {\n url = new window.URL(this.$module.href);\n } catch (error) {\n throw new ElementError(`Skip link: Target link (\\`href=\"${href}\"\\`) is invalid`);\n }\n if (url.origin !== window.location.origin || url.pathname !== window.location.pathname) {\n return;\n }\n const linkedElementId = getFragmentFromUrl(hash);\n if (!linkedElementId) {\n throw new ElementError(`Skip link: Target link (\\`href=\"${href}\"\\`) has no hash fragment`);\n }\n const $linkedElement = document.getElementById(linkedElementId);\n if (!$linkedElement) {\n throw new ElementError({\n componentName: 'Skip link',\n element: $linkedElement,\n identifier: `Target content (\\`id=\"${linkedElementId}\"\\`)`\n });\n }\n this.$linkedElement = $linkedElement;\n this.$module.addEventListener('click', () => this.focusLinkedElement());\n }\n focusLinkedElement() {\n if (!this.$linkedElement) {\n return;\n }\n if (!this.$linkedElement.getAttribute('tabindex')) {\n this.$linkedElement.setAttribute('tabindex', '-1');\n this.$linkedElement.classList.add('govuk-skip-link-focused-element');\n if (!this.linkedElementListener) {\n this.$linkedElement.addEventListener('blur', () => this.removeFocusProperties());\n this.linkedElementListener = true;\n }\n }\n this.$linkedElement.focus();\n }\n removeFocusProperties() {\n if (!this.$linkedElement) {\n return;\n }\n this.$linkedElement.removeAttribute('tabindex');\n this.$linkedElement.classList.remove('govuk-skip-link-focused-element');\n }\n}\nSkipLink.moduleName = 'govuk-skip-link';\n\nexport { SkipLink };\n//# sourceMappingURL=skip-link.mjs.map\n","import { getFragmentFromUrl } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Tabs component\n *\n * @preserve\n */\nclass Tabs extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for tabs\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$tabs = void 0;\n this.$tabList = void 0;\n this.$tabListItems = void 0;\n this.keys = {\n left: 37,\n right: 39,\n up: 38,\n down: 40\n };\n this.jsHiddenClass = 'govuk-tabs__panel--hidden';\n this.changingHash = false;\n this.boundTabClick = void 0;\n this.boundTabKeydown = void 0;\n this.boundOnHashChange = void 0;\n this.mql = null;\n if (!$module) {\n throw new ElementError({\n componentName: 'Tabs',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $tabs = $module.querySelectorAll('a.govuk-tabs__tab');\n if (!$tabs.length) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'Links (`<a class=\"govuk-tabs__tab\">`)'\n });\n }\n this.$module = $module;\n this.$tabs = $tabs;\n this.boundTabClick = this.onTabClick.bind(this);\n this.boundTabKeydown = this.onTabKeydown.bind(this);\n this.boundOnHashChange = this.onHashChange.bind(this);\n const $tabList = this.$module.querySelector('.govuk-tabs__list');\n const $tabListItems = this.$module.querySelectorAll('li.govuk-tabs__list-item');\n if (!$tabList) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'List (`<ul class=\"govuk-tabs__list\">`)'\n });\n }\n if (!$tabListItems.length) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'List items (`<li class=\"govuk-tabs__list-item\">`)'\n });\n }\n this.$tabList = $tabList;\n this.$tabListItems = $tabListItems;\n this.setupResponsiveChecks();\n }\n setupResponsiveChecks() {\n this.mql = window.matchMedia('(min-width: 40.0625em)');\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode());\n } else {\n this.mql.addListener(() => this.checkMode());\n }\n this.checkMode();\n }\n checkMode() {\n var _this$mql;\n if ((_this$mql = this.mql) != null && _this$mql.matches) {\n this.setup();\n } else {\n this.teardown();\n }\n }\n setup() {\n var _this$getTab;\n this.$tabList.setAttribute('role', 'tablist');\n this.$tabListItems.forEach($item => {\n $item.setAttribute('role', 'presentation');\n });\n this.$tabs.forEach($tab => {\n this.setAttributes($tab);\n $tab.addEventListener('click', this.boundTabClick, true);\n $tab.addEventListener('keydown', this.boundTabKeydown, true);\n this.hideTab($tab);\n });\n const $activeTab = (_this$getTab = this.getTab(window.location.hash)) != null ? _this$getTab : this.$tabs[0];\n this.showTab($activeTab);\n window.addEventListener('hashchange', this.boundOnHashChange, true);\n }\n teardown() {\n this.$tabList.removeAttribute('role');\n this.$tabListItems.forEach($item => {\n $item.removeAttribute('role');\n });\n this.$tabs.forEach($tab => {\n $tab.removeEventListener('click', this.boundTabClick, true);\n $tab.removeEventListener('keydown', this.boundTabKeydown, true);\n this.unsetAttributes($tab);\n });\n window.removeEventListener('hashchange', this.boundOnHashChange, true);\n }\n onHashChange() {\n const hash = window.location.hash;\n const $tabWithHash = this.getTab(hash);\n if (!$tabWithHash) {\n return;\n }\n if (this.changingHash) {\n this.changingHash = false;\n return;\n }\n const $previousTab = this.getCurrentTab();\n if (!$previousTab) {\n return;\n }\n this.hideTab($previousTab);\n this.showTab($tabWithHash);\n $tabWithHash.focus();\n }\n hideTab($tab) {\n this.unhighlightTab($tab);\n this.hidePanel($tab);\n }\n showTab($tab) {\n this.highlightTab($tab);\n this.showPanel($tab);\n }\n getTab(hash) {\n return this.$module.querySelector(`a.govuk-tabs__tab[href=\"${hash}\"]`);\n }\n setAttributes($tab) {\n const panelId = getFragmentFromUrl($tab.href);\n if (!panelId) {\n return;\n }\n $tab.setAttribute('id', `tab_${panelId}`);\n $tab.setAttribute('role', 'tab');\n $tab.setAttribute('aria-controls', panelId);\n $tab.setAttribute('aria-selected', 'false');\n $tab.setAttribute('tabindex', '-1');\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.setAttribute('role', 'tabpanel');\n $panel.setAttribute('aria-labelledby', $tab.id);\n $panel.classList.add(this.jsHiddenClass);\n }\n unsetAttributes($tab) {\n $tab.removeAttribute('id');\n $tab.removeAttribute('role');\n $tab.removeAttribute('aria-controls');\n $tab.removeAttribute('aria-selected');\n $tab.removeAttribute('tabindex');\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.removeAttribute('role');\n $panel.removeAttribute('aria-labelledby');\n $panel.classList.remove(this.jsHiddenClass);\n }\n onTabClick(event) {\n const $currentTab = this.getCurrentTab();\n const $nextTab = event.currentTarget;\n if (!$currentTab || !($nextTab instanceof HTMLAnchorElement)) {\n return;\n }\n event.preventDefault();\n this.hideTab($currentTab);\n this.showTab($nextTab);\n this.createHistoryEntry($nextTab);\n }\n createHistoryEntry($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n const panelId = $panel.id;\n $panel.id = '';\n this.changingHash = true;\n window.location.hash = panelId;\n $panel.id = panelId;\n }\n onTabKeydown(event) {\n switch (event.keyCode) {\n case this.keys.left:\n case this.keys.up:\n this.activatePreviousTab();\n event.preventDefault();\n break;\n case this.keys.right:\n case this.keys.down:\n this.activateNextTab();\n event.preventDefault();\n break;\n }\n }\n activateNextTab() {\n const $currentTab = this.getCurrentTab();\n if (!($currentTab != null && $currentTab.parentElement)) {\n return;\n }\n const $nextTabListItem = $currentTab.parentElement.nextElementSibling;\n if (!$nextTabListItem) {\n return;\n }\n const $nextTab = $nextTabListItem.querySelector('a.govuk-tabs__tab');\n if (!$nextTab) {\n return;\n }\n this.hideTab($currentTab);\n this.showTab($nextTab);\n $nextTab.focus();\n this.createHistoryEntry($nextTab);\n }\n activatePreviousTab() {\n const $currentTab = this.getCurrentTab();\n if (!($currentTab != null && $currentTab.parentElement)) {\n return;\n }\n const $previousTabListItem = $currentTab.parentElement.previousElementSibling;\n if (!$previousTabListItem) {\n return;\n }\n const $previousTab = $previousTabListItem.querySelector('a.govuk-tabs__tab');\n if (!$previousTab) {\n return;\n }\n this.hideTab($currentTab);\n this.showTab($previousTab);\n $previousTab.focus();\n this.createHistoryEntry($previousTab);\n }\n getPanel($tab) {\n const panelId = getFragmentFromUrl($tab.href);\n if (!panelId) {\n return null;\n }\n return this.$module.querySelector(`#${panelId}`);\n }\n showPanel($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.classList.remove(this.jsHiddenClass);\n }\n hidePanel($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.classList.add(this.jsHiddenClass);\n }\n unhighlightTab($tab) {\n if (!$tab.parentElement) {\n return;\n }\n $tab.setAttribute('aria-selected', 'false');\n $tab.parentElement.classList.remove('govuk-tabs__list-item--selected');\n $tab.setAttribute('tabindex', '-1');\n }\n highlightTab($tab) {\n if (!$tab.parentElement) {\n return;\n }\n $tab.setAttribute('aria-selected', 'true');\n $tab.parentElement.classList.add('govuk-tabs__list-item--selected');\n $tab.setAttribute('tabindex', '0');\n }\n getCurrentTab() {\n return this.$module.querySelector('.govuk-tabs__list-item--selected a.govuk-tabs__tab');\n }\n}\nTabs.moduleName = 'govuk-tabs';\n\nexport { Tabs };\n//# sourceMappingURL=tabs.mjs.map\n","export { version } from './common/govuk-frontend-version.mjs';\nimport { isSupported } from './common/index.mjs';\nimport { Accordion } from './components/accordion/accordion.mjs';\nimport { Button } from './components/button/button.mjs';\nimport { CharacterCount } from './components/character-count/character-count.mjs';\nimport { Checkboxes } from './components/checkboxes/checkboxes.mjs';\nimport { ErrorSummary } from './components/error-summary/error-summary.mjs';\nimport { ExitThisPage } from './components/exit-this-page/exit-this-page.mjs';\nimport { Header } from './components/header/header.mjs';\nimport { NotificationBanner } from './components/notification-banner/notification-banner.mjs';\nimport { Radios } from './components/radios/radios.mjs';\nimport { SkipLink } from './components/skip-link/skip-link.mjs';\nimport { Tabs } from './components/tabs/tabs.mjs';\nimport { SupportError } from './errors/index.mjs';\n\n/**\n * Initialise all components\n *\n * Use the `data-module` attributes to find, instantiate and init all of the\n * components provided as part of GOV.UK Frontend.\n *\n * @param {Config & { scope?: Element }} [config] - Config for all components (with optional scope)\n */\nfunction initAll(config) {\n var _config$scope;\n config = typeof config !== 'undefined' ? config : {};\n if (!isSupported()) {\n console.log(new SupportError());\n return;\n }\n const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [Header], [NotificationBanner, config.notificationBanner], [Radios], [SkipLink], [Tabs]];\n const $scope = (_config$scope = config.scope) != null ? _config$scope : document;\n components.forEach(([Component, config]) => {\n const $elements = $scope.querySelectorAll(`[data-module=\"${Component.moduleName}\"]`);\n $elements.forEach($element => {\n try {\n 'defaults' in Component ? new Component($element, config) : new Component($element);\n } catch (error) {\n console.log(error);\n }\n });\n });\n}\n\n/**\n * Config for all components via `initAll()`\n *\n * @typedef {object} Config\n * @property {AccordionConfig} [accordion] - Accordion config\n * @property {ButtonConfig} [button] - Button config\n * @property {CharacterCountConfig} [characterCount] - Character Count config\n * @property {ErrorSummaryConfig} [errorSummary] - Error Summary config\n * @property {ExitThisPageConfig} [exitThisPage] - Exit This Page config\n * @property {NotificationBannerConfig} [notificationBanner] - Notification Banner config\n */\n\n/**\n * Config for individual components\n *\n * @typedef {import('./components/accordion/accordion.mjs').AccordionConfig} AccordionConfig\n * @typedef {import('./components/accordion/accordion.mjs').AccordionTranslations} AccordionTranslations\n * @typedef {import('./components/button/button.mjs').ButtonConfig} ButtonConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountConfig} CharacterCountConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountTranslations} CharacterCountTranslations\n * @typedef {import('./components/error-summary/error-summary.mjs').ErrorSummaryConfig} ErrorSummaryConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageConfig} ExitThisPageConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageTranslations} ExitThisPageTranslations\n * @typedef {import('./components/notification-banner/notification-banner.mjs').NotificationBannerConfig} NotificationBannerConfig\n */\n\n/**\n * Component config keys, e.g. `accordion` and `characterCount`\n *\n * @typedef {keyof Config} ConfigKey\n */\n\nexport { Accordion, Button, CharacterCount, Checkboxes, ErrorSummary, ExitThisPage, Header, NotificationBanner, Radios, SkipLink, Tabs, initAll };\n//# sourceMappingURL=all.mjs.map\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","version","mergeConfigs","configObjects","flattenObject","configObject","flattenedObject","flattenLoop","prefix","entries","prefixedKey","formattedConfigObject","extractConfigByNamespace","namespace","newObject","keyParts","split","length","shift","join","getFragmentFromUrl","url","includes","pop","isSupported","$scope","document","body","classList","contains","normaliseString","trimmedValue","trim","isFinite","Number","normaliseDataset","dataset","out","GOVUKFrontendError","Error","constructor","args","super","this","name","SupportError","supportMessage","HTMLScriptElement","ConfigError","ElementError","messageOrOptions","message","componentName","identifier","element","expectedType","GOVUKFrontendComponent","checkSupport","I18n","translations","config","_config$locale","locale","documentElement","lang","t","lookupKey","options","count","getPluralSuffix","translationString","match","replacePlaceholders","formatter","Intl","NumberFormat","supportedLocalesOf","undefined","replace","placeholderWithBraces","placeholderKey","placeholderValue","format","hasIntlPluralRulesSupport","Boolean","window","PluralRules","preferredForm","select","selectPluralFormUsingFallbackRules","console","warn","Math","abs","floor","ruleset","getPluralRulesForLocale","pluralRules","localeShort","pluralRule","pluralRulesMap","languages","arabic","chinese","french","german","irish","russian","scottish","spanish","welsh","n","lastTwo","last","Accordion","$module","i18n","controlsClass","showAllClass","showAllTextClass","sectionClass","sectionExpandedClass","sectionButtonClass","sectionHeaderClass","sectionHeadingClass","sectionHeadingDividerClass","sectionHeadingTextClass","sectionHeadingTextFocusClass","sectionShowHideToggleClass","sectionShowHideToggleFocusClass","sectionShowHideTextClass","upChevronIconClass","downChevronIconClass","sectionSummaryClass","sectionSummaryFocusClass","sectionContentClass","$sections","browserSupportsSessionStorage","$showAllButton","$showAllIcon","$showAllText","HTMLElement","defaults","querySelectorAll","helper","checkForSessionStorage","initControls","initSectionHeaders","areAllSectionsOpen","checkIfAllSectionsOpen","updateShowAllButton","createElement","setAttribute","add","appendChild","$accordionControls","insertBefore","firstChild","addEventListener","onShowOrHideAllToggle","event","onBeforeMatch","forEach","$section","i","$header","querySelector","constructHeaderMarkup","setExpanded","isExpanded","onSectionToggle","setInitialState","index","$span","$heading","$summary","$button","id","attr","Array","from","attributes","nodeName","nodeValue","$headingText","$headingTextFocus","innerHTML","$showHideToggle","$showHideToggleFocus","$showHideText","$showHideIcon","getButtonPunctuationEl","parentNode","$summarySpan","$summarySpanFocus","replaceChild","removeChild","$fragment","target","Element","closest","expanded","storeState","nowExpanded","$content","newButtonText","textContent","ariaLabelParts","push","ariaLabelMessage","removeAttribute","remove","toString","toggle","rememberExpanded","contentId","getAttribute","contentState","sessionStorage","setItem","getItem","$punctuationEl","moduleName","freeze","hideAllSections","hideSection","hideSectionAriaLabel","showAllSections","showSection","showSectionAriaLabel","testString","result","removeItem","exception","Button","debounceFormSubmitTimer","handleKeyDown","debounce","$target","keyCode","preventDefault","click","preventDoubleClick","setTimeout","DEBOUNCE_TIMEOUT_IN_SECONDS","closestAttributeValue","$element","attributeName","$closestElementWithAttribute","CharacterCount","_ref","_this$config$maxwords","$textarea","$visibleCountMessage","$screenReaderCountMessage","lastInputTimestamp","lastInputValue","valueChecker","maxLength","HTMLTextAreaElement","HTMLInputElement","datasetConfig","configOverrides","maxlength","maxwords","errors","schema","validationErrors","conditions","required","errorMessage","every","validateConfig","Infinity","textareaDescriptionId","$textareaDescription","getElementById","insertAdjacentElement","className","bindChangeEvents","updateCountMessage","handleKeyUp","handleFocus","handleBlur","updateVisibleCountMessage","Date","now","setInterval","updateIfValueChanged","clearInterval","updateScreenReaderCountMessage","isError","isOverThreshold","getCountMessage","text","_text$match","remainingNumber","countType","formatCountMessage","translationKeySuffix","threshold","currentLength","charactersUnderLimit","one","other","charactersAtLimit","charactersOverLimit","wordsUnderLimit","wordsAtLimit","wordsOverLimit","textareaDescription","anyOf","Checkboxes","$inputs","$input","targetId","syncAllConditionalReveals","handleClick","syncConditionalRevealWithInputState","inputIsChecked","checked","unCheckAllInputsExcept","$inputWithSameName","form","unCheckExclusiveInputs","$exclusiveInput","$clickedInput","type","ErrorSummary","setFocus","disableAutoFocus","focus","focusTarget","HTMLAnchorElement","inputId","href","$legendOrLabel","getAssociatedLegendOrLabel","scrollIntoView","preventScroll","_document$querySelect","$fieldset","$legends","getElementsByTagName","$candidateLegend","legendTop","getBoundingClientRect","top","inputRect","height","innerHeight","ExitThisPage","$skiplinkButton","$updateSpan","$indicatorContainer","$overlay","keypressCounter","lastKeyWasModified","timeoutTime","keypressTimeoutId","timeoutMessageId","buildIndicator","initUpdateSpan","initButtonClickHandler","handleKeypress","bind","govukFrontendExitThisPageKeypress","resetPage","$indicator","updateIndicator","exitPage","location","which","resetKeypressTimer","clearTimeout","setKeypressTimer","shiftKey","activated","timedOut","pressTwoMoreTimes","pressOneMoreTime","Header","$menuButton","$menu","menuIsOpen","mql","menuId","matchMedia","syncState","addListener","handleMenuButtonClick","matches","NotificationBanner","Radios","$allInputs","$clickedInputForm","$clickedInputName","hasSameFormOwner","SkipLink","_this$$module$getAttr","$linkedElement","linkedElementListener","hash","URL","error","origin","pathname","linkedElementId","focusLinkedElement","removeFocusProperties","Tabs","$tabs","$tabList","$tabListItems","keys","left","right","up","down","jsHiddenClass","changingHash","boundTabClick","boundTabKeydown","boundOnHashChange","onTabClick","onTabKeydown","onHashChange","setupResponsiveChecks","checkMode","_this$mql","setup","teardown","_this$getTab","$item","$tab","setAttributes","hideTab","$activeTab","getTab","showTab","removeEventListener","unsetAttributes","$tabWithHash","$previousTab","getCurrentTab","unhighlightTab","hidePanel","highlightTab","showPanel","panelId","$panel","getPanel","$currentTab","$nextTab","currentTarget","createHistoryEntry","activatePreviousTab","activateNextTab","parentElement","$nextTabListItem","nextElementSibling","$previousTabListItem","previousElementSibling","initAll","_config$scope","log","components","accordion","button","characterCount","errorSummary","exitThisPage","notificationBanner","scope","Component"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"moduk-frontend.umd.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAe,MAAID,IAEnBD,EAAY,MAAIC,GACjB,CATD,CASGK,MAAM,WACT,+BCTA,IAAIC,EAAsB,CCA1BA,EAAwB,SAASL,EAASM,GACzC,IAAI,IAAIC,KAAOD,EACXD,EAAoBG,EAAEF,EAAYC,KAASF,EAAoBG,EAAER,EAASO,IAC5EE,OAAOC,eAAeV,EAASO,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAG3E,ECPAF,EAAwB,SAASQ,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,ECCtGT,EAAwB,SAASL,GACX,oBAAXkB,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeV,EAASkB,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeV,EAAS,aAAc,CAAEoB,OAAO,GACvD,gdCNA,MAAMC,EAAU,QCAhB,SAASC,EAAgBF,EAAOG,GAC9B,MAAMC,EAAeJ,EAAQA,EAAMK,OAAS,GAC5C,IAAIC,EACAC,EAAyB,MAAZJ,OAAmB,EAASA,EAASK,KAStD,OARKD,IACC,CAAC,OAAQ,SAASE,SAASL,KAC7BG,EAAa,WAEXH,EAAaM,OAAS,GAAKC,SAASC,OAAOR,MAC7CG,EAAa,WAGTA,GACN,IAAK,UACHD,EAA0B,SAAjBF,EACT,MACF,IAAK,SACHE,EAASM,OAAOR,GAChB,MACF,QACEE,EAASN,EAEb,OAAOM,CACT,CCrBA,SAASO,KAAgBC,GACvB,MAAMC,EAAwB,CAAC,EAC/B,IAAK,MAAMC,KAAgBF,EACzB,IAAK,MAAM3B,KAAOE,OAAO4B,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ACPhU,QAAQqX,IAAIrD,EACd,IACA,GAEN,QDyPAK,EAAKtM,WAAa","sources":["webpack://MODUK/webpack/universalModuleDefinition","webpack://MODUK/webpack/bootstrap","webpack://MODUK/webpack/runtime/define property getters","webpack://MODUK/webpack/runtime/hasOwnProperty shorthand","webpack://MODUK/webpack/runtime/make namespace object","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/govuk-frontend-version.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/normalise-string.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/index.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/normalise-dataset.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/errors/index.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/govuk-frontend-component.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/i18n.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/accordion/accordion.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/button/button.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/common/closest-attribute-value.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/character-count/character-count.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/checkboxes/checkboxes.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/exit-this-page/exit-this-page.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/header/header.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/notification-banner/notification-banner.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/password-input/password-input.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs","webpack://MODUK/./node_modules/govuk-frontend/dist/govuk/all.mjs"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MODUK\"] = factory();\n\telse\n\t\troot[\"MODUK\"] = factory();\n})(self, function() {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(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 = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","const version = '5.3.1';\n\nexport { version };\n//# sourceMappingURL=govuk-frontend-version.mjs.map\n","function normaliseString(value, property) {\n const trimmedValue = value ? value.trim() : '';\n let output;\n let outputType = property == null ? void 0 : property.type;\n if (!outputType) {\n if (['true', 'false'].includes(trimmedValue)) {\n outputType = 'boolean';\n }\n if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {\n outputType = 'number';\n }\n }\n switch (outputType) {\n case 'boolean':\n output = trimmedValue === 'true';\n break;\n case 'number':\n output = Number(trimmedValue);\n break;\n default:\n output = value;\n }\n return output;\n}\n\n/**\n * @typedef {import('./index.mjs').SchemaProperty} SchemaProperty\n */\n\nexport { normaliseString };\n//# sourceMappingURL=normalise-string.mjs.map\n","import { normaliseString } from './normalise-string.mjs';\n\nfunction mergeConfigs(...configObjects) {\n const formattedConfigObject = {};\n for (const configObject of configObjects) {\n for (const key of Object.keys(configObject)) {\n const option = formattedConfigObject[key];\n const override = configObject[key];\n if (isObject(option) && isObject(override)) {\n formattedConfigObject[key] = mergeConfigs(option, override);\n } else {\n formattedConfigObject[key] = override;\n }\n }\n }\n return formattedConfigObject;\n}\nfunction extractConfigByNamespace(Component, dataset, namespace) {\n const property = Component.schema.properties[namespace];\n if ((property == null ? void 0 : property.type) !== 'object') {\n return;\n }\n const newObject = {\n [namespace]: ({})\n };\n for (const [key, value] of Object.entries(dataset)) {\n let current = newObject;\n const keyParts = key.split('.');\n for (const [index, name] of keyParts.entries()) {\n if (typeof current === 'object') {\n if (index < keyParts.length - 1) {\n if (!isObject(current[name])) {\n current[name] = {};\n }\n current = current[name];\n } else if (key !== namespace) {\n current[name] = normaliseString(value);\n }\n }\n }\n }\n return newObject[namespace];\n}\nfunction getFragmentFromUrl(url) {\n if (!url.includes('#')) {\n return undefined;\n }\n return url.split('#').pop();\n}\nfunction getBreakpoint(name) {\n const property = `--govuk-frontend-breakpoint-${name}`;\n const value = window.getComputedStyle(document.documentElement).getPropertyValue(property);\n return {\n property,\n value: value || undefined\n };\n}\nfunction setFocus($element, options = {}) {\n var _options$onBeforeFocu;\n const isFocusable = $element.getAttribute('tabindex');\n if (!isFocusable) {\n $element.setAttribute('tabindex', '-1');\n }\n function onFocus() {\n $element.addEventListener('blur', onBlur, {\n once: true\n });\n }\n function onBlur() {\n var _options$onBlur;\n (_options$onBlur = options.onBlur) == null || _options$onBlur.call($element);\n if (!isFocusable) {\n $element.removeAttribute('tabindex');\n }\n }\n $element.addEventListener('focus', onFocus, {\n once: true\n });\n (_options$onBeforeFocu = options.onBeforeFocus) == null || _options$onBeforeFocu.call($element);\n $element.focus();\n}\nfunction isSupported($scope = document.body) {\n if (!$scope) {\n return false;\n }\n return $scope.classList.contains('govuk-frontend-supported');\n}\nfunction validateConfig(schema, config) {\n const validationErrors = [];\n for (const [name, conditions] of Object.entries(schema)) {\n const errors = [];\n if (Array.isArray(conditions)) {\n for (const {\n required,\n errorMessage\n } of conditions) {\n if (!required.every(key => !!config[key])) {\n errors.push(errorMessage);\n }\n }\n if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {\n validationErrors.push(...errors);\n }\n }\n }\n return validationErrors;\n}\nfunction isArray(option) {\n return Array.isArray(option);\n}\nfunction isObject(option) {\n return !!option && typeof option === 'object' && !isArray(option);\n}\n\n/**\n * Schema for component config\n *\n * @typedef {object} Schema\n * @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties\n * @property {SchemaCondition[]} [anyOf] - List of schema conditions\n */\n\n/**\n * Schema property for component config\n *\n * @typedef {object} SchemaProperty\n * @property {'string' | 'boolean' | 'number' | 'object'} type - Property type\n */\n\n/**\n * Schema condition for component config\n *\n * @typedef {object} SchemaCondition\n * @property {string[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n\nexport { extractConfigByNamespace, getBreakpoint, getFragmentFromUrl, isSupported, mergeConfigs, setFocus, validateConfig };\n//# sourceMappingURL=index.mjs.map\n","import { extractConfigByNamespace } from './index.mjs';\nimport { normaliseString } from './normalise-string.mjs';\n\nfunction normaliseDataset(Component, dataset) {\n const out = {};\n for (const [field, property] of Object.entries(Component.schema.properties)) {\n if (field in dataset) {\n out[field] = normaliseString(dataset[field], property);\n }\n if ((property == null ? void 0 : property.type) === 'object') {\n out[field] = extractConfigByNamespace(Component, dataset, field);\n }\n }\n return out;\n}\n\nexport { normaliseDataset };\n//# sourceMappingURL=normalise-dataset.mjs.map\n","class GOVUKFrontendError extends Error {\n constructor(...args) {\n super(...args);\n this.name = 'GOVUKFrontendError';\n }\n}\nclass SupportError extends GOVUKFrontendError {\n /**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * @param {HTMLElement | null} [$scope] - HTML element `<body>` checked for browser support\n */\n constructor($scope = document.body) {\n const supportMessage = 'noModule' in HTMLScriptElement.prototype ? 'GOV.UK Frontend initialised without `<body class=\"govuk-frontend-supported\">` from template `<script>` snippet' : 'GOV.UK Frontend is not supported in this browser';\n super($scope ? supportMessage : 'GOV.UK Frontend initialised without `<script type=\"module\">`');\n this.name = 'SupportError';\n }\n}\nclass ConfigError extends GOVUKFrontendError {\n constructor(...args) {\n super(...args);\n this.name = 'ConfigError';\n }\n}\nclass ElementError extends GOVUKFrontendError {\n constructor(messageOrOptions) {\n let message = typeof messageOrOptions === 'string' ? messageOrOptions : '';\n if (typeof messageOrOptions === 'object') {\n const {\n componentName,\n identifier,\n element,\n expectedType\n } = messageOrOptions;\n message = `${componentName}: ${identifier}`;\n message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';\n }\n super(message);\n this.name = 'ElementError';\n }\n}\n\nexport { ConfigError, ElementError, GOVUKFrontendError, SupportError };\n//# sourceMappingURL=index.mjs.map\n","import { isSupported } from './common/index.mjs';\nimport { SupportError } from './errors/index.mjs';\n\nclass GOVUKFrontendComponent {\n constructor() {\n this.checkSupport();\n }\n checkSupport() {\n if (!isSupported()) {\n throw new SupportError();\n }\n }\n}\n\nexport { GOVUKFrontendComponent };\n//# sourceMappingURL=govuk-frontend-component.mjs.map\n","class I18n {\n constructor(translations = {}, config = {}) {\n var _config$locale;\n this.translations = void 0;\n this.locale = void 0;\n this.translations = translations;\n this.locale = (_config$locale = config.locale) != null ? _config$locale : document.documentElement.lang || 'en';\n }\n t(lookupKey, options) {\n if (!lookupKey) {\n throw new Error('i18n: lookup key missing');\n }\n let translation = this.translations[lookupKey];\n if (typeof (options == null ? void 0 : options.count) === 'number' && typeof translation === 'object') {\n const translationPluralForm = translation[this.getPluralSuffix(lookupKey, options.count)];\n if (translationPluralForm) {\n translation = translationPluralForm;\n }\n }\n if (typeof translation === 'string') {\n if (translation.match(/%{(.\\S+)}/)) {\n if (!options) {\n throw new Error('i18n: cannot replace placeholders in string if no option data provided');\n }\n return this.replacePlaceholders(translation, options);\n }\n return translation;\n }\n return lookupKey;\n }\n replacePlaceholders(translationString, options) {\n const formatter = Intl.NumberFormat.supportedLocalesOf(this.locale).length ? new Intl.NumberFormat(this.locale) : undefined;\n return translationString.replace(/%{(.\\S+)}/g, function (placeholderWithBraces, placeholderKey) {\n if (Object.prototype.hasOwnProperty.call(options, placeholderKey)) {\n const placeholderValue = options[placeholderKey];\n if (placeholderValue === false || typeof placeholderValue !== 'number' && typeof placeholderValue !== 'string') {\n return '';\n }\n if (typeof placeholderValue === 'number') {\n return formatter ? formatter.format(placeholderValue) : `${placeholderValue}`;\n }\n return placeholderValue;\n }\n throw new Error(`i18n: no data found to replace ${placeholderWithBraces} placeholder in string`);\n });\n }\n hasIntlPluralRulesSupport() {\n return Boolean('PluralRules' in window.Intl && Intl.PluralRules.supportedLocalesOf(this.locale).length);\n }\n getPluralSuffix(lookupKey, count) {\n count = Number(count);\n if (!isFinite(count)) {\n return 'other';\n }\n const translation = this.translations[lookupKey];\n const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : this.selectPluralFormUsingFallbackRules(count);\n if (typeof translation === 'object') {\n if (preferredForm in translation) {\n return preferredForm;\n } else if ('other' in translation) {\n console.warn(`i18n: Missing plural form \".${preferredForm}\" for \"${this.locale}\" locale. Falling back to \".other\".`);\n return 'other';\n }\n }\n throw new Error(`i18n: Plural form \".other\" is required for \"${this.locale}\" locale`);\n }\n selectPluralFormUsingFallbackRules(count) {\n count = Math.abs(Math.floor(count));\n const ruleset = this.getPluralRulesForLocale();\n if (ruleset) {\n return I18n.pluralRules[ruleset](count);\n }\n return 'other';\n }\n getPluralRulesForLocale() {\n const localeShort = this.locale.split('-')[0];\n for (const pluralRule in I18n.pluralRulesMap) {\n const languages = I18n.pluralRulesMap[pluralRule];\n if (languages.includes(this.locale) || languages.includes(localeShort)) {\n return pluralRule;\n }\n }\n }\n}\nI18n.pluralRulesMap = {\n arabic: ['ar'],\n chinese: ['my', 'zh', 'id', 'ja', 'jv', 'ko', 'ms', 'th', 'vi'],\n french: ['hy', 'bn', 'fr', 'gu', 'hi', 'fa', 'pa', 'zu'],\n german: ['af', 'sq', 'az', 'eu', 'bg', 'ca', 'da', 'nl', 'en', 'et', 'fi', 'ka', 'de', 'el', 'hu', 'lb', 'no', 'so', 'sw', 'sv', 'ta', 'te', 'tr', 'ur'],\n irish: ['ga'],\n russian: ['ru', 'uk'],\n scottish: ['gd'],\n spanish: ['pt-PT', 'it', 'es'],\n welsh: ['cy']\n};\nI18n.pluralRules = {\n arabic(n) {\n if (n === 0) {\n return 'zero';\n }\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n % 100 >= 3 && n % 100 <= 10) {\n return 'few';\n }\n if (n % 100 >= 11 && n % 100 <= 99) {\n return 'many';\n }\n return 'other';\n },\n chinese() {\n return 'other';\n },\n french(n) {\n return n === 0 || n === 1 ? 'one' : 'other';\n },\n german(n) {\n return n === 1 ? 'one' : 'other';\n },\n irish(n) {\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n >= 3 && n <= 6) {\n return 'few';\n }\n if (n >= 7 && n <= 10) {\n return 'many';\n }\n return 'other';\n },\n russian(n) {\n const lastTwo = n % 100;\n const last = lastTwo % 10;\n if (last === 1 && lastTwo !== 11) {\n return 'one';\n }\n if (last >= 2 && last <= 4 && !(lastTwo >= 12 && lastTwo <= 14)) {\n return 'few';\n }\n if (last === 0 || last >= 5 && last <= 9 || lastTwo >= 11 && lastTwo <= 14) {\n return 'many';\n }\n return 'other';\n },\n scottish(n) {\n if (n === 1 || n === 11) {\n return 'one';\n }\n if (n === 2 || n === 12) {\n return 'two';\n }\n if (n >= 3 && n <= 10 || n >= 13 && n <= 19) {\n return 'few';\n }\n return 'other';\n },\n spanish(n) {\n if (n === 1) {\n return 'one';\n }\n if (n % 1000000 === 0 && n !== 0) {\n return 'many';\n }\n return 'other';\n },\n welsh(n) {\n if (n === 0) {\n return 'zero';\n }\n if (n === 1) {\n return 'one';\n }\n if (n === 2) {\n return 'two';\n }\n if (n === 3) {\n return 'few';\n }\n if (n === 6) {\n return 'many';\n }\n return 'other';\n }\n};\n\nexport { I18n };\n//# sourceMappingURL=i18n.mjs.map\n","import { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Accordion component\n *\n * This allows a collection of sections to be collapsed by default, showing only\n * their headers. Sections can be expanded or collapsed individually by clicking\n * their headers. A \"Show all sections\" button is also added to the top of the\n * accordion, which switches to \"Hide all sections\" when all the sections are\n * expanded.\n *\n * The state of each section is saved to the DOM via the `aria-expanded`\n * attribute, which also provides accessibility.\n *\n * @preserve\n */\nclass Accordion extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for accordion\n * @param {AccordionConfig} [config] - Accordion config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.i18n = void 0;\n this.controlsClass = 'govuk-accordion__controls';\n this.showAllClass = 'govuk-accordion__show-all';\n this.showAllTextClass = 'govuk-accordion__show-all-text';\n this.sectionClass = 'govuk-accordion__section';\n this.sectionExpandedClass = 'govuk-accordion__section--expanded';\n this.sectionButtonClass = 'govuk-accordion__section-button';\n this.sectionHeaderClass = 'govuk-accordion__section-header';\n this.sectionHeadingClass = 'govuk-accordion__section-heading';\n this.sectionHeadingDividerClass = 'govuk-accordion__section-heading-divider';\n this.sectionHeadingTextClass = 'govuk-accordion__section-heading-text';\n this.sectionHeadingTextFocusClass = 'govuk-accordion__section-heading-text-focus';\n this.sectionShowHideToggleClass = 'govuk-accordion__section-toggle';\n this.sectionShowHideToggleFocusClass = 'govuk-accordion__section-toggle-focus';\n this.sectionShowHideTextClass = 'govuk-accordion__section-toggle-text';\n this.upChevronIconClass = 'govuk-accordion-nav__chevron';\n this.downChevronIconClass = 'govuk-accordion-nav__chevron--down';\n this.sectionSummaryClass = 'govuk-accordion__section-summary';\n this.sectionSummaryFocusClass = 'govuk-accordion__section-summary-focus';\n this.sectionContentClass = 'govuk-accordion__section-content';\n this.$sections = void 0;\n this.browserSupportsSessionStorage = false;\n this.$showAllButton = null;\n this.$showAllIcon = null;\n this.$showAllText = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Accordion',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(Accordion.defaults, config, normaliseDataset(Accordion, $module.dataset));\n this.i18n = new I18n(this.config.i18n);\n const $sections = this.$module.querySelectorAll(`.${this.sectionClass}`);\n if (!$sections.length) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Sections (\\`<div class=\"${this.sectionClass}\">\\`)`\n });\n }\n this.$sections = $sections;\n this.browserSupportsSessionStorage = helper.checkForSessionStorage();\n this.initControls();\n this.initSectionHeaders();\n const areAllSectionsOpen = this.checkIfAllSectionsOpen();\n this.updateShowAllButton(areAllSectionsOpen);\n }\n initControls() {\n this.$showAllButton = document.createElement('button');\n this.$showAllButton.setAttribute('type', 'button');\n this.$showAllButton.setAttribute('class', this.showAllClass);\n this.$showAllButton.setAttribute('aria-expanded', 'false');\n this.$showAllIcon = document.createElement('span');\n this.$showAllIcon.classList.add(this.upChevronIconClass);\n this.$showAllButton.appendChild(this.$showAllIcon);\n const $accordionControls = document.createElement('div');\n $accordionControls.setAttribute('class', this.controlsClass);\n $accordionControls.appendChild(this.$showAllButton);\n this.$module.insertBefore($accordionControls, this.$module.firstChild);\n this.$showAllText = document.createElement('span');\n this.$showAllText.classList.add(this.showAllTextClass);\n this.$showAllButton.appendChild(this.$showAllText);\n this.$showAllButton.addEventListener('click', () => this.onShowOrHideAllToggle());\n if ('onbeforematch' in document) {\n document.addEventListener('beforematch', event => this.onBeforeMatch(event));\n }\n }\n initSectionHeaders() {\n this.$sections.forEach(($section, i) => {\n const $header = $section.querySelector(`.${this.sectionHeaderClass}`);\n if (!$header) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section headers (\\`<div class=\"${this.sectionHeaderClass}\">\\`)`\n });\n }\n this.constructHeaderMarkup($header, i);\n this.setExpanded(this.isExpanded($section), $section);\n $header.addEventListener('click', () => this.onSectionToggle($section));\n this.setInitialState($section);\n });\n }\n constructHeaderMarkup($header, index) {\n const $span = $header.querySelector(`.${this.sectionButtonClass}`);\n const $heading = $header.querySelector(`.${this.sectionHeadingClass}`);\n const $summary = $header.querySelector(`.${this.sectionSummaryClass}`);\n if (!$heading) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section heading (\\`.${this.sectionHeadingClass}\\`)`\n });\n }\n if (!$span) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section button placeholder (\\`<span class=\"${this.sectionButtonClass}\">\\`)`\n });\n }\n const $button = document.createElement('button');\n $button.setAttribute('type', 'button');\n $button.setAttribute('aria-controls', `${this.$module.id}-content-${index + 1}`);\n for (const attr of Array.from($span.attributes)) {\n if (attr.nodeName !== 'id') {\n $button.setAttribute(attr.nodeName, `${attr.nodeValue}`);\n }\n }\n const $headingText = document.createElement('span');\n $headingText.classList.add(this.sectionHeadingTextClass);\n $headingText.id = $span.id;\n const $headingTextFocus = document.createElement('span');\n $headingTextFocus.classList.add(this.sectionHeadingTextFocusClass);\n $headingText.appendChild($headingTextFocus);\n $headingTextFocus.innerHTML = $span.innerHTML;\n const $showHideToggle = document.createElement('span');\n $showHideToggle.classList.add(this.sectionShowHideToggleClass);\n $showHideToggle.setAttribute('data-nosnippet', '');\n const $showHideToggleFocus = document.createElement('span');\n $showHideToggleFocus.classList.add(this.sectionShowHideToggleFocusClass);\n $showHideToggle.appendChild($showHideToggleFocus);\n const $showHideText = document.createElement('span');\n const $showHideIcon = document.createElement('span');\n $showHideIcon.classList.add(this.upChevronIconClass);\n $showHideToggleFocus.appendChild($showHideIcon);\n $showHideText.classList.add(this.sectionShowHideTextClass);\n $showHideToggleFocus.appendChild($showHideText);\n $button.appendChild($headingText);\n $button.appendChild(this.getButtonPunctuationEl());\n if ($summary != null && $summary.parentNode) {\n const $summarySpan = document.createElement('span');\n const $summarySpanFocus = document.createElement('span');\n $summarySpanFocus.classList.add(this.sectionSummaryFocusClass);\n $summarySpan.appendChild($summarySpanFocus);\n for (const attr of Array.from($summary.attributes)) {\n $summarySpan.setAttribute(attr.nodeName, `${attr.nodeValue}`);\n }\n $summarySpanFocus.innerHTML = $summary.innerHTML;\n $summary.parentNode.replaceChild($summarySpan, $summary);\n $button.appendChild($summarySpan);\n $button.appendChild(this.getButtonPunctuationEl());\n }\n $button.appendChild($showHideToggle);\n $heading.removeChild($span);\n $heading.appendChild($button);\n }\n onBeforeMatch(event) {\n const $fragment = event.target;\n if (!($fragment instanceof Element)) {\n return;\n }\n const $section = $fragment.closest(`.${this.sectionClass}`);\n if ($section) {\n this.setExpanded(true, $section);\n }\n }\n onSectionToggle($section) {\n const expanded = this.isExpanded($section);\n this.setExpanded(!expanded, $section);\n this.storeState($section);\n }\n onShowOrHideAllToggle() {\n const nowExpanded = !this.checkIfAllSectionsOpen();\n this.$sections.forEach($section => {\n this.setExpanded(nowExpanded, $section);\n this.storeState($section);\n });\n this.updateShowAllButton(nowExpanded);\n }\n setExpanded(expanded, $section) {\n const $showHideIcon = $section.querySelector(`.${this.upChevronIconClass}`);\n const $showHideText = $section.querySelector(`.${this.sectionShowHideTextClass}`);\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n const $content = $section.querySelector(`.${this.sectionContentClass}`);\n if (!$content) {\n throw new ElementError({\n componentName: 'Accordion',\n identifier: `Section content (\\`<div class=\"${this.sectionContentClass}\">\\`)`\n });\n }\n if (!$showHideIcon || !$showHideText || !$button) {\n return;\n }\n const newButtonText = expanded ? this.i18n.t('hideSection') : this.i18n.t('showSection');\n $showHideText.textContent = newButtonText;\n $button.setAttribute('aria-expanded', `${expanded}`);\n const ariaLabelParts = [];\n const $headingText = $section.querySelector(`.${this.sectionHeadingTextClass}`);\n if ($headingText) {\n ariaLabelParts.push(`${$headingText.textContent}`.trim());\n }\n const $summary = $section.querySelector(`.${this.sectionSummaryClass}`);\n if ($summary) {\n ariaLabelParts.push(`${$summary.textContent}`.trim());\n }\n const ariaLabelMessage = expanded ? this.i18n.t('hideSectionAriaLabel') : this.i18n.t('showSectionAriaLabel');\n ariaLabelParts.push(ariaLabelMessage);\n $button.setAttribute('aria-label', ariaLabelParts.join(' , '));\n if (expanded) {\n $content.removeAttribute('hidden');\n $section.classList.add(this.sectionExpandedClass);\n $showHideIcon.classList.remove(this.downChevronIconClass);\n } else {\n $content.setAttribute('hidden', 'until-found');\n $section.classList.remove(this.sectionExpandedClass);\n $showHideIcon.classList.add(this.downChevronIconClass);\n }\n const areAllSectionsOpen = this.checkIfAllSectionsOpen();\n this.updateShowAllButton(areAllSectionsOpen);\n }\n isExpanded($section) {\n return $section.classList.contains(this.sectionExpandedClass);\n }\n checkIfAllSectionsOpen() {\n const sectionsCount = this.$sections.length;\n const expandedSectionCount = this.$module.querySelectorAll(`.${this.sectionExpandedClass}`).length;\n const areAllSectionsOpen = sectionsCount === expandedSectionCount;\n return areAllSectionsOpen;\n }\n updateShowAllButton(expanded) {\n if (!this.$showAllButton || !this.$showAllText || !this.$showAllIcon) {\n return;\n }\n this.$showAllButton.setAttribute('aria-expanded', expanded.toString());\n this.$showAllText.textContent = expanded ? this.i18n.t('hideAllSections') : this.i18n.t('showAllSections');\n this.$showAllIcon.classList.toggle(this.downChevronIconClass, !expanded);\n }\n storeState($section) {\n if (this.browserSupportsSessionStorage && this.config.rememberExpanded) {\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n if ($button) {\n const contentId = $button.getAttribute('aria-controls');\n const contentState = $button.getAttribute('aria-expanded');\n if (contentId && contentState) {\n window.sessionStorage.setItem(contentId, contentState);\n }\n }\n }\n }\n setInitialState($section) {\n if (this.browserSupportsSessionStorage && this.config.rememberExpanded) {\n const $button = $section.querySelector(`.${this.sectionButtonClass}`);\n if ($button) {\n const contentId = $button.getAttribute('aria-controls');\n const contentState = contentId ? window.sessionStorage.getItem(contentId) : null;\n if (contentState !== null) {\n this.setExpanded(contentState === 'true', $section);\n }\n }\n }\n }\n getButtonPunctuationEl() {\n const $punctuationEl = document.createElement('span');\n $punctuationEl.classList.add('govuk-visually-hidden', this.sectionHeadingDividerClass);\n $punctuationEl.innerHTML = ', ';\n return $punctuationEl;\n }\n}\nAccordion.moduleName = 'govuk-accordion';\nAccordion.defaults = Object.freeze({\n i18n: {\n hideAllSections: 'Hide all sections',\n hideSection: 'Hide',\n hideSectionAriaLabel: 'Hide this section',\n showAllSections: 'Show all sections',\n showSection: 'Show',\n showSectionAriaLabel: 'Show this section'\n },\n rememberExpanded: true\n});\nAccordion.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n },\n rememberExpanded: {\n type: 'boolean'\n }\n }\n});\nconst helper = {\n /**\n * Check for `window.sessionStorage`, and that it actually works.\n *\n * @returns {boolean} True if session storage is available\n */\n checkForSessionStorage: function () {\n const testString = 'this is the test string';\n let result;\n try {\n window.sessionStorage.setItem(testString, testString);\n result = window.sessionStorage.getItem(testString) === testString.toString();\n window.sessionStorage.removeItem(testString);\n return result;\n } catch (exception) {\n return false;\n }\n }\n};\n\n/**\n * Accordion config\n *\n * @see {@link Accordion.defaults}\n * @typedef {object} AccordionConfig\n * @property {AccordionTranslations} [i18n=Accordion.defaults.i18n] - Accordion translations\n * @property {boolean} [rememberExpanded] - Whether the expanded and collapsed\n * state of each section is remembered and restored when navigating.\n */\n\n/**\n * Accordion translations\n *\n * @see {@link Accordion.defaults.i18n}\n * @typedef {object} AccordionTranslations\n *\n * Messages used by the component for the labels of its buttons. This includes\n * the visible text shown on screen, and text to help assistive technology users\n * for the buttons toggling each section.\n * @property {string} [hideAllSections] - The text content for the 'Hide all\n * sections' button, used when at least one section is expanded.\n * @property {string} [hideSection] - The text content for the 'Hide'\n * button, used when a section is expanded.\n * @property {string} [hideSectionAriaLabel] - The text content appended to the\n * 'Hide' button's accessible name when a section is expanded.\n * @property {string} [showAllSections] - The text content for the 'Show all\n * sections' button, used when all sections are collapsed.\n * @property {string} [showSection] - The text content for the 'Show'\n * button, used when a section is collapsed.\n * @property {string} [showSectionAriaLabel] - The text content appended to the\n * 'Show' button's accessible name when a section is expanded.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\n\nexport { Accordion };\n//# sourceMappingURL=accordion.mjs.map\n","import { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\nconst DEBOUNCE_TIMEOUT_IN_SECONDS = 1;\n\n/**\n * JavaScript enhancements for the Button component\n *\n * @preserve\n */\nclass Button extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for button\n * @param {ButtonConfig} [config] - Button config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.debounceFormSubmitTimer = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Button',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(Button.defaults, config, normaliseDataset(Button, $module.dataset));\n this.$module.addEventListener('keydown', event => this.handleKeyDown(event));\n this.$module.addEventListener('click', event => this.debounce(event));\n }\n handleKeyDown(event) {\n const $target = event.target;\n if (event.key !== ' ') {\n return;\n }\n if ($target instanceof HTMLElement && $target.getAttribute('role') === 'button') {\n event.preventDefault();\n $target.click();\n }\n }\n debounce(event) {\n if (!this.config.preventDoubleClick) {\n return;\n }\n if (this.debounceFormSubmitTimer) {\n event.preventDefault();\n return false;\n }\n this.debounceFormSubmitTimer = window.setTimeout(() => {\n this.debounceFormSubmitTimer = null;\n }, DEBOUNCE_TIMEOUT_IN_SECONDS * 1000);\n }\n}\n\n/**\n * Button config\n *\n * @typedef {object} ButtonConfig\n * @property {boolean} [preventDoubleClick=false] - Prevent accidental double\n * clicks on submit buttons from submitting forms multiple times.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\nButton.moduleName = 'govuk-button';\nButton.defaults = Object.freeze({\n preventDoubleClick: false\n});\nButton.schema = Object.freeze({\n properties: {\n preventDoubleClick: {\n type: 'boolean'\n }\n }\n});\n\nexport { Button };\n//# sourceMappingURL=button.mjs.map\n","function closestAttributeValue($element, attributeName) {\n const $closestElementWithAttribute = $element.closest(`[${attributeName}]`);\n return $closestElementWithAttribute ? $closestElementWithAttribute.getAttribute(attributeName) : null;\n}\n\nexport { closestAttributeValue };\n//# sourceMappingURL=closest-attribute-value.mjs.map\n","import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';\nimport { mergeConfigs, validateConfig } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError, ConfigError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Character count component\n *\n * Tracks the number of characters or words in the `.govuk-js-character-count`\n * `<textarea>` inside the element. Displays a message with the remaining number\n * of characters/words available, or the number of characters/words in excess.\n *\n * You can configure the message to only appear after a certain percentage\n * of the available characters/words has been entered.\n *\n * @preserve\n */\nclass CharacterCount extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for character count\n * @param {CharacterCountConfig} [config] - Character count config\n */\n constructor($module, config = {}) {\n var _ref, _this$config$maxwords;\n super();\n this.$module = void 0;\n this.$textarea = void 0;\n this.$visibleCountMessage = void 0;\n this.$screenReaderCountMessage = void 0;\n this.lastInputTimestamp = null;\n this.lastInputValue = '';\n this.valueChecker = null;\n this.config = void 0;\n this.i18n = void 0;\n this.maxLength = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Character count',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $textarea = $module.querySelector('.govuk-js-character-count');\n if (!($textarea instanceof HTMLTextAreaElement || $textarea instanceof HTMLInputElement)) {\n throw new ElementError({\n componentName: 'Character count',\n element: $textarea,\n expectedType: 'HTMLTextareaElement or HTMLInputElement',\n identifier: 'Form field (`.govuk-js-character-count`)'\n });\n }\n const datasetConfig = normaliseDataset(CharacterCount, $module.dataset);\n let configOverrides = {};\n if ('maxwords' in datasetConfig || 'maxlength' in datasetConfig) {\n configOverrides = {\n maxlength: undefined,\n maxwords: undefined\n };\n }\n this.config = mergeConfigs(CharacterCount.defaults, config, configOverrides, datasetConfig);\n const errors = validateConfig(CharacterCount.schema, this.config);\n if (errors[0]) {\n throw new ConfigError(`Character count: ${errors[0]}`);\n }\n this.i18n = new I18n(this.config.i18n, {\n locale: closestAttributeValue($module, 'lang')\n });\n this.maxLength = (_ref = (_this$config$maxwords = this.config.maxwords) != null ? _this$config$maxwords : this.config.maxlength) != null ? _ref : Infinity;\n this.$module = $module;\n this.$textarea = $textarea;\n const textareaDescriptionId = `${this.$textarea.id}-info`;\n const $textareaDescription = document.getElementById(textareaDescriptionId);\n if (!$textareaDescription) {\n throw new ElementError({\n componentName: 'Character count',\n element: $textareaDescription,\n identifier: `Count message (\\`id=\"${textareaDescriptionId}\"\\`)`\n });\n }\n if (`${$textareaDescription.textContent}`.match(/^\\s*$/)) {\n $textareaDescription.textContent = this.i18n.t('textareaDescription', {\n count: this.maxLength\n });\n }\n this.$textarea.insertAdjacentElement('afterend', $textareaDescription);\n const $screenReaderCountMessage = document.createElement('div');\n $screenReaderCountMessage.className = 'govuk-character-count__sr-status govuk-visually-hidden';\n $screenReaderCountMessage.setAttribute('aria-live', 'polite');\n this.$screenReaderCountMessage = $screenReaderCountMessage;\n $textareaDescription.insertAdjacentElement('afterend', $screenReaderCountMessage);\n const $visibleCountMessage = document.createElement('div');\n $visibleCountMessage.className = $textareaDescription.className;\n $visibleCountMessage.classList.add('govuk-character-count__status');\n $visibleCountMessage.setAttribute('aria-hidden', 'true');\n this.$visibleCountMessage = $visibleCountMessage;\n $textareaDescription.insertAdjacentElement('afterend', $visibleCountMessage);\n $textareaDescription.classList.add('govuk-visually-hidden');\n this.$textarea.removeAttribute('maxlength');\n this.bindChangeEvents();\n window.addEventListener('pageshow', () => this.updateCountMessage());\n this.updateCountMessage();\n }\n bindChangeEvents() {\n this.$textarea.addEventListener('keyup', () => this.handleKeyUp());\n this.$textarea.addEventListener('focus', () => this.handleFocus());\n this.$textarea.addEventListener('blur', () => this.handleBlur());\n }\n handleKeyUp() {\n this.updateVisibleCountMessage();\n this.lastInputTimestamp = Date.now();\n }\n handleFocus() {\n this.valueChecker = window.setInterval(() => {\n if (!this.lastInputTimestamp || Date.now() - 500 >= this.lastInputTimestamp) {\n this.updateIfValueChanged();\n }\n }, 1000);\n }\n handleBlur() {\n if (this.valueChecker) {\n window.clearInterval(this.valueChecker);\n }\n }\n updateIfValueChanged() {\n if (this.$textarea.value !== this.lastInputValue) {\n this.lastInputValue = this.$textarea.value;\n this.updateCountMessage();\n }\n }\n updateCountMessage() {\n this.updateVisibleCountMessage();\n this.updateScreenReaderCountMessage();\n }\n updateVisibleCountMessage() {\n const remainingNumber = this.maxLength - this.count(this.$textarea.value);\n const isError = remainingNumber < 0;\n this.$visibleCountMessage.classList.toggle('govuk-character-count__message--disabled', !this.isOverThreshold());\n this.$textarea.classList.toggle('govuk-textarea--error', isError);\n this.$visibleCountMessage.classList.toggle('govuk-error-message', isError);\n this.$visibleCountMessage.classList.toggle('govuk-hint', !isError);\n this.$visibleCountMessage.textContent = this.getCountMessage();\n }\n updateScreenReaderCountMessage() {\n if (this.isOverThreshold()) {\n this.$screenReaderCountMessage.removeAttribute('aria-hidden');\n } else {\n this.$screenReaderCountMessage.setAttribute('aria-hidden', 'true');\n }\n this.$screenReaderCountMessage.textContent = this.getCountMessage();\n }\n count(text) {\n if (this.config.maxwords) {\n var _text$match;\n const tokens = (_text$match = text.match(/\\S+/g)) != null ? _text$match : [];\n return tokens.length;\n }\n return text.length;\n }\n getCountMessage() {\n const remainingNumber = this.maxLength - this.count(this.$textarea.value);\n const countType = this.config.maxwords ? 'words' : 'characters';\n return this.formatCountMessage(remainingNumber, countType);\n }\n formatCountMessage(remainingNumber, countType) {\n if (remainingNumber === 0) {\n return this.i18n.t(`${countType}AtLimit`);\n }\n const translationKeySuffix = remainingNumber < 0 ? 'OverLimit' : 'UnderLimit';\n return this.i18n.t(`${countType}${translationKeySuffix}`, {\n count: Math.abs(remainingNumber)\n });\n }\n isOverThreshold() {\n if (!this.config.threshold) {\n return true;\n }\n const currentLength = this.count(this.$textarea.value);\n const maxLength = this.maxLength;\n const thresholdValue = maxLength * this.config.threshold / 100;\n return thresholdValue <= currentLength;\n }\n}\n\n/**\n * Character count config\n *\n * @see {@link CharacterCount.defaults}\n * @typedef {object} CharacterCountConfig\n * @property {number} [maxlength] - The maximum number of characters.\n * If maxwords is provided, the maxlength option will be ignored.\n * @property {number} [maxwords] - The maximum number of words. If maxwords is\n * provided, the maxlength option will be ignored.\n * @property {number} [threshold=0] - The percentage value of the limit at\n * which point the count message is displayed. If this attribute is set, the\n * count message will be hidden by default.\n * @property {CharacterCountTranslations} [i18n=CharacterCount.defaults.i18n] - Character count translations\n */\n\n/**\n * Character count translations\n *\n * @see {@link CharacterCount.defaults.i18n}\n * @typedef {object} CharacterCountTranslations\n *\n * Messages shown to users as they type. It provides feedback on how many words\n * or characters they have remaining or if they are over the limit. This also\n * includes a message used as an accessible description for the textarea.\n * @property {TranslationPluralForms} [charactersUnderLimit] - Message displayed\n * when the number of characters is under the configured maximum, `maxlength`.\n * This message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining characters. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {string} [charactersAtLimit] - Message displayed when the number of\n * characters reaches the configured maximum, `maxlength`. This message is\n * displayed visually and through assistive technologies.\n * @property {TranslationPluralForms} [charactersOverLimit] - Message displayed\n * when the number of characters is over the configured maximum, `maxlength`.\n * This message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining characters. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {TranslationPluralForms} [wordsUnderLimit] - Message displayed when\n * the number of words is under the configured maximum, `maxlength`. This\n * message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining words. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {string} [wordsAtLimit] - Message displayed when the number of\n * words reaches the configured maximum, `maxlength`. This message is\n * displayed visually and through assistive technologies.\n * @property {TranslationPluralForms} [wordsOverLimit] - Message displayed when\n * the number of words is over the configured maximum, `maxlength`. This\n * message is displayed visually and through assistive technologies. The\n * component will replace the `%{count}` placeholder with the number of\n * remaining words. This is a [pluralised list of\n * messages](https://frontend.design-system.service.gov.uk/localise-govuk-frontend).\n * @property {TranslationPluralForms} [textareaDescription] - Message made\n * available to assistive technologies, if none is already present in the\n * HTML, to describe that the component accepts only a limited amount of\n * content. It is visible on the page when JavaScript is unavailable. The\n * component will replace the `%{count}` placeholder with the value of the\n * `maxlength` or `maxwords` parameter.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n * @typedef {import('../../i18n.mjs').TranslationPluralForms} TranslationPluralForms\n */\nCharacterCount.moduleName = 'govuk-character-count';\nCharacterCount.defaults = Object.freeze({\n threshold: 0,\n i18n: {\n charactersUnderLimit: {\n one: 'You have %{count} character remaining',\n other: 'You have %{count} characters remaining'\n },\n charactersAtLimit: 'You have 0 characters remaining',\n charactersOverLimit: {\n one: 'You have %{count} character too many',\n other: 'You have %{count} characters too many'\n },\n wordsUnderLimit: {\n one: 'You have %{count} word remaining',\n other: 'You have %{count} words remaining'\n },\n wordsAtLimit: 'You have 0 words remaining',\n wordsOverLimit: {\n one: 'You have %{count} word too many',\n other: 'You have %{count} words too many'\n },\n textareaDescription: {\n other: ''\n }\n }\n});\nCharacterCount.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n },\n maxwords: {\n type: 'number'\n },\n maxlength: {\n type: 'number'\n },\n threshold: {\n type: 'number'\n }\n },\n anyOf: [{\n required: ['maxwords'],\n errorMessage: 'Either \"maxlength\" or \"maxwords\" must be provided'\n }, {\n required: ['maxlength'],\n errorMessage: 'Either \"maxlength\" or \"maxwords\" must be provided'\n }]\n});\n\nexport { CharacterCount };\n//# sourceMappingURL=character-count.mjs.map\n","import { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Checkboxes component\n *\n * @preserve\n */\nclass Checkboxes extends GOVUKFrontendComponent {\n /**\n * Checkboxes can be associated with a 'conditionally revealed' content block\n * – for example, a checkbox for 'Phone' could reveal an additional form field\n * for the user to enter their phone number.\n *\n * These associations are made using a `data-aria-controls` attribute, which\n * is promoted to an aria-controls attribute during initialisation.\n *\n * We also need to restore the state of any conditional reveals on the page\n * (for example if the user has navigated back), and set up event handlers to\n * keep the reveal in sync with the checkbox state.\n *\n * @param {Element | null} $module - HTML element to use for checkboxes\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$inputs = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Checkboxes',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $inputs = $module.querySelectorAll('input[type=\"checkbox\"]');\n if (!$inputs.length) {\n throw new ElementError({\n componentName: 'Checkboxes',\n identifier: 'Form inputs (`<input type=\"checkbox\">`)'\n });\n }\n this.$module = $module;\n this.$inputs = $inputs;\n this.$inputs.forEach($input => {\n const targetId = $input.getAttribute('data-aria-controls');\n if (!targetId) {\n return;\n }\n if (!document.getElementById(targetId)) {\n throw new ElementError({\n componentName: 'Checkboxes',\n identifier: `Conditional reveal (\\`id=\"${targetId}\"\\`)`\n });\n }\n $input.setAttribute('aria-controls', targetId);\n $input.removeAttribute('data-aria-controls');\n });\n window.addEventListener('pageshow', () => this.syncAllConditionalReveals());\n this.syncAllConditionalReveals();\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n syncAllConditionalReveals() {\n this.$inputs.forEach($input => this.syncConditionalRevealWithInputState($input));\n }\n syncConditionalRevealWithInputState($input) {\n const targetId = $input.getAttribute('aria-controls');\n if (!targetId) {\n return;\n }\n const $target = document.getElementById(targetId);\n if ($target != null && $target.classList.contains('govuk-checkboxes__conditional')) {\n const inputIsChecked = $input.checked;\n $input.setAttribute('aria-expanded', inputIsChecked.toString());\n $target.classList.toggle('govuk-checkboxes__conditional--hidden', !inputIsChecked);\n }\n }\n unCheckAllInputsExcept($input) {\n const allInputsWithSameName = document.querySelectorAll(`input[type=\"checkbox\"][name=\"${$input.name}\"]`);\n allInputsWithSameName.forEach($inputWithSameName => {\n const hasSameFormOwner = $input.form === $inputWithSameName.form;\n if (hasSameFormOwner && $inputWithSameName !== $input) {\n $inputWithSameName.checked = false;\n this.syncConditionalRevealWithInputState($inputWithSameName);\n }\n });\n }\n unCheckExclusiveInputs($input) {\n const allInputsWithSameNameAndExclusiveBehaviour = document.querySelectorAll(`input[data-behaviour=\"exclusive\"][type=\"checkbox\"][name=\"${$input.name}\"]`);\n allInputsWithSameNameAndExclusiveBehaviour.forEach($exclusiveInput => {\n const hasSameFormOwner = $input.form === $exclusiveInput.form;\n if (hasSameFormOwner) {\n $exclusiveInput.checked = false;\n this.syncConditionalRevealWithInputState($exclusiveInput);\n }\n });\n }\n handleClick(event) {\n const $clickedInput = event.target;\n if (!($clickedInput instanceof HTMLInputElement) || $clickedInput.type !== 'checkbox') {\n return;\n }\n const hasAriaControls = $clickedInput.getAttribute('aria-controls');\n if (hasAriaControls) {\n this.syncConditionalRevealWithInputState($clickedInput);\n }\n if (!$clickedInput.checked) {\n return;\n }\n const hasBehaviourExclusive = $clickedInput.getAttribute('data-behaviour') === 'exclusive';\n if (hasBehaviourExclusive) {\n this.unCheckAllInputsExcept($clickedInput);\n } else {\n this.unCheckExclusiveInputs($clickedInput);\n }\n }\n}\nCheckboxes.moduleName = 'govuk-checkboxes';\n\nexport { Checkboxes };\n//# sourceMappingURL=checkboxes.mjs.map\n","import { mergeConfigs, setFocus, getFragmentFromUrl } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Error summary component\n *\n * Takes focus on initialisation for accessible announcement, unless disabled in\n * configuration.\n *\n * @preserve\n */\nclass ErrorSummary extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for error summary\n * @param {ErrorSummaryConfig} [config] - Error summary config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Error summary',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(ErrorSummary.defaults, config, normaliseDataset(ErrorSummary, $module.dataset));\n if (!this.config.disableAutoFocus) {\n setFocus(this.$module);\n }\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n handleClick(event) {\n const $target = event.target;\n if ($target && this.focusTarget($target)) {\n event.preventDefault();\n }\n }\n focusTarget($target) {\n if (!($target instanceof HTMLAnchorElement)) {\n return false;\n }\n const inputId = getFragmentFromUrl($target.href);\n if (!inputId) {\n return false;\n }\n const $input = document.getElementById(inputId);\n if (!$input) {\n return false;\n }\n const $legendOrLabel = this.getAssociatedLegendOrLabel($input);\n if (!$legendOrLabel) {\n return false;\n }\n $legendOrLabel.scrollIntoView();\n $input.focus({\n preventScroll: true\n });\n return true;\n }\n getAssociatedLegendOrLabel($input) {\n var _document$querySelect;\n const $fieldset = $input.closest('fieldset');\n if ($fieldset) {\n const $legends = $fieldset.getElementsByTagName('legend');\n if ($legends.length) {\n const $candidateLegend = $legends[0];\n if ($input instanceof HTMLInputElement && ($input.type === 'checkbox' || $input.type === 'radio')) {\n return $candidateLegend;\n }\n const legendTop = $candidateLegend.getBoundingClientRect().top;\n const inputRect = $input.getBoundingClientRect();\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return $candidateLegend;\n }\n }\n }\n }\n return (_document$querySelect = document.querySelector(`label[for='${$input.getAttribute('id')}']`)) != null ? _document$querySelect : $input.closest('label');\n }\n}\n\n/**\n * Error summary config\n *\n * @typedef {object} ErrorSummaryConfig\n * @property {boolean} [disableAutoFocus=false] - If set to `true` the error\n * summary will not be focussed when the page loads.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\nErrorSummary.moduleName = 'govuk-error-summary';\nErrorSummary.defaults = Object.freeze({\n disableAutoFocus: false\n});\nErrorSummary.schema = Object.freeze({\n properties: {\n disableAutoFocus: {\n type: 'boolean'\n }\n }\n});\n\nexport { ErrorSummary };\n//# sourceMappingURL=error-summary.mjs.map\n","import { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Exit this page component\n *\n * @preserve\n */\nclass ExitThisPage extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element that wraps the Exit This Page button\n * @param {ExitThisPageConfig} [config] - Exit This Page config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.i18n = void 0;\n this.$button = void 0;\n this.$skiplinkButton = null;\n this.$updateSpan = null;\n this.$indicatorContainer = null;\n this.$overlay = null;\n this.keypressCounter = 0;\n this.lastKeyWasModified = false;\n this.timeoutTime = 5000;\n this.keypressTimeoutId = null;\n this.timeoutMessageId = null;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Exit this page',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $button = $module.querySelector('.govuk-exit-this-page__button');\n if (!($button instanceof HTMLAnchorElement)) {\n throw new ElementError({\n componentName: 'Exit this page',\n element: $button,\n expectedType: 'HTMLAnchorElement',\n identifier: 'Button (`.govuk-exit-this-page__button`)'\n });\n }\n this.config = mergeConfigs(ExitThisPage.defaults, config, normaliseDataset(ExitThisPage, $module.dataset));\n this.i18n = new I18n(this.config.i18n);\n this.$module = $module;\n this.$button = $button;\n const $skiplinkButton = document.querySelector('.govuk-js-exit-this-page-skiplink');\n if ($skiplinkButton instanceof HTMLAnchorElement) {\n this.$skiplinkButton = $skiplinkButton;\n }\n this.buildIndicator();\n this.initUpdateSpan();\n this.initButtonClickHandler();\n if (!('govukFrontendExitThisPageKeypress' in document.body.dataset)) {\n document.addEventListener('keyup', this.handleKeypress.bind(this), true);\n document.body.dataset.govukFrontendExitThisPageKeypress = 'true';\n }\n window.addEventListener('pageshow', this.resetPage.bind(this));\n }\n initUpdateSpan() {\n this.$updateSpan = document.createElement('span');\n this.$updateSpan.setAttribute('role', 'status');\n this.$updateSpan.className = 'govuk-visually-hidden';\n this.$module.appendChild(this.$updateSpan);\n }\n initButtonClickHandler() {\n this.$button.addEventListener('click', this.handleClick.bind(this));\n if (this.$skiplinkButton) {\n this.$skiplinkButton.addEventListener('click', this.handleClick.bind(this));\n }\n }\n buildIndicator() {\n this.$indicatorContainer = document.createElement('div');\n this.$indicatorContainer.className = 'govuk-exit-this-page__indicator';\n this.$indicatorContainer.setAttribute('aria-hidden', 'true');\n for (let i = 0; i < 3; i++) {\n const $indicator = document.createElement('div');\n $indicator.className = 'govuk-exit-this-page__indicator-light';\n this.$indicatorContainer.appendChild($indicator);\n }\n this.$button.appendChild(this.$indicatorContainer);\n }\n updateIndicator() {\n if (!this.$indicatorContainer) {\n return;\n }\n this.$indicatorContainer.classList.toggle('govuk-exit-this-page__indicator--visible', this.keypressCounter > 0);\n const $indicators = this.$indicatorContainer.querySelectorAll('.govuk-exit-this-page__indicator-light');\n $indicators.forEach(($indicator, index) => {\n $indicator.classList.toggle('govuk-exit-this-page__indicator-light--on', index < this.keypressCounter);\n });\n }\n exitPage() {\n if (!this.$updateSpan) {\n return;\n }\n this.$updateSpan.textContent = '';\n document.body.classList.add('govuk-exit-this-page-hide-content');\n this.$overlay = document.createElement('div');\n this.$overlay.className = 'govuk-exit-this-page-overlay';\n this.$overlay.setAttribute('role', 'alert');\n document.body.appendChild(this.$overlay);\n this.$overlay.textContent = this.i18n.t('activated');\n window.location.href = this.$button.href;\n }\n handleClick(event) {\n event.preventDefault();\n this.exitPage();\n }\n handleKeypress(event) {\n if (!this.$updateSpan) {\n return;\n }\n if (event.key === 'Shift' && !this.lastKeyWasModified) {\n this.keypressCounter += 1;\n this.updateIndicator();\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId);\n this.timeoutMessageId = null;\n }\n if (this.keypressCounter >= 3) {\n this.keypressCounter = 0;\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n this.keypressTimeoutId = null;\n }\n this.exitPage();\n } else {\n if (this.keypressCounter === 1) {\n this.$updateSpan.textContent = this.i18n.t('pressTwoMoreTimes');\n } else {\n this.$updateSpan.textContent = this.i18n.t('pressOneMoreTime');\n }\n }\n this.setKeypressTimer();\n } else if (this.keypressTimeoutId) {\n this.resetKeypressTimer();\n }\n this.lastKeyWasModified = event.shiftKey;\n }\n setKeypressTimer() {\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n }\n this.keypressTimeoutId = window.setTimeout(this.resetKeypressTimer.bind(this), this.timeoutTime);\n }\n resetKeypressTimer() {\n if (!this.$updateSpan) {\n return;\n }\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n this.keypressTimeoutId = null;\n }\n const $updateSpan = this.$updateSpan;\n this.keypressCounter = 0;\n $updateSpan.textContent = this.i18n.t('timedOut');\n this.timeoutMessageId = window.setTimeout(() => {\n $updateSpan.textContent = '';\n }, this.timeoutTime);\n this.updateIndicator();\n }\n resetPage() {\n document.body.classList.remove('govuk-exit-this-page-hide-content');\n if (this.$overlay) {\n this.$overlay.remove();\n this.$overlay = null;\n }\n if (this.$updateSpan) {\n this.$updateSpan.setAttribute('role', 'status');\n this.$updateSpan.textContent = '';\n }\n this.updateIndicator();\n if (this.keypressTimeoutId) {\n window.clearTimeout(this.keypressTimeoutId);\n }\n if (this.timeoutMessageId) {\n window.clearTimeout(this.timeoutMessageId);\n }\n }\n}\n\n/**\n * Exit this Page config\n *\n * @see {@link ExitThisPage.defaults}\n * @typedef {object} ExitThisPageConfig\n * @property {ExitThisPageTranslations} [i18n=ExitThisPage.defaults.i18n] - Exit this page translations\n */\n\n/**\n * Exit this Page translations\n *\n * @see {@link ExitThisPage.defaults.i18n}\n * @typedef {object} ExitThisPageTranslations\n *\n * Messages used by the component programatically inserted text, including\n * overlay text and screen reader announcements.\n * @property {string} [activated] - Screen reader announcement for when EtP\n * keypress functionality has been successfully activated.\n * @property {string} [timedOut] - Screen reader announcement for when the EtP\n * keypress functionality has timed out.\n * @property {string} [pressTwoMoreTimes] - Screen reader announcement informing\n * the user they must press the activation key two more times.\n * @property {string} [pressOneMoreTime] - Screen reader announcement informing\n * the user they must press the activation key one more time.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\nExitThisPage.moduleName = 'govuk-exit-this-page';\nExitThisPage.defaults = Object.freeze({\n i18n: {\n activated: 'Loading.',\n timedOut: 'Exit this page expired.',\n pressTwoMoreTimes: 'Shift, press 2 more times to exit.',\n pressOneMoreTime: 'Shift, press 1 more time to exit.'\n }\n});\nExitThisPage.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n }\n }\n});\n\nexport { ExitThisPage };\n//# sourceMappingURL=exit-this-page.mjs.map\n","import { getBreakpoint } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Header component\n *\n * @preserve\n */\nclass Header extends GOVUKFrontendComponent {\n /**\n * Apply a matchMedia for desktop which will trigger a state sync if the\n * browser viewport moves between states.\n *\n * @param {Element | null} $module - HTML element to use for header\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$menuButton = void 0;\n this.$menu = void 0;\n this.menuIsOpen = false;\n this.mql = null;\n if (!$module) {\n throw new ElementError({\n componentName: 'Header',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n const $menuButton = $module.querySelector('.govuk-js-header-toggle');\n if (!$menuButton) {\n return this;\n }\n const menuId = $menuButton.getAttribute('aria-controls');\n if (!menuId) {\n throw new ElementError({\n componentName: 'Header',\n identifier: 'Navigation button (`<button class=\"govuk-js-header-toggle\">`) attribute (`aria-controls`)'\n });\n }\n const $menu = document.getElementById(menuId);\n if (!$menu) {\n throw new ElementError({\n componentName: 'Header',\n element: $menu,\n identifier: `Navigation (\\`<ul id=\"${menuId}\">\\`)`\n });\n }\n this.$menu = $menu;\n this.$menuButton = $menuButton;\n this.setupResponsiveChecks();\n this.$menuButton.addEventListener('click', () => this.handleMenuButtonClick());\n }\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('desktop');\n if (!breakpoint.value) {\n throw new ElementError({\n componentName: 'Header',\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n });\n }\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode());\n } else {\n this.mql.addListener(() => this.checkMode());\n }\n this.checkMode();\n }\n checkMode() {\n if (!this.mql || !this.$menu || !this.$menuButton) {\n return;\n }\n if (this.mql.matches) {\n this.$menu.removeAttribute('hidden');\n this.$menuButton.setAttribute('hidden', '');\n } else {\n this.$menuButton.removeAttribute('hidden');\n this.$menuButton.setAttribute('aria-expanded', this.menuIsOpen.toString());\n if (this.menuIsOpen) {\n this.$menu.removeAttribute('hidden');\n } else {\n this.$menu.setAttribute('hidden', '');\n }\n }\n }\n handleMenuButtonClick() {\n this.menuIsOpen = !this.menuIsOpen;\n this.checkMode();\n }\n}\nHeader.moduleName = 'govuk-header';\n\nexport { Header };\n//# sourceMappingURL=header.mjs.map\n","import { mergeConfigs, setFocus } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Notification Banner component\n *\n * @preserve\n */\nclass NotificationBanner extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for notification banner\n * @param {NotificationBannerConfig} [config] - Notification banner config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Notification banner',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n this.config = mergeConfigs(NotificationBanner.defaults, config, normaliseDataset(NotificationBanner, $module.dataset));\n if (this.$module.getAttribute('role') === 'alert' && !this.config.disableAutoFocus) {\n setFocus(this.$module);\n }\n }\n}\n\n/**\n * Notification banner config\n *\n * @typedef {object} NotificationBannerConfig\n * @property {boolean} [disableAutoFocus=false] - If set to `true` the\n * notification banner will not be focussed when the page loads. This only\n * applies if the component has a `role` of `alert` – in other cases the\n * component will not be focused on page load, regardless of this option.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n */\nNotificationBanner.moduleName = 'govuk-notification-banner';\nNotificationBanner.defaults = Object.freeze({\n disableAutoFocus: false\n});\nNotificationBanner.schema = Object.freeze({\n properties: {\n disableAutoFocus: {\n type: 'boolean'\n }\n }\n});\n\nexport { NotificationBanner };\n//# sourceMappingURL=notification-banner.mjs.map\n","import { closestAttributeValue } from '../../common/closest-attribute-value.mjs';\nimport { mergeConfigs } from '../../common/index.mjs';\nimport { normaliseDataset } from '../../common/normalise-dataset.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\nimport { I18n } from '../../i18n.mjs';\n\n/**\n * Password input component\n *\n * @preserve\n */\nclass PasswordInput extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for password input\n * @param {PasswordInputConfig} [config] - Password input config\n */\n constructor($module, config = {}) {\n super();\n this.$module = void 0;\n this.config = void 0;\n this.i18n = void 0;\n this.$input = void 0;\n this.$showHideButton = void 0;\n this.$screenReaderStatusMessage = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Password input',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $input = $module.querySelector('.govuk-js-password-input-input');\n if (!($input instanceof HTMLInputElement)) {\n throw new ElementError({\n componentName: 'Password input',\n element: $input,\n expectedType: 'HTMLInputElement',\n identifier: 'Form field (`.govuk-js-password-input-input`)'\n });\n }\n if ($input.type !== 'password') {\n throw new ElementError('Password input: Form field (`.govuk-js-password-input-input`) must be of type `password`.');\n }\n const $showHideButton = $module.querySelector('.govuk-js-password-input-toggle');\n if (!($showHideButton instanceof HTMLButtonElement)) {\n throw new ElementError({\n componentName: 'Password input',\n element: $showHideButton,\n expectedType: 'HTMLButtonElement',\n identifier: 'Button (`.govuk-js-password-input-toggle`)'\n });\n }\n if ($showHideButton.type !== 'button') {\n throw new ElementError('Password input: Button (`.govuk-js-password-input-toggle`) must be of type `button`.');\n }\n this.$module = $module;\n this.$input = $input;\n this.$showHideButton = $showHideButton;\n this.config = mergeConfigs(PasswordInput.defaults, config, normaliseDataset(PasswordInput, $module.dataset));\n this.i18n = new I18n(this.config.i18n, {\n locale: closestAttributeValue($module, 'lang')\n });\n this.$showHideButton.removeAttribute('hidden');\n const $screenReaderStatusMessage = document.createElement('div');\n $screenReaderStatusMessage.className = 'govuk-password-input__sr-status govuk-visually-hidden';\n $screenReaderStatusMessage.setAttribute('aria-live', 'polite');\n this.$screenReaderStatusMessage = $screenReaderStatusMessage;\n this.$input.insertAdjacentElement('afterend', $screenReaderStatusMessage);\n this.$showHideButton.addEventListener('click', this.toggle.bind(this));\n if (this.$input.form) {\n this.$input.form.addEventListener('submit', () => this.hide());\n }\n window.addEventListener('pageshow', event => {\n if (event.persisted && this.$input.type !== 'password') {\n this.hide();\n }\n });\n this.hide();\n }\n toggle(event) {\n event.preventDefault();\n if (this.$input.type === 'password') {\n this.show();\n return;\n }\n this.hide();\n }\n show() {\n this.setType('text');\n }\n hide() {\n this.setType('password');\n }\n setType(type) {\n if (type === this.$input.type) {\n return;\n }\n this.$input.setAttribute('type', type);\n const isHidden = type === 'password';\n const prefixButton = isHidden ? 'show' : 'hide';\n const prefixStatus = isHidden ? 'passwordHidden' : 'passwordShown';\n this.$showHideButton.innerText = this.i18n.t(`${prefixButton}Password`);\n this.$showHideButton.setAttribute('aria-label', this.i18n.t(`${prefixButton}PasswordAriaLabel`));\n this.$screenReaderStatusMessage.innerText = this.i18n.t(`${prefixStatus}Announcement`);\n }\n}\n\n/**\n * Password input config\n *\n * @typedef {object} PasswordInputConfig\n * @property {PasswordInputTranslations} [i18n=PasswordInput.defaults.i18n] - Password input translations\n */\n\n/**\n * Password input translations\n *\n * @see {@link PasswordInput.defaults.i18n}\n * @typedef {object} PasswordInputTranslations\n *\n * Messages displayed to the user indicating the state of the show/hide toggle.\n * @property {string} [showPassword] - Visible text of the button when the\n * password is currently hidden. Plain text only.\n * @property {string} [hidePassword] - Visible text of the button when the\n * password is currently visible. Plain text only.\n * @property {string} [showPasswordAriaLabel] - aria-label of the button when\n * the password is currently hidden. Plain text only.\n * @property {string} [hidePasswordAriaLabel] - aria-label of the button when\n * the password is currently visible. Plain text only.\n * @property {string} [passwordShownAnnouncement] - Screen reader\n * announcement to make when the password has just become visible.\n * Plain text only.\n * @property {string} [passwordHiddenAnnouncement] - Screen reader\n * announcement to make when the password has just been hidden.\n * Plain text only.\n */\n\n/**\n * @typedef {import('../../common/index.mjs').Schema} Schema\n * @typedef {import('../../i18n.mjs').TranslationPluralForms} TranslationPluralForms\n */\nPasswordInput.moduleName = 'govuk-password-input';\nPasswordInput.defaults = Object.freeze({\n i18n: {\n showPassword: 'Show',\n hidePassword: 'Hide',\n showPasswordAriaLabel: 'Show password',\n hidePasswordAriaLabel: 'Hide password',\n passwordShownAnnouncement: 'Your password is visible',\n passwordHiddenAnnouncement: 'Your password is hidden'\n }\n});\nPasswordInput.schema = Object.freeze({\n properties: {\n i18n: {\n type: 'object'\n }\n }\n});\n\nexport { PasswordInput };\n//# sourceMappingURL=password-input.mjs.map\n","import { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Radios component\n *\n * @preserve\n */\nclass Radios extends GOVUKFrontendComponent {\n /**\n * Radios can be associated with a 'conditionally revealed' content block –\n * for example, a radio for 'Phone' could reveal an additional form field for\n * the user to enter their phone number.\n *\n * These associations are made using a `data-aria-controls` attribute, which\n * is promoted to an aria-controls attribute during initialisation.\n *\n * We also need to restore the state of any conditional reveals on the page\n * (for example if the user has navigated back), and set up event handlers to\n * keep the reveal in sync with the radio state.\n *\n * @param {Element | null} $module - HTML element to use for radios\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$inputs = void 0;\n if (!($module instanceof HTMLElement)) {\n throw new ElementError({\n componentName: 'Radios',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $inputs = $module.querySelectorAll('input[type=\"radio\"]');\n if (!$inputs.length) {\n throw new ElementError({\n componentName: 'Radios',\n identifier: 'Form inputs (`<input type=\"radio\">`)'\n });\n }\n this.$module = $module;\n this.$inputs = $inputs;\n this.$inputs.forEach($input => {\n const targetId = $input.getAttribute('data-aria-controls');\n if (!targetId) {\n return;\n }\n if (!document.getElementById(targetId)) {\n throw new ElementError({\n componentName: 'Radios',\n identifier: `Conditional reveal (\\`id=\"${targetId}\"\\`)`\n });\n }\n $input.setAttribute('aria-controls', targetId);\n $input.removeAttribute('data-aria-controls');\n });\n window.addEventListener('pageshow', () => this.syncAllConditionalReveals());\n this.syncAllConditionalReveals();\n this.$module.addEventListener('click', event => this.handleClick(event));\n }\n syncAllConditionalReveals() {\n this.$inputs.forEach($input => this.syncConditionalRevealWithInputState($input));\n }\n syncConditionalRevealWithInputState($input) {\n const targetId = $input.getAttribute('aria-controls');\n if (!targetId) {\n return;\n }\n const $target = document.getElementById(targetId);\n if ($target != null && $target.classList.contains('govuk-radios__conditional')) {\n const inputIsChecked = $input.checked;\n $input.setAttribute('aria-expanded', inputIsChecked.toString());\n $target.classList.toggle('govuk-radios__conditional--hidden', !inputIsChecked);\n }\n }\n handleClick(event) {\n const $clickedInput = event.target;\n if (!($clickedInput instanceof HTMLInputElement) || $clickedInput.type !== 'radio') {\n return;\n }\n const $allInputs = document.querySelectorAll('input[type=\"radio\"][aria-controls]');\n const $clickedInputForm = $clickedInput.form;\n const $clickedInputName = $clickedInput.name;\n $allInputs.forEach($input => {\n const hasSameFormOwner = $input.form === $clickedInputForm;\n const hasSameName = $input.name === $clickedInputName;\n if (hasSameName && hasSameFormOwner) {\n this.syncConditionalRevealWithInputState($input);\n }\n });\n }\n}\nRadios.moduleName = 'govuk-radios';\n\nexport { Radios };\n//# sourceMappingURL=radios.mjs.map\n","import { getFragmentFromUrl, setFocus } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Skip link component\n *\n * @preserve\n */\nclass SkipLink extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for skip link\n * @throws {ElementError} when $module is not set or the wrong type\n * @throws {ElementError} when $module.hash does not contain a hash\n * @throws {ElementError} when the linked element is missing or the wrong type\n */\n constructor($module) {\n var _this$$module$getAttr;\n super();\n this.$module = void 0;\n if (!($module instanceof HTMLAnchorElement)) {\n throw new ElementError({\n componentName: 'Skip link',\n element: $module,\n expectedType: 'HTMLAnchorElement',\n identifier: 'Root element (`$module`)'\n });\n }\n this.$module = $module;\n const hash = this.$module.hash;\n const href = (_this$$module$getAttr = this.$module.getAttribute('href')) != null ? _this$$module$getAttr : '';\n let url;\n try {\n url = new window.URL(this.$module.href);\n } catch (error) {\n throw new ElementError(`Skip link: Target link (\\`href=\"${href}\"\\`) is invalid`);\n }\n if (url.origin !== window.location.origin || url.pathname !== window.location.pathname) {\n return;\n }\n const linkedElementId = getFragmentFromUrl(hash);\n if (!linkedElementId) {\n throw new ElementError(`Skip link: Target link (\\`href=\"${href}\"\\`) has no hash fragment`);\n }\n const $linkedElement = document.getElementById(linkedElementId);\n if (!$linkedElement) {\n throw new ElementError({\n componentName: 'Skip link',\n element: $linkedElement,\n identifier: `Target content (\\`id=\"${linkedElementId}\"\\`)`\n });\n }\n this.$module.addEventListener('click', () => setFocus($linkedElement, {\n onBeforeFocus() {\n $linkedElement.classList.add('govuk-skip-link-focused-element');\n },\n onBlur() {\n $linkedElement.classList.remove('govuk-skip-link-focused-element');\n }\n }));\n }\n}\nSkipLink.moduleName = 'govuk-skip-link';\n\nexport { SkipLink };\n//# sourceMappingURL=skip-link.mjs.map\n","import { getBreakpoint, getFragmentFromUrl } from '../../common/index.mjs';\nimport { ElementError } from '../../errors/index.mjs';\nimport { GOVUKFrontendComponent } from '../../govuk-frontend-component.mjs';\n\n/**\n * Tabs component\n *\n * @preserve\n */\nclass Tabs extends GOVUKFrontendComponent {\n /**\n * @param {Element | null} $module - HTML element to use for tabs\n */\n constructor($module) {\n super();\n this.$module = void 0;\n this.$tabs = void 0;\n this.$tabList = void 0;\n this.$tabListItems = void 0;\n this.jsHiddenClass = 'govuk-tabs__panel--hidden';\n this.changingHash = false;\n this.boundTabClick = void 0;\n this.boundTabKeydown = void 0;\n this.boundOnHashChange = void 0;\n this.mql = null;\n if (!$module) {\n throw new ElementError({\n componentName: 'Tabs',\n element: $module,\n identifier: 'Root element (`$module`)'\n });\n }\n const $tabs = $module.querySelectorAll('a.govuk-tabs__tab');\n if (!$tabs.length) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'Links (`<a class=\"govuk-tabs__tab\">`)'\n });\n }\n this.$module = $module;\n this.$tabs = $tabs;\n this.boundTabClick = this.onTabClick.bind(this);\n this.boundTabKeydown = this.onTabKeydown.bind(this);\n this.boundOnHashChange = this.onHashChange.bind(this);\n const $tabList = this.$module.querySelector('.govuk-tabs__list');\n const $tabListItems = this.$module.querySelectorAll('li.govuk-tabs__list-item');\n if (!$tabList) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'List (`<ul class=\"govuk-tabs__list\">`)'\n });\n }\n if (!$tabListItems.length) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: 'List items (`<li class=\"govuk-tabs__list-item\">`)'\n });\n }\n this.$tabList = $tabList;\n this.$tabListItems = $tabListItems;\n this.setupResponsiveChecks();\n }\n setupResponsiveChecks() {\n const breakpoint = getBreakpoint('tablet');\n if (!breakpoint.value) {\n throw new ElementError({\n componentName: 'Tabs',\n identifier: `CSS custom property (\\`${breakpoint.property}\\`) on pseudo-class \\`:root\\``\n });\n }\n this.mql = window.matchMedia(`(min-width: ${breakpoint.value})`);\n if ('addEventListener' in this.mql) {\n this.mql.addEventListener('change', () => this.checkMode());\n } else {\n this.mql.addListener(() => this.checkMode());\n }\n this.checkMode();\n }\n checkMode() {\n var _this$mql;\n if ((_this$mql = this.mql) != null && _this$mql.matches) {\n this.setup();\n } else {\n this.teardown();\n }\n }\n setup() {\n var _this$getTab;\n this.$tabList.setAttribute('role', 'tablist');\n this.$tabListItems.forEach($item => {\n $item.setAttribute('role', 'presentation');\n });\n this.$tabs.forEach($tab => {\n this.setAttributes($tab);\n $tab.addEventListener('click', this.boundTabClick, true);\n $tab.addEventListener('keydown', this.boundTabKeydown, true);\n this.hideTab($tab);\n });\n const $activeTab = (_this$getTab = this.getTab(window.location.hash)) != null ? _this$getTab : this.$tabs[0];\n this.showTab($activeTab);\n window.addEventListener('hashchange', this.boundOnHashChange, true);\n }\n teardown() {\n this.$tabList.removeAttribute('role');\n this.$tabListItems.forEach($item => {\n $item.removeAttribute('role');\n });\n this.$tabs.forEach($tab => {\n $tab.removeEventListener('click', this.boundTabClick, true);\n $tab.removeEventListener('keydown', this.boundTabKeydown, true);\n this.unsetAttributes($tab);\n });\n window.removeEventListener('hashchange', this.boundOnHashChange, true);\n }\n onHashChange() {\n const hash = window.location.hash;\n const $tabWithHash = this.getTab(hash);\n if (!$tabWithHash) {\n return;\n }\n if (this.changingHash) {\n this.changingHash = false;\n return;\n }\n const $previousTab = this.getCurrentTab();\n if (!$previousTab) {\n return;\n }\n this.hideTab($previousTab);\n this.showTab($tabWithHash);\n $tabWithHash.focus();\n }\n hideTab($tab) {\n this.unhighlightTab($tab);\n this.hidePanel($tab);\n }\n showTab($tab) {\n this.highlightTab($tab);\n this.showPanel($tab);\n }\n getTab(hash) {\n return this.$module.querySelector(`a.govuk-tabs__tab[href=\"${hash}\"]`);\n }\n setAttributes($tab) {\n const panelId = getFragmentFromUrl($tab.href);\n if (!panelId) {\n return;\n }\n $tab.setAttribute('id', `tab_${panelId}`);\n $tab.setAttribute('role', 'tab');\n $tab.setAttribute('aria-controls', panelId);\n $tab.setAttribute('aria-selected', 'false');\n $tab.setAttribute('tabindex', '-1');\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.setAttribute('role', 'tabpanel');\n $panel.setAttribute('aria-labelledby', $tab.id);\n $panel.classList.add(this.jsHiddenClass);\n }\n unsetAttributes($tab) {\n $tab.removeAttribute('id');\n $tab.removeAttribute('role');\n $tab.removeAttribute('aria-controls');\n $tab.removeAttribute('aria-selected');\n $tab.removeAttribute('tabindex');\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.removeAttribute('role');\n $panel.removeAttribute('aria-labelledby');\n $panel.classList.remove(this.jsHiddenClass);\n }\n onTabClick(event) {\n const $currentTab = this.getCurrentTab();\n const $nextTab = event.currentTarget;\n if (!$currentTab || !($nextTab instanceof HTMLAnchorElement)) {\n return;\n }\n event.preventDefault();\n this.hideTab($currentTab);\n this.showTab($nextTab);\n this.createHistoryEntry($nextTab);\n }\n createHistoryEntry($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n const panelId = $panel.id;\n $panel.id = '';\n this.changingHash = true;\n window.location.hash = panelId;\n $panel.id = panelId;\n }\n onTabKeydown(event) {\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowUp':\n case 'Left':\n case 'Up':\n this.activatePreviousTab();\n event.preventDefault();\n break;\n case 'ArrowRight':\n case 'ArrowDown':\n case 'Right':\n case 'Down':\n this.activateNextTab();\n event.preventDefault();\n break;\n }\n }\n activateNextTab() {\n const $currentTab = this.getCurrentTab();\n if (!($currentTab != null && $currentTab.parentElement)) {\n return;\n }\n const $nextTabListItem = $currentTab.parentElement.nextElementSibling;\n if (!$nextTabListItem) {\n return;\n }\n const $nextTab = $nextTabListItem.querySelector('a.govuk-tabs__tab');\n if (!$nextTab) {\n return;\n }\n this.hideTab($currentTab);\n this.showTab($nextTab);\n $nextTab.focus();\n this.createHistoryEntry($nextTab);\n }\n activatePreviousTab() {\n const $currentTab = this.getCurrentTab();\n if (!($currentTab != null && $currentTab.parentElement)) {\n return;\n }\n const $previousTabListItem = $currentTab.parentElement.previousElementSibling;\n if (!$previousTabListItem) {\n return;\n }\n const $previousTab = $previousTabListItem.querySelector('a.govuk-tabs__tab');\n if (!$previousTab) {\n return;\n }\n this.hideTab($currentTab);\n this.showTab($previousTab);\n $previousTab.focus();\n this.createHistoryEntry($previousTab);\n }\n getPanel($tab) {\n const panelId = getFragmentFromUrl($tab.href);\n if (!panelId) {\n return null;\n }\n return this.$module.querySelector(`#${panelId}`);\n }\n showPanel($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.classList.remove(this.jsHiddenClass);\n }\n hidePanel($tab) {\n const $panel = this.getPanel($tab);\n if (!$panel) {\n return;\n }\n $panel.classList.add(this.jsHiddenClass);\n }\n unhighlightTab($tab) {\n if (!$tab.parentElement) {\n return;\n }\n $tab.setAttribute('aria-selected', 'false');\n $tab.parentElement.classList.remove('govuk-tabs__list-item--selected');\n $tab.setAttribute('tabindex', '-1');\n }\n highlightTab($tab) {\n if (!$tab.parentElement) {\n return;\n }\n $tab.setAttribute('aria-selected', 'true');\n $tab.parentElement.classList.add('govuk-tabs__list-item--selected');\n $tab.setAttribute('tabindex', '0');\n }\n getCurrentTab() {\n return this.$module.querySelector('.govuk-tabs__list-item--selected a.govuk-tabs__tab');\n }\n}\nTabs.moduleName = 'govuk-tabs';\n\nexport { Tabs };\n//# sourceMappingURL=tabs.mjs.map\n","export { version } from './common/govuk-frontend-version.mjs';\nimport { isSupported } from './common/index.mjs';\nimport { Accordion } from './components/accordion/accordion.mjs';\nimport { Button } from './components/button/button.mjs';\nimport { CharacterCount } from './components/character-count/character-count.mjs';\nimport { Checkboxes } from './components/checkboxes/checkboxes.mjs';\nimport { ErrorSummary } from './components/error-summary/error-summary.mjs';\nimport { ExitThisPage } from './components/exit-this-page/exit-this-page.mjs';\nimport { Header } from './components/header/header.mjs';\nimport { NotificationBanner } from './components/notification-banner/notification-banner.mjs';\nimport { PasswordInput } from './components/password-input/password-input.mjs';\nimport { Radios } from './components/radios/radios.mjs';\nimport { SkipLink } from './components/skip-link/skip-link.mjs';\nimport { Tabs } from './components/tabs/tabs.mjs';\nimport { SupportError } from './errors/index.mjs';\n\n/**\n * Initialise all components\n *\n * Use the `data-module` attributes to find, instantiate and init all of the\n * components provided as part of GOV.UK Frontend.\n *\n * @param {Config & { scope?: Element }} [config] - Config for all components (with optional scope)\n */\nfunction initAll(config) {\n var _config$scope;\n config = typeof config !== 'undefined' ? config : {};\n if (!isSupported()) {\n console.log(new SupportError());\n return;\n }\n const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [Header], [NotificationBanner, config.notificationBanner], [PasswordInput, config.passwordInput], [Radios], [SkipLink], [Tabs]];\n const $scope = (_config$scope = config.scope) != null ? _config$scope : document;\n components.forEach(([Component, config]) => {\n const $elements = $scope.querySelectorAll(`[data-module=\"${Component.moduleName}\"]`);\n $elements.forEach($element => {\n try {\n 'defaults' in Component ? new Component($element, config) : new Component($element);\n } catch (error) {\n console.log(error);\n }\n });\n });\n}\n\n/**\n * Config for all components via `initAll()`\n *\n * @typedef {object} Config\n * @property {AccordionConfig} [accordion] - Accordion config\n * @property {ButtonConfig} [button] - Button config\n * @property {CharacterCountConfig} [characterCount] - Character Count config\n * @property {ErrorSummaryConfig} [errorSummary] - Error Summary config\n * @property {ExitThisPageConfig} [exitThisPage] - Exit This Page config\n * @property {NotificationBannerConfig} [notificationBanner] - Notification Banner config\n * @property {PasswordInputConfig} [passwordInput] - Password input config\n */\n\n/**\n * Config for individual components\n *\n * @typedef {import('./components/accordion/accordion.mjs').AccordionConfig} AccordionConfig\n * @typedef {import('./components/accordion/accordion.mjs').AccordionTranslations} AccordionTranslations\n * @typedef {import('./components/button/button.mjs').ButtonConfig} ButtonConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountConfig} CharacterCountConfig\n * @typedef {import('./components/character-count/character-count.mjs').CharacterCountTranslations} CharacterCountTranslations\n * @typedef {import('./components/error-summary/error-summary.mjs').ErrorSummaryConfig} ErrorSummaryConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageConfig} ExitThisPageConfig\n * @typedef {import('./components/exit-this-page/exit-this-page.mjs').ExitThisPageTranslations} ExitThisPageTranslations\n * @typedef {import('./components/notification-banner/notification-banner.mjs').NotificationBannerConfig} NotificationBannerConfig\n * @typedef {import('./components/password-input/password-input.mjs').PasswordInputConfig} PasswordInputConfig\n */\n\n/**\n * Component config keys, e.g. `accordion` and `characterCount`\n *\n * @typedef {keyof Config} ConfigKey\n */\n\nexport { Accordion, Button, CharacterCount, Checkboxes, ErrorSummary, ExitThisPage, Header, NotificationBanner, PasswordInput, Radios, SkipLink, Tabs, initAll };\n//# sourceMappingURL=all.mjs.map\n"],"names":["root","factory","exports","module","define","amd","self","__webpack_require__","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","version","normaliseString","property","trimmedValue","trim","output","outputType","type","includes","length","isFinite","Number","mergeConfigs","configObjects","formattedConfigObject","configObject","keys","option","override","isObject","extractConfigByNamespace","Component","dataset","namespace","schema","properties","newObject","entries","current","keyParts","split","index","name","getFragmentFromUrl","url","pop","getBreakpoint","window","getComputedStyle","document","documentElement","getPropertyValue","undefined","setFocus","$element","options","_options$onBeforeFocu","isFocusable","getAttribute","onBlur","_options$onBlur","removeAttribute","setAttribute","addEventListener","once","onBeforeFocus","focus","isSupported","$scope","body","classList","contains","Array","isArray","normaliseDataset","out","field","GOVUKFrontendError","Error","constructor","args","super","this","SupportError","supportMessage","HTMLScriptElement","ConfigError","ElementError","messageOrOptions","message","componentName","identifier","element","expectedType","GOVUKFrontendComponent","checkSupport","I18n","translations","config","_config$locale","locale","lang","t","lookupKey","translation","count","translationPluralForm","getPluralSuffix","match","replacePlaceholders","translationString","formatter","Intl","NumberFormat","supportedLocalesOf","replace","placeholderWithBraces","placeholderKey","placeholderValue","format","hasIntlPluralRulesSupport","Boolean","PluralRules","preferredForm","select","selectPluralFormUsingFallbackRules","console","warn","Math","abs","floor","ruleset","getPluralRulesForLocale","pluralRules","localeShort","pluralRule","pluralRulesMap","languages","arabic","chinese","french","german","irish","russian","scottish","spanish","welsh","n","lastTwo","last","Accordion","$module","i18n","controlsClass","showAllClass","showAllTextClass","sectionClass","sectionExpandedClass","sectionButtonClass","sectionHeaderClass","sectionHeadingClass","sectionHeadingDividerClass","sectionHeadingTextClass","sectionHeadingTextFocusClass","sectionShowHideToggleClass","sectionShowHideToggleFocusClass","sectionShowHideTextClass","upChevronIconClass","downChevronIconClass","sectionSummaryClass","sectionSummaryFocusClass","sectionContentClass","$sections","browserSupportsSessionStorage","$showAllButton","$showAllIcon","$showAllText","HTMLElement","defaults","querySelectorAll","helper","checkForSessionStorage","initControls","initSectionHeaders","areAllSectionsOpen","checkIfAllSectionsOpen","updateShowAllButton","createElement","add","appendChild","$accordionControls","insertBefore","firstChild","onShowOrHideAllToggle","event","onBeforeMatch","forEach","$section","i","$header","querySelector","constructHeaderMarkup","setExpanded","isExpanded","onSectionToggle","setInitialState","$span","$heading","$summary","$button","id","attr","from","attributes","nodeName","nodeValue","$headingText","$headingTextFocus","innerHTML","$showHideToggle","$showHideToggleFocus","$showHideText","$showHideIcon","getButtonPunctuationEl","parentNode","$summarySpan","$summarySpanFocus","replaceChild","removeChild","$fragment","target","Element","closest","expanded","storeState","nowExpanded","$content","newButtonText","textContent","ariaLabelParts","push","ariaLabelMessage","join","remove","toString","toggle","rememberExpanded","contentId","contentState","sessionStorage","setItem","getItem","$punctuationEl","moduleName","freeze","hideAllSections","hideSection","hideSectionAriaLabel","showAllSections","showSection","showSectionAriaLabel","testString","result","removeItem","exception","Button","debounceFormSubmitTimer","handleKeyDown","debounce","$target","preventDefault","click","preventDoubleClick","setTimeout","DEBOUNCE_TIMEOUT_IN_SECONDS","closestAttributeValue","attributeName","$closestElementWithAttribute","CharacterCount","_ref","_this$config$maxwords","$textarea","$visibleCountMessage","$screenReaderCountMessage","lastInputTimestamp","lastInputValue","valueChecker","maxLength","HTMLTextAreaElement","HTMLInputElement","datasetConfig","configOverrides","maxlength","maxwords","errors","validationErrors","conditions","required","errorMessage","every","validateConfig","Infinity","textareaDescriptionId","$textareaDescription","getElementById","insertAdjacentElement","className","bindChangeEvents","updateCountMessage","handleKeyUp","handleFocus","handleBlur","updateVisibleCountMessage","Date","now","setInterval","updateIfValueChanged","clearInterval","updateScreenReaderCountMessage","isError","isOverThreshold","getCountMessage","text","_text$match","remainingNumber","countType","formatCountMessage","translationKeySuffix","threshold","currentLength","charactersUnderLimit","one","other","charactersAtLimit","charactersOverLimit","wordsUnderLimit","wordsAtLimit","wordsOverLimit","textareaDescription","anyOf","Checkboxes","$inputs","$input","targetId","syncAllConditionalReveals","handleClick","syncConditionalRevealWithInputState","inputIsChecked","checked","unCheckAllInputsExcept","$inputWithSameName","form","unCheckExclusiveInputs","$exclusiveInput","$clickedInput","ErrorSummary","disableAutoFocus","focusTarget","HTMLAnchorElement","inputId","href","$legendOrLabel","getAssociatedLegendOrLabel","scrollIntoView","preventScroll","_document$querySelect","$fieldset","$legends","getElementsByTagName","$candidateLegend","legendTop","getBoundingClientRect","top","inputRect","height","innerHeight","ExitThisPage","$skiplinkButton","$updateSpan","$indicatorContainer","$overlay","keypressCounter","lastKeyWasModified","timeoutTime","keypressTimeoutId","timeoutMessageId","buildIndicator","initUpdateSpan","initButtonClickHandler","handleKeypress","bind","govukFrontendExitThisPageKeypress","resetPage","$indicator","updateIndicator","exitPage","location","resetKeypressTimer","clearTimeout","setKeypressTimer","shiftKey","activated","timedOut","pressTwoMoreTimes","pressOneMoreTime","Header","$menuButton","$menu","menuIsOpen","mql","menuId","setupResponsiveChecks","handleMenuButtonClick","breakpoint","matchMedia","checkMode","addListener","matches","NotificationBanner","PasswordInput","$showHideButton","$screenReaderStatusMessage","HTMLButtonElement","hide","persisted","show","setType","isHidden","prefixButton","prefixStatus","innerText","showPassword","hidePassword","showPasswordAriaLabel","hidePasswordAriaLabel","passwordShownAnnouncement","passwordHiddenAnnouncement","Radios","$allInputs","$clickedInputForm","$clickedInputName","hasSameFormOwner","SkipLink","_this$$module$getAttr","hash","URL","error","origin","pathname","linkedElementId","$linkedElement","Tabs","$tabs","$tabList","$tabListItems","jsHiddenClass","changingHash","boundTabClick","boundTabKeydown","boundOnHashChange","onTabClick","onTabKeydown","onHashChange","_this$mql","setup","teardown","_this$getTab","$item","$tab","setAttributes","hideTab","$activeTab","getTab","showTab","removeEventListener","unsetAttributes","$tabWithHash","$previousTab","getCurrentTab","unhighlightTab","hidePanel","highlightTab","showPanel","panelId","$panel","getPanel","$currentTab","$nextTab","currentTarget","createHistoryEntry","activatePreviousTab","activateNextTab","parentElement","$nextTabListItem","nextElementSibling","$previousTabListItem","previousElementSibling","initAll","_config$scope","log","components","accordion","button","characterCount","errorSummary","exitThisPage","notificationBanner","passwordInput","scope"],"sourceRoot":""}
|