{"version":3,"file":"all-esm.mjs","sources":["../../../node_modules/govuk-frontend/dist/govuk/common/index.mjs","../../../node_modules/govuk-frontend/dist/govuk/errors/index.mjs","../../../node_modules/govuk-frontend/dist/govuk/component.mjs","../../../node_modules/govuk-frontend/dist/govuk/common/configuration.mjs","../../../node_modules/govuk-frontend/dist/govuk/components/button/button.mjs","../../../node_modules/govuk-frontend/dist/govuk/components/error-summary/error-summary.mjs","../../../node_modules/govuk-frontend/dist/govuk/components/radios/radios.mjs","../../../node_modules/govuk-frontend/dist/govuk/components/service-navigation/service-navigation.mjs","../../../node_modules/govuk-frontend/dist/govuk/components/skip-link/skip-link.mjs","../../../node_modules/govuk-frontend/dist/govuk/components/tabs/tabs.mjs","../../../node_modules/govuk-frontend/dist/govuk/init.mjs","../../assets/javascripts/esm/collapsible-checkboxes.mjs","../../assets/javascripts/esm/colour-preview.mjs","../../assets/javascripts/esm/file-upload.mjs","../../assets/javascripts/esm/autofocus.mjs","../../assets/javascripts/esm/homepage.mjs","../../assets/javascripts/esm/preview-pane.mjs","../../assets/javascripts/esm/copy-to-clipboard.mjs","../../assets/javascripts/esm/list-entry.mjs","../../assets/javascripts/esm/radios-with-images.mjs","../../assets/javascripts/esm/live-search.mjs","../../assets/javascripts/esm/enhanced-textbox.mjs","../../assets/javascripts/utils/location.mjs","../../assets/javascripts/esm/check-report-status.mjs","../../assets/javascripts/esm/live-checkbox-controls.mjs","../../assets/javascripts/esm/add-branding-options-controls.mjs","../../assets/javascripts/esm/utils.mjs","../../../node_modules/textarea-caret-ts/index.js","../../assets/javascripts/esm/stick-to-window-when-scrolling.mjs","../../assets/javascripts/esm/radio-select.mjs","../../assets/javascripts/esm/fullscreen-table.mjs","../../assets/javascripts/esm/remove-in-presence-of.mjs","../../assets/javascripts/esm/error-banner.mjs","../../assets/javascripts/esm/authenticate-security-key.mjs","../../assets/javascripts/esm/register-security-key.mjs","../../assets/javascripts/esm/update-status.mjs","../../../node_modules/morphdom/dist/morphdom-esm.js","../../assets/javascripts/esm/update-content.mjs","../../assets/javascripts/esm/update-relative-time_nl.mjs","../../assets/javascripts/esm/all-esm.mjs","../../assets/javascripts/esm/focus-banner.mjs"],"sourcesContent":["function getBreakpoint(name) {\n  const property = `--govuk-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 isInitialised($root, moduleName) {\n  return $root instanceof HTMLElement && $root.hasAttribute(`data-${moduleName}-init`);\n}\n\n/**\n * Checks if GOV.UK Frontend is supported on this page\n *\n * Some browsers will load and run our JavaScript but GOV.UK Frontend\n * won't be supported.\n *\n * @param {HTMLElement | null} [$scope] - (internal) `<body>` HTML element checked for browser support\n * @returns {boolean} Whether GOV.UK Frontend is supported on this page\n */\nfunction isSupported($scope = document.body) {\n  if (!$scope) {\n    return false;\n  }\n  return $scope.classList.contains('govuk-frontend-supported');\n}\nfunction isArray(option) {\n  return Array.isArray(option);\n}\nfunction isObject(option) {\n  return !!option && typeof option === 'object' && !isArray(option);\n}\nfunction isScope($scope) {\n  return !!$scope && ($scope instanceof Element || $scope instanceof Document);\n}\nfunction formatErrorMessage(Component, message) {\n  return `${Component.moduleName}: ${message}`;\n}\n/**\n * @typedef ComponentWithModuleName\n * @property {string} moduleName - Name of the component\n */\n\nexport { formatErrorMessage, getBreakpoint, isInitialised, isObject, isScope, isSupported, setFocus };\n//# sourceMappingURL=index.mjs.map\n","import { isObject, formatErrorMessage } from '../common/index.mjs';\n\nclass 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 (isObject(messageOrOptions)) {\n      const {\n        component,\n        identifier,\n        element,\n        expectedType\n      } = messageOrOptions;\n      message = identifier;\n      message += element ? ` is not of type ${expectedType != null ? expectedType : 'HTMLElement'}` : ' not found';\n      if (component) {\n        message = formatErrorMessage(component, message);\n      }\n    }\n    super(message);\n    this.name = 'ElementError';\n  }\n}\nclass InitError extends GOVUKFrontendError {\n  constructor(componentOrMessage) {\n    const message = typeof componentOrMessage === 'string' ? componentOrMessage : formatErrorMessage(componentOrMessage, `Root element (\\`$root\\`) already initialised`);\n    super(message);\n    this.name = 'InitError';\n  }\n}\n/**\n * @import { ComponentWithModuleName } from '../common/index.mjs'\n */\n\nexport { ConfigError, ElementError, GOVUKFrontendError, InitError, SupportError };\n//# sourceMappingURL=index.mjs.map\n","import { isInitialised, isSupported } from './common/index.mjs';\nimport { InitError, ElementError, SupportError } from './errors/index.mjs';\n\nclass Component {\n  /**\n   * Returns the root element of the component\n   *\n   * @protected\n   * @returns {RootElementType} - the root element of component\n   */\n  get $root() {\n    return this._$root;\n  }\n  constructor($root) {\n    this._$root = void 0;\n    const childConstructor = this.constructor;\n    if (typeof childConstructor.moduleName !== 'string') {\n      throw new InitError(`\\`moduleName\\` not defined in component`);\n    }\n    if (!($root instanceof childConstructor.elementType)) {\n      throw new ElementError({\n        element: $root,\n        component: childConstructor,\n        identifier: 'Root element (`$root`)',\n        expectedType: childConstructor.elementType.name\n      });\n    } else {\n      this._$root = $root;\n    }\n    childConstructor.checkSupport();\n    this.checkInitialised();\n    const moduleName = childConstructor.moduleName;\n    this.$root.setAttribute(`data-${moduleName}-init`, '');\n  }\n  checkInitialised() {\n    const constructor = this.constructor;\n    const moduleName = constructor.moduleName;\n    if (moduleName && isInitialised(this.$root, moduleName)) {\n      throw new InitError(constructor);\n    }\n  }\n  static checkSupport() {\n    if (!isSupported()) {\n      throw new SupportError();\n    }\n  }\n}\n\n/**\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n */\n\n/**\n * @typedef {typeof Component & ChildClass} ChildClassConstructor\n */\nComponent.elementType = HTMLElement;\n\nexport { Component };\n//# sourceMappingURL=component.mjs.map\n","import { Component } from '../component.mjs';\nimport { ConfigError } from '../errors/index.mjs';\nimport { isObject, formatErrorMessage, isScope } from './index.mjs';\n\nconst configOverride = Symbol.for('configOverride');\nclass ConfigurableComponent extends Component {\n  [configOverride](param) {\n    return {};\n  }\n\n  /**\n   * Returns the root element of the component\n   *\n   * @protected\n   * @returns {ConfigurationType} - the root element of component\n   */\n  get config() {\n    return this._config;\n  }\n  constructor($root, config) {\n    super($root);\n    this._config = void 0;\n    const childConstructor = this.constructor;\n    if (!isObject(childConstructor.defaults)) {\n      throw new ConfigError(formatErrorMessage(childConstructor, 'Config passed as parameter into constructor but no defaults defined'));\n    }\n    const datasetConfig = normaliseDataset(childConstructor, this._$root.dataset);\n    this._config = mergeConfigs(childConstructor.defaults, config != null ? config : {}, this[configOverride](datasetConfig), datasetConfig);\n  }\n}\nfunction 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}\nfunction normaliseDataset(Component, dataset) {\n  if (!isObject(Component.schema)) {\n    throw new ConfigError(formatErrorMessage(Component, 'Config passed as parameter into constructor but no schema defined'));\n  }\n  const out = {};\n  const entries = Object.entries(Component.schema.properties);\n  for (const entry of entries) {\n    const [namespace, property] = entry;\n    const field = namespace.toString();\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.schema, dataset, namespace);\n    }\n  }\n  return out;\n}\nfunction normaliseOptions(scopeOrOptions) {\n  let $scope = document;\n  let onError;\n  if (isObject(scopeOrOptions)) {\n    const options = scopeOrOptions;\n    if (isScope(options.scope) || options.scope === null) {\n      $scope = options.scope;\n    }\n    if (typeof options.onError === 'function') {\n      onError = options.onError;\n    }\n  }\n  if (isScope(scopeOrOptions)) {\n    $scope = scopeOrOptions;\n  } else if (scopeOrOptions === null) {\n    $scope = null;\n  } else if (typeof scopeOrOptions === 'function') {\n    onError = scopeOrOptions;\n  }\n  return {\n    scope: $scope,\n    onError\n  };\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 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 extractConfigByNamespace(schema, dataset, namespace) {\n  const property = 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 (isObject(current)) {\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}\n/**\n * Schema for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} Schema\n * @property {Record<keyof ConfigurationType, SchemaProperty | undefined>} properties - Schema properties\n * @property {SchemaCondition<ConfigurationType>[]} [anyOf] - List of schema conditions\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 * Schema condition for component config\n *\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} ConfigurationType\n * @typedef {object} SchemaCondition\n * @property {(keyof ConfigurationType)[]} required - List of required config fields\n * @property {string} errorMessage - Error message when required config fields not provided\n */\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef ChildClass\n * @property {string} moduleName - The module name that'll be looked for in the DOM when initialising the component\n * @property {Schema<ConfigurationType>} [schema] - The schema of the component configuration\n * @property {ConfigurationType} [defaults] - The default values of the configuration of the component\n */\n/**\n * @template {Partial<Record<keyof ConfigurationType, unknown>>} [ConfigurationType=ObjectNested]\n * @typedef {typeof Component & ChildClass<ConfigurationType>} ChildClassConstructor<ConfigurationType>\n */\n/**\n * @import { CompatibleClass, Config, CreateAllOptions, OnErrorCallback } from '../init.mjs'\n */\n\nexport { ConfigurableComponent, configOverride, extractConfigByNamespace, mergeConfigs, normaliseDataset, normaliseOptions, normaliseString, validateConfig };\n//# sourceMappingURL=configuration.mjs.map\n","import { ConfigurableComponent } from '../../common/configuration.mjs';\n\nconst DEBOUNCE_TIMEOUT_IN_SECONDS = 1;\n\n/**\n * JavaScript enhancements for the Button component\n *\n * @preserve\n * @augments ConfigurableComponent<ButtonConfig>\n */\nclass Button extends ConfigurableComponent {\n  /**\n   * @param {Element | null} $root - HTML element to use for button\n   * @param {ButtonConfig} [config] - Button config\n   */\n  constructor($root, config = {}) {\n    super($root, config);\n    this.debounceFormSubmitTimer = null;\n    this.$root.addEventListener('keydown', event => this.handleKeyDown(event));\n    this.$root.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 * @import { Schema } from '../../common/configuration.mjs'\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","import { ConfigurableComponent } from '../../common/configuration.mjs';\nimport { setFocus } from '../../common/index.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 * @augments ConfigurableComponent<ErrorSummaryConfig>\n */\nclass ErrorSummary extends ConfigurableComponent {\n  /**\n   * @param {Element | null} $root - HTML element to use for error summary\n   * @param {ErrorSummaryConfig} [config] - Error summary config\n   */\n  constructor($root, config = {}) {\n    super($root, config);\n    if (!this.config.disableAutoFocus) {\n      setFocus(this.$root);\n    }\n    this.$root.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 = $target.hash.replace('#', '');\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 * @import { Schema } from '../../common/configuration.mjs'\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 { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Radios component\n *\n * @preserve\n */\nclass Radios extends Component {\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} $root - HTML element to use for radios\n   */\n  constructor($root) {\n    super($root);\n    this.$inputs = void 0;\n    const $inputs = this.$root.querySelectorAll('input[type=\"radio\"]');\n    if (!$inputs.length) {\n      throw new ElementError({\n        component: Radios,\n        identifier: 'Form inputs (`<input type=\"radio\">`)'\n      });\n    }\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          component: 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.$root.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 { getBreakpoint } from '../../common/index.mjs';\nimport { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Service Navigation component\n *\n * @preserve\n */\nclass ServiceNavigation extends Component {\n  /**\n   * @param {Element | null} $root - HTML element to use for header\n   */\n  constructor($root) {\n    super($root);\n    this.$menuButton = void 0;\n    this.$menu = void 0;\n    this.menuIsOpen = false;\n    this.mql = null;\n    const $menuButton = this.$root.querySelector('.govuk-js-service-navigation-toggle');\n    if (!$menuButton) {\n      return this;\n    }\n    const menuId = $menuButton.getAttribute('aria-controls');\n    if (!menuId) {\n      throw new ElementError({\n        component: ServiceNavigation,\n        identifier: 'Navigation button (`<button class=\"govuk-js-service-navigation-toggle\">`) attribute (`aria-controls`)'\n      });\n    }\n    const $menu = document.getElementById(menuId);\n    if (!$menu) {\n      throw new ElementError({\n        component: ServiceNavigation,\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('tablet');\n    if (!breakpoint.value) {\n      throw new ElementError({\n        component: ServiceNavigation,\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      setAttributes(this.$menuButton, attributesForHidingButton);\n    } else {\n      removeAttributes(this.$menuButton, Object.keys(attributesForHidingButton));\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}\nServiceNavigation.moduleName = 'govuk-service-navigation';\nconst attributesForHidingButton = {\n  hidden: '',\n  'aria-hidden': 'true'\n};\n\n/**\n * Sets a group of attributes on the given element\n *\n * @param {Element} $element - The element to set the attribute on\n * @param {{[attributeName: string]: string}} attributes - The attributes to set\n */\nfunction setAttributes($element, attributes) {\n  for (const attributeName in attributes) {\n    $element.setAttribute(attributeName, attributes[attributeName]);\n  }\n}\n\n/**\n * Removes a list of attributes from the given element\n *\n * @param {Element} $element - The element to remove the attributes from\n * @param {string[]} attributeNames - The names of the attributes to remove\n */\nfunction removeAttributes($element, attributeNames) {\n  for (const attributeName of attributeNames) {\n    $element.removeAttribute(attributeName);\n  }\n}\n\nexport { ServiceNavigation };\n//# sourceMappingURL=service-navigation.mjs.map\n","import { setFocus } from '../../common/index.mjs';\nimport { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Skip link component\n *\n * @preserve\n * @augments Component<HTMLAnchorElement>\n */\nclass SkipLink extends Component {\n  /**\n   * @param {Element | null} $root - HTML element to use for skip link\n   * @throws {ElementError} when $root is not set or the wrong type\n   * @throws {ElementError} when $root.hash does not contain a hash\n   * @throws {ElementError} when the linked element is missing or the wrong type\n   */\n  constructor($root) {\n    var _this$$root$getAttrib;\n    super($root);\n    const hash = this.$root.hash;\n    const href = (_this$$root$getAttrib = this.$root.getAttribute('href')) != null ? _this$$root$getAttrib : '';\n    if (this.$root.origin !== window.location.origin || this.$root.pathname !== window.location.pathname) {\n      return;\n    }\n    const linkedElementId = hash.replace('#', '');\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        component: SkipLink,\n        element: $linkedElement,\n        identifier: `Target content (\\`id=\"${linkedElementId}\"\\`)`\n      });\n    }\n    this.$root.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.elementType = HTMLAnchorElement;\nSkipLink.moduleName = 'govuk-skip-link';\n\nexport { SkipLink };\n//# sourceMappingURL=skip-link.mjs.map\n","import { getBreakpoint } from '../../common/index.mjs';\nimport { Component } from '../../component.mjs';\nimport { ElementError } from '../../errors/index.mjs';\n\n/**\n * Tabs component\n *\n * @preserve\n */\nclass Tabs extends Component {\n  /**\n   * @param {Element | null} $root - HTML element to use for tabs\n   */\n  constructor($root) {\n    super($root);\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    const $tabs = this.$root.querySelectorAll('a.govuk-tabs__tab');\n    if (!$tabs.length) {\n      throw new ElementError({\n        component: Tabs,\n        identifier: 'Links (`<a class=\"govuk-tabs__tab\">`)'\n      });\n    }\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.$root.querySelector('.govuk-tabs__list');\n    const $tabListItems = this.$root.querySelectorAll('li.govuk-tabs__list-item');\n    if (!$tabList) {\n      throw new ElementError({\n        component: Tabs,\n        identifier: 'List (`<ul class=\"govuk-tabs__list\">`)'\n      });\n    }\n    if (!$tabListItems.length) {\n      throw new ElementError({\n        component: 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        component: 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.$root.querySelector(`a.govuk-tabs__tab[href=\"${hash}\"]`);\n  }\n  setAttributes($tab) {\n    const panelId = $tab.hash.replace('#', '');\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 'Left':\n        this.activatePreviousTab();\n        event.preventDefault();\n        break;\n      case 'ArrowRight':\n      case 'Right':\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 = $tab.hash.replace('#', '');\n    if (!panelId) {\n      return null;\n    }\n    return this.$root.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.$root.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","import { normaliseOptions } from './common/configuration.mjs';\nimport { isSupported, isObject } 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 { FileUpload } from './components/file-upload/file-upload.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 { ServiceNavigation } from './components/service-navigation/service-navigation.mjs';\nimport { SkipLink } from './components/skip-link/skip-link.mjs';\nimport { Tabs } from './components/tabs/tabs.mjs';\nimport { SupportError, ElementError } 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 | Element | Document | null} [scopeOrConfig] - Scope of the document to search within or config for all components (with optional scope)\n */\nfunction initAll(scopeOrConfig = {}) {\n  const config = isObject(scopeOrConfig) ? scopeOrConfig : {};\n  const options = normaliseOptions(scopeOrConfig);\n  try {\n    if (!isSupported()) {\n      throw new SupportError();\n    }\n    if (options.scope === null) {\n      throw new ElementError({\n        element: options.scope,\n        identifier: 'GOV.UK Frontend scope element (`$scope`)'\n      });\n    }\n  } catch (error) {\n    if (options.onError) {\n      options.onError(error, {\n        config\n      });\n    } else {\n      console.log(error);\n    }\n    return;\n  }\n  const components = [[Accordion, config.accordion], [Button, config.button], [CharacterCount, config.characterCount], [Checkboxes], [ErrorSummary, config.errorSummary], [ExitThisPage, config.exitThisPage], [FileUpload, config.fileUpload], [NotificationBanner, config.notificationBanner], [PasswordInput, config.passwordInput], [Radios], [ServiceNavigation], [SkipLink], [Tabs]];\n  components.forEach(([Component, componentConfig]) => {\n    createAll(Component, componentConfig, options);\n  });\n}\n\n/**\n * Create all instances of a specific component on the page\n *\n * Uses the `data-module` attribute to find all elements matching the specified\n * component on the page, creating instances of the component object for each\n * of them.\n *\n * Any component errors will be caught and logged to the console.\n *\n * @template {CompatibleClass} ComponentClass\n * @param {ComponentClass} Component - class of the component to create\n * @param {ComponentConfig<ComponentClass>} [config] - Config supplied to component\n * @param {OnErrorCallback<ComponentClass> | Element | Document | null | CreateAllOptions<ComponentClass>} [scopeOrOptions] - options for createAll including scope of the document to search within and callback function if error throw by component on init\n * @returns {Array<InstanceType<ComponentClass>>} - array of instantiated components\n */\nfunction createAll(Component, config, scopeOrOptions) {\n  let $elements;\n  const options = normaliseOptions(scopeOrOptions);\n  try {\n    var _options$scope;\n    if (!isSupported()) {\n      throw new SupportError();\n    }\n    if (options.scope === null) {\n      throw new ElementError({\n        element: options.scope,\n        component: Component,\n        identifier: 'Scope element (`$scope`)'\n      });\n    }\n    $elements = (_options$scope = options.scope) == null ? void 0 : _options$scope.querySelectorAll(`[data-module=\"${Component.moduleName}\"]`);\n  } catch (error) {\n    if (options.onError) {\n      options.onError(error, {\n        component: Component,\n        config\n      });\n    } else {\n      console.log(error);\n    }\n    return [];\n  }\n  return Array.from($elements != null ? $elements : []).map($element => {\n    try {\n      return typeof config !== 'undefined' ? new Component($element, config) : new Component($element);\n    } catch (error) {\n      if (options.onError) {\n        options.onError(error, {\n          element: $element,\n          component: Component,\n          config\n        });\n      } else {\n        console.log(error);\n      }\n      return null;\n    }\n  }).filter(Boolean);\n}\n/**\n * @typedef {{new (...args: any[]): any, moduleName: string}} CompatibleClass\n */\n/**\n * Config for all components via `initAll()`\n *\n * @typedef {object} Config\n * @property {Element | Document | null} [scope] - Scope of the document to search within\n * @property {OnErrorCallback<CompatibleClass>} [onError] - Initialisation error callback\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 {FileUploadConfig} [fileUpload] - File Upload config\n * @property {NotificationBannerConfig} [notificationBanner] - Notification Banner config\n * @property {PasswordInputConfig} [passwordInput] - Password input config\n */\n/**\n * Config for individual components\n *\n * @import { AccordionConfig } from './components/accordion/accordion.mjs'\n * @import { ButtonConfig } from './components/button/button.mjs'\n * @import { CharacterCountConfig } from './components/character-count/character-count.mjs'\n * @import { ErrorSummaryConfig } from './components/error-summary/error-summary.mjs'\n * @import { ExitThisPageConfig } from './components/exit-this-page/exit-this-page.mjs'\n * @import { NotificationBannerConfig } from './components/notification-banner/notification-banner.mjs'\n * @import { PasswordInputConfig } from './components/password-input/password-input.mjs'\n * @import { FileUploadConfig } from './components/file-upload/file-upload.mjs'\n */\n/**\n * Component config keys, e.g. `accordion` and `characterCount`\n *\n * @typedef {keyof Omit<Config, 'scope' | 'onError'>} ConfigKey\n */\n/**\n * @template {CompatibleClass} ComponentClass\n * @typedef {ConstructorParameters<ComponentClass>[1]} ComponentConfig\n */\n/**\n * @template {CompatibleClass} ComponentClass\n * @typedef {object} ErrorContext\n * @property {Element} [element] - Element used for component module initialisation\n * @property {ComponentClass} [component] - Class of component\n * @property {Config | ComponentConfig<ComponentClass>} [config] - Config supplied to components\n */\n/**\n * @template {CompatibleClass} ComponentClass\n * @callback OnErrorCallback\n * @param {unknown} error - Thrown error\n * @param {ErrorContext<ComponentClass>} context - Object containing the element, component class and configuration\n */\n/**\n * @template {CompatibleClass} ComponentClass\n * @typedef {object} CreateAllOptions\n * @property {Element | Document | null} [scope] - scope of the document to search within\n * @property {OnErrorCallback<ComponentClass>} [onError] - callback function if error throw by component on init\n */\n\nexport { createAll, initAll };\n//# sourceMappingURL=init.mjs.map\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES 015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass CollapsibleCheckboxes  {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.toggleButtonClass = 'notify-button--with-chevron';\n    this.toggleButtonChevronClass = 'notify-button--with-chevron__chevron';\n    this.toggleButtonChevronActiveClass = 'notify-button--with-chevron__chevron--active';\n\n    this.$module = $module;\n    this.$selectionSummaryContainer = this.$module.querySelector('.selection-summary');\n    this.fieldLabel = this.$module.getAttribute('data-field-label');\n    this.$fieldset = this.$module.querySelector('.govuk-fieldset');\n    this.$checkboxesContainer = this.$fieldset.querySelector('.govuk-checkboxes');\n    this.$checkboxesArray = this.$fieldset.querySelectorAll('input[type=checkbox]');\n    this.legendText = this.$fieldset.querySelector('legend').textContent.trim();\n\n    this.total = this.$checkboxesArray.length;\n    this.selectionSummaryContent = {\n      all: (selection, total, field) => `All ${field}s`,\n      some: (selection, total, field) => `${selection} of ${total} ${field}s`,\n      none: (selection, total, field) => ({\n        \"folder\": \"No folders (only templates outside a folder)\",\n        \"team member\": \"No team members (only you)\"\n      }[field] || `No ${field}s`)\n    };\n\n    // add heading\n    this.addHeadingHideLegend();\n\n    // insert selection summary text\n    this.initSelectionSummary();\n\n    // insert toggle button\n    this.constructToggleButton();\n\n    // add custom classes\n    this.$fieldset.classList.add('selection-wrapper');\n    this.$checkboxesContainer.classList.add('selection-content', 'govuk-!-margin-top-3');\n\n    // hide checkboxes inside the fieldset\n    this.$fieldset.setAttribute('hidden', '');\n\n    this.handleToggleButtonClick();\n    this.handleCheckboxClick();\n  }\n\n  constructToggleButton() {\n    const $toggleButton = document.createElement('button');\n    $toggleButton.setAttribute('type', 'button');\n    $toggleButton.setAttribute('aria-expanded', 'false');\n    $toggleButton.textContent = `Choose ${this.fieldLabel}s`;\n    $toggleButton.classList.add('govuk-button', 'govuk-button--secondary', this.toggleButtonClass);\n    // visually hidden text\n    const $visuallyHiddenButtonContent = document.createElement('span');\n    $visuallyHiddenButtonContent.classList.add('govuk-visually-hidden');\n    $visuallyHiddenButtonContent.textContent = this.legendText.toLowerCase().replace(`${this.fieldLabel}s`,'');\n    // Create container for show / hide icon\n    const $toggleButtonChevron = document.createElement('span');\n    $toggleButtonChevron.classList.add(this.toggleButtonChevronClass);\n    $toggleButton.append($visuallyHiddenButtonContent);\n    $toggleButton.prepend($toggleButtonChevron);\n\n    this.$fieldset.before($toggleButton);\n  }\n\n  handleToggleButtonClick() {\n    let $button = this.$module.querySelector(`.${this.toggleButtonClass}`);\n    $button.addEventListener(\"click\", () => {\n      let expanded = $button.getAttribute('aria-expanded') === 'true' || false;\n\n      $button.setAttribute('aria-expanded', !expanded);\n      $button.querySelector(`.${this.toggleButtonChevronClass}`).classList.toggle(this.toggleButtonChevronActiveClass);\n      this.$fieldset.hidden = expanded;\n    });\n\n  }\n\n  handleCheckboxClick() {\n    this.$checkboxesArray.forEach(checkbox => {\n      checkbox.addEventListener(\"click\", () => {\n        this.updateSelectionSummary(this.getSelectionCount());\n      });\n    });\n  }\n\n  getSelectionCount() {\n    return Array.from(this.$checkboxesArray).filter((checkbox) => checkbox.checked).length;\n  }\n\n  initSelectionSummary() {\n    const $hint = this.$module.querySelector('.govuk-hint');\n    const $summaryText = document.createElement('p');\n    $summaryText.classList.add('selection-summary__text');\n\n    if (this.fieldLabel === 'folder') {\n      $summaryText.classList.add('selection-summary__text--folders');\n    }\n\n    this.$selectionSummaryContainer.setAttribute('id', $hint.getAttribute('id'));\n    this.$selectionSummaryContainer.append($summaryText);\n    this.$fieldset.before(this.$selectionSummaryContainer);\n    $hint.remove();\n\n    this.updateSelectionSummary(this.getSelectionCount());\n  }\n\n  updateSelectionSummary(count) {\n    const $selectionSummaryTextContainer =  this.$selectionSummaryContainer.querySelector('.selection-summary__text');\n    let template;\n\n    if (count === this.total) {\n      template = 'all';\n    } else if (count > 0) {\n      template = 'some';\n    } else {\n      template = 'none';\n    }\n\n    $selectionSummaryTextContainer.textContent = this.selectionSummaryContent[template](count, this.total, this.fieldLabel);\n  }\n\n  addHeadingHideLegend() {\n    const headingLevel = this.$module.getAttribute('data-heading-level') || '2';\n    const $heading = document.createElement(`H${headingLevel}`);\n    const $legend = this.$fieldset.querySelector('legend');\n    $heading.classList.add('heading-small');\n    $heading.textContent = `${this.legendText}`;\n    this.$fieldset.before($heading);\n    $legend.classList.add('govuk-visually-hidden');\n  }\n}\n\nexport default CollapsibleCheckboxes;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass ColourPreview {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.isHexColourValue = value => value.match(/^#?(?:[0-9A-F]{3}){1,2}$/i);\n    this.addHashIfNeeded = value => value.charAt(0) === '#' ? value : '#' + value;\n    this.colourOrWhite = value => this.isHexColourValue(value) ? this.addHashIfNeeded(value) : '#FFFFFF';\n\n    this.$input = $module;\n\n    // We expect the colour preview module to only ever be applied to a GOV.UK Design System text input with a prefix,\n    // which wraps the text input inside a `govuk-input__wrapper` div.\n    const $appendToElement = this.$input.parentNode;\n\n    this.$colourPreviewElement = document.createElement('span');\n    this.$colourPreviewElement.setAttribute('class', 'govuk-input__colour-preview');\n    $appendToElement.append(this.$colourPreviewElement);\n\n    this.applyBackgroundColour();\n\n    this.$input.addEventListener(\"input\", () => {\n      this.applyBackgroundColour();\n    });\n  }\n\n  applyBackgroundColour() {\n    this.$colourPreviewElement.style.background = this.colourOrWhite(this.$input.value.trim());\n  }\n}\n\nexport default ColourPreview;","import { Button, isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\n// Focus banners that do not use the GOVUK Design System Error Summary component but still need to\n// match its behaviour when they appear\n\nclass FileUpload {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.$form = $module;\n    this.$field = this.$form.querySelector('.file-upload-field');\n    this.$fieldErrors = this.$form.querySelector('.file-upload-label .govuk-error-message');\n\n    // Note: label.file-upload-label, input.file-upload-field and button.file-upload-submit\n    // are all hidden by CSS that uses the .govuk-frontend-supported class on the body tag\n\n    this.addFakeButton();\n\n    // Clear the form if the user navigates back to the page\n    window.addEventListener(\"pageshow\", () => this.$form.reset());\n\n\n    this.$form.querySelector('.file-upload-field').addEventListener('change', () => {\n      this.$form.submit();\n      this.addCancelButton();\n    });\n  \n  }\n\n  addCancelButton() {\n    const $cancelButton = document.createElement('a');\n    $cancelButton.setAttribute('role', 'button');\n    $cancelButton.setAttribute('href', '');\n    $cancelButton.classList.add('file-upload-button', 'govuk-button', 'govuk-button--warning');\n    $cancelButton.textContent = 'Cancel upload';\n\n    this.$form.querySelector('button.file-upload-button').replaceWith($cancelButton);\n\n    // add GOVUK Frontend behaviours\n    new Button($cancelButton);\n\n    // move focus to the cancel button, it is lost when the upload button is removed\n    $cancelButton.focus();\n  }\n\n  addFakeButton() {\n    const buttonText = this.$field.dataset.buttonText;\n    const fieldId = this.$field.getAttribute('id'); // copy the id across so error links work\n    const oldFieldId = `hidden-${fieldId}`;\n    let buttonHTMLStr = `\n        <button type=\"button\" class=\"file-upload-button govuk-button govuk-!-margin-right-1\" id=\"${fieldId}\">\n          ${buttonText}\n        </button>`; // Styled as a submit button to raise prominence. The type shouldn't change.\n    \n    // If errors with the upload, copy into a label above the button\n    // Buttons don't need labels by default as the accessible name comes from their text but\n    // errors need to be added to that.\n    const formErrors = Boolean(this.$fieldErrors);\n    if (formErrors) {\n      buttonHTMLStr = `\n        <label class=\"file-upload-button-label govuk-error-message\" for=\"${fieldId}\">\n          <span class=\"govuk-visually-hidden\">${buttonText} </span>\n          ${this.$fieldErrors.textContent}\n        </label>\n        ${buttonHTMLStr}`;\n    }\n\n    // Change id of field now we're using it for the button\n    this.$field.setAttribute('id', oldFieldId);\n    this.$field.parentNode.querySelector(`label[for=${fieldId}]`).setAttribute('for', oldFieldId);\n    this.$field.insertAdjacentHTML('afterend', buttonHTMLStr);\n\n    document.querySelector('button.file-upload-button').addEventListener('click', () => {\n      this.$field.click();\n    });\n  }\n}\n\nexport default FileUpload;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass Autofocus {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n    this.$component = $module;\n    const forceFocus = Boolean(this.$component.dataset.forceFocus);\n    const arrayOfTargetElements = ['input', 'textarea', 'select'];\n    // if the page loads with a scroll position, we can't assume the item to focus onload\n    // is still where users intend to start\n    if ((window.scrollY > 0) && !forceFocus) { return; }\n\n    // See if the component itself is something we want to send focus to\n    // Otherwise look inside the component to see if there are any elements\n    // we want to send focus to\n    let target = arrayOfTargetElements.includes(this.$component.tagName.toLowerCase())\n      ? this.$component\n      : this.$component.querySelector(arrayOfTargetElements.join(','));\n    target.focus();\n  }\n}\n\nexport default Autofocus;\n","import { isSupported } from 'govuk-frontend';\n\nclass Homepage {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    let iterations = 0;\n    let timeout = null;\n\n    $module.addEventListener(\"click\", () => {\n      if (++iterations == 5) {\n        $module.classList.toggle('product-page-intro-wrapper--alternative');\n      }\n      clearTimeout(timeout);\n      timeout = setTimeout(() => iterations = 0, 1500);\n    });\n  }\n}\n\nexport default Homepage;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass PreviewPane {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.branding_style = $module.value;\n    this.$form = $module.form;\n    this.$paneWrapper = this.$form.querySelector('.govuk-grid-column-full');\n    this.previewType = this.$form.dataset.previewType;\n    this.letterBrandingPreviewRootPath = `templates/${this.previewType}-preview-image`;\n\n    this.applyPreviewPane(this.previewType);\n    \n    this.$form.setAttribute('action', location.pathname.replace(new RegExp(`set-${this.previewType}-branding$`), `preview-${this.previewType}-branding`));\n    this.$form.querySelector('button').textContent = 'Save';\n\n    this.$form.querySelector('fieldset').addEventListener(\"change\", (e) => {\n      if (e.target.matches('input[name=\"branding_style\"]')) {\n        this.setPreviewPane(e.target);\n      }\n    });\n  }\n\n  applyPreviewPane(previewType) {\n    previewType === 'letter' ? this.generateImagePreview() : this.generateIframePreview();\n  }\n\n  // we want to generate this just-in-time as otherwise\n  // once the image is appended, src does a http request\n  // even if the previewType is letter\n  generateImagePreview() {\n    let imagePreviewPane = document.createElement('div');\n    imagePreviewPane.setAttribute('class','branding-preview-image');\n    let imagePreviewPaneImage = document.createElement('img');\n    imagePreviewPaneImage.setAttribute('alt','Preview of selected letter branding');\n    imagePreviewPaneImage.setAttribute('src', `/${this.letterBrandingPreviewRootPath}?${this.buildQueryString([\"branding_style\", this.branding_style])}`);\n    imagePreviewPane.appendChild(imagePreviewPaneImage);\n    this.$paneWrapper.append(imagePreviewPane);\n  }\n\n  generateIframePreview() {\n    let iframePreviewPane = document.createElement('iframe');\n    iframePreviewPane.setAttribute('class','branding-preview');\n    iframePreviewPane.setAttribute('scrolling','no');\n    iframePreviewPane.setAttribute('src',`/_${this.previewType}?${this.buildQueryString(['branding_style', this.branding_style])}`);\n    this.$paneWrapper.append(iframePreviewPane);\n  }\n\n  buildQueryString () {\n    // we can accept multiple arrays of parameters\n    // but here we only have 2\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments\n    const data = Array.from(arguments);\n    return data.map((val, _idx) => `${encodeURI(val[0])}=${encodeURI(val[1])}`).join('&');\n  }\n  \n  setPreviewPane ($target) {\n    this.branding_style = $target.value;\n    this.previewType === 'letter' ?\n      this.$paneWrapper.querySelector('img').setAttribute('src', `/${this.letterBrandingPreviewRootPath}?${this.buildQueryString(['branding_style', this.branding_style])}`)\n    :\n      this.$paneWrapper.querySelector('iframe').setAttribute('src', `/_${this.previewType}?${this.buildQueryString(['branding_style', this.branding_style])}`);\n    ;\n  }\n}\n\nexport default PreviewPane;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass CopyToClipboard {\n  constructor($module) {\n    if (!isSupported() || !navigator.clipboard) {\n      return this;\n    }\n\n    this.states = {\n      'valueVisible': (options) => {\n        return {\n          'value': `<span class=\"copy-to-clipboard__value\">${options.valueLabel ?'<span class=\"govuk-visually-hidden\">' +\n                      options.thing +': </span>' : ''}${options.value}</span>`,\n          'notice': {\n            'classes': \"copy-to-clipboard__notice govuk-visually-hidden\",\n            'content': options.onload ? '' : options.thing + ' showing, use button to copy to clipboard'\n          },\n          'button': {\n            'classes': \"govuk-button govuk-button--secondary copy-to-clipboard__button--copy\",\n            'content': `Copy ${options.thing} to clipboard${options.name ? '<span class=\"govuk-visually-hidden\"> for ' + options.name + '</span>' : ''}`\n          }\n        };\n      },\n      'valueCopied': (options) => {\n        return {\n          'value': '',\n          'notice': {\n            'classes': \"copy-to-clipboard__notice\",\n            'content': `<span class=\"govuk-visually-hidden\">${options.thing} </span>Copied to clipboard<span class=\"govuk-visually-hidden\">, use button to show in page</span>`\n          },\n          'button': {\n            'classes': \"govuk-button govuk-button--secondary copy-to-clipboard__button--show\",\n            'content': `Show ${options.thing}${options.name ? '<span class=\"govuk-visually-hidden\"> for ' + options.name + '</span>' : ''}`\n          }\n        };\n      }\n    };\n    this.$module = $module;\n    this.stateOptions = {\n      value: this.$module.dataset.value,\n      thing: this.$module.dataset.thing\n    };\n    this.name = this.$module.dataset.name;\n\n    // if the name is distinct from the thing:\n    // - it will be used in the rendering\n    // - the value won't be identified by a heading so needs its own label\n    if (this.name.toLowerCase() !== this.stateOptions.thing.toLowerCase()) {\n      this.stateOptions.name = this.name;\n      this.stateOptions.valueLabel = true;\n    }\n    this.$module.classList.add('copy-to-clipboard');\n    \n    // button and SR elements are added\n    this.updateHTML('valueVisible', {...{ 'onload': true }, ...this.stateOptions}, this.$module);\n\n    this.$module.addEventListener('click', (e) => {\n      const $target = e.target;\n      if ($target.tagName === \"BUTTON\") {\n        const buttonWasClicked = $target.classList.contains('copy-to-clipboard__button--show');\n        if (buttonWasClicked) {\n          this.updateHTML(buttonWasClicked, this.stateOptions, this.$module, $target);\n        } else {\n          this.copyValueToClipboard(\n            this.getRangeFromElement(this.$module.querySelector('.copy-to-clipboard__value'))\n          );\n          this.updateHTML(buttonWasClicked, this.stateOptions, this.$module, $target);\n        };\n      }\n    });\n\n    if ('stickAtBottomWhenScrolling' in window.GOVUK) {\n      window.GOVUK.stickAtBottomWhenScrolling.recalculate();\n    }\n  }\n  \n  updateHTML (buttonWasClicked, stateOptions, $module, $button) {\n    // use the correct state key to update the HTML\n    // if the button was clicked then content needs to change to reflect that\n    // e.g say 'copied, ....\n    const stateKey = buttonWasClicked ? 'valueVisible' : 'valueCopied';\n    const state = this.states[stateKey](stateOptions);\n\n    $module.querySelectorAll('.copy-to-clipboard__value').forEach(e => e.remove());\n    if (state.value !== '') {\n      $module.insertAdjacentHTML('afterbegin', state.value);\n    }\n    let $clipboardNoticeEl = $module.querySelector('.copy-to-clipboard__notice');\n    $clipboardNoticeEl.innerHTML = state.notice.content;\n    $clipboardNoticeEl.setAttribute('class', state.notice.classes);\n\n    !$button ? this.generateButton(state) : this.updateButton(state, $button);\n  }\n\n  generateButton (state) {\n    let $newButton = document.createElement('button');\n    $newButton.setAttribute('class', state.button.classes);\n    $newButton.innerHTML = state.button.content;\n    this.$module.append($newButton);\n  }\n\n  updateButton (state, $button) {\n    $button.innerHTML = state.button.content;\n    $button.removeAttribute('class');\n    $button.setAttribute('class', state.button.classes);\n  }\n\n  async copyValueToClipboard(text){\n    try {\n      await navigator.clipboard.writeText(text);\n    } catch (err) {\n      console.error('Failed to copy: ', err);\n    }\n  }\n\n  getRangeFromElement (copyableElement) {\n    const range = document.createRange();\n    const childNodes = Array.prototype.slice.call(copyableElement.childNodes);\n    let prefixIndex = -1;\n\n    childNodes.forEach((el, idx) => {\n      if ((el.nodeType === 1) && el.classList.contains('govuk-visually-hidden')) {\n        prefixIndex = idx;\n      }\n    });\n\n    range.selectNodeContents(copyableElement);\n    if (prefixIndex !== -1) { range.setStart(copyableElement, prefixIndex + 1); }\n\n    return range;\n  };\n}\n\nexport default CopyToClipboard;\n","import { isSupported } from 'govuk-frontend';\n\nclass _ListEntry {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    const idPattern = $module.getAttribute('id');\n\n    if (idPattern === null) { return false; }\n    this.idPattern = idPattern;\n    this.elementSelector = '.list-entry, .input-list__button--remove, .input-list__button--add';\n    this.sharedInputClasses = ['govuk-input', 'govuk-input--numbered'];\n    this.entries = [];\n    this.$wrapper = $module;\n    this.minEntries = 2;\n    this.listItemName = this.$wrapper.dataset.listItemName;\n    this.getCustomClasses();\n    this.getSharedAttributes();\n\n    this.getValuesAndErrors();\n    this.maxEntries = this.entries.length;\n    this.trimEntries();\n    this.render();\n    this.bindEvents();\n  }\n\n  entryTemplate (dataObj) {\n    const { error, id, name, listItemName, number, value, customClasses, button, sharedInputClasses, sharedAttributes } = dataObj;\n\n    return `\n      <div class=\"list-entry\">\n        <div class=\"govuk-form-group${error ? ' govuk-form-group--error' : ''}\">\n          <label for=\"${id}\" class=\"govuk-label govuk-input--numbered__label${error ? ' govuk-input--numbered__label--error' : ''}\">\n           <span class=\"govuk-visually-hidden\">${listItemName} number </span>${number}.\n          </label>\n          ${error ?\n          `<p id=\"${id}-error\" class=\"govuk-error-message\" data-notify-module=\"track-error\" data-error-type=\"${error}\" data-error-label=\"${name}\">\n           <span class=\"govuk-visually-hidden\">Error: </span>${error}\n          </p>` : ''}\n          <input\n           name=\"${name}\"\n           id=\"${id}\"\n           ${value ? `value=\"${value}\"` : ''}\n           class=\"${sharedInputClasses}${customClasses ? ` ${customClasses}` : ''}${error ? ' govuk-input--error' : ''}\"\n           ${error ? `aria-describedby=\"${id}-error\"` : ''}\n           ${sharedAttributes}\n          />\n          ${button ? `\n          <button type=\"button\" class=\"govuk-button govuk-button--secondary input-list__button--remove\">\n          Remove<span class=\"govuk-visually-hidden\"> ${listItemName} number ${number}</span>\n          </button>` : ''}\n        </div>\n      </div>`;\n  }\n\n  addButtonTemplate (dataObj) {\n    const { listItemName, entriesLeft } = dataObj;\n\n    return `<button type=\"button\" class=\"govuk-button govuk-button--secondary input-list__button--add\">Add another ${listItemName} (${entriesLeft} remaining)</button>`;\n  }\n\n  getSharedAttributes () {\n    var $inputs = this.$wrapper.querySelectorAll('input'),\n        attributeTemplate = dataObj => {\n          const { name, value } = dataObj;\n\n          return ` ${name}=\"${value}\"`;\n        },\n        protectedAttributes = ['id', 'name', 'value', 'class', 'aria-describedby'],\n        attributes = [],\n        attrIdx,\n        elmAttributes,\n        getAttributesHTML;\n\n    getAttributesHTML = function (attrsByElm) {\n      var attrStr = '',\n          elmIdx = attrsByElm.length,\n          existingAttributes = [],\n          elmAttrs,\n          attrIdx;\n\n      while (elmIdx--) {\n        elmAttrs = attrsByElm[elmIdx];\n        attrIdx = elmAttrs.length;\n        while (attrIdx--) {\n          // prevent duplicates\n          if (!existingAttributes.includes(elmAttrs[attrIdx].name)) {\n            attrStr += attributeTemplate({ 'name': elmAttrs[attrIdx].name, 'value': elmAttrs[attrIdx].value });\n            existingAttributes.push(elmAttrs[attrIdx].name);\n          }\n        }\n      }\n      return attrStr;\n    };\n\n    $inputs.forEach(function (elm) {\n      attrIdx = elm.attributes.length;\n      elmAttributes = [];\n      while(attrIdx--) {\n        if (!protectedAttributes.includes(elm.attributes[attrIdx].name)) {\n          elmAttributes.push({\n            'name': elm.attributes[attrIdx].name,\n            'value': elm.attributes[attrIdx].value\n          });\n        }\n      }\n      if (elmAttributes.length) {\n        attributes.push(elmAttributes);\n      }\n    });\n\n    this.sharedAttributes = (attributes.length) ? getAttributesHTML(attributes) : '';\n  }\n\n  getCustomClasses () {\n    this.customClasses = [];\n    this.$wrapper.querySelectorAll('input').forEach(function ($elm) {\n      var customClassesForElm = [];\n\n      $elm.classList.forEach(token => {\n        if (!this.sharedInputClasses.includes(token) && (token !== 'govuk-input--error')) {\n          customClassesForElm.push(token);\n        }\n      });\n\n      if (customClassesForElm.length > 0) {\n        this.customClasses.push(customClassesForElm);\n      }\n    }.bind(this));\n  }\n\n  getValuesAndErrors () {\n    this.entries = [];\n    this.errors = [];\n    this.$wrapper.querySelectorAll('input').forEach(function ($elm) {\n      var val = $elm.value;\n      var $error = $elm.previousElementSibling;\n\n      $error = $error.matches('p.govuk-error-message') ? $error : null;\n\n      this.entries.push(val);\n      if ($error !== null) {\n        this.errors.push($error.textContent.trim().replace('Error: ', ''));\n      } else {\n        this.errors.push(null);\n      }\n    }.bind(this));\n  }\n\n  trimEntries () {\n    var entryIdx = this.entries.length,\n        newEntries = [];\n\n    while (entryIdx--) {\n      if (this.entries[entryIdx] !== '') {\n        newEntries.push(this.entries[entryIdx]);\n      } else {\n        if (entryIdx < this.minEntries) {\n          newEntries.push('');\n        }\n      }\n    }\n    this.entries = newEntries.reverse();\n  }\n\n  getId (num) {\n    var pattern = this.idPattern.replace(\"list-entry-\", \"\");\n    if (\"undefined\" === typeof num) {\n      return pattern;\n    } else {\n      return pattern + \"-\" + num;\n    }\n  }\n\n  bindEvents () {\n    this.$wrapper.addEventListener('click', function (e) {\n      if (e.target.matches('.input-list__button--remove')) {\n        this.removeEntry($(e.target));\n      }\n      if (e.target.matches('.input-list__button--add')) {\n        this.addEntry();\n      }\n    }.bind(this));\n  }\n\n  shiftFocus (opts) {\n    var numberTargeted;\n\n    if (opts.action === 'remove') {\n      numberTargeted = (opts.entryNumberFocused > 1) ? opts.entryNumberFocused - 1 : 1;\n    } else { // opts.action === 'add'\n      numberTargeted = opts.entryNumberFocused + 1;\n    }\n    this.$wrapper.querySelectorAll('.list-entry')[numberTargeted - 1].querySelector('input').focus();\n  }\n\n  removeEntryFromEntriesAndErrors (entryNumber) {\n    var entryIdx = entryNumber - 1;\n\n    this.entries.splice(entryIdx, 1);\n    this.errors.splice(entryIdx, 1);\n  }\n\n  addEntry ($removeButton) {\n    var currentLastEntryNumber = this.entries.length;\n\n    this.getValuesAndErrors();\n    this.entries.push('');\n    this.render();\n    this.shiftFocus({ 'action' : 'add', 'entryNumberFocused' : currentLastEntryNumber });\n  }\n\n  removeEntry ($removeButton) {\n    var entryNumber = parseInt($removeButton.find('span').text().match(/\\d+/)[0], 10);\n\n    this.getValuesAndErrors();\n    this.removeEntryFromEntriesAndErrors(entryNumber);\n    this.render();\n    this.shiftFocus({ 'action' : 'remove', 'entryNumberFocused' : entryNumber });\n  }\n\n  render () {\n    this.$wrapper.querySelectorAll(this.elementSelector).forEach(el => el.remove());\n    this.entries.forEach(function (entry, idx) {\n      var entryNumber = idx + 1,\n          error = this.errors[idx],\n          customClasses = this.customClasses[idx],\n          dataObj = {\n            'id' : this.getId(entryNumber),\n            'number' : entryNumber,\n            'index': idx,\n            'name' : this.getId(entryNumber),\n            'value' : entry,\n            'listItemName' : this.listItemName,\n            'sharedInputClasses': this.sharedInputClasses.join(' '),\n            'sharedAttributes': this.sharedAttributes\n          };\n\n      if (entryNumber > 1) {\n        dataObj.button = true;\n      }\n      if (error !== null) {\n        dataObj.error = error;\n      }\n      if (customClasses !== null) {\n        dataObj.customClasses = ' ' + customClasses.join(' ');\n      }\n      this.$wrapper.insertAdjacentHTML('beforeend', this.entryTemplate(dataObj));\n    }.bind(this));\n    if (this.entries.length < this.maxEntries) {\n      this.$wrapper.insertAdjacentHTML('beforeend', this.addButtonTemplate({\n        'listItemName' : this.listItemName,\n        'entriesLeft' : (this.maxEntries - this.entries.length)\n      }));\n    }\n  }\n}\n\nconst _lists = [];\n\nclass ListEntry {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    _lists.push(new _ListEntry($module));\n  }\n}\n\nexport default ListEntry;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass RadiosWithImages {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.$module = $module;\n    this.$module.addEventListener('click', this.handleImageClick);\n\n    const image_input = this.$module.nextElementSibling.querySelector(`[aria-describedby=\"${this.$module.id}\"]`);\n    this.$module.style.cursor = image_input.disabled ? 'not-allowed' : 'pointer';\n  }\n\n  handleImageClick () {\n    const image_input = this.nextElementSibling.querySelector(`[aria-describedby=\"${this.id}\"]`);\n    if (image_input.disabled) {\n      return;\n    }\n    image_input.checked = true;\n    image_input.focus();\n  };\n}\n\nexport default RadiosWithImages;\n","import { isSupported } from 'govuk-frontend';\n\nclass LiveSearch {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.$module = $module;\n\n    this.$searchBox = this.$module.querySelector('input');\n    this.$searchLabel = this.$module.querySelector('label');\n    this.$liveRegion = this.$module.querySelector('.live-search__status');\n    this.$targets = document.querySelectorAll(this.$module.dataset.targets);\n    this.state = 'loaded';\n\n\n    this.$searchBox.addEventListener(\"input\", () => {\n      this.filter(this.$searchBox, this.$searchLabel, this.$liveRegion, this.$targets);\n    });\n\n    this.filter(this.$searchBox, this.$searchLabel, this.$liveRegion, this.$targets);\n\n  }\n\n  filter ($searchBox, $searchLabel, $liveRegion, $targets) {\n\n    let query = this.normalize(this.$searchBox.value);\n    let results = 0;\n\n    $targets.forEach(($node) => {\n\n      let contents = $node.querySelectorAll('.live-search-relevant').length ? $node.querySelectorAll('.live-search-relevant') : [$node];\n      let isMatch = false;\n\n      contents.forEach((content_item) => {\n        if (this.normalize(content_item.textContent).includes(this.normalize(query))) {\n          isMatch = true;\n        }\n      });\n\n      // if there is a child node with checked state\n      if ($node.querySelectorAll(':checked').length > 0) {\n        if ($node.hasAttribute('hidden')) {\n          $node.removeAttribute('hidden');\n        }\n        results++;\n        return;\n      }\n\n      if (query == '') {\n        if ($node.hasAttribute('hidden')) {\n          $node.removeAttribute('hidden');\n        }\n        // specific to template list as we have items hidden by default in css\n        // (items with ancestors) that we need to show if they match the search query\n        // but also hide them back when there is no search query\n        if ($node.classList.contains('visible-as-matches-search-query')) {\n          $node.classList.remove('visible-as-matches-search-query');\n        }\n        results++;\n        return;\n      }\n\n      if (isMatch) {\n        $node.removeAttribute('hidden');\n        // specific to template list as we have items hidden by default in css\n        // (items with ancestors) that we need to show if they match the search query\n        // we do that by applying a new class with display block property\n        if ($node.classList.contains('template-list-item-hidden-by-default')) {\n          $node.classList.add('visible-as-matches-search-query');\n        }\n      } else {\n        $node.setAttribute('hidden', '');\n        // specific to template list as we have items hidden by default in css\n        // (items with ancestors) that we now need to hide again when they don't\n        // match the search criteria\n        if ($node.classList.contains('visible-as-matches-search-query')) {\n          $node.classList.remove('visible-as-matches-search-query');\n        }\n      };\n\n      if (isMatch) {\n        results++;\n      }\n\n    });\n\n    if (this.state === 'loaded') {\n      if (query !== '') {\n       $searchBox.setAttribute('aria-label', $searchLabel.textContent.trim() + ', ' + this.resultsSummary(results));\n      }\n      this.state = 'active';\n    } else {\n      $searchBox.removeAttribute('aria-label');\n      $liveRegion.textContent = this.resultsSummary(results);\n    }\n\n    // make sticky JS recalculate its cache of the element's position\n    // because live search can change the height document\n    if ('stickAtBottomWhenScrolling' in window.GOVUK) {\n      window.GOVUK.stickAtBottomWhenScrolling.recalculate();\n    }\n\n  }\n\n  normalize (string) {\n    return string.toLowerCase().replace(/ /g,'');\n  }\n\n  resultsSummary (num) {\n    if (num === 0) {\n      return \"no results\";\n    } else {\n      return num + (num === 1 ? \" result\" : \" results\");\n    }\n  };\n}\n\nexport default LiveSearch;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass EnhancedTextbox {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    // guard against CSS not being loaded\n    if (window.getComputedStyle($module)['position'] !== 'relative') {\n      return this;\n    }\n\n    this.$module = $module;\n    this.tagPattern = /\\(\\(([^()?]+)(\\?\\?)?([^()]*)\\)\\)/g;\n    this.highlightPlaceholders = this.$module.dataset.highlightPlaceholders === 'true';\n    this.autofocus = this.$module.dataset.autofocusTextbox === 'true';\n    this.$textbox = this.$module;\n\n    // wrap module in a container\n    this.$wrappingElement = document.createElement('div');\n    this.$wrappingElement.classList.add('govuk-textarea-highlight__wrapper');\n    this.$textbox.replaceWith(this.$wrappingElement);\n    this.$wrappingElement.appendChild(this.$textbox);\n\n    // append a background container to the module\n    this.$backgroundHighlightElement = document.createElement('div');\n    this.$backgroundHighlightElement.classList.add('govuk-textarea-highlight__background');\n    this.$backgroundHighlightElement.setAttribute('aria-hidden', 'true');\n    this.$textbox.after(this.$backgroundHighlightElement);\n\n    this.$textbox.addEventListener(\"input\", this.update.bind(this));\n    window.addEventListener(\"resize\", this.resize.bind(this));\n\n    this.$visibleTextbox = this.$textbox.cloneNode(true);\n    this.$visibleTextbox.style.position = 'absolute';\n    this.$visibleTextbox.style.visibility = 'hidden';\n    this.$visibleTextbox.style.display = 'block';\n    document.querySelector('body').append(this.$visibleTextbox);\n\n    this.initialHeight = this.$visibleTextbox.offsetHeight;\n\n    this.$backgroundHighlightElement.style.borderWidth =\n      window.getComputedStyle(this.$textbox).getPropertyValue('border-width');\n\n    this.$visibleTextbox.remove();\n    this.$textbox.dispatchEvent(new Event('input', { bubbles: true }));\n\n    if (this.autofocus) {\n      this.$textbox.focus();\n    }\n  }\n\n  resize () {\n    this.$backgroundHighlightElement.style.width = window.getComputedStyle(this.$textbox).width;\n    this.$textbox.style.height =\n      `${Math.max(\n          this.initialHeight,\n          this.$backgroundHighlightElement.offsetHeight\n      )}px`;\n\n    if ('stickAtBottomWhenScrolling' in window.GOVUK) {\n      window.GOVUK.stickAtBottomWhenScrolling.recalculate();\n    }\n  }\n\n  contentEscaped () {\n    const $el = document.createElement('div');\n    $el.innerHTML = this.$textbox.value;\n    return $el.innerHTML;\n  }\n\n  contentReplaced () {\n    return this.contentEscaped().replace(\n      this.tagPattern, (match, name, separator, value) => {\n        if (value && separator) {\n          return `<span class='placeholder-conditional'>((${name}??</span>${value}))`;\n        } else {\n          return `<span class='placeholder'>((${name}${value}))</span>`;\n        }\n      }\n    );\n  }\n\n  update () {\n    this.$backgroundHighlightElement.innerHTML =\n      this.highlightPlaceholders ? this.contentReplaced() : this.contentEscaped();\n\n    this.resize();\n  }\n}\n\nexport default EnhancedTextbox;\n","const locationReload = () => {\n  window.location.reload();\n};\n\nconst locationReplace = (pathName) => {\n  window.location.replace(pathName);\n};\n\nconst locationAssign = (pathName) => {\n  window.location.assign(pathName);\n};\n\nexport {\n  locationAssign,\n  locationReload,\n  locationReplace\n};","import { locationReplace } from '../utils/location.mjs';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass CheckReportStatus {\n  constructor($module) {\n    // if (!isSupported()) {\n    //   return this;\n    // }\n\n    this.$module = $module;\n    this.fetchInterval = 20000;\n    this.redirectDelay = 10000;\n    this.reportStatusEndpoint = `${location.pathname}/status.json`;\n    this.reportReadyStatus = 'stored';\n    this.reportFailedStatus = 'failed';\n    this.currentCheck = null;\n\n  }\n\n  runCheck() {\n    this.currentCheck = this.checkStatus();\n  }\n\n  async checkStatus() {\n    try {\n      const response = await fetch(this.reportStatusEndpoint);\n      if (!response.ok) {\n        throw new Error('Error checking report status: no response');\n      }\n      const data = await response.json();\n      this.processStatus(data.status);\n    } catch (error) {\n      console.error('Error checking report status:', error);\n      setTimeout(this.runCheck.bind(this), this.fetchInterval);\n    }\n  }\n\n  processStatus(status) {\n    if (status === this.reportReadyStatus || status === this.reportFailedStatus) {\n      this.updatePageText();\n      setTimeout(() => {\n        locationReplace(location.pathname);\n      }, this.redirectDelay);\n    } else {\n      setTimeout(this.runCheck.bind(this), this.fetchInterval);\n    }\n  }\n\n  updatePageText() {\n    const statusUpdateText = document.createElement('p');\n    statusUpdateText.classList.add('govuk-body');\n    statusUpdateText.textContent = 'Report status has been updated. We will redirect you shortly.';\n    this.$module.innerHTML = '';\n    this.$module.append(statusUpdateText);\n  }\n}\n\nexport default CheckReportStatus;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass LiveCheckboxControls {\n    constructor (form) {\n      if (!isSupported()) {\n        return this;\n      }\n      this.$form = form;\n      this.$liveRegionCounter = this.$form.querySelector('.selection-counter');\n\n      // variants of the noun for checkbox items, used by sentences describing what is selected\n      this.thing = {\n        singular: this.$form.dataset.thingSingular || 'option',\n        plural: this.$form.dataset.thingPlural || 'options'\n      };\n\n      this.$liveRegionCounter.insertAdjacentHTML('beforebegin', this.nothingSelectedHint);\n      this.$liveRegionCounter.insertAdjacentHTML('beforebegin', this.itemsSelectedHint);\n\n      // all the diff states that we want to show or hide\n      this.states = [\n        {\n          key: 'nothing-selected-hint',\n          $el: this.$form.querySelector('#nothing-selected'),\n          cancellable: false\n        },\n        {\n          key: 'items-selected-hint',\n          $el: this.$form.querySelector('#items-selected'),\n          cancellable: false\n        }\n      ];\n\n      // clear/select-all buttons only relevant if JS enabled, so\n      this.states.filter(state => state.key === 'nothing-selected-hint').forEach(state => this.onNothingSelected(state));\n      this.states.filter(state => state.key === 'items-selected-hint').forEach(state => this.onSomethingSelected(state));\n\n      this._lastState = this.$form.dataset.prevState;\n      if (this._lastState === undefined) {\n        this.showInitialState();\n      } else {\n        this.currentState = this._lastState;\n        this.render();\n      }\n\n      this.$form.addEventListener('change', (evt) => {\n        if (evt.target.matches('input[type=checkbox]')) { this.onCheckboxChanged(); }\n      });\n    }\n\n    // Default behaviour - show a 'Select all' link/button if no checkboxes are selected\n    onNothingSelected (state) {\n      const $clear = this.makeActionButton('Select all', {\n        'onclick': () => {\n\n          // check all templates and folders\n          this.$form.querySelectorAll('input[type=checkbox]').forEach(el => {\n            el.setAttribute('checked', 'checked');\n            el.checked = true;\n          });\n\n          // move focus to the first checkbox\n          this.$form.querySelectorAll('input[type=checkbox]')[0].focus();\n          this.showInitialState();\n        },\n        'nonvisualText': `${this.thing.plural}`\n      });\n\n      state.$el.querySelector('.checkbox-list-selected-counter').append($clear);\n    }\n\n    // Default behaviour - show a 'Clear' link/button if any checkboxes are selected\n    onSomethingSelected (state) {\n      const $clear = this.makeActionButton('Clear', {\n        'onclick': () => {\n\n          // uncheck all templates and folders\n          this.$form.querySelectorAll('input[type=checkbox]').forEach(el => {\n            el.removeAttribute('checked');\n            el.checked = false;\n          });\n\n          // move focus to the first checkbox\n          this.$form.querySelectorAll('input[type=checkbox]')[0].focus();\n          this.showInitialState();\n        },\n        'nonvisualText': \"selection\"\n      });\n\n      state.$el.querySelector('.checkbox-list-selected-counter').append($clear);\n    }\n\n    get selectionStatus () {\n      return {\n        'default': () => {\n          return `No ${this.thing.plural} selected`;\n        },\n        'selected': numSelected => {\n          if (numSelected === 1) {\n            return `1 ${this.thing.singular} selected`;\n          } else {\n            return `${numSelected} ${this.thing.plural} selected`;\n          }\n        },\n        'update': numSelected => {\n          const message = (numSelected > 0) ? this.selectionStatus.selected(numSelected) : this.selectionStatus.default();\n\n          document.querySelector('.checkbox-list-selected-counter__count').innerHTML = message;\n          this.$liveRegionCounter.innerHTML = message;\n        }\n      };\n    }\n\n    makeActionButton (text, opts) {\n      const $btn = document.createElement('a');\n      const callback = (evt) => {\n        // space, enter or no keyCode (must be mouse input)\n        if ([13, 32, undefined].includes(evt.keyCode)) {\n          evt.preventDefault();\n          if (opts.hasOwnProperty('onclick')) { opts.onclick(); }\n        }\n      };\n\n      $btn.setAttribute('href', '');\n      $btn.innerHTML = text;\n      $btn.classList.add('govuk-link', 'govuk-link--no-visited-state', 'js-action');\n      $btn.setAttribute('tabindex', '0');\n      $btn.addEventListener('click', callback);\n      $btn.addEventListener('keydown', callback);\n\n      if (opts.hasOwnProperty('nonvisualText')) {\n        $btn.insertAdjacentHTML('beforeend', `<span class=\"govuk-visually-hidden\"> ${opts.nonvisualText}</span>`);\n      }\n\n      return $btn;\n    }\n\n    showInitialState () {\n      // Reset the form to initial state, where nothing is selected\n      this.currentState = 'nothing-selected-hint';\n      this.onCheckboxChanged();\n    }\n\n    stateHasChanged () {\n      const changed = this.currentState !== this._lastState;\n\n      this._lastState = this.currentState;\n      return changed;\n    }\n\n    onCheckboxChanged () {\n      const numSelected = this.countSelectedCheckboxes();\n\n      if (this.currentState === 'nothing-selected-hint' && numSelected !== 0) {\n        // user has just selected first item\n        this.currentState = 'items-selected-hint';\n      } else if (this.currentState === 'items-selected-hint' && numSelected === 0) {\n        // user has just deselected last item\n        this.currentState = 'nothing-selected-hint';\n      }\n\n      if (this.stateHasChanged()) {\n        this.render();\n      }\n\n      this.selectionStatus.update(numSelected);\n    };\n\n    countSelectedCheckboxes () {\n      return this.$form.querySelectorAll('input[type=checkbox]:checked').length;\n    }\n\n    render () {\n      // detach everything, unless they are the currentState\n      this.states.forEach(\n        state => (state.key === this.currentState ? this.$liveRegionCounter.insertAdjacentElement('beforebegin', state.$el) : state.$el.remove())\n      );\n    }\n\n    get nothingSelectedHint () {\n      return `\n        <div id=\"nothing-selected\">\n          <div class=\"checkbox-list-selected-counter\">\n            <span class=\"checkbox-list-selected-counter__count\" aria-hidden=\"true\"></span>\n          </div>\n        </div>`;\n    }\n\n    get itemsSelectedHint () {\n      return `\n        <div id=\"items-selected\">\n          <div class=\"checkbox-list-selected-counter\">\n            <span class=\"checkbox-list-selected-counter__count\" aria-hidden=\"true\"></span>\n          </div>\n        </div>`;\n  }\n}\n\nexport default LiveCheckboxControls;\n","import LiveCheckboxControls from './live-checkbox-controls.mjs';\n\nclass AddBrandingOptionsControls extends LiveCheckboxControls {\n  onNothingSelected (state) {}\n}\n\nexport default AddBrandingOptionsControls;\n","// Taken from https://youmightnotneedjquery.com/#offset\nfunction offset(el) {\n  const box = el.getBoundingClientRect();\n  const docElem = document.documentElement;\n  return {\n    top: box.top + window.scrollY - docElem.clientTop,\n    left: box.left + window.scrollX - docElem.clientLeft\n  };\n}\n\nexport { offset };\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar Caret;\n(function (Caret) {\n    /**\n     * Returns the Absolute (relative to the inner window size) position of the caret in the given element.\n     * @param element Input (has to be type='text') or Text Area.\n     */\n    function getAbsolutePosition(element) {\n        var caretRelPost = getRelativePosition(element);\n        return {\n            left: window.scrollX + element.getBoundingClientRect().left + caretRelPost.left,\n            top: window.scrollY + element.getBoundingClientRect().top + caretRelPost.top,\n            absolute: true,\n            height: caretRelPost.height\n        };\n    }\n    Caret.getAbsolutePosition = getAbsolutePosition;\n    /**\n     * Returns the relative position of the caret in the given element.\n     * @param element Input (has to be type='text') or Text Area.\n     */\n    function getRelativePosition(element, options) {\n        if (options === void 0) { options = { debug: false, useSelectionEnd: false, checkWidthOverflow: true }; }\n        var selectionStart = element.selectionStart !== null ? element.selectionStart : 0;\n        var selectionEnd = element.selectionEnd !== null ? element.selectionEnd : 0;\n        var position = options.useSelectionEnd ? selectionEnd : selectionStart;\n        // We'll copy the properties below into the mirror div.\n        // Note that some browsers, such as Firefox, do not concatenate properties\n        // into their shorthand (e.g. padding-top, padding-bottom etc. -> padding),\n        // so we have to list every single property explicitly.\n        var properties = [\n            'direction',\n            'boxSizing',\n            'width',\n            'height',\n            'overflowX',\n            'overflowY',\n            'borderTopWidth',\n            'borderRightWidth',\n            'borderBottomWidth',\n            'borderLeftWidth',\n            'borderStyle',\n            'paddingTop',\n            'paddingRight',\n            'paddingBottom',\n            'paddingLeft',\n            // https://developer.mozilla.org/en-US/docs/Web/CSS/font\n            'fontStyle',\n            'fontVariant',\n            'fontWeight',\n            'fontStretch',\n            'fontSize',\n            'fontSizeAdjust',\n            'lineHeight',\n            'fontFamily',\n            'textAlign',\n            'textTransform',\n            'textIndent',\n            'textDecoration',\n            'letterSpacing',\n            'wordSpacing',\n            'tabSize',\n            'MozTabSize'\n        ];\n        // Firefox 1.0+\n        var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n        var isBrowser = typeof window !== 'undefined';\n        if (!isBrowser) {\n            throw new Error('textarea-caret-position#getCaretPosition should only be called in a browser');\n        }\n        var debug = (options && options.debug) || false;\n        if (debug) {\n            var el = document.querySelector('#input-textarea-caret-position-mirror-div');\n            if (el && el.parentNode)\n                el.parentNode.removeChild(el);\n        }\n        // The mirror div will replicate the textareas style\n        var div = document.createElement('div');\n        div.id = 'input-textarea-caret-position-mirror-div';\n        document.body.appendChild(div);\n        var style = div.style;\n        // @ts-ignore\n        var computed = window.getComputedStyle ? window.getComputedStyle(element) : element.currentStyle; // currentStyle for IE < 9\n        var isInput = element.nodeName === 'INPUT';\n        // Default textarea styles\n        style.whiteSpace = 'pre-wrap';\n        if (!isInput)\n            style.wordWrap = 'break-word'; // only for textarea-s\n        // Position off-screen\n        style.position = 'absolute'; // required to return coordinates properly\n        if (!debug)\n            style.visibility = 'hidden'; // not 'display: none' because we want rendering\n        // Transfer the element's properties to the div\n        properties.forEach(function (prop) {\n            if (isInput && prop === 'lineHeight') {\n                // Special case for <input>s because text is rendered centered and line height may be != height\n                if (computed.boxSizing === 'border-box') {\n                    var height = parseInt(computed.height);\n                    var outerHeight_1 = parseInt(computed.paddingTop) +\n                        parseInt(computed.paddingBottom) +\n                        parseInt(computed.borderTopWidth) +\n                        parseInt(computed.borderBottomWidth);\n                    var targetHeight = outerHeight_1 + parseInt(computed.lineHeight);\n                    if (height > targetHeight) {\n                        style.lineHeight = height - outerHeight_1 + 'px';\n                    }\n                    else if (height === targetHeight) {\n                        style.lineHeight = computed.lineHeight;\n                    }\n                    else {\n                        style.lineHeight = '0';\n                    }\n                }\n                else {\n                    style.lineHeight = computed.height;\n                }\n            }\n            else {\n                //@ts-ignore\n                style[prop] = computed[prop];\n            }\n        });\n        if (isFirefox) {\n            // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275\n            if (element.scrollHeight > parseInt(computed.height))\n                style.overflowY = 'scroll';\n        }\n        else {\n            style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'\n        }\n        div.textContent = element.value.substring(0, position);\n        // The second special handling for input type=\"text\" vs textarea:\n        // spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037\n        if (isInput && div.textContent)\n            div.textContent = div.textContent.replace(/\\s/g, '\\u00a0');\n        var span = document.createElement('span');\n        // Wrapping must be replicated *exactly*, including when a long word gets\n        // onto the next line, with whitespace at the end of the line before (#7).\n        // The  *only* reliable way to do that is to copy the *entire* rest of the\n        // textareas content into the <span> created at the caret position.\n        // For inputs, just '.' would be enough, but no need to bother.\n        span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all\n        div.appendChild(span);\n        var relativePosition = {\n            top: span.offsetTop + parseInt(computed['borderTopWidth']),\n            left: span.offsetLeft + parseInt(computed['borderLeftWidth']),\n            absolute: false,\n            height: parseInt(computed['lineHeight'])\n        };\n        if (debug) {\n            span.style.backgroundColor = '#aaa';\n        }\n        else {\n            document.body.removeChild(div);\n        }\n        if (relativePosition.left >= element.clientWidth && options.checkWidthOverflow) {\n            relativePosition.left = element.clientWidth;\n        }\n        return relativePosition;\n    }\n    Caret.getRelativePosition = getRelativePosition;\n    /**\n     * sets the top and left css style of the element based on the absolute position of the caretElements caret,\n     * @param offset offsets the position.\n     * @param detectBoundary offsets the position if the position would be outside the window.\n     * @param returnOnly if true the element position wont be set.\n     */\n    function setElementPositionBasedOnCaret(element, caretElement, offset, margin, detectBoundary, returnOnly) {\n        if (offset === void 0) { offset = { top: 0, left: 0 }; }\n        if (margin === void 0) { margin = 2; }\n        if (detectBoundary === void 0) { detectBoundary = true; }\n        if (returnOnly === void 0) { returnOnly = false; }\n        var pos = getAbsolutePosition(caretElement);\n        if (detectBoundary) {\n            pos.left =\n                pos.left + (element.clientWidth + margin) + offset.left > window.scrollX + window.innerWidth\n                    ? (pos.left = window.scrollX + window.innerWidth - (element.clientWidth + margin))\n                    : (pos.left += offset.left);\n            pos.top =\n                pos.top + (element.clientWidth + margin) + offset.top > window.scrollY + window.innerHeight\n                    ? (pos.top -= element.clientWidth + margin)\n                    : (pos.top += offset.top);\n        }\n        else {\n            pos.top += offset.top;\n            pos.left += offset.left;\n        }\n        if (!returnOnly) {\n            element.style.top = pos.top + 'px';\n            element.style.left = pos.left + 'px';\n        }\n        return pos;\n    }\n    Caret.setElementPositionBasedOnCaret = setElementPositionBasedOnCaret;\n})(Caret = exports.Caret || (exports.Caret = {}));\n/**\n * @deprecated use Caret.getRelativePosition instead.\n */\nexports.getCaretCoordinates = function (element, position, options) {\n    if (options === void 0) { options = { debug: false }; }\n    return Caret.getRelativePosition(element, options);\n};\n","import { isSupported } from 'govuk-frontend';\nimport { offset } from './utils.mjs';\nimport { Caret } from 'textarea-caret-ts';\n\nlet _mode = 'default';\n\n// Class to make objects representing the area sticky elements move in\n// This includes holding a reference to the containing element but also methods to handle interactions in the area that may\n// overlapped by sticky elements\n//\n// Note: the actual boundaries of sticky behaviour are set by `.js-header` and `.js-footer` classes rather than the parent element\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\nclass ScrollArea {\n\n  constructor (el, edge, selector) {\n    const $el = el.$fixedEl;\n    let $scrollArea = $el.closest('.sticky-scroll-area');\n\n    if ($scrollArea === null) {\n      $scrollArea = $el.parentElement;\n      $scrollArea.classList.add('sticky-scroll-area');\n    }\n    this.els = [el];\n    this.edge = edge;\n    this.selector = selector;\n    this.node = $scrollArea;\n    this.setEvents();\n  }\n\n  addEl (el) {\n    this.els.push(el);\n  }\n\n  hasEl (el) {\n    return this.els.includes(el);\n  }\n\n  updateEls (usedEls) {\n    this.els = usedEls;\n  }\n\n  #keyUpHandler (e) {\n    if (e.target.matches('textarea')) {\n      this.focusHandler(e);\n    }\n  }\n\n  setEvents () {\n    this.node.addEventListener('focus', this.focusHandler.bind(this), { capture: true, passive: true });\n    this.node.addEventListener('keyup', this.#keyUpHandler.bind(this), { passive: true });\n  }\n\n  removeEvents () {\n    this.node.removeEventListener('focus', this.focusHandler.bind(this), { capture: true, passive: true });\n    this.node.removeEventListener('keyup', this.#keyUpHandler.bind(this), { passive: true });\n  }\n\n  getFocusedDetails = {\n    forElement: ($focusedElement) => {\n      const focused = {\n        'top': offset($focusedElement).top,\n        'height': $focusedElement.offsetHeight,\n        'type': 'element'\n      };\n      focused.bottom = focused.top + focused.height;\n\n      return focused;\n    },\n    forCaret: ($textarea) => {\n      const textarea = $textarea;\n      const caretCoordinates = Caret.getAbsolutePosition(textarea);\n      const focused = {\n        'top': caretCoordinates.top,\n        'height': caretCoordinates.height,\n        'type': 'caret'\n      };\n      focused.bottom = focused.top + focused.height;\n\n      return focused;\n    }\n  };\n\n  focusHandler () {\n    this.scrollToRevealElement(document.activeElement);\n  }\n\n  scrollToRevealElement ($el) {\n    const nodeName = $el.nodeName.toLowerCase();\n    const nodeType = $el.getAttribute('type');\n    const endOfFurthestEl = focusOverlap.endOfFurthestEl(this.els, this.edge);\n    const isInSticky = $el.closest(this.selector) !== null;\n    let focused;\n    let overlap;\n\n    if (nodeName === 'textarea') {\n      focused = this.getFocusedDetails.forCaret($el);\n    } else if (!isInSticky && (nodeType === 'checkbox' || nodeType === 'radio')) {\n      focused = this.getFocusedDetails.forElement($el.parentElement);\n    } else {\n      if (isInSticky) { return; }\n      focused = this.getFocusedDetails.forElement($el);\n    }\n\n    overlap = focusOverlap.getOverlap(focused, this.edge, endOfFurthestEl);\n    if (overlap > 0) {\n      focusOverlap.adjustForOverlap(focused, this.edge, overlap);\n    }\n  }\n\n  destroy () {\n    this.removeEvents();\n  }\n\n}\n\n// Singleton class collecting together methods for interacting with the scrollareas on the page\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\nclass ScrollAreas {\n  #scrollAreas = [];\n\n  constructor () {}\n\n  getAreaForEl (el) {\n    let loopIdx = this.#scrollAreas.length;\n\n    while(loopIdx--) {\n      if (this.#scrollAreas[loopIdx].hasEl(el)) {\n        return this.#scrollAreas[loopIdx];\n      }\n    }\n\n    return false;\n  }\n\n  getAreaByEl (el) {\n    const matches = this.#scrollAreas.filter(area => area.els.includes(el));\n\n    return matches[0] || false;\n  }\n\n  addEl (el, edge, selector) {\n    const scrollArea = this.getAreaForEl(el);\n\n    if (!scrollArea) {\n      this.#scrollAreas.push(new ScrollArea(el, edge, selector));\n    } else {\n      scrollArea.addEl(el);\n    }\n  }\n\n  syncEls (elsInDOM) {\n    const unusedAreas = [];\n\n    const getUsed = (area) => {\n      return elsInDOM.filter(el => area.hasEl(el));\n    };\n\n    const deleteUnused = (idx, areaIdx) => {\n      // remove any events for overlap checking bound to the scrollArea\n      this.#scrollAreas[areaIdx].destroy();\n      this.#scrollAreas.splice(areaIdx, 1);\n    };\n\n    // update any scroll areas with els still in the DOM and track any with none\n    this.#scrollAreas.forEach((area, areaIdx) => {\n      const used = getUsed(area);\n\n      if (!used.length) {\n        unusedAreas.push(areaIdx);\n      }\n\n      area.updateEls(used);\n    });\n\n    // delete any scroll areas with no els still in DOM\n    unusedAreas.forEach(deleteUnused);\n  }\n\n  filterBy (filterFunc) {\n    return this.#scrollAreas.filter(filterFunc);\n  }\n\n}\nconst scrollAreas = new ScrollAreas();\n\n// Object collecting together methods for stopping sticky overlapping focused elements\nconst focusOverlap = {\n  getOverlap: function (focused, edge, endOfFurthestEl) {\n    if (!endOfFurthestEl) { return 0; }\n\n    if (edge === 'top') {\n      return endOfFurthestEl - focused.top;\n    } else {\n      return focused.bottom - endOfFurthestEl;\n    }\n  },\n  endOfFurthestEl: function (els, edge) {\n    const stuckEls = els.filter((el) => el.isStuck);\n    let edgeOfEl;\n\n    if (!stuckEls.length) { return false; }\n\n    if (edge === 'bottom') {\n      edgeOfEl = el => offset(el.$fixedEl).top;\n    } else {\n      edgeOfEl = el => offset(el.$fixedEl).top + el.height;\n    }\n\n    const offsets = stuckEls.map((el) => edgeOfEl(el));\n\n    return offsets.reduce((accumulator, offset) => {\n      return (accumulator < offset) ? offset: accumulator;\n    });\n  },\n  adjustForOverlap: function (focused, edge, overlap) {\n    const scrollTop = window.scrollY;\n\n    // scroll so element becomes visible\n    if (edge === 'top') {\n      window.scrollTo(window.pageXOffset, (scrollTop - overlap));\n    } else {\n      window.scrollTo(window.pageXOffset, (scrollTop + overlap));\n    }\n  }\n};\n\n// Singleton class for dealing with marking the edge of a sticky, or group of sticky elements (as seen in dialog mode)\nclass OppositeEdge {\n\n  #classes = {\n    'top': 'content-fixed__top',\n    'bottom': 'content-fixed__bottom'\n  };\n\n  constructor () {}\n\n  mark (sticky) {\n    const edgeClass = this.#classes[sticky.edge];\n    let els;\n\n    if (_mode === 'dialog') {\n      els = [dialog.getElementAtOppositeEnd(sticky)];\n    } else {\n      els = sticky.els;\n    }\n\n    els = els.filter((el) => el.isStuck);\n\n    els.forEach((el) => el.$fixedEl.classList.add(edgeClass));\n  }\n\n  unmark (sticky) {\n    const edgeClass = this.#classes[sticky.edge];\n\n    sticky.els.forEach(el => el.$fixedEl.classList.remove(edgeClass));\n  }\n\n}\nconst oppositeEdge = new OppositeEdge();\n\n\n// Class wrapping sticky elements, to control changes to their HTML and CSS, as well as the shim inserted when they become sticky\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\nclass StickyElement {\n  #initialFixedClass = 'content-fixed-onload';\n  #fixedClass = 'content-fixed';\n  #appliedClass = null;\n  #stopped = false;\n  #hasLoaded = false;\n  #canBeStuck = true;\n  #sticky;\n\n  constructor ($el, sticky) {\n    this.#sticky = sticky;\n    this.$fixedEl = $el;\n    this.$shim = null;\n\n    const marginTop = window.getComputedStyle(this.$fixedEl)['margin-top'];\n    const marginBottom = window.getComputedStyle(this.$fixedEl)['margin-bottom'];\n\n    this.verticalMargins = {\n      'top': (marginTop !== '') ? parseInt(marginTop, 10) : null,\n      'bottom': (marginBottom !== '') ? parseInt(marginBottom, 10) : null\n    };\n  }\n\n  #getShimCSS () {\n    let inlineStyles = `width: ${this.horizontalSpace}px; height: ${this.height}px`;\n\n    if (this.verticalMargins.top) {\n      inlineStyles += `; margin-top: ${this.verticalMargins.top}px`;\n    }\n    if (this.verticalMargins.bottom) {\n      inlineStyles += `; margin-bottom: ${this.verticalMargins.bottomtop}px`;\n    }\n    return inlineStyles;\n  }\n\n  stickyClass () {\n    return (this.#sticky.initialPositionsSet) ? this.#fixedClass : this.#initialFixedClass;\n  }\n\n  appliedClass () {\n    return this.#appliedClass;\n  }\n\n  removeStickyClasses () {\n    this.$fixedEl.classList.remove(this.#initialFixedClass, this.#fixedClass);\n  }\n\n  get isStuck () {\n    return this.#appliedClass !== null;\n  }\n\n  stick () {\n    this.#appliedClass = this.stickyClass();\n    this.$fixedEl.classList.add(this.#appliedClass);\n  }\n\n  release () {\n    this.#appliedClass = null;\n    this.removeStickyClasses();\n  }\n\n  // When a sticky element is moved into the 'stuck' state, a shim is inserted into the\n  // page to preserve the space the element occupies in the flow.\n  addShim (position) {\n    const insertPosition = (position === 'before') ? 'beforebegin' : 'afterend';\n\n    this.$shim = document.createElement('div');\n    this.$shim.innerHTML = '&nbsp;'; // we should use createTextNode but it won't take HTML entities\n    this.$shim.classList.add('shim');\n    this.$shim.setAttribute('style', this.#getShimCSS());\n    this.$fixedEl.insertAdjacentElement(insertPosition, this.$shim);\n  }\n\n  removeShim () {\n    if (this.$shim !== null) {\n      this.$shim.remove();\n      this.$shim = null;\n    }\n  }\n\n  // Changes to the dimensions of a sticky element with a shim need to be passed on to the shim\n  updateShim () {\n    if (this.$shim) {\n      this.$shim.setAttribute('style', this.#getShimCSS());\n    }\n  }\n\n  stop () {\n    this.#stopped = true;\n  }\n\n  unstop () {\n    this.#stopped = false;\n  }\n\n  get isStopped () {\n    return this.#stopped;\n  }\n\n  get isInPage () {\n    const node = this.$fixedEl;\n    return (node === document.body) ? false : document.body.contains(node);\n  }\n\n  get canBeStuck () {\n    return this.#canBeStuck;\n  }\n\n  set canBeStuck (val) {\n    this.#canBeStuck = val;\n  }\n\n  get hasLoaded () {\n    return this.#hasLoaded;\n  }\n\n  set hasLoaded (val) {\n    this.#hasLoaded = val;\n  }\n\n}\n\n// Singleton class for treating multiple sticky elements as a group.\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\nclass Dialog {\n  static spaceBetweenStickys = 40;\n\n  constructor () {\n    this.hasResized = false;\n  }\n\n  // we add padding of 20px around each sticky to give some space between it and the rest of the page\n  // this shouldn't apply between stickys in a stack\n  // (the in-page CSS handles this by each subsequent sticky in a sequence having margin: -40px)\n  #getPaddingBetweenEls (els) {\n    if (els.length <= 1) { return 0; }\n\n    return (els.length - 1) * Dialog.spaceBetweenStickys;\n  }\n\n  #getTotalHeight (els) {\n    const reducer = (accumulator, currentValue) => {\n      return accumulator + currentValue;\n    };\n    const combinedHeight = els.map(el => el.height).reduce(reducer);\n\n    return combinedHeight - this.#getPaddingBetweenEls(els);\n  }\n\n  #elsThatCanBeStuck (els) {\n    return els.filter(el => el.canBeStuck);\n  }\n\n  getOffsetFromEdge (el, sticky) {\n    let els = this.#elsThatCanBeStuck(sticky.els).slice();\n\n    // els must be arranged furtherest from window edge is stuck to first\n    // default direction is order in document\n    if (sticky.edge === 'top') {\n      els.reverse();\n    }\n\n    const elIdx = els.indexOf(el);\n\n    // if next to window edge the dialog is stuck to, no offset\n    if (elIdx === (els.length - 1)) { return 0; }\n\n    // make els all those from this one to the window edge\n    els = els.slice(elIdx + 1);\n\n    // remove the space between those els and the one on the edge\n    return this.#getTotalHeight(els) - Dialog.spaceBetweenStickys;\n  }\n\n  getOffsetFromEnd (el, sticky) {\n    let els = this.#elsThatCanBeStuck(sticky.els);\n\n    // els must be arranged furtherest from window edge is stuck to first\n    // default direction is order in document\n    if (sticky.edge === 'bottom') {\n      els.reverse();\n    }\n\n    const elIdx = els.indexOf(el);\n\n    // if next to opposite edge to the one the dialog is stuck to, no offset\n    if (elIdx === (els.length - 1)) { return 0; }\n\n    // make els all those from this one to the window edge\n    els = els.slice(elIdx + 1);\n\n    return this.#getTotalHeight(els) - Dialog.spaceBetweenStickys;\n  }\n\n  // checks total height of all this._sticky elements against a height\n  // unsticks each that won't fit and marks them as unstickable\n  fitToHeight (sticky) {\n    const self = this;\n    const els = sticky.els.slice();\n    const height = StickAtEdge.getWindowDimensions().height;\n    const totalStickyHeight = () => self.#getTotalHeight(self.#elsThatCanBeStuck(els));\n    const dialogFitsHeight = () => totalStickyHeight() <= height;\n\n    // els must be arranged furtherest from window edge is stuck to first\n    // default direction is order in document\n    if (sticky.edge === 'top') {\n      els.reverse();\n    }\n\n    // reset elements\n    els.forEach(el => el.canBeStuck = true);\n\n    while (self.#elsThatCanBeStuck(els).length && !dialogFitsHeight()) {\n      const currentEl = self.#elsThatCanBeStuck(els)[0];\n\n      sticky.reset(currentEl);\n      currentEl.canBeStuck = false;\n\n      if (!self.hasResized) { self.hasResized = true; }\n    }\n  }\n\n  getElementAtStickyEdge (sticky) {\n    const els = this.#elsThatCanBeStuck(sticky.els);\n    const idx = (sticky.edge === 'top') ? 0 : els.length - 1;\n\n    return els[idx];\n  }\n\n  // get element at the end opposite the sticky edge\n  getElementAtOppositeEnd (sticky) {\n    const els = this.#elsThatCanBeStuck(sticky.els);\n    const idx = (sticky.edge === 'top') ? els.length - 1 : 0;\n\n    return els[idx];\n  }\n\n  getInPageEdgePosition (sticky) {\n    return this.getElementAtStickyEdge(sticky).inPageEdgePosition;\n  }\n\n  getHeight (els) {\n    return this.#getTotalHeight(this.#elsThatCanBeStuck(els));\n  }\n\n  adjustForResize (sticky) {\n    const windowHeight = StickAtEdge.getWindowDimensions().height;\n\n    if (sticky.edge === 'top') {\n      window.scrollTo(window.pageXOffset, this.getInPageEdgePosition(sticky));\n    } else {\n      window.scrollTo(window.pageXOffset, this.getInPageEdgePosition(sticky) - windowHeight);\n    }\n\n    this.hasResized = false;\n  }\n\n  releaseEl (el, sticky) {\n    el.$fixedEl.style[sticky.edge] = '';\n  }\n\n}\nconst dialog = new Dialog();\n\n// Class collecting together all generic behaviour for controlling the state of\n// sticky elements and all their associated behaviour.\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\nclass StickAtEdge {\n  #hasScrolled = false;\n  #scrollTimeout = false;\n  #windowHasResized = false;\n  #resizeTimeout = false;\n\n  constructor (selector) {\n    this.els = [];\n    this.initialPositionsSet = false;\n\n    this.CSS_SELECTOR = selector;\n    this.STOP_PADDING = 10;\n  }\n\n  setMode (mode) {\n    _mode = mode;\n  }\n\n  // Change state of sticky elements based on their position relative to the window\n  setElementPositions () {\n    const windowDimensions = StickAtEdge.getWindowDimensions(),\n          windowTop = StickAtEdge.getWindowPositions().scrollTop,\n          windowPositions = {\n            'top': windowTop,\n            'bottom':  windowTop + windowDimensions.height\n          };\n\n    const setElementPosition = (el) => {\n      if (this.viewportIsWideEnough(windowDimensions.width)) {\n\n        if (this.windowNotPastScrolledFrom(windowPositions, this.getScrolledFrom(el))) {\n          this.reset(el);\n        } else { // past the point it sits in the document\n          if (this.windowNotPastScrollingTo(windowPositions, this.getScrollingTo(el))) {\n            this.stick(el);\n            if (el.isStopped) {\n              this.unstop(el);\n            }\n          } else { // window past scrollingTo position\n            if (!el.isStuck) {\n              this.stick(el);\n            }\n            this.stop(el);\n          }\n        }\n\n      } else {\n\n        this.reset(el);\n\n      }\n    };\n\n    // clean up any existing styles marking the edges of sticky elements\n    oppositeEdge.unmark(this);\n\n    this.els.forEach(el => {\n      if (el.canBeStuck) {\n        setElementPosition(el);\n      }\n    });\n\n    // add styles to mark the edge of sticky elements opposite to that stuck to the window\n    oppositeEdge.mark(this);\n\n    if (this.initialPositionsSet === false) { this.initialPositionsSet = true; }\n  }\n\n  // Store all the dimensions for a sticky element to limit DOM queries\n  setElementDimensions (el, callback) {\n    const onHeightSet = () => {\n      // if element is shim'ed, pass changes in dimension on to the shim\n      if (el.$shim) {\n        el.updateShim();\n      }\n      if (callback !== undefined) {\n        callback();\n      }\n    };\n\n    this.setElWidth(el);\n    this.setElHeight(el, onHeightSet);\n  }\n\n  // Reset element to original state in the page\n  reset (el) {\n    if (el.isStopped) {\n      this.unstop(el);\n    }\n\n    if (el.isStuck) {\n      this.release(el);\n    }\n  }\n\n  // Recalculate stored dimensions for all sticky elements\n  recalculate () {\n    // break early if GOVUK Frontend is not supported\n    if (!isSupported()) {\n      return;\n    }\n\n    const onSyncComplete = () => {\n      scrollAreas.syncEls(this.els);\n      this.setEvents();\n      if (_mode === 'dialog') {\n        dialog.fitToHeight(this);\n        if (dialog.hasResized) {\n          dialog.adjustForResize(this);\n        }\n      }\n      this.setElementPositions();\n    };\n\n    this.syncWithDOM(onSyncComplete);\n  }\n\n  // Public method to scroll so an element isn't covered by the sticky nav\n  scrollToRevealElement ($el) {\n    // guard against previous version of this method recieving `$el` as a jQuery-wrapped DOM node\n    if ('jquery' in $el) { $el = $el.get(0); }\n\n    const scrollAreaNode = $el.closest('.sticky-scroll-area');\n    const matches = scrollAreas.filterBy(scrollArea => {\n      return scrollArea.node === scrollAreaNode;\n    });\n\n    if (matches.length) {\n      matches[0].scrollToRevealElement($el);\n    }\n  }\n\n  setElWidth (el) {\n    const $el = el.$fixedEl;\n    const scrollArea = scrollAreas.getAreaByEl(el);\n    const width = scrollArea.node.getBoundingClientRect().width;\n\n    el.horizontalSpace = width;\n\n    // if stuck, element won't inherit width from parent so set explicitly\n    if (el.$shim) {\n      $el.style.width = width + 'px';\n    }\n  }\n\n  setElHeight (el, callback) {\n    const $el = el.$fixedEl;\n    const $img = $el.querySelector('img');\n\n    const onload = () => {\n      el.height = $el.offsetHeight;\n      // if element has a shim, the shim's offset represents the element's in-page position\n      if (el.$shim) {\n        el.inPageEdgePosition = this.getInPageEdgePosition(el.$shim);\n      } else {\n        el.inPageEdgePosition = this.getInPageEdgePosition($el);\n      }\n      callback();\n    };\n\n    if (!el.hasLoaded && ($img !== null)) {\n      const image = new window.Image();\n      image.onload = () => {\n        onload();\n      };\n      image.src = $img.attr('src');\n    } else {\n      onload();\n    }\n  }\n\n  allElementsLoaded (totalEls) {\n    return this.els.length === totalEls;\n  }\n\n  getElForNode (node) {\n    const matches = this.els.filter(el => el.$fixedEl === node);\n\n    return matches.length ? matches[0] : false;\n  }\n\n  add (node, setPositions, cb) {\n    const $el = node;\n    let elObj = this.getElForNode(node);\n    const exists = !!elObj;\n\n    const onDimensionsSet = () => {\n      elObj.hasLoaded = true;\n\n      // guard against adding elements already stored\n      if (!exists) {\n        this.els.push(elObj);\n      }\n\n      if (setPositions) {\n        this.setElementPositions();\n      }\n\n      if (cb !== undefined) {\n        cb();\n      }\n    };\n\n    if (!exists) {\n      elObj = new StickyElement($el, this);\n      scrollAreas.addEl(elObj, this.edge, this.CSS_SELECTOR);\n    }\n\n    this.setElementDimensions(elObj, onDimensionsSet);\n  }\n\n  remove (el) {\n    if (this.els.includes(el)) {\n\n      // reset DOM node to original state\n      this.reset(el);\n\n      // remove sticky element object\n      this.els = this.els.filter(_el => _el !== el);\n    }\n  }\n\n  // gets all sticky elements in the DOM and removes any in this.els no longer in attached to it\n  syncWithDOM (callback) {\n    const $els = document.querySelectorAll(this.CSS_SELECTOR);\n    const numOfEls = $els.length;\n\n    const onLoaded = () => {\n      if (this.els.length === numOfEls) {\n        this.endOfScrollArea = this.getEndOfScrollArea();\n        if (callback !== undefined) {\n          callback();\n        }\n      }\n    };\n\n    // remove any els no longer in the DOM\n    if (this.els.length) {\n      this.els.forEach(el => {\n        if (!el.isInPage) {\n          this.remove(el);\n        }\n      });\n    }\n\n    if (numOfEls) {\n      // reset flag marking page load\n      this.initialPositionsSet = false;\n\n      $els.forEach(el => {\n        // delay setting position until all stickys are loaded\n        this.add(el, false, onLoaded);\n      });\n    }\n  }\n\n  init () {\n    // reset all state\n    this.#hasScrolled = false;\n    this.#scrollTimeout = false;\n    this.#windowHasResized = false;\n    this.#resizeTimeout = false;\n\n    this.recalculate();\n  }\n\n  setEvents () {\n    this._scrollEvent = this.onScroll.bind(this);\n    this._resizeEvent = this.onResize.bind(this);\n\n    // flag when scrolling takes place and check (and re-position) sticky elements relative to\n    // window position\n    if (this.#scrollTimeout === false) {\n      // TODO: consider replacing with 'scrollEnd' event when more widely available\n      // https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event\n      window.addEventListener('scroll', this._scrollEvent);\n      this.#scrollTimeout = window.setInterval(this.checkScroll.bind(this), 50);\n    }\n\n    // Recalculate all dimensions when the window resizes\n    if (this.#resizeTimeout === false) {\n      window.addEventListener('resize', this._resizeEvent);\n      this.#resizeTimeout = window.setInterval(this.checkResize.bind(this), 50);\n    }\n  }\n\n  clearEvents () {\n    if (this.#scrollTimeout !== false) {\n      document.removeEventListener('scroll', this._scrollEvent);\n      window.clearInterval(this.#scrollTimeout);\n      this.#scrollTimeout = false;\n    }\n\n    if (this.#resizeTimeout !== false) {\n      window.removeEventListener('resize', this._resizeEvent);\n      window.clearInterval(this.#resizeTimeout);\n      this.#resizeTimeout = false;\n    }\n\n  }\n\n  viewportIsWideEnough (windowWidth) {\n    return windowWidth > 768;\n  }\n\n  onScroll () {\n    this.#hasScrolled = true;\n  }\n\n  onResize () {\n    this.#windowHasResized = true;\n  }\n\n  checkScroll () {\n    if (this.#hasScrolled === true) {\n      this.#hasScrolled = false;\n      this.setElementPositions();\n    }\n  }\n\n  checkResize () {\n    const windowWidth = StickAtEdge.getWindowDimensions().width;\n\n    if (this.#windowHasResized === true) {\n      this.#windowHasResized = false;\n\n      this.els.forEach(el => {\n        if (!this.viewportIsWideEnough(windowWidth)) {\n          this.reset(el);\n        } else {\n          this.setElementDimensions(el);\n        }\n      });\n\n      if (this.viewportIsWideEnough(windowWidth)) {\n        if (_mode === 'dialog') {\n          dialog.fitToHeight(this);\n          if (dialog.hasResized) {\n            dialog.adjustForResize(this);\n          }\n        }\n        this.setElementPositions();\n      }\n    }\n  }\n\n  release (el) {\n    if (el.isStuck) {\n      const $el = el.$fixedEl;\n\n      el.removeStickyClasses();\n      $el.style.width = '';\n      // clear styles from any elements stuck while in a dialog mode\n      dialog.releaseEl(el, this);\n      el.removeShim();\n      el.release();\n    }\n  }\n\n  static getWindowDimensions () {\n    return {\n      height: window.innerHeight,\n      width: window.innerWidth\n    };\n  }\n\n  static getWindowPositions () {\n    return {\n      scrollTop: window.pageYOffset\n    };\n  }\n\n}\n\n// Extension of sticky object to add behaviours specific to sticking to top of window\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\nclass StickAtTop extends StickAtEdge {\n  constructor () {\n    super('.js-stick-at-top-when-scrolling');\n    this.edge = 'top';\n  }\n\n  // Store furthest point sticky elements are allowed\n  getEndOfScrollArea () {\n    const footer = document.querySelector('.js-footer');\n    if (footer === null) {\n      return 0;\n    }\n    return offset(footer).top - this.STOP_PADDING;\n  }\n\n  // position of the bottom edge when in the page flow\n  getInPageEdgePosition ($el) {\n    return offset($el).top;\n  }\n\n  getScrolledFrom (el) {\n    if (_mode === 'dialog') {\n      return dialog.getInPageEdgePosition(this);\n    } else {\n      return el.inPageEdgePosition;\n    }\n  }\n\n  getScrollingTo (el) {\n    let height = el.height;\n\n    if (_mode === 'dialog') {\n      height = dialog.getHeight(this.els);\n    }\n\n    return this.endOfScrollArea - height;\n  }\n\n  getStoppingPosition (el) {\n    let offset = 0;\n\n    if (_mode === 'dialog') {\n      offset = dialog.getOffsetFromEnd(el, this);\n    }\n\n    return (this.endOfScrollArea - offset) - el.height;\n  }\n\n  windowNotPastScrolledFrom (windowPositions, scrolledFrom) {\n    return scrolledFrom > windowPositions.top;\n  }\n\n  windowNotPastScrollingTo (windowPositions, scrollingTo) {\n    return windowPositions.top < scrollingTo;\n  }\n\n  stick (el) {\n    if (!el.isStuck) {\n      const $el = el.$fixedEl;\n      let offset = 0;\n\n      if (_mode === 'dialog') {\n        offset = dialog.getOffsetFromEdge(el, this);\n      }\n\n      el.addShim('before');\n      $el.style.width = $el.getBoundingClientRect().width + 'px';\n      $el.style.top = offset + 'px';\n      el.stick();\n    }\n  }\n\n  stop (el) {\n    if (!el.isStopped) {\n      el.$fixedEl.style.position = 'absolute';\n      el.$fixedEl.style.top = this.getStoppingPosition(el) + 'px';\n      el.stop();\n    }\n  }\n\n  unstop (el) {\n    let offset = 0;\n\n    if (_mode === 'dialog') {\n      offset = dialog.getOffsetFromEdge(el, this);\n    }\n\n    el.$fixedEl.style.position = '';\n    el.$fixedEl.style.top = offset + 'px';\n    el.unstop();\n  }\n\n}\nconst stickAtTop = new StickAtTop();\n\n// Extension of sticky object to add behaviours specific to sticking to bottom of window\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\nclass StickAtBottom extends StickAtEdge {\n  constructor () {\n    super('.js-stick-at-bottom-when-scrolling');\n    this.edge = 'bottom';\n  }\n\n  // Store furthest point sticky elements are allowed\n  getEndOfScrollArea () {\n    const header = document.querySelector('.js-header');\n    if (header === null) {\n      return 0;\n    }\n    return (offset(header).top + header.offsetHeight) + this.STOP_PADDING;\n  }\n\n  // position of the bottom edge when in the page flow\n  getInPageEdgePosition ($el) {\n    return offset($el).top + $el.offsetHeight;\n  }\n\n  getScrolledFrom (el) {\n    if (_mode === 'dialog') {\n      return dialog.getInPageEdgePosition(this);\n    } else {\n      return el.inPageEdgePosition;\n    }\n  }\n\n  getScrollingTo (el) {\n    let height = el.height;\n\n    if (_mode === 'dialog') {\n      height = dialog.getHeight(this.els);\n    }\n\n    return this.endOfScrollArea + height;\n  }\n\n  getStoppingPosition (el) {\n    let offset = 0;\n\n    if (_mode === 'dialog') {\n      offset = dialog.getOffsetFromEnd(el, this);\n    }\n\n    return this.endOfScrollArea + offset;\n  }\n\n  windowNotPastScrolledFrom (windowPositions, scrolledFrom) {\n    return scrolledFrom < windowPositions.bottom;\n  }\n\n  windowNotPastScrollingTo (windowPositions, scrollingTo) {\n    return windowPositions.bottom > scrollingTo;\n  }\n\n  stick (el) {\n    if (!el.isStuck) {\n      const $el = el.$fixedEl;\n      let offset = 0;\n\n      if (_mode === 'dialog') {\n        offset = dialog.getOffsetFromEdge(el, this);\n      }\n\n      el.addShim('after');\n      // element will be absolutely positioned so cannot rely on parent element for width\n      $el.style.width = $el.getBoundingClientRect().width + 'px';\n      $el.style.bottom = offset + 'px';\n      el.stick();\n    }\n  }\n\n  stop (el) {\n    if (!el.isStopped) {\n      el.$fixedEl.style.position = 'absolute';\n      el.$fixedEl.style.top = this.getStoppingPosition(el) + 'px';\n      el.$fixedEl.style.bottom = 'auto';\n      el.stop();\n    }\n  }\n\n  unstop (el) {\n    let offset = 0;\n\n    if (_mode === 'dialog') {\n      offset = dialog.getOffsetFromEdge(el, this);\n    }\n\n    el.$fixedEl.style.position = '';\n    el.$fixedEl.style.top = '';\n    el.$fixedEl.style.bottom = offset + 'px';\n    el.unstop();\n  }\n\n}\nconst stickAtBottom = new StickAtBottom;\n\nexport {\n  stickAtTop as stickAtTopWhenScrolling,\n  stickAtBottom as stickAtBottomWhenScrolling\n};\n","import { isSupported } from 'govuk-frontend';\nimport { stickAtBottomWhenScrolling } from './stick-to-window-when-scrolling.mjs';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass RadioSelect {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.$module = $module;\n    this.confirmMadeSticky = false;\n    this.keyCache = null;\n    this.ENTER_CODE = 13;\n    this.timesByDay = {};\n    this.days = this.$module.dataset.days.split(',').map(day => {\n      let dayValue = this.getKeyFromDayLabel(day);\n      this.timesByDay[dayValue] = [];\n      return {\n        'value': dayValue,\n        'label': day\n      };\n    });\n    this.componentName = this.$module.querySelector('input[type=radio]').getAttribute('name');\n    this.componentLabelText = this.$module.previousElementSibling.textContent.trim();\n    this.$module.querySelectorAll('label').forEach(function (label, idx) {\n      let labelText = label.textContent.trim();\n      let relatedRadio = label.previousElementSibling;\n      let timeData = {\n        'id': label.getAttribute('for'),\n        'label': labelText,\n        'value': relatedRadio.value\n      };\n      let day = this.getKeyFromDayLabel(labelText.split(' at ')[0]);\n\n      if (idx === 0) { // Store the first time\n        this.selectedTime = this.getTimeFromRadio(relatedRadio);\n\n        // The first time's label doesn't contain its day so use the first day\n        day = this.days[0].value;\n      }\n\n      timeData.name = `times-for-${day}`;\n      this.timesByDay[day].push(timeData);\n\n    }.bind(this));\n    this.selectedDay = this.days[0];\n    this.selectedTime = this.timesByDay[this.selectedDay.value][0];\n\n    const initialHTML = this.buildInitialHTML({\n      'componentName': this.componentName,\n      'selectedTime': this.selectedTime,\n      'days': this.days,\n      'times': this.timesByDay\n    }, this.componentLabelText);\n\n    // clear out the original HTML structure\n    this.$module.textContent = '';\n    // append new markup\n    this.$module.append(initialHTML);\n\n    this.$module.closest('fieldset').replaceWith(this.$module);\n\n    this.form = this.$module.closest('form');\n    this.formSubmitButton = this.form.querySelector('button:not([type=button])');\n\n    this.bindEvents();\n\n  }\n\n  // Object holding all the states for the component's HTML\n  buildInitialHTML(params, labelText) {\n    const fragment = document.createDocumentFragment();\n\n    const $sendNowInputLabel = document.createElement('label');\n    $sendNowInputLabel.setAttribute('for', 'radio-select__selected-day-and-time');\n    $sendNowInputLabel.className = 'govuk-label radio-select__label';\n    $sendNowInputLabel.textContent = labelText;\n    fragment.appendChild($sendNowInputLabel);\n\n    const $radioSelectContainer = document.createElement('div');\n    $radioSelectContainer.className = 'radio-select__selection-and-button';\n\n    const $sendNowInput = document.createElement('input');\n    $sendNowInput.type = 'text';\n    $sendNowInput.className = 'radio-select__selected-day-and-time';\n    $sendNowInput.id = 'radio-select__selected-day-and-time';\n    $sendNowInput.readOnly = true;\n    $sendNowInput.value = params.selectedTime.label;\n    $radioSelectContainer.appendChild($sendNowInput);\n\n    const $hiddenInput = document.createElement('input');\n    $hiddenInput.type = 'hidden';\n    $hiddenInput.className = 'radio-select__selected-value';\n    $hiddenInput.value = params.selectedTime.value;\n    $hiddenInput.name = params.componentName;\n    $radioSelectContainer.appendChild($hiddenInput);\n\n    const $expanderContainer = document.createElement('div');\n    $expanderContainer.className = 'radio-select__expander-and-expandee';\n\n    const $expanderBtn = document.createElement('button');\n    $expanderBtn.type = 'button';\n    $expanderBtn.className = 'govuk-button govuk-button--secondary radio-select__expander';\n    $expanderBtn.setAttribute('aria-expanded', 'false');\n    $expanderBtn.setAttribute('aria-controls', `${params.componentName}-expanding-section`);\n    $expanderBtn.textContent = 'Choose a different time';\n    $expanderContainer.appendChild($expanderBtn);\n\n    const $expandeeContainer = document.createElement('div');\n    $expandeeContainer.className = 'radio-select__expandee';\n    $expandeeContainer.id = `${params.componentName}-expanding-section`;\n    $expandeeContainer.hidden = true;\n\n    const $daysContainer = document.createElement('div');\n    $daysContainer.className = 'radio-select__view';\n\n    const $daysFieldset = document.createElement('fieldset');\n    $daysFieldset.className = 'govuk-fieldset radio-select__days';\n\n    const $daysLegend = document.createElement('legend');\n    $daysLegend.className = 'govuk-visually-hidden';\n    $daysLegend.textContent = 'Day to send these messages';\n    $daysFieldset.appendChild($daysLegend);\n\n    params.days.forEach(day => {\n      const $dayBtn = document.createElement('button');\n      $dayBtn.className = 'govuk-button govuk-button--secondary radio-select__day';\n      $dayBtn.type = 'button';\n      $dayBtn.name = day.value;\n      $dayBtn.value = day.value;\n      $dayBtn.textContent = day.label;\n      $daysFieldset.appendChild($dayBtn);\n    });\n\n    $daysContainer.appendChild($daysFieldset);\n    $expandeeContainer.appendChild($daysContainer);\n\n    const $dayTimesContainer = document.createElement('div');\n    $dayTimesContainer.className = 'radio-select__view';\n    $dayTimesContainer.hidden = true;\n\n    const $backLink = document.createElement('a');\n    $backLink.href = '';\n    $backLink.className = 'govuk-link govuk-back-link radio-select__return-to-days js-header';\n    $backLink.textContent = 'Change the day';\n    $dayTimesContainer.appendChild($backLink);\n\n    params.days.forEach(day => {\n      const $dayTimesFieldset = document.createElement('fieldset');\n      $dayTimesFieldset.className = 'govuk-fieldset radio-select__times';\n      $dayTimesFieldset.id = `radio-select__times-for-${day.value}`;\n      $dayTimesFieldset.setAttribute('aria-describedby', 'radio-select__times-help');\n      $dayTimesFieldset.hidden = true;\n\n      const $dayTimesLegend = document.createElement('legend');\n      $dayTimesLegend.className = 'govuk-visually-hidden';\n      $dayTimesLegend.textContent = 'Time to send these messages';\n      $dayTimesFieldset.appendChild($dayTimesLegend);\n\n      const $timesHint = document.createElement('p');\n      $timesHint.className = 'govuk-visually-hidden radio-select__times-help govuk-body';\n      $timesHint.id = 'radio-select__times-help';\n      $timesHint.textContent = 'Choose a time and confirm';\n      $dayTimesFieldset.appendChild($timesHint);\n\n      params.times[day.value].forEach(time => {\n        const $radioItemContainer = document.createElement('div');\n        $radioItemContainer.className = 'govuk-radios__item';\n\n        const $radioInput = document.createElement('input');\n        $radioInput.className = 'govuk-radios__input radio-select__time';\n        $radioInput.type = 'radio';\n        $radioInput.value = time.value;\n        $radioInput.id = time.id;\n        $radioInput.name = time.name;\n        if (time.checked) {\n          $radioInput.checked = true;\n        }\n        $radioItemContainer.appendChild($radioInput);\n\n        const $radioTimeLabel = document.createElement('label');\n        $radioTimeLabel.className = 'govuk-label govuk-radios__label';\n        $radioTimeLabel.setAttribute('for', time.id);\n        $radioTimeLabel.textContent = time.label;\n        $radioItemContainer.appendChild($radioTimeLabel);\n\n        $dayTimesFieldset.appendChild($radioItemContainer);\n      });\n\n      $dayTimesContainer.appendChild($dayTimesFieldset);\n    });\n\n    const $confirmContainer = document.createElement('div');\n    $confirmContainer.className = 'radio-select__confirm js-stick-at-bottom-when-scrolling';\n\n    const $confirmTimeBtn = document.createElement('button');\n    $confirmTimeBtn.type = 'button';\n    $confirmTimeBtn.className = 'govuk-button govuk-button--secondary radio-select__confirm__button';\n    $confirmTimeBtn.textContent = 'Confirm time';\n    $confirmContainer.appendChild($confirmTimeBtn);\n\n    $dayTimesContainer.appendChild($confirmContainer);\n    $expandeeContainer.appendChild($dayTimesContainer);\n\n    $expanderContainer.appendChild($expandeeContainer);\n    $radioSelectContainer.appendChild($expanderContainer);\n    fragment.appendChild($radioSelectContainer);\n\n    return fragment;\n  }\n\n  bindEvents() {\n    this.$module.addEventListener('click', this.handleClick.bind(this));\n    this.$module.addEventListener('change', this.handleTimeSelection.bind(this));\n    this.$module.addEventListener('keydown', (e) => {\n      if (e.target.classList.contains('radio-select__time') || e.target.classList.contains('radio-select__selected-day-and-time')) {\n        this.onEnterKeyUpAndDown(e);\n      }\n    });\n    this.$module.addEventListener('keyup', (e) => {\n      if (e.target.classList.contains('radio-select__time') || e.target.classList.contains('radio-select__selected-day-and-time')) {\n        this.onEnterKeyUpAndDown(e);\n      }\n    });\n  }\n\n  handleClick(event) {\n    const target = event.target;\n\n    switch (true) {\n      case Boolean(target.closest('.radio-select__expander')):\n        event.preventDefault();\n        this.toggleExpandingSection();\n        break;\n\n      case Boolean(target.closest('.radio-select__day')):\n        this.handleDayClick(target);\n        break;\n\n      case Boolean(target.closest('.radio-select__return-to-days')):\n        event.preventDefault();\n        this.handleReturnToDays();\n        break;\n\n      case Boolean(target.closest('.radio-select__confirm__button')):\n        this.selectDayAndTime();\n        break;\n    }\n  }\n\n  handleDayClick(dayButton) {\n    this.selectedDay = dayButton.value.trim();\n    this.showTimesForDay(this.selectedDay);\n    this.showTimesView();\n    this.focusSelectedTimeOrFirst();\n  }\n\n  handleReturnToDays() {\n    this.showDaysView();\n    this.$module.querySelector(`.radio-select__days button[name=${this.selectedDay}]`).focus();\n  }\n\n  handleTimeSelection(event) {\n    if (!event.target.classList.contains('radio-select__time')) return;\n\n    // Uncheck any other selected radios, as they don't share a name attribute\n    this.$module.querySelectorAll('.radio-select__time:checked').forEach(radio => {\n      if (radio !== event.target) {\n        radio.checked = false;\n      }\n    });\n  }\n\n  showDaysView() {\n    const viewPanes = this.$module.querySelectorAll('.radio-select__expandee .radio-select__view');\n    viewPanes[0].removeAttribute('hidden');\n    viewPanes[1].setAttribute('hidden', '');\n  };\n\n  showTimesForDay(day) {\n    this.$module.querySelectorAll('.radio-select__times').forEach(timesGroup => {\n      if (timesGroup.id === `radio-select__times-for-${day}`) {\n        timesGroup.removeAttribute('hidden');\n      } else {\n        timesGroup.setAttribute('hidden', '');\n      }\n    });\n  }\n\n  showTimesView() {\n    const viewPanes = this.$module.querySelectorAll('.radio-select__expandee .radio-select__view');\n\n    viewPanes[0].setAttribute('hidden', '');\n    viewPanes[1].removeAttribute('hidden');\n\n    stickAtBottomWhenScrolling.recalculate();\n  }\n\n  selectDayAndTime() {\n    const selectedRadio = this.$module.querySelector('.radio-select__times:not([hidden]) .radio-select__time:checked');\n    if (selectedRadio === null) return;\n\n    this.selectedTime = this.getTimeFromRadio(selectedRadio);\n\n    this.showDaysView();\n    this.toggleExpandingSection();\n    this.updateSelection();\n    this.$module.querySelector('.radio-select__selected-day-and-time').focus();\n  }\n\n  toggleExpandingSection() {\n    const expander = this.$module.querySelector('.radio-select__expander');\n    const expandee = this.$module.querySelector('.radio-select__expandee');\n    const isExpanded = expander.getAttribute('aria-expanded') === 'true';\n\n    if (isExpanded) {\n      expander.setAttribute('aria-expanded', 'false');\n      expandee.setAttribute('hidden', '');\n    } else {\n      expander.setAttribute('aria-expanded', 'true');\n      expandee.removeAttribute('hidden');\n    }\n\n    this.toggleFormSubmit();\n  }\n\n  toggleFormSubmit() {\n    const $form = this.$module.closest('form');\n    const formSubmitButton = $form.querySelector('.govuk-button:not([type=button])');\n\n    if (!formSubmitButton.hasAttribute('hidden')) {\n      formSubmitButton.style.display = 'none';\n      formSubmitButton.setAttribute('hidden', '');\n      $form.addEventListener('submit', this.cancelFiredEvent);\n    } else {\n      formSubmitButton.removeAttribute('style');\n      formSubmitButton.removeAttribute('hidden');\n      $form.removeEventListener('submit', this.cancelFiredEvent);\n    }\n  }\n\n  focusSelectedTimeOrFirst () {\n    const selector = `.radio-select__expandee input[name=times-for-${this.selectedDay}]`;\n    let timeInput = this.$module.querySelector(`${selector}:checked`) || this.$module.querySelector(selector);\n    timeInput.focus();\n  };\n\n  updateSelection() {\n    this.$module.querySelector('.radio-select__selected-day-and-time').value = this.selectedTime.label;\n    this.$module.querySelector('.radio-select__selected-value').value = this.selectedTime.value;\n  }\n\n  onEnterKeyUpAndDown(event) {\n    let isExpanded;\n    let targetIsSelectedDayAndTimeField;\n\n    if (event.which !== this.ENTER_CODE) {\n      return;\n    }\n    if (event.type === 'keydown') {\n      this.keyCache = event.target;\n      return;\n    }\n\n    if (event.target !== this.keyCache) {\n      return;\n    }\n\n    // event.type is 'keyup', key is enter and was the key that fired the last 'keydown' event\n    targetIsSelectedDayAndTimeField = event.target.classList.contains('radio-select__selected-day-and-time');\n    isExpanded = this.$module.querySelector('.radio-select__expander').getAttribute('aria-expanded') === 'true';\n\n    if (targetIsSelectedDayAndTimeField) {\n      if (isExpanded) {\n        this.toggleExpandingSection();\n      }\n    } else { // target element is the radio for a time\n      this.selectDayAndTime();\n    }\n\n    this.keyCache = null;\n  }\n\n  getTimeFromRadio (radio) {\n    return {\n      'value': radio.value,\n      'label': radio.nextElementSibling.textContent.trim()\n    };\n  }\n\n  getKeyFromDayLabel(label) {\n    return label.toLowerCase().replace(/\\s/g, '-');\n  }\n\n  cancelFiredEvent(evt) {\n    evt.preventDefault();\n  }\n}\n\nexport default RadioSelect;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass FullscreenTable {\n\n  constructor($module) {\n\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.$module = $module;\n    this.$table = this.$module.querySelector('table');\n\n    this.nativeHeight = this.$module.offsetHeight + 20; // 20px for scrollbar room\n    this.topOffset = this.$module.offsetTop;\n\n    this.isFocusable = this.$table.getBoundingClientRect().width > this.$module.getBoundingClientRect().width;\n    this.maintainHeight = this.maintainHeight.bind(this);\n    this.maintainWidth = this.maintainWidth.bind(this);\n    this.toggleShadows = this.toggleShadows.bind(this);\n\n    this.insertShims();\n    this.maintainWidth();\n    this.maintainHeight();\n    this.toggleShadows();\n\n    window.addEventListener('scroll', this.maintainHeight);\n    window.addEventListener('resize', this.maintainHeight);\n    window.addEventListener('resize', this.maintainWidth);\n\n    this.$scrollableTable.addEventListener('scroll', this.toggleShadows);\n    this.$scrollableTable.addEventListener('scroll', this.maintainHeight);\n\n    if (this.isFocusable) {\n      const toggleFocusStyle = () => this.$module.classList.toggle('js-focus-style');\n      this.$scrollableTable.addEventListener('focus', toggleFocusStyle);\n      this.$scrollableTable.addEventListener('blur', toggleFocusStyle);\n    }\n\n    if (window.GOVUK.stickAtBottomWhenScrolling.recalculate) {\n      window.GOVUK.stickAtBottomWhenScrolling.recalculate();\n    }\n\n    this.maintainWidth();\n  }\n\n  insertShims() {\n    const caption = this.$table.querySelector('caption');\n    const captionId = caption.textContent.toLowerCase().replace(/[^A-Za-z]+/g, '');\n    caption.id = captionId;\n\n    // Create the scrollable wrapper and move the table inside it\n    const $scrollableWrapper = document.createElement('div');\n    $scrollableWrapper.className = 'fullscreen-scrollable-table';\n    if (this.isFocusable) {\n      $scrollableWrapper.setAttribute('role', 'region');\n      $scrollableWrapper.setAttribute('aria-labelledby', captionId);\n      $scrollableWrapper.setAttribute('tabindex', '0');\n    }\n    this.$table.parentNode.insertBefore($scrollableWrapper, this.$table);\n    $scrollableWrapper.appendChild(this.$table);\n\n    // Create the fixed (frozen column) table by cloning the scrollable one\n    const $fixedWrapper = $scrollableWrapper.cloneNode(true);\n    $fixedWrapper.className = 'fullscreen-fixed-table';\n    $fixedWrapper.removeAttribute('role');\n    $fixedWrapper.removeAttribute('aria-labelledby');\n    $fixedWrapper.removeAttribute('tabindex');\n    $fixedWrapper.setAttribute('aria-hidden', 'true');\n    $fixedWrapper.querySelector('caption')?.removeAttribute('id');\n\n    // Create the shadow and shim elements\n    const $rightShadow = document.createElement('div');\n    $rightShadow.className = 'fullscreen-right-shadow';\n\n    const $shim = document.createElement('div');\n    $shim.className = 'fullscreen-shim';\n    $shim.style.height = `${this.nativeHeight}px`;\n    $shim.style.top = `${this.topOffset}px`;\n\n    // Add new elements to the DOM\n    this.$module.appendChild($fixedWrapper);\n    this.$module.appendChild($rightShadow);\n    this.$module.parentNode.insertBefore($shim, this.$module.nextSibling);\n    this.$module.style.position = 'absolute';\n\n    // Cache references to the new elements\n    this.$scrollableTable = this.$module.querySelector('.fullscreen-scrollable-table');\n    this.$fixedTable = this.$module.querySelector('.fullscreen-fixed-table');\n    this.$rightShadow = this.$module.querySelector('.fullscreen-right-shadow');\n  }\n\n  maintainHeight() {\n    const height = Math.min(\n      (window.innerHeight - this.topOffset) + window.scrollY,\n      this.nativeHeight\n    );\n  \n    this.$scrollableTable.style.height = `${height}px`;\n    this.$fixedTable.style.height = `${height}px`;\n  }\n\n  maintainWidth() {\n    const $scrollableIndexColumnHeader = this.$scrollableTable.querySelector('.table-field-heading-first');\n    const $fixedIndexColumnHeader = this.$fixedTable.querySelector('.table-field-heading-first');\n\n    if ($scrollableIndexColumnHeader === null || $fixedIndexColumnHeader === null) return;\n\n    this.$scrollableTable.style.width = `${this.$module.parentElement.getBoundingClientRect().width}px`;\n\n    // Ensure column widths in both tables match to prevent misalignment\n    if ($fixedIndexColumnHeader.getBoundingClientRect().width !== $scrollableIndexColumnHeader.getBoundingClientRect().width) {\n      $scrollableIndexColumnHeader.style.width = `${$fixedIndexColumnHeader.getBoundingClientRect().width}px`;\n    }\n\n    // Set the width of the fixed table container to match its first column\n    this.$fixedTable.style.width = `${$fixedIndexColumnHeader.getBoundingClientRect().width + 4}px`; // 4px for shadow\n  }\n\n  toggleShadows() {\n    // Show a shadow on the frozen column if the table is scrolled left\n    const isScrolled = this.$scrollableTable.scrollLeft > 0;\n    this.$fixedTable.classList.toggle('fullscreen-scrolled-table', isScrolled);\n\n    // Show a shadow on the right edge if there's more content to scroll to\n    const maxScroll = this.$table.offsetWidth - this.$scrollableTable.offsetWidth;\n    const isScrollable = this.$scrollableTable.scrollLeft < maxScroll;\n    this.$rightShadow.classList.toggle('visible', isScrollable);\n\n    setTimeout(() => this.$rightShadow.classList.add('with-transition'), 3000);\n  }\n}\n\nexport default FullscreenTable;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass RemoveInPresenceOf {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.$elementToRemove = $module;\n    const observer = new MutationObserver(function () {\n      if (document.getElementById(this.$elementToRemove.dataset.targetElementId)) {\n        this.$elementToRemove.parentNode.removeChild(this.$elementToRemove);\n        observer.disconnect();\n      }\n    }.bind(this));\n\n    observer.observe(document.getElementById('main-content'), { childList: true, subtree: true });\n\n  }\n}\n\nexport default RemoveInPresenceOf;\n","import { isSupported } from 'govuk-frontend';\n\n/*\nThis new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\nthat uses ES2015 Classes -\nhttps://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n\nIt replaces the previously used way of setting methods on the component's `prototype`.\nWe use a class declaration way of defining classes -\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n\nMore on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nThis module is intended to be used to show and hide an error banner based on a javascript trigger. You should make\nsure the banner has an appropriate aria-live attribute, and a tabindex of -1 so that screenreaders and keyboard users\nare alerted to the change respectively.\n\nThis may behave in unexpected ways if you have more than one element with the `govuk-error-summary` class on your page.\n*/\nclass ErrorBanner {\n  constructor(selector) {\n    if (!isSupported()) {\n      return this;\n    }\n    /* \n    authenticate and register security keys have 3 error banners:\n    no-js, no-webauth support and one for error in getting/setting creds\n    old JS used to toggle display of all 3.\n\n    now, we pass a selector that we want to toggle but still use\n    govuk-error-summary as the default\n    */\n    selector = selector || '.govuk-error-summary';\n    this.$bannerElement = document.querySelector(selector);\n  }   \n\n  hideBanner() {\n    this.$bannerElement.setAttribute('hidden','hidden');\n  }\n\n  showBanner() {\n    this.$bannerElement.removeAttribute('hidden');\n    this.$bannerElement.focus();\n  }\n}\n\nexport default ErrorBanner;\n","import { isSupported } from 'govuk-frontend';\nimport ErrorBanner from './error-banner.mjs';\nimport { locationAssign } from '../utils/location.mjs';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES 2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass AuthenticateSecurityKey {\n  constructor($module) {\n    if (\n      !isSupported() ||\n      !window.TextEncoder ||\n      !window.PublicKeyCredential?.parseRequestOptionsFromJSON\n    ) {\n      return this;\n    }\n    this.authenticationEndpoint = '/webauthn/authenticate';\n    this.$module = $module;\n\n    this.$module.addEventListener('click', this.authenticateKey.bind(this));\n  }\n\n  async authenticateKey(e) {\n    e.preventDefault();\n\n    try {\n      const options = await this.handleFetch();\n      const credential = await this.getCredential(options);\n      const response = await this.postCredential(credential);\n      await this.handleCredentialResponse(response);\n    } catch (error) {\n      this.handleError(error);\n    }\n  }\n\n  async handleFetch() {\n    const response = await fetch(this.authenticationEndpoint);\n\n    if (!response.ok) {\n      throw Error(response.statusText);\n    }\n\n    const optionsJSON = await response.json();\n    return PublicKeyCredential.parseRequestOptionsFromJSON(optionsJSON.publicKey);\n  }\n\n  async getCredential(publicKey) {\n    // triggers browser dialogue to login with authenticator\n    return window.navigator.credentials.get({ publicKey });\n  }\n\n  async postCredential(credential) {\n    const currentURL = new URL(window.location.href);\n\n    // create authenticateURL from admin hostname plus authentication endpoint path\n    const authenticateURL = new URL(this.authenticationEndpoint, window.location.href);\n\n    const nextUrl = currentURL.searchParams.get('next');\n    if (nextUrl) {\n      // takes nextUrl from the query string on the current browser URL\n      // (which should be /two-factor-webauthn) and pass it through to\n      // the POST. put it in a query string so it's consistent with how\n      // the other login flows manage it\n      authenticateURL.searchParams.set('next', nextUrl);\n    }\n\n    return fetch(authenticateURL, {\n      method: 'POST',\n      headers: {\n        'X-CSRFToken': this.$module.dataset.csrfToken,\n        'Content-Type': 'application/json'\n      },\n      body: JSON.stringify(credential.toJSON())\n    });\n  }\n\n  async handleCredentialResponse(response) {\n    if (!response.ok) {\n      throw Error(response.statusText);\n    }\n\n    const data = await response.json();\n\n    // Redirect the user on successful authentication\n    locationAssign(data.redirect_url);\n  }\n\n  handleError(error) {\n    console.error(error);\n    // some browsers will show an error dialogue for some errors;\n    // to be safe we always display an error message on the page.\n    new ErrorBanner('.webauthn__error').showBanner();\n  }\n}\n\nexport default AuthenticateSecurityKey;\n","import { isSupported } from 'govuk-frontend';\nimport ErrorBanner from './error-banner.mjs';\nimport { locationReload } from '../utils/location.mjs';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES 2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass RegisterSecurityKey {\n  constructor($module) {\n    if (\n      !isSupported() ||\n      !window.TextEncoder ||\n      !window.PublicKeyCredential?.parseCreationOptionsFromJSON\n    ) {\n      return this;\n    }\n    this.registerAuthenticationEndpoint = '/webauthn/register';\n    this.$module = $module;\n\n    this.$module.addEventListener('click', this.registerKey.bind(this));\n  }\n\n  async registerKey(e) {\n    e.preventDefault();\n\n    try {\n      const options = await this.handleFetch();\n      const credential = await this.createCredential(options);\n      const response = await this.postCredential(credential);\n      this.handleCredentialResponse(response);\n    } catch (error) {\n      this.handleError(error);\n    }\n  }\n\n  async handleFetch() {\n    const response = await fetch(this.registerAuthenticationEndpoint);\n\n    if (!response.ok) {\n      throw Error(response.statusText);\n    }\n\n    const optionsJSON = await response.json();\n    return PublicKeyCredential.parseCreationOptionsFromJSON(optionsJSON.publicKey);\n  }\n\n  createCredential(publicKey) {\n    // triggers browser dialogue to select authenticator\n    return window.navigator.credentials.create({ publicKey });\n  }\n\n  postCredential(credential) {\n    return fetch(this.registerAuthenticationEndpoint, {\n      method: 'POST',\n      headers: {\n        'X-CSRFToken': this.$module.dataset.csrfToken,\n        'Content-Type': 'application/json'\n      },\n      body: JSON.stringify(credential.toJSON())\n    });\n  }\n\n  handleCredentialResponse(response) {\n    if (!response.ok) {\n      throw Error(response.statusText);\n    }\n    locationReload();\n  }\n\n  handleError(error) {\n    console.error(error);\n    // some browsers will show an error dialogue for some errors;\n    // to be safe we always display an error message on the page.\n    new ErrorBanner('.webauthn__error').showBanner();\n  }\n}\n\nexport default RegisterSecurityKey;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\nclass UpdateStatus {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.$module = $module;\n    this.$textbox = document.getElementById(this.$module.dataset.target);\n    this.throttleOn = false;\n    this.callsHaveBeenThrottled = false;\n    this.timeout = null;\n  }\n\n  getRenderer($module, response) {\n    $module.innerHTML = response.html;\n  }\n\n  throttle(func, limit) {\n    return (...args) => {\n      if (this.throttleOn) {\n        this.callsHaveBeenThrottled = true;\n      } else {\n        func.apply(this, args);\n        this.throttleOn = true;\n      }\n\n      clearTimeout(this.timeout);\n\n      this.timeout = setTimeout(() => {\n        this.throttleOn = false;\n        if (this.callsHaveBeenThrottled) func.apply(this, args);\n        this.callsHaveBeenThrottled = false;\n      }, limit);\n    };\n  }\n\n  init() {\n    const id = 'update-status';\n    this.$module.setAttribute('id', id);\n    this.$module.parentNode.removeAttribute('hidden');\n    const ariaDescribedby = this.$textbox.getAttribute('aria-describedby') || '';\n\n    this.$textbox.setAttribute(\n      'aria-describedby',\n      `${ariaDescribedby}${ariaDescribedby ? ' ' : ''}${id}`\n    );\n\n    this.$textbox.addEventListener('input', this.throttle(this.update.bind(this), 150).bind(this));\n    this.$textbox.dispatchEvent(new Event('input'));\n  }\n\n  async update() {\n    const url = this.$module.dataset.updatesUrl;\n    const formData = new URLSearchParams(new FormData(this.$textbox.closest('form'))).toString();\n\n    try {\n      const response = await fetch(url, {\n        method: 'POST',\n        headers: {\n          \"Content-Type\": \"application/x-www-form-urlencoded\",\n        },\n        body: formData\n      });\n\n      if (response.ok) {\n        const data = await response.json();\n        this.getRenderer(this.$module, data);\n      }\n    } catch (error) {\n      console.error('Failed to update status:', error);\n    }\n  }\n}\n\nexport default UpdateStatus;\n","var DOCUMENT_FRAGMENT_NODE = 11;\n\nfunction morphAttrs(fromNode, toNode) {\n    var toNodeAttrs = toNode.attributes;\n    var attr;\n    var attrName;\n    var attrNamespaceURI;\n    var attrValue;\n    var fromValue;\n\n    // document-fragments dont have attributes so lets not do anything\n    if (toNode.nodeType === DOCUMENT_FRAGMENT_NODE || fromNode.nodeType === DOCUMENT_FRAGMENT_NODE) {\n      return;\n    }\n\n    // update attributes on original DOM element\n    for (var i = toNodeAttrs.length - 1; i >= 0; i--) {\n        attr = toNodeAttrs[i];\n        attrName = attr.name;\n        attrNamespaceURI = attr.namespaceURI;\n        attrValue = attr.value;\n\n        if (attrNamespaceURI) {\n            attrName = attr.localName || attrName;\n            fromValue = fromNode.getAttributeNS(attrNamespaceURI, attrName);\n\n            if (fromValue !== attrValue) {\n                if (attr.prefix === 'xmlns'){\n                    attrName = attr.name; // It's not allowed to set an attribute with the XMLNS namespace without specifying the `xmlns` prefix\n                }\n                fromNode.setAttributeNS(attrNamespaceURI, attrName, attrValue);\n            }\n        } else {\n            fromValue = fromNode.getAttribute(attrName);\n\n            if (fromValue !== attrValue) {\n                fromNode.setAttribute(attrName, attrValue);\n            }\n        }\n    }\n\n    // Remove any extra attributes found on the original DOM element that\n    // weren't found on the target element.\n    var fromNodeAttrs = fromNode.attributes;\n\n    for (var d = fromNodeAttrs.length - 1; d >= 0; d--) {\n        attr = fromNodeAttrs[d];\n        attrName = attr.name;\n        attrNamespaceURI = attr.namespaceURI;\n\n        if (attrNamespaceURI) {\n            attrName = attr.localName || attrName;\n\n            if (!toNode.hasAttributeNS(attrNamespaceURI, attrName)) {\n                fromNode.removeAttributeNS(attrNamespaceURI, attrName);\n            }\n        } else {\n            if (!toNode.hasAttribute(attrName)) {\n                fromNode.removeAttribute(attrName);\n            }\n        }\n    }\n}\n\nvar range; // Create a range object for efficently rendering strings to elements.\nvar NS_XHTML = 'http://www.w3.org/1999/xhtml';\n\nvar doc = typeof document === 'undefined' ? undefined : document;\nvar HAS_TEMPLATE_SUPPORT = !!doc && 'content' in doc.createElement('template');\nvar HAS_RANGE_SUPPORT = !!doc && doc.createRange && 'createContextualFragment' in doc.createRange();\n\nfunction createFragmentFromTemplate(str) {\n    var template = doc.createElement('template');\n    template.innerHTML = str;\n    return template.content.childNodes[0];\n}\n\nfunction createFragmentFromRange(str) {\n    if (!range) {\n        range = doc.createRange();\n        range.selectNode(doc.body);\n    }\n\n    var fragment = range.createContextualFragment(str);\n    return fragment.childNodes[0];\n}\n\nfunction createFragmentFromWrap(str) {\n    var fragment = doc.createElement('body');\n    fragment.innerHTML = str;\n    return fragment.childNodes[0];\n}\n\n/**\n * This is about the same\n * var html = new DOMParser().parseFromString(str, 'text/html');\n * return html.body.firstChild;\n *\n * @method toElement\n * @param {String} str\n */\nfunction toElement(str) {\n    str = str.trim();\n    if (HAS_TEMPLATE_SUPPORT) {\n      // avoid restrictions on content for things like `<tr><th>Hi</th></tr>` which\n      // createContextualFragment doesn't support\n      // <template> support not available in IE\n      return createFragmentFromTemplate(str);\n    } else if (HAS_RANGE_SUPPORT) {\n      return createFragmentFromRange(str);\n    }\n\n    return createFragmentFromWrap(str);\n}\n\n/**\n * Returns true if two node's names are the same.\n *\n * NOTE: We don't bother checking `namespaceURI` because you will never find two HTML elements with the same\n *       nodeName and different namespace URIs.\n *\n * @param {Element} a\n * @param {Element} b The target element\n * @return {boolean}\n */\nfunction compareNodeNames(fromEl, toEl) {\n    var fromNodeName = fromEl.nodeName;\n    var toNodeName = toEl.nodeName;\n    var fromCodeStart, toCodeStart;\n\n    if (fromNodeName === toNodeName) {\n        return true;\n    }\n\n    fromCodeStart = fromNodeName.charCodeAt(0);\n    toCodeStart = toNodeName.charCodeAt(0);\n\n    // If the target element is a virtual DOM node or SVG node then we may\n    // need to normalize the tag name before comparing. Normal HTML elements that are\n    // in the \"http://www.w3.org/1999/xhtml\"\n    // are converted to upper case\n    if (fromCodeStart <= 90 && toCodeStart >= 97) { // from is upper and to is lower\n        return fromNodeName === toNodeName.toUpperCase();\n    } else if (toCodeStart <= 90 && fromCodeStart >= 97) { // to is upper and from is lower\n        return toNodeName === fromNodeName.toUpperCase();\n    } else {\n        return false;\n    }\n}\n\n/**\n * Create an element, optionally with a known namespace URI.\n *\n * @param {string} name the element name, e.g. 'div' or 'svg'\n * @param {string} [namespaceURI] the element's namespace URI, i.e. the value of\n * its `xmlns` attribute or its inferred namespace.\n *\n * @return {Element}\n */\nfunction createElementNS(name, namespaceURI) {\n    return !namespaceURI || namespaceURI === NS_XHTML ?\n        doc.createElement(name) :\n        doc.createElementNS(namespaceURI, name);\n}\n\n/**\n * Copies the children of one DOM element to another DOM element\n */\nfunction moveChildren(fromEl, toEl) {\n    var curChild = fromEl.firstChild;\n    while (curChild) {\n        var nextChild = curChild.nextSibling;\n        toEl.appendChild(curChild);\n        curChild = nextChild;\n    }\n    return toEl;\n}\n\nfunction syncBooleanAttrProp(fromEl, toEl, name) {\n    if (fromEl[name] !== toEl[name]) {\n        fromEl[name] = toEl[name];\n        if (fromEl[name]) {\n            fromEl.setAttribute(name, '');\n        } else {\n            fromEl.removeAttribute(name);\n        }\n    }\n}\n\nvar specialElHandlers = {\n    OPTION: function(fromEl, toEl) {\n        var parentNode = fromEl.parentNode;\n        if (parentNode) {\n            var parentName = parentNode.nodeName.toUpperCase();\n            if (parentName === 'OPTGROUP') {\n                parentNode = parentNode.parentNode;\n                parentName = parentNode && parentNode.nodeName.toUpperCase();\n            }\n            if (parentName === 'SELECT' && !parentNode.hasAttribute('multiple')) {\n                if (fromEl.hasAttribute('selected') && !toEl.selected) {\n                    // Workaround for MS Edge bug where the 'selected' attribute can only be\n                    // removed if set to a non-empty value:\n                    // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12087679/\n                    fromEl.setAttribute('selected', 'selected');\n                    fromEl.removeAttribute('selected');\n                }\n                // We have to reset select element's selectedIndex to -1, otherwise setting\n                // fromEl.selected using the syncBooleanAttrProp below has no effect.\n                // The correct selectedIndex will be set in the SELECT special handler below.\n                parentNode.selectedIndex = -1;\n            }\n        }\n        syncBooleanAttrProp(fromEl, toEl, 'selected');\n    },\n    /**\n     * The \"value\" attribute is special for the <input> element since it sets\n     * the initial value. Changing the \"value\" attribute without changing the\n     * \"value\" property will have no effect since it is only used to the set the\n     * initial value.  Similar for the \"checked\" attribute, and \"disabled\".\n     */\n    INPUT: function(fromEl, toEl) {\n        syncBooleanAttrProp(fromEl, toEl, 'checked');\n        syncBooleanAttrProp(fromEl, toEl, 'disabled');\n\n        if (fromEl.value !== toEl.value) {\n            fromEl.value = toEl.value;\n        }\n\n        if (!toEl.hasAttribute('value')) {\n            fromEl.removeAttribute('value');\n        }\n    },\n\n    TEXTAREA: function(fromEl, toEl) {\n        var newValue = toEl.value;\n        if (fromEl.value !== newValue) {\n            fromEl.value = newValue;\n        }\n\n        var firstChild = fromEl.firstChild;\n        if (firstChild) {\n            // Needed for IE. Apparently IE sets the placeholder as the\n            // node value and vise versa. This ignores an empty update.\n            var oldValue = firstChild.nodeValue;\n\n            if (oldValue == newValue || (!newValue && oldValue == fromEl.placeholder)) {\n                return;\n            }\n\n            firstChild.nodeValue = newValue;\n        }\n    },\n    SELECT: function(fromEl, toEl) {\n        if (!toEl.hasAttribute('multiple')) {\n            var selectedIndex = -1;\n            var i = 0;\n            // We have to loop through children of fromEl, not toEl since nodes can be moved\n            // from toEl to fromEl directly when morphing.\n            // At the time this special handler is invoked, all children have already been morphed\n            // and appended to / removed from fromEl, so using fromEl here is safe and correct.\n            var curChild = fromEl.firstChild;\n            var optgroup;\n            var nodeName;\n            while(curChild) {\n                nodeName = curChild.nodeName && curChild.nodeName.toUpperCase();\n                if (nodeName === 'OPTGROUP') {\n                    optgroup = curChild;\n                    curChild = optgroup.firstChild;\n                } else {\n                    if (nodeName === 'OPTION') {\n                        if (curChild.hasAttribute('selected')) {\n                            selectedIndex = i;\n                            break;\n                        }\n                        i++;\n                    }\n                    curChild = curChild.nextSibling;\n                    if (!curChild && optgroup) {\n                        curChild = optgroup.nextSibling;\n                        optgroup = null;\n                    }\n                }\n            }\n\n            fromEl.selectedIndex = selectedIndex;\n        }\n    }\n};\n\nvar ELEMENT_NODE = 1;\nvar DOCUMENT_FRAGMENT_NODE$1 = 11;\nvar TEXT_NODE = 3;\nvar COMMENT_NODE = 8;\n\nfunction noop() {}\n\nfunction defaultGetNodeKey(node) {\n  if (node) {\n      return (node.getAttribute && node.getAttribute('id')) || node.id;\n  }\n}\n\nfunction morphdomFactory(morphAttrs) {\n\n    return function morphdom(fromNode, toNode, options) {\n        if (!options) {\n            options = {};\n        }\n\n        if (typeof toNode === 'string') {\n            if (fromNode.nodeName === '#document' || fromNode.nodeName === 'HTML' || fromNode.nodeName === 'BODY') {\n                var toNodeHtml = toNode;\n                toNode = doc.createElement('html');\n                toNode.innerHTML = toNodeHtml;\n            } else {\n                toNode = toElement(toNode);\n            }\n        }\n\n        var getNodeKey = options.getNodeKey || defaultGetNodeKey;\n        var onBeforeNodeAdded = options.onBeforeNodeAdded || noop;\n        var onNodeAdded = options.onNodeAdded || noop;\n        var onBeforeElUpdated = options.onBeforeElUpdated || noop;\n        var onElUpdated = options.onElUpdated || noop;\n        var onBeforeNodeDiscarded = options.onBeforeNodeDiscarded || noop;\n        var onNodeDiscarded = options.onNodeDiscarded || noop;\n        var onBeforeElChildrenUpdated = options.onBeforeElChildrenUpdated || noop;\n        var childrenOnly = options.childrenOnly === true;\n\n        // This object is used as a lookup to quickly find all keyed elements in the original DOM tree.\n        var fromNodesLookup = Object.create(null);\n        var keyedRemovalList = [];\n\n        function addKeyedRemoval(key) {\n            keyedRemovalList.push(key);\n        }\n\n        function walkDiscardedChildNodes(node, skipKeyedNodes) {\n            if (node.nodeType === ELEMENT_NODE) {\n                var curChild = node.firstChild;\n                while (curChild) {\n\n                    var key = undefined;\n\n                    if (skipKeyedNodes && (key = getNodeKey(curChild))) {\n                        // If we are skipping keyed nodes then we add the key\n                        // to a list so that it can be handled at the very end.\n                        addKeyedRemoval(key);\n                    } else {\n                        // Only report the node as discarded if it is not keyed. We do this because\n                        // at the end we loop through all keyed elements that were unmatched\n                        // and then discard them in one final pass.\n                        onNodeDiscarded(curChild);\n                        if (curChild.firstChild) {\n                            walkDiscardedChildNodes(curChild, skipKeyedNodes);\n                        }\n                    }\n\n                    curChild = curChild.nextSibling;\n                }\n            }\n        }\n\n        /**\n         * Removes a DOM node out of the original DOM\n         *\n         * @param  {Node} node The node to remove\n         * @param  {Node} parentNode The nodes parent\n         * @param  {Boolean} skipKeyedNodes If true then elements with keys will be skipped and not discarded.\n         * @return {undefined}\n         */\n        function removeNode(node, parentNode, skipKeyedNodes) {\n            if (onBeforeNodeDiscarded(node) === false) {\n                return;\n            }\n\n            if (parentNode) {\n                parentNode.removeChild(node);\n            }\n\n            onNodeDiscarded(node);\n            walkDiscardedChildNodes(node, skipKeyedNodes);\n        }\n\n        // // TreeWalker implementation is no faster, but keeping this around in case this changes in the future\n        // function indexTree(root) {\n        //     var treeWalker = document.createTreeWalker(\n        //         root,\n        //         NodeFilter.SHOW_ELEMENT);\n        //\n        //     var el;\n        //     while((el = treeWalker.nextNode())) {\n        //         var key = getNodeKey(el);\n        //         if (key) {\n        //             fromNodesLookup[key] = el;\n        //         }\n        //     }\n        // }\n\n        // // NodeIterator implementation is no faster, but keeping this around in case this changes in the future\n        //\n        // function indexTree(node) {\n        //     var nodeIterator = document.createNodeIterator(node, NodeFilter.SHOW_ELEMENT);\n        //     var el;\n        //     while((el = nodeIterator.nextNode())) {\n        //         var key = getNodeKey(el);\n        //         if (key) {\n        //             fromNodesLookup[key] = el;\n        //         }\n        //     }\n        // }\n\n        function indexTree(node) {\n            if (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE$1) {\n                var curChild = node.firstChild;\n                while (curChild) {\n                    var key = getNodeKey(curChild);\n                    if (key) {\n                        fromNodesLookup[key] = curChild;\n                    }\n\n                    // Walk recursively\n                    indexTree(curChild);\n\n                    curChild = curChild.nextSibling;\n                }\n            }\n        }\n\n        indexTree(fromNode);\n\n        function handleNodeAdded(el) {\n            onNodeAdded(el);\n\n            var curChild = el.firstChild;\n            while (curChild) {\n                var nextSibling = curChild.nextSibling;\n\n                var key = getNodeKey(curChild);\n                if (key) {\n                    var unmatchedFromEl = fromNodesLookup[key];\n                    // if we find a duplicate #id node in cache, replace `el` with cache value\n                    // and morph it to the child node.\n                    if (unmatchedFromEl && compareNodeNames(curChild, unmatchedFromEl)) {\n                        curChild.parentNode.replaceChild(unmatchedFromEl, curChild);\n                        morphEl(unmatchedFromEl, curChild);\n                    } else {\n                      handleNodeAdded(curChild);\n                    }\n                } else {\n                  // recursively call for curChild and it's children to see if we find something in\n                  // fromNodesLookup\n                  handleNodeAdded(curChild);\n                }\n\n                curChild = nextSibling;\n            }\n        }\n\n        function cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey) {\n            // We have processed all of the \"to nodes\". If curFromNodeChild is\n            // non-null then we still have some from nodes left over that need\n            // to be removed\n            while (curFromNodeChild) {\n                var fromNextSibling = curFromNodeChild.nextSibling;\n                if ((curFromNodeKey = getNodeKey(curFromNodeChild))) {\n                    // Since the node is keyed it might be matched up later so we defer\n                    // the actual removal to later\n                    addKeyedRemoval(curFromNodeKey);\n                } else {\n                    // NOTE: we skip nested keyed nodes from being removed since there is\n                    //       still a chance they will be matched up later\n                    removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */);\n                }\n                curFromNodeChild = fromNextSibling;\n            }\n        }\n\n        function morphEl(fromEl, toEl, childrenOnly) {\n            var toElKey = getNodeKey(toEl);\n\n            if (toElKey) {\n                // If an element with an ID is being morphed then it will be in the final\n                // DOM so clear it out of the saved elements collection\n                delete fromNodesLookup[toElKey];\n            }\n\n            if (!childrenOnly) {\n                // optional\n                if (onBeforeElUpdated(fromEl, toEl) === false) {\n                    return;\n                }\n\n                // update attributes on original DOM element first\n                morphAttrs(fromEl, toEl);\n                // optional\n                onElUpdated(fromEl);\n\n                if (onBeforeElChildrenUpdated(fromEl, toEl) === false) {\n                    return;\n                }\n            }\n\n            if (fromEl.nodeName !== 'TEXTAREA') {\n              morphChildren(fromEl, toEl);\n            } else {\n              specialElHandlers.TEXTAREA(fromEl, toEl);\n            }\n        }\n\n        function morphChildren(fromEl, toEl) {\n            var curToNodeChild = toEl.firstChild;\n            var curFromNodeChild = fromEl.firstChild;\n            var curToNodeKey;\n            var curFromNodeKey;\n\n            var fromNextSibling;\n            var toNextSibling;\n            var matchingFromEl;\n\n            // walk the children\n            outer: while (curToNodeChild) {\n                toNextSibling = curToNodeChild.nextSibling;\n                curToNodeKey = getNodeKey(curToNodeChild);\n\n                // walk the fromNode children all the way through\n                while (curFromNodeChild) {\n                    fromNextSibling = curFromNodeChild.nextSibling;\n\n                    if (curToNodeChild.isSameNode && curToNodeChild.isSameNode(curFromNodeChild)) {\n                        curToNodeChild = toNextSibling;\n                        curFromNodeChild = fromNextSibling;\n                        continue outer;\n                    }\n\n                    curFromNodeKey = getNodeKey(curFromNodeChild);\n\n                    var curFromNodeType = curFromNodeChild.nodeType;\n\n                    // this means if the curFromNodeChild doesnt have a match with the curToNodeChild\n                    var isCompatible = undefined;\n\n                    if (curFromNodeType === curToNodeChild.nodeType) {\n                        if (curFromNodeType === ELEMENT_NODE) {\n                            // Both nodes being compared are Element nodes\n\n                            if (curToNodeKey) {\n                                // The target node has a key so we want to match it up with the correct element\n                                // in the original DOM tree\n                                if (curToNodeKey !== curFromNodeKey) {\n                                    // The current element in the original DOM tree does not have a matching key so\n                                    // let's check our lookup to see if there is a matching element in the original\n                                    // DOM tree\n                                    if ((matchingFromEl = fromNodesLookup[curToNodeKey])) {\n                                        if (fromNextSibling === matchingFromEl) {\n                                            // Special case for single element removals. To avoid removing the original\n                                            // DOM node out of the tree (since that can break CSS transitions, etc.),\n                                            // we will instead discard the current node and wait until the next\n                                            // iteration to properly match up the keyed target element with its matching\n                                            // element in the original tree\n                                            isCompatible = false;\n                                        } else {\n                                            // We found a matching keyed element somewhere in the original DOM tree.\n                                            // Let's move the original DOM node into the current position and morph\n                                            // it.\n\n                                            // NOTE: We use insertBefore instead of replaceChild because we want to go through\n                                            // the `removeNode()` function for the node that is being discarded so that\n                                            // all lifecycle hooks are correctly invoked\n                                            fromEl.insertBefore(matchingFromEl, curFromNodeChild);\n\n                                            // fromNextSibling = curFromNodeChild.nextSibling;\n\n                                            if (curFromNodeKey) {\n                                                // Since the node is keyed it might be matched up later so we defer\n                                                // the actual removal to later\n                                                addKeyedRemoval(curFromNodeKey);\n                                            } else {\n                                                // NOTE: we skip nested keyed nodes from being removed since there is\n                                                //       still a chance they will be matched up later\n                                                removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */);\n                                            }\n\n                                            curFromNodeChild = matchingFromEl;\n                                        }\n                                    } else {\n                                        // The nodes are not compatible since the \"to\" node has a key and there\n                                        // is no matching keyed node in the source tree\n                                        isCompatible = false;\n                                    }\n                                }\n                            } else if (curFromNodeKey) {\n                                // The original has a key\n                                isCompatible = false;\n                            }\n\n                            isCompatible = isCompatible !== false && compareNodeNames(curFromNodeChild, curToNodeChild);\n                            if (isCompatible) {\n                                // We found compatible DOM elements so transform\n                                // the current \"from\" node to match the current\n                                // target DOM node.\n                                // MORPH\n                                morphEl(curFromNodeChild, curToNodeChild);\n                            }\n\n                        } else if (curFromNodeType === TEXT_NODE || curFromNodeType == COMMENT_NODE) {\n                            // Both nodes being compared are Text or Comment nodes\n                            isCompatible = true;\n                            // Simply update nodeValue on the original node to\n                            // change the text value\n                            if (curFromNodeChild.nodeValue !== curToNodeChild.nodeValue) {\n                                curFromNodeChild.nodeValue = curToNodeChild.nodeValue;\n                            }\n\n                        }\n                    }\n\n                    if (isCompatible) {\n                        // Advance both the \"to\" child and the \"from\" child since we found a match\n                        // Nothing else to do as we already recursively called morphChildren above\n                        curToNodeChild = toNextSibling;\n                        curFromNodeChild = fromNextSibling;\n                        continue outer;\n                    }\n\n                    // No compatible match so remove the old node from the DOM and continue trying to find a\n                    // match in the original DOM. However, we only do this if the from node is not keyed\n                    // since it is possible that a keyed node might match up with a node somewhere else in the\n                    // target tree and we don't want to discard it just yet since it still might find a\n                    // home in the final DOM tree. After everything is done we will remove any keyed nodes\n                    // that didn't find a home\n                    if (curFromNodeKey) {\n                        // Since the node is keyed it might be matched up later so we defer\n                        // the actual removal to later\n                        addKeyedRemoval(curFromNodeKey);\n                    } else {\n                        // NOTE: we skip nested keyed nodes from being removed since there is\n                        //       still a chance they will be matched up later\n                        removeNode(curFromNodeChild, fromEl, true /* skip keyed nodes */);\n                    }\n\n                    curFromNodeChild = fromNextSibling;\n                } // END: while(curFromNodeChild) {}\n\n                // If we got this far then we did not find a candidate match for\n                // our \"to node\" and we exhausted all of the children \"from\"\n                // nodes. Therefore, we will just append the current \"to\" node\n                // to the end\n                if (curToNodeKey && (matchingFromEl = fromNodesLookup[curToNodeKey]) && compareNodeNames(matchingFromEl, curToNodeChild)) {\n                    fromEl.appendChild(matchingFromEl);\n                    // MORPH\n                    morphEl(matchingFromEl, curToNodeChild);\n                } else {\n                    var onBeforeNodeAddedResult = onBeforeNodeAdded(curToNodeChild);\n                    if (onBeforeNodeAddedResult !== false) {\n                        if (onBeforeNodeAddedResult) {\n                            curToNodeChild = onBeforeNodeAddedResult;\n                        }\n\n                        if (curToNodeChild.actualize) {\n                            curToNodeChild = curToNodeChild.actualize(fromEl.ownerDocument || doc);\n                        }\n                        fromEl.appendChild(curToNodeChild);\n                        handleNodeAdded(curToNodeChild);\n                    }\n                }\n\n                curToNodeChild = toNextSibling;\n                curFromNodeChild = fromNextSibling;\n            }\n\n            cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey);\n\n            var specialElHandler = specialElHandlers[fromEl.nodeName];\n            if (specialElHandler) {\n                specialElHandler(fromEl, toEl);\n            }\n        } // END: morphChildren(...)\n\n        var morphedNode = fromNode;\n        var morphedNodeType = morphedNode.nodeType;\n        var toNodeType = toNode.nodeType;\n\n        if (!childrenOnly) {\n            // Handle the case where we are given two DOM nodes that are not\n            // compatible (e.g. <div> --> <span> or <div> --> TEXT)\n            if (morphedNodeType === ELEMENT_NODE) {\n                if (toNodeType === ELEMENT_NODE) {\n                    if (!compareNodeNames(fromNode, toNode)) {\n                        onNodeDiscarded(fromNode);\n                        morphedNode = moveChildren(fromNode, createElementNS(toNode.nodeName, toNode.namespaceURI));\n                    }\n                } else {\n                    // Going from an element node to a text node\n                    morphedNode = toNode;\n                }\n            } else if (morphedNodeType === TEXT_NODE || morphedNodeType === COMMENT_NODE) { // Text or comment node\n                if (toNodeType === morphedNodeType) {\n                    if (morphedNode.nodeValue !== toNode.nodeValue) {\n                        morphedNode.nodeValue = toNode.nodeValue;\n                    }\n\n                    return morphedNode;\n                } else {\n                    // Text node to something else\n                    morphedNode = toNode;\n                }\n            }\n        }\n\n        if (morphedNode === toNode) {\n            // The \"to node\" was not compatible with the \"from node\" so we had to\n            // toss out the \"from node\" and use the \"to node\"\n            onNodeDiscarded(fromNode);\n        } else {\n            if (toNode.isSameNode && toNode.isSameNode(morphedNode)) {\n                return;\n            }\n\n            morphEl(morphedNode, toNode, childrenOnly);\n\n            // We now need to loop over any keyed nodes that might need to be\n            // removed. We only do the removal if we know that the keyed node\n            // never found a match. When a keyed node is matched up we remove\n            // it out of fromNodesLookup and we use fromNodesLookup to determine\n            // if a keyed node has been matched up or not\n            if (keyedRemovalList) {\n                for (var i=0, len=keyedRemovalList.length; i<len; i++) {\n                    var elToRemove = fromNodesLookup[keyedRemovalList[i]];\n                    if (elToRemove) {\n                        removeNode(elToRemove, elToRemove.parentNode, false);\n                    }\n                }\n            }\n        }\n\n        if (!childrenOnly && morphedNode !== fromNode && fromNode.parentNode) {\n            if (morphedNode.actualize) {\n                morphedNode = morphedNode.actualize(fromNode.ownerDocument || doc);\n            }\n            // If we had to swap out the from node with a new node because the old\n            // node was not compatible with the target node then we need to\n            // replace the old DOM node in the original DOM tree. This is only\n            // possible if the original DOM node was part of a DOM tree which\n            // we know is the case if it has a parent node.\n            fromNode.parentNode.replaceChild(morphedNode, fromNode);\n        }\n\n        return morphedNode;\n    };\n}\n\nvar morphdom = morphdomFactory(morphAttrs);\n\nexport default morphdom;\n","import { isSupported } from 'govuk-frontend';\nimport morphdom from 'morphdom';\nimport { locationReload } from '../utils/location.mjs';\n\nconst resourceState = {};\nconst defaultInterval = 2000;\n\n// Keyed by resource URL. Each entry holds:\n// renderers – Set of renderer functions registered by all instances\n// timeout – The single active setTimeout handle\n// interval – Current backoff interval\n// fetching – Whether a fetch is in flight\nfunction getState(resource) {\n  if (!resourceState[resource]) {\n    resourceState[resource] = {\n      renderers: new Set(),\n      timeout: null,\n      interval: defaultInterval,\n      fetching: false,\n    };\n  }\n  return resourceState[resource];\n}\n\n// Because the polling loop is shared, it can't belong to one instance. \n// It reads and writes resourceState[resource] directly. \n// All instances for the same URL share the exact same timeout and interval.\nasync function pollResource(resource, $form) {\n  const state = getState(resource);\n\n  clearTimeout(state.timeout);\n\n  if (document.visibilityState === 'hidden' || state.fetching) {\n    state.timeout = setTimeout(() => pollResource(resource, $form), state.interval);\n    return;\n  }\n\n  state.fetching = true;\n  const startTime = Date.now();\n\n  const method = $form ? 'POST' : 'GET';\n  const fetchOptions = { method, headers: {} };\n\n  if ($form) {\n    const formEl = document.getElementById($form);\n    if (formEl) {\n      fetchOptions.body = new URLSearchParams(new FormData(formEl)).toString();\n      fetchOptions.headers['Content-Type'] = 'application/x-www-form-urlencoded';\n    }\n  }\n\n  try {\n    const response = await fetch(resource, fetchOptions);\n\n    if (!response.ok) {\n      if (response.status === 401) {\n        locationReload();\n      }\n      state.fetching = false;\n      return;\n    }\n\n    const responseData = await response.json();\n\n    for (const renderer of state.renderers) {\n      renderer(responseData);\n    }\n\n    if (responseData.stop === 1) {\n      state.fetching = false;\n      return;\n    }\n\n    // Calculate backoff from actual response time, replacing the initial default.\n    state.interval = UpdateContent.prototype.calculateBackoff(Date.now() - startTime);\n\n  } catch {\n    // Network error – back off and retry.\n  }\n\n  state.fetching = false;\n  state.timeout = setTimeout(() => pollResource(resource, $form), state.interval);\n}\n\nclass UpdateContent {\n  constructor($module) {\n    if (!isSupported()) {\n      return this;\n    }\n    \n    this.$contents = $module.firstElementChild;\n    this.key = $module.dataset.key;\n    this.resource = $module.dataset.resource;\n    this.$form = $module.dataset.form;\n\n    // Replace component with contents.\n    // The renderer does this anyway when diffing against the first response\n    $module.parentNode.replaceChild(this.$contents, $module);\n\n    const state = getState(this.resource);\n    const renderer = this.getRenderer(this.$contents, this.key);\n\n    state.renderers.add(renderer);\n\n    if (state.renderers.size === 1) {\n      state.timeout = setTimeout(() => pollResource(this.resource, this.$form), state.interval);\n    }\n  }\n\n  calculateBackoff(responseTime) {\n    return Math.max(Math.floor(250 * Math.sqrt(responseTime)) - 1000, 1000);\n  }\n\n  getRenderer(contents, key) {\n    return (response) => {\n      if (!response || !response[key]) return;\n\n      let contentHasUpdated = false;\n      const parser = new DOMParser();\n      const doc = parser.parseFromString(response[key], 'text/html');\n      const newContents = doc.body.firstElementChild;\n\n      morphdom(contents, newContents, {\n        onBeforeElUpdated: (fromEl, toEl) => {\n          // spec - https://dom.spec.whatwg.org/#concept-node-equals\n          if (fromEl.isEqualNode(toEl)) {\n            return false;\n          } else if (fromEl === contents) { // if root node is different, updates will apply\n            contentHasUpdated = true;\n          }\n          return true;\n        }\n      });\n\n      if (contentHasUpdated) {\n        document.dispatchEvent(new CustomEvent('updateContent.onafterupdate', {\n          detail: { el: [contents] }\n        }));\n      }\n    };\n  }\n}\n\nexport default UpdateContent;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\n// inspired by https://polypane.app/blog/the-intl-api-the-best-browser-api-youre-not-using/\n// NL override of update-relative-time.mjs - uses the nl-NL locale instead of en-GB\nclass UpdateRelativeTime {\n  // creating formatters is expensive so we create them once and reuse\n  static relativeFormatter = new Intl.RelativeTimeFormat('nl-NL', { numeric: 'auto' });\n  static fullDateFormatter = new Intl.DateTimeFormat('nl-NL', { dateStyle: 'long', timeStyle: 'short' });\n\n  constructor(selector) {\n    if (!isSupported()) {\n      return this;\n    }\n\n    this.selector = selector;\n\n    this.init();\n  }\n\n  init() {\n    this.updateExistingElements();\n\n    // start global 60s interval\n    setInterval(() => this.updateExistingElements(), 60000);\n  }\n\n  updateExistingElements() {\n    const $elements = document.querySelectorAll(this.selector);\n    const now = new Date();\n    $elements.forEach(($el) => this.updateTextString($el, now));\n  }\n\n  updateTextString(element, currentTime) {\n    const elementDatetimeStamp = element.getAttribute('datetime');\n    // don't run if we forgot to include the attribute\n    if (!elementDatetimeStamp) return;\n\n    const elementTime = new Date(elementDatetimeStamp);\n\n    // we only update the title attribute once with\n    // human-readible date format\n    if (!element.hasAttribute('title')) {\n      element.setAttribute('title', UpdateRelativeTime.fullDateFormatter.format(elementTime));\n    }\n\n    const relativeTimeString = this.calculateRelativeTimeString(elementTime, currentTime);\n\n    // only update text if there's a change\n    // hours, days and longer don't need to have\n    // their text updated every minute\n    if (element.textContent !== relativeTimeString) {\n      element.textContent = relativeTimeString;\n    }\n  }\n\n  calculateRelativeTimeString(elementTime, currentTime) {\n    // thresholds to switch display units\n    // in line with what we used before and other libraries\n    // https://github.com/rmm5t/jquery-timeago/blob/master/jquery.timeago.js#L102\n    // https://day.js.org/docs/en/customization/relative-time#relative-time-thresholds-and-rounding\n    const diffInSeconds = Math.round((elementTime - currentTime) / 1000);\n    const absSeconds = Math.abs(diffInSeconds);\n\n    // Custom overrides for the immediate past\n    if (diffInSeconds <= 0) {\n      if (absSeconds < 30) {\n        return \"zojuist\";\n      }\n      if (absSeconds < 60) {\n        return \"in de afgelopen minuut\";\n      }\n    }\n\n    // handle future seconds or cases not caught by custom past strings\n    if (diffInSeconds > 0 && absSeconds < 45) { // 0 to 44s (future)\n      return UpdateRelativeTime.relativeFormatter.format(diffInSeconds, 'second');\n    }\n\n    const diffInMinutes = Math.round(diffInSeconds / 60);\n    // ensure we are at least at 60s to avoid overlapping with \"in de afgelopen minuut\"\n    if (absSeconds >= 60 && Math.abs(diffInMinutes) < 45) { // 60s to 44m\n      return UpdateRelativeTime.relativeFormatter.format(diffInMinutes, 'minute');\n    }\n\n    const diffInHours = Math.round(diffInMinutes / 60);\n    if (Math.abs(diffInHours) < 22) { // 45m to 21h\n      return UpdateRelativeTime.relativeFormatter.format(diffInHours, 'hour');\n    }\n\n    const diffInDays = Math.round(diffInHours / 24);\n    if (Math.abs(diffInDays) < 27) { // 22h to 26d\n      return UpdateRelativeTime.relativeFormatter.format(diffInDays, 'day');\n    }\n\n    // for months and years, we use the calendar date logic as lengths are different\n    const monthDiff = (elementTime.getFullYear() - currentTime.getFullYear()) * 12 +\n                      (elementTime.getMonth() - currentTime.getMonth());\n\n    if (Math.abs(monthDiff) < 11) {\n      return UpdateRelativeTime.relativeFormatter.format(monthDiff, 'month');\n    }\n\n    const yearDiff = Math.round(monthDiff / 12);\n    return UpdateRelativeTime.relativeFormatter.format(yearDiff, 'year');\n  }\n}\n\nexport default UpdateRelativeTime;\n","// GOVUK Frontend modules\nimport { createAll, Button, Radios, ErrorSummary, SkipLink, Tabs, ServiceNavigation } from 'govuk-frontend';\n\nimport CollapsibleCheckboxes from './collapsible-checkboxes.mjs';\nimport FocusBanner from './focus-banner.mjs';\nimport ColourPreview from './colour-preview.mjs';\nimport FileUpload from './file-upload.mjs';\nimport Autofocus from './autofocus.mjs';\nimport Homepage from './homepage.mjs';\nimport PreviewPane from './preview-pane.mjs';\nimport CopyToClipboard from './copy-to-clipboard.mjs';\nimport ListEntry from './list-entry.mjs';\nimport RadiosWithImages from './radios-with-images.mjs';\n\nimport LiveSearch from './live-search.mjs';\nimport EnhancedTextbox from './enhanced-textbox.mjs';\nimport CheckReportStatus from './check-report-status.mjs';\nimport LiveCheckboxControls from './live-checkbox-controls.mjs';\nimport AddBrandingOptionsControls from './add-branding-options-controls.mjs';\n\nimport RadioSelect from './radio-select.mjs';\nimport FullscreenTable from './fullscreen-table.mjs';\nimport RemoveInPresenceOf from './remove-in-presence-of.mjs';\nimport AuthenticateSecurityKey from './authenticate-security-key.mjs';\nimport RegisterSecurityKey from './register-security-key.mjs';\nimport UpdateStatus from './update-status.mjs';\nimport UpdateContent from './update-content.mjs';\nimport UpdateRelativeTime from './update-relative-time_nl.mjs';\nimport { stickAtTopWhenScrolling, stickAtBottomWhenScrolling } from './stick-to-window-when-scrolling.mjs';\n\ncreateAll(Button,\n  { preventDoubleClick: true }\n);\ncreateAll(Radios);\ncreateAll(ErrorSummary);\ncreateAll(SkipLink);\ncreateAll(Tabs);\ncreateAll(ServiceNavigation);\n\nstickAtTopWhenScrolling.init();\nstickAtBottomWhenScrolling.init();\n\nconst $livesearch = document.querySelector('[data-notify-module=\"live-search\"]');\nif ($livesearch) {\n  new LiveSearch($livesearch);\n}\n\nconst $collapsibleCheckboxes = document.querySelector('[data-notify-module=\"collapsible-checkboxes\"]');\nif ($collapsibleCheckboxes) {\n  new CollapsibleCheckboxes($collapsibleCheckboxes);\n}\n\nconst $colourPreview = document.querySelector('[data-notify-module=\"colour-preview\"]');\nif ($colourPreview) {\n  new ColourPreview($colourPreview);\n}\n\nconst $fileUpload = document.querySelector('[data-notify-module=\"file-upload\"]');\nif ($fileUpload) {\n  new FileUpload($fileUpload);\n}\n\nconst $autoFocus = document.querySelector('[data-notify-module=\"autofocus\"]');\nif ($autoFocus) {\n  new Autofocus($autoFocus);\n}\n\nconst $homePage = document.querySelector('[data-notify-module=\"homepage\"]');\nif ($homePage) {\n  new Homepage($homePage);\n}\n\n// this module doesn't currently use \"data-notify-module\" for initialisation\n// should we change that?\nconst $previewPane = document.querySelector('.govuk-radios__item input[name=\"branding_style\"]:checked');\nif ($previewPane) {\n  new PreviewPane($previewPane);\n}\n\nconst $CopyToClipboardArray = document.querySelectorAll('[data-notify-module=\"copy-to-clipboard\"]');\nif ($CopyToClipboardArray.length > 0) {\n  $CopyToClipboardArray.forEach((el) => new CopyToClipboard(el));\n}\n\nconst $ListEntryArray = document.querySelectorAll('[data-notify-module=\"list-entry\"]');\nif ($ListEntryArray.length > 0) {\n  $ListEntryArray.forEach((el) => new ListEntry(el));\n}\n\nconst $radiosWithImagesArray = document.querySelectorAll('[data-notify-module=\"radios-with-images\"]');\nif ($radiosWithImagesArray.length > 0) {\n  $radiosWithImagesArray.forEach((el) => new RadiosWithImages(el));\n}\n\n\nconst $enhancedTextboxArray = document.querySelectorAll('[data-notify-module=\"enhanced-textbox\"]');\nif ($enhancedTextboxArray.length > 0) {\n  $enhancedTextboxArray.forEach((el) => new EnhancedTextbox(el));\n}\n\nconst $checkReportStatusEl = document.querySelector('[data-notify-module=\"check-report-status\"]');\nif ($checkReportStatusEl) {\n  new CheckReportStatus($checkReportStatusEl).checkStatus();\n}\n\nconst $authTypeForm = document.querySelector('[data-notify-module=\"set-auth-type-form\"]');\nif ($authTypeForm) {\n  new LiveCheckboxControls($authTypeForm);\n}\n\nconst $addBrandingOptionsForm = document.querySelector('[data-notify-module=\"add-branding-options-form\"]');\nif ($addBrandingOptionsForm) {\n  new AddBrandingOptionsControls($addBrandingOptionsForm);\n}\n\nconst $radioSelectElementsArray = document.querySelectorAll('[data-notify-module=\"radio-select\"]');\n\nif ($radioSelectElementsArray.length > 0) {\n  $radioSelectElementsArray.forEach(el => {\n    new RadioSelect(el);\n  });\n}\n\nconst $fullScreenTableArray = document.querySelectorAll('[data-notify-module=\"fullscreen-table\"]');\nif ($fullScreenTableArray.length > 0) {\n  $fullScreenTableArray.forEach(tableComponent => new FullscreenTable(tableComponent));\n}\n\nconst $elementToRemove = document.querySelector('[data-notify-module=\"remove-in-presence-of\"]');\nif ($elementToRemove) {\n  new RemoveInPresenceOf($elementToRemove);\n}\n\nconst $authenticateSecurityKey = document.querySelector('[data-notify-module=\"authenticate-security-key\"]');\nif ($authenticateSecurityKey) {\n  new AuthenticateSecurityKey($authenticateSecurityKey);\n}\n\nconst $registerSecurityKey = document.querySelector('[data-notify-module=\"register-security-key\"]');\nif ($registerSecurityKey) {\n  new RegisterSecurityKey($registerSecurityKey);\n}\n\nconst $updateStatus = document.querySelector('[data-notify-module=\"update-status\"]');\nif ($updateStatus) {\n  new UpdateStatus($updateStatus).init();\n}\n\nconst $updateContentBlocks = document.querySelectorAll('[data-notify-module=\"update-content\"]');\nif ($updateContentBlocks.length > 0) {\n  $updateContentBlocks.forEach(updateBlockComponent => {\n    new UpdateContent(updateBlockComponent);\n  });\n};\n\nnew FocusBanner();\n\n// if there's at least 1 element on the page initialise the class\n// multiple elements are handled by it\nconst updateRelativeTimeSelector = '[data-notify-module=\"update-relative-time\"]';\nif (document.querySelector('[data-notify-module=\"update-relative-time\"]')) {\n  new UpdateRelativeTime(updateRelativeTimeSelector);\n}\n\nwindow.GOVUK = window.GOVUK || {};\nwindow.GOVUK.stickAtTopWhenScrolling = stickAtTopWhenScrolling;\nwindow.GOVUK.stickAtBottomWhenScrolling = stickAtBottomWhenScrolling;\n","import { isSupported } from 'govuk-frontend';\n\n// This new way of writing Javascript components is based on the GOV.UK Frontend skeleton Javascript coding standard\n// that uses ES 2015 Classes -\n// https://github.com/alphagov/govuk-frontend/blob/main/docs/contributing/coding-standards/js.md#skeleton\n//\n// It replaces the previously used way of setting methods on the component's `prototype`.\n// We use a class declaration way of defining classes -\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/class\n//\n// More on ES2015 Classes at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes\n\n// Focus banners that do not use the GOVUK Design System Error Summary component but still need to\n// match its behaviour when they appear\nclass FocusBanner {\n  constructor() {\n    if (!isSupported()) {\n      return this;\n    }\n\n    // focus any error banners when the page loads\n    const $bannerEl = document.querySelector('.banner-dangerous');\n    if ($bannerEl) {\n      this.focusBanner($bannerEl);\n    }\n\n    // focus success and error banners when they appear in any content updates\n    document.addEventListener('updateContent.onafterupdate', (event) => {\n      const el = event.detail.el[0];\n      const $bannerEl = el.classList.contains(\"banner-dangerous\") ? el : el.querySelector(\".banner-dangerous\");\n      if ($bannerEl) {\n        this.focusBanner($bannerEl);\n      }\n    });\n  }\n\n  focusBanner($bannerEl) {\n    $bannerEl.setAttribute('tabindex', '-1');\n    $bannerEl.focus();\n    $bannerEl.addEventListener('blur', () => {\n      $bannerEl.removeAttribute('tabindex');\n    }, { once: true });\n  }\n}\n\nexport default FocusBanner;\n"],"names":["getBreakpoint","name","property","value","window","getComputedStyle","document","documentElement","getPropertyValue","undefined","setFocus","$element","options","_options$onBeforeFocu","isFocusable","getAttribute","onBlur","_options$onBlur","call","removeAttribute","setAttribute","addEventListener","once","onBeforeFocus","focus","isSupported","$scope","body","classList","contains","isObject","option","Array","isArray","isScope","Element","Document","formatErrorMessage","Component","message","moduleName","GOVUKFrontendError","Error","constructor","args","super","this","SupportError","supportMessage","HTMLScriptElement","prototype","ConfigError","ElementError","messageOrOptions","component","identifier","element","expectedType","InitError","componentOrMessage","$root","_$root","childConstructor","elementType","checkSupport","checkInitialised","HTMLElement","hasAttribute","isInitialised","configOverride","Symbol","for","ConfigurableComponent","param","config","_config","defaults","datasetConfig","dataset","schema","out","entries","Object","properties","entry","namespace","field","toString","normaliseString","type","extractConfigByNamespace","normaliseDataset","mergeConfigs","trimmedValue","trim","output","outputType","includes","length","isFinite","Number","configObjects","formattedConfigObject","configObject","key","keys","override","newObject","current","keyParts","split","index","Button","debounceFormSubmitTimer","event","handleKeyDown","debounce","$target","target","preventDefault","click","preventDoubleClick","setTimeout","DEBOUNCE_TIMEOUT_IN_SECONDS","freeze","ErrorSummary","disableAutoFocus","handleClick","focusTarget","HTMLAnchorElement","inputId","hash","replace","$input","getElementById","$legendOrLabel","getAssociatedLegendOrLabel","scrollIntoView","preventScroll","_document$querySelect","$fieldset","closest","$legends","getElementsByTagName","$candidateLegend","HTMLInputElement","legendTop","getBoundingClientRect","top","inputRect","height","innerHeight","querySelector","Radios","$inputs","querySelectorAll","forEach","targetId","syncAllConditionalReveals","syncConditionalRevealWithInputState","inputIsChecked","checked","toggle","$clickedInput","$allInputs","$clickedInputForm","form","$clickedInputName","hasSameFormOwner","ServiceNavigation","$menuButton","$menu","menuIsOpen","mql","menuId","setupResponsiveChecks","handleMenuButtonClick","breakpoint","matchMedia","checkMode","addListener","matches","attributes","attributeName","setAttributes","attributesForHidingButton","attributeNames","removeAttributes","hidden","SkipLink","_this$$root$getAttrib","href","origin","location","pathname","linkedElementId","$linkedElement","add","remove","Tabs","$tabs","$tabList","$tabListItems","jsHiddenClass","changingHash","boundTabClick","boundTabKeydown","boundOnHashChange","onTabClick","bind","onTabKeydown","onHashChange","_this$mql","setup","teardown","_this$getTab","$item","$tab","hideTab","$activeTab","getTab","showTab","removeEventListener","unsetAttributes","$tabWithHash","$previousTab","getCurrentTab","unhighlightTab","hidePanel","highlightTab","showPanel","panelId","$panel","getPanel","id","$currentTab","$nextTab","currentTarget","createHistoryEntry","activatePreviousTab","activateNextTab","parentElement","$nextTabListItem","nextElementSibling","$previousTabListItem","previousElementSibling","createAll","scopeOrOptions","$elements","onError","scope","normaliseOptions","_options$scope","error","console","log","from","map","filter","Boolean","CollapsibleCheckboxes","$module","toggleButtonClass","toggleButtonChevronClass","toggleButtonChevronActiveClass","$selectionSummaryContainer","fieldLabel","$checkboxesContainer","$checkboxesArray","legendText","textContent","total","selectionSummaryContent","all","selection","some","none","folder","addHeadingHideLegend","initSelectionSummary","constructToggleButton","handleToggleButtonClick","handleCheckboxClick","$toggleButton","createElement","$visuallyHiddenButtonContent","toLowerCase","$toggleButtonChevron","append","prepend","before","$button","expanded","checkbox","updateSelectionSummary","getSelectionCount","$hint","$summaryText","count","$selectionSummaryTextContainer","template","headingLevel","$heading","$legend","ColourPreview","isHexColourValue","match","addHashIfNeeded","charAt","colourOrWhite","$appendToElement","parentNode","$colourPreviewElement","applyBackgroundColour","style","background","FileUpload","$form","$field","$fieldErrors","addFakeButton","reset","submit","addCancelButton","$cancelButton","replaceWith","buttonText","fieldId","oldFieldId","buttonHTMLStr","insertAdjacentHTML","Autofocus","$component","forceFocus","arrayOfTargetElements","scrollY","tagName","join","Homepage","iterations","timeout","clearTimeout","PreviewPane","branding_style","$paneWrapper","previewType","letterBrandingPreviewRootPath","applyPreviewPane","RegExp","e","setPreviewPane","generateImagePreview","generateIframePreview","imagePreviewPane","imagePreviewPaneImage","buildQueryString","appendChild","iframePreviewPane","arguments","val","_idx","encodeURI","CopyToClipboard","navigator","clipboard","states","valueVisible","valueLabel","thing","notice","classes","content","onload","button","valueCopied","stateOptions","updateHTML","buttonWasClicked","copyValueToClipboard","getRangeFromElement","GOVUK","stickAtBottomWhenScrolling","recalculate","stateKey","state","$clipboardNoticeEl","innerHTML","updateButton","generateButton","$newButton","text","writeText","err","copyableElement","range","createRange","childNodes","slice","prefixIndex","el","idx","nodeType","selectNodeContents","setStart","_ListEntry","idPattern","elementSelector","sharedInputClasses","$wrapper","minEntries","listItemName","getCustomClasses","getSharedAttributes","getValuesAndErrors","maxEntries","trimEntries","render","bindEvents","entryTemplate","dataObj","number","customClasses","sharedAttributes","addButtonTemplate","entriesLeft","attrIdx","elmAttributes","getAttributesHTML","attributeTemplate","protectedAttributes","attrsByElm","elmAttrs","attrStr","elmIdx","existingAttributes","push","elm","$elm","customClassesForElm","token","errors","$error","entryIdx","newEntries","reverse","getId","num","pattern","removeEntry","$","addEntry","shiftFocus","opts","numberTargeted","action","entryNumberFocused","removeEntryFromEntriesAndErrors","entryNumber","splice","$removeButton","currentLastEntryNumber","parseInt","find","_lists","ListEntry","RadiosWithImages","handleImageClick","image_input","cursor","disabled","LiveSearch","$searchBox","$searchLabel","$liveRegion","$targets","targets","query","normalize","results","$node","contents","isMatch","content_item","resultsSummary","string","EnhancedTextbox","tagPattern","highlightPlaceholders","autofocus","autofocusTextbox","$textbox","$wrappingElement","$backgroundHighlightElement","after","update","resize","$visibleTextbox","cloneNode","position","visibility","display","initialHeight","offsetHeight","borderWidth","dispatchEvent","Event","bubbles","width","Math","max","contentEscaped","$el","contentReplaced","separator","locationReload","reload","CheckReportStatus","fetchInterval","redirectDelay","reportStatusEndpoint","reportReadyStatus","reportFailedStatus","currentCheck","runCheck","checkStatus","response","fetch","ok","data","json","processStatus","status","updatePageText","pathName","statusUpdateText","LiveCheckboxControls","$liveRegionCounter","singular","thingSingular","plural","thingPlural","nothingSelectedHint","itemsSelectedHint","cancellable","onNothingSelected","onSomethingSelected","_lastState","prevState","showInitialState","currentState","evt","onCheckboxChanged","$clear","makeActionButton","onclick","nonvisualText","selectionStatus","default","selected","numSelected","$btn","callback","keyCode","hasOwnProperty","stateHasChanged","changed","countSelectedCheckboxes","insertAdjacentElement","AddBrandingOptionsControls","offset","box","docElem","clientTop","left","scrollX","clientLeft","Caret","defineProperty","exports","getAbsolutePosition","caretRelPost","getRelativePosition","absolute","debug","useSelectionEnd","checkWidthOverflow","selectionStart","selectionEnd","isFirefox","userAgent","indexOf","removeChild","div","computed","currentStyle","isInput","nodeName","whiteSpace","wordWrap","prop","boxSizing","outerHeight_1","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","targetHeight","lineHeight","scrollHeight","overflowY","overflow","substring","span","relativePosition","offsetTop","offsetLeft","backgroundColor","clientWidth","setElementPositionBasedOnCaret","caretElement","margin","detectBoundary","returnOnly","pos","innerWidth","getCaretCoordinates","_mode","ScrollArea","edge","selector","$fixedEl","$scrollArea","els","node","setEvents","addEl","hasEl","updateEls","usedEls","keyUpHandler","focusHandler","capture","passive","removeEvents","getFocusedDetails","forElement","$focusedElement","focused","bottom","forCaret","$textarea","textarea","caretCoordinates","scrollToRevealElement","activeElement","endOfFurthestEl","focusOverlap","isInSticky","overlap","getOverlap","adjustForOverlap","destroy","scrollAreas","getAreaForEl","loopIdx","getAreaByEl","area","scrollArea","syncEls","elsInDOM","unusedAreas","areaIdx","used","getUsed","filterBy","filterFunc","stuckEls","isStuck","edgeOfEl","reduce","accumulator","scrollTop","scrollTo","pageXOffset","oppositeEdge","mark","sticky","edgeClass","dialog","getElementAtOppositeEnd","unmark","StickyElement","initialFixedClass","fixedClass","appliedClass","stopped","hasLoaded","canBeStuck","$shim","marginTop","marginBottom","verticalMargins","getShimCSS","inlineStyles","horizontalSpace","bottomtop","stickyClass","removeStickyClasses","stick","release","addShim","insertPosition","removeShim","updateShim","stop","unstop","isStopped","isInPage","Dialog","static","hasResized","getPaddingBetweenEls","spaceBetweenStickys","getTotalHeight","currentValue","elsThatCanBeStuck","getOffsetFromEdge","elIdx","getOffsetFromEnd","fitToHeight","self","StickAtEdge","getWindowDimensions","dialogFitsHeight","currentEl","getElementAtStickyEdge","getInPageEdgePosition","inPageEdgePosition","getHeight","adjustForResize","windowHeight","releaseEl","hasScrolled","scrollTimeout","windowHasResized","resizeTimeout","initialPositionsSet","CSS_SELECTOR","STOP_PADDING","setMode","mode","setElementPositions","windowDimensions","windowTop","getWindowPositions","windowPositions","setElementPosition","viewportIsWideEnough","windowNotPastScrolledFrom","getScrolledFrom","windowNotPastScrollingTo","getScrollingTo","setElementDimensions","setElWidth","setElHeight","syncWithDOM","get","scrollAreaNode","$img","image","Image","src","attr","allElementsLoaded","totalEls","getElForNode","setPositions","cb","elObj","exists","_el","$els","numOfEls","onLoaded","endOfScrollArea","getEndOfScrollArea","init","_scrollEvent","onScroll","_resizeEvent","onResize","setInterval","checkScroll","checkResize","clearEvents","clearInterval","windowWidth","pageYOffset","stickAtTop","footer","getStoppingPosition","scrolledFrom","scrollingTo","stickAtBottom","header","RadioSelect","confirmMadeSticky","keyCache","ENTER_CODE","timesByDay","days","day","dayValue","getKeyFromDayLabel","label","componentName","componentLabelText","labelText","relatedRadio","timeData","selectedTime","getTimeFromRadio","selectedDay","initialHTML","buildInitialHTML","times","formSubmitButton","params","fragment","createDocumentFragment","$sendNowInputLabel","className","$radioSelectContainer","$sendNowInput","readOnly","$hiddenInput","$expanderContainer","$expanderBtn","$expandeeContainer","$daysContainer","$daysFieldset","$daysLegend","$dayBtn","$dayTimesContainer","$backLink","$dayTimesFieldset","$dayTimesLegend","$timesHint","time","$radioItemContainer","$radioInput","$radioTimeLabel","$confirmContainer","$confirmTimeBtn","handleTimeSelection","onEnterKeyUpAndDown","toggleExpandingSection","handleDayClick","handleReturnToDays","selectDayAndTime","dayButton","showTimesForDay","showTimesView","focusSelectedTimeOrFirst","showDaysView","radio","viewPanes","timesGroup","selectedRadio","updateSelection","expander","expandee","toggleFormSubmit","cancelFiredEvent","isExpanded","targetIsSelectedDayAndTimeField","which","FullscreenTable","$table","nativeHeight","topOffset","maintainHeight","maintainWidth","toggleShadows","insertShims","$scrollableTable","toggleFocusStyle","caption","captionId","$scrollableWrapper","insertBefore","$fixedWrapper","$rightShadow","nextSibling","$fixedTable","min","$scrollableIndexColumnHeader","$fixedIndexColumnHeader","isScrolled","scrollLeft","maxScroll","offsetWidth","isScrollable","RemoveInPresenceOf","$elementToRemove","observer","MutationObserver","targetElementId","disconnect","observe","childList","subtree","ErrorBanner","$bannerElement","hideBanner","showBanner","AuthenticateSecurityKey","TextEncoder","PublicKeyCredential","parseRequestOptionsFromJSON","authenticationEndpoint","authenticateKey","handleFetch","credential","getCredential","postCredential","handleCredentialResponse","handleError","statusText","optionsJSON","publicKey","credentials","currentURL","URL","authenticateURL","nextUrl","searchParams","set","method","headers","csrfToken","JSON","stringify","toJSON","redirect_url","assign","RegisterSecurityKey","parseCreationOptionsFromJSON","registerAuthenticationEndpoint","registerKey","createCredential","create","UpdateStatus","throttleOn","callsHaveBeenThrottled","getRenderer","html","throttle","func","limit","apply","ariaDescribedby","url","updatesUrl","formData","URLSearchParams","FormData","doc","HAS_TEMPLATE_SUPPORT","HAS_RANGE_SUPPORT","toElement","str","createFragmentFromTemplate","selectNode","createContextualFragment","createFragmentFromRange","createFragmentFromWrap","compareNodeNames","fromEl","toEl","fromCodeStart","toCodeStart","fromNodeName","toNodeName","charCodeAt","toUpperCase","syncBooleanAttrProp","specialElHandlers","OPTION","parentName","selectedIndex","INPUT","TEXTAREA","newValue","firstChild","oldValue","nodeValue","placeholder","SELECT","optgroup","i","curChild","noop","defaultGetNodeKey","morphdom","morphAttrs","fromNode","toNode","toNodeHtml","getNodeKey","onBeforeNodeAdded","onNodeAdded","onBeforeElUpdated","onElUpdated","onBeforeNodeDiscarded","onNodeDiscarded","onBeforeElChildrenUpdated","childrenOnly","fromNodesLookup","keyedRemovalList","addKeyedRemoval","walkDiscardedChildNodes","skipKeyedNodes","removeNode","handleNodeAdded","unmatchedFromEl","replaceChild","morphEl","toElKey","curToNodeKey","curFromNodeKey","fromNextSibling","toNextSibling","matchingFromEl","curToNodeChild","curFromNodeChild","outer","isSameNode","curFromNodeType","isCompatible","onBeforeNodeAddedResult","actualize","ownerDocument","cleanupFromEl","specialElHandler","morphChildren","indexTree","namespaceURI","morphedNode","morphedNodeType","toNodeType","nextChild","moveChildren","createElementNS","len","elToRemove","morphdomFactory","attrName","attrNamespaceURI","attrValue","toNodeAttrs","localName","getAttributeNS","prefix","setAttributeNS","fromNodeAttrs","d","hasAttributeNS","removeAttributeNS","resourceState","getState","resource","renderers","Set","interval","fetching","async","pollResource","visibilityState","startTime","Date","now","fetchOptions","formEl","responseData","renderer","UpdateContent","calculateBackoff","$contents","firstElementChild","size","responseTime","floor","sqrt","contentHasUpdated","newContents","DOMParser","parseFromString","isEqualNode","CustomEvent","detail","UpdateRelativeTime","Intl","RelativeTimeFormat","numeric","DateTimeFormat","dateStyle","timeStyle","updateExistingElements","updateTextString","currentTime","elementDatetimeStamp","elementTime","fullDateFormatter","format","relativeTimeString","calculateRelativeTimeString","diffInSeconds","round","absSeconds","abs","relativeFormatter","diffInMinutes","diffInHours","diffInDays","monthDiff","getFullYear","getMonth","yearDiff","stickAtTopWhenScrolling","$livesearch","$collapsibleCheckboxes","$colourPreview","$fileUpload","$autoFocus","$homePage","$previewPane","$CopyToClipboardArray","$ListEntryArray","$radiosWithImagesArray","$enhancedTextboxArray","$checkReportStatusEl","$authTypeForm","$addBrandingOptionsForm","$radioSelectElementsArray","$fullScreenTableArray","tableComponent","$authenticateSecurityKey","$registerSecurityKey","$updateStatus","$updateContentBlocks","updateBlockComponent","$bannerEl","focusBanner"],"mappings":"AAAA,SAASA,EAAcC,GACrB,MAAMC,EAAW,sBAAsBD,IAEvC,MAAO,CACLC,WACAC,MAHYC,OAAOC,iBAAiBC,SAASC,iBAAiBC,iBAAiBN,SAG/DO,EAEpB,CACA,SAASC,EAASC,EAAUC,EAAU,IACpC,IAAIC,EACJ,MAAMC,EAAcH,EAASI,aAAa,YAS1C,SAASC,IACP,IAAIC,EACkC,OAArCA,EAAkBL,EAAQI,SAAmBC,EAAgBC,KAAKP,GAC9DG,GACHH,EAASQ,gBAAgB,WAE7B,CAdKL,GACHH,EAASS,aAAa,WAAY,MAcpCT,EAASU,iBAAiB,QAZ1B,WACEV,EAASU,iBAAiB,OAAQL,EAAQ,CACxCM,MAAM,GAEV,EAQ4C,CAC1CA,MAAM,IAE2C,OAAlDT,EAAwBD,EAAQW,gBAA0BV,EAAsBK,KAAKP,GACtFA,EAASa,OACX,CAcA,SAASC,EAAYC,EAASpB,SAASqB,MACrC,QAAKD,GAGEA,EAAOE,UAAUC,SAAS,2BACnC,CAIA,SAASC,EAASC,GAChB,QAASA,GAA4B,iBAAXA,IAJ5B,SAAiBA,GACf,OAAOC,MAAMC,QAAQF,EACvB,CAEoDE,CAAQF,EAC5D,CACA,SAASG,EAAQR,GACf,QAASA,IAAWA,aAAkBS,SAAWT,aAAkBU,SACrE,CACA,SAAS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