PageSourceSearch

https://www.gmk.net/shop/theme/7d1a315ce48e8d9f5d8bd515339c7be4/js…s-tax.acris-tax-validation.plugin.4b3e0d.js

js gmk.net collected 2026-10-10 00:51:06 UTC 51,545 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[60411],{857:t=>{var e=function(t){var e;return!!t&&"object"==typeof t&&"[object RegExp]"!==(e=Object.prototype.toString.call(t))&&"[object Date]"!==e&&t.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(t,e){return!1!==e.clone&&e.isMergeableObject(t)?r(Array.isArray(t)?[]:{},t,e):t}function n(t,e,i){return t.concat(e).map(function(t){return s(t,i)})}function a(t){return Object.keys(t).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter(function(e){return Object.propertyIsEnumerable.call(t,e)}):[])}function o(t,e){try{return e in t}catch(t){return!1}}function r(t,i,l){(l=l||{}).arrayMerge=l.arrayMerge||n,l.isMergeableObject=l.isMergeableObject||e,l.cloneUnlessOtherwiseSpecified=s;var d,h,p=Array.isArray(i);return p!==Array.isArray(t)?s(i,l):p?l.arrayMerge(t,i,l):(h={},(d=l).isMergeableObject(t)&&a(t).forEach(function(e){h[e]=s(t[e],d)}),a(i).forEach(function(e){(!o(t,e)||Object.hasOwnProperty.call(t,e)&&Object.propertyIsEnumerable.call(t,e))&&(o(t,e)&&d.isMergeableObject(i[e])?h[e]=(function(t,e){if(!e.customMerge)return r;var i=e.customMerge(t);return"function"==typeof i?i:r})(e,d)(t[e],i[e],d):h[e]=s(i[e],d))}),h)}r.all=function(t,e){if(!Array.isArray(t))throw Error("first argument should be an array");return t.reduce(function(t,i){return r(t,i,e)},{})},t.exports=r},411:(t,e,i)=>{i.r(e),i.d(e,{default:()=>S});var s=i(293),n=i(49),a=i(107);class o{static iterate(t,e){if(t instanceof Map||Array.isArray(t))return t.forEach(e);if(t instanceof FormData){for(var i of t.entries())e(i[1],i[0]);return}if(t instanceof NodeList)return t.forEach(e);if(t instanceof HTMLCollection)return Array.from(t).forEach(e);if(t instanceof Object)return Object.keys(t).forEach(i=>{e(t[i],i)});throw Error("The element type ".concat(typeof t," is not iterable!"))}}let r="loader",l={BEFORE:"before",INNER:"inner"};class d{create(){if(!this.exists()){if(this.position===l.INNER){this.parent.innerHTML=d.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),d.getTemplate())}}remove(){let t=this.parent.querySelectorAll(".".concat(r));o.iterate(t,t=>t.remove())}exists(){return this.parent.querySelectorAll(".".concat(r)).length>0}_getPosition(){return this.position===l.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(r,'" role="status">\n                    <span class="').concat("visually-hidden",'">Loading...</span>\n                </div>')}static SELECTOR_CLASS(){return r}constructor(t,e=l.BEFORE){this.parent=t instanceof Element?t:document.body.querySelector(t),this.position=e}}let h="element-loader-backdrop";class p extends d{static create(t){t.classList.add("has-element-loader"),p.exists(t)||(p.appendLoader(t),setTimeout(()=>{let e=t.querySelector(".".concat(h));e&&e.classList.add("element-loader-backdrop-open")},1))}static remove(t){t.classList.remove("has-element-loader");let e=t.querySelector(".".concat(h));e&&e.remove()}static exists(t){return t.querySelectorAll(".".concat(h)).length>0}static getTemplate(){return'\n        <div class="'.concat(h,'">\n            <div class="loader" role="status">\n                <span class="').concat("visually-hidden",'">Loading...</span>\n            </div>\n        </div>\n        ')}static appendLoader(t){t.insertAdjacentHTML("beforeend",p.getTemplate())}}var c=new WeakSet;class u{static getSelectorName(t){return u._selectors.includes(t.at(0))?t.slice(1):t}getDataAttribute(t,e){var i;return(i=n.Z.getDataAttribute(t,e,!1))!==null&&void 0!==i?i:null}querySelector(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=(function(t,e,i){if(!e.has(t))throw TypeError("attempted to get private field on non-instance");return i})(this,c,g).call(this,t,e);return i?this.el.querySelector(i):null}constructor(t){!function(t,e){(function(t,e){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object")})(t,e),e.add(t)}(this,c),this.el=t}}function g(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""===e)return t;let i=e,s=t;return u._selectors.includes(t.at(0))&&(s=t.slice(1),i=u._selectors.includes(e.at(0))?t[0]+e.slice(1):t[0]+e),i+s}u._selectors=["#","."];class v{init(){this._initVars(),this._registerEvents()}_initVars(){this.el=this._domHelper.querySelector(this.options.vatIdFieldSelector),this.formGroup=this.el.closest(".form-group"),this._appendVatInfoWrapper()}
1_appendVatInfoWrapper(){if(null==this.formGroup)throw Error("Form group not found, cannot append vat info wrapper");let t=document.createElement("div");t.classList.add(u.getSelectorName(this.options.vatInfoWrapperSelector));let e=document.createElement("span");e.classList.add(u.getSelectorName(this.options.vatInfoTextSelector));let i=document.createElement("span");i.classList.add(u.getSelectorName(this.options.vatInfoExampleSelector)),t.appendChild(e),t.appendChild(i),this.formGroup.appendChild(t)}_registerEvents(){var t;(t=this.el)===null||void 0===t||t.addEventListener("change-country",this._onChange.bind(this))}_onChange(t){let{vatInfoText:e,vatExample:i}=t.detail;this._updateVatInformation(e,i)}_updateVatInformation(t,e){this._toggleVatInformation(t,e);let i=this.formGroup.querySelector(this.options.vatInfoTextSelector);null!=i&&(i.innerText=null!=t?t:"");let s=this.formGroup.querySelector(this.options.vatInfoExampleSelector);null!=s&&(s.innerText=e?this.options.vatExamplePrefix+e:"")}_toggleVatInformation(t,e){let i=this.formGroup.querySelector(this.options.vatInfoWrapperSelector);return null!=i&&((null==t||0===t.length)&&(null==e||0===e.length)?(i.classList.add("d-none"),!1):(i.classList.remove("d-none"),!0))}constructor(t,e=""){this.options={vatIdFieldSelector:"#addressvatId",vatInfoWrapperSelector:".acris-vat-info-wrapper",vatInfoTextSelector:".acris-vat-info-text",vatInfoExampleSelector:".acris-vat-info-example"},this._domHelper=new u(t),this.options.vatExamplePrefix=e,this.init()}}class y{init(){this._domHelper=new u(this.el),this.vatIdField=new v(this.el,this.options.vatExamplePrefix),this._initVars(),this._registerEvents(),this._dispatchEvents()}_initVars(){this.countryField=this._domHelper.querySelector(this.options.countryFieldSelector,this.options.prefix)}_registerEvents(){var t;(t=this.countryField)===null||void 0===t||t.addEventListener("change",this._onChangeCountry.bind(this))}_dispatchEvents(){let{selectedOption:t,vatInfoText:e,vatExample:i}=this._getCountryDetails(this.countryField);this._dispatchCountryEvent(t,e,i)}_onChangeCountry(t){let{selectedOption:e,vatInfoText:i,vatExample:s}=this._getCountryDetails(t.target);this._dispatchCountryEvent(e,i,s)}_getCountryDetails(t){var e;if(null==t)return;let i=(e=t.selectedOptions[0])!==null&&void 0!==e?e:null;if(null==i)return;let s=this._domHelper.getDataAttribute(i,"data-vat-info-text"),n=this._domHelper.getDataAttribute(i,"data-vat-example");return{selectedOption:i,vatInfoText:s,vatExample:n}}_dispatchCountryEvent(t,e,i){var s;(s=this.vatIdField.el)===null||void 0===s||s.dispatchEvent(new CustomEvent("change-country",{bubbles:!0,detail:{selectedOption:t,vatInfoText:e,vatExample:i}}))}constructor(t,e){this.el=t,this.options={...e,prefix:e.prefix||"",vatExamplePrefix:e.vatExamplePrefix||"",countryFieldSelector:"#AddressCountry"},this.init()}}class S extends s.Z{init(){this._initVars(),this._registerEvents(),this.acrisTaxService=new y(this.el,this.options)}_initVars(){this._client=new a.Z(window.accessKey,window.contextToken),this.validationInProcess=!1,this.options.entry===this.options.registerEntry?(this.vatIds=n.Z.querySelector(this.el,this.options.vatIdsSelector,!1),this.companyBilling=n.Z.querySelector(this.el,this.options.companyBillingSelector,!1),this.streetBilling=n.Z.querySelector(this.el,this.options.streetBillingSelector,!1),this.zipcodeBilling=n.Z.querySelector(this.el,this.options.zipcodeBillingSelector,!1),this.cityBilling=n.Z.querySelector(this.el,this.options.cityBillingSelector,!1),this.countryBilling=n.Z.querySelector(this.el,this.options.countryBillingSelector,!1),this.successMessage=n.Z.querySelector(this.el,this.options.successMessageSelector,!1)||null,this.errorMessage=n.Z.querySelector(this.el,this.options.errorMessageSelector,!1)||null,this.vatIdValidationMessage=n.Z.querySelector(this.el,this.options.vatIdValidationMessageSelector,!1),this.vatIdValidationMessageEmptyCountry=n.Z.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountrySelector,!1),this.vatIdValidationMessageFormat=n.Z.querySelector(this.el,this.options.vatIdValidationMessageFormatSelector,!1)||null,this.vatIdValidationMessageVatIdValidation=n.Z.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationSelector,!1),this.invalidFeedback=n.Z.querySelector(this.el,this.options.invalidFeedbackSelector,!1),this.elementIndicator=n.Z.querySelector(this.el,this.options.elementIndicatorSelector,!1),this.vatIdsShipping=n.Z.querySelector(this.el,this.options.vatIdsShippingSelector,!1),this.companyShipping=n.Z.querySelector(this.el,this.options.companyShippingSelector,!1),this.streetShipping=n.Z.querySelector(this.el,this.options.streetShippingSelector,!1),this.zipcodeShipping=n.Z.querySelector(this.el,this.options.zipcodeShippingSelector,!1),this.cityShipping=n.Z.querySelector(this.el,this.options.cityShippingSelector,!1),this.countryShipping=n.Z.querySelector(this.el,this.options.countryShippingSelector,!1),this.successMessageShipping=n.Z.querySelector(this.el,this.options.successMessageShippingSelector,!1),this.errorMessageShipping=n.Z.querySelector(this.el,this.options.errorMessageShippingSelector,!1),this.vatIdValidationMessageShipping=n.Z.querySelector(this.el,this.options.vatIdValidationMessageShippingSelector,!1),this.vatIdValidationMessageFormatShipping=n.Z.querySelector(this.el,this.options.vatIdValidationMessageFormatShippingSelector,!1),this.vatIdValidationMessageEmptyCountryShipping=n.Z.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountryShippingSelector,!1),this.vatIdValidationMessageVatIdValidationShipping=n.Z.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationShippingSelector,!1),this.invalidFeedbackShipping=n.Z.querySelector(this.el,this.options.invalidFeedbackShippingSelector,!1),this.elementIndicatorShipping=n.Z.querySelector(this.el,this.options.elementIndicatorShippingSelector,!1)):this.options.entry===this.options.addressPageEntry||this.options.entry===this.options.modalAddressPageEntry?(this.vatIds=n.Z.querySelector(this.el,this.options.vatIdsShippingSelector,!1),this.companyBilling=this.options.entry===this.options.addressPageEntry?n.Z.querySelector(this.el,this.options.companyAddressSelector,!1):n.Z.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.companyModalAddressSelector,!1),this.streetBilling=this.options.entry===this.options.addressPageEntry?n.Z.querySelector(this.el,this.options.streetAddressSelector,!1):n.Z.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.streetModalAddressSelector,!1),this.options.entry!==this.options.modalAddressPageEntry||this.streetBilling||(this.streetBilling=n.Z.querySelector(this.el,this.options.streetAddressSelector,!1)),this.zipcodeBilling=this.options.entry===this.options.addressPageEntry?n.Z.querySelector(this.el,this.options.zipcodeAddressSelector,!1):n.Z.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.zipcodeModalAddressSelector,!1),this.cityBilling=this.options.entry===this.options.addressPageEntry?n.Z.querySelector(this.el,this.options.cityAddressSelector,!1):n.Z.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.cityModalAddressSelector,!1),this.countryBilling=this.options.entry===this.options.addressPageEntry?n.Z.querySelector(this.el,this.options.countryAddressSelector,!1):n.Z.querySelector(this.el,this.options.modalAddressIdTag+this.options.typePrefix+this.options.countryModalAddressSelector,!1),this.successMessage=n.Z.querySelector(this.el,this.options.successMessageShippingSelector,!1)||null,this.errorMessage=n.Z.querySelector(this.el,this.options.errorMessageShippingSelector,!1)||null,this.vatIdValidationMessage=n.Z.querySelector(this.el,this.options.vatIdValidationMessageShippingSelector,!1),this.vatIdValidationMessageFormat=n.Z.querySelector(this.el,this.options.vatIdValidationMessageFormatShippingSelector,!1)||null,this.vatIdValidationMessageEmptyCountry=n.Z.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountryShippingSelector,!1),this.vatIdValidationMessageVatIdValidation=n.Z.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationShippingSelector,!1),this.invalidFeedback=n.Z.querySelector(this.el,this.options.invalidFeedbackShippingSelector,!1),this.elementIndicator=n.Z.querySelector(this.el,this.options.elementIndicatorShippingSelector,!1),this.vatIds||(this.vatIds=n.Z.querySelector(this.el,this.options.vatIdsSelector,!1),this.successMessage=n.Z.querySelector(this.el,this.options.successMessageSelector,!1)||null,this.errorMessage=n.Z.querySelector(this.el,this.options.errorMessageSelector,!1)||null,this.vatIdValidationMessage=n.Z.querySelector(this.el,this.options.vatIdValidationMessageSelector,!1),this.vatIdValidationMessageEmptyCountry=n.Z.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountrySelector,!1),this.vatIdValidationMessageFormat=n.Z.querySelector(this.el,this.options.vatIdValidationMessageFormatSelector,!1)||null,this.vatIdValidationMessageVatIdValidation=n.Z.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationSelector,!1),this.invalidFeedback=n.Z.querySelector(this.el,this.options.invalidFeedbackSelector,!1),this.elementIndicator=n.Z.querySelector(this.el,this.options.elementIndicatorSelector,!1))):this.options.entry===this.options.personalDataEntry&&(this.vatIds=n.Z.querySelector(this.el,this.options.vatIdsSelector,!1),this.companyBilling=n.Z.querySelector(this.el,this.options.personalCompanySelector,!1),this.successMessage=n.Z.querySelector(this.el,this.options.successMessageSelector,!1)||null,this.errorMessage=n.Z.querySelector(this.el,this.options.errorMessageSelector,!1)||null,this.vatIdValidationMessage=n.Z.querySelector(this.el,this.options.vatIdValidationMessageSelector,!1),this.vatIdValidationMessageEmptyCountry=n.Z.querySelector(this.el,this.options.vatIdValidationMessageEmptyCountrySelector,!1),this.vatIdValidationMessageFormat=n.Z.querySelector(this.el,this.options.vatIdValidationMessageFormatSelector,!1)||null,this.vatIdValidationMessageVatIdValidation=n.Z.querySelector(this.el,this.options.vatIdValidationMessageVatIdValidationSelector,!1),this.invalidFeedback=n.Z.querySelector(this.el,this.options.invalidFeedbackSelector,!1),this.elementIndicator=n.Z.querySelector(this.el,this.options.elementIndicatorSelector,!1))}_registerEvents(){this.options.entry===this.options.registerEntry?(this.vatIds&&(this.vatIds.addEventListener("input",this._onChange.bind(this)),this.vatIds.addEventListener("click",this._onChange.bind(this))),this.countryBilling&&this.countryBilling.addEventListener("change",this._onCountryChange.bind(this)),this.vatIdsShipping&&(this.vatIdsShipping.addEventListener("input",this._onChange.bind(this)),this.vatIdsShipping.addEventListener("click",this._onChange.bind(this))),this.countryShipping&&this.countryShipping.addEventListener("change",this._onCountryChangeShipping.bind(this))):this.options.entry===this.options.addressPageEntry||this.options.entry===this.options.modalAddressPageEntry?(this.vatIds&&(this.vatIds.addEventListener("input",this._onChange.bind(this)),this.vatIds.addEventListener("click",this._onChange.bind(this))),this.countryBilling&&this.countryBilling.addEventListener("change",this._onCountryChange.bind(this))):this.options.entry===this.options.personalDataEntry&&this.vatIds&&(this.vatIds.addEventListener("input",this._onChange.bind(this)),this.vatIds.addEventListener("click",this._onChange.bind(this)))}_onChange(t){if(!0!==this.validationInProcess)switch(this.options.entry){case this.options.registerEntry:t.target.id===this.options.billingAddressId?this._checkVatIdFormatAndValidate(t):t.target.id===this.options.shippingAddressId&&this._checkVatIdFormatAndValidateShipping(t);break;case this.options.addressPageEntry:case this.options.modalAddressPageEntry:this._checkVatIdFormatAndValidate(t);break;case this.options.personalDataEntry:this._checkVatIdFormatAndValidatePersonalData(t)}}_checkVatIdFormatAndValidate(t){this._removeValidMark(),this._onCheckAllFields(t.target),t.target.value=t.target.value.replace(/ /g,""),t.target.innerHTML=t.target.innerHTML.replace(/ /g,"");let e=t.target.value,i=this._checkVatIdFormat(e),s=e.substring(0,2),n=this.options.checkCountryIsoCodes[s],a=this.countryBilling&&this.countryBilling.value?this.countryBilling.value:"";if(!i){if("enableForAllEuCountries"===this.options.validateFormat||s&&"standard"===this.options.validateFormat&&n){if("enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(s,a))return;if(this.countryBilling&&e&&""!==e&&e.length>1&&(!this.countryBilling.value||""===this.countryBilling.value)){this._setEmptyCountryClass();return}this._displayFormatStatus(!1),this._setEmptyCountryClass(!1)}return}let o=this.options.countryIdsWithPattern[i],r=this.options.checkCountriesVatIdPattern[o];if(this.countryBilling&&o&&this.options.assignCategory&&(!this.countryBilling.value||""===this.countryBilling.value)){let t=this._getFallbackCountry(o,this.countryBilling);t&&(this.countryBilling.value=t,this.countryBilling.focus())}if(("enableForAllEuCountries"===this.options.validateFormat||s&&"standard"===this.options.validateFormat&&n)&&("enableForAllEuCountries"!==this.options.validateFormat||!this._skipValidation(s))){if(this.countryBilling&&this.countryBilling.value&&this.countryBilling.value!==o){this._displayFormatStatus(!1),this._setEmptyCountryClass(!1);return}this._displayFormatStatus(!0)}!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==r)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(s)||(this._createLoadingIndicator(this.elementIndicator),this._removeValidMark(),this.validationInProcess=!0,this._val
1idateVatIdApiService(e,o))}_checkVatIdFormatAndValidateShipping(t){this._removeValidMarkShipping(),this._onCheckAllFieldsShipping(t.target),t.target.value=t.target.value.replace(/ /g,""),t.target.innerHTML=t.target.innerHTML.replace(/ /g,"");let e=t.target.value,i=this._checkVatIdFormat(e),s=e.substring(0,2),n=this.options.checkCountryIsoCodes[s],a=this.countryShipping&&this.countryShipping.value?this.countryShipping.value:"";if(!i){if("enableForAllEuCountries"===this.options.validateFormat||s&&"standard"===this.options.validateFormat&&n){if("enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(s,a))return;if(this.countryShipping&&e&&""!==e&&e.length>1&&(!this.countryShipping.value||""===this.countryShipping.value)){this._setEmptyCountryClassShipping();return}this._displayFormatStatusShipping(!1),this._setEmptyCountryClassShipping(!1)}return}let o=this.options.countryIdsWithPattern[i],r=this.options.checkCountriesVatIdPattern[o];if(this.countryShipping&&o&&(!this.countryShipping.value||""===this.countryShipping.value)){let t=this._getFallbackCountry(o,this.countryShipping);t&&(this.countryShipping.value=t)}if(("enableForAllEuCountries"===this.options.validateFormat||s&&"standard"===this.options.validateFormat&&n)&&("enableForAllEuCountries"!==this.options.validateFormat||!this._skipValidation(s))){if(this.countryShipping.value&&this.countryShipping.value!==o){this._displayFormatStatusShipping(!1),this._setEmptyCountryClassShipping(!1);return}this._displayFormatStatusShipping(!0)}!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==r)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(s)||(this._createLoadingIndicator(this.elementIndicatorShipping),this._removeValidMarkShipping(),this.validationInProcess=!0,this._validateVatIdApiServiceShipping(e,o))}_checkVatIdFormatAndValidatePersonalData(t){this._removeValidMark(),this._onCheckAllFieldsPersonalData(t.target),t.target.value=t.target.value.replace(/ /g,""),t.target.innerHTML=t.target.innerHTML.replace(/ /g,"");let e=t.target.value,i=this._checkVatIdFormat(e),s=e.substring(0,2),n=this.options.countryId?this.options.countryId:"";if(!i){if("enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(s,n))return;("enableForAllEuCountries"===this.options.validateFormat||"standard"===this.options.validateFormat&&!0===this.options.countryCheckFormat)&&this._displayFormatStatus(!1);return}let a=this.options.countryIdsWithPattern[i],o=this.options.checkCountriesVatIdPattern[a];if(("enableForAllEuCountries"===this.options.validateFormat||"standard"===this.options.validateFormat&&this.options.countryCheckFormat)&&("enableForAllEuCountries"!==this.options.validateFormat||!this._skipValidation(s))){if(this.options.countryId&&this.options.countryId!==a){this._displayFormatStatus(!1);return}this._displayFormatStatus(!0)}!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==o)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(s)||(this._createLoadingIndicator(this.elementIndicator),this._removeValidMark(),this.validationInProcess=!0,this._validateVatIdApiServicePersonalData(e,a))}_onCountryChange(t){(t.target.id===this.options.billingCountryId||t.target.id===this.options.countryModalAddressSelector||t.target.id===this.options.billingAddressPrefix+this.options.countryModalAddressSelector||t.target.id===this.options.shippingAddressPrefix+this.options.countryModalAddressSelector)&&this._validateCountry(t),t.target.id===this.options.shippingCountryId&&this._validateCountryShipping(t)}_onCountryChangeShipping(t){t.target.id===this.options.shippingCountryId&&this._validateCountryShipping(t)}_validateCountry(t){if(!this.vatIds||!this.vatIds.value)return;this.vatIds.value=this.vatIds.value.replace(/ /g,""),this.vatIds.innerHTML=this.vatIds.innerHTML.replace(/ /g,"");let e=this.vatIds.value.substring(0,2),i=this.options.countryIdsIsoCodes[e],s=this._checkVatIdFormat(this.vatIds.value);if(!s)return;s&&!i&&(i=this.options.countryIdsWithPattern[s]);let n=t.target.value?t.target.value:"",a=this.options.checkCountryIsoCodes[e];if("enableForAllEuCountries"===this.options.validateFormat||e&&"standard"===this.options.validateFormat&&a){if(this._removeValidMark(),"enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(e,n))return;if(!i||t.target.value&&t.target.value!==i||!s){this._displayFormatStatus(!1);return}this._displayFormatStatus(!0)}let o=this.options.checkCountriesVatIdPattern[i];!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==o)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(e,n)||(this._createLoadingIndicator(this.elementIndicator),this._removeValidMark(),this._val
1idateVatIdApiService(this.vatIds.value,i))}_validateCountryShipping(t){if(!this.vatIdsShipping||!this.vatIdsShipping.value)return;this.vatIdsShipping.value=this.vatIdsShipping.value.replace(/ /g,""),this.vatIdsShipping.innerHTML=this.vatIdsShipping.innerHTML.replace(/ /g,"");let e=this.vatIdsShipping.value.substring(0,2),i=this.options.countryIdsIsoCodes[e],s=this.options.checkCountryIsoCodes[e],n=this._checkVatIdFormat(this.vatIdsShipping.value);if(!n)return;n&&!i&&(i=this.options.countryIdsWithPattern[n]);let a=t.target.value?t.target.value:"";if("enableForAllEuCountries"===this.options.validateFormat||e&&"standard"===this.options.validateFormat&&s){if(this._removeValidMarkShipping(),"enableForAllEuCountries"===this.options.validateFormat&&this._skipValidation(e,a))return;if(!i||t.target.value&&t.target.value!==i||!n){this._displayFormatStatusShipping(!1);return}this._displayFormatStatusShipping(!0)}let o=this.options.checkCountriesVatIdPattern[i];!this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&("standard"!==this.options.validateApiService||!0!==o)||this.options.enabledApiServiceOptions.includes(this.options.validateApiService)&&this._skipValidation(e,a)||(this._createLoadingIndicator(this.elementIndicatorShipping),this._removeValidMarkShipping(),this._validateVatIdApiServiceShipping(this.vatIdsShipping.value,i))}_displayFormatStatus(t){if(this.vatIds.value){if(!0===t){this.successMessage&&this.successMessage.classList.remove("d-none"),this.errorMessage&&this.errorMessage.classList.add("d-none");return}this.successMessage&&this.successMessage.classList.add("d-none"),this.errorMessage&&this.errorMessage.classList.remove("d-none"),this.vatIdValidationMessage&&this.vatIdValidationMessage.classList.remove("d-none")}}_displayFormatStatusShipping(t){if(this.vatIdsShipping.value){if(!0===t){this.successMessageShipping.classList.contains("d-none")&&this.successMessageShipping.classList.remove("d-none"),this.errorMessageShipping.classList.contains("d-none")||this.errorMessageShipping.classList.add("d-none");return}this.successMessageShipping.classList.contains("d-none")||this.successMessageShipping.classList.add("d-none"),this.errorMessageShipping.classList.contains("d-none")&&this.errorMessageShipping.classList.remove("d-none"),this.vatIdValidationMessageShipping.classList.contains("d-none")&&this.vatIdValidationMessageShipping.classList.remove("d-none")}}_displayVatIdValidationStatus(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.vatIds.value){if(!0===t){this.successMessage&&this.successMessage.classList.remove("d-none");return}this.errorMessage&&this.errorMessage.classList.remove("d-none"),this.vatIdValidationMessage&&(this.vatIdValidationMessage.classList.remove("d-none"),e&&"api_not_reachable"in e&&!0===e.api_not_reachable&&e.message&&(this.vatIdValidationMessage.innerText=e.message)),this.vatIdValidationMessageFormat&&this.vatIdValidationMessageFormat.classList.add("d-none"),this.vatIdValidationMessageVatIdValidation&&(this.vatIdValidationMessageVatIdValidation.classList.remove("d-none"),e&&"api_not_reachable"in e&&!0===e.api_not_reachable&&e.message&&(this.vatIdValidationMessageVatIdValidation.innerText=e.message))}}_displayVatIdValidationStatusShipping(t){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1],this.vatIdsShipping.value){if(!0===t){this.successMessageShipping&&this.successMessageShipping.classList.remove("d-none");return}this.errorMessageShipping&&this.errorMessageShipping.classList.remove("d-none"),this.vatIdValidationMessageShipping&&this.vatIdValidationMessageShipping.classList.remove("d-none"),this.vatIdValidationMessageFormatShipping&&this.vatIdValidationMessageFormatShipping.classList.add("d-none"),this.vatIdValidationMessageVatIdValidationShipping&&this.vatIdValidationMessageVatIdValidationShipping.classList.remove("d-none")}}_removeValidMark(){this.successMessage&&this.successMessage.classList.add("d-none"),this.errorMessage&&this.errorMessage.classList.add("d-none"),this.invalidFeedback&&this.invalidFeedback.classList.add("d-none"),this.vatIdValidationMessage&&(this.vatIdValidationMessage.classList.add("d-none"),this.vatIdValidationMessage.innerText=this.options.vatIdValidationMessageOriginal),this.vatIdValidationMessageFormat&&this.vatIdValidationMessageFormat.classList.remove("d-none"),this.vatIdValidationMessageVatIdValidation&&(this.vatIdValidationMessageVatIdValidation.classList.add("d-none"),this.vatIdValidationMessageVatIdValidation.innerText=this.options.vatIdValidationMessageOriginal),this.vatIds&&this.vatIds.classList.remove("is-invalid"),this._setEmptyCountryClass(!1)}_removeValidMarkShipping(){this.successMessageShipping&&this.successMessageShipping.classList.add("d-none"),this.errorMessageShipping&&this.errorMessageShipping.classList.add("d-none"),this.invalidFeedbackShipping&&this.invalidFeedbackShipping.classList.add("d-none"),this.vatIdValidationMessageShipping&&this.vatIdValidationMessageShipping.classList.add("d-none"),this.vatIdValidationMessageFormatShipping&&this.vatIdValidationMessageFormatShipping.classList.remove("d-none"),this.vatIdValidationMessageVatIdValidationShipping&&this.vatIdValidationMessageVatIdValidationShipping.classList.add("d-none"),this.vatIdsShipping&&this.vatIdsShipping.classList.remove("is-invalid"),this._setEmptyCountryClassShipping(!1)}_validateVatIdApiService(t,e){this._client.post(this.options.postUrl,JSON.stringify({vatId:t}),t=>this._afterVatIdValidation(t,e))}_validateVatIdApiServiceShipping(t,e){this._client.post(this.options.postUrl,JSON.stringify({vatId:t}),t=>this._afterVatIdValidationShipping(t,e))}_validateVatIdApiServicePersonalData(t,e){this._client.post(this.options.postUrl,JSON.stringify({vatId:t}),t=>this._afterVatIdValidationPersonalData(t,e))}_afterVatIdValidation(t,e){this._removeLoadingIndicator(this.elementIndicator),this.validationInProcess=!1;try{t=JSON.parse(t)}catch(t){return}this.countryBilling&&this.countryBilling.value&&""!==this.countryBilling.value||!t.success?this._displayVatIdValidationStatus(t.success,t):this._setEmptyCountryClass(),!0===t.success&&this._autocomplete(t,e)}_afterVatIdValidationShipping(t,e){this._removeLoadingIndicator(this.elementIndicatorShipping),this.validationInProcess=!1;try{t=JSON.parse(t)}catch(t){return}this.countryShipping.value&&""!==this.countryShipping.value||!t.success?this._displayVatIdValidationStatusShipping(t.success,t):this._setEmptyCountryClassShipping(),!0===t.success&&this._autocompleteShipping(t,e)}_afterVatIdValidationPersonalData(t,e){this._removeLoadingIndicator(this.elementIndicator),this.validationInProcess=!1;try{t=JSON.parse(t)}catch(t){return}this._displayVatIdValidationStatus(t.success,t),!0===t.success&&this._autocompletePersonalData(t,e)}_autocomplete(t,e){if(!!t.companyExists&&!!t.addressExists){var i,s,n=t.company;if(n){(i=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),i.setAttribute("class","autocomplete-items"),this.companyBilling.parentNode.appendChild(i),s=null,this.companyBilling.value!==n&&((s=document.createElement("DIV")).innerHTML="<strong>"+t.company.substr(0,n.length)+"</strong>",s.innerHTML+=t.company.substr(n.length),s.innerHTML+="<input type='hidden' value='"+t.company+"'>",i.appendChild(s));var a,o,r=t.street;if(r){(a=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),a.setAttribute("class","autocomplete-items"),this.streetBilling.parentNode.appendChild(a),o=null,this.streetBilling.value!==r&&((o=document.createElement("DIV")).innerHTML="<strong>"+t.street.substr(0,r.length)+"</strong>",o.innerHTML+=t.street.substr(r.length),o.innerHTML+="<input type='hidden' value='"+t.street+"'>",a.appendChild(o));var l,d,h=t.zipcode;if(h){(l=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),l.setAttribute("class","autocomplete-items"),this.zipcodeBilling.parentNode.appendChild(l),d=null,this.zipcodeBilling.value!==h&&((d=document.createElement("DIV")).innerHTML="<strong>"+t.zipcode.substr(0,h.length)+"</strong>",d.innerHTML+=t.zipcode.substr(h.length),d.innerHTML+="<input type='hidden' value='"+t.zipcode+"'>",l.appendChild(d));var p,c,u=t.city;if(u){(p=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),p.setAttribute("class","autocomplete-items"),this.cityBilling.parentNode.appendChild(p),c=null,this.cityBilling.value!==u&&((c=document.createElement("DIV")).innerHTML="<strong>"+t.city.substr(0,u.length)+"</strong>",c.innerHTML+=t.city.substr(u.length),c.innerHTML+="<input type='hidden' value='"+t.city+"'>",p.appendChild(c));var g,v,y=t.country;
1y&&((g=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),g.setAttribute("class","autocomplete-items"),this.countryBilling.parentNode.appendChild(g),v=null,this.countryBilling.value!==e&&((v=document.createElement("DIV")).innerHTML="<strong>"+t.country.substr(0,y.length)+"</strong>",v.innerHTML+=t.country.substr(y.length),v.innerHTML+="<input type='hidden' value='"+t.country+"'>",g.appendChild(v)),s&&s.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),o&&o.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),d&&d.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),c&&c.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),v&&v.addEventListener("click",this._onAssignValues.bind(this,e,s,o,d,c,v)),this.responseBilling=t,document.addEventListener("click",this._onCheckAllFields.bind(this)))}}}}}}_autocompleteShipping(t,e){if(!!t.companyExists&&!!t.addressExists){var i,s,n=t.company;if(n){(i=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),i.setAttribute("class","autocomplete-items"),this.companyShipping.parentNode.appendChild(i),s=null,this.companyShipping.value!==n&&((s=document.createElement("DIV")).innerHTML="<strong>"+t.company.substr(0,n.length)+"</strong>",s.innerHTML+=t.company.substr(n.length),s.innerHTML+="<input type='hidden' value='"+t.company+"'>",i.appendChild(s));var a,o,r=t.street;if(r){(a=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),a.setAttribute("class","autocomplete-items"),this.streetShipping.parentNode.appendChild(a),o=null,this.streetShipping.value!==r&&((o=document.createElement("DIV")).innerHTML="<strong>"+t.street.substr(0,r.length)+"</strong>",o.innerHTML+=t.street.substr(r.length),o.innerHTML+="<input type='hidden' value='"+t.street+"'>",a.appendChild(o));var l,d,h=t.zipcode;if(h){(l=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),l.setAttribute("class","autocomplete-items"),this.zipcodeShipping.parentNode.appendChild(l),d=null,this.zipcodeShipping.value!==h&&((d=document.createElement("DIV")).innerHTML="<strong>"+t.zipcode.substr(0,h.length)+"</strong>",d.innerHTML+=t.zipcode.substr(h.length),d.innerHTML+="<input type='hidden' value='"+t.zipcode+"'>",l.appendChild(d));var p,c,u=t.city;if(u){(p=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),p.setAttribute("class","autocomplete-items"),this.cityShipping.parentNode.appendChild(p),c=null,this.cityShipping.value!==u&&((c=document.createElement("DIV")).innerHTML="<strong>"+t.city.substr(0,u.length)+"</strong>",c.innerHTML+=t.city.substr(u.length),c.innerHTML+="<input type='hidden' value='"+t.city+"'>",p.appendChild(c));var g,v,y=t.country;y&&((g=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),g.setAttribute("class","autocomplete-items"),this.countryShipping.parentNode.appendChild(g),v=null,this.countryShipping.value!==e&&((v=document.createElement("DIV")).innerHTML="<strong>"+t.country.substr(0,y.length)+"</strong>",v.innerHTML+=t.country.substr(y.length),v.innerHTML+="<input type='hidden' value='"+t.country+"'>",g.appendChild(v)),s&&s.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),o&&o.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),d&&d.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),c&&c.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),v&&v.addEventListener("click",this._onAssignValuesShipping.bind(this,e,s,o,d,c,v)),this.responseShipping=t,document.addEventListener("click",this._onCheckAllFieldsShipping.bind(this)))}}}}}}_autocompletePersonalData(t,e){if(t.companyExists&&t.addressExists){var i,s,n=t.company;n&&((i=document.createElement("DIV")).setAttribute("id",this.id+"autocomplete-list"),i.setAttribute("class","autocomplete-items"),this.companyBilling.parentNode.appendChild(i),s=null,this.companyBilling.value!==n&&((s=document.createElement("DIV")).innerHTML="<strong>"+t.company.substr(0,n.length)+"</strong>",s.innerHTML+=t.company.substr(n.length),s.innerHTML+="<input type='hidden' value='"+t.company+"'>",i.appendChild(s)),s&&s.addEventListener("click",this._onAssignValuesPersonalData.bind(this,e,s)),this.responsePersonal=t,document.addEventListener("click",this._onCheckAllFieldsPersonalData.bind(this)))}}_onAssignValues(t,e,i,s,n,a,o){e&&(this.companyBilling.value=e.getElementsByTagName("input")[0].value,this.companyBilling.focus()),i&&(this.streetBilling.value=i.getElementsByTagName("input")[0].value,this.streetBilling.focus()),s&&(this.zipcodeBilling.value=s.getElementsByTagName("input")[0].value,this.zipcodeBilling.focus()),n&&(this.cityBilling.value=n.getElementsByTagName("input")[0].value,this.cityBilling.focus()),a&&(this.countryBilling.value=t,this.countryBilling.focus())}_onAssignValuesShipping(t,e,i,s,n,a,o){e&&(this.companyShipping.value=e.getElementsByTagName("input")[0].value,this.companyShipping.focus()),i&&(this.streetShipping.value=i.getElementsByTagName("input")[0].value,this.streetShipping.focus()),s&&(this.zipcodeShipping.value=s.getElementsByTagName("input")[0].value,this.zipcodeShipping.focus()),n&&(this.cityShipping.value=n.getElementsByTagName("input")[0].value,this.cityShipping.focus()),a&&(this.countryShipping.value=t,this.countryShipping.focus())}
1_onAssignValuesPersonalData(t,e,i){e&&(this.companyBilling.value=e.getElementsByTagName("input")[0].value,this.companyBilling.focus())}_onCheckAllFields(t){this._closeAllLists(this.companyBilling,t.target),this._closeAllLists(this.streetBilling,t.target),this._closeAllLists(this.zipcodeBilling,t.target),this._closeAllLists(this.cityBilling,t.target),this._closeAllLists(this.countryBilling,t.target),this.responseBilling&&(this.countryBilling.value&&""!==this.countryBilling.value?(this._displayVatIdValidationStatus(this.responseBilling.success,this.responseBilling),this._setEmptyCountryClass(!1)):this._setEmptyCountryClass(),this.countryBilling||this._setEmptyCountryClass(!1),this.responseBilling=null)}_onCheckAllFieldsShipping(t){this._closeAllLists(this.companyShipping,t.target),this._closeAllLists(this.streetShipping,t.target),this._closeAllLists(this.zipcodeShipping,t.target),this._closeAllLists(this.cityShipping,t.target),this._closeAllLists(this.countryShipping,t.target),this.responseShipping&&(this.countryShipping.value&&""!==this.countryShipping.value?(this._displayVatIdValidationStatusShipping(this.responseShipping.success,this.responseShipping),this._setEmptyCountryClassShipping(!1)):this._setEmptyCountryClassShipping(),this.countryShipping||this._setEmptyCountryClassShipping(!1),this.responseShipping=null)}_onCheckAllFieldsPersonalData(t){this._closeAllLists(this.companyBilling,t.target),this.responsePersonal&&(this._displayVatIdValidationStatus(this.responsePersonal.success,this.responsePersonal),this.responsePersonal=null)}_closeAllLists(t,e){for(var i=document.getElementsByClassName("autocomplete-items"),s=0;s<i.length;s++)e!=i[s]&&e!=t&&i[s].parentNode.removeChild(i[s])}_checkVatIdFormat(t){var e=t.substring(0,2);if(!this.options.countryVatIdPatterns||0===this.options.countryVatIdPatterns.length)return;var i=RegExp(this.options.ukPattern,"g"),s=t.match(i);if(s&&s[0]===t)return null;let n=null;return this.options.countryVatIdPatterns.forEach((i,s)=>{if(i.indexOf(e)>-1){var a=RegExp(i,"g"),o=t.match(a);o&&o[0]===t&&(n=i)}}),n}_skipValidation(t,e){let i=!1;for(let t in this.options.countryIdsWithPattern)this.options.countryIdsWithPattern[t]===e&&(i=!0);return!this.options.defaultCountriesEU.includes(t)&&(!e||""===e||!i)}_createLoadingIndicator(t){t&&(t.classList.remove("d-none"),p.create(t))}_removeLoadingIndicator(t){t&&(p.remove(t),t.classList.add("d-none"))}_setEmptyCountryClass(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];if(t){this.vatIdValidationMessageEmptyCountry&&this.vatIdValidationMessageEmptyCountry.classList.remove("d-none");return}if(this.vatIdValidationMessageEmptyCountry){var e;(e=this.vatIdValidationMessageEmptyCountry)===null||void 0===e||e.classList.add("d-none")}}_setEmptyCountryClassShipping(){let t=!(arguments.length>0)||void 0===arguments[0]||arguments[0];t?this.vatIdValidationMessageEmptyCountryShipping.classList.contains("d-none")&&this.vatIdValidationMessageEmptyCountryShipping.classList.remove("d-none"):this.vatIdValidationMessageEmptyCountryShipping.classList.contains("d-none")||this.vatIdValidationMessageEmptyCountryShipping.classList.add("d-none")}_getFallbackCountry(t,e){for(var i=0;i<e.length;i++)if(e[i]&&e[i].value&&e[i].value===t)return t;return null}}S.options={billingAddressId:"vatIds",shippingAddressId:"addressVatId",vatIdValidationMessageOriginal:"Entered VAT Reg.No. is invalid",billingCountryId:"billingAddressAddressCountry",shippingCountryId:"shippingAddressAddressCountry",elementIndicatorSelector:"#acris-tax-element-indicator",invalidFeedbackSelector:".invalid-feedback",vatIdValidationMessageSelector:"#acris-tax-vat-id-validation-message",vatIdValidationMessageEmptyCountrySelector:"#acris-tax-vat-id-validation-message-empty-country",vatIdValidationMessageEmptyCountryShippingSelector:"#acris-tax-vat-id-validation-message-empty-country-shipping",vatIdValidationMessageFormatSelector:"#acris-tax-vat-id-validation-message-format",vatIdValidationMessageVatIdValidationSelector:"#acris-tax-vat-id-validation-message-vat-id-validation",vatIdsSelector:"#vatIds",billingAddressPrefix:"billing-",shippingAddressPrefix:"shipping-",successMessageSelector:"#acris-tax-alert-success",errorMessageSelector:"#acris-tax-alert-danger",companyBillingSelector:"#billingAddresscompany",streetBillingSelector:"#billingAddressAddressStreet",zipcodeBillingSelector:"#billingAddressAddressZipcode",cityBillingSelector:"#billingAddressAddressCity",countryBillingSelector:"#billingAddressAddressCountry",elementIndicatorShippingSelector:"#acris-tax-element-indicator-shipping",invalidFeedbackShippingSelector:".invali
1d-feedback",vatIdValidationMessageShippingSelector:"#acris-tax-vat-id-validation-message-shipping",vatIdValidationMessageFormatShippingSelector:"#acris-tax-vat-id-validation-message-format-shipping",vatIdValidationMessageVatIdValidationShippingSelector:"#acris-tax-vat-id-validation-message-vat-id-validation-shipping",vatIdsShippingSelector:"#addressvatId",successMessageShippingSelector:"#acris-tax-alert-success-shipping",errorMessageShippingSelector:"#acris-tax-alert-danger-shipping",companyShippingSelector:"#shippingAddresscompany",streetShippingSelector:"#shippingAddressAddressStreet",zipcodeShippingSelector:"#shippingAddressAddressZipcode",cityShippingSelector:"#shippingAddressAddressCity",countryShippingSelector:"#shippingAddressAddressCountry",companyAddressSelector:"#addresscompany",streetAddressSelector:"#addressAddressStreet",zipcodeAddressSelector:"#addressAddressZipcode",cityAddressSelector:"#addressAddressCity",companyModalAddressSelector:"addresscompany",streetModalAddressSelector:"addressAddressStreet",zipcodeModalAddressSelector:"addressAddressZipcode",cityModalAddressSelector:"addressAddressCity",countryAddressSelector:"#addressAddressCountry",modalAddressIdTag:"#",countryModalAddressSelector:"addressAddressCountry",personalCompanySelector:"#company",assignCategory:!1,defaultCountriesEU:[],countryVatIdPatterns:[],countryIdsWithPattern:[],checkCountriesVatIdPattern:[],checkCountriesFormatPattern:[],checkCountryIsoCodes:[],countryIdsIsoCodes:[],validateFormat:"",validateApiService:"",enabledApiServiceOptions:["enableForAllEuCountriesVatId","enableForAllEuCountriesVatIdCompany","enableForAllEuCountriesVatIdAddress","enableForAllEuCountriesVatIdCompanyAddress"],registerEntry:"register",addressPageEntry:"address-page",modalAddressPageEntry:"modal-address-page",personalDataEntry:"personal-data",ukPattern:"(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})",entry:"",typePrefix:"",countryId:"",countryCheckFormat:!1,vatExamplePrefix:"",prefix:""}},49:(t,e,i)=>{i.d(e,{Z:()=>n});var s=i(140);class n{static isNode(t){return"object"==typeof t&&null!==t&&(t===document||t===window||t instanceof Node)}static hasAttribute(t,e){if(!n.isNode(t))throw Error("The element must be a valid HTML Node!");return"function"==typeof t.hasAttribute&&t.hasAttribute(e)}static getAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===n.hasAttribute(t,e))throw Error('The required property "'.concat(e,'" does not exist!'));if("function"!=typeof t.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return t.getAttribute(e)}static getDataAttribute(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=e.replace(/^data(|-)/,""),o=s.Z.toLowerCamelCase(a,"-");if(!n.isNode(t)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===t.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let r=t.dataset[o];if(void 0===r){if(i)throw Error('The required data attribute "'.concat(e,'" does not exist on ').concat(t,"!"));return r}return s.Z.parsePrimitive(r)}static querySelector(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let s=t.querySelector(e)||!1;if(i&&!1===s)throw Error('The required element "'.concat(e,'" does not exist in parent node!'));return s}static querySelectorAll(t,e){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!n.isNode(t))throw Error("The parent node is not a valid HTML Node!");let s=t.querySelectorAll(e);if(0===s.length&&(s=!1),i&&!1===s)throw Error('At least one item of "'.concat(e,'" must exist in parent node!'));return s}static getFocusableElements(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return t.querySelectorAll('\n            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),\n            select:not([tabindex^="-"]):not([disabled]),\n            textarea:not([tabindex^="-"]):not([disabled]),\n            button:not([tabindex^="-"]):not([disabled]),\n            a[href]:not([tabindex^="-"]):not([disabled]),\n            [tabindex]:not
1([tabindex^="-"]):not([disabled])\n        ')}static getFirstFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(t)[0]}static getLastFocusableElement(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=this.getFocusableElements(t);return e[e.length-1]}}},140:(t,e,i)=>{i.d(e,{Z:()=>s});class s{static ucFirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lcFirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static toDashCase(t){return t.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(t,e){let i=s.toUpperCamelCase(t,e);return s.lcFirst(i)}static toUpperCamelCase(t,e){return e?t.split(e).map(t=>s.ucFirst(t.toLowerCase())).join(""):s.ucFirst(t.toLowerCase())}static parsePrimitive(t){try{return/^\d+(.|,)\d+$/.test(t)&&(t=t.replace(",",".")),JSON.parse(t)}catch(e){return t.toString()}}}},293:(t,e,i)=>{i.d(e,{Z:()=>l});var s=i(857),n=i.n(s),a=i(49),o=i(140);class r{publish(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(t,{detail:e,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,n=t.split("."),a=i.scope?e.bind(i.scope):e;if(i.once&&!0===i.once){let e=a;a=function(i){s.unsubscribe(t),e(i)}}return this.el.addEventListener(n[0],a),this.listeners.push({splitEventName:n,opts:i,cb:a}),!0}unsubscribe(t){let e=t.split(".");return this.listeners=this.listeners.reduce((t,i)=>([...i.splitEventName].sort().toString()===e.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):t.push(i),t),[]),!0}reset(){return this.listeners.forEach(t=>{this.el.removeEventListener(t.splitEventName[0],t.cb)}),this.listeners=[],!0}get el(){return this._el}set el(t){this._el=t}get listeners(){return this._listeners}set listeners(t){this._listeners=t}constructor(t=document){this._el=t,t.$emitter=this,this._listeners=[]}}class l{init(){throw Error('The "init" method for the plugin "'.concat(this._pluginName,'" is not defined.'))}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(t){let e=o.Z.toDashCase(this._pluginName),i=a.Z.getDataAttribute(this.el,"data-".concat(e,"-config"),!1),s=a.Z.getAttribute(this.el,"data-".concat(e,"-options"),!1),r=[this.constructor.options,this.options,t];i&&r.push(window.PluginConfigManager.get(this._pluginName,i));try{s&&r.push(JSON.parse(s))}catch(t){throw console.error(this.el),Error('The data attribute "data-'.concat(e,'-options" could not be parsed to json: ').concat(t.message))}return n().all(r.filter(t=>t instanceof Object&&!(t instanceof Array)).map(t=>t||{}))}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(t){return t||(t=this.constructor.name),t}constructor(t,e={},i=!1){if(!a.Z.isNode(t))throw Error("There is no valid element given.");this.el=t,this.$emitter=new r(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(e),this._initialized=!1,this._registerInstance(),this._init()}}},107:(t,e,i)=>{i.d(e,{Z:()=>s});class s{get(t,e){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",t,i);return this._sendRequest(s,null,e)}post(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("POST",t,s);return this._sendRequest(n,e,i)}delete(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("DELETE",t,s);return this._sendRequest(n,e,i)}patch(t,e,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(e,s);let n=this._createPreparedRequest("PATCH",t,s);return this._sendRequest(n,e,i)}
1abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(t){this._errorHandlingInternal=t}_registerOnLoaded(t,e){e&&(!0===this._errorHandlingInternal?(t.addEventListener("load",()=>{e(t.responseText,t)}),t.addEventListener("abort",()=>{console.warn("the request to ".concat(t.responseURL," was aborted"))}),t.addEventListener("error",()=>{console.warn("the request to ".concat(t.responseURL," failed with status ").concat(t.status))}),t.addEventListener("timeout",()=>{console.warn("the request to ".concat(t.responseURL," timed out"))})):t.addEventListener("loadend",()=>{e(t.responseText,t)}))}_sendRequest(t,e,i){return this._registerOnLoaded(t,i),t.send(e),t}_getContentType(t,e){return t instanceof FormData&&(e=!1),e}_createPreparedRequest(t,e,i){return this._request=new XMLHttpRequest,this._request.open(t,e),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.