@iamproperty/components 7.5.1--beta3 → 7.5.1--beta5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/components/actionbar.component.css +1 -1
- package/assets/css/components/actionbar.component.css.map +1 -1
- package/assets/css/components/address-lookup.component.css +1 -1
- package/assets/css/components/address-lookup.component.css.map +1 -1
- package/assets/css/components/calendar.component.css +1 -1
- package/assets/css/components/calendar.component.css.map +1 -1
- package/assets/css/components/fileupload.css +1 -1
- package/assets/css/components/fileupload.css.map +1 -1
- package/assets/css/components/multiselect.css +1 -1
- package/assets/css/components/multiselect.css.map +1 -1
- package/assets/css/components/nav.component.css +1 -1
- package/assets/css/components/nav.component.css.map +1 -1
- package/assets/css/components/pagination.css +1 -1
- package/assets/css/components/pagination.css.map +1 -1
- package/assets/css/components/slider.css +1 -1
- package/assets/css/components/slider.css.map +1 -1
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/mobile-core.min.css +1 -1
- package/assets/css/mobile-core.min.css.map +1 -1
- package/assets/css/mobile.min.css +1 -1
- package/assets/css/mobile.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/js/components/accordion/accordion.component.min.js +1 -1
- package/assets/js/components/actionbar/actionbar.component.min.js +2 -2
- package/assets/js/components/actionbar/actionbar.component.min.js.map +1 -1
- package/assets/js/components/address-lookup/address-lookup.component.js +6 -2
- package/assets/js/components/address-lookup/address-lookup.component.min.js +4 -4
- package/assets/js/components/address-lookup/address-lookup.component.min.js.map +1 -1
- package/assets/js/components/advanced-select/advanced-select.component.min.js +3 -3
- package/assets/js/components/advanced-select/advanced-select.component.min.js.map +1 -1
- package/assets/js/components/applied-filters/applied-filters.component.min.js +1 -1
- package/assets/js/components/barchart/barchart.component.min.js +1 -1
- package/assets/js/components/barchart/barchart.component.min.js.map +1 -1
- package/assets/js/components/bento-grid/bento-grid.component.min.js +1 -1
- package/assets/js/components/calendar/calendar.component.min.js +2 -2
- package/assets/js/components/calendar/calendar.component.min.js.map +1 -1
- package/assets/js/components/card/card.component.min.js +1 -1
- package/assets/js/components/carousel/carousel.component.min.js +1 -1
- package/assets/js/components/collapsible-side/collapsible-side.component.min.js +1 -1
- package/assets/js/components/content/content.component.min.js +1 -1
- package/assets/js/components/darkmode/darkmode.component.min.js +1 -1
- package/assets/js/components/doughnutchart/doughnutchart.component.min.js +1 -1
- package/assets/js/components/doughnutchart/doughnutchart.component.min.js.map +1 -1
- package/assets/js/components/fileupload/fileupload.component.min.js +2 -2
- package/assets/js/components/filter-card/filter-card.component.min.js +1 -1
- package/assets/js/components/filterlist/filterlist.component.min.js +1 -1
- package/assets/js/components/header/header.component.min.js +1 -1
- package/assets/js/components/inline-edit/inline-edit.component.min.js +1 -1
- package/assets/js/components/marketing/marketing.component.min.js +1 -1
- package/assets/js/components/menu/menu.component.min.js +1 -1
- package/assets/js/components/milestone/milestone.component.min.js +1 -1
- package/assets/js/components/milestone-group/milestone-group.component.min.js +1 -1
- package/assets/js/components/multi-step/multi-step.component.min.js +1 -1
- package/assets/js/components/multiselect/multiselect.component.min.js +4 -4
- package/assets/js/components/nav/nav.component.min.js +2 -2
- package/assets/js/components/notification/notification.component.min.js +1 -1
- package/assets/js/components/pagination/pagination.component.min.js +3 -3
- package/assets/js/components/password-indicator/password-indicator.component.min.js +1 -1
- package/assets/js/components/rank/rank.component.min.js +1 -1
- package/assets/js/components/rankings/rankings.component.min.js +1 -1
- package/assets/js/components/record-card/record-card.component.min.js +1 -1
- package/assets/js/components/search/search.component.js +2 -1
- package/assets/js/components/search/search.component.min.js +5 -5
- package/assets/js/components/search/search.component.min.js.map +1 -1
- package/assets/js/components/slider/slider.component.min.js +3 -3
- package/assets/js/components/split-button/split-button.component.min.js +1 -1
- package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js +4 -4
- package/assets/js/components/std-address-lookup/std-address-lookup.component.min.js.map +1 -1
- package/assets/js/components/table/table.component.min.js +1 -1
- package/assets/js/components/table/table.component.min.js.map +1 -1
- package/assets/js/components/table-ajax/table-ajax.component.min.js +1 -1
- package/assets/js/components/table-ajax/table-ajax.component.min.js.map +1 -1
- package/assets/js/components/table-basic/table-basic.component.min.js +1 -1
- package/assets/js/components/table-basic/table-basic.component.min.js.map +1 -1
- package/assets/js/components/table-no-submit/table-no-submit.component.min.js +1 -1
- package/assets/js/components/table-no-submit/table-no-submit.component.min.js.map +1 -1
- package/assets/js/components/table-submit/table-submit.component.min.js +1 -1
- package/assets/js/components/table-submit/table-submit.component.min.js.map +1 -1
- package/assets/js/components/tabs/tabs.component.min.js +1 -1
- package/assets/js/components/tabs/tabs.component.min.js.map +1 -1
- package/assets/js/components/video-card/video-card.component.min.js +1 -1
- package/assets/js/components/word-count/word-count.component.min.js +1 -1
- package/assets/js/modules/advanced-select.js +13 -5
- package/assets/js/modules/helpers.js +4 -0
- package/assets/js/scripts.bundle.js +1 -1
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +1 -1
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/js/tests/helpers.spec.js +26 -0
- package/assets/sass/elements/forms.scss +20 -3
- package/assets/ts/components/address-lookup/address-lookup.component.ts +13 -3
- package/assets/ts/components/search/search.component.ts +3 -1
- package/assets/ts/components/std-address-lookup/std-address-lookup.component.ts +0 -3
- package/assets/ts/modules/advanced-select.ts +24 -6
- package/assets/ts/modules/helpers.ts +8 -0
- package/assets/ts/tests/helpers.spec.ts +38 -0
- package/dist/components.es.js +28 -28
- package/dist/components.umd.js +148 -148
- package/package.json +2 -1
- /package/assets/js/{tests → ui-tests}/card.spec.js +0 -0
- /package/assets/js/{tests → ui-tests}/carousel.spec.js +0 -0
- /package/assets/js/{tests → ui-tests}/chart.spec.js +0 -0
- /package/assets/js/{tests → ui-tests}/fileupload.spec.js +0 -0
- /package/assets/js/{tests → ui-tests}/filterlist.spec.js +0 -0
- /package/assets/js/{tests → ui-tests}/multistep.spec.js +0 -0
- /package/assets/js/{tests → ui-tests}/slider.spec.js +0 -0
- /package/assets/js/{tests → ui-tests}/table.spec.js +0 -0
- /package/assets/ts/{tests → ui-tests}/card.spec.ts +0 -0
- /package/assets/ts/{tests → ui-tests}/carousel.spec.ts +0 -0
- /package/assets/ts/{tests → ui-tests}/chart.spec.ts +0 -0
- /package/assets/ts/{tests → ui-tests}/data-layer.spec.js +0 -0
- /package/assets/ts/{tests → ui-tests}/fileupload.spec.ts +0 -0
- /package/assets/ts/{tests → ui-tests}/filterlist.spec.ts +0 -0
- /package/assets/ts/{tests → ui-tests}/multistep.spec.ts +0 -0
- /package/assets/ts/{tests → ui-tests}/slider.spec.ts +0 -0
- /package/assets/ts/{tests → ui-tests}/table.spec.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* iamKey v7.5.1--
|
|
2
|
+
* iamKey v7.5.1--beta5
|
|
3
3
|
* Copyright 2022-2025 iamproperty
|
|
4
|
-
*/import V from"js-cookie";function Y(m,e,
|
|
4
|
+
*/import V from"js-cookie";function Y(m,e,o,h=!1){let t=-1;o.closest(".datalist__wrapper")&&o.closest(".datalist__wrapper"),e.setAttribute("data-list",e.getAttribute("list")),e.setAttribute("list",""),e.hasAttribute("placeholder")&&e.setAttribute("data-placeholder",e.getAttribute("placeholder")),e.hasAttribute("placeholder")&&e.setAttribute("data-original-placeholder",e.getAttribute("placeholder")),e.addEventListener("focus",function(){e.value!=""&&(e.setAttribute("placeholder",e.value),e.setAttribute("data-value",e.value)),e.value=""}),e.addEventListener("blur",function(){e.hasAttribute("data-value")&&(e.value=e.getAttribute("data-value")),e.hasAttribute("data-placeholder")&&e.setAttribute("placeholder",e.getAttribute("data-placeholder"))});for(const n of o.options)n.innerHTML==""&&(n.innerHTML=n.value);o.addEventListener("click",function(n){if(n&&n.target instanceof HTMLElement&&n.target.closest("option")){const i=n.target.closest("option");e.value=i.value,typeof window.triggerDynamicEvent=="function"&&window.triggerDynamicEvent(e);for(const L of o.options)L.classList.remove("active");i.classList.add("active")}}),e.addEventListener("input",function(){e.removeAttribute("data-value"),t=-1;const n=e.value.toUpperCase();for(const i of o.options)i.value.toUpperCase().indexOf(n)>-1?(i.style.display="block",i.classList.remove("hide")):(i.style.display="none",i.classList.add("hide"))}),m.addEventListener("keydown",function(n){n.keyCode==40?(t++,c(o.options)):n.keyCode==38?(t--,c(o.options)):n.keyCode==13&&(n.preventDefault(),t>-1&&o.options&&o.options[t].click())});function c(n){if(!n)return!1;l(n),t>=n.length&&(t=0),t<0&&(t=n.length-1),n[t].classList.add("active")}function l(n){if(!n)return!1;for(let i=0;i<n.length;i++)n[i].classList.remove("active")}e.closest("label").insertAdjacentHTML("beforeend",'<button class="empty btn btn-action" type="button"><i class="fa-light fa-times me-0"></i></button>');const f=()=>{e.hasAttribute("data-original-placeholder")&&e.setAttribute("placeholder",e.getAttribute("data-original-placeholder")),e.removeAttribute("data-value"),e.value="";for(const i of o.options)i.classList.remove("active"),i.removeAttribute("style");const n=new CustomEvent("close-button-pressed");m.dispatchEvent(n)};(m.querySelector(".empty")?m.querySelector(".empty"):m.shadowRoot.querySelector(".empty")).addEventListener("click",function(n){f()}),m.addEventListener("empty",function(n){f()})}const z=m=>/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/gmi.test(m.trim());var S=function(m,e,o,h){function t(c){return c instanceof o?c:new o(function(l){l(c)})}return new(o||(o=Promise))(function(c,l){function f(i){try{n(h.next(i))}catch(L){l(L)}}function r(i){try{n(h.throw(i))}catch(L){l(L)}}function n(i){i.done?c(i.value):t(i.value).then(f,r)}n((h=h.apply(m,e||[])).next())})};window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"Address Lookup"});class F extends HTMLElement{constructor(){var e;super(),this.attachShadow({mode:"open"}),document.body.hasAttribute("data-assets-location")&&document.body.getAttribute("data-assets-location");const o=document.createElement("template");o.innerHTML=`
|
|
5
5
|
<style>
|
|
6
6
|
|
|
7
7
|
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
<slot name="prefilled"></slot></p>
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
|
-
`,(e=this.shadowRoot)===null||e===void 0||e.appendChild(n.content.cloneNode(!0))}connectedCallback(){return S(this,void 0,void 0,function*(){var e,n,h;const r=this.shadowRoot.querySelector('[name="postcode"]'),s=this.shadowRoot.querySelector(".postcode-lookup"),y=this.shadowRoot.querySelector(".manual-address"),A=this.shadowRoot.querySelector(".pre-filled"),t=this.querySelector('datalist[slot="preloadedList"]')?this.querySelector('datalist[slot="preloadedList"]'):this.shadowRoot.querySelector(".datalist__wrapper datalist"),i=this.shadowRoot.querySelector(".datalist__wrapper"),c=this.shadowRoot.querySelector(".switch-to-manual-btn"),T=this.shadowRoot.querySelector(".switch-to-lookup-btn"),O=this.hasAttribute("data-title")?this.getAttribute("data-title"):"Find an address",K=this.shadowRoot.querySelector('[part="edit-button"]'),U=this.shadowRoot.querySelector('[part="remove-button"]'),x=this.hasAttribute("data-display-text"),C=(e=this.shadowRoot)===null||e===void 0?void 0:e.querySelector("#postcode__submit"),u=(n=this.shadowRoot)===null||n===void 0?void 0:n.querySelector(".invalid-feedback"),v=(h=this.shadowRoot)===null||h===void 0?void 0:h.querySelector("#paginationWrapper"),I=this.hasAttribute("data-min-chars")?parseInt(this.getAttribute("data-min-chars")):3;let B=1;const L=this.querySelector(".atleastone");Array.from(this.shadowRoot.querySelectorAll(".title")).forEach(a=>{a.innerHTML=O});function R(a){const o=a.shadowRoot.querySelector(".pre-filled-address");let l=!0;o.innerHTML="",Array.from(a.querySelectorAll("input[required],input[data-required],select[required],select[data-required]")).forEach(d=>{let f=d.hasAttribute("data-value")?d.getAttribute("data-value"):d.value;d.tagName=="SELECT"&&a.querySelector(`[value="${d.value}"][data-value]`)&&(f=a.querySelector(`[value="${d.value}"][data-value]`).getAttribute("data-value")),f?o.innerHTML+=f+(/^-?\d+$/.test(f)?" ":", "):d.closest(".atleastone")&&L.querySelector("input:valid, input.is-valid")||(l=!1)}),o.innerHTML=o.innerHTML.slice(0,-2),l&&(A.classList.remove("js-hide"),s.classList.add("js-hide"),y.classList.add("js-hide"))}function N(){s.classList.add("js-hide"),y.classList.remove("js-hide"),Array.from(y.querySelectorAll("[data-required]")).forEach(a=>{a.setAttribute("required","true")}),y.scrollIntoView()}const P=()=>{L.querySelector("input:valid, input.is-valid")?Array.from(L.querySelectorAll("input")).forEach(a=>{a.removeAttribute("required")}):Array.from(L.querySelectorAll("input")).forEach(a=>{a.setAttribute("required","true")})},H=a=>{s.classList.add("js-hide"),y.classList.remove("js-hide"),Object.keys(a).forEach(o=>{const l=a[o];let d=!1;this.querySelector(`[data-name="${o}"]`)?d=this.querySelector(`[data-name="${o}"]`):this.querySelector(`[data-name-alt="${o}"]`)?d=this.querySelector(`[data-name-alt="${o}"]`):this.querySelector(`[name="${o}"]`)&&(d=this.querySelector(`[name="${o}"]`)),d&&d.tagName=="SELECT"&&l.id?d.value=l.id:d&&l!=""?(d.value=l,d.hasAttribute("data-readonly")&&(d.setAttribute("readonly",!0),d.classList.add("is-valid"))):l!=""&&this.insertAdjacentHTML("beforeend",`<input type="hidden" class="inserted" data-hidden name="${o}" value="${l}" />`),this.querySelector(`[data-name-2="${o}"]`)&&(this.querySelector(`[data-name-2="${o}"]`).value+=" "+l)}),Array.from(this.querySelectorAll("[data-required]")).forEach(o=>{o.setAttribute("required","true")}),r.removeAttribute("required"),L&&P(),this.hasAttribute("data-force-manual")||R(this)},w=(a,...o)=>S(this,[a,...o],void 0,function*(l,d=!1){const f=this.hasAttribute("data-limit")?parseInt(this.getAttribute("data-limit")):100;d?B++:B=1;let b=this.getAttribute("data-url");b+=`${encodeURI(l)}&page[number]=${B}&page[size]=${f}`,this.hasAttribute("data-url-2")&&(b+=this.getAttribute("data-url-2"));const q=l;if(this.hasAttribute("data-postcode"))if(/^([A-Z][A-HJ-Y]?[0-9][A-Z0-9]? ?[0-9][A-Z]{2}|GIR ?0A{2})$/gmi.test(l))d||(t.innerHTML=""),t?.classList.add("loading"),t?.classList.remove("noresults"),r?.classList.remove("is-invalid"),u==null||(u.innerHTML=""),t?.classList.remove("show-welsh-banner"),Array.from(this.querySelectorAll("[data-required]")).forEach(_=>{_.removeAttribute("required")}),Array.from(this.querySelectorAll("[data-readonly]")).forEach(_=>{_.removeAttribute("readonly"),_.classList.remove("is-valid")}),Array.from(this.querySelectorAll(".inserted")).forEach(_=>{_.remove()});else return"Invalid postcode, please enter a valid postcode";this.classList.add("searched"),this.classList.add("was-validated"),window.controller||(window.controller=[]),window.controller[b]&&window.controller[b].abort(),window.controller[b]=new AbortController;const{signal:J}=controller[b];try{return yield fetch(b,{signal:J,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":V.get("XSRF-TOKEN")})}).then(p=>p.json()).then(p=>{var _;let E="";const D=p.data?p.data:p;return D.forEach(g=>{if(typeof g.attributes=="object"&&g.attributes.label){const M=JSON.stringify(g.attributes);E+=`<option data-values='${M}' >${g.attributes.label}</option>`}else if(typeof g.value=="object"){const M=JSON.stringify(g.value);E+=`<option data-values='${M}'>${g.label}, ${q}</option>`}else{const M=JSON.stringify(g);if(x)E+=`<option data-values='${M}'>${g[x]}, ${q}</option>`;else{let $="";for(const[k,G]of Object.entries(g))k=="address_number_name"?$+=`${G} `:k!="postcode"&&k!="address_title"&&k!="group"&&($+=`${G}${/^-?\d+$/.test(G)?"":","} `);E+=`<option data-values='${M}'>${$}, ${q}</option>`}}}),d?t.innerHTML+=E:t.innerHTML=E,D.length?t?.classList.remove("loading"):(t?.classList.remove("loading"),t?.classList.add("noresults")),p.meta&&p.meta.current_page&&p.meta.total_pages&&p.meta.total_pages>p.meta.current_page?v==null||(v.innerHTML=`<div class="bg-light text-center p-2"><p class="m-0">Showing 1-${p.meta.current_page*f} of ${p.meta.total_results} addresses <br /><button type="button" data-next="${p.meta.current_page+1}" class="mt-1 mb-0 btn btn-action"><i class="fa-regular fa-eye me-1"></i>Show more addresses</button></p></div>`):v==null||(v.innerHTML=""),p.meta&&p.meta.welsh_language&&t?.classList.add("show-welsh-banner"),i?.focus(),(_=t?.querySelector("option"))===null||_===void 0||_.focus(),!0})}catch(p){return console.log(p),"There has been a problem. Please try again in a few moments."}});if(this.hasAttribute("data-force-manual")||R(this),this.addEventListener("filled",()=>{this.hasAttribute("data-force-manual")||R(this)}),this.hasAttribute("data-use")){const o=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;if(s.insertAdjacentHTML("afterbegin",o),this.shadowRoot.addEventListener("change",l=>{if(l&&l.target instanceof HTMLElement&&l.target.closest('[name="use"]')&&l.target.closest('[name="use"]').checked){s.classList.add("js-hide"),y.classList.remove("js-hide");const f=JSON.parse(this.getAttribute("data-use"));Object.keys(f).forEach(b=>{const q=f[b];this.querySelector(`[data-name="${b}"]`)?this.querySelector(`[data-name="${b}"]`).value=q:this.querySelector(`[name="${b}"]`)&&(this.querySelector(`[name="${b}"]`).value=q)})}}),this.hasAttribute("data-use-default")){s.querySelector('[name="use"]').checked=!0;const l=JSON.parse(this.getAttribute("data-use"));H(l)}}this.hasAttribute("data-manual")&&H({}),this.classList.contains("show-pagination")&&(v==null||(v.innerHTML='<div class="bg-light text-center p-2"><p class="m-0">Showing 1-500 of 585 addresses <br /><button type="button" data-next="2" class="mt-1 mb-0 btn btn-action"><i class="fa-regular fa-eye me-1"></i>Show more addresses</button></p></div>')),this.classList.contains("scroll-to-bottom-results")&&v.scrollIntoView({container:"nearest"}),K.addEventListener("click",()=>{A.classList.add("js-hide"),N()}),U.addEventListener("click",()=>{A.classList.add("js-hide"),s.classList.remove("js-hide"),y.classList.add("js-hide"),t.innerHTML="",t?.classList.remove("loading"),t?.classList.remove("noresults"),r?.classList.remove("is-invalid"),u==null||(u.innerHTML=""),t?.classList.remove("show-welsh-banner"),r.focus(),r.value="",r?.hasAttribute("data-placeholder")&&r.setAttribute("placeholder",r?.getAttribute("data-placeholder"));const a=new CustomEvent("switch-to-lookup");this.dispatchEvent(a),s.scrollIntoView()}),c.addEventListener("click",()=>{N()}),this.addEventListener("open-manual",()=>{N()}),T.addEventListener("click",()=>{s.classList.remove("js-hide"),y.classList.add("js-hide");const a=new CustomEvent("switch-to-lookup");this.dispatchEvent(a),s.scrollIntoView()}),r.addEventListener("keyup",a=>S(this,void 0,void 0,function*(){if(![40,38,13].includes(a.keyCode)&&r.value.length>=I){const o=yield w(r.value);o!=!0&&(r?.classList.add("is-invalid"),u==null||(u.innerHTML=o))}if(a.keyCode==13){const o=yield w(r.value);o!=!0&&(r?.classList.add("is-invalid"),u==null||(u.innerHTML=o))}})),r.addEventListener("change",()=>S(this,void 0,void 0,function*(){if(r.value.length>=I){const a=yield w(r.value);a!=!0&&(r?.classList.add("is-invalid"),u==null||(u.innerHTML=a))}})),t.addEventListener("click",a=>{if(a.target.tagName=="OPTION"){const o=JSON.parse(a.target.getAttribute("data-values"));H(o),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}}),L?.addEventListener("input",a=>{Array.from(L.querySelectorAll("[data-required]")).forEach(o=>{o.setAttribute("required","true")}),P()}),C?.addEventListener("click",()=>S(this,void 0,void 0,function*(){const a=yield w(r.value);a!=!0&&(r?.classList.add("is-invalid"),u==null||(u.innerHTML=a))})),this===null||this===void 0||this.addEventListener("search",()=>S(this,void 0,void 0,function*(){const a=yield w(r.value);a!=!0&&(r?.classList.add("is-invalid"),u==null||(u.innerHTML=a))})),this===null||this===void 0||this.addEventListener("close-button-pressed",()=>{t.innerHTML="",t?.classList.remove("loading"),t?.classList.remove("noresults"),r?.classList.remove("is-invalid"),u==null||(u.innerHTML=""),t?.classList.remove("show-welsh-banner"),r.focus()}),v?.addEventListener("click",a=>S(this,void 0,void 0,function*(){if(a.target.tagName=="BUTTON"){const o=yield w(r.value,!0);o!=!0&&(r?.classList.add("is-invalid"),u==null||(u.innerHTML=o))}})),Y(this,r,t,!0)})}}const F=[{id:"urn:iamproperty:country:AF",country_name:"Afghanistan"},{id:"urn:iamproperty:country:AX",country_name:"Aland Islands"},{id:"urn:iamproperty:country:AL",country_name:"Albania"},{id:"urn:iamproperty:country:DZ",country_name:"Algeria"},{id:"urn:iamproperty:country:AS",country_name:"American Samoa"},{id:"urn:iamproperty:country:AD",country_name:"Andorra"},{id:"urn:iamproperty:country:AO",country_name:"Angola"},{id:"urn:iamproperty:country:AI",country_name:"Anguilla"},{id:"urn:iamproperty:country:AQ",country_name:"Antarctica"},{id:"urn:iamproperty:country:AG",country_name:"Antigua and Barbuda"},{id:"urn:iamproperty:country:AR",country_name:"Argentina"},{id:"urn:iamproperty:country:AM",country_name:"Armenia"},{id:"urn:iamproperty:country:AW",country_name:"Aruba"},{id:"urn:iamproperty:country:AU",country_name:"Australia"},{id:"urn:iamproperty:country:AT",country_name:"Austria"},{id:"urn:iamproperty:country:AZ",country_name:"Azerbaijan"},{id:"urn:iamproperty:country:BS",country_name:"Bahamas"},{id:"urn:iamproperty:country:BH",country_name:"Bahrain"},{id:"urn:iamproperty:country:BD",country_name:"Bangladesh"},{id:"urn:iamproperty:country:BB",country_name:"Barbados"},{id:"urn:iamproperty:country:BY",country_name:"Belarus"},{id:"urn:iamproperty:country:BE",country_name:"Belgium"},{id:"urn:iamproperty:country:BZ",country_name:"Belize"},{id:"urn:iamproperty:country:BJ",country_name:"Benin"},{id:"urn:iamproperty:country:BM",country_name:"Bermuda"},{id:"urn:iamproperty:country:BT",country_name:"Bhutan"},{id:"urn:iamproperty:country:BO",country_name:"Bolivia (Plurinational State of)"},{id:"urn:iamproperty:country:BQ",country_name:"Bonaire, Sint Eustatius and Saba"},{id:"urn:iamproperty:country:BA",country_name:"Bosnia and Herzegovina"},{id:"urn:iamproperty:country:BW",country_name:"Botswana"},{id:"urn:iamproperty:country:BV",country_name:"Bouvet Island"},{id:"urn:iamproperty:country:BR",country_name:"Brazil"},{id:"urn:iamproperty:country:IO",country_name:"British Indian Ocean Territory"},{id:"urn:iamproperty:country:BN",country_name:"Brunei Darussalam"},{id:"urn:iamproperty:country:BG",country_name:"Bulgaria"},{id:"urn:iamproperty:country:BF",country_name:"Burkina Faso"},{id:"urn:iamproperty:country:BI",country_name:"Burundi"},{id:"urn:iamproperty:country:KH",country_name:"Cambodia"},{id:"urn:iamproperty:country:CM",country_name:"Cameroon"},{id:"urn:iamproperty:country:CA",country_name:"Canada"},{id:"urn:iamproperty:country:CV",country_name:"Cabo Verde"},{id:"urn:iamproperty:country:KY",country_name:"Cayman Islands"},{id:"urn:iamproperty:country:CF",country_name:"Central African Republic"},{id:"urn:iamproperty:country:TD",country_name:"Chad"},{id:"urn:iamproperty:country:CL",country_name:"Chile"},{id:"urn:iamproperty:country:CN",country_name:"China"},{id:"urn:iamproperty:country:CX",country_name:"Christmas Island"},{id:"urn:iamproperty:country:CC",country_name:"Cocos (Keeling) Islands"},{id:"urn:iamproperty:country:CO",country_name:"Colombia"},{id:"urn:iamproperty:country:KM",country_name:"Comoros"},{id:"urn:iamproperty:country:CG",country_name:"Congo"},{id:"urn:iamproperty:country:CD",country_name:"Congo (Democratic Republic of the)"},{id:"urn:iamproperty:country:CK",country_name:"Cook Islands"},{id:"urn:iamproperty:country:CR",country_name:"Costa Rica"},{id:"urn:iamproperty:country:CI",country_name:"C\xF4te d\u2019Ivoire"},{id:"urn:iamproperty:country:HR",country_name:"Croatia"},{id:"urn:iamproperty:country:CU",country_name:"Cuba"},{id:"urn:iamproperty:country:CW",country_name:"Cura\xE7ao"},{id:"urn:iamproperty:country:CY",country_name:"Cyprus"},{id:"urn:iamproperty:country:CZ",country_name:"Czech Republic"},{id:"urn:iamproperty:country:DK",country_name:"Denmark"},{id:"urn:iamproperty:country:DJ",country_name:"Djibouti"},{id:"urn:iamproperty:country:DM",country_name:"Dominica"},{id:"urn:iamproperty:country:DO",country_name:"Dominican Republic"},{id:"urn:iamproperty:country:EC",country_name:"Ecuador"},{id:"urn:iamproperty:country:EG",country_name:"Egypt"},{id:"urn:iamproperty:country:SV",country_name:"El Salvador"},{id:"urn:iamproperty:country:GQ",country_name:"Equatorial Guinea"},{id:"urn:iamproperty:country:ER",country_name:"Eritrea"},{id:"urn:iamproperty:country:EE",country_name:"Estonia"},{id:"urn:iamproperty:country:ET",country_name:"Ethiopia"},{id:"urn:iamproperty:country:FK",country_name:"Falkland Islands (Malvinas)"},{id:"urn:iamproperty:country:FO",country_name:"Faroe Islands"},{id:"urn:iamproperty:country:FJ",country_name:"Fiji"},{id:"urn:iamproperty:country:FI",country_name:"Finland"},{id:"urn:iamproperty:country:FR",country_name:"France"},{id:"urn:iamproperty:country:GF",country_name:"French Guiana"},{id:"urn:iamproperty:country:PF",country_name:"French Polynesia"},{id:"urn:iamproperty:country:TF",country_name:"French Southern Territories"},{id:"urn:iamproperty:country:GA",country_name:"Gabon"},{id:"urn:iamproperty:country:GM",country_name:"Gambia"},{id:"urn:iamproperty:country:GE",country_name:"Georgia"},{id:"urn:iamproperty:country:DE",country_name:"Germany"},{id:"urn:iamproperty:country:GH",country_name:"Ghana"},{id:"urn:iamproperty:country:GI",country_name:"Gibraltar"},{id:"urn:iamproperty:country:GR",country_name:"Greece"},{id:"urn:iamproperty:country:GL",country_name:"Greenland"},{id:"urn:iamproperty:country:GD",country_name:"Grenada"},{id:"urn:iamproperty:country:GP",country_name:"Guadeloupe"},{id:"urn:iamproperty:country:GU",country_name:"Guam"},{id:"urn:iamproperty:country:GT",country_name:"Guatemala"},{id:"urn:iamproperty:country:GG",country_name:"Guernsey"},{id:"urn:iamproperty:country:GN",country_name:"Guinea"},{id:"urn:iamproperty:country:GW",country_name:"Guinea-Bissau"},{id:"urn:iamproperty:country:GY",country_name:"Guyana"},{id:"urn:iamproperty:country:HT",country_name:"Haiti"},{id:"urn:iamproperty:country:HM",country_name:"Heard Island and McDonald Islands"},{id:"urn:iamproperty:country:VA",country_name:"Holy See"},{id:"urn:iamproperty:country:HN",country_name:"Honduras"},{id:"urn:iamproperty:country:HK",country_name:"Hong Kong"},{id:"urn:iamproperty:country:HU",country_name:"Hungary"},{id:"urn:iamproperty:country:IS",country_name:"Iceland"},{id:"urn:iamproperty:country:IN",country_name:"India"},{id:"urn:iamproperty:country:ID",country_name:"Indonesia"},{id:"urn:iamproperty:country:IR",country_name:"Iran (Islamic Republic of)"},{id:"urn:iamproperty:country:IQ",country_name:"Iraq"},{id:"urn:iamproperty:country:IE",country_name:"Ireland"},{id:"urn:iamproperty:country:IM",country_name:"Isle of Man"},{id:"urn:iamproperty:country:IL",country_name:"Israel"},{id:"urn:iamproperty:country:IT",country_name:"Italy"},{id:"urn:iamproperty:country:JM",country_name:"Jamaica"},{id:"urn:iamproperty:country:JP",country_name:"Japan"},{id:"urn:iamproperty:country:JE",country_name:"Jersey"},{id:"urn:iamproperty:country:JO",country_name:"Jordan"},{id:"urn:iamproperty:country:KZ",country_name:"Kazakhstan"},{id:"urn:iamproperty:country:KE",country_name:"Kenya"},{id:"urn:iamproperty:country:KI",country_name:"Kiribati"},{id:"urn:iamproperty:country:KP",country_name:"Korea (Democratic People's Republic of)"},{id:"urn:iamproperty:country:KR",country_name:"Korea (Republic of)"},{id:"urn:iamproperty:country:KW",country_name:"Kuwait"},{id:"urn:iamproperty:country:KG",country_name:"Kyrgyzstan"},{id:"urn:iamproperty:country:LA",country_name:"Lao People's Democratic Republic"},{id:"urn:iamproperty:country:LV",country_name:"Latvia"},{id:"urn:iamproperty:country:LB",country_name:"Lebanon"},{id:"urn:iamproperty:country:LS",country_name:"Lesotho"},{id:"urn:iamproperty:country:LR",country_name:"Liberia"},{id:"urn:iamproperty:country:LY",country_name:"Libya"},{id:"urn:iamproperty:country:LI",country_name:"Liechtenstein"},{id:"urn:iamproperty:country:LT",country_name:"Lithuania"},{id:"urn:iamproperty:country:LU",country_name:"Luxembourg"},{id:"urn:iamproperty:country:MO",country_name:"Macao"},{id:"urn:iamproperty:country:MK",country_name:"Republic of North Macedonia"},{id:"urn:iamproperty:country:MG",country_name:"Madagascar"},{id:"urn:iamproperty:country:MW",country_name:"Malawi"},{id:"urn:iamproperty:country:MY",country_name:"Malaysia"},{id:"urn:iamproperty:country:MV",country_name:"Maldives"},{id:"urn:iamproperty:country:ML",country_name:"Mali"},{id:"urn:iamproperty:country:MT",country_name:"Malta"},{id:"urn:iamproperty:country:MH",country_name:"Marshall Islands"},{id:"urn:iamproperty:country:MQ",country_name:"Martinique"},{id:"urn:iamproperty:country:MR",country_name:"Mauritania"},{id:"urn:iamproperty:country:MU",country_name:"Mauritius"},{id:"urn:iamproperty:country:YT",country_name:"Mayotte"},{id:"urn:iamproperty:country:MX",country_name:"Mexico"},{id:"urn:iamproperty:country:FM",country_name:"Micronesia (Federated States of)"},{id:"urn:iamproperty:country:MD",country_name:"Moldova (Republic of)"},{id:"urn:iamproperty:country:MC",country_name:"Monaco"},{id:"urn:iamproperty:country:MN",country_name:"Mongolia"},{id:"urn:iamproperty:country:ME",country_name:"Montenegro"},{id:"urn:iamproperty:country:MS",country_name:"Montserrat"},{id:"urn:iamproperty:country:MA",country_name:"Morocco"},{id:"urn:iamproperty:country:MZ",country_name:"Mozambique"},{id:"urn:iamproperty:country:MM",country_name:"Myanmar"},{id:"urn:iamproperty:country:NA",country_name:"Namibia"},{id:"urn:iamproperty:country:NR",country_name:"Nauru"},{id:"urn:iamproperty:country:NP",country_name:"Nepal"},{id:"urn:iamproperty:country:NL",country_name:"Netherlands"},{id:"urn:iamproperty:country:NC",country_name:"New Caledonia"},{id:"urn:iamproperty:country:NZ",country_name:"New Zealand"},{id:"urn:iamproperty:country:NI",country_name:"Nicaragua"},{id:"urn:iamproperty:country:NE",country_name:"Niger"},{id:"urn:iamproperty:country:NG",country_name:"Nigeria"},{id:"urn:iamproperty:country:NU",country_name:"Niue"},{id:"urn:iamproperty:country:NF",country_name:"Norfolk Island"},{id:"urn:iamproperty:country:MP",country_name:"Northern Mariana Islands"},{id:"urn:iamproperty:country:NO",country_name:"Norway"},{id:"urn:iamproperty:country:OM",country_name:"Oman"},{id:"urn:iamproperty:country:PK",country_name:"Pakistan"},{id:"urn:iamproperty:country:PW",country_name:"Palau"},{id:"urn:iamproperty:country:PS",country_name:"Palestine, State of"},{id:"urn:iamproperty:country:PA",country_name:"Panama"},{id:"urn:iamproperty:country:PG",country_name:"Papua New Guinea"},{id:"urn:iamproperty:country:PY",country_name:"Paraguay"},{id:"urn:iamproperty:country:PE",country_name:"Peru"},{id:"urn:iamproperty:country:PH",country_name:"Philippines"},{id:"urn:iamproperty:country:PN",country_name:"Pitcairn"},{id:"urn:iamproperty:country:PL",country_name:"Poland"},{id:"urn:iamproperty:country:PT",country_name:"Portugal"},{id:"urn:iamproperty:country:PR",country_name:"Puerto Rico"},{id:"urn:iamproperty:country:QA",country_name:"Qatar"},{id:"urn:iamproperty:country:RE",country_name:"R\xE9union"},{id:"urn:iamproperty:country:RO",country_name:"Romania"},{id:"urn:iamproperty:country:RU",country_name:"Russian Federation"},{id:"urn:iamproperty:country:RW",country_name:"Rwanda"},{id:"urn:iamproperty:country:BL",country_name:"Saint Barth\xE9lemy"},{id:"urn:iamproperty:country:SH",country_name:"Saint Helena, Ascension and Tristan da Cunha"},{id:"urn:iamproperty:country:KN",country_name:"Saint Kitts and Nevis"},{id:"urn:iamproperty:country:LC",country_name:"Saint Lucia"},{id:"urn:iamproperty:country:MF",country_name:"Saint Martin (French part)"},{id:"urn:iamproperty:country:PM",country_name:"Saint Pierre and Miquelon"},{id:"urn:iamproperty:country:VC",country_name:"Saint Vincent and the Grenadines"},{id:"urn:iamproperty:country:WS",country_name:"Samoa"},{id:"urn:iamproperty:country:SM",country_name:"San Marino"},{id:"urn:iamproperty:country:ST",country_name:"Sao Tome and Principe"},{id:"urn:iamproperty:country:SA",country_name:"Saudi Arabia"},{id:"urn:iamproperty:country:SN",country_name:"Senegal"},{id:"urn:iamproperty:country:RS",country_name:"Serbia"},{id:"urn:iamproperty:country:SC",country_name:"Seychelles"},{id:"urn:iamproperty:country:SL",country_name:"Sierra Leone"},{id:"urn:iamproperty:country:SG",country_name:"Singapore"},{id:"urn:iamproperty:country:SX",country_name:"Sint Maarten (Dutch part)"},{id:"urn:iamproperty:country:SK",country_name:"Slovakia"},{id:"urn:iamproperty:country:SI",country_name:"Slovenia"},{id:"urn:iamproperty:country:SB",country_name:"Solomon Islands"},{id:"urn:iamproperty:country:SO",country_name:"Somalia"},{id:"urn:iamproperty:country:ZA",country_name:"South Africa"},{id:"urn:iamproperty:country:GS",country_name:"South Georgia and the South Sandwich Islands"},{id:"urn:iamproperty:country:SS",country_name:"South Sudan"},{id:"urn:iamproperty:country:ES",country_name:"Spain"},{id:"urn:iamproperty:country:LK",country_name:"Sri Lanka"},{id:"urn:iamproperty:country:SD",country_name:"Sudan"},{id:"urn:iamproperty:country:SR",country_name:"Suriname"},{id:"urn:iamproperty:country:SJ",country_name:"Svalbard and Jan Mayen"},{id:"urn:iamproperty:country:SZ",country_name:"The Kingdom of Eswatini"},{id:"urn:iamproperty:country:SE",country_name:"Sweden"},{id:"urn:iamproperty:country:CH",country_name:"Switzerland"},{id:"urn:iamproperty:country:SY",country_name:"Syrian Arab Republic"},{id:"urn:iamproperty:country:TW",country_name:"Taiwan, Province of China"},{id:"urn:iamproperty:country:TJ",country_name:"Tajikistan"},{id:"urn:iamproperty:country:TZ",country_name:"Tanzania, United Republic of"},{id:"urn:iamproperty:country:TH",country_name:"Thailand"},{id:"urn:iamproperty:country:TL",country_name:"Timor-Leste"},{id:"urn:iamproperty:country:TG",country_name:"Togo"},{id:"urn:iamproperty:country:TK",country_name:"Tokelau"},{id:"urn:iamproperty:country:TO",country_name:"Tonga"},{id:"urn:iamproperty:country:TT",country_name:"Trinidad and Tobago"},{id:"urn:iamproperty:country:TN",country_name:"Tunisia"},{id:"urn:iamproperty:country:TR",country_name:"Republic of T\xFCrkiye"},{id:"urn:iamproperty:country:TM",country_name:"Turkmenistan"},{id:"urn:iamproperty:country:TC",country_name:"Turks and Caicos Islands"},{id:"urn:iamproperty:country:TV",country_name:"Tuvalu"},{id:"urn:iamproperty:country:UG",country_name:"Uganda"},{id:"urn:iamproperty:country:UA",country_name:"Ukraine"},{id:"urn:iamproperty:country:AE",country_name:"United Arab Emirates"},{id:"urn:iamproperty:country:GB",country_name:"United Kingdom of Great Britain and Northern Ireland"},{id:"urn:iamproperty:country:US",country_name:"United States of America"},{id:"urn:iamproperty:country:UM",country_name:"United States Minor Outlying Islands"},{id:"urn:iamproperty:country:UY",country_name:"Uruguay"},{id:"urn:iamproperty:country:UZ",country_name:"Uzbekistan"},{id:"urn:iamproperty:country:VU",country_name:"Vanuatu"},{id:"urn:iamproperty:country:VE",country_name:"Venezuela (Bolivarian Republic of)"},{id:"urn:iamproperty:country:VN",country_name:"Viet Nam"},{id:"urn:iamproperty:country:VG",country_name:"Virgin Islands (British)"},{id:"urn:iamproperty:country:VI",country_name:"Virgin Islands (U.S.)"},{id:"urn:iamproperty:country:WF",country_name:"Wallis and Futuna"},{id:"urn:iamproperty:country:EH",country_name:"Western Sahara"},{id:"urn:iamproperty:country:YE",country_name:"Yemen"},{id:"urn:iamproperty:country:ZM",country_name:"Zambia"},{id:"urn:iamproperty:country:ZW",country_name:"Zimbabwe"}],Z=[{id:"urn:iamproperty:county:ekHuOPAhk",county:"Monmouthshire"},{id:"urn:iamproperty:county:AEbmaIiuw",county:"Cambridgeshire"},{id:"urn:iamproperty:county:HN2Hekmbp",county:"South Lanarkshire"},{id:"urn:iamproperty:county:520Tnh4wg",county:"Derbyshire"},{id:"urn:iamproperty:county:l5UCrwlvB",county:"Devon"},{id:"urn:iamproperty:county:GCA8Jh6Ic",county:"Bristol"},{id:"urn:iamproperty:county:Mi1lAB5uQ",county:"Rhondda Cynon Taf"},{id:"urn:iamproperty:county:n4jPkt4qP",county:"Carmarthenshire"},{id:"urn:iamproperty:county:XO1G4TTb5",county:"Aberdeenshire"},{id:"urn:iamproperty:county:JIaxjhlxx",county:"North Somerset"},{id:"urn:iamproperty:county:hLrOnlFfB",county:"Nottinghamshire"},{id:"urn:iamproperty:county:oGMGorIRg",county:"Durham"},{id:"urn:iamproperty:county:eBaLXgG8Y",county:"Isle of Wight"},{id:"urn:iamproperty:county:NMsdqInpw",county:"Northamptonshire"},{id:"urn:iamproperty:county:xRBQIke3k",county:"Warwickshire"},{id:"urn:iamproperty:county:R7yUpOlb4",county:"Berwickshire"},{id:"urn:iamproperty:county:S9DHMO2Hh",county:"East Sussex"},{id:"urn:iamproperty:county:rj4pK09x7",county:"Denbighshire"},{id:"urn:iamproperty:county:vuduFOMex",county:"Lanarkshire"},{id:"urn:iamproperty:county:5W66e6apO",county:"East Riding of Yorkshire"},{id:"urn:iamproperty:county:Hb6eqUJQj",county:"North Ayrshire"},{id:"urn:iamproperty:county:fwRrCvJ4C",county:"Greater Manchester"},{id:"urn:iamproperty:county:aekGxogbo",county:"East Renfrewshire"},{id:"urn:iamproperty:county:f3srYWllA",county:"Cardiff"},{id:"urn:iamproperty:county:DhVZEpSj5",county:"West Lothian"},{id:"urn:iamproperty:county:URWWHN7s0",county:"Dorset"},{id:"urn:iamproperty:county:jYK8wiDnY",county:"Leicestershire"},{id:"urn:iamproperty:county:048PGRA4X",county:"Blaenau Gwent"},{id:"urn:iamproperty:county:wrHCVsCva",county:"Berkshire"},{id:"urn:iamproperty:county:cCH4TjJ9q",county:"Norfolk"},{id:"urn:iamproperty:county:mvHEsdXhM",county:"Suffolk"},{id:"urn:iamproperty:county:faXBprr9q",county:"East Ayrshire"},{id:"urn:iamproperty:county:5wGBTbwou",county:"Conwy"},{id:"urn:iamproperty:county:5YXi0mQkk",county:"Cheshire"},{id:"urn:iamproperty:county:fuYiP18oc",county:"Bridgend"},{id:"urn:iamproperty:county:QaX0cXbOV",county:"West Yorkshire"},{id:"urn:iamproperty:county:Lo7JLx9og",county:"South Gloucestershire"},{id:"urn:iamproperty:county:B64E1f4T3",county:"Merthyr Tydfil"},{id:"urn:iamproperty:county:vacNt3Iie",county:"Banffshire"},{id:"urn:iamproperty:county:HSETldFbK",county:"Staffordshire"},{id:"urn:iamproperty:county:njUDNfLD3",county:"Western Isles"},{id:"urn:iamproperty:county:smlxqTdZE",county:"Bath and North East Somerset"},{id:"urn:iamproperty:county:2asBQ47Jh",county:"South Yorkshire"},{id:"urn:iamproperty:county:5hYXpCuJ7",county:"Stirling"},{id:"urn:iamproperty:county:lhFYBMSuq",county:"Powys"},{id:"urn:iamproperty:county:PamgW3ebq",county:"Vale of Glamorgan"},{id:"urn:iamproperty:county:zIasSsrlZ",county:"Clackmannanshire"},{id:"urn:iamproperty:county:WZUQNZxOy",county:"Lancashire"},{id:"urn:iamproperty:county:HoTgPpS58",county:"Hertfordshire"},{id:"urn:iamproperty:county:oNrluXBHA",county:"Fife"},{id:"urn:iamproperty:county:2OxE9CASK",county:"Neath Port Talbot"},{id:"urn:iamproperty:county:9J7YezLBA",county:"Highland"},{id:"urn:iamproperty:county:7IfpMh1Gx",county:"Ceredigion"},{id:"urn:iamproperty:county:ZwQ3mTTE2",county:"Orkney Islands"},{id:"urn:iamproperty:county:ZyNmV7NCn",county:"North Yorkshire"},{id:"urn:iamproperty:county:LwrVeERzu",county:"Pembrokeshire"},{id:"urn:iamproperty:county:porOuVsSM",county:"Wrexham"},{id:"urn:iamproperty:county:3o4Rx4sO8",county:"Renfrewshire"},{id:"urn:iamproperty:county:loLWjKyk8",county:"Oxfordshire"},{id:"urn:iamproperty:county:AN7Bz5tny",county:"Moray"},{id:"urn:iamproperty:county:RGzSdoQp3",county:"Ayrshire"},{id:"urn:iamproperty:county:nEBK48RIK",county:"Caithness"},{id:"urn:iamproperty:county:a90XABrjs",county:"West Dunbartonshire"},{id:"urn:iamproperty:county:Qjkb0wsyP",county:"West Sussex"},{id:"urn:iamproperty:county:fNJcfheKq",county:"Cornwall"},{id:"urn:iamproperty:county:lx0kEWvsb",county:"Anglesey"},{id:"urn:iamproperty:county:rkvgiBRHz",county:"Caerphilly"},{id:"urn:iamproperty:county:kx0t2zRVP",county:"Tyne and Wear"},{id:"urn:iamproperty:county:lVb75qnOW",county:"Merseyside"},{id:"urn:iamproperty:county:M7eZzrA8u",county:"Wiltshire"},{id:"urn:iamproperty:county:8Uo4sJw3x",county:"Perth and Kinross"},{id:"urn:iamproperty:county:73kc3w0cu",county:"Dumfries & Galloway"},{id:"urn:iamproperty:county:VFjExDeTO",county:"Swansea"},{id:"urn:iamproperty:county:lzsJuaRiS",county:"Isles of Scilly"},{id:"urn:iamproperty:county:abvvK0ZwH",county:"Worcestershire"},{id:"urn:iamproperty:county:1FKCbFkt2",county:"Scottish Borders"},{id:"urn:iamproperty:county:WKaOjrTLM",county:"Essex"},{id:"urn:iamproperty:county:0F00szlVA",county:"South Ayrshire"},{id:"urn:iamproperty:county:KDtAS0c8U",county:"Inverclyde"},{id:"urn:iamproperty:county:Md88sraTz",county:"Shetland Islands"},{id:"urn:iamproperty:county:LzzEE6zpp",county:"Herefordshire"},{id:"urn:iamproperty:county:lXaRRDNrq",county:"Angus"},{id:"urn:iamproperty:county:A5B4FFytC",county:"Surrey"},{id:"urn:iamproperty:county:B3siky9El",county:"Kent"},{id:"urn:iamproperty:county:V9njlL3kq",county:"Northumberland"},{id:"urn:iamproperty:county:WJiolIFFI",county:"Flintshire"},{id:"urn:iamproperty:county:4lXGX7NbU",county:"Gwynedd"},{id:"urn:iamproperty:county:7gzISbzTK",county:"Lincolnshire"},{id:"urn:iamproperty:county:D5GgqTxzN",county:"East Dunbartonshire"},{id:"urn:iamproperty:county:hhwXe4hTH",county:"Somerset"},{id:"urn:iamproperty:county:nECEnleYv",county:"Midlothian"},{id:"urn:iamproperty:county:2jksb8BIf",county:"Cumbria"},{id:"urn:iamproperty:county:ttfY8qr15",county:"Bedfordshire"},{id:"urn:iamproperty:county:YhQVg1amj",county:"West Midlands"},{id:"urn:iamproperty:county:EnbDIubYS",county:"North Lanarkshire"},{id:"urn:iamproperty:county:5SdVf3hnm",county:"Kincardineshire"},{id:"urn:iamproperty:county:BPedWUQXc",county:"Dunbartonshire"},{id:"urn:iamproperty:county:YLngqBWd4",county:"Hampshire"},{id:"urn:iamproperty:county:zBZHWiWon",county:"Buckinghamshire"},{id:"urn:iamproperty:county:kLes1W5ny",county:"East Lothian"},{id:"urn:iamproperty:county:yCMA4ANpN",county:"Rutland"},{id:"urn:iamproperty:county:jhourkJ4W",county:"Torfaen"},{id:"urn:iamproperty:county:aC8dF3IVE",county:"Newport"},{id:"urn:iamproperty:county:AnfqGRnhm",county:"Argyll & Bute"},{id:"urn:iamproperty:county:5BjmQe9mS",county:"Gloucestershire"},{id:"urn:iamproperty:county:G7WiUO5Sh",county:"Cleveland"},{id:"urn:iamproperty:county:zu7zHJPWh",county:"Shropshire"},{id:"urn:iamproperty:county:Bt301fwoy",county:"Greater London"},{id:"urn:iamproperty:county:LXHPqo5nj",county:"City of Edinburgh"},{id:"urn:iamproperty:county:YejLSQLAx",county:"Aberdeen City"},{id:"urn:iamproperty:county:o5lgD8dv7",county:"Dundee City"},{id:"urn:iamproperty:county:0HPMQtb09",county:"Falkirk"},{id:"urn:iamproperty:county:z1rPhQlGB",county:"Glasgow City"},{id:"urn:iamproperty:county:CskSiG5W0",county:"Brecknockshire"},{id:"urn:iamproperty:county:zulaN5fgu",county:"Caernarfonshire"},{id:"urn:iamproperty:county:D1YYNRchZ",county:"Cardiganshire"},{id:"urn:iamproperty:county:3DDFfQzoP",county:"Clwyd"},{id:"urn:iamproperty:county:hBr4CCduy",county:"Dyfed"},{id:"urn:iamproperty:county:7wcgGTpU9",county:"Antrim"},{id:"urn:iamproperty:county:PKM8DGZbI",county:"Armagh"},{id:"urn:iamproperty:county:LrvLXtQv4",county:"Down"},{id:"urn:iamproperty:county:HXDwhW1QG",county:"Fermanagh"},{id:"urn:iamproperty:county:eRHjMdT0e",county:"Londonderry"},{id:"urn:iamproperty:county:Xqs7aJsen",county:"Tyrone"},{id:"urn:iamproperty:county:rYAgcPlXZ",county:"Middlesex"}];let W="";F.forEach(m=>{W+=`<option value="${m.id}" data-value="${m.country_name}">${m.country_name}</option>`});let j="";Z.forEach(m=>{j+=`<option value="${m.id}" data-value="${m.county}">${m.county}</option>`}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"STD Address Lookup"});class X extends HTMLElement{constructor(){super()}connectedCallback(){window.customElements.get("iam-address-lookup")||window.customElements.define("iam-address-lookup",z);const e=this.innerHTML;this.innerHTML=`<iam-address-lookup
|
|
55
|
+
`,(e=this.shadowRoot)===null||e===void 0||e.appendChild(o.content.cloneNode(!0))}connectedCallback(){return S(this,void 0,void 0,function*(){var e,o,h;const t=this.shadowRoot.querySelector('[name="postcode"]'),c=this.shadowRoot.querySelector(".postcode-lookup"),l=this.shadowRoot.querySelector(".manual-address"),f=this.shadowRoot.querySelector(".pre-filled"),r=this.querySelector('datalist[slot="preloadedList"]')?this.querySelector('datalist[slot="preloadedList"]'):this.shadowRoot.querySelector(".datalist__wrapper datalist"),n=this.shadowRoot.querySelector(".datalist__wrapper"),i=this.shadowRoot.querySelector(".switch-to-manual-btn"),L=this.shadowRoot.querySelector(".switch-to-lookup-btn"),O=this.hasAttribute("data-title")?this.getAttribute("data-title"):"Find an address",K=this.shadowRoot.querySelector('[part="edit-button"]'),U=this.shadowRoot.querySelector('[part="remove-button"]'),x=this.hasAttribute("data-display-text"),k=(e=this.shadowRoot)===null||e===void 0?void 0:e.querySelector("#postcode__submit"),s=(o=this.shadowRoot)===null||o===void 0?void 0:o.querySelector(".invalid-feedback"),b=(h=this.shadowRoot)===null||h===void 0?void 0:h.querySelector("#paginationWrapper"),P=this.hasAttribute("data-min-chars")?parseInt(this.getAttribute("data-min-chars")):3;let C=1;const A=this.querySelector(".atleastone");Array.from(this.shadowRoot.querySelectorAll(".title")).forEach(a=>{a.innerHTML=O});function B(a){const u=a.shadowRoot.querySelector(".pre-filled-address");let p=!0;u.innerHTML="",Array.from(a.querySelectorAll("input[required],input[data-required],select[required],select[data-required]")).forEach(d=>{let _=d.hasAttribute("data-value")?d.getAttribute("data-value"):d.value;d.tagName=="SELECT"&&a.querySelector(`[value="${d.value}"][data-value]`)&&(_=a.querySelector(`[value="${d.value}"][data-value]`).getAttribute("data-value")),_?u.innerHTML+=_+(/^-?\d+$/.test(_)?" ":", "):d.closest(".atleastone")&&A.querySelector("input:valid, input.is-valid")||(p=!1)}),u.innerHTML=u.innerHTML.slice(0,-2),p&&(a.querySelector('[name="label"]')&&(u.innerHTML=a.querySelector('[name="label"]').value),f.classList.remove("js-hide"),c.classList.add("js-hide"),l.classList.add("js-hide"))}function R(){c.classList.add("js-hide"),l.classList.remove("js-hide"),Array.from(l.querySelectorAll("[data-required]")).forEach(a=>{a.setAttribute("required","true")}),l.scrollIntoView()}const I=()=>{A.querySelector("input:valid, input.is-valid")?Array.from(A.querySelectorAll("input")).forEach(a=>{a.removeAttribute("required")}):Array.from(A.querySelectorAll("input")).forEach(a=>{a.setAttribute("required","true")})},N=a=>{c.classList.add("js-hide"),l.classList.remove("js-hide"),Object.keys(a).forEach(u=>{const p=a[u];let d=!1;this.querySelector(`[data-name="${u}"]`)?d=this.querySelector(`[data-name="${u}"]`):this.querySelector(`[data-name-alt="${u}"]`)?d=this.querySelector(`[data-name-alt="${u}"]`):this.querySelector(`[name="${u}"]`)&&(d=this.querySelector(`[name="${u}"]`)),d&&d.tagName=="SELECT"&&p.id?d.value=p.id:d&&p!=""?(d.value=p,d.hasAttribute("data-readonly")&&(d.setAttribute("readonly",!0),d.classList.add("is-valid"))):p!=""&&this.insertAdjacentHTML("beforeend",`<input type="hidden" class="inserted" data-hidden name="${u}" value="${p}" />`),this.querySelector(`[data-name-2="${u}"]`)&&(this.querySelector(`[data-name-2="${u}"]`).value+=" "+p)}),Array.from(this.querySelectorAll("[data-required]")).forEach(u=>{u.setAttribute("required","true")}),t.removeAttribute("required"),A&&I(),this.hasAttribute("data-force-manual")||B(this)},w=(a,...u)=>S(this,[a,...u],void 0,function*(p,d=!1){const _=this.hasAttribute("data-limit")?parseInt(this.getAttribute("data-limit")):100;d?C++:C=1;let v=this.getAttribute("data-url");v+=`${encodeURI(p)}&page[number]=${C}&page[size]=${_}`,this.hasAttribute("data-url-2")&&(v+=this.getAttribute("data-url-2"));const q=p;if(this.hasAttribute("data-postcode"))if(z(p))d||(r.innerHTML=""),r?.classList.add("loading"),r?.classList.remove("noresults"),t?.classList.remove("is-invalid"),s==null||(s.innerHTML=""),r?.classList.remove("show-welsh-banner"),Array.from(this.querySelectorAll("[data-required]")).forEach(y=>{y.removeAttribute("required")}),Array.from(this.querySelectorAll("[data-readonly]")).forEach(y=>{y.removeAttribute("readonly"),y.classList.remove("is-valid")}),Array.from(this.querySelectorAll(".inserted")).forEach(y=>{y.remove()});else return"Invalid postcode, please enter a valid postcode";this.classList.add("searched"),this.classList.add("was-validated"),window.controller||(window.controller=[]),window.controller[v]&&window.controller[v].abort(),window.controller[v]=new AbortController;const{signal:J}=controller[v];try{return yield fetch(v,{signal:J,method:"get",credentials:"same-origin",headers:new Headers({"Content-Type":"application/json",Accept:"application/json","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":V.get("XSRF-TOKEN")})}).then(y=>y.json()).then(y=>{var H;let E="";const D=y.data?y.data:y;return D.forEach(g=>{if(typeof g.attributes=="object"&&g.attributes.label){const M=JSON.stringify(g.attributes);E+=`<option data-values='${M}' >${g.attributes.label}</option>`}else if(typeof g.value=="object"){const M=JSON.stringify(g.value);E+=`<option data-values='${M}'>${g.label}, ${q}</option>`}else{const M=JSON.stringify(g);if(x)E+=`<option data-values='${M}'>${g[x]}, ${q}</option>`;else{let $="";for(const[T,G]of Object.entries(g))T=="address_number_name"?$+=`${G} `:T!="postcode"&&T!="address_title"&&T!="group"&&($+=`${G}${/^-?\d+$/.test(G)?"":","} `);E+=`<option data-values='${M}'>${$}, ${q}</option>`}}}),d?r.innerHTML+=E:r.innerHTML=E,D.length?r?.classList.remove("loading"):(r?.classList.remove("loading"),r?.classList.add("noresults")),y.meta&&y.meta.current_page&&y.meta.total_pages&&y.meta.total_pages>y.meta.current_page?b==null||(b.innerHTML=`<div class="bg-light text-center p-2"><p class="m-0">Showing 1-${y.meta.current_page*_} of ${y.meta.total_results} addresses <br /><button type="button" data-next="${y.meta.current_page+1}" class="mt-1 mb-0 btn btn-action"><i class="fa-regular fa-eye me-1"></i>Show more addresses</button></p></div>`):b==null||(b.innerHTML=""),y.meta&&y.meta.welsh_language&&r?.classList.add("show-welsh-banner"),n?.focus(),(H=r?.querySelector("option"))===null||H===void 0||H.focus(),!0})}catch(y){return console.log(y),"There has been a problem. Please try again in a few moments."}});if(this.hasAttribute("data-force-manual")||B(this),this.addEventListener("filled",()=>{this.hasAttribute("data-force-manual")||B(this)}),this.hasAttribute("data-use")){const u=`<div><input type="checkbox" name="use" id="use" value="yes"><label for="use">${this.hasAttribute("data-use-label")?this.getAttribute("data-use-label"):"Use saved address"}</label></div>`;if(c.insertAdjacentHTML("afterbegin",u),this.shadowRoot.addEventListener("change",p=>{if(p&&p.target instanceof HTMLElement&&p.target.closest('[name="use"]')&&p.target.closest('[name="use"]').checked){c.classList.add("js-hide"),l.classList.remove("js-hide");const _=JSON.parse(this.getAttribute("data-use"));Object.keys(_).forEach(v=>{const q=_[v];this.querySelector(`[data-name="${v}"]`)?this.querySelector(`[data-name="${v}"]`).value=q:this.querySelector(`[name="${v}"]`)&&(this.querySelector(`[name="${v}"]`).value=q)})}}),this.hasAttribute("data-use-default")){c.querySelector('[name="use"]').checked=!0;const p=JSON.parse(this.getAttribute("data-use"));N(p)}}this.hasAttribute("data-manual")&&N({}),this.classList.contains("show-pagination")&&(b==null||(b.innerHTML='<div class="bg-light text-center p-2"><p class="m-0">Showing 1-500 of 585 addresses <br /><button type="button" data-next="2" class="mt-1 mb-0 btn btn-action"><i class="fa-regular fa-eye me-1"></i>Show more addresses</button></p></div>')),this.classList.contains("scroll-to-bottom-results")&&b.scrollIntoView({container:"nearest"}),K.addEventListener("click",()=>{f.classList.add("js-hide"),R()}),U.addEventListener("click",()=>{f.classList.add("js-hide"),c.classList.remove("js-hide"),l.classList.add("js-hide"),r.innerHTML="",r?.classList.remove("loading"),r?.classList.remove("noresults"),t?.classList.remove("is-invalid"),s==null||(s.innerHTML=""),r?.classList.remove("show-welsh-banner"),t.focus(),t.value="",t?.hasAttribute("data-placeholder")&&t.setAttribute("placeholder",t?.getAttribute("data-placeholder"));const a=new CustomEvent("switch-to-lookup");this.dispatchEvent(a),c.scrollIntoView()}),i.addEventListener("click",()=>{R()}),this.addEventListener("open-manual",()=>{R()}),L.addEventListener("click",()=>{c.classList.remove("js-hide"),l.classList.add("js-hide");const a=new CustomEvent("switch-to-lookup");this.dispatchEvent(a),c.scrollIntoView()}),t.addEventListener("keyup",a=>S(this,void 0,void 0,function*(){if(![40,38,13].includes(a.keyCode)&&t.value.length>=P){const u=yield w(t.value);u!=!0&&(t?.classList.add("is-invalid"),s==null||(s.innerHTML=u))}if(a.keyCode==13){const u=yield w(t.value);u!=!0&&(t?.classList.add("is-invalid"),s==null||(s.innerHTML=u))}})),t.addEventListener("change",()=>S(this,void 0,void 0,function*(){if(t.value.length>=P){const a=yield w(t.value);a!=!0&&(t?.classList.add("is-invalid"),s==null||(s.innerHTML=a))}})),r.addEventListener("click",a=>{if(a.target.tagName=="OPTION"){const u=JSON.parse(a.target.getAttribute("data-values"));N(u),this.shadowRoot.querySelector('[name="use"]')&&(this.shadowRoot.querySelector('[name="use"]').checked=!1)}}),A?.addEventListener("input",a=>{Array.from(A.querySelectorAll("[data-required]")).forEach(u=>{u.setAttribute("required","true")}),I()}),k?.addEventListener("click",()=>S(this,void 0,void 0,function*(){const a=yield w(t.value);a!=!0&&(t?.classList.add("is-invalid"),s==null||(s.innerHTML=a))})),this===null||this===void 0||this.addEventListener("search",()=>S(this,void 0,void 0,function*(){const a=yield w(t.value);a!=!0&&(t?.classList.add("is-invalid"),s==null||(s.innerHTML=a))})),this===null||this===void 0||this.addEventListener("close-button-pressed",()=>{r.innerHTML="",r?.classList.remove("loading"),r?.classList.remove("noresults"),t?.classList.remove("is-invalid"),s==null||(s.innerHTML=""),r?.classList.remove("show-welsh-banner"),t.focus()}),b?.addEventListener("click",a=>S(this,void 0,void 0,function*(){if(a.target.tagName=="BUTTON"){const u=yield w(t.value,!0);u!=!0&&(t?.classList.add("is-invalid"),s==null||(s.innerHTML=u))}})),Y(this,t,r,!0)})}}const Z=[{id:"urn:iamproperty:country:AF",country_name:"Afghanistan"},{id:"urn:iamproperty:country:AX",country_name:"Aland Islands"},{id:"urn:iamproperty:country:AL",country_name:"Albania"},{id:"urn:iamproperty:country:DZ",country_name:"Algeria"},{id:"urn:iamproperty:country:AS",country_name:"American Samoa"},{id:"urn:iamproperty:country:AD",country_name:"Andorra"},{id:"urn:iamproperty:country:AO",country_name:"Angola"},{id:"urn:iamproperty:country:AI",country_name:"Anguilla"},{id:"urn:iamproperty:country:AQ",country_name:"Antarctica"},{id:"urn:iamproperty:country:AG",country_name:"Antigua and Barbuda"},{id:"urn:iamproperty:country:AR",country_name:"Argentina"},{id:"urn:iamproperty:country:AM",country_name:"Armenia"},{id:"urn:iamproperty:country:AW",country_name:"Aruba"},{id:"urn:iamproperty:country:AU",country_name:"Australia"},{id:"urn:iamproperty:country:AT",country_name:"Austria"},{id:"urn:iamproperty:country:AZ",country_name:"Azerbaijan"},{id:"urn:iamproperty:country:BS",country_name:"Bahamas"},{id:"urn:iamproperty:country:BH",country_name:"Bahrain"},{id:"urn:iamproperty:country:BD",country_name:"Bangladesh"},{id:"urn:iamproperty:country:BB",country_name:"Barbados"},{id:"urn:iamproperty:country:BY",country_name:"Belarus"},{id:"urn:iamproperty:country:BE",country_name:"Belgium"},{id:"urn:iamproperty:country:BZ",country_name:"Belize"},{id:"urn:iamproperty:country:BJ",country_name:"Benin"},{id:"urn:iamproperty:country:BM",country_name:"Bermuda"},{id:"urn:iamproperty:country:BT",country_name:"Bhutan"},{id:"urn:iamproperty:country:BO",country_name:"Bolivia (Plurinational State of)"},{id:"urn:iamproperty:country:BQ",country_name:"Bonaire, Sint Eustatius and Saba"},{id:"urn:iamproperty:country:BA",country_name:"Bosnia and Herzegovina"},{id:"urn:iamproperty:country:BW",country_name:"Botswana"},{id:"urn:iamproperty:country:BV",country_name:"Bouvet Island"},{id:"urn:iamproperty:country:BR",country_name:"Brazil"},{id:"urn:iamproperty:country:IO",country_name:"British Indian Ocean Territory"},{id:"urn:iamproperty:country:BN",country_name:"Brunei Darussalam"},{id:"urn:iamproperty:country:BG",country_name:"Bulgaria"},{id:"urn:iamproperty:country:BF",country_name:"Burkina Faso"},{id:"urn:iamproperty:country:BI",country_name:"Burundi"},{id:"urn:iamproperty:country:KH",country_name:"Cambodia"},{id:"urn:iamproperty:country:CM",country_name:"Cameroon"},{id:"urn:iamproperty:country:CA",country_name:"Canada"},{id:"urn:iamproperty:country:CV",country_name:"Cabo Verde"},{id:"urn:iamproperty:country:KY",country_name:"Cayman Islands"},{id:"urn:iamproperty:country:CF",country_name:"Central African Republic"},{id:"urn:iamproperty:country:TD",country_name:"Chad"},{id:"urn:iamproperty:country:CL",country_name:"Chile"},{id:"urn:iamproperty:country:CN",country_name:"China"},{id:"urn:iamproperty:country:CX",country_name:"Christmas Island"},{id:"urn:iamproperty:country:CC",country_name:"Cocos (Keeling) Islands"},{id:"urn:iamproperty:country:CO",country_name:"Colombia"},{id:"urn:iamproperty:country:KM",country_name:"Comoros"},{id:"urn:iamproperty:country:CG",country_name:"Congo"},{id:"urn:iamproperty:country:CD",country_name:"Congo (Democratic Republic of the)"},{id:"urn:iamproperty:country:CK",country_name:"Cook Islands"},{id:"urn:iamproperty:country:CR",country_name:"Costa Rica"},{id:"urn:iamproperty:country:CI",country_name:"C\xF4te d\u2019Ivoire"},{id:"urn:iamproperty:country:HR",country_name:"Croatia"},{id:"urn:iamproperty:country:CU",country_name:"Cuba"},{id:"urn:iamproperty:country:CW",country_name:"Cura\xE7ao"},{id:"urn:iamproperty:country:CY",country_name:"Cyprus"},{id:"urn:iamproperty:country:CZ",country_name:"Czech Republic"},{id:"urn:iamproperty:country:DK",country_name:"Denmark"},{id:"urn:iamproperty:country:DJ",country_name:"Djibouti"},{id:"urn:iamproperty:country:DM",country_name:"Dominica"},{id:"urn:iamproperty:country:DO",country_name:"Dominican Republic"},{id:"urn:iamproperty:country:EC",country_name:"Ecuador"},{id:"urn:iamproperty:country:EG",country_name:"Egypt"},{id:"urn:iamproperty:country:SV",country_name:"El Salvador"},{id:"urn:iamproperty:country:GQ",country_name:"Equatorial Guinea"},{id:"urn:iamproperty:country:ER",country_name:"Eritrea"},{id:"urn:iamproperty:country:EE",country_name:"Estonia"},{id:"urn:iamproperty:country:ET",country_name:"Ethiopia"},{id:"urn:iamproperty:country:FK",country_name:"Falkland Islands (Malvinas)"},{id:"urn:iamproperty:country:FO",country_name:"Faroe Islands"},{id:"urn:iamproperty:country:FJ",country_name:"Fiji"},{id:"urn:iamproperty:country:FI",country_name:"Finland"},{id:"urn:iamproperty:country:FR",country_name:"France"},{id:"urn:iamproperty:country:GF",country_name:"French Guiana"},{id:"urn:iamproperty:country:PF",country_name:"French Polynesia"},{id:"urn:iamproperty:country:TF",country_name:"French Southern Territories"},{id:"urn:iamproperty:country:GA",country_name:"Gabon"},{id:"urn:iamproperty:country:GM",country_name:"Gambia"},{id:"urn:iamproperty:country:GE",country_name:"Georgia"},{id:"urn:iamproperty:country:DE",country_name:"Germany"},{id:"urn:iamproperty:country:GH",country_name:"Ghana"},{id:"urn:iamproperty:country:GI",country_name:"Gibraltar"},{id:"urn:iamproperty:country:GR",country_name:"Greece"},{id:"urn:iamproperty:country:GL",country_name:"Greenland"},{id:"urn:iamproperty:country:GD",country_name:"Grenada"},{id:"urn:iamproperty:country:GP",country_name:"Guadeloupe"},{id:"urn:iamproperty:country:GU",country_name:"Guam"},{id:"urn:iamproperty:country:GT",country_name:"Guatemala"},{id:"urn:iamproperty:country:GG",country_name:"Guernsey"},{id:"urn:iamproperty:country:GN",country_name:"Guinea"},{id:"urn:iamproperty:country:GW",country_name:"Guinea-Bissau"},{id:"urn:iamproperty:country:GY",country_name:"Guyana"},{id:"urn:iamproperty:country:HT",country_name:"Haiti"},{id:"urn:iamproperty:country:HM",country_name:"Heard Island and McDonald Islands"},{id:"urn:iamproperty:country:VA",country_name:"Holy See"},{id:"urn:iamproperty:country:HN",country_name:"Honduras"},{id:"urn:iamproperty:country:HK",country_name:"Hong Kong"},{id:"urn:iamproperty:country:HU",country_name:"Hungary"},{id:"urn:iamproperty:country:IS",country_name:"Iceland"},{id:"urn:iamproperty:country:IN",country_name:"India"},{id:"urn:iamproperty:country:ID",country_name:"Indonesia"},{id:"urn:iamproperty:country:IR",country_name:"Iran (Islamic Republic of)"},{id:"urn:iamproperty:country:IQ",country_name:"Iraq"},{id:"urn:iamproperty:country:IE",country_name:"Ireland"},{id:"urn:iamproperty:country:IM",country_name:"Isle of Man"},{id:"urn:iamproperty:country:IL",country_name:"Israel"},{id:"urn:iamproperty:country:IT",country_name:"Italy"},{id:"urn:iamproperty:country:JM",country_name:"Jamaica"},{id:"urn:iamproperty:country:JP",country_name:"Japan"},{id:"urn:iamproperty:country:JE",country_name:"Jersey"},{id:"urn:iamproperty:country:JO",country_name:"Jordan"},{id:"urn:iamproperty:country:KZ",country_name:"Kazakhstan"},{id:"urn:iamproperty:country:KE",country_name:"Kenya"},{id:"urn:iamproperty:country:KI",country_name:"Kiribati"},{id:"urn:iamproperty:country:KP",country_name:"Korea (Democratic People's Republic of)"},{id:"urn:iamproperty:country:KR",country_name:"Korea (Republic of)"},{id:"urn:iamproperty:country:KW",country_name:"Kuwait"},{id:"urn:iamproperty:country:KG",country_name:"Kyrgyzstan"},{id:"urn:iamproperty:country:LA",country_name:"Lao People's Democratic Republic"},{id:"urn:iamproperty:country:LV",country_name:"Latvia"},{id:"urn:iamproperty:country:LB",country_name:"Lebanon"},{id:"urn:iamproperty:country:LS",country_name:"Lesotho"},{id:"urn:iamproperty:country:LR",country_name:"Liberia"},{id:"urn:iamproperty:country:LY",country_name:"Libya"},{id:"urn:iamproperty:country:LI",country_name:"Liechtenstein"},{id:"urn:iamproperty:country:LT",country_name:"Lithuania"},{id:"urn:iamproperty:country:LU",country_name:"Luxembourg"},{id:"urn:iamproperty:country:MO",country_name:"Macao"},{id:"urn:iamproperty:country:MK",country_name:"Republic of North Macedonia"},{id:"urn:iamproperty:country:MG",country_name:"Madagascar"},{id:"urn:iamproperty:country:MW",country_name:"Malawi"},{id:"urn:iamproperty:country:MY",country_name:"Malaysia"},{id:"urn:iamproperty:country:MV",country_name:"Maldives"},{id:"urn:iamproperty:country:ML",country_name:"Mali"},{id:"urn:iamproperty:country:MT",country_name:"Malta"},{id:"urn:iamproperty:country:MH",country_name:"Marshall Islands"},{id:"urn:iamproperty:country:MQ",country_name:"Martinique"},{id:"urn:iamproperty:country:MR",country_name:"Mauritania"},{id:"urn:iamproperty:country:MU",country_name:"Mauritius"},{id:"urn:iamproperty:country:YT",country_name:"Mayotte"},{id:"urn:iamproperty:country:MX",country_name:"Mexico"},{id:"urn:iamproperty:country:FM",country_name:"Micronesia (Federated States of)"},{id:"urn:iamproperty:country:MD",country_name:"Moldova (Republic of)"},{id:"urn:iamproperty:country:MC",country_name:"Monaco"},{id:"urn:iamproperty:country:MN",country_name:"Mongolia"},{id:"urn:iamproperty:country:ME",country_name:"Montenegro"},{id:"urn:iamproperty:country:MS",country_name:"Montserrat"},{id:"urn:iamproperty:country:MA",country_name:"Morocco"},{id:"urn:iamproperty:country:MZ",country_name:"Mozambique"},{id:"urn:iamproperty:country:MM",country_name:"Myanmar"},{id:"urn:iamproperty:country:NA",country_name:"Namibia"},{id:"urn:iamproperty:country:NR",country_name:"Nauru"},{id:"urn:iamproperty:country:NP",country_name:"Nepal"},{id:"urn:iamproperty:country:NL",country_name:"Netherlands"},{id:"urn:iamproperty:country:NC",country_name:"New Caledonia"},{id:"urn:iamproperty:country:NZ",country_name:"New Zealand"},{id:"urn:iamproperty:country:NI",country_name:"Nicaragua"},{id:"urn:iamproperty:country:NE",country_name:"Niger"},{id:"urn:iamproperty:country:NG",country_name:"Nigeria"},{id:"urn:iamproperty:country:NU",country_name:"Niue"},{id:"urn:iamproperty:country:NF",country_name:"Norfolk Island"},{id:"urn:iamproperty:country:MP",country_name:"Northern Mariana Islands"},{id:"urn:iamproperty:country:NO",country_name:"Norway"},{id:"urn:iamproperty:country:OM",country_name:"Oman"},{id:"urn:iamproperty:country:PK",country_name:"Pakistan"},{id:"urn:iamproperty:country:PW",country_name:"Palau"},{id:"urn:iamproperty:country:PS",country_name:"Palestine, State of"},{id:"urn:iamproperty:country:PA",country_name:"Panama"},{id:"urn:iamproperty:country:PG",country_name:"Papua New Guinea"},{id:"urn:iamproperty:country:PY",country_name:"Paraguay"},{id:"urn:iamproperty:country:PE",country_name:"Peru"},{id:"urn:iamproperty:country:PH",country_name:"Philippines"},{id:"urn:iamproperty:country:PN",country_name:"Pitcairn"},{id:"urn:iamproperty:country:PL",country_name:"Poland"},{id:"urn:iamproperty:country:PT",country_name:"Portugal"},{id:"urn:iamproperty:country:PR",country_name:"Puerto Rico"},{id:"urn:iamproperty:country:QA",country_name:"Qatar"},{id:"urn:iamproperty:country:RE",country_name:"R\xE9union"},{id:"urn:iamproperty:country:RO",country_name:"Romania"},{id:"urn:iamproperty:country:RU",country_name:"Russian Federation"},{id:"urn:iamproperty:country:RW",country_name:"Rwanda"},{id:"urn:iamproperty:country:BL",country_name:"Saint Barth\xE9lemy"},{id:"urn:iamproperty:country:SH",country_name:"Saint Helena, Ascension and Tristan da Cunha"},{id:"urn:iamproperty:country:KN",country_name:"Saint Kitts and Nevis"},{id:"urn:iamproperty:country:LC",country_name:"Saint Lucia"},{id:"urn:iamproperty:country:MF",country_name:"Saint Martin (French part)"},{id:"urn:iamproperty:country:PM",country_name:"Saint Pierre and Miquelon"},{id:"urn:iamproperty:country:VC",country_name:"Saint Vincent and the Grenadines"},{id:"urn:iamproperty:country:WS",country_name:"Samoa"},{id:"urn:iamproperty:country:SM",country_name:"San Marino"},{id:"urn:iamproperty:country:ST",country_name:"Sao Tome and Principe"},{id:"urn:iamproperty:country:SA",country_name:"Saudi Arabia"},{id:"urn:iamproperty:country:SN",country_name:"Senegal"},{id:"urn:iamproperty:country:RS",country_name:"Serbia"},{id:"urn:iamproperty:country:SC",country_name:"Seychelles"},{id:"urn:iamproperty:country:SL",country_name:"Sierra Leone"},{id:"urn:iamproperty:country:SG",country_name:"Singapore"},{id:"urn:iamproperty:country:SX",country_name:"Sint Maarten (Dutch part)"},{id:"urn:iamproperty:country:SK",country_name:"Slovakia"},{id:"urn:iamproperty:country:SI",country_name:"Slovenia"},{id:"urn:iamproperty:country:SB",country_name:"Solomon Islands"},{id:"urn:iamproperty:country:SO",country_name:"Somalia"},{id:"urn:iamproperty:country:ZA",country_name:"South Africa"},{id:"urn:iamproperty:country:GS",country_name:"South Georgia and the South Sandwich Islands"},{id:"urn:iamproperty:country:SS",country_name:"South Sudan"},{id:"urn:iamproperty:country:ES",country_name:"Spain"},{id:"urn:iamproperty:country:LK",country_name:"Sri Lanka"},{id:"urn:iamproperty:country:SD",country_name:"Sudan"},{id:"urn:iamproperty:country:SR",country_name:"Suriname"},{id:"urn:iamproperty:country:SJ",country_name:"Svalbard and Jan Mayen"},{id:"urn:iamproperty:country:SZ",country_name:"The Kingdom of Eswatini"},{id:"urn:iamproperty:country:SE",country_name:"Sweden"},{id:"urn:iamproperty:country:CH",country_name:"Switzerland"},{id:"urn:iamproperty:country:SY",country_name:"Syrian Arab Republic"},{id:"urn:iamproperty:country:TW",country_name:"Taiwan, Province of China"},{id:"urn:iamproperty:country:TJ",country_name:"Tajikistan"},{id:"urn:iamproperty:country:TZ",country_name:"Tanzania, United Republic of"},{id:"urn:iamproperty:country:TH",country_name:"Thailand"},{id:"urn:iamproperty:country:TL",country_name:"Timor-Leste"},{id:"urn:iamproperty:country:TG",country_name:"Togo"},{id:"urn:iamproperty:country:TK",country_name:"Tokelau"},{id:"urn:iamproperty:country:TO",country_name:"Tonga"},{id:"urn:iamproperty:country:TT",country_name:"Trinidad and Tobago"},{id:"urn:iamproperty:country:TN",country_name:"Tunisia"},{id:"urn:iamproperty:country:TR",country_name:"Republic of T\xFCrkiye"},{id:"urn:iamproperty:country:TM",country_name:"Turkmenistan"},{id:"urn:iamproperty:country:TC",country_name:"Turks and Caicos Islands"},{id:"urn:iamproperty:country:TV",country_name:"Tuvalu"},{id:"urn:iamproperty:country:UG",country_name:"Uganda"},{id:"urn:iamproperty:country:UA",country_name:"Ukraine"},{id:"urn:iamproperty:country:AE",country_name:"United Arab Emirates"},{id:"urn:iamproperty:country:GB",country_name:"United Kingdom of Great Britain and Northern Ireland"},{id:"urn:iamproperty:country:US",country_name:"United States of America"},{id:"urn:iamproperty:country:UM",country_name:"United States Minor Outlying Islands"},{id:"urn:iamproperty:country:UY",country_name:"Uruguay"},{id:"urn:iamproperty:country:UZ",country_name:"Uzbekistan"},{id:"urn:iamproperty:country:VU",country_name:"Vanuatu"},{id:"urn:iamproperty:country:VE",country_name:"Venezuela (Bolivarian Republic of)"},{id:"urn:iamproperty:country:VN",country_name:"Viet Nam"},{id:"urn:iamproperty:country:VG",country_name:"Virgin Islands (British)"},{id:"urn:iamproperty:country:VI",country_name:"Virgin Islands (U.S.)"},{id:"urn:iamproperty:country:WF",country_name:"Wallis and Futuna"},{id:"urn:iamproperty:country:EH",country_name:"Western Sahara"},{id:"urn:iamproperty:country:YE",country_name:"Yemen"},{id:"urn:iamproperty:country:ZM",country_name:"Zambia"},{id:"urn:iamproperty:country:ZW",country_name:"Zimbabwe"}],X=[{id:"urn:iamproperty:county:ekHuOPAhk",county:"Monmouthshire"},{id:"urn:iamproperty:county:AEbmaIiuw",county:"Cambridgeshire"},{id:"urn:iamproperty:county:HN2Hekmbp",county:"South Lanarkshire"},{id:"urn:iamproperty:county:520Tnh4wg",county:"Derbyshire"},{id:"urn:iamproperty:county:l5UCrwlvB",county:"Devon"},{id:"urn:iamproperty:county:GCA8Jh6Ic",county:"Bristol"},{id:"urn:iamproperty:county:Mi1lAB5uQ",county:"Rhondda Cynon Taf"},{id:"urn:iamproperty:county:n4jPkt4qP",county:"Carmarthenshire"},{id:"urn:iamproperty:county:XO1G4TTb5",county:"Aberdeenshire"},{id:"urn:iamproperty:county:JIaxjhlxx",county:"North Somerset"},{id:"urn:iamproperty:county:hLrOnlFfB",county:"Nottinghamshire"},{id:"urn:iamproperty:county:oGMGorIRg",county:"Durham"},{id:"urn:iamproperty:county:eBaLXgG8Y",county:"Isle of Wight"},{id:"urn:iamproperty:county:NMsdqInpw",county:"Northamptonshire"},{id:"urn:iamproperty:county:xRBQIke3k",county:"Warwickshire"},{id:"urn:iamproperty:county:R7yUpOlb4",county:"Berwickshire"},{id:"urn:iamproperty:county:S9DHMO2Hh",county:"East Sussex"},{id:"urn:iamproperty:county:rj4pK09x7",county:"Denbighshire"},{id:"urn:iamproperty:county:vuduFOMex",county:"Lanarkshire"},{id:"urn:iamproperty:county:5W66e6apO",county:"East Riding of Yorkshire"},{id:"urn:iamproperty:county:Hb6eqUJQj",county:"North Ayrshire"},{id:"urn:iamproperty:county:fwRrCvJ4C",county:"Greater Manchester"},{id:"urn:iamproperty:county:aekGxogbo",county:"East Renfrewshire"},{id:"urn:iamproperty:county:f3srYWllA",county:"Cardiff"},{id:"urn:iamproperty:county:DhVZEpSj5",county:"West Lothian"},{id:"urn:iamproperty:county:URWWHN7s0",county:"Dorset"},{id:"urn:iamproperty:county:jYK8wiDnY",county:"Leicestershire"},{id:"urn:iamproperty:county:048PGRA4X",county:"Blaenau Gwent"},{id:"urn:iamproperty:county:wrHCVsCva",county:"Berkshire"},{id:"urn:iamproperty:county:cCH4TjJ9q",county:"Norfolk"},{id:"urn:iamproperty:county:mvHEsdXhM",county:"Suffolk"},{id:"urn:iamproperty:county:faXBprr9q",county:"East Ayrshire"},{id:"urn:iamproperty:county:5wGBTbwou",county:"Conwy"},{id:"urn:iamproperty:county:5YXi0mQkk",county:"Cheshire"},{id:"urn:iamproperty:county:fuYiP18oc",county:"Bridgend"},{id:"urn:iamproperty:county:QaX0cXbOV",county:"West Yorkshire"},{id:"urn:iamproperty:county:Lo7JLx9og",county:"South Gloucestershire"},{id:"urn:iamproperty:county:B64E1f4T3",county:"Merthyr Tydfil"},{id:"urn:iamproperty:county:vacNt3Iie",county:"Banffshire"},{id:"urn:iamproperty:county:HSETldFbK",county:"Staffordshire"},{id:"urn:iamproperty:county:njUDNfLD3",county:"Western Isles"},{id:"urn:iamproperty:county:smlxqTdZE",county:"Bath and North East Somerset"},{id:"urn:iamproperty:county:2asBQ47Jh",county:"South Yorkshire"},{id:"urn:iamproperty:county:5hYXpCuJ7",county:"Stirling"},{id:"urn:iamproperty:county:lhFYBMSuq",county:"Powys"},{id:"urn:iamproperty:county:PamgW3ebq",county:"Vale of Glamorgan"},{id:"urn:iamproperty:county:zIasSsrlZ",county:"Clackmannanshire"},{id:"urn:iamproperty:county:WZUQNZxOy",county:"Lancashire"},{id:"urn:iamproperty:county:HoTgPpS58",county:"Hertfordshire"},{id:"urn:iamproperty:county:oNrluXBHA",county:"Fife"},{id:"urn:iamproperty:county:2OxE9CASK",county:"Neath Port Talbot"},{id:"urn:iamproperty:county:9J7YezLBA",county:"Highland"},{id:"urn:iamproperty:county:7IfpMh1Gx",county:"Ceredigion"},{id:"urn:iamproperty:county:ZwQ3mTTE2",county:"Orkney Islands"},{id:"urn:iamproperty:county:ZyNmV7NCn",county:"North Yorkshire"},{id:"urn:iamproperty:county:LwrVeERzu",county:"Pembrokeshire"},{id:"urn:iamproperty:county:porOuVsSM",county:"Wrexham"},{id:"urn:iamproperty:county:3o4Rx4sO8",county:"Renfrewshire"},{id:"urn:iamproperty:county:loLWjKyk8",county:"Oxfordshire"},{id:"urn:iamproperty:county:AN7Bz5tny",county:"Moray"},{id:"urn:iamproperty:county:RGzSdoQp3",county:"Ayrshire"},{id:"urn:iamproperty:county:nEBK48RIK",county:"Caithness"},{id:"urn:iamproperty:county:a90XABrjs",county:"West Dunbartonshire"},{id:"urn:iamproperty:county:Qjkb0wsyP",county:"West Sussex"},{id:"urn:iamproperty:county:fNJcfheKq",county:"Cornwall"},{id:"urn:iamproperty:county:lx0kEWvsb",county:"Anglesey"},{id:"urn:iamproperty:county:rkvgiBRHz",county:"Caerphilly"},{id:"urn:iamproperty:county:kx0t2zRVP",county:"Tyne and Wear"},{id:"urn:iamproperty:county:lVb75qnOW",county:"Merseyside"},{id:"urn:iamproperty:county:M7eZzrA8u",county:"Wiltshire"},{id:"urn:iamproperty:county:8Uo4sJw3x",county:"Perth and Kinross"},{id:"urn:iamproperty:county:73kc3w0cu",county:"Dumfries & Galloway"},{id:"urn:iamproperty:county:VFjExDeTO",county:"Swansea"},{id:"urn:iamproperty:county:lzsJuaRiS",county:"Isles of Scilly"},{id:"urn:iamproperty:county:abvvK0ZwH",county:"Worcestershire"},{id:"urn:iamproperty:county:1FKCbFkt2",county:"Scottish Borders"},{id:"urn:iamproperty:county:WKaOjrTLM",county:"Essex"},{id:"urn:iamproperty:county:0F00szlVA",county:"South Ayrshire"},{id:"urn:iamproperty:county:KDtAS0c8U",county:"Inverclyde"},{id:"urn:iamproperty:county:Md88sraTz",county:"Shetland Islands"},{id:"urn:iamproperty:county:LzzEE6zpp",county:"Herefordshire"},{id:"urn:iamproperty:county:lXaRRDNrq",county:"Angus"},{id:"urn:iamproperty:county:A5B4FFytC",county:"Surrey"},{id:"urn:iamproperty:county:B3siky9El",county:"Kent"},{id:"urn:iamproperty:county:V9njlL3kq",county:"Northumberland"},{id:"urn:iamproperty:county:WJiolIFFI",county:"Flintshire"},{id:"urn:iamproperty:county:4lXGX7NbU",county:"Gwynedd"},{id:"urn:iamproperty:county:7gzISbzTK",county:"Lincolnshire"},{id:"urn:iamproperty:county:D5GgqTxzN",county:"East Dunbartonshire"},{id:"urn:iamproperty:county:hhwXe4hTH",county:"Somerset"},{id:"urn:iamproperty:county:nECEnleYv",county:"Midlothian"},{id:"urn:iamproperty:county:2jksb8BIf",county:"Cumbria"},{id:"urn:iamproperty:county:ttfY8qr15",county:"Bedfordshire"},{id:"urn:iamproperty:county:YhQVg1amj",county:"West Midlands"},{id:"urn:iamproperty:county:EnbDIubYS",county:"North Lanarkshire"},{id:"urn:iamproperty:county:5SdVf3hnm",county:"Kincardineshire"},{id:"urn:iamproperty:county:BPedWUQXc",county:"Dunbartonshire"},{id:"urn:iamproperty:county:YLngqBWd4",county:"Hampshire"},{id:"urn:iamproperty:county:zBZHWiWon",county:"Buckinghamshire"},{id:"urn:iamproperty:county:kLes1W5ny",county:"East Lothian"},{id:"urn:iamproperty:county:yCMA4ANpN",county:"Rutland"},{id:"urn:iamproperty:county:jhourkJ4W",county:"Torfaen"},{id:"urn:iamproperty:county:aC8dF3IVE",county:"Newport"},{id:"urn:iamproperty:county:AnfqGRnhm",county:"Argyll & Bute"},{id:"urn:iamproperty:county:5BjmQe9mS",county:"Gloucestershire"},{id:"urn:iamproperty:county:G7WiUO5Sh",county:"Cleveland"},{id:"urn:iamproperty:county:zu7zHJPWh",county:"Shropshire"},{id:"urn:iamproperty:county:Bt301fwoy",county:"Greater London"},{id:"urn:iamproperty:county:LXHPqo5nj",county:"City of Edinburgh"},{id:"urn:iamproperty:county:YejLSQLAx",county:"Aberdeen City"},{id:"urn:iamproperty:county:o5lgD8dv7",county:"Dundee City"},{id:"urn:iamproperty:county:0HPMQtb09",county:"Falkirk"},{id:"urn:iamproperty:county:z1rPhQlGB",county:"Glasgow City"},{id:"urn:iamproperty:county:CskSiG5W0",county:"Brecknockshire"},{id:"urn:iamproperty:county:zulaN5fgu",county:"Caernarfonshire"},{id:"urn:iamproperty:county:D1YYNRchZ",county:"Cardiganshire"},{id:"urn:iamproperty:county:3DDFfQzoP",county:"Clwyd"},{id:"urn:iamproperty:county:hBr4CCduy",county:"Dyfed"},{id:"urn:iamproperty:county:7wcgGTpU9",county:"Antrim"},{id:"urn:iamproperty:county:PKM8DGZbI",county:"Armagh"},{id:"urn:iamproperty:county:LrvLXtQv4",county:"Down"},{id:"urn:iamproperty:county:HXDwhW1QG",county:"Fermanagh"},{id:"urn:iamproperty:county:eRHjMdT0e",county:"Londonderry"},{id:"urn:iamproperty:county:Xqs7aJsen",county:"Tyrone"},{id:"urn:iamproperty:county:rYAgcPlXZ",county:"Middlesex"}];let W="";Z.forEach(m=>{W+=`<option value="${m.id}" data-value="${m.country_name}">${m.country_name}</option>`});let j="";X.forEach(m=>{j+=`<option value="${m.id}" data-value="${m.county}">${m.county}</option>`}),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"customElementRegistered",element:"STD Address Lookup"});class Q extends HTMLElement{constructor(){super()}connectedCallback(){window.customElements.get("iam-address-lookup")||window.customElements.define("iam-address-lookup",F);const e=this.innerHTML;this.innerHTML=`<iam-address-lookup
|
|
56
56
|
class="${this.getAttribute("class")}"
|
|
57
57
|
data-url="/standardaddress.json?search_query="
|
|
58
58
|
data-postcode="true"
|
|
@@ -168,5 +168,5 @@
|
|
|
168
168
|
<p class="p-2"><span class="default">Welsh</span><span class="alt">English</span> language addresses are available <br /><button type="button" id="languageToggle" class="mt-1 mb-0 btn btn-action"><i class="fa-regular fa-globe me-1"></i>Show addresses in <span class="default">Welsh</span><span class="alt">English</span></button></p>
|
|
169
169
|
</div>
|
|
170
170
|
${e}
|
|
171
|
-
</iam-address-lookup>`;const
|
|
171
|
+
</iam-address-lookup>`;const o=this.querySelector("iam-address-lookup"),h=this.querySelector("#overseasToggle"),t=this.querySelector("#overseasToggleInline"),c=this.querySelector("#languageToggle"),l=this.querySelector(".overseas-atleastone"),f=this.querySelector(".overseas"),r=()=>{const n=new CustomEvent("open-manual");o.dispatchEvent(n),this.classList.add("show-overseas"),Array.from(o.querySelectorAll("[data-required]")).forEach(i=>{i.removeAttribute("required")}),Array.from(f.querySelectorAll("[data-overseas-required]")).forEach(i=>{i.setAttribute("required","true")})};h?.addEventListener("click",()=>{this.classList.contains("show-overseas")||r()}),t?.addEventListener("click",()=>{this.classList.contains("show-overseas")||r()}),o?.addEventListener("switch-to-lookup",()=>{this.classList.remove("show-overseas"),Array.from(f.querySelectorAll("[data-overseas-required]")).forEach(n=>{n.setAttribute("required","true")})}),c?.addEventListener("click",()=>{o.classList.contains("show-welsh")?(o.classList.remove("show-welsh"),o?.setAttribute("data-url-2","&welsh_language=false")):(o.classList.add("show-welsh"),o?.setAttribute("data-url-2","&welsh_language=true"));const n=new CustomEvent("search");o.dispatchEvent(n),c.focus()}),l?.addEventListener("input",n=>{Array.from(l.querySelectorAll("[data-overseas-required]")).forEach(i=>{i.setAttribute("required","true")}),l.querySelector("input:valid, input.is-valid")?Array.from(l.querySelectorAll("input")).forEach(i=>{i.removeAttribute("required")}):Array.from(l.querySelectorAll("input")).forEach(i=>{i.setAttribute("required","true")})})}}export{Q as default};
|
|
172
172
|
//# sourceMappingURL=std-address-lookup.component.min.js.map
|