Socket
Socket
Sign inDemoInstall

govuk-frontend

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

govuk-frontend - npm Package Compare versions

Comparing version 5.2.0 to 5.3.0

dist/govuk/common/normalise-string.mjs

172

dist/govuk/components/accordion/accordion.bundle.js

@@ -7,23 +7,42 @@ (function (global, factory) {

function mergeConfigs(...configObjects) {
function flattenObject(configObject) {
const flattenedObject = {};
function flattenLoop(obj, prefix) {
for (const [key, value] of Object.entries(obj)) {
const prefixedKey = prefix ? `${prefix}.${key}` : key;
if (value && typeof value === 'object') {
flattenLoop(value, prefixedKey);
} else {
flattenedObject[prefixedKey] = value;
}
}
function normaliseString(value, property) {
const trimmedValue = value ? value.trim() : '';
let output;
let outputType = property == null ? void 0 : property.type;
if (!outputType) {
if (['true', 'false'].includes(trimmedValue)) {
outputType = 'boolean';
}
flattenLoop(configObject);
return flattenedObject;
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
outputType = 'number';
}
}
switch (outputType) {
case 'boolean':
output = trimmedValue === 'true';
break;
case 'number':
output = Number(trimmedValue);
break;
default:
output = value;
}
return output;
}
/**
* @typedef {import('./index.mjs').SchemaProperty} SchemaProperty
*/
function mergeConfigs(...configObjects) {
const formattedConfigObject = {};
for (const configObject of configObjects) {
const obj = flattenObject(configObject);
for (const [key, value] of Object.entries(obj)) {
formattedConfigObject[key] = value;
for (const key of Object.keys(configObject)) {
const option = formattedConfigObject[key];
const override = configObject[key];
if (isObject(option) && isObject(override)) {
formattedConfigObject[key] = mergeConfigs(option, override);
} else {
formattedConfigObject[key] = override;
}
}

@@ -33,15 +52,27 @@ }

}
function extractConfigByNamespace(configObject, namespace) {
const newObject = {};
for (const [key, value] of Object.entries(configObject)) {
function extractConfigByNamespace(Component, dataset, namespace) {
const property = Component.schema.properties[namespace];
if ((property == null ? void 0 : property.type) !== 'object') {
return;
}
const newObject = {
[namespace]: ({})
};
for (const [key, value] of Object.entries(dataset)) {
let current = newObject;
const keyParts = key.split('.');
if (keyParts[0] === namespace) {
if (keyParts.length > 1) {
keyParts.shift();
for (const [index, name] of keyParts.entries()) {
if (typeof current === 'object') {
if (index < keyParts.length - 1) {
if (!isObject(current[name])) {
current[name] = {};
}
current = current[name];
} else if (key !== namespace) {
current[name] = normaliseString(value);
}
}
const newKey = keyParts.join('.');
newObject[newKey] = value;
}
}
return newObject;
return newObject[namespace];
}

@@ -54,2 +85,8 @@ function isSupported($scope = document.body) {

}
function isArray(option) {
return Array.isArray(option);
}
function isObject(option) {
return !!option && typeof option === 'object' && !isArray(option);
}

@@ -60,2 +97,3 @@ /**

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -65,2 +103,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -73,22 +118,11 @@ *

function normaliseString(value) {
if (typeof value !== 'string') {
return value;
}
const trimmedValue = value.trim();
if (trimmedValue === 'true') {
return true;
}
if (trimmedValue === 'false') {
return false;
}
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
return Number(trimmedValue);
}
return value;
}
function normaliseDataset(dataset) {
function normaliseDataset(Component, dataset) {
const out = {};
for (const [key, value] of Object.entries(dataset)) {
out[key] = normaliseString(value);
for (const [field, property] of Object.entries(Component.schema.properties)) {
if (field in dataset) {
out[field] = normaliseString(dataset[field], property);
}
if ((property == null ? void 0 : property.type) === 'object') {
out[field] = extractConfigByNamespace(Component, dataset, field);
}
}

@@ -157,14 +191,17 @@ return out;

}
if (typeof (options == null ? void 0 : options.count) === 'number') {
lookupKey = `${lookupKey}.${this.getPluralSuffix(lookupKey, options.count)}`;
let translation = this.translations[lookupKey];
if (typeof (options == null ? void 0 : options.count) === 'number' && typeof translation === 'object') {
const translationPluralForm = translation[this.getPluralSuffix(lookupKey, options.count)];
if (translationPluralForm) {
translation = translationPluralForm;
}
}
const translationString = this.translations[lookupKey];
if (typeof translationString === 'string') {
if (translationString.match(/%{(.\S+)}/)) {
if (typeof translation === 'string') {
if (translation.match(/%{(.\S+)}/)) {
if (!options) {
throw new Error('i18n: cannot replace placeholders in string if no option data provided');
}
return this.replacePlaceholders(translationString, options);
return this.replacePlaceholders(translation, options);
}
return translationString;
return translation;
}

@@ -197,8 +234,11 @@ return lookupKey;

}
const translation = this.translations[lookupKey];
const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : this.selectPluralFormUsingFallbackRules(count);
if (`${lookupKey}.${preferredForm}` in this.translations) {
return preferredForm;
} else if (`${lookupKey}.other` in this.translations) {
console.warn(`i18n: Missing plural form ".${preferredForm}" for "${this.locale}" locale. Falling back to ".other".`);
return 'other';
if (typeof translation === 'object') {
if (preferredForm in translation) {
return preferredForm;
} else if ('other' in translation) {
console.warn(`i18n: Missing plural form ".${preferredForm}" for "${this.locale}" locale. Falling back to ".other".`);
return 'other';
}
}

@@ -390,4 +430,4 @@ throw new Error(`i18n: Plural form ".other" is required for "${this.locale}" locale`);

this.$module = $module;
this.config = mergeConfigs(Accordion.defaults, config, normaliseDataset($module.dataset));
this.i18n = new I18n(extractConfigByNamespace(this.config, 'i18n'));
this.config = mergeConfigs(Accordion.defaults, config, normaliseDataset(Accordion, $module.dataset));
this.i18n = new I18n(this.config.i18n);
const $sections = this.$module.querySelectorAll(`.${this.sectionClass}`);

@@ -628,2 +668,12 @@ if (!$sections.length) {

});
Accordion.schema = Object.freeze({
properties: {
i18n: {
type: 'object'
},
rememberExpanded: {
type: 'boolean'
}
}
});
const helper = {

@@ -682,2 +732,6 @@ /**

/**
* @typedef {import('../../common/index.mjs').Schema} Schema
*/
exports.Accordion = Accordion;

@@ -684,0 +738,0 @@

@@ -7,23 +7,42 @@ (function (global, factory) {

function mergeConfigs(...configObjects) {
function flattenObject(configObject) {
const flattenedObject = {};
function flattenLoop(obj, prefix) {
for (const [key, value] of Object.entries(obj)) {
const prefixedKey = prefix ? `${prefix}.${key}` : key;
if (value && typeof value === 'object') {
flattenLoop(value, prefixedKey);
} else {
flattenedObject[prefixedKey] = value;
}
}
function normaliseString(value, property) {
const trimmedValue = value ? value.trim() : '';
let output;
let outputType = property == null ? void 0 : property.type;
if (!outputType) {
if (['true', 'false'].includes(trimmedValue)) {
outputType = 'boolean';
}
flattenLoop(configObject);
return flattenedObject;
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
outputType = 'number';
}
}
switch (outputType) {
case 'boolean':
output = trimmedValue === 'true';
break;
case 'number':
output = Number(trimmedValue);
break;
default:
output = value;
}
return output;
}
/**
* @typedef {import('./index.mjs').SchemaProperty} SchemaProperty
*/
function mergeConfigs(...configObjects) {
const formattedConfigObject = {};
for (const configObject of configObjects) {
const obj = flattenObject(configObject);
for (const [key, value] of Object.entries(obj)) {
formattedConfigObject[key] = value;
for (const key of Object.keys(configObject)) {
const option = formattedConfigObject[key];
const override = configObject[key];
if (isObject(option) && isObject(override)) {
formattedConfigObject[key] = mergeConfigs(option, override);
} else {
formattedConfigObject[key] = override;
}
}

@@ -33,2 +52,28 @@ }

}
function extractConfigByNamespace(Component, dataset, namespace) {
const property = Component.schema.properties[namespace];
if ((property == null ? void 0 : property.type) !== 'object') {
return;
}
const newObject = {
[namespace]: ({})
};
for (const [key, value] of Object.entries(dataset)) {
let current = newObject;
const keyParts = key.split('.');
for (const [index, name] of keyParts.entries()) {
if (typeof current === 'object') {
if (index < keyParts.length - 1) {
if (!isObject(current[name])) {
current[name] = {};
}
current = current[name];
} else if (key !== namespace) {
current[name] = normaliseString(value);
}
}
}
}
return newObject[namespace];
}
function isSupported($scope = document.body) {

@@ -40,2 +85,8 @@ if (!$scope) {

}
function isArray(option) {
return Array.isArray(option);
}
function isObject(option) {
return !!option && typeof option === 'object' && !isArray(option);
}

@@ -46,2 +97,3 @@ /**

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -51,2 +103,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -59,22 +118,11 @@ *

function normaliseString(value) {
if (typeof value !== 'string') {
return value;
}
const trimmedValue = value.trim();
if (trimmedValue === 'true') {
return true;
}
if (trimmedValue === 'false') {
return false;
}
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
return Number(trimmedValue);
}
return value;
}
function normaliseDataset(dataset) {
function normaliseDataset(Component, dataset) {
const out = {};
for (const [key, value] of Object.entries(dataset)) {
out[key] = normaliseString(value);
for (const [field, property] of Object.entries(Component.schema.properties)) {
if (field in dataset) {
out[field] = normaliseString(dataset[field], property);
}
if ((property == null ? void 0 : property.type) === 'object') {
out[field] = extractConfigByNamespace(Component, dataset, field);
}
}

@@ -131,3 +179,2 @@ return out;

const KEY_SPACE = 32;
const DEBOUNCE_TIMEOUT_IN_SECONDS = 1;

@@ -158,3 +205,3 @@

this.$module = $module;
this.config = mergeConfigs(Button.defaults, config, normaliseDataset($module.dataset));
this.config = mergeConfigs(Button.defaults, config, normaliseDataset(Button, $module.dataset));
this.$module.addEventListener('keydown', event => this.handleKeyDown(event));

@@ -165,3 +212,3 @@ this.$module.addEventListener('click', event => this.debounce(event));

const $target = event.target;
if (event.keyCode !== KEY_SPACE) {
if (event.key !== ' ') {
return;

@@ -195,2 +242,6 @@ }

*/
/**
* @typedef {import('../../common/index.mjs').Schema} Schema
*/
Button.moduleName = 'govuk-button';

@@ -200,2 +251,9 @@ Button.defaults = Object.freeze({

});
Button.schema = Object.freeze({
properties: {
preventDoubleClick: {
type: 'boolean'
}
}
});

@@ -202,0 +260,0 @@ exports.Button = Button;

@@ -12,23 +12,42 @@ (function (global, factory) {

function mergeConfigs(...configObjects) {
function flattenObject(configObject) {
const flattenedObject = {};
function flattenLoop(obj, prefix) {
for (const [key, value] of Object.entries(obj)) {
const prefixedKey = prefix ? `${prefix}.${key}` : key;
if (value && typeof value === 'object') {
flattenLoop(value, prefixedKey);
} else {
flattenedObject[prefixedKey] = value;
}
}
function normaliseString(value, property) {
const trimmedValue = value ? value.trim() : '';
let output;
let outputType = property == null ? void 0 : property.type;
if (!outputType) {
if (['true', 'false'].includes(trimmedValue)) {
outputType = 'boolean';
}
flattenLoop(configObject);
return flattenedObject;
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
outputType = 'number';
}
}
switch (outputType) {
case 'boolean':
output = trimmedValue === 'true';
break;
case 'number':
output = Number(trimmedValue);
break;
default:
output = value;
}
return output;
}
/**
* @typedef {import('./index.mjs').SchemaProperty} SchemaProperty
*/
function mergeConfigs(...configObjects) {
const formattedConfigObject = {};
for (const configObject of configObjects) {
const obj = flattenObject(configObject);
for (const [key, value] of Object.entries(obj)) {
formattedConfigObject[key] = value;
for (const key of Object.keys(configObject)) {
const option = formattedConfigObject[key];
const override = configObject[key];
if (isObject(option) && isObject(override)) {
formattedConfigObject[key] = mergeConfigs(option, override);
} else {
formattedConfigObject[key] = override;
}
}

@@ -38,15 +57,27 @@ }

}
function extractConfigByNamespace(configObject, namespace) {
const newObject = {};
for (const [key, value] of Object.entries(configObject)) {
function extractConfigByNamespace(Component, dataset, namespace) {
const property = Component.schema.properties[namespace];
if ((property == null ? void 0 : property.type) !== 'object') {
return;
}
const newObject = {
[namespace]: ({})
};
for (const [key, value] of Object.entries(dataset)) {
let current = newObject;
const keyParts = key.split('.');
if (keyParts[0] === namespace) {
if (keyParts.length > 1) {
keyParts.shift();
for (const [index, name] of keyParts.entries()) {
if (typeof current === 'object') {
if (index < keyParts.length - 1) {
if (!isObject(current[name])) {
current[name] = {};
}
current = current[name];
} else if (key !== namespace) {
current[name] = normaliseString(value);
}
}
const newKey = keyParts.join('.');
newObject[newKey] = value;
}
}
return newObject;
return newObject[namespace];
}

@@ -63,16 +94,24 @@ function isSupported($scope = document.body) {

const errors = [];
for (const {
required,
errorMessage
} of conditions) {
if (!required.every(key => !!config[key])) {
errors.push(errorMessage);
if (Array.isArray(conditions)) {
for (const {
required,
errorMessage
} of conditions) {
if (!required.every(key => !!config[key])) {
errors.push(errorMessage);
}
}
if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {
validationErrors.push(...errors);
}
}
if (name === 'anyOf' && !(conditions.length - errors.length >= 1)) {
validationErrors.push(...errors);
}
}
return validationErrors;
}
function isArray(option) {
return Array.isArray(option);
}
function isObject(option) {
return !!option && typeof option === 'object' && !isArray(option);
}

@@ -83,2 +122,3 @@ /**

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -88,2 +128,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -96,22 +143,11 @@ *

function normaliseString(value) {
if (typeof value !== 'string') {
return value;
}
const trimmedValue = value.trim();
if (trimmedValue === 'true') {
return true;
}
if (trimmedValue === 'false') {
return false;
}
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
return Number(trimmedValue);
}
return value;
}
function normaliseDataset(dataset) {
function normaliseDataset(Component, dataset) {
const out = {};
for (const [key, value] of Object.entries(dataset)) {
out[key] = normaliseString(value);
for (const [field, property] of Object.entries(Component.schema.properties)) {
if (field in dataset) {
out[field] = normaliseString(dataset[field], property);
}
if ((property == null ? void 0 : property.type) === 'object') {
out[field] = extractConfigByNamespace(Component, dataset, field);
}
}

@@ -186,14 +222,17 @@ return out;

}
if (typeof (options == null ? void 0 : options.count) === 'number') {
lookupKey = `${lookupKey}.${this.getPluralSuffix(lookupKey, options.count)}`;
let translation = this.translations[lookupKey];
if (typeof (options == null ? void 0 : options.count) === 'number' && typeof translation === 'object') {
const translationPluralForm = translation[this.getPluralSuffix(lookupKey, options.count)];
if (translationPluralForm) {
translation = translationPluralForm;
}
}
const translationString = this.translations[lookupKey];
if (typeof translationString === 'string') {
if (translationString.match(/%{(.\S+)}/)) {
if (typeof translation === 'string') {
if (translation.match(/%{(.\S+)}/)) {
if (!options) {
throw new Error('i18n: cannot replace placeholders in string if no option data provided');
}
return this.replacePlaceholders(translationString, options);
return this.replacePlaceholders(translation, options);
}
return translationString;
return translation;
}

@@ -226,8 +265,11 @@ return lookupKey;

}
const translation = this.translations[lookupKey];
const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : this.selectPluralFormUsingFallbackRules(count);
if (`${lookupKey}.${preferredForm}` in this.translations) {
return preferredForm;
} else if (`${lookupKey}.other` in this.translations) {
console.warn(`i18n: Missing plural form ".${preferredForm}" for "${this.locale}" locale. Falling back to ".other".`);
return 'other';
if (typeof translation === 'object') {
if (preferredForm in translation) {
return preferredForm;
} else if ('other' in translation) {
console.warn(`i18n: Missing plural form ".${preferredForm}" for "${this.locale}" locale. Falling back to ".other".`);
return 'other';
}
}

@@ -409,3 +451,3 @@ throw new Error(`i18n: Plural form ".other" is required for "${this.locale}" locale`);

}
const datasetConfig = normaliseDataset($module.dataset);
const datasetConfig = normaliseDataset(CharacterCount, $module.dataset);
let configOverrides = {};

@@ -423,3 +465,3 @@ if ('maxwords' in datasetConfig || 'maxlength' in datasetConfig) {

}
this.i18n = new I18n(extractConfigByNamespace(this.config, 'i18n'), {
this.i18n = new I18n(this.config.i18n, {
locale: closestAttributeValue($module, 'lang')

@@ -637,2 +679,16 @@ });

CharacterCount.schema = Object.freeze({
properties: {
i18n: {
type: 'object'
},
maxwords: {
type: 'number'
},
maxlength: {
type: 'number'
},
threshold: {
type: 'number'
}
},
anyOf: [{

@@ -639,0 +695,0 @@ required: ['maxwords'],

@@ -17,3 +17,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"more-detail\">\n Can you provide more detail?\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"more-detail-info\"></textarea>\n</div>\n\n <div id=\"more-detail-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"more-detail\">\n Can you provide more detail?\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"more-detail-info\"></textarea>\n <div id=\"more-detail-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -34,3 +34,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"custom-textarea-description\">\n Can you provide more detail?\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"custom-textarea-description\" name=\"custom-textarea-description\" rows=\"5\" aria-describedby=\"custom-textarea-description-info\"></textarea>\n</div>\n\n <div id=\"custom-textarea-description-info\" class=\"govuk-hint govuk-character-count__message\">\n Gallwch ddefnyddio hyd at 10 nod\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"custom-textarea-description\">\n Can you provide more detail?\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"custom-textarea-description\" name=\"custom-textarea-description\" rows=\"5\" aria-describedby=\"custom-textarea-description-info\"></textarea>\n <div id=\"custom-textarea-description-info\" class=\"govuk-hint govuk-character-count__message\">\n Gallwch ddefnyddio hyd at 10 nod\n </div>\n</div>"
},

@@ -53,3 +53,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-hint\">\n Can you provide more detail?\n </label>\n <div id=\"with-hint-hint\" class=\"govuk-hint\">\n Don&#39;t include personal or financial information, eg your National Insurance number or credit card details.\n </div>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-hint\" name=\"with-hint\" rows=\"5\" aria-describedby=\"with-hint-info with-hint-hint\"></textarea>\n</div>\n\n <div id=\"with-hint-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"with-hint\">\n Can you provide more detail?\n </label>\n <div id=\"with-hint-hint\" class=\"govuk-hint\">\n Don&#39;t include personal or financial information, eg your National Insurance number or credit card details.\n </div>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-hint\" name=\"with-hint\" rows=\"5\" aria-describedby=\"with-hint-info with-hint-hint\"></textarea>\n <div id=\"with-hint-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -70,3 +70,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"100\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-default-value\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-default-value\" name=\"default-value\" rows=\"5\" aria-describedby=\"with-default-value-info\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n</div>\n\n <div id=\"with-default-value-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 100 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"100\">\n <label class=\"govuk-label\" for=\"with-default-value\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-default-value\" name=\"default-value\" rows=\"5\" aria-describedby=\"with-default-value-info\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n <div id=\"with-default-value-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 100 characters\n </div>\n</div>"
},

@@ -90,3 +90,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"exceeding-characters\">\n Full address\n </label>\n <p id=\"exceeding-characters-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please do not exceed the maximum allowed limit\n </p>\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count\" id=\"exceeding-characters\" name=\"exceeding\" rows=\"5\" aria-describedby=\"exceeding-characters-info exceeding-characters-error\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n</div>\n\n <div id=\"exceeding-characters-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-form-group--error govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"exceeding-characters\">\n Full address\n </label>\n <p id=\"exceeding-characters-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Please do not exceed the maximum allowed limit\n </p>\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count\" id=\"exceeding-characters\" name=\"exceeding\" rows=\"5\" aria-describedby=\"exceeding-characters-info exceeding-characters-error\">221B Baker Street\nLondon\nNW1 6XE\n</textarea>\n <div id=\"exceeding-characters-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -107,3 +107,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"custom-rows\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"custom-rows\" name=\"custom\" rows=\"8\" aria-describedby=\"custom-rows-info\"></textarea>\n</div>\n\n <div id=\"custom-rows-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"custom-rows\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"custom-rows\" name=\"custom\" rows=\"8\" aria-describedby=\"custom-rows-info\"></textarea>\n <div id=\"custom-rows-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -125,3 +125,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--l\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n </h1>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\" aria-describedby=\"textarea-with-page-heading-info\"></textarea>\n</div>\n\n <div id=\"textarea-with-page-heading-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <h1 class=\"govuk-label-wrapper\">\n <label class=\"govuk-label govuk-label--l\" for=\"textarea-with-page-heading\">\n Full address\n </label>\n </h1>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"textarea-with-page-heading\" name=\"address\" rows=\"5\" aria-describedby=\"textarea-with-page-heading-info\"></textarea>\n <div id=\"textarea-with-page-heading-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -141,3 +141,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxwords=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"word-count\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"word-count\" name=\"word-count\" rows=\"5\" aria-describedby=\"word-count-info\"></textarea>\n</div>\n\n <div id=\"word-count-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 words\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxwords=\"10\">\n <label class=\"govuk-label\" for=\"word-count\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"word-count\" name=\"word-count\" rows=\"5\" aria-describedby=\"word-count-info\"></textarea>\n <div id=\"word-count-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 words\n </div>\n</div>"
},

@@ -158,3 +158,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\" data-threshold=\"75\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-threshold\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-threshold\" name=\"with-threshold\" rows=\"5\" aria-describedby=\"with-threshold-info\"></textarea>\n</div>\n\n <div id=\"with-threshold-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\" data-threshold=\"75\">\n <label class=\"govuk-label\" for=\"with-threshold\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-threshold\" name=\"with-threshold\" rows=\"5\" aria-describedby=\"with-threshold-info\"></textarea>\n <div id=\"with-threshold-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -192,3 +192,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\" data-i18n.characters-under-limit.other=\"%{count} characters to go\" data-i18n.characters-under-limit.one=\"One character to go\" data-i18n.characters-at-limit=\"Zero characters left\" data-i18n.characters-over-limit.other=\"%{count} characters too many\" data-i18n.characters-over-limit.one=\"One character too many\" data-i18n.words-under-limit.other=\"%{count} words to go\" data-i18n.words-under-limit.one=\"One word to go\" data-i18n.words-at-limit=\"Zero words left\" data-i18n.words-over-limit.other=\"%{count} words too many\" data-i18n.words-over-limit.one=\"One word too many\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-translations\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-translations\" name=\"with-translations\" rows=\"5\" aria-describedby=\"with-translations-info\"></textarea>\n</div>\n\n <div id=\"with-translations-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\" data-i18n.characters-under-limit.other=\"%{count} characters to go\" data-i18n.characters-under-limit.one=\"One character to go\" data-i18n.characters-at-limit=\"Zero characters left\" data-i18n.characters-over-limit.other=\"%{count} characters too many\" data-i18n.characters-over-limit.one=\"One character too many\" data-i18n.words-under-limit.other=\"%{count} words to go\" data-i18n.words-under-limit.one=\"One word to go\" data-i18n.words-at-limit=\"Zero words left\" data-i18n.words-over-limit.other=\"%{count} words too many\" data-i18n.words-over-limit.one=\"One word too many\">\n <label class=\"govuk-label\" for=\"with-translations\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-translations\" name=\"with-translations\" rows=\"5\" aria-describedby=\"with-translations-info\"></textarea>\n <div id=\"with-translations-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -209,3 +209,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-classes\">\n With classes\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count app-character-count--custom-modifier\" id=\"with-classes\" name=\"with-classes\" rows=\"5\" aria-describedby=\"with-classes-info\"></textarea>\n</div>\n\n <div id=\"with-classes-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"with-classes\">\n With classes\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count app-character-count--custom-modifier\" id=\"with-classes\" name=\"with-classes\" rows=\"5\" aria-describedby=\"with-classes-info\"></textarea>\n <div id=\"with-classes-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -228,3 +228,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-attributes\">\n With attributes\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-attributes\" name=\"with-attributes\" rows=\"5\" aria-describedby=\"with-attributes-info\" data-attribute=\"my data value\"></textarea>\n</div>\n\n <div id=\"with-attributes-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"with-attributes\">\n With attributes\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-attributes\" name=\"with-attributes\" rows=\"5\" aria-describedby=\"with-attributes-info\" data-attribute=\"my data value\"></textarea>\n <div id=\"with-attributes-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -247,3 +247,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group app-character-count--custom-modifier\">\n <label class=\"govuk-label\" for=\"with-formgroup\">\n With formgroup\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-formgroup\" name=\"with-formgroup\" rows=\"5\" aria-describedby=\"with-formgroup-info\"></textarea>\n</div>\n\n <div id=\"with-formgroup-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count app-character-count--custom-modifier\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"with-formgroup\">\n With formgroup\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-formgroup\" name=\"with-formgroup\" rows=\"5\" aria-describedby=\"with-formgroup-info\"></textarea>\n <div id=\"with-formgroup-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -266,3 +266,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-custom-countmessage-class\">\n With custom countMessage class\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-custom-countmessage-class\" name=\"with-custom-countmessage-class\" rows=\"5\" aria-describedby=\"with-custom-countmessage-class-info\"></textarea>\n</div>\n\n <div id=\"with-custom-countmessage-class-info\" class=\"govuk-hint govuk-character-count__message app-custom-count-message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"with-custom-countmessage-class\">\n With custom countMessage class\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-custom-countmessage-class\" name=\"with-custom-countmessage-class\" rows=\"5\" aria-describedby=\"with-custom-countmessage-class-info\"></textarea>\n <div id=\"with-custom-countmessage-class-info\" class=\"govuk-hint govuk-character-count__message app-custom-count-message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -283,3 +283,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"with-spellcheck\">\n With spellcheck\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-spellcheck\" name=\"with-spellcheck\" rows=\"5\" spellcheck=\"true\" aria-describedby=\"with-spellcheck-info\"></textarea>\n</div>\n\n <div id=\"with-spellcheck-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"with-spellcheck\">\n With spellcheck\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"with-spellcheck\" name=\"with-spellcheck\" rows=\"5\" spellcheck=\"true\" aria-describedby=\"with-spellcheck-info\"></textarea>\n <div id=\"with-spellcheck-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -300,3 +300,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"without-spellcheck\">\n Without spellcheck\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"without-spellcheck\" name=\"without-spellcheck\" rows=\"5\" spellcheck=\"false\" aria-describedby=\"without-spellcheck-info\"></textarea>\n</div>\n\n <div id=\"without-spellcheck-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"without-spellcheck\">\n Without spellcheck\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"without-spellcheck\" name=\"without-spellcheck\" rows=\"5\" spellcheck=\"false\" aria-describedby=\"without-spellcheck-info\"></textarea>\n <div id=\"without-spellcheck-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -320,3 +320,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group govuk-form-group--error\">\n <label class=\"govuk-label\" for=\"with-custom-error-class\">\n With custom error class\n </label>\n <p id=\"with-custom-error-class-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count app-character-count--custom-modifier\" id=\"with-custom-error-class\" name=\"with-custom-error-class\" rows=\"5\" aria-describedby=\"with-custom-error-class-info with-custom-error-class-error\"></textarea>\n</div>\n\n <div id=\"with-custom-error-class-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-form-group--error govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"with-custom-error-class\">\n With custom error class\n </label>\n <p id=\"with-custom-error-class-error\" class=\"govuk-error-message\">\n <span class=\"govuk-visually-hidden\">Error:</span> Error message\n </p>\n <textarea class=\"govuk-textarea govuk-textarea--error govuk-js-character-count app-character-count--custom-modifier\" id=\"with-custom-error-class\" name=\"with-custom-error-class\" rows=\"5\" aria-describedby=\"with-custom-error-class-info with-custom-error-class-error\"></textarea>\n <div id=\"with-custom-error-class-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -336,3 +336,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"1_more-detail\">\n Can you provide more detail?\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"1_more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"1_more-detail-info\"></textarea>\n</div>\n\n <div id=\"1_more-detail-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"1_more-detail\">\n Can you provide more detail?\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"1_more-detail\" name=\"more-detail\" rows=\"5\" aria-describedby=\"1_more-detail-info\"></textarea>\n <div id=\"1_more-detail-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -352,3 +352,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"user1.profile[address]\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"user1.profile[address]\" name=\"address\" rows=\"5\" aria-describedby=\"user1.profile[address]-info\"></textarea>\n</div>\n\n <div id=\"user1.profile[address]-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"user1.profile[address]\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"user1.profile[address]\" name=\"address\" rows=\"5\" aria-describedby=\"user1.profile[address]-info\"></textarea>\n <div id=\"user1.profile[address]-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -371,3 +371,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"maxlength-should-be-removed\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"maxlength-should-be-removed\" name=\"address\" rows=\"5\" aria-describedby=\"maxlength-should-be-removed-info\" maxlength=\"10\"></textarea>\n</div>\n\n <div id=\"maxlength-should-be-removed-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-maxlength=\"10\">\n <label class=\"govuk-label\" for=\"maxlength-should-be-removed\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"maxlength-should-be-removed\" name=\"address\" rows=\"5\" aria-describedby=\"maxlength-should-be-removed-info\" maxlength=\"10\"></textarea>\n <div id=\"maxlength-should-be-removed-info\" class=\"govuk-hint govuk-character-count__message\">\n You can enter up to 10 characters\n </div>\n</div>"
},

@@ -386,3 +386,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"to-configure-in-javascript\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"to-configure-in-javascript\" name=\"address\" rows=\"5\" aria-describedby=\"to-configure-in-javascript-info\"></textarea>\n</div>\n\n <div id=\"to-configure-in-javascript-info\" class=\"govuk-hint govuk-character-count__message\">\n \n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\">\n <label class=\"govuk-label\" for=\"to-configure-in-javascript\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"to-configure-in-javascript\" name=\"address\" rows=\"5\" aria-describedby=\"to-configure-in-javascript-info\"></textarea>\n <div id=\"to-configure-in-javascript-info\" class=\"govuk-hint govuk-character-count__message\">\n \n </div>\n</div>"
},

@@ -402,3 +402,3 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\" data-i18n.textarea-description.other=\"No more than %{count} characters\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"no-maximum\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"no-maximum\" name=\"no-maximum\" rows=\"5\" aria-describedby=\"no-maximum-info\"></textarea>\n</div>\n\n <div id=\"no-maximum-info\" class=\"govuk-hint govuk-character-count__message\">\n \n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\" data-i18n.textarea-description.other=\"No more than %{count} characters\">\n <label class=\"govuk-label\" for=\"no-maximum\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"no-maximum\" name=\"no-maximum\" rows=\"5\" aria-describedby=\"no-maximum-info\"></textarea>\n <div id=\"no-maximum-info\" class=\"govuk-hint govuk-character-count__message\">\n \n </div>\n</div>"
},

@@ -417,5 +417,5 @@ {

"previewLayoutModifiers": [],
"html": "<div class=\"govuk-character-count\" data-module=\"govuk-character-count\">\n <div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"no-maximum\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"no-maximum\" name=\"no-maximum\" rows=\"5\" aria-describedby=\"no-maximum-info\"></textarea>\n</div>\n\n <div id=\"no-maximum-info\" class=\"govuk-hint govuk-character-count__message\">\n \n </div>\n</div>"
"html": "<div class=\"govuk-form-group govuk-character-count\" data-module=\"govuk-character-count\">\n <label class=\"govuk-label\" for=\"no-maximum\">\n Full address\n </label>\n <textarea class=\"govuk-textarea govuk-js-character-count\" id=\"no-maximum\" name=\"no-maximum\" rows=\"5\" aria-describedby=\"no-maximum-info\"></textarea>\n <div id=\"no-maximum-info\" class=\"govuk-hint govuk-character-count__message\">\n \n </div>\n</div>"
}
]
}

@@ -54,2 +54,3 @@ (function (global, factory) {

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -59,2 +60,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -61,0 +69,0 @@ *

@@ -7,23 +7,42 @@ (function (global, factory) {

function mergeConfigs(...configObjects) {
function flattenObject(configObject) {
const flattenedObject = {};
function flattenLoop(obj, prefix) {
for (const [key, value] of Object.entries(obj)) {
const prefixedKey = prefix ? `${prefix}.${key}` : key;
if (value && typeof value === 'object') {
flattenLoop(value, prefixedKey);
} else {
flattenedObject[prefixedKey] = value;
}
}
function normaliseString(value, property) {
const trimmedValue = value ? value.trim() : '';
let output;
let outputType = property == null ? void 0 : property.type;
if (!outputType) {
if (['true', 'false'].includes(trimmedValue)) {
outputType = 'boolean';
}
flattenLoop(configObject);
return flattenedObject;
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
outputType = 'number';
}
}
switch (outputType) {
case 'boolean':
output = trimmedValue === 'true';
break;
case 'number':
output = Number(trimmedValue);
break;
default:
output = value;
}
return output;
}
/**
* @typedef {import('./index.mjs').SchemaProperty} SchemaProperty
*/
function mergeConfigs(...configObjects) {
const formattedConfigObject = {};
for (const configObject of configObjects) {
const obj = flattenObject(configObject);
for (const [key, value] of Object.entries(obj)) {
formattedConfigObject[key] = value;
for (const key of Object.keys(configObject)) {
const option = formattedConfigObject[key];
const override = configObject[key];
if (isObject(option) && isObject(override)) {
formattedConfigObject[key] = mergeConfigs(option, override);
} else {
formattedConfigObject[key] = override;
}
}

@@ -33,2 +52,28 @@ }

}
function extractConfigByNamespace(Component, dataset, namespace) {
const property = Component.schema.properties[namespace];
if ((property == null ? void 0 : property.type) !== 'object') {
return;
}
const newObject = {
[namespace]: ({})
};
for (const [key, value] of Object.entries(dataset)) {
let current = newObject;
const keyParts = key.split('.');
for (const [index, name] of keyParts.entries()) {
if (typeof current === 'object') {
if (index < keyParts.length - 1) {
if (!isObject(current[name])) {
current[name] = {};
}
current = current[name];
} else if (key !== namespace) {
current[name] = normaliseString(value);
}
}
}
}
return newObject[namespace];
}
function getFragmentFromUrl(url) {

@@ -70,2 +115,8 @@ if (!url.includes('#')) {

}
function isArray(option) {
return Array.isArray(option);
}
function isObject(option) {
return !!option && typeof option === 'object' && !isArray(option);
}

@@ -76,2 +127,3 @@ /**

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -81,2 +133,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -89,22 +148,11 @@ *

function normaliseString(value) {
if (typeof value !== 'string') {
return value;
}
const trimmedValue = value.trim();
if (trimmedValue === 'true') {
return true;
}
if (trimmedValue === 'false') {
return false;
}
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
return Number(trimmedValue);
}
return value;
}
function normaliseDataset(dataset) {
function normaliseDataset(Component, dataset) {
const out = {};
for (const [key, value] of Object.entries(dataset)) {
out[key] = normaliseString(value);
for (const [field, property] of Object.entries(Component.schema.properties)) {
if (field in dataset) {
out[field] = normaliseString(dataset[field], property);
}
if ((property == null ? void 0 : property.type) === 'object') {
out[field] = extractConfigByNamespace(Component, dataset, field);
}
}

@@ -186,3 +234,3 @@ return out;

this.$module = $module;
this.config = mergeConfigs(ErrorSummary.defaults, config, normaliseDataset($module.dataset));
this.config = mergeConfigs(ErrorSummary.defaults, config, normaliseDataset(ErrorSummary, $module.dataset));
if (!this.config.disableAutoFocus) {

@@ -252,2 +300,6 @@ setFocus(this.$module);

*/
/**
* @typedef {import('../../common/index.mjs').Schema} Schema
*/
ErrorSummary.moduleName = 'govuk-error-summary';

@@ -257,2 +309,9 @@ ErrorSummary.defaults = Object.freeze({

});
ErrorSummary.schema = Object.freeze({
properties: {
disableAutoFocus: {
type: 'boolean'
}
}
});

@@ -259,0 +318,0 @@ exports.ErrorSummary = ErrorSummary;

@@ -7,23 +7,42 @@ (function (global, factory) {

function mergeConfigs(...configObjects) {
function flattenObject(configObject) {
const flattenedObject = {};
function flattenLoop(obj, prefix) {
for (const [key, value] of Object.entries(obj)) {
const prefixedKey = prefix ? `${prefix}.${key}` : key;
if (value && typeof value === 'object') {
flattenLoop(value, prefixedKey);
} else {
flattenedObject[prefixedKey] = value;
}
}
function normaliseString(value, property) {
const trimmedValue = value ? value.trim() : '';
let output;
let outputType = property == null ? void 0 : property.type;
if (!outputType) {
if (['true', 'false'].includes(trimmedValue)) {
outputType = 'boolean';
}
flattenLoop(configObject);
return flattenedObject;
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
outputType = 'number';
}
}
switch (outputType) {
case 'boolean':
output = trimmedValue === 'true';
break;
case 'number':
output = Number(trimmedValue);
break;
default:
output = value;
}
return output;
}
/**
* @typedef {import('./index.mjs').SchemaProperty} SchemaProperty
*/
function mergeConfigs(...configObjects) {
const formattedConfigObject = {};
for (const configObject of configObjects) {
const obj = flattenObject(configObject);
for (const [key, value] of Object.entries(obj)) {
formattedConfigObject[key] = value;
for (const key of Object.keys(configObject)) {
const option = formattedConfigObject[key];
const override = configObject[key];
if (isObject(option) && isObject(override)) {
formattedConfigObject[key] = mergeConfigs(option, override);
} else {
formattedConfigObject[key] = override;
}
}

@@ -33,15 +52,27 @@ }

}
function extractConfigByNamespace(configObject, namespace) {
const newObject = {};
for (const [key, value] of Object.entries(configObject)) {
function extractConfigByNamespace(Component, dataset, namespace) {
const property = Component.schema.properties[namespace];
if ((property == null ? void 0 : property.type) !== 'object') {
return;
}
const newObject = {
[namespace]: ({})
};
for (const [key, value] of Object.entries(dataset)) {
let current = newObject;
const keyParts = key.split('.');
if (keyParts[0] === namespace) {
if (keyParts.length > 1) {
keyParts.shift();
for (const [index, name] of keyParts.entries()) {
if (typeof current === 'object') {
if (index < keyParts.length - 1) {
if (!isObject(current[name])) {
current[name] = {};
}
current = current[name];
} else if (key !== namespace) {
current[name] = normaliseString(value);
}
}
const newKey = keyParts.join('.');
newObject[newKey] = value;
}
}
return newObject;
return newObject[namespace];
}

@@ -54,2 +85,8 @@ function isSupported($scope = document.body) {

}
function isArray(option) {
return Array.isArray(option);
}
function isObject(option) {
return !!option && typeof option === 'object' && !isArray(option);
}

@@ -60,2 +97,3 @@ /**

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -65,2 +103,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -73,22 +118,11 @@ *

function normaliseString(value) {
if (typeof value !== 'string') {
return value;
}
const trimmedValue = value.trim();
if (trimmedValue === 'true') {
return true;
}
if (trimmedValue === 'false') {
return false;
}
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
return Number(trimmedValue);
}
return value;
}
function normaliseDataset(dataset) {
function normaliseDataset(Component, dataset) {
const out = {};
for (const [key, value] of Object.entries(dataset)) {
out[key] = normaliseString(value);
for (const [field, property] of Object.entries(Component.schema.properties)) {
if (field in dataset) {
out[field] = normaliseString(dataset[field], property);
}
if ((property == null ? void 0 : property.type) === 'object') {
out[field] = extractConfigByNamespace(Component, dataset, field);
}
}

@@ -157,14 +191,17 @@ return out;

}
if (typeof (options == null ? void 0 : options.count) === 'number') {
lookupKey = `${lookupKey}.${this.getPluralSuffix(lookupKey, options.count)}`;
let translation = this.translations[lookupKey];
if (typeof (options == null ? void 0 : options.count) === 'number' && typeof translation === 'object') {
const translationPluralForm = translation[this.getPluralSuffix(lookupKey, options.count)];
if (translationPluralForm) {
translation = translationPluralForm;
}
}
const translationString = this.translations[lookupKey];
if (typeof translationString === 'string') {
if (translationString.match(/%{(.\S+)}/)) {
if (typeof translation === 'string') {
if (translation.match(/%{(.\S+)}/)) {
if (!options) {
throw new Error('i18n: cannot replace placeholders in string if no option data provided');
}
return this.replacePlaceholders(translationString, options);
return this.replacePlaceholders(translation, options);
}
return translationString;
return translation;
}

@@ -197,8 +234,11 @@ return lookupKey;

}
const translation = this.translations[lookupKey];
const preferredForm = this.hasIntlPluralRulesSupport() ? new Intl.PluralRules(this.locale).select(count) : this.selectPluralFormUsingFallbackRules(count);
if (`${lookupKey}.${preferredForm}` in this.translations) {
return preferredForm;
} else if (`${lookupKey}.other` in this.translations) {
console.warn(`i18n: Missing plural form ".${preferredForm}" for "${this.locale}" locale. Falling back to ".other".`);
return 'other';
if (typeof translation === 'object') {
if (preferredForm in translation) {
return preferredForm;
} else if ('other' in translation) {
console.warn(`i18n: Missing plural form ".${preferredForm}" for "${this.locale}" locale. Falling back to ".other".`);
return 'other';
}
}

@@ -375,4 +415,4 @@ throw new Error(`i18n: Plural form ".other" is required for "${this.locale}" locale`);

}
this.config = mergeConfigs(ExitThisPage.defaults, config, normaliseDataset($module.dataset));
this.i18n = new I18n(extractConfigByNamespace(this.config, 'i18n'));
this.config = mergeConfigs(ExitThisPage.defaults, config, normaliseDataset(ExitThisPage, $module.dataset));
this.i18n = new I18n(this.config.i18n);
this.$module = $module;

@@ -447,3 +487,3 @@ this.$button = $button;

}
if ((event.key === 'Shift' || event.keyCode === 16 || event.which === 16) && !this.lastKeyWasModified) {
if (event.key === 'Shift' && !this.lastKeyWasModified) {
this.keypressCounter += 1;

@@ -542,2 +582,6 @@ this.updateIndicator();

*/
/**
* @typedef {import('../../common/index.mjs').Schema} Schema
*/
ExitThisPage.moduleName = 'govuk-exit-this-page';

@@ -552,2 +596,9 @@ ExitThisPage.defaults = Object.freeze({

});
ExitThisPage.schema = Object.freeze({
properties: {
i18n: {
type: 'object'
}
}
});

@@ -554,0 +605,0 @@ exports.ExitThisPage = ExitThisPage;

@@ -26,2 +26,3 @@ (function (global, factory) {

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -31,2 +32,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -33,0 +41,0 @@ *

@@ -278,2 +278,18 @@ {

{
"name": "with autocapitalize turned off",
"options": {
"label": {
"text": "Autocapitalize is turned off"
},
"id": "input-with-autocapitalize-off",
"name": "autocapitalize",
"type": "text",
"autocapitalize": "none"
},
"hidden": false,
"description": "",
"previewLayoutModifiers": [],
"html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"input-with-autocapitalize-off\">\n Autocapitalize is turned off\n </label>\n <input class=\"govuk-input\" id=\"input-with-autocapitalize-off\" name=\"autocapitalize\" type=\"text\" autocapitalize=\"none\">\n</div>"
},
{
"name": "with prefix",

@@ -723,4 +739,30 @@ "options": {

"html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"input-with-suffix\">\n Weight, in kilograms\n </label>\n <div class=\"govuk-input__wrapper\">\n <input class=\"govuk-input\" id=\"input-with-suffix\" name=\"weight\" type=\"text\">\n <div class=\"govuk-input__suffix\" aria-hidden=\"true\" data-attribute=\"value\"><span>kg</span></div>\n </div>\n</div>"
},
{
"name": "with customised input wrapper",
"options": {
"label": {
"text": "Cost per item, in pounds"
},
"id": "input-with-customised-input-wrapper",
"name": "cost",
"inputWrapper": {
"classes": "app-input-wrapper--custom-modifier",
"attributes": {
"data-attribute": "value"
}
},
"prefix": {
"text": "£"
},
"suffix": {
"text": "per item"
}
},
"hidden": true,
"description": "",
"previewLayoutModifiers": [],
"html": "<div class=\"govuk-form-group\">\n <label class=\"govuk-label\" for=\"input-with-customised-input-wrapper\">\n Cost per item, in pounds\n </label>\n <div class=\"govuk-input__wrapper app-input-wrapper--custom-modifier\" data-attribute=\"value\">\n <div class=\"govuk-input__prefix\" aria-hidden=\"true\">£</div>\n <input class=\"govuk-input\" id=\"input-with-customised-input-wrapper\" name=\"cost\" type=\"text\">\n <div class=\"govuk-input__suffix\" aria-hidden=\"true\">per item</div>\n </div>\n</div>"
}
]
}

@@ -214,2 +214,28 @@ [

{
"name": "autocapitalize",
"type": "string",
"required": false,
"description": "Optional field to enable or disable autocapitalisation of user input. See [autocapitalization](https://html.spec.whatwg.org/multipage/interaction.html#autocapitalization) for a full list of values that can be used."
},
{
"name": "inputWrapper",
"type": "object",
"required": false,
"description": "If any of `prefix`, `suffix`, `formGroup.beforeInput` or `formGroup.afterInput` have a value, a wrapping element is added around the input and inserted content. This object allows you to customise that wrapping element.",
"params": [
{
"name": "classes",
"type": "string",
"required": false,
"description": "Classes to add to the wrapping element."
},
{
"name": "attributes",
"type": "object",
"required": false,
"description": "HTML attributes (for example data attributes) to add to the wrapping element."
}
]
},
{
"name": "attributes",

@@ -216,0 +242,0 @@ "type": "object",

@@ -7,23 +7,42 @@ (function (global, factory) {

function mergeConfigs(...configObjects) {
function flattenObject(configObject) {
const flattenedObject = {};
function flattenLoop(obj, prefix) {
for (const [key, value] of Object.entries(obj)) {
const prefixedKey = prefix ? `${prefix}.${key}` : key;
if (value && typeof value === 'object') {
flattenLoop(value, prefixedKey);
} else {
flattenedObject[prefixedKey] = value;
}
}
function normaliseString(value, property) {
const trimmedValue = value ? value.trim() : '';
let output;
let outputType = property == null ? void 0 : property.type;
if (!outputType) {
if (['true', 'false'].includes(trimmedValue)) {
outputType = 'boolean';
}
flattenLoop(configObject);
return flattenedObject;
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
outputType = 'number';
}
}
switch (outputType) {
case 'boolean':
output = trimmedValue === 'true';
break;
case 'number':
output = Number(trimmedValue);
break;
default:
output = value;
}
return output;
}
/**
* @typedef {import('./index.mjs').SchemaProperty} SchemaProperty
*/
function mergeConfigs(...configObjects) {
const formattedConfigObject = {};
for (const configObject of configObjects) {
const obj = flattenObject(configObject);
for (const [key, value] of Object.entries(obj)) {
formattedConfigObject[key] = value;
for (const key of Object.keys(configObject)) {
const option = formattedConfigObject[key];
const override = configObject[key];
if (isObject(option) && isObject(override)) {
formattedConfigObject[key] = mergeConfigs(option, override);
} else {
formattedConfigObject[key] = override;
}
}

@@ -33,2 +52,28 @@ }

}
function extractConfigByNamespace(Component, dataset, namespace) {
const property = Component.schema.properties[namespace];
if ((property == null ? void 0 : property.type) !== 'object') {
return;
}
const newObject = {
[namespace]: ({})
};
for (const [key, value] of Object.entries(dataset)) {
let current = newObject;
const keyParts = key.split('.');
for (const [index, name] of keyParts.entries()) {
if (typeof current === 'object') {
if (index < keyParts.length - 1) {
if (!isObject(current[name])) {
current[name] = {};
}
current = current[name];
} else if (key !== namespace) {
current[name] = normaliseString(value);
}
}
}
}
return newObject[namespace];
}
function setFocus($element, options = {}) {

@@ -64,2 +109,8 @@ var _options$onBeforeFocu;

}
function isArray(option) {
return Array.isArray(option);
}
function isObject(option) {
return !!option && typeof option === 'object' && !isArray(option);
}

@@ -70,2 +121,3 @@ /**

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -75,2 +127,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -83,22 +142,11 @@ *

function normaliseString(value) {
if (typeof value !== 'string') {
return value;
}
const trimmedValue = value.trim();
if (trimmedValue === 'true') {
return true;
}
if (trimmedValue === 'false') {
return false;
}
if (trimmedValue.length > 0 && isFinite(Number(trimmedValue))) {
return Number(trimmedValue);
}
return value;
}
function normaliseDataset(dataset) {
function normaliseDataset(Component, dataset) {
const out = {};
for (const [key, value] of Object.entries(dataset)) {
out[key] = normaliseString(value);
for (const [field, property] of Object.entries(Component.schema.properties)) {
if (field in dataset) {
out[field] = normaliseString(dataset[field], property);
}
if ((property == null ? void 0 : property.type) === 'object') {
out[field] = extractConfigByNamespace(Component, dataset, field);
}
}

@@ -177,3 +225,3 @@ return out;

this.$module = $module;
this.config = mergeConfigs(NotificationBanner.defaults, config, normaliseDataset($module.dataset));
this.config = mergeConfigs(NotificationBanner.defaults, config, normaliseDataset(NotificationBanner, $module.dataset));
if (this.$module.getAttribute('role') === 'alert' && !this.config.disableAutoFocus) {

@@ -194,2 +242,6 @@ setFocus(this.$module);

*/
/**
* @typedef {import('../../common/index.mjs').Schema} Schema
*/
NotificationBanner.moduleName = 'govuk-notification-banner';

@@ -199,2 +251,9 @@ NotificationBanner.defaults = Object.freeze({

});
NotificationBanner.schema = Object.freeze({
properties: {
disableAutoFocus: {
type: 'boolean'
}
}
});

@@ -201,0 +260,0 @@ exports.NotificationBanner = NotificationBanner;

@@ -32,3 +32,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
},

@@ -64,3 +64,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"search\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination\" aria-label=\"search\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
},

@@ -97,3 +97,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous page\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page one\">\n one\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page two\" aria-current=\"page\">\n two\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page three\">\n three\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next page\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous page\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page one\">\n one\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page two\" aria-current=\"page\">\n two\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page three\">\n three\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next page\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
},

@@ -131,3 +131,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"1st page\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"2nd page (you are currently on this page)\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"3rd page\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"1st page\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"2nd page (you are currently on this page)\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"3rd page\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
},

@@ -184,3 +184,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--ellipses\">\n &ctdot;\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/8\" aria-label=\"Page 8\">\n 8\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/9\" aria-label=\"Page 9\">\n 9\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/10\" aria-label=\"Page 10\" aria-current=\"page\">\n 10\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/11\" aria-label=\"Page 11\">\n 11\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/12\" aria-label=\"Page 12\">\n 12\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--ellipses\">\n &ctdot;\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/40\" aria-label=\"Page 40\">\n 40\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--ellipses\">\n &ctdot;\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/8\" aria-label=\"Page 8\">\n 8\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/9\" aria-label=\"Page 9\">\n 9\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/10\" aria-label=\"Page 10\" aria-current=\"page\">\n 10\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/11\" aria-label=\"Page 11\">\n 11\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/12\" aria-label=\"Page 12\">\n 12\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--ellipses\">\n &ctdot;\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/40\" aria-label=\"Page 40\">\n 40\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
},

@@ -212,3 +212,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"Pagination\">\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\" aria-current=\"page\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination\" aria-label=\"Pagination\">\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\" aria-current=\"page\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
},

@@ -240,3 +240,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\" aria-current=\"page\">\n 3\n </a>\n </li>\n </ul>\n</nav>"
"html": "<nav class=\"govuk-pagination\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\" aria-current=\"page\">\n 3\n </a>\n </li>\n </ul>\n</nav>"
},

@@ -256,3 +256,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n</nav>"
},

@@ -276,3 +276,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous page\n </span>\n <span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Paying VAT and duty</span>\n </a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Next page\n </span>\n <span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Registering an imported vehicle</span>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous page\n </span>\n <span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Paying VAT and duty</span>\n </a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Next page\n </span>\n <span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Registering an imported vehicle</span>\n </a>\n </div>\n</nav>"
},

@@ -296,3 +296,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous page\n </span>\n <span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span>\n </a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Next page\n </span>\n <span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous page\n </span>\n <span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span>\n </a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Next page\n </span>\n <span class=\"govuk-visually-hidden\">:</span>\n <span class=\"govuk-pagination__link-label\">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span>\n </a>\n </div>\n</nav>"
},

@@ -314,3 +314,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n précédente\n </span>\n </a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n suivante\n </span>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n précédente\n </span>\n </a>\n </div>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n suivante\n </span>\n </a>\n </div>\n</nav>"
},

@@ -327,3 +327,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n</nav>"
},

@@ -340,3 +340,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination govuk-pagination--block\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title govuk-pagination__link-title--decorated\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n</nav>"
},

@@ -372,3 +372,3 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination my-custom-class\" role=\"navigation\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination my-custom-class\" aria-label=\"Pagination\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
},

@@ -407,5 +407,5 @@ {

"previewLayoutModifiers": [],
"html": "<nav class=\"govuk-pagination\" role=\"navigation\" aria-label=\"Pagination\" data-attribute-1=\"value-1\" data-attribute-2=\"value-2\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
"html": "<nav class=\"govuk-pagination\" aria-label=\"Pagination\" data-attribute-1=\"value-1\" data-attribute-2=\"value-2\">\n <div class=\"govuk-pagination__prev\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/previous\" rel=\"prev\">\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--prev\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m6.5938-0.0078125-6.7266 6.7266 6.7441 6.4062 1.377-1.449-4.1856-3.9768h12.896v-2h-12.984l4.2931-4.293-1.414-1.414z\"></path>\n </svg>\n <span class=\"govuk-pagination__link-title\">\n Previous<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n </a>\n </div>\n <ul class=\"govuk-pagination__list\">\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/1\" aria-label=\"Page 1\">\n 1\n </a>\n </li>\n <li class=\"govuk-pagination__item govuk-pagination__item--current\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/2\" aria-label=\"Page 2\" aria-current=\"page\">\n 2\n </a>\n </li>\n <li class=\"govuk-pagination__item\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/page/3\" aria-label=\"Page 3\">\n 3\n </a>\n </li>\n </ul>\n <div class=\"govuk-pagination__next\">\n <a class=\"govuk-link govuk-pagination__link\" href=\"/next\" rel=\"next\">\n <span class=\"govuk-pagination__link-title\">\n Next<span class=\"govuk-visually-hidden\"> page</span>\n </span>\n <svg class=\"govuk-pagination__icon govuk-pagination__icon--next\" xmlns=\"http://www.w3.org/2000/svg\" height=\"13\" width=\"15\" aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 15 13\">\n <path d=\"m8.107-0.0078125-1.4136 1.414 4.2926 4.293h-12.986v2h12.896l-4.1855 3.9766 1.377 1.4492 6.7441-6.4062-6.7246-6.7266z\"></path>\n </svg>\n </a>\n </div>\n</nav>"
}
]
}

@@ -54,2 +54,3 @@ (function (global, factory) {

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -59,2 +60,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -61,0 +69,0 @@ *

@@ -48,2 +48,3 @@ (function (global, factory) {

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -53,2 +54,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -55,0 +63,0 @@ *

@@ -32,2 +32,3 @@ (function (global, factory) {

* @typedef {object} Schema
* @property {{ [field: string]: SchemaProperty | undefined }} properties - Schema properties
* @property {SchemaCondition[]} [anyOf] - List of schema conditions

@@ -37,2 +38,9 @@ */

/**
* Schema property for component config
*
* @typedef {object} SchemaProperty
* @property {'string' | 'boolean' | 'number' | 'object'} type - Property type
*/
/**
* Schema condition for component config

@@ -107,8 +115,2 @@ *

this.$tabListItems = void 0;
this.keys = {
left: 37,
right: 39,
up: 38,
down: 40
};
this.jsHiddenClass = 'govuk-tabs__panel--hidden';

@@ -293,10 +295,14 @@ this.changingHash = false;

onTabKeydown(event) {
switch (event.keyCode) {
case this.keys.left:
case this.keys.up:
switch (event.key) {
case 'ArrowLeft':
case 'ArrowUp':
case 'Left':
case 'Up':
this.activatePreviousTab();
event.preventDefault();
break;
case this.keys.right:
case this.keys.down:
case 'ArrowRight':
case 'ArrowDown':
case 'Right':
case 'Down':
this.activateNextTab();

@@ -303,0 +309,0 @@ event.preventDefault();

@@ -1,1 +0,1 @@

const version="5.2.0";function mergeConfigs(...t){function flattenObject(t){const e={};return function flattenLoop(t,n){for(const[i,s]of Object.entries(t)){const t=n?`${n}.${i}`:i;s&&"object"==typeof s?flattenLoop(s,t):e[t]=s}}(t),e}const e={};for(const n of t){const t=flattenObject(n);for(const[n,i]of Object.entries(t))e[n]=i}return e}function extractConfigByNamespace(t,e){const n={};for(const[i,s]of Object.entries(t)){const t=i.split(".");if(t[0]===e){t.length>1&&t.shift();n[t.join(".")]=s}}return n}function getFragmentFromUrl(t){if(t.includes("#"))return t.split("#").pop()}function getBreakpoint(t){const e=`--govuk-frontend-breakpoint-${t}`;return{property:e,value:window.getComputedStyle(document.documentElement).getPropertyValue(e)||void 0}}function setFocus(t,e={}){var n;const i=t.getAttribute("tabindex");function onBlur(){var n;null==(n=e.onBlur)||n.call(t),i||t.removeAttribute("tabindex")}i||t.setAttribute("tabindex","-1"),t.addEventListener("focus",(function(){t.addEventListener("blur",onBlur,{once:!0})}),{once:!0}),null==(n=e.onBeforeFocus)||n.call(t),t.focus()}function isSupported(t=document.body){return!!t&&t.classList.contains("govuk-frontend-supported")}function normaliseString(t){if("string"!=typeof t)return t;const e=t.trim();return"true"===e||"false"!==e&&(e.length>0&&isFinite(Number(e))?Number(e):t)}function normaliseDataset(t){const e={};for(const[n,i]of Object.entries(t))e[n]=normaliseString(i);return e}class GOVUKFrontendError extends Error{constructor(...t){super(...t),this.name="GOVUKFrontendError"}}class SupportError extends GOVUKFrontendError{constructor(t=document.body){const e="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";super(t?e:'GOV.UK Frontend initialised without `<script type="module">`'),this.name="SupportError"}}class ConfigError extends GOVUKFrontendError{constructor(...t){super(...t),this.name="ConfigError"}}class ElementError extends GOVUKFrontendError{constructor(t){let e="string"==typeof t?t:"";if("object"==typeof t){const{componentName:n,identifier:i,element:s,expectedType:o}=t;e=`${n}: ${i}`,e+=s?` is not of type ${null!=o?o:"HTMLElement"}`:" not found"}super(e),this.name="ElementError"}}class GOVUKFrontendComponent{constructor(){this.checkSupport()}checkSupport(){if(!isSupported())throw new SupportError}}class I18n{constructor(t={},e={}){var n;this.translations=void 0,this.locale=void 0,this.translations=t,this.locale=null!=(n=e.locale)?n:document.documentElement.lang||"en"}t(t,e){if(!t)throw new Error("i18n: lookup key missing");"number"==typeof(null==e?void 0:e.count)&&(t=`${t}.${this.getPluralSuffix(t,e.count)}`);const n=this.translations[t];if("string"==typeof n){if(n.match(/%{(.\S+)}/)){if(!e)throw new Error("i18n: cannot replace placeholders in string if no option data provided");return this.replacePlaceholders(n,e)}return n}return t}replacePlaceholders(t,e){const n=Intl.NumberFormat.supportedLocalesOf(this.locale).length?new Intl.NumberFormat(this.locale):void 0;return t.replace(/%{(.\S+)}/g,(function(t,i){if(Object.prototype.hasOwnProperty.call(e,i)){const t=e[i];return!1===t||"number"!=typeof t&&"string"!=typeof t?"":"number"==typeof t?n?n.format(t):`${t}`:t}throw new Error(`i18n: no data found to replace ${t} placeholder in string`)}))}hasIntlPluralRulesSupport(){return Boolean("PluralRules"in window.Intl&&Intl.PluralRules.supportedLocalesOf(this.locale).length)}getPluralSuffix(t,e){if(e=Number(e),!isFinite(e))return"other";const n=this.hasIntlPluralRulesSupport()?new Intl.PluralRules(this.locale).select(e):this.selectPluralFormUsingFallbackRules(e);if(`${t}.${n}`in this.translations)return n;if(`${t}.other`in this.translations)return console.warn(`i18n: Missing plural form ".${n}" for "${this.locale}" locale. Falling back to ".other".`),"other";throw new Error(`i18n: Plural form ".other" is required for "${this.locale}" locale`)}selectPluralFormUsingFallbackRules(t){t=Math.abs(Math.floor(t));const e=this.getPluralRulesForLocale();return e?I18n.pluralRules[e](t):"other"}getPluralRulesForLocale(){const t=this.locale.split("-")[0];for(const e in I18n.pluralRulesMap){const n=I18n.pluralRulesMap[e];if(n.includes(this.locale)||n.includes(t))return e}}}I18n.pluralRulesMap={arabic:["ar"],chinese:["my","zh","id","ja","jv","ko","ms","th","vi"],french:["hy","bn","fr","gu","hi","fa","pa","zu"],german:["af","sq","az","eu","bg","ca","da","nl","en","et","fi","ka","de","el","hu","lb","no","so","sw","sv","ta","te","tr","ur"],irish:["ga"],russian:["ru","uk"],scottish:["gd"],spanish:["pt-PT","it","es"],welsh:["cy"]},I18n.pluralRules={arabic:t=>0===t?"zero":1===t?"one":2===t?"two":t%100>=3&&t%100<=10?"few":t%100>=11&&t%100<=99?"many":"other",chinese:()=>"other",french:t=>0===t||1===t?"one":"other",german:t=>1===t?"one":"other",irish:t=>1===t?"one":2===t?"two":t>=3&&t<=6?"few":t>=7&&t<=10?"many":"other",russian(t){const e=t%100,n=e%10;return 1===n&&11!==e?"one":n>=2&&n<=4&&!(e>=12&&e<=14)?"few":0===n||n>=5&&n<=9||e>=11&&e<=14?"many":"other"},scottish:t=>1===t||11===t?"one":2===t||12===t?"two":t>=3&&t<=10||t>=13&&t<=19?"few":"other",spanish:t=>1===t?"one":t%1e6==0&&0!==t?"many":"other",welsh:t=>0===t?"zero":1===t?"one":2===t?"two":3===t?"few":6===t?"many":"other"};class Accordion extends GOVUKFrontendComponent{constructor(e,n={}){if(super(),this.$module=void 0,this.config=void 0,this.i18n=void 0,this.controlsClass="govuk-accordion__controls",this.showAllClass="govuk-accordion__show-all",this.showAllTextClass="govuk-accordion__show-all-text",this.sectionClass="govuk-accordion__section",this.sectionExpandedClass="govuk-accordion__section--expanded",this.sectionButtonClass="govuk-accordion__section-button",this.sectionHeaderClass="govuk-accordion__section-header",this.sectionHeadingClass="govuk-accordion__section-heading",this.sectionHeadingDividerClass="govuk-accordion__section-heading-divider",this.sectionHeadingTextClass="govuk-accordion__section-heading-text",this.sectionHeadingTextFocusClass="govuk-accordion__section-heading-text-focus",this.sectionShowHideToggleClass="govuk-accordion__section-toggle",this.sectionShowHideToggleFocusClass="govuk-accordion__section-toggle-focus",this.sectionShowHideTextClass="govuk-accordion__section-toggle-text",this.upChevronIconClass="govuk-accordion-nav__chevron",this.downChevronIconClass="govuk-accordion-nav__chevron--down",this.sectionSummaryClass="govuk-accordion__section-summary",this.sectionSummaryFocusClass="govuk-accordion__section-summary-focus",this.sectionContentClass="govuk-accordion__section-content",this.$sections=void 0,this.browserSupportsSessionStorage=!1,this.$showAllButton=null,this.$showAllIcon=null,this.$showAllText=null,!(e instanceof HTMLElement))throw new ElementError({componentName:"Accordion",element:e,identifier:"Root element (`$module`)"});this.$module=e,this.config=mergeConfigs(Accordion.defaults,n,normaliseDataset(e.dataset)),this.i18n=new I18n(extractConfigByNamespace(this.config,"i18n"));const i=this.$module.querySelectorAll(`.${this.sectionClass}`);if(!i.length)throw new ElementError({componentName:"Accordion",identifier:`Sections (\`<div class="${this.sectionClass}">\`)`});this.$sections=i,this.browserSupportsSessionStorage=t.checkForSessionStorage(),this.initControls(),this.initSectionHeaders();const s=this.checkIfAllSectionsOpen();this.updateShowAllButton(s)}initControls(){this.$showAllButton=document.createElement("button"),this.$showAllButton.setAttribute("type","button"),this.$showAllButton.setAttribute("class",this.showAllClass),this.$showAllButton.setAttribute("aria-expanded","false"),this.$showAllIcon=document.createElement("span"),this.$showAllIcon.classList.add(this.upChevronIconClass),this.$showAllButton.appendChild(this.$showAllIcon);const t=document.createElement("div");t.setAttribute("class",this.controlsClass),t.appendChild(this.$showAllButton),this.$module.insertBefore(t,this.$module.firstChild),this.$showAllText=document.createElement("span"),this.$showAllText.classList.add(this.showAllTextClass),this.$showAllButton.appendChild(this.$showAllText),this.$showAllButton.addEventListener("click",(()=>this.onShowOrHideAllToggle())),"onbeforematch"in document&&document.addEventListener("beforematch",(t=>this.onBeforeMatch(t)))}initSectionHeaders(){this.$sections.forEach(((t,e)=>{const n=t.querySelector(`.${this.sectionHeaderClass}`);if(!n)throw new ElementError({componentName:"Accordion",identifier:`Section headers (\`<div class="${this.sectionHeaderClass}">\`)`});this.constructHeaderMarkup(n,e),this.setExpanded(this.isExpanded(t),t),n.addEventListener("click",(()=>this.onSectionToggle(t))),this.setInitialState(t)}))}constructHeaderMarkup(t,e){const n=t.querySelector(`.${this.sectionButtonClass}`),i=t.querySelector(`.${this.sectionHeadingClass}`),s=t.querySelector(`.${this.sectionSummaryClass}`);if(!i)throw new ElementError({componentName:"Accordion",identifier:`Section heading (\`.${this.sectionHeadingClass}\`)`});if(!n)throw new ElementError({componentName:"Accordion",identifier:`Section button placeholder (\`<span class="${this.sectionButtonClass}">\`)`});const o=document.createElement("button");o.setAttribute("type","button"),o.setAttribute("aria-controls",`${this.$module.id}-content-${e+1}`);for(const d of Array.from(n.attributes))"id"!==d.nodeName&&o.setAttribute(d.nodeName,`${d.nodeValue}`);const r=document.createElement("span");r.classList.add(this.sectionHeadingTextClass),r.id=n.id;const a=document.createElement("span");a.classList.add(this.sectionHeadingTextFocusClass),r.appendChild(a),a.innerHTML=n.innerHTML;const l=document.createElement("span");l.classList.add(this.sectionShowHideToggleClass),l.setAttribute("data-nosnippet","");const c=document.createElement("span");c.classList.add(this.sectionShowHideToggleFocusClass),l.appendChild(c);const h=document.createElement("span"),u=document.createElement("span");if(u.classList.add(this.upChevronIconClass),c.appendChild(u),h.classList.add(this.sectionShowHideTextClass),c.appendChild(h),o.appendChild(r),o.appendChild(this.getButtonPunctuationEl()),null!=s&&s.parentNode){const t=document.createElement("span"),e=document.createElement("span");e.classList.add(this.sectionSummaryFocusClass),t.appendChild(e);for(const n of Array.from(s.attributes))t.setAttribute(n.nodeName,`${n.nodeValue}`);e.innerHTML=s.innerHTML,s.parentNode.replaceChild(t,s),o.appendChild(t),o.appendChild(this.getButtonPunctuationEl())}o.appendChild(l),i.removeChild(n),i.appendChild(o)}onBeforeMatch(t){const e=t.target;if(!(e instanceof Element))return;const n=e.closest(`.${this.sectionClass}`);n&&this.setExpanded(!0,n)}onSectionToggle(t){const e=this.isExpanded(t);this.setExpanded(!e,t),this.storeState(t)}onShowOrHideAllToggle(){const t=!this.checkIfAllSectionsOpen();this.$sections.forEach((e=>{this.setExpanded(t,e),this.storeState(e)})),this.updateShowAllButton(t)}setExpanded(t,e){const n=e.querySelector(`.${this.upChevronIconClass}`),i=e.querySelector(`.${this.sectionShowHideTextClass}`),s=e.querySelector(`.${this.sectionButtonClass}`),o=e.querySelector(`.${this.sectionContentClass}`);if(!o)throw new ElementError({componentName:"Accordion",identifier:`Section content (\`<div class="${this.sectionContentClass}">\`)`});if(!n||!i||!s)return;const r=t?this.i18n.t("hideSection"):this.i18n.t("showSection");i.textContent=r,s.setAttribute("aria-expanded",`${t}`);const a=[],l=e.querySelector(`.${this.sectionHeadingTextClass}`);l&&a.push(`${l.textContent}`.trim());const c=e.querySelector(`.${this.sectionSummaryClass}`);c&&a.push(`${c.textContent}`.trim());const h=t?this.i18n.t("hideSectionAriaLabel"):this.i18n.t("showSectionAriaLabel");a.push(h),s.setAttribute("aria-label",a.join(" , ")),t?(o.removeAttribute("hidden"),e.classList.add(this.sectionExpandedClass),n.classList.remove(this.downChevronIconClass)):(o.setAttribute("hidden","until-found"),e.classList.remove(this.sectionExpandedClass),n.classList.add(this.downChevronIconClass));const u=this.checkIfAllSectionsOpen();this.updateShowAllButton(u)}isExpanded(t){return t.classList.contains(this.sectionExpandedClass)}checkIfAllSectionsOpen(){return this.$sections.length===this.$module.querySelectorAll(`.${this.sectionExpandedClass}`).length}updateShowAllButton(t){this.$showAllButton&&this.$showAllText&&this.$showAllIcon&&(this.$showAllButton.setAttribute("aria-expanded",t.toString()),this.$showAllText.textContent=t?this.i18n.t("hideAllSections"):this.i18n.t("showAllSections"),this.$showAllIcon.classList.toggle(this.downChevronIconClass,!t))}storeState(t){if(this.browserSupportsSessionStorage&&this.config.rememberExpanded){const e=t.querySelector(`.${this.sectionButtonClass}`);if(e){const t=e.getAttribute("aria-controls"),n=e.getAttribute("aria-expanded");t&&n&&window.sessionStorage.setItem(t,n)}}}setInitialState(t){if(this.browserSupportsSessionStorage&&this.config.rememberExpanded){const e=t.querySelector(`.${this.sectionButtonClass}`);if(e){const n=e.getAttribute("aria-controls"),i=n?window.sessionStorage.getItem(n):null;null!==i&&this.setExpanded("true"===i,t)}}}getButtonPunctuationEl(){const t=document.createElement("span");return t.classList.add("govuk-visually-hidden",this.sectionHeadingDividerClass),t.innerHTML=", ",t}}Accordion.moduleName="govuk-accordion",Accordion.defaults=Object.freeze({i18n:{hideAllSections:"Hide all sections",hideSection:"Hide",hideSectionAriaLabel:"Hide this section",showAllSections:"Show all sections",showSection:"Show",showSectionAriaLabel:"Show this section"},rememberExpanded:!0});const t={checkForSessionStorage:function(){const t="this is the test string";let e;try{return window.sessionStorage.setItem(t,t),e=window.sessionStorage.getItem(t)===t.toString(),window.sessionStorage.removeItem(t),e}catch(n){return!1}}};class Button extends GOVUKFrontendComponent{constructor(t,e={}){if(super(),this.$module=void 0,this.config=void 0,this.debounceFormSubmitTimer=null,!(t instanceof HTMLElement))throw new ElementError({componentName:"Button",element:t,identifier:"Root element (`$module`)"});this.$module=t,this.config=mergeConfigs(Button.defaults,e,normaliseDataset(t.dataset)),this.$module.addEventListener("keydown",(t=>this.handleKeyDown(t))),this.$module.addEventListener("click",(t=>this.debounce(t)))}handleKeyDown(t){const e=t.target;32===t.keyCode&&e instanceof HTMLElement&&"button"===e.getAttribute("role")&&(t.preventDefault(),e.click())}debounce(t){if(this.config.preventDoubleClick)return this.debounceFormSubmitTimer?(t.preventDefault(),!1):void(this.debounceFormSubmitTimer=window.setTimeout((()=>{this.debounceFormSubmitTimer=null}),1e3))}}function closestAttributeValue(t,e){const n=t.closest(`[${e}]`);return n?n.getAttribute(e):null}Button.moduleName="govuk-button",Button.defaults=Object.freeze({preventDoubleClick:!1});class CharacterCount extends GOVUKFrontendComponent{constructor(t,e={}){var n,i;if(super(),this.$module=void 0,this.$textarea=void 0,this.$visibleCountMessage=void 0,this.$screenReaderCountMessage=void 0,this.lastInputTimestamp=null,this.lastInputValue="",this.valueChecker=null,this.config=void 0,this.i18n=void 0,this.maxLength=void 0,!(t instanceof HTMLElement))throw new ElementError({componentName:"Character count",element:t,identifier:"Root element (`$module`)"});const s=t.querySelector(".govuk-js-character-count");if(!(s instanceof HTMLTextAreaElement||s instanceof HTMLInputElement))throw new ElementError({componentName:"Character count",element:s,expectedType:"HTMLTextareaElement or HTMLInputElement",identifier:"Form field (`.govuk-js-character-count`)"});const o=normaliseDataset(t.dataset);let r={};("maxwords"in o||"maxlength"in o)&&(r={maxlength:void 0,maxwords:void 0}),this.config=mergeConfigs(CharacterCount.defaults,e,r,o);const a=function(t,e){const n=[];for(const[i,s]of Object.entries(t)){const t=[];for(const{required:n,errorMessage:i}of s)n.every((t=>!!e[t]))||t.push(i);"anyOf"!==i||s.length-t.length>=1||n.push(...t)}return n}(CharacterCount.schema,this.config);if(a[0])throw new ConfigError(`Character count: ${a[0]}`);this.i18n=new I18n(extractConfigByNamespace(this.config,"i18n"),{locale:closestAttributeValue(t,"lang")}),this.maxLength=null!=(n=null!=(i=this.config.maxwords)?i:this.config.maxlength)?n:1/0,this.$module=t,this.$textarea=s;const l=`${this.$textarea.id}-info`,c=document.getElementById(l);if(!c)throw new ElementError({componentName:"Character count",element:c,identifier:`Count message (\`id="${l}"\`)`});`${c.textContent}`.match(/^\s*$/)&&(c.textContent=this.i18n.t("textareaDescription",{count:this.maxLength})),this.$textarea.insertAdjacentElement("afterend",c);const h=document.createElement("div");h.className="govuk-character-count__sr-status govuk-visually-hidden",h.setAttribute("aria-live","polite"),this.$screenReaderCountMessage=h,c.insertAdjacentElement("afterend",h);const u=document.createElement("div");u.className=c.className,u.classList.add("govuk-character-count__status"),u.setAttribute("aria-hidden","true"),this.$visibleCountMessage=u,c.insertAdjacentElement("afterend",u),c.classList.add("govuk-visually-hidden"),this.$textarea.removeAttribute("maxlength"),this.bindChangeEvents(),window.addEventListener("pageshow",(()=>this.updateCountMessage())),this.updateCountMessage()}bindChangeEvents(){this.$textarea.addEventListener("keyup",(()=>this.handleKeyUp())),this.$textarea.addEventListener("focus",(()=>this.handleFocus())),this.$textarea.addEventListener("blur",(()=>this.handleBlur()))}handleKeyUp(){this.updateVisibleCountMessage(),this.lastInputTimestamp=Date.now()}handleFocus(){this.valueChecker=window.setInterval((()=>{(!this.lastInputTimestamp||Date.now()-500>=this.lastInputTimestamp)&&this.updateIfValueChanged()}),1e3)}handleBlur(){this.valueChecker&&window.clearInterval(this.valueChecker)}updateIfValueChanged(){this.$textarea.value!==this.lastInputValue&&(this.lastInputValue=this.$textarea.value,this.updateCountMessage())}updateCountMessage(){this.updateVisibleCountMessage(),this.updateScreenReaderCountMessage()}updateVisibleCountMessage(){const t=this.maxLength-this.count(this.$textarea.value)<0;this.$visibleCountMessage.classList.toggle("govuk-character-count__message--disabled",!this.isOverThreshold()),this.$textarea.classList.toggle("govuk-textarea--error",t),this.$visibleCountMessage.classList.toggle("govuk-error-message",t),this.$visibleCountMessage.classList.toggle("govuk-hint",!t),this.$visibleCountMessage.textContent=this.getCountMessage()}updateScreenReaderCountMessage(){this.isOverThreshold()?this.$screenReaderCountMessage.removeAttribute("aria-hidden"):this.$screenReaderCountMessage.setAttribute("aria-hidden","true"),this.$screenReaderCountMessage.textContent=this.getCountMessage()}count(t){if(this.config.maxwords){var e;return(null!=(e=t.match(/\S+/g))?e:[]).length}return t.length}getCountMessage(){const t=this.maxLength-this.count(this.$textarea.value),e=this.config.maxwords?"words":"characters";return this.formatCountMessage(t,e)}formatCountMessage(t,e){if(0===t)return this.i18n.t(`${e}AtLimit`);const n=t<0?"OverLimit":"UnderLimit";return this.i18n.t(`${e}${n}`,{count:Math.abs(t)})}isOverThreshold(){if(!this.config.threshold)return!0;const t=this.count(this.$textarea.value);return this.maxLength*this.config.threshold/100<=t}}CharacterCount.moduleName="govuk-character-count",CharacterCount.defaults=Object.freeze({threshold:0,i18n:{charactersUnderLimit:{one:"You have %{count} character remaining",other:"You have %{count} characters remaining"},charactersAtLimit:"You have 0 characters remaining",charactersOverLimit:{one:"You have %{count} character too many",other:"You have %{count} characters too many"},wordsUnderLimit:{one:"You have %{count} word remaining",other:"You have %{count} words remaining"},wordsAtLimit:"You have 0 words remaining",wordsOverLimit:{one:"You have %{count} word too many",other:"You have %{count} words too many"},textareaDescription:{other:""}}}),CharacterCount.schema=Object.freeze({anyOf:[{required:["maxwords"],errorMessage:'Either "maxlength" or "maxwords" must be provided'},{required:["maxlength"],errorMessage:'Either "maxlength" or "maxwords" must be provided'}]});class Checkboxes extends GOVUKFrontendComponent{constructor(t){if(super(),this.$module=void 0,this.$inputs=void 0,!(t instanceof HTMLElement))throw new ElementError({componentName:"Checkboxes",element:t,identifier:"Root element (`$module`)"});const e=t.querySelectorAll('input[type="checkbox"]');if(!e.length)throw new ElementError({componentName:"Checkboxes",identifier:'Form inputs (`<input type="checkbox">`)'});this.$module=t,this.$inputs=e,this.$inputs.forEach((t=>{const e=t.getAttribute("data-aria-controls");if(e){if(!document.getElementById(e))throw new ElementError({componentName:"Checkboxes",identifier:`Conditional reveal (\`id="${e}"\`)`});t.setAttribute("aria-controls",e),t.removeAttribute("data-aria-controls")}})),window.addEventListener("pageshow",(()=>this.syncAllConditionalReveals())),this.syncAllConditionalReveals(),this.$module.addEventListener("click",(t=>this.handleClick(t)))}syncAllConditionalReveals(){this.$inputs.forEach((t=>this.syncConditionalRevealWithInputState(t)))}syncConditionalRevealWithInputState(t){const e=t.getAttribute("aria-controls");if(!e)return;const n=document.getElementById(e);if(n&&n.classList.contains("govuk-checkboxes__conditional")){const e=t.checked;t.setAttribute("aria-expanded",e.toString()),n.classList.toggle("govuk-checkboxes__conditional--hidden",!e)}}unCheckAllInputsExcept(t){document.querySelectorAll(`input[type="checkbox"][name="${t.name}"]`).forEach((e=>{t.form===e.form&&e!==t&&(e.checked=!1,this.syncConditionalRevealWithInputState(e))}))}unCheckExclusiveInputs(t){document.querySelectorAll(`input[data-behaviour="exclusive"][type="checkbox"][name="${t.name}"]`).forEach((e=>{t.form===e.form&&(e.checked=!1,this.syncConditionalRevealWithInputState(e))}))}handleClick(t){const e=t.target;if(!(e instanceof HTMLInputElement)||"checkbox"!==e.type)return;if(e.getAttribute("aria-controls")&&this.syncConditionalRevealWithInputState(e),!e.checked)return;"exclusive"===e.getAttribute("data-behaviour")?this.unCheckAllInputsExcept(e):this.unCheckExclusiveInputs(e)}}Checkboxes.moduleName="govuk-checkboxes";class ErrorSummary extends GOVUKFrontendComponent{constructor(t,e={}){if(super(),this.$module=void 0,this.config=void 0,!(t instanceof HTMLElement))throw new ElementError({componentName:"Error summary",element:t,identifier:"Root element (`$module`)"});this.$module=t,this.config=mergeConfigs(ErrorSummary.defaults,e,normaliseDataset(t.dataset)),this.config.disableAutoFocus||setFocus(this.$module),this.$module.addEventListener("click",(t=>this.handleClick(t)))}handleClick(t){const e=t.target;e&&this.focusTarget(e)&&t.preventDefault()}focusTarget(t){if(!(t instanceof HTMLAnchorElement))return!1;const e=getFragmentFromUrl(t.href);if(!e)return!1;const n=document.getElementById(e);if(!n)return!1;const i=this.getAssociatedLegendOrLabel(n);return!!i&&(i.scrollIntoView(),n.focus({preventScroll:!0}),!0)}getAssociatedLegendOrLabel(t){var e;const n=t.closest("fieldset");if(n){const e=n.getElementsByTagName("legend");if(e.length){const n=e[0];if(t instanceof HTMLInputElement&&("checkbox"===t.type||"radio"===t.type))return n;const i=n.getBoundingClientRect().top,s=t.getBoundingClientRect();if(s.height&&window.innerHeight){if(s.top+s.height-i<window.innerHeight/2)return n}}}return null!=(e=document.querySelector(`label[for='${t.getAttribute("id")}']`))?e:t.closest("label")}}ErrorSummary.moduleName="govuk-error-summary",ErrorSummary.defaults=Object.freeze({disableAutoFocus:!1});class ExitThisPage extends GOVUKFrontendComponent{constructor(t,e={}){if(super(),this.$module=void 0,this.config=void 0,this.i18n=void 0,this.$button=void 0,this.$skiplinkButton=null,this.$updateSpan=null,this.$indicatorContainer=null,this.$overlay=null,this.keypressCounter=0,this.lastKeyWasModified=!1,this.timeoutTime=5e3,this.keypressTimeoutId=null,this.timeoutMessageId=null,!(t instanceof HTMLElement))throw new ElementError({componentName:"Exit this page",element:t,identifier:"Root element (`$module`)"});const n=t.querySelector(".govuk-exit-this-page__button");if(!(n instanceof HTMLAnchorElement))throw new ElementError({componentName:"Exit this page",element:n,expectedType:"HTMLAnchorElement",identifier:"Button (`.govuk-exit-this-page__button`)"});this.config=mergeConfigs(ExitThisPage.defaults,e,normaliseDataset(t.dataset)),this.i18n=new I18n(extractConfigByNamespace(this.config,"i18n")),this.$module=t,this.$button=n;const i=document.querySelector(".govuk-js-exit-this-page-skiplink");i instanceof HTMLAnchorElement&&(this.$skiplinkButton=i),this.buildIndicator(),this.initUpdateSpan(),this.initButtonClickHandler(),"govukFrontendExitThisPageKeypress"in document.body.dataset||(document.addEventListener("keyup",this.handleKeypress.bind(this),!0),document.body.dataset.govukFrontendExitThisPageKeypress="true"),window.addEventListener("pageshow",this.resetPage.bind(this))}initUpdateSpan(){this.$updateSpan=document.createElement("span"),this.$updateSpan.setAttribute("role","status"),this.$updateSpan.className="govuk-visually-hidden",this.$module.appendChild(this.$updateSpan)}initButtonClickHandler(){this.$button.addEventListener("click",this.handleClick.bind(this)),this.$skiplinkButton&&this.$skiplinkButton.addEventListener("click",this.handleClick.bind(this))}buildIndicator(){this.$indicatorContainer=document.createElement("div"),this.$indicatorContainer.className="govuk-exit-this-page__indicator",this.$indicatorContainer.setAttribute("aria-hidden","true");for(let t=0;t<3;t++){const t=document.createElement("div");t.className="govuk-exit-this-page__indicator-light",this.$indicatorContainer.appendChild(t)}this.$button.appendChild(this.$indicatorContainer)}updateIndicator(){if(!this.$indicatorContainer)return;this.$indicatorContainer.classList.toggle("govuk-exit-this-page__indicator--visible",this.keypressCounter>0);this.$indicatorContainer.querySelectorAll(".govuk-exit-this-page__indicator-light").forEach(((t,e)=>{t.classList.toggle("govuk-exit-this-page__indicator-light--on",e<this.keypressCounter)}))}exitPage(){this.$updateSpan&&(this.$updateSpan.textContent="",document.body.classList.add("govuk-exit-this-page-hide-content"),this.$overlay=document.createElement("div"),this.$overlay.className="govuk-exit-this-page-overlay",this.$overlay.setAttribute("role","alert"),document.body.appendChild(this.$overlay),this.$overlay.textContent=this.i18n.t("activated"),window.location.href=this.$button.href)}handleClick(t){t.preventDefault(),this.exitPage()}handleKeypress(t){this.$updateSpan&&("Shift"!==t.key&&16!==t.keyCode&&16!==t.which||this.lastKeyWasModified?this.keypressTimeoutId&&this.resetKeypressTimer():(this.keypressCounter+=1,this.updateIndicator(),this.timeoutMessageId&&(window.clearTimeout(this.timeoutMessageId),this.timeoutMessageId=null),this.keypressCounter>=3?(this.keypressCounter=0,this.keypressTimeoutId&&(window.clearTimeout(this.keypressTimeoutId),this.keypressTimeoutId=null),this.exitPage()):1===this.keypressCounter?this.$updateSpan.textContent=this.i18n.t("pressTwoMoreTimes"):this.$updateSpan.textContent=this.i18n.t("pressOneMoreTime"),this.setKeypressTimer()),this.lastKeyWasModified=t.shiftKey)}setKeypressTimer(){this.keypressTimeoutId&&window.clearTimeout(this.keypressTimeoutId),this.keypressTimeoutId=window.setTimeout(this.resetKeypressTimer.bind(this),this.timeoutTime)}resetKeypressTimer(){if(!this.$updateSpan)return;this.keypressTimeoutId&&(window.clearTimeout(this.keypressTimeoutId),this.keypressTimeoutId=null);const t=this.$updateSpan;this.keypressCounter=0,t.textContent=this.i18n.t("timedOut"),this.timeoutMessageId=window.setTimeout((()=>{t.textContent=""}),this.timeoutTime),this.updateIndicator()}resetPage(){document.body.classList.remove("govuk-exit-this-page-hide-content"),this.$overlay&&(this.$overlay.remove(),this.$overlay=null),this.$updateSpan&&(this.$updateSpan.setAttribute("role","status"),this.$updateSpan.textContent=""),this.updateIndicator(),this.keypressTimeoutId&&window.clearTimeout(this.keypressTimeoutId),this.timeoutMessageId&&window.clearTimeout(this.timeoutMessageId)}}ExitThisPage.moduleName="govuk-exit-this-page",ExitThisPage.defaults=Object.freeze({i18n:{activated:"Loading.",timedOut:"Exit this page expired.",pressTwoMoreTimes:"Shift, press 2 more times to exit.",pressOneMoreTime:"Shift, press 1 more time to exit."}});class Header extends GOVUKFrontendComponent{constructor(t){if(super(),this.$module=void 0,this.$menuButton=void 0,this.$menu=void 0,this.menuIsOpen=!1,this.mql=null,!t)throw new ElementError({componentName:"Header",element:t,identifier:"Root element (`$module`)"});this.$module=t;const e=t.querySelector(".govuk-js-header-toggle");if(!e)return this;const n=e.getAttribute("aria-controls");if(!n)throw new ElementError({componentName:"Header",identifier:'Navigation button (`<button class="govuk-js-header-toggle">`) attribute (`aria-controls`)'});const i=document.getElementById(n);if(!i)throw new ElementError({componentName:"Header",element:i,identifier:`Navigation (\`<ul id="${n}">\`)`});this.$menu=i,this.$menuButton=e,this.setupResponsiveChecks(),this.$menuButton.addEventListener("click",(()=>this.handleMenuButtonClick()))}setupResponsiveChecks(){const t=getBreakpoint("desktop");if(!t.value)throw new ElementError({componentName:"Header",identifier:`CSS custom property (\`${t.property}\`) on pseudo-class \`:root\``});this.mql=window.matchMedia(`(min-width: ${t.value})`),"addEventListener"in this.mql?this.mql.addEventListener("change",(()=>this.checkMode())):this.mql.addListener((()=>this.checkMode())),this.checkMode()}checkMode(){this.mql&&this.$menu&&this.$menuButton&&(this.mql.matches?(this.$menu.removeAttribute("hidden"),this.$menuButton.setAttribute("hidden","")):(this.$menuButton.removeAttribute("hidden"),this.$menuButton.setAttribute("aria-expanded",this.menuIsOpen.toString()),this.menuIsOpen?this.$menu.removeAttribute("hidden"):this.$menu.setAttribute("hidden","")))}handleMenuButtonClick(){this.menuIsOpen=!this.menuIsOpen,this.checkMode()}}Header.moduleName="govuk-header";class NotificationBanner extends GOVUKFrontendComponent{constructor(t,e={}){if(super(),this.$module=void 0,this.config=void 0,!(t instanceof HTMLElement))throw new ElementError({componentName:"Notification banner",element:t,identifier:"Root element (`$module`)"});this.$module=t,this.config=mergeConfigs(NotificationBanner.defaults,e,normaliseDataset(t.dataset)),"alert"!==this.$module.getAttribute("role")||this.config.disableAutoFocus||setFocus(this.$module)}}NotificationBanner.moduleName="govuk-notification-banner",NotificationBanner.defaults=Object.freeze({disableAutoFocus:!1});class Radios extends GOVUKFrontendComponent{constructor(t){if(super(),this.$module=void 0,this.$inputs=void 0,!(t instanceof HTMLElement))throw new ElementError({componentName:"Radios",element:t,identifier:"Root element (`$module`)"});const e=t.querySelectorAll('input[type="radio"]');if(!e.length)throw new ElementError({componentName:"Radios",identifier:'Form inputs (`<input type="radio">`)'});this.$module=t,this.$inputs=e,this.$inputs.forEach((t=>{const e=t.getAttribute("data-aria-controls");if(e){if(!document.getElementById(e))throw new ElementError({componentName:"Radios",identifier:`Conditional reveal (\`id="${e}"\`)`});t.setAttribute("aria-controls",e),t.removeAttribute("data-aria-controls")}})),window.addEventListener("pageshow",(()=>this.syncAllConditionalReveals())),this.syncAllConditionalReveals(),this.$module.addEventListener("click",(t=>this.handleClick(t)))}syncAllConditionalReveals(){this.$inputs.forEach((t=>this.syncConditionalRevealWithInputState(t)))}syncConditionalRevealWithInputState(t){const e=t.getAttribute("aria-controls");if(!e)return;const n=document.getElementById(e);if(null!=n&&n.classList.contains("govuk-radios__conditional")){const e=t.checked;t.setAttribute("aria-expanded",e.toString()),n.classList.toggle("govuk-radios__conditional--hidden",!e)}}handleClick(t){const e=t.target;if(!(e instanceof HTMLInputElement)||"radio"!==e.type)return;const n=document.querySelectorAll('input[type="radio"][aria-controls]'),i=e.form,s=e.name;n.forEach((t=>{const e=t.form===i;t.name===s&&e&&this.syncConditionalRevealWithInputState(t)}))}}Radios.moduleName="govuk-radios";class SkipLink extends GOVUKFrontendComponent{constructor(t){var e;if(super(),this.$module=void 0,!(t instanceof HTMLAnchorElement))throw new ElementError({componentName:"Skip link",element:t,expectedType:"HTMLAnchorElement",identifier:"Root element (`$module`)"});this.$module=t;const n=this.$module.hash,i=null!=(e=this.$module.getAttribute("href"))?e:"";let s;try{s=new window.URL(this.$module.href)}catch(a){throw new ElementError(`Skip link: Target link (\`href="${i}"\`) is invalid`)}if(s.origin!==window.location.origin||s.pathname!==window.location.pathname)return;const o=getFragmentFromUrl(n);if(!o)throw new ElementError(`Skip link: Target link (\`href="${i}"\`) has no hash fragment`);const r=document.getElementById(o);if(!r)throw new ElementError({componentName:"Skip link",element:r,identifier:`Target content (\`id="${o}"\`)`});this.$module.addEventListener("click",(()=>setFocus(r,{onBeforeFocus(){r.classList.add("govuk-skip-link-focused-element")},onBlur(){r.classList.remove("govuk-skip-link-focused-element")}})))}}SkipLink.moduleName="govuk-skip-link";class Tabs extends GOVUKFrontendComponent{constructor(t){if(super(),this.$module=void 0,this.$tabs=void 0,this.$tabList=void 0,this.$tabListItems=void 0,this.keys={left:37,right:39,up:38,down:40},this.jsHiddenClass="govuk-tabs__panel--hidden",this.changingHash=!1,this.boundTabClick=void 0,this.boundTabKeydown=void 0,this.boundOnHashChange=void 0,this.mql=null,!t)throw new ElementError({componentName:"Tabs",element:t,identifier:"Root element (`$module`)"});const e=t.querySelectorAll("a.govuk-tabs__tab");if(!e.length)throw new ElementError({componentName:"Tabs",identifier:'Links (`<a class="govuk-tabs__tab">`)'});this.$module=t,this.$tabs=e,this.boundTabClick=this.onTabClick.bind(this),this.boundTabKeydown=this.onTabKeydown.bind(this),this.boundOnHashChange=this.onHashChange.bind(this);const n=this.$module.querySelector(".govuk-tabs__list"),i=this.$module.querySelectorAll("li.govuk-tabs__list-item");if(!n)throw new ElementError({componentName:"Tabs",identifier:'List (`<ul class="govuk-tabs__list">`)'});if(!i.length)throw new ElementError({componentName:"Tabs",identifier:'List items (`<li class="govuk-tabs__list-item">`)'});this.$tabList=n,this.$tabListItems=i,this.setupResponsiveChecks()}setupResponsiveChecks(){const t=getBreakpoint("tablet");if(!t.value)throw new ElementError({componentName:"Tabs",identifier:`CSS custom property (\`${t.property}\`) on pseudo-class \`:root\``});this.mql=window.matchMedia(`(min-width: ${t.value})`),"addEventListener"in this.mql?this.mql.addEventListener("change",(()=>this.checkMode())):this.mql.addListener((()=>this.checkMode())),this.checkMode()}checkMode(){var t;null!=(t=this.mql)&&t.matches?this.setup():this.teardown()}setup(){var t;this.$tabList.setAttribute("role","tablist"),this.$tabListItems.forEach((t=>{t.setAttribute("role","presentation")})),this.$tabs.forEach((t=>{this.setAttributes(t),t.addEventListener("click",this.boundTabClick,!0),t.addEventListener("keydown",this.boundTabKeydown,!0),this.hideTab(t)}));const e=null!=(t=this.getTab(window.location.hash))?t:this.$tabs[0];this.showTab(e),window.addEventListener("hashchange",this.boundOnHashChange,!0)}teardown(){this.$tabList.removeAttribute("role"),this.$tabListItems.forEach((t=>{t.removeAttribute("role")})),this.$tabs.forEach((t=>{t.removeEventListener("click",this.boundTabClick,!0),t.removeEventListener("keydown",this.boundTabKeydown,!0),this.unsetAttributes(t)})),window.removeEventListener("hashchange",this.boundOnHashChange,!0)}onHashChange(){const t=window.location.hash,e=this.getTab(t);if(!e)return;if(this.changingHash)return void(this.changingHash=!1);const n=this.getCurrentTab();n&&(this.hideTab(n),this.showTab(e),e.focus())}hideTab(t){this.unhighlightTab(t),this.hidePanel(t)}showTab(t){this.highlightTab(t),this.showPanel(t)}getTab(t){return this.$module.querySelector(`a.govuk-tabs__tab[href="${t}"]`)}setAttributes(t){const e=getFragmentFromUrl(t.href);if(!e)return;t.setAttribute("id",`tab_${e}`),t.setAttribute("role","tab"),t.setAttribute("aria-controls",e),t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");const n=this.getPanel(t);n&&(n.setAttribute("role","tabpanel"),n.setAttribute("aria-labelledby",t.id),n.classList.add(this.jsHiddenClass))}unsetAttributes(t){t.removeAttribute("id"),t.removeAttribute("role"),t.removeAttribute("aria-controls"),t.removeAttribute("aria-selected"),t.removeAttribute("tabindex");const e=this.getPanel(t);e&&(e.removeAttribute("role"),e.removeAttribute("aria-labelledby"),e.classList.remove(this.jsHiddenClass))}onTabClick(t){const e=this.getCurrentTab(),n=t.currentTarget;e&&n instanceof HTMLAnchorElement&&(t.preventDefault(),this.hideTab(e),this.showTab(n),this.createHistoryEntry(n))}createHistoryEntry(t){const e=this.getPanel(t);if(!e)return;const n=e.id;e.id="",this.changingHash=!0,window.location.hash=n,e.id=n}onTabKeydown(t){switch(t.keyCode){case this.keys.left:case this.keys.up:this.activatePreviousTab(),t.preventDefault();break;case this.keys.right:case this.keys.down:this.activateNextTab(),t.preventDefault()}}activateNextTab(){const t=this.getCurrentTab();if(null==t||!t.parentElement)return;const e=t.parentElement.nextElementSibling;if(!e)return;const n=e.querySelector("a.govuk-tabs__tab");n&&(this.hideTab(t),this.showTab(n),n.focus(),this.createHistoryEntry(n))}activatePreviousTab(){const t=this.getCurrentTab();if(null==t||!t.parentElement)return;const e=t.parentElement.previousElementSibling;if(!e)return;const n=e.querySelector("a.govuk-tabs__tab");n&&(this.hideTab(t),this.showTab(n),n.focus(),this.createHistoryEntry(n))}getPanel(t){const e=getFragmentFromUrl(t.href);return e?this.$module.querySelector(`#${e}`):null}showPanel(t){const e=this.getPanel(t);e&&e.classList.remove(this.jsHiddenClass)}hidePanel(t){const e=this.getPanel(t);e&&e.classList.add(this.jsHiddenClass)}unhighlightTab(t){t.parentElement&&(t.setAttribute("aria-selected","false"),t.parentElement.classList.remove("govuk-tabs__list-item--selected"),t.setAttribute("tabindex","-1"))}highlightTab(t){t.parentElement&&(t.setAttribute("aria-selected","true"),t.parentElement.classList.add("govuk-tabs__list-item--selected"),t.setAttribute("tabindex","0"))}getCurrentTab(){return this.$module.querySelector(".govuk-tabs__list-item--selected a.govuk-tabs__tab")}}function initAll(t){var e;if(t=void 0!==t?t:{},!isSupported())return void console.log(new SupportError);const n=[[Accordion,t.accordion],[Button,t.button],[CharacterCount,t.characterCount],[Checkboxes],[ErrorSummary,t.errorSummary],[ExitThisPage,t.exitThisPage],[Header],[NotificationBanner,t.notificationBanner],[Radios],[SkipLink],[Tabs]],i=null!=(e=t.scope)?e:document;n.forEach((([t,e])=>{i.querySelectorAll(`[data-module="${t.moduleName}"]`).forEach((n=>{try{"defaults"in t?new t(n,e):new t(n)}catch(i){console.log(i)}}))}))}Tabs.moduleName="govuk-tabs";export{Accordion,Button,CharacterCount,Checkboxes,ErrorSummary,ExitThisPage,Header,NotificationBanner,Radios,SkipLink,Tabs,initAll,version};//# sourceMappingURL=govuk-frontend.min.js.map
const version="5.3.0";function normaliseString(e,t){const s=e?e.trim():"";let n,i=null==t?void 0:t.type;switch(i||(["true","false"].includes(s)&&(i="boolean"),s.length>0&&isFinite(Number(s))&&(i="number")),i){case"boolean":n="true"===s;break;case"number":n=Number(s);break;default:n=e}return n}function mergeConfigs(...e){const t={};for(const s of e)for(const e of Object.keys(s)){const n=t[e],i=s[e];isObject(n)&&isObject(i)?t[e]=mergeConfigs(n,i):t[e]=i}return t}function extractConfigByNamespace(e,t,s){const n=e.schema.properties[s];if("object"!==(null==n?void 0:n.type))return;const i={[s]:{}};for(const[o,r]of Object.entries(t)){let e=i;const t=o.split(".");for(const[n,i]of t.entries())"object"==typeof e&&(n<t.length-1?(isObject(e[i])||(e[i]={}),e=e[i]):o!==s&&(e[i]=normaliseString(r)))}return i[s]}function getFragmentFromUrl(e){if(e.includes("#"))return e.split("#").pop()}function getBreakpoint(e){const t=`--govuk-frontend-breakpoint-${e}`;return{property:t,value:window.getComputedStyle(document.documentElement).getPropertyValue(t)||void 0}}function setFocus(e,t={}){var s;const n=e.getAttribute("tabindex");function onBlur(){var s;null==(s=t.onBlur)||s.call(e),n||e.removeAttribute("tabindex")}n||e.setAttribute("tabindex","-1"),e.addEventListener("focus",(function(){e.addEventListener("blur",onBlur,{once:!0})}),{once:!0}),null==(s=t.onBeforeFocus)||s.call(e),e.focus()}function isSupported(e=document.body){return!!e&&e.classList.contains("govuk-frontend-supported")}function isObject(e){return!!e&&"object"==typeof e&&!function(e){return Array.isArray(e)}(e)}function normaliseDataset(e,t){const s={};for(const[n,i]of Object.entries(e.schema.properties))n in t&&(s[n]=normaliseString(t[n],i)),"object"===(null==i?void 0:i.type)&&(s[n]=extractConfigByNamespace(e,t,n));return s}class GOVUKFrontendError extends Error{constructor(...e){super(...e),this.name="GOVUKFrontendError"}}class SupportError extends GOVUKFrontendError{constructor(e=document.body){const t="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";super(e?t:'GOV.UK Frontend initialised without `<script type="module">`'),this.name="SupportError"}}class ConfigError extends GOVUKFrontendError{constructor(...e){super(...e),this.name="ConfigError"}}class ElementError extends GOVUKFrontendError{constructor(e){let t="string"==typeof e?e:"";if("object"==typeof e){const{componentName:s,identifier:n,element:i,expectedType:o}=e;t=`${s}: ${n}`,t+=i?` is not of type ${null!=o?o:"HTMLElement"}`:" not found"}super(t),this.name="ElementError"}}class GOVUKFrontendComponent{constructor(){this.checkSupport()}checkSupport(){if(!isSupported())throw new SupportError}}class I18n{constructor(e={},t={}){var s;this.translations=void 0,this.locale=void 0,this.translations=e,this.locale=null!=(s=t.locale)?s:document.documentElement.lang||"en"}t(e,t){if(!e)throw new Error("i18n: lookup key missing");let s=this.translations[e];if("number"==typeof(null==t?void 0:t.count)&&"object"==typeof s){const n=s[this.getPluralSuffix(e,t.count)];n&&(s=n)}if("string"==typeof s){if(s.match(/%{(.\S+)}/)){if(!t)throw new Error("i18n: cannot replace placeholders in string if no option data provided");return this.replacePlaceholders(s,t)}return s}return e}replacePlaceholders(e,t){const s=Intl.NumberFormat.supportedLocalesOf(this.locale).length?new Intl.NumberFormat(this.locale):void 0;return e.replace(/%{(.\S+)}/g,(function(e,n){if(Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];return!1===e||"number"!=typeof e&&"string"!=typeof e?"":"number"==typeof e?s?s.format(e):`${e}`:e}throw new Error(`i18n: no data found to replace ${e} placeholder in string`)}))}hasIntlPluralRulesSupport(){return Boolean("PluralRules"in window.Intl&&Intl.PluralRules.supportedLocalesOf(this.locale).length)}getPluralSuffix(e,t){if(t=Number(t),!isFinite(t))return"other";const s=this.translations[e],n=this.hasIntlPluralRulesSupport()?new Intl.PluralRules(this.locale).select(t):this.selectPluralFormUsingFallbackRules(t);if("object"==typeof s){if(n in s)return n;if("other"in s)return console.warn(`i18n: Missing plural form ".${n}" for "${this.locale}" locale. Falling back to ".other".`),"other"}throw new Error(`i18n: Plural form ".other" is required for "${this.locale}" locale`)}selectPluralFormUsingFallbackRules(e){e=Math.abs(Math.floor(e));const t=this.getPluralRulesForLocale();return t?I18n.pluralRules[t](e):"other"}getPluralRulesForLocale(){const e=this.locale.split("-")[0];for(const t in I18n.pluralRulesMap){const s=I18n.pluralRulesMap[t];if(s.includes(this.locale)||s.includes(e))return t}}}I18n.pluralRulesMap={arabic:["ar"],chinese:["my","zh","id","ja","jv","ko","ms","th","vi"],french:["hy","bn","fr","gu","hi","fa","pa","zu"],german:["af","sq","az","eu","bg","ca","da","nl","en","et","fi","ka","de","el","hu","lb","no","so","sw","sv","ta","te","tr","ur"],irish:["ga"],russian:["ru","uk"],scottish:["gd"],spanish:["pt-PT","it","es"],welsh:["cy"]},I18n.pluralRules={arabic:e=>0===e?"zero":1===e?"one":2===e?"two":e%100>=3&&e%100<=10?"few":e%100>=11&&e%100<=99?"many":"other",chinese:()=>"other",french:e=>0===e||1===e?"one":"other",german:e=>1===e?"one":"other",irish:e=>1===e?"one":2===e?"two":e>=3&&e<=6?"few":e>=7&&e<=10?"many":"other",russian(e){const t=e%100,s=t%10;return 1===s&&11!==t?"one":s>=2&&s<=4&&!(t>=12&&t<=14)?"few":0===s||s>=5&&s<=9||t>=11&&t<=14?"many":"other"},scottish:e=>1===e||11===e?"one":2===e||12===e?"two":e>=3&&e<=10||e>=13&&e<=19?"few":"other",spanish:e=>1===e?"one":e%1e6==0&&0!==e?"many":"other",welsh:e=>0===e?"zero":1===e?"one":2===e?"two":3===e?"few":6===e?"many":"other"};class Accordion extends GOVUKFrontendComponent{constructor(t,s={}){if(super(),this.$module=void 0,this.config=void 0,this.i18n=void 0,this.controlsClass="govuk-accordion__controls",this.showAllClass="govuk-accordion__show-all",this.showAllTextClass="govuk-accordion__show-all-text",this.sectionClass="govuk-accordion__section",this.sectionExpandedClass="govuk-accordion__section--expanded",this.sectionButtonClass="govuk-accordion__section-button",this.sectionHeaderClass="govuk-accordion__section-header",this.sectionHeadingClass="govuk-accordion__section-heading",this.sectionHeadingDividerClass="govuk-accordion__section-heading-divider",this.sectionHeadingTextClass="govuk-accordion__section-heading-text",this.sectionHeadingTextFocusClass="govuk-accordion__section-heading-text-focus",this.sectionShowHideToggleClass="govuk-accordion__section-toggle",this.sectionShowHideToggleFocusClass="govuk-accordion__section-toggle-focus",this.sectionShowHideTextClass="govuk-accordion__section-toggle-text",this.upChevronIconClass="govuk-accordion-nav__chevron",this.downChevronIconClass="govuk-accordion-nav__chevron--down",this.sectionSummaryClass="govuk-accordion__section-summary",this.sectionSummaryFocusClass="govuk-accordion__section-summary-focus",this.sectionContentClass="govuk-accordion__section-content",this.$sections=void 0,this.browserSupportsSessionStorage=!1,this.$showAllButton=null,this.$showAllIcon=null,this.$showAllText=null,!(t instanceof HTMLElement))throw new ElementError({componentName:"Accordion",element:t,identifier:"Root element (`$module`)"});this.$module=t,this.config=mergeConfigs(Accordion.defaults,s,normaliseDataset(Accordion,t.dataset)),this.i18n=new I18n(this.config.i18n);const n=this.$module.querySelectorAll(`.${this.sectionClass}`);if(!n.length)throw new ElementError({componentName:"Accordion",identifier:`Sections (\`<div class="${this.sectionClass}">\`)`});this.$sections=n,this.browserSupportsSessionStorage=e.checkForSessionStorage(),this.initControls(),this.initSectionHeaders();const i=this.checkIfAllSectionsOpen();this.updateShowAllButton(i)}initControls(){this.$showAllButton=document.createElement("button"),this.$showAllButton.setAttribute("type","button"),this.$showAllButton.setAttribute("class",this.showAllClass),this.$showAllButton.setAttribute("aria-expanded","false"),this.$showAllIcon=document.createElement("span"),this.$showAllIcon.classList.add(this.upChevronIconClass),this.$showAllButton.appendChild(this.$showAllIcon);const e=document.createElement("div");e.setAttribute("class",this.controlsClass),e.appendChild(this.$showAllButton),this.$module.insertBefore(e,this.$module.firstChild),this.$showAllText=document.createElement("span"),this.$showAllText.classList.add(this.showAllTextClass),this.$showAllButton.appendChild(this.$showAllText),this.$showAllButton.addEventListener("click",(()=>this.onShowOrHideAllToggle())),"onbeforematch"in document&&document.addEventListener("beforematch",(e=>this.onBeforeMatch(e)))}initSectionHeaders(){this.$sections.forEach(((e,t)=>{const s=e.querySelector(`.${this.sectionHeaderClass}`);if(!s)throw new ElementError({componentName:"Accordion",identifier:`Section headers (\`<div class="${this.sectionHeaderClass}">\`)`});this.constructHeaderMarkup(s,t),this.setExpanded(this.isExpanded(e),e),s.addEventListener("click",(()=>this.onSectionToggle(e))),this.setInitialState(e)}))}constructHeaderMarkup(e,t){const s=e.querySelector(`.${this.sectionButtonClass}`),n=e.querySelector(`.${this.sectionHeadingClass}`),i=e.querySelector(`.${this.sectionSummaryClass}`);if(!n)throw new ElementError({componentName:"Accordion",identifier:`Section heading (\`.${this.sectionHeadingClass}\`)`});if(!s)throw new ElementError({componentName:"Accordion",identifier:`Section button placeholder (\`<span class="${this.sectionButtonClass}">\`)`});const o=document.createElement("button");o.setAttribute("type","button"),o.setAttribute("aria-controls",`${this.$module.id}-content-${t+1}`);for(const d of Array.from(s.attributes))"id"!==d.nodeName&&o.setAttribute(d.nodeName,`${d.nodeValue}`);const r=document.createElement("span");r.classList.add(this.sectionHeadingTextClass),r.id=s.id;const a=document.createElement("span");a.classList.add(this.sectionHeadingTextFocusClass),r.appendChild(a),a.innerHTML=s.innerHTML;const l=document.createElement("span");l.classList.add(this.sectionShowHideToggleClass),l.setAttribute("data-nosnippet","");const c=document.createElement("span");c.classList.add(this.sectionShowHideToggleFocusClass),l.appendChild(c);const h=document.createElement("span"),u=document.createElement("span");if(u.classList.add(this.upChevronIconClass),c.appendChild(u),h.classList.add(this.sectionShowHideTextClass),c.appendChild(h),o.appendChild(r),o.appendChild(this.getButtonPunctuationEl()),null!=i&&i.parentNode){const e=document.createElement("span"),t=document.createElement("span");t.classList.add(this.sectionSummaryFocusClass),e.appendChild(t);for(const s of Array.from(i.attributes))e.setAttribute(s.nodeName,`${s.nodeValue}`);t.innerHTML=i.innerHTML,i.parentNode.replaceChild(e,i),o.appendChild(e),o.appendChild(this.getButtonPunctuationEl())}o.appendChild(l),n.removeChild(s),n.appendChild(o)}onBeforeMatch(e){const t=e.target;if(!(t instanceof Element))return;const s=t.closest(`.${this.sectionClass}`);s&&this.setExpanded(!0,s)}onSectionToggle(e){const t=this.isExpanded(e);this.setExpanded(!t,e),this.storeState(e)}onShowOrHideAllToggle(){const e=!this.checkIfAllSectionsOpen();this.$sections.forEach((t=>{this.setExpanded(e,t),this.storeState(t)})),this.updateShowAllButton(e)}setExpanded(e,t){const s=t.querySelector(`.${this.upChevronIconClass}`),n=t.querySelector(`.${this.sectionShowHideTextClass}`),i=t.querySelector(`.${this.sectionButtonClass}`),o=t.querySelector(`.${this.sectionContentClass}`);if(!o)throw new ElementError({componentName:"Accordion",identifier:`Section content (\`<div class="${this.sectionContentClass}">\`)`});if(!s||!n||!i)return;const r=e?this.i18n.t("hideSection"):this.i18n.t("showSection");n.textContent=r,i.setAttribute("aria-expanded",`${e}`);const a=[],l=t.querySelector(`.${this.sectionHeadingTextClass}`);l&&a.push(`${l.textContent}`.trim());const c=t.querySelector(`.${this.sectionSummaryClass}`);c&&a.push(`${c.textContent}`.trim());const h=e?this.i18n.t("hideSectionAriaLabel"):this.i18n.t("showSectionAriaLabel");a.push(h),i.setAttribute("aria-label",a.join(" , ")),e?(o.removeAttribute("hidden"),t.classList.add(this.sectionExpandedClass),s.classList.remove(this.downChevronIconClass)):(o.setAttribute("hidden","until-found"),t.classList.remove(this.sectionExpandedClass),s.classList.add(this.downChevronIconClass));const u=this.checkIfAllSectionsOpen();this.updateShowAllButton(u)}isExpanded(e){return e.classList.contains(this.sectionExpandedClass)}checkIfAllSectionsOpen(){return this.$sections.length===this.$module.querySelectorAll(`.${this.sectionExpandedClass}`).length}updateShowAllButton(e){this.$showAllButton&&this.$showAllText&&this.$showAllIcon&&(this.$showAllButton.setAttribute("aria-expanded",e.toString()),this.$showAllText.textContent=e?this.i18n.t("hideAllSections"):this.i18n.t("showAllSections"),this.$showAllIcon.classList.toggle(this.downChevronIconClass,!e))}storeState(e){if(this.browserSupportsSessionStorage&&this.config.rememberExpanded){const t=e.querySelector(`.${this.sectionButtonClass}`);if(t){const e=t.getAttribute("aria-controls"),s=t.getAttribute("aria-expanded");e&&s&&window.sessionStorage.setItem(e,s)}}}setInitialState(e){if(this.browserSupportsSessionStorage&&this.config.rememberExpanded){const t=e.querySelector(`.${this.sectionButtonClass}`);if(t){const s=t.getAttribute("aria-controls"),n=s?window.sessionStorage.getItem(s):null;null!==n&&this.setExpanded("true"===n,e)}}}getButtonPunctuationEl(){const e=document.createElement("span");return e.classList.add("govuk-visually-hidden",this.sectionHeadingDividerClass),e.innerHTML=", ",e}}Accordion.moduleName="govuk-accordion",Accordion.defaults=Object.freeze({i18n:{hideAllSections:"Hide all sections",hideSection:"Hide",hideSectionAriaLabel:"Hide this section",showAllSections:"Show all sections",showSection:"Show",showSectionAriaLabel:"Show this section"},rememberExpanded:!0}),Accordion.schema=Object.freeze({properties:{i18n:{type:"object"},rememberExpanded:{type:"boolean"}}});const e={checkForSessionStorage:function(){const e="this is the test string";let t;try{return window.sessionStorage.setItem(e,e),t=window.sessionStorage.getItem(e)===e.toString(),window.sessionStorage.removeItem(e),t}catch(s){return!1}}};class Button extends GOVUKFrontendComponent{constructor(e,t={}){if(super(),this.$module=void 0,this.config=void 0,this.debounceFormSubmitTimer=null,!(e instanceof HTMLElement))throw new ElementError({componentName:"Button",element:e,identifier:"Root element (`$module`)"});this.$module=e,this.config=mergeConfigs(Button.defaults,t,normaliseDataset(Button,e.dataset)),this.$module.addEventListener("keydown",(e=>this.handleKeyDown(e))),this.$module.addEventListener("click",(e=>this.debounce(e)))}handleKeyDown(e){const t=e.target;" "===e.key&&t instanceof HTMLElement&&"button"===t.getAttribute("role")&&(e.preventDefault(),t.click())}debounce(e){if(this.config.preventDoubleClick)return this.debounceFormSubmitTimer?(e.preventDefault(),!1):void(this.debounceFormSubmitTimer=window.setTimeout((()=>{this.debounceFormSubmitTimer=null}),1e3))}}function closestAttributeValue(e,t){const s=e.closest(`[${t}]`);return s?s.getAttribute(t):null}Button.moduleName="govuk-button",Button.defaults=Object.freeze({preventDoubleClick:!1}),Button.schema=Object.freeze({properties:{preventDoubleClick:{type:"boolean"}}});class CharacterCount extends GOVUKFrontendComponent{constructor(e,t={}){var s,n;if(super(),this.$module=void 0,this.$textarea=void 0,this.$visibleCountMessage=void 0,this.$screenReaderCountMessage=void 0,this.lastInputTimestamp=null,this.lastInputValue="",this.valueChecker=null,this.config=void 0,this.i18n=void 0,this.maxLength=void 0,!(e instanceof HTMLElement))throw new ElementError({componentName:"Character count",element:e,identifier:"Root element (`$module`)"});const i=e.querySelector(".govuk-js-character-count");if(!(i instanceof HTMLTextAreaElement||i instanceof HTMLInputElement))throw new ElementError({componentName:"Character count",element:i,expectedType:"HTMLTextareaElement or HTMLInputElement",identifier:"Form field (`.govuk-js-character-count`)"});const o=normaliseDataset(CharacterCount,e.dataset);let r={};("maxwords"in o||"maxlength"in o)&&(r={maxlength:void 0,maxwords:void 0}),this.config=mergeConfigs(CharacterCount.defaults,t,r,o);const a=function(e,t){const s=[];for(const[n,i]of Object.entries(e)){const e=[];if(Array.isArray(i)){for(const{required:s,errorMessage:n}of i)s.every((e=>!!t[e]))||e.push(n);"anyOf"!==n||i.length-e.length>=1||s.push(...e)}}return s}(CharacterCount.schema,this.config);if(a[0])throw new ConfigError(`Character count: ${a[0]}`);this.i18n=new I18n(this.config.i18n,{locale:closestAttributeValue(e,"lang")}),this.maxLength=null!=(s=null!=(n=this.config.maxwords)?n:this.config.maxlength)?s:1/0,this.$module=e,this.$textarea=i;const l=`${this.$textarea.id}-info`,c=document.getElementById(l);if(!c)throw new ElementError({componentName:"Character count",element:c,identifier:`Count message (\`id="${l}"\`)`});`${c.textContent}`.match(/^\s*$/)&&(c.textContent=this.i18n.t("textareaDescription",{count:this.maxLength})),this.$textarea.insertAdjacentElement("afterend",c);const h=document.createElement("div");h.className="govuk-character-count__sr-status govuk-visually-hidden",h.setAttribute("aria-live","polite"),this.$screenReaderCountMessage=h,c.insertAdjacentElement("afterend",h);const u=document.createElement("div");u.className=c.className,u.classList.add("govuk-character-count__status"),u.setAttribute("aria-hidden","true"),this.$visibleCountMessage=u,c.insertAdjacentElement("afterend",u),c.classList.add("govuk-visually-hidden"),this.$textarea.removeAttribute("maxlength"),this.bindChangeEvents(),window.addEventListener("pageshow",(()=>this.updateCountMessage())),this.updateCountMessage()}bindChangeEvents(){this.$textarea.addEventListener("keyup",(()=>this.handleKeyUp())),this.$textarea.addEventListener("focus",(()=>this.handleFocus())),this.$textarea.addEventListener("blur",(()=>this.handleBlur()))}handleKeyUp(){this.updateVisibleCountMessage(),this.lastInputTimestamp=Date.now()}handleFocus(){this.valueChecker=window.setInterval((()=>{(!this.lastInputTimestamp||Date.now()-500>=this.lastInputTimestamp)&&this.updateIfValueChanged()}),1e3)}handleBlur(){this.valueChecker&&window.clearInterval(this.valueChecker)}updateIfValueChanged(){this.$textarea.value!==this.lastInputValue&&(this.lastInputValue=this.$textarea.value,this.updateCountMessage())}updateCountMessage(){this.updateVisibleCountMessage(),this.updateScreenReaderCountMessage()}updateVisibleCountMessage(){const e=this.maxLength-this.count(this.$textarea.value)<0;this.$visibleCountMessage.classList.toggle("govuk-character-count__message--disabled",!this.isOverThreshold()),this.$textarea.classList.toggle("govuk-textarea--error",e),this.$visibleCountMessage.classList.toggle("govuk-error-message",e),this.$visibleCountMessage.classList.toggle("govuk-hint",!e),this.$visibleCountMessage.textContent=this.getCountMessage()}updateScreenReaderCountMessage(){this.isOverThreshold()?this.$screenReaderCountMessage.removeAttribute("aria-hidden"):this.$screenReaderCountMessage.setAttribute("aria-hidden","true"),this.$screenReaderCountMessage.textContent=this.getCountMessage()}count(e){if(this.config.maxwords){var t;return(null!=(t=e.match(/\S+/g))?t:[]).length}return e.length}getCountMessage(){const e=this.maxLength-this.count(this.$textarea.value),t=this.config.maxwords?"words":"characters";return this.formatCountMessage(e,t)}formatCountMessage(e,t){if(0===e)return this.i18n.t(`${t}AtLimit`);const s=e<0?"OverLimit":"UnderLimit";return this.i18n.t(`${t}${s}`,{count:Math.abs(e)})}isOverThreshold(){if(!this.config.threshold)return!0;const e=this.count(this.$textarea.value);return this.maxLength*this.config.threshold/100<=e}}CharacterCount.moduleName="govuk-character-count",CharacterCount.defaults=Object.freeze({threshold:0,i18n:{charactersUnderLimit:{one:"You have %{count} character remaining",other:"You have %{count} characters remaining"},charactersAtLimit:"You have 0 characters remaining",charactersOverLimit:{one:"You have %{count} character too many",other:"You have %{count} characters too many"},wordsUnderLimit:{one:"You have %{count} word remaining",other:"You have %{count} words remaining"},wordsAtLimit:"You have 0 words remaining",wordsOverLimit:{one:"You have %{count} word too many",other:"You have %{count} words too many"},textareaDescription:{other:""}}}),CharacterCount.schema=Object.freeze({properties:{i18n:{type:"object"},maxwords:{type:"number"},maxlength:{type:"number"},threshold:{type:"number"}},anyOf:[{required:["maxwords"],errorMessage:'Either "maxlength" or "maxwords" must be provided'},{required:["maxlength"],errorMessage:'Either "maxlength" or "maxwords" must be provided'}]});class Checkboxes extends GOVUKFrontendComponent{constructor(e){if(super(),this.$module=void 0,this.$inputs=void 0,!(e instanceof HTMLElement))throw new ElementError({componentName:"Checkboxes",element:e,identifier:"Root element (`$module`)"});const t=e.querySelectorAll('input[type="checkbox"]');if(!t.length)throw new ElementError({componentName:"Checkboxes",identifier:'Form inputs (`<input type="checkbox">`)'});this.$module=e,this.$inputs=t,this.$inputs.forEach((e=>{const t=e.getAttribute("data-aria-controls");if(t){if(!document.getElementById(t))throw new ElementError({componentName:"Checkboxes",identifier:`Conditional reveal (\`id="${t}"\`)`});e.setAttribute("aria-controls",t),e.removeAttribute("data-aria-controls")}})),window.addEventListener("pageshow",(()=>this.syncAllConditionalReveals())),this.syncAllConditionalReveals(),this.$module.addEventListener("click",(e=>this.handleClick(e)))}syncAllConditionalReveals(){this.$inputs.forEach((e=>this.syncConditionalRevealWithInputState(e)))}syncConditionalRevealWithInputState(e){const t=e.getAttribute("aria-controls");if(!t)return;const s=document.getElementById(t);if(s&&s.classList.contains("govuk-checkboxes__conditional")){const t=e.checked;e.setAttribute("aria-expanded",t.toString()),s.classList.toggle("govuk-checkboxes__conditional--hidden",!t)}}unCheckAllInputsExcept(e){document.querySelectorAll(`input[type="checkbox"][name="${e.name}"]`).forEach((t=>{e.form===t.form&&t!==e&&(t.checked=!1,this.syncConditionalRevealWithInputState(t))}))}unCheckExclusiveInputs(e){document.querySelectorAll(`input[data-behaviour="exclusive"][type="checkbox"][name="${e.name}"]`).forEach((t=>{e.form===t.form&&(t.checked=!1,this.syncConditionalRevealWithInputState(t))}))}handleClick(e){const t=e.target;if(!(t instanceof HTMLInputElement)||"checkbox"!==t.type)return;if(t.getAttribute("aria-controls")&&this.syncConditionalRevealWithInputState(t),!t.checked)return;"exclusive"===t.getAttribute("data-behaviour")?this.unCheckAllInputsExcept(t):this.unCheckExclusiveInputs(t)}}Checkboxes.moduleName="govuk-checkboxes";class ErrorSummary extends GOVUKFrontendComponent{constructor(e,t={}){if(super(),this.$module=void 0,this.config=void 0,!(e instanceof HTMLElement))throw new ElementError({componentName:"Error summary",element:e,identifier:"Root element (`$module`)"});this.$module=e,this.config=mergeConfigs(ErrorSummary.defaults,t,normaliseDataset(ErrorSummary,e.dataset)),this.config.disableAutoFocus||setFocus(this.$module),this.$module.addEventListener("click",(e=>this.handleClick(e)))}handleClick(e){const t=e.target;t&&this.focusTarget(t)&&e.preventDefault()}focusTarget(e){if(!(e instanceof HTMLAnchorElement))return!1;const t=getFragmentFromUrl(e.href);if(!t)return!1;const s=document.getElementById(t);if(!s)return!1;const n=this.getAssociatedLegendOrLabel(s);return!!n&&(n.scrollIntoView(),s.focus({preventScroll:!0}),!0)}getAssociatedLegendOrLabel(e){var t;const s=e.closest("fieldset");if(s){const t=s.getElementsByTagName("legend");if(t.length){const s=t[0];if(e instanceof HTMLInputElement&&("checkbox"===e.type||"radio"===e.type))return s;const n=s.getBoundingClientRect().top,i=e.getBoundingClientRect();if(i.height&&window.innerHeight){if(i.top+i.height-n<window.innerHeight/2)return s}}}return null!=(t=document.querySelector(`label[for='${e.getAttribute("id")}']`))?t:e.closest("label")}}ErrorSummary.moduleName="govuk-error-summary",ErrorSummary.defaults=Object.freeze({disableAutoFocus:!1}),ErrorSummary.schema=Object.freeze({properties:{disableAutoFocus:{type:"boolean"}}});class ExitThisPage extends GOVUKFrontendComponent{constructor(e,t={}){if(super(),this.$module=void 0,this.config=void 0,this.i18n=void 0,this.$button=void 0,this.$skiplinkButton=null,this.$updateSpan=null,this.$indicatorContainer=null,this.$overlay=null,this.keypressCounter=0,this.lastKeyWasModified=!1,this.timeoutTime=5e3,this.keypressTimeoutId=null,this.timeoutMessageId=null,!(e instanceof HTMLElement))throw new ElementError({componentName:"Exit this page",element:e,identifier:"Root element (`$module`)"});const s=e.querySelector(".govuk-exit-this-page__button");if(!(s instanceof HTMLAnchorElement))throw new ElementError({componentName:"Exit this page",element:s,expectedType:"HTMLAnchorElement",identifier:"Button (`.govuk-exit-this-page__button`)"});this.config=mergeConfigs(ExitThisPage.defaults,t,normaliseDataset(ExitThisPage,e.dataset)),this.i18n=new I18n(this.config.i18n),this.$module=e,this.$button=s;const n=document.querySelector(".govuk-js-exit-this-page-skiplink");n instanceof HTMLAnchorElement&&(this.$skiplinkButton=n),this.buildIndicator(),this.initUpdateSpan(),this.initButtonClickHandler(),"govukFrontendExitThisPageKeypress"in document.body.dataset||(document.addEventListener("keyup",this.handleKeypress.bind(this),!0),document.body.dataset.govukFrontendExitThisPageKeypress="true"),window.addEventListener("pageshow",this.resetPage.bind(this))}initUpdateSpan(){this.$updateSpan=document.createElement("span"),this.$updateSpan.setAttribute("role","status"),this.$updateSpan.className="govuk-visually-hidden",this.$module.appendChild(this.$updateSpan)}initButtonClickHandler(){this.$button.addEventListener("click",this.handleClick.bind(this)),this.$skiplinkButton&&this.$skiplinkButton.addEventListener("click",this.handleClick.bind(this))}buildIndicator(){this.$indicatorContainer=document.createElement("div"),this.$indicatorContainer.className="govuk-exit-this-page__indicator",this.$indicatorContainer.setAttribute("aria-hidden","true");for(let e=0;e<3;e++){const e=document.createElement("div");e.className="govuk-exit-this-page__indicator-light",this.$indicatorContainer.appendChild(e)}this.$button.appendChild(this.$indicatorContainer)}updateIndicator(){if(!this.$indicatorContainer)return;this.$indicatorContainer.classList.toggle("govuk-exit-this-page__indicator--visible",this.keypressCounter>0);this.$indicatorContainer.querySelectorAll(".govuk-exit-this-page__indicator-light").forEach(((e,t)=>{e.classList.toggle("govuk-exit-this-page__indicator-light--on",t<this.keypressCounter)}))}exitPage(){this.$updateSpan&&(this.$updateSpan.textContent="",document.body.classList.add("govuk-exit-this-page-hide-content"),this.$overlay=document.createElement("div"),this.$overlay.className="govuk-exit-this-page-overlay",this.$overlay.setAttribute("role","alert"),document.body.appendChild(this.$overlay),this.$overlay.textContent=this.i18n.t("activated"),window.location.href=this.$button.href)}handleClick(e){e.preventDefault(),this.exitPage()}handleKeypress(e){this.$updateSpan&&("Shift"!==e.key||this.lastKeyWasModified?this.keypressTimeoutId&&this.resetKeypressTimer():(this.keypressCounter+=1,this.updateIndicator(),this.timeoutMessageId&&(window.clearTimeout(this.timeoutMessageId),this.timeoutMessageId=null),this.keypressCounter>=3?(this.keypressCounter=0,this.keypressTimeoutId&&(window.clearTimeout(this.keypressTimeoutId),this.keypressTimeoutId=null),this.exitPage()):1===this.keypressCounter?this.$updateSpan.textContent=this.i18n.t("pressTwoMoreTimes"):this.$updateSpan.textContent=this.i18n.t("pressOneMoreTime"),this.setKeypressTimer()),this.lastKeyWasModified=e.shiftKey)}setKeypressTimer(){this.keypressTimeoutId&&window.clearTimeout(this.keypressTimeoutId),this.keypressTimeoutId=window.setTimeout(this.resetKeypressTimer.bind(this),this.timeoutTime)}resetKeypressTimer(){if(!this.$updateSpan)return;this.keypressTimeoutId&&(window.clearTimeout(this.keypressTimeoutId),this.keypressTimeoutId=null);const e=this.$updateSpan;this.keypressCounter=0,e.textContent=this.i18n.t("timedOut"),this.timeoutMessageId=window.setTimeout((()=>{e.textContent=""}),this.timeoutTime),this.updateIndicator()}resetPage(){document.body.classList.remove("govuk-exit-this-page-hide-content"),this.$overlay&&(this.$overlay.remove(),this.$overlay=null),this.$updateSpan&&(this.$updateSpan.setAttribute("role","status"),this.$updateSpan.textContent=""),this.updateIndicator(),this.keypressTimeoutId&&window.clearTimeout(this.keypressTimeoutId),this.timeoutMessageId&&window.clearTimeout(this.timeoutMessageId)}}ExitThisPage.moduleName="govuk-exit-this-page",ExitThisPage.defaults=Object.freeze({i18n:{activated:"Loading.",timedOut:"Exit this page expired.",pressTwoMoreTimes:"Shift, press 2 more times to exit.",pressOneMoreTime:"Shift, press 1 more time to exit."}}),ExitThisPage.schema=Object.freeze({properties:{i18n:{type:"object"}}});class Header extends GOVUKFrontendComponent{constructor(e){if(super(),this.$module=void 0,this.$menuButton=void 0,this.$menu=void 0,this.menuIsOpen=!1,this.mql=null,!e)throw new ElementError({componentName:"Header",element:e,identifier:"Root element (`$module`)"});this.$module=e;const t=e.querySelector(".govuk-js-header-toggle");if(!t)return this;const s=t.getAttribute("aria-controls");if(!s)throw new ElementError({componentName:"Header",identifier:'Navigation button (`<button class="govuk-js-header-toggle">`) attribute (`aria-controls`)'});const n=document.getElementById(s);if(!n)throw new ElementError({componentName:"Header",element:n,identifier:`Navigation (\`<ul id="${s}">\`)`});this.$menu=n,this.$menuButton=t,this.setupResponsiveChecks(),this.$menuButton.addEventListener("click",(()=>this.handleMenuButtonClick()))}setupResponsiveChecks(){const e=getBreakpoint("desktop");if(!e.value)throw new ElementError({componentName:"Header",identifier:`CSS custom property (\`${e.property}\`) on pseudo-class \`:root\``});this.mql=window.matchMedia(`(min-width: ${e.value})`),"addEventListener"in this.mql?this.mql.addEventListener("change",(()=>this.checkMode())):this.mql.addListener((()=>this.checkMode())),this.checkMode()}checkMode(){this.mql&&this.$menu&&this.$menuButton&&(this.mql.matches?(this.$menu.removeAttribute("hidden"),this.$menuButton.setAttribute("hidden","")):(this.$menuButton.removeAttribute("hidden"),this.$menuButton.setAttribute("aria-expanded",this.menuIsOpen.toString()),this.menuIsOpen?this.$menu.removeAttribute("hidden"):this.$menu.setAttribute("hidden","")))}handleMenuButtonClick(){this.menuIsOpen=!this.menuIsOpen,this.checkMode()}}Header.moduleName="govuk-header";class NotificationBanner extends GOVUKFrontendComponent{constructor(e,t={}){if(super(),this.$module=void 0,this.config=void 0,!(e instanceof HTMLElement))throw new ElementError({componentName:"Notification banner",element:e,identifier:"Root element (`$module`)"});this.$module=e,this.config=mergeConfigs(NotificationBanner.defaults,t,normaliseDataset(NotificationBanner,e.dataset)),"alert"!==this.$module.getAttribute("role")||this.config.disableAutoFocus||setFocus(this.$module)}}NotificationBanner.moduleName="govuk-notification-banner",NotificationBanner.defaults=Object.freeze({disableAutoFocus:!1}),NotificationBanner.schema=Object.freeze({properties:{disableAutoFocus:{type:"boolean"}}});class PasswordInput extends GOVUKFrontendComponent{constructor(e,t={}){if(super(),this.$module=void 0,this.config=void 0,this.i18n=void 0,this.$input=void 0,this.$showHideButton=void 0,this.$screenReaderStatusMessage=void 0,!(e instanceof HTMLElement))throw new ElementError({componentName:"Password input",element:e,identifier:"Root element (`$module`)"});const s=e.querySelector(".govuk-js-password-input-input");if(!(s instanceof HTMLInputElement))throw new ElementError({componentName:"Password input",element:s,expectedType:"HTMLInputElement",identifier:"Form field (`.govuk-js-password-input-input`)"});if("password"!==s.type)throw new ElementError("Password input: Form field (`.govuk-js-password-input-input`) must be of type `password`.");const n=e.querySelector(".govuk-js-password-input-toggle");if(!(n instanceof HTMLButtonElement))throw new ElementError({componentName:"Password input",element:n,expectedType:"HTMLButtonElement",identifier:"Button (`.govuk-js-password-input-toggle`)"});if("button"!==n.type)throw new ElementError("Password input: Button (`.govuk-js-password-input-toggle`) must be of type `button`.");this.$module=e,this.$input=s,this.$showHideButton=n,this.config=mergeConfigs(PasswordInput.defaults,t,normaliseDataset(PasswordInput,e.dataset)),this.i18n=new I18n(this.config.i18n,{locale:closestAttributeValue(e,"lang")}),this.$showHideButton.removeAttribute("hidden");const i=document.createElement("div");i.className="govuk-password-input__sr-status govuk-visually-hidden",i.setAttribute("aria-live","polite"),this.$screenReaderStatusMessage=i,this.$input.insertAdjacentElement("afterend",i),this.$showHideButton.addEventListener("click",this.toggle.bind(this)),this.$input.form&&this.$input.form.addEventListener("submit",(()=>this.hide())),window.addEventListener("pageshow",(e=>{e.persisted&&"password"!==this.$input.type&&this.hide()})),this.hide()}toggle(e){e.preventDefault(),"password"!==this.$input.type?this.hide():this.show()}show(){this.setType("text")}hide(){this.setType("password")}setType(e){if(e===this.$input.type)return;this.$input.setAttribute("type",e);const t="password"===e,s=t?"show":"hide",n=t?"passwordHidden":"passwordShown";this.$showHideButton.innerText=this.i18n.t(`${s}Password`),this.$showHideButton.setAttribute("aria-label",this.i18n.t(`${s}PasswordAriaLabel`)),this.$screenReaderStatusMessage.innerText=this.i18n.t(`${n}Announcement`)}}PasswordInput.moduleName="govuk-password-input",PasswordInput.defaults=Object.freeze({i18n:{showPassword:"Show",hidePassword:"Hide",showPasswordAriaLabel:"Show password",hidePasswordAriaLabel:"Hide password",passwordShownAnnouncement:"Your password is visible",passwordHiddenAnnouncement:"Your password is hidden"}}),PasswordInput.schema=Object.freeze({properties:{i18n:{type:"object"}}});class Radios extends GOVUKFrontendComponent{constructor(e){if(super(),this.$module=void 0,this.$inputs=void 0,!(e instanceof HTMLElement))throw new ElementError({componentName:"Radios",element:e,identifier:"Root element (`$module`)"});const t=e.querySelectorAll('input[type="radio"]');if(!t.length)throw new ElementError({componentName:"Radios",identifier:'Form inputs (`<input type="radio">`)'});this.$module=e,this.$inputs=t,this.$inputs.forEach((e=>{const t=e.getAttribute("data-aria-controls");if(t){if(!document.getElementById(t))throw new ElementError({componentName:"Radios",identifier:`Conditional reveal (\`id="${t}"\`)`});e.setAttribute("aria-controls",t),e.removeAttribute("data-aria-controls")}})),window.addEventListener("pageshow",(()=>this.syncAllConditionalReveals())),this.syncAllConditionalReveals(),this.$module.addEventListener("click",(e=>this.handleClick(e)))}syncAllConditionalReveals(){this.$inputs.forEach((e=>this.syncConditionalRevealWithInputState(e)))}syncConditionalRevealWithInputState(e){const t=e.getAttribute("aria-controls");if(!t)return;const s=document.getElementById(t);if(null!=s&&s.classList.contains("govuk-radios__conditional")){const t=e.checked;e.setAttribute("aria-expanded",t.toString()),s.classList.toggle("govuk-radios__conditional--hidden",!t)}}handleClick(e){const t=e.target;if(!(t instanceof HTMLInputElement)||"radio"!==t.type)return;const s=document.querySelectorAll('input[type="radio"][aria-controls]'),n=t.form,i=t.name;s.forEach((e=>{const t=e.form===n;e.name===i&&t&&this.syncConditionalRevealWithInputState(e)}))}}Radios.moduleName="govuk-radios";class SkipLink extends GOVUKFrontendComponent{constructor(e){var t;if(super(),this.$module=void 0,!(e instanceof HTMLAnchorElement))throw new ElementError({componentName:"Skip link",element:e,expectedType:"HTMLAnchorElement",identifier:"Root element (`$module`)"});this.$module=e;const s=this.$module.hash,n=null!=(t=this.$module.getAttribute("href"))?t:"";let i;try{i=new window.URL(this.$module.href)}catch(a){throw new ElementError(`Skip link: Target link (\`href="${n}"\`) is invalid`)}if(i.origin!==window.location.origin||i.pathname!==window.location.pathname)return;const o=getFragmentFromUrl(s);if(!o)throw new ElementError(`Skip link: Target link (\`href="${n}"\`) has no hash fragment`);const r=document.getElementById(o);if(!r)throw new ElementError({componentName:"Skip link",element:r,identifier:`Target content (\`id="${o}"\`)`});this.$module.addEventListener("click",(()=>setFocus(r,{onBeforeFocus(){r.classList.add("govuk-skip-link-focused-element")},onBlur(){r.classList.remove("govuk-skip-link-focused-element")}})))}}SkipLink.moduleName="govuk-skip-link";class Tabs extends GOVUKFrontendComponent{constructor(e){if(super(),this.$module=void 0,this.$tabs=void 0,this.$tabList=void 0,this.$tabListItems=void 0,this.jsHiddenClass="govuk-tabs__panel--hidden",this.changingHash=!1,this.boundTabClick=void 0,this.boundTabKeydown=void 0,this.boundOnHashChange=void 0,this.mql=null,!e)throw new ElementError({componentName:"Tabs",element:e,identifier:"Root element (`$module`)"});const t=e.querySelectorAll("a.govuk-tabs__tab");if(!t.length)throw new ElementError({componentName:"Tabs",identifier:'Links (`<a class="govuk-tabs__tab">`)'});this.$module=e,this.$tabs=t,this.boundTabClick=this.onTabClick.bind(this),this.boundTabKeydown=this.onTabKeydown.bind(this),this.boundOnHashChange=this.onHashChange.bind(this);const s=this.$module.querySelector(".govuk-tabs__list"),n=this.$module.querySelectorAll("li.govuk-tabs__list-item");if(!s)throw new ElementError({componentName:"Tabs",identifier:'List (`<ul class="govuk-tabs__list">`)'});if(!n.length)throw new ElementError({componentName:"Tabs",identifier:'List items (`<li class="govuk-tabs__list-item">`)'});this.$tabList=s,this.$tabListItems=n,this.setupResponsiveChecks()}setupResponsiveChecks(){const e=getBreakpoint("tablet");if(!e.value)throw new ElementError({componentName:"Tabs",identifier:`CSS custom property (\`${e.property}\`) on pseudo-class \`:root\``});this.mql=window.matchMedia(`(min-width: ${e.value})`),"addEventListener"in this.mql?this.mql.addEventListener("change",(()=>this.checkMode())):this.mql.addListener((()=>this.checkMode())),this.checkMode()}checkMode(){var e;null!=(e=this.mql)&&e.matches?this.setup():this.teardown()}setup(){var e;this.$tabList.setAttribute("role","tablist"),this.$tabListItems.forEach((e=>{e.setAttribute("role","presentation")})),this.$tabs.forEach((e=>{this.setAttributes(e),e.addEventListener("click",this.boundTabClick,!0),e.addEventListener("keydown",this.boundTabKeydown,!0),this.hideTab(e)}));const t=null!=(e=this.getTab(window.location.hash))?e:this.$tabs[0];this.showTab(t),window.addEventListener("hashchange",this.boundOnHashChange,!0)}teardown(){this.$tabList.removeAttribute("role"),this.$tabListItems.forEach((e=>{e.removeAttribute("role")})),this.$tabs.forEach((e=>{e.removeEventListener("click",this.boundTabClick,!0),e.removeEventListener("keydown",this.boundTabKeydown,!0),this.unsetAttributes(e)})),window.removeEventListener("hashchange",this.boundOnHashChange,!0)}onHashChange(){const e=window.location.hash,t=this.getTab(e);if(!t)return;if(this.changingHash)return void(this.changingHash=!1);const s=this.getCurrentTab();s&&(this.hideTab(s),this.showTab(t),t.focus())}hideTab(e){this.unhighlightTab(e),this.hidePanel(e)}showTab(e){this.highlightTab(e),this.showPanel(e)}getTab(e){return this.$module.querySelector(`a.govuk-tabs__tab[href="${e}"]`)}setAttributes(e){const t=getFragmentFromUrl(e.href);if(!t)return;e.setAttribute("id",`tab_${t}`),e.setAttribute("role","tab"),e.setAttribute("aria-controls",t),e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1");const s=this.getPanel(e);s&&(s.setAttribute("role","tabpanel"),s.setAttribute("aria-labelledby",e.id),s.classList.add(this.jsHiddenClass))}unsetAttributes(e){e.removeAttribute("id"),e.removeAttribute("role"),e.removeAttribute("aria-controls"),e.removeAttribute("aria-selected"),e.removeAttribute("tabindex");const t=this.getPanel(e);t&&(t.removeAttribute("role"),t.removeAttribute("aria-labelledby"),t.classList.remove(this.jsHiddenClass))}onTabClick(e){const t=this.getCurrentTab(),s=e.currentTarget;t&&s instanceof HTMLAnchorElement&&(e.preventDefault(),this.hideTab(t),this.showTab(s),this.createHistoryEntry(s))}createHistoryEntry(e){const t=this.getPanel(e);if(!t)return;const s=t.id;t.id="",this.changingHash=!0,window.location.hash=s,t.id=s}onTabKeydown(e){switch(e.key){case"ArrowLeft":case"ArrowUp":case"Left":case"Up":this.activatePreviousTab(),e.preventDefault();break;case"ArrowRight":case"ArrowDown":case"Right":case"Down":this.activateNextTab(),e.preventDefault()}}activateNextTab(){const e=this.getCurrentTab();if(null==e||!e.parentElement)return;const t=e.parentElement.nextElementSibling;if(!t)return;const s=t.querySelector("a.govuk-tabs__tab");s&&(this.hideTab(e),this.showTab(s),s.focus(),this.createHistoryEntry(s))}activatePreviousTab(){const e=this.getCurrentTab();if(null==e||!e.parentElement)return;const t=e.parentElement.previousElementSibling;if(!t)return;const s=t.querySelector("a.govuk-tabs__tab");s&&(this.hideTab(e),this.showTab(s),s.focus(),this.createHistoryEntry(s))}getPanel(e){const t=getFragmentFromUrl(e.href);return t?this.$module.querySelector(`#${t}`):null}showPanel(e){const t=this.getPanel(e);t&&t.classList.remove(this.jsHiddenClass)}hidePanel(e){const t=this.getPanel(e);t&&t.classList.add(this.jsHiddenClass)}unhighlightTab(e){e.parentElement&&(e.setAttribute("aria-selected","false"),e.parentElement.classList.remove("govuk-tabs__list-item--selected"),e.setAttribute("tabindex","-1"))}highlightTab(e){e.parentElement&&(e.setAttribute("aria-selected","true"),e.parentElement.classList.add("govuk-tabs__list-item--selected"),e.setAttribute("tabindex","0"))}getCurrentTab(){return this.$module.querySelector(".govuk-tabs__list-item--selected a.govuk-tabs__tab")}}function initAll(e){var t;if(e=void 0!==e?e:{},!isSupported())return void console.log(new SupportError);const s=[[Accordion,e.accordion],[Button,e.button],[CharacterCount,e.characterCount],[Checkboxes],[ErrorSummary,e.errorSummary],[ExitThisPage,e.exitThisPage],[Header],[NotificationBanner,e.notificationBanner],[PasswordInput,e.passwordInput],[Radios],[SkipLink],[Tabs]],n=null!=(t=e.scope)?t:document;s.forEach((([e,t])=>{n.querySelectorAll(`[data-module="${e.moduleName}"]`).forEach((s=>{try{"defaults"in e?new e(s,t):new e(s)}catch(n){console.log(n)}}))}))}Tabs.moduleName="govuk-tabs";export{Accordion,Button,CharacterCount,Checkboxes,ErrorSummary,ExitThisPage,Header,NotificationBanner,PasswordInput,Radios,SkipLink,Tabs,initAll,version};//# sourceMappingURL=govuk-frontend.min.js.map

@@ -6,3 +6,3 @@ {

"documentation": "https://design-system.service.gov.uk/",
"releaseNotes": "https://github.com/alphagov/govuk-frontend/releases/tag/v5.2.0",
"releaseNotes": "https://github.com/alphagov/govuk-frontend/releases/tag/v5.3.0",
"versionHistory": "https://github.com/alphagov/govuk-frontend/releases"

@@ -122,2 +122,6 @@ }

{
"importFrom": "govuk/components/password-input/macro.njk",
"macroName": "govukPasswordInput"
},
{
"importFrom": "govuk/components/phase-banner/macro.njk",

@@ -124,0 +128,0 @@ "macroName": "govukPhaseBanner"

{
"name": "govuk-frontend",
"description": "GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.",
"version": "5.2.0",
"version": "5.3.0",
"main": "dist/govuk/all.bundle.js",

@@ -64,4 +64,4 @@ "module": "dist/govuk/all.mjs",

"devDependencies": {
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/core": "^7.24.3",
"@babel/preset-env": "^7.24.3",
"@govuk-frontend/config": "*",

@@ -74,17 +74,17 @@ "@govuk-frontend/helpers": "*",

"@rollup/plugin-terser": "^0.4.4",
"autoprefixer": "^10.4.17",
"cssnano": "^6.0.3",
"autoprefixer": "^10.4.19",
"cssnano": "^6.1.1",
"cssnano-preset-default": "^6.0.1",
"govuk-prototype-kit": "^13.16.0",
"govuk-prototype-kit": "^13.16.1",
"gulp": "^4.0.2",
"gulp-cli": "^2.3.0",
"html-validate": "8.9.1",
"html-validate": "8.18.0",
"nunjucks": "^3.2.4",
"outdent": "^0.8.0",
"postcss": "^8.4.35",
"postcss": "^8.4.36",
"postcss-scss": "^4.0.9",
"puppeteer": "^22.1.0",
"rollup": "^4.12.0",
"puppeteer": "^22.6.0",
"rollup": "^4.13.0",
"sass-color-helpers": "^2.1.1",
"sass-embedded": "^1.70.0",
"sass-embedded": "^1.72.0",
"sassdoc": "^2.7.4",

@@ -91,0 +91,0 @@ "slash": "^5.1.0"

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc