PageSourceSearch

https://www.y-o-w.com/theme/b33a4d6d0e2af0365c7c278854b26283/js/ac…itch-c-s.acris-shop-switch.plugin.98c672.js

js y-o-w.com collected 2026-09-26 05:53:44 UTC 20,036 bytes, 8 lines download raw bytes

1"use strict";(self.webpackChunkacris_shop_switch_c_s=self.webpackChunkacris_shop_switch_c_s||[]).push([[19908],{68(e,t,o){o.d(t,{A:()=>s});class s{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",e,o);return this._sendRequest(s,null,t)}post(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let i=this._createPreparedRequest("POST",e,s);return this._sendRequest(i,t,o)}delete(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let i=this._createPreparedRequest("DELETE",e,s);return this._sendRequest(i,t,o)}patch(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let i=this._createPreparedRequest("PATCH",e,s);return this._sendRequest(i,t,o)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,o){return this._registerOnLoaded(e,o),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,o){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),o&&this._request.setRequestHeader("Content-type",o),this._request}}},592(e,t,o){o.d(t,{Kq:()=>a,Ay:()=>h});class s{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return s.isIPhoneDevice()||s.isIPadDevice()}static isNativeWindowsBrowser(){return s.isIEBrowser()||s.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":s.isTouchDevice(),"is-ios":s.isIOSDevice(),"is-native-windows":s.isNativeWindowsBrowser(),"is-iphone":s.isIPhoneDevice(),"is-ipad":s.isIPadDevice(),"is-ie":s.isIEBrowser(),"is-edge":s.isEdgeBrowser()}}}let i="modal-backdrop",n="modal-backdrop-open",r="no-scroll",a=350,l={ON_CLICK:"backdrop/onclick"};class d{constructor(){return d.instance||(d.instance=this),d.instance}create(e){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let t=document.body.lastChild;document.documentElement.classList.add(r),setTimeout(function(){t.classList.add(n),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;this._getBackdrops().forEach(e=>e.classList.remove(n)),setTimeout(this._removeExistingBackdrops.bind(this),e),document.documentElement.classList.remove(r)}_dispatchEvents(){let e=s.isTouchDevice()?"touchstart":"click";document.addEventListener(e,function(e){e.target.classList.contains(i)&&document.dispatchEvent(new CustomEvent(l.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(`.${i}`)}_removeExistingBackdrops(){!1!==this._exists()&&this._getBackdrops().forEach(e=>e.remove())}_exists(){return document.querySelectorAll(`.${i}`).length>0}_getTemplate(){return`<div class="${i}"></div>`}}let c=Object.freeze(new d);class h{static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;c.create(e)}static remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a;c.remove(e)}static SELECTOR_CLASS(){return i}}},707(e,t,o){o.d(t,{A:()=>s});class s{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let o=s.toUpperCamelCase(e,t);return s.lcFirst(o)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>s.ucFirst(e.toLowerCase())).join(""):s.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},795(e,t,o){o.d(t,{A:()=>i});var s=o(707);
1class i{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!i.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!1===i.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(o)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=t.replace(/^data(|-)/,""),r=s.A.toLowerCamelCase(n,"-");if(!i.isNode(e)){if(o)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(o)throw Error("This node doesn't support the dataset attribute!");return}let a=e.dataset[r];if(void 0===a){if(o)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return a}return s.A.parsePrimitive(a)}static querySelector(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let s=e.querySelector(t)||!1;if(o&&!1===s)throw Error(`The required element "${t}" does not exist in parent node!`);return s}static querySelectorAll(e,t){let o=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(o&&!i.isNode(e))throw Error("The parent node is not a valid HTML Node!");let s=e.querySelectorAll(t);if(0===s.length&&(s=!1),o&&!1===s)throw Error(`At least one item of "${t}" must exist in parent node!`);return s}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=`
2            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
3            select:not([tabindex^="-"]):not([disabled]),
4            textarea:not([tabindex^="-"]):not([disabled]),
5            button:not([tabindex^="-"]):not([disabled]),
6            a[href]:not([tabindex^="-"]):not([disabled]),
7            [tabindex]:not([tabindex^="-"]):not([disabled])
8        `;return e.querySelectorAll(t)}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}},908(e,t,o){o.r(t),o.d(t,{default:()=>c});var s=o(68),i=o(795);class n{static isSupported(){return"undefined"!==document.cookie}static setItem(e,t,o){if(null==e)throw Error("You must specify a key to set a cookie");let s=new Date;s.setTime(s.getTime()+864e5*o);let i="";"https:"===location.protocol&&(i="secure"),document.cookie=`${e}=${t};expires=${s.toUTCString()};path=/;sameSite=lax;${i}`}static getItem(e){if(!e)return!1;let t=e+"=",o=document.cookie.split(";");for(let e=0;e<o.length;e++){let s=o[e];for(;" "===s.charAt(0);)s=s.substring(1);if(0===s.indexOf(t))return s.substring(t.length,s.length)}return!1}static removeItem(e){document.cookie=`${e}= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/`}static key(){return""}static clear(){}}var r=o(592);let a="js-pseudo-modal",l="js-pseudo-modal-template-root-element";class d{constructor(e,t=!0,o=".js-pseudo-modal-template",s=".js-pseudo-modal-template-content-element",i=".js-pseudo-modal-template-title-element"){this._content=e,this._useBackdrop=t,this._templateSelector=o,this._templateContentSelector=s,this._templateTitleSelector=i}open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.Kq;this._hideExistingModal(),this._create(),setTimeout(this._open.bind(this,e),t)}close(){let e=this.getModal();this._modalInstance=bootstrap.Modal.getInstance(e),this._modalInstance.hide()}getModal(){return this._modal||this._create(),this._modal}updatePosition(){this._modalInstance.handleUpdate()}updateContent(e,t){this._content=e,this._setModalContent(e),this.updatePosition(),"function"==typeof t&&t.bind(this)()}_hideExistingModal(){try{let e=document.querySelector(`.${a} .modal`);if(!e)return;let t=bootstrap.Modal.getInstance(e);if(!t)return;t.hide(),window.focusHandler._removeFocusTrapGuard()}catch(e){console.warn(`[PseudoModalUtil] Unable to hide existing pseudo modal before opening pseudo modal: ${e.message}`)}}_open(e){this.getModal(),this._modal.addEventListener("hidden.bs.modal",this._modalWrapper.remove),this._modal.addEventListener("shown.bs.modal",e),this._modal.addEventListener("hidden.bs.modal",()=>window.focusHandler._removeFocusTrapGuard()),this._modal.addEventListener("hide.bs.modal",()=>{document.activeElement instanceof HTMLElement&&document.activeElement.blur()}),this._modalInstance.show(),window.focusHandler._addFocusTrapGuard(this._modalWrapper)}_create(){this._modalMarkupEl=document.querySelector(this._templateSelector),this._createModalWrapper(),this._modalWrapper.innerHTML=this._content,this._modal=this._createModalMar
8kup(),this._modalInstance=new bootstrap.Modal(this._modal,{backdrop:this._useBackdrop}),document.body.insertAdjacentElement("beforeend",this._modalWrapper)}_createModalWrapper(){this._modalWrapper=document.querySelector(`.${a}`),this._modalWrapper||(this._modalWrapper=document.createElement("div"),this._modalWrapper.classList.add(a))}_createModalMarkup(){let e=this._modalWrapper.querySelector(".modal");if(e)return e;let t=this._modalWrapper.innerHTML;return this._modalWrapper.innerHTML=this._modalMarkupEl.innerHTML,this._setModalContent(t),this._modalWrapper.querySelector(".modal")}_setModalTitle(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{this._modalWrapper.querySelector(this._templateTitleSelector).innerHTML=e}catch(e){}}_setModalContent(e){let t=this._modalWrapper.querySelector(this._templateContentSelector);t.innerHTML=e;let o=t.querySelector(`.${l}`);if(o){this._modalWrapper.querySelector(`.${l}`).replaceChildren(o);return}try{let e=t.querySelector(this._templateTitleSelector);e&&(this._setModalTitle(e.innerHTML),e.parentNode.removeChild(e))}catch(e){}}}class c extends window.PluginBaseClass{static #e=this.options={cookieName:"acris_shop_switch_checked",url:"",modalClass:"acris-shop-switch-modal",modalContentContainerSelector:".acris-shop-switch-modal-content",submitButtonSelector:".acris-shop-switch-submit-btn",countrySelectSelector:".acris-shop-switch-country-select",languageSelectSelector:".acris-shop-switch-language-select",modalCloseButtonSelector:".only-close",directRedirectLinkSelector:".acris-shop-switch-direct-url",backdropSelector:".modal-backdrop",saveConfigurationUrl:"",modalCloseType:"only_close",currentDomainUrl:"",switchCountryIdParamName:"switch-country-id",switchDoneParamName:"switch-done",externalDomains:[],integrationType:"direct",currentDomainId:"",reloadPage:"",routeParams:[],route:"",loadImmediately:!0,modalId:"acrisShopSwitchModal"};init(){(this._client=new s.A(window.accessKey,window.contextToken),this.PluginManager=window.PluginManager,"ajax"===this.options.integrationType)?!1===this.isCookieSet(this.options.currentDomainId,this.options.cookieName)&&this.checkShopSwitchByAjaxRequest():(this.modal=this.el,this.initModal(),!1!==this.options.loadImmediately&&this.openModal())}isCookieSet(e,t){let o=n.getItem(t);return o&&-1!==o.indexOf(e)}checkShopSwitchByAjaxRequest(){this._client.get(this.options.url+"?uri="+encodeURIComponent(window.location.pathname+window.location.search)+"&route="+encodeURI(this.options.route)+"&route-params="+encodeURI(this.options.routeParams),this._onAfterGetAjaxResponse.bind(this))}_onAfterGetAjaxResponse(e){let t=this.getValidJson(e);if(!1!==t){!0===t.success&&t.redirectTo?this.setRedirect(t.redirectTo,t.currentUrl,t.countryId):!0===t.success&&!1!==t.rememberStayOnPage&&this.saveConfiguration();return}this.removeModalLoadedWithoutAjax();let o=new DOMParser().parseFromString(e,"text/html");this.backdropSettings=this.setBackdropSettings(o);let s=new d(e,this.backdropSettings);s.open(()=>{window.PluginManager.initializePlugins().then(()=>{this.modal=i.A.querySelector(document,"."+this.options.modalClass,!1),this.initModal()})});let n=s.getModal();this.options.modalClass&&n.classList.add(this.options.modalClass),this.modal=n}saveConfiguration(){this.saveConfigurationByAjaxRequest(this.options.reloadPage)}saveConfigurationByAjaxRequest(e){let t={},o=this.getSelectedCountryId();o&&(t.selectedCountryId=o),this._client.post(this.options.saveConfigurationUrl,JSON.stringify(t),t=>{("1"===e||!0===e)&&location.reload()})}getBrowserLanguage(){return navigator.language||navigator.userLanguage}initModal(){this.modal&&(this._collectModalComponents(),this._registerModalEvents(),this.hideModalCloseButton(),this._registerBackdropCleanup())}_collectModalComponents(){this.modalContentContainer=i.A.querySelector(this.modal,this.options.modalContentContainerSelector,!1),this.modalButtonClose=i.A.querySelector(this.modal,this.options.modalCloseButtonSelector,!1),this.modalBackdrop=i.A.querySelector(document,this.options.backdropSelector,!1),this.modalContentContainer?(this.options.currentDomainUrl=this.modalContentContainer.dataset.currentdomainurl,this.options.modalCloseType=this.modalContentContainer.dataset.currentmodalclosetype,this.options.reloadPage=this.modalContentContainer.dataset.currentmodalreloadpage,this.options.externalDomains=this.collectExternalDomains(this.modalContentContainer.dataset.externaldomains)):(this.options.currentDomainUrl="",this.options.modalCloseType="",this.options.reloadPage="",this.options.externalDomains=""),this.submitButton=i.A.querySelector(this.modal,this.options.submitButtonSelector,!1),this.countrySelect=i.A.querySelector(this.modal,this.options.countrySelectSelector,!1),this.languageSelect=i.A.querySelector(this.modal,this.options.languageSelectSelector,!1),this.countrySelect&&this.languageSelect&&this.onChangeCountrySelect()}_registerModalEvents(){this.submitButton&&this.submitButton.addEventListener("click",this.onSubmitSelection.bind(this)),this.countrySelect&&this.languageSelect&&this.countrySelect.addEventListener("change",this.onChangeCountrySelect.bind(this)),"close_and_switch"===this.options.modalCloseType?(this.modalButtonClose&&this.modalButtonClose.addEventListener("click",this.onSubmitSelection.bind(this)),this.modal&&this.modal.addEventListener("click",this.onClickOutsideModal.bind(this))):"close_and_remember"===this.options.modalCloseType&&(this.modalButtonClose&&this.modalButtonClose.addEventListener("click",this.onStayCurrentDomain.bind(this)),this.modal&&this.modal.addEventListener("click",this.onClickOutsideModal.bind(this)))}hideModalCloseButton(){if("disabled"===this.options.modalCloseType){let e=i.A.querySelector(this.modal,this.options.modalCloseButtonSelector,!1);e&&e.remove()}}openModal(){void 0!==this.modal&&("disabled"===this.options.modalCloseType?new bootstrap.Modal(this.modal,{backdrop:"static",keyboard:!1}).show():new bootstrap.Modal(this.modal).show(),setTimeout(()=>{let e=i.A.querySelector(document,".acris-cookie-consent.is--modal",!1);e&&(this._backdropCountBeforeShopSwitch=document.querySelectorAll(this.options.backdropSelector).length,e.style.display="none")},500))}onChangeCountrySelect(){let e=this.getDomainUrlsOfElement(this.countrySelect),t=this.getCountryIsoOfElement(this.countrySelect),o=0,s=!1;for(var i=0;i<this.languageSelect.children.length;i+=1){let n=JSON.parse(this.languageSelect.children[i].dataset.domainurls),r
8=this.languageSelect.children[i];if(""===this.getMatchOfArrays(e,n)){if(r.disabled=!0,r.style.display="none",r.selected=!1,!0===this.isSafari()){let e=document.createElement("span");e.textContent=r.textContent,e.dataset.value=r.value,e.dataset.domainurls=r.dataset.domainurls,e.dataset.languageiso=r.dataset.languageiso,r.parentNode.replaceChild(e,r)}}else if(o||(o=i),r.disabled=!1,r.style.display="block",!1===s&&(!this.languageSelect.value||r.dataset.languageiso.includes(t))&&(s=!0,r.selected=!0),"SPAN"===r.nodeName){let e=document.createElement("option");e.textContent=r.textContent,e.dataset.value=r.value,e.dataset.domainurls=r.dataset.domainurls,e.dataset.languageiso=r.dataset.languageiso,r.parentNode.replaceChild(e,r)}}this.languageSelect.value||(this.languageSelect.children[o].selected=!0)}onSubmitSelection(){let e=this.getMatchingDomain();if(this.options.currentDomainUrl===e){this.closeModal(),this.saveConfiguration();return}this.setRedirect(e,this.options.currentDomainUrl,this.getSelectedCountryId())}onStayCurrentDomain(){this.closeModal(),this.saveConfiguration()}onClickOutsideModal(e){e.target.closest("div.modal-dialog")||("close_and_switch"===this.options.modalCloseType?this.onSubmitSelection():"close_and_remember"===this.options.modalCloseType&&this.onStayCurrentDomain())}getMatchingDomain(){let e=this.getDomainUrlsOfElement(this.countrySelect),t=this.getDomainUrlsOfElement(this.languageSelect);return e&&e.length>0&&t&&t.length>0?this.getMatchOfArrays(e,t):e&&e.length>0?e[0]:t&&t.length>0?t[0]:""}getDomainUrlsOfElement(e){if(e){let t=e.options[e.selectedIndex];if(t)return JSON.parse(t.dataset.domainurls)}return[]}getCountryIsoOfElement(e){if(e){let t=e.options[e.selectedIndex];if(t)return t.dataset.countryiso}return[]}getMatchOfArrays(e,t){for(var o=0;o<e.length;o+=1)for(var s=0;s<t.length;s+=1)if(e[o]===t[s])return e[o];return""}setRedirect(e,t,o){e&&(e!==t?(e=this.addSetCountryId(e,o),window.location.replace(e)):this.saveConfiguration())}addSetCountryId(e,t){return e&&!0!==this.urlInExternalDomains(e)&&(e=e.includes("?")?e+"&"+this.options.switchDoneParamName+"=1":e+"?"+this.options.switchDoneParamName+"=1",t&&(e=e+"&"+this.options.switchCountryIdParamName+"="+t)),e}urlInExternalDomains(e){let t=this.options.externalDomains,o=!1;return t&&t.forEach(function(t){e===t&&(o=!0)}),o}_registerBackdropCleanup(){this.modal.addEventListener("hidden.bs.modal",()=>{let e=i.A.querySelector(document,".acris-cookie-consent.is--modal",!1),t=document.querySelectorAll(this.options.backdropSelector);e&&this._backdropCountBeforeShopSwitch>=1?e.style.display="":(e&&(e.style.display=""),t.forEach(e=>e.remove()),document.body.classList.remove("modal-open"),document.body.style.removeProperty("overflow"),document.body.style.removeProperty("padding-right"))})}closeModal(){bootstrap.Modal.getInstance(this.modal).hide()}getSelectedCountryId(){if(this.countrySelect&&this.countrySelect.options[this.countrySelect.selectedIndex]&&this.countrySelect.options[this.countrySelect.selectedIndex].dataset.countryid)return this.countrySelect.options[this.countrySelect.selectedIndex].dataset.countryid}getValidJson(e){let t="";try{t=JSON.parse(e)}catch(e){return!1}return t}setBackdropSettings(e){let t=i.A.querySelector(e,this.options.modalContentContainerSelector,!1);if(!t)return;let o=t.dataset.currentmodalclosetype;return!o||"disabled"!==o||"static"}collectExternalDomains(e){if(e)try{return JSON.parse(e)}catch(e){}return[]}removeModalLoadedWithoutAjax(){let e=i.A.querySelector(document,"#"+this.options.modalId,!1);e&&e.remove(),window.PluginManager.getPluginInstances("AcrisShopSwitch").forEach(e=>{e.modal=void 0})}isSafari(){let e=navigator.userAgent.toLowerCase();return e.includes("safari")&&!e.includes("chrome")&&!e.includes("android")}}}}]);

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.