1(()=>{"use strict";var e={156:e=>{var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s(Array.isArray(e)?[]:{},e,t):e}function a(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function o(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function r(e,t){try{return t in e}catch(e){return!1}}function s(e,i,c){(c=c||{}).arrayMerge=c.arrayMerge||a,c.isMergeableObject=c.isMergeableObject||t,c.cloneUnlessOtherwiseSpecified=n;var d,l,u=Array.isArray(i);return u!==Array.isArray(e)?n(i,c):u?c.arrayMerge(e,i,c):(l={},(d=c).isMergeableObject(e)&&o(e).forEach(function(t){l[t]=n(e[t],d)}),o(i).forEach(function(t){(!r(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(r(e,t)&&d.isMergeableObject(i[t])?l[t]=(function(e,t){if(!t.customMerge)return s;var i=t.customMerge(e);return"function"==typeof i?i:s})(t,d)(e[t],i[t],d):l[t]=n(i[t],d))}),l)}s.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return s(e,i,t)},{})},e.exports=s}},t={};function i(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n=i(156),a=i.n(n);class o{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 i=o.toUpperCamelCase(e,t);return o.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>o.ucFirst(e.toLowerCase())).join(""):o.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}
1class r{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(n),n}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this,a=e.split("."),o=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=o;o=function(i){n.unsubscribe(e),t(i)}}return this.el.addEventListener(a[0],o),this.listeners.push({splitEventName:a,opts:i,cb:o}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class s{constructor(e,t={},i=!1){if(!(e instanceof Node))throw Error("There is no valid element given.");this.el=e,this.$emitter=new r(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){throw Error(`The "init" method for the plugin "${this._pluginName}" is not defined.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),a().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=o.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=o.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-options`);if(i)try{return JSON.parse(i)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}class c{static isSupported(){return"undefined"!==document.cookie}static setItem(e,t,i){if(null==e)throw Error("You must specify a key to set a cookie");let n=new Date;n.setTime(n.getTime()+864e5*i);let a="";"https:"===location.protocol&&(a="secure"),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/;sameSite=lax;${a}`}static getItem(e){if(!e)return!1;let t=e+"=",i=document.cookie.split(";");for(let e=0;e<i.length;e++){let n=i[e];for(;" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(t))return n.substring(t.length,n.length)}return!1}static removeItem(e){document.cookie=`${e}= ; expires = Thu, 01 Jan 1970 00:00:00 GMT;path=/`}static key(){return""}static clear(){}}let d="js-offcanvas-singleton";class l{constructor(){this.$emitter=new r}open(e,t,i,n,a,o,r){this._removeExistingOffCanvas();let s=this._createOffCanvas(i,o,r,n);this.setContent(e,a),this._openOffcanvas(s,t)}setContent(e,t){let i=this.getOffCanvas();i[0]&&(i[0].innerHTML=e,this._registerEvents(t),this._setAriaAttrs())}setAdditionalClassName(e){this.getOffCanvas()[0].classList.add(e)}getOffCanvas(){return document.querySelectorAll(`.${d}`)}close(e){let t=this.getOffCanvas();t.forEach(e=>{bootstrap.Offcanvas.getInstance(e).hide()}),setTimeout(()=>{this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e)}goBackInHistory(){window.history.back()}exists(){return this.getOffCanvas().length>0}_openOffcanvas(e,t){window.focusHandler.saveFocusState("offcanvas"),l.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=this.getOffCanvas();t.forEach(i=>
1{let n=()=>{setTimeout(()=>{i.remove(),window.focusHandler.resumeFocusState("offcanvas"),this.$emitter.publish("onCloseOffcanvas",{offCanvasContent:t})},e),i.removeEventListener("hide.bs.offcanvas",n)};i.addEventListener("hide.bs.offcanvas",n)}),window.addEventListener("popstate",this.close.bind(this,e),{once:!0}),document.querySelectorAll(".js-offcanvas-close").forEach(t=>t.addEventListener("click",this.close.bind(this,e)))}_setAriaAttrs(){let e=this.getOffCanvas()[0],t="off-canvas-headline",i=e.querySelector(`[data-id="${t}"]`);i&&!e.hasAttribute("aria-labelledby")&&(i.setAttribute("id",t),e.setAttribute("aria-labelledby",t))}_removeExistingOffCanvas(){return l.bsOffcanvas=null,this.getOffCanvas().forEach(e=>e.remove())}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":`offcanvas-${e}`}_createOffCanvas(e,t,i,n){let a=document.createElement("div");if(a.classList.add("offcanvas",d),a.classList.add(this._getPositionClass(e)),a.setAttribute("tabindex","-1"),!0===t&&a.classList.add("is-fullwidth"),i){let e=typeof i;if("string"===e)a.classList.add(i);else if(Array.isArray(i))i.forEach(e=>{a.classList.add(e)});else throw Error(`The type "${e}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(a),l.bsOffcanvas=new bootstrap.Offcanvas(a,{backdrop:!1!==n||"static"}),a}}let u=Object.freeze(new l);class m{static open(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left",n=!(arguments.length>3)||void 0===arguments[3]||arguments[3],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";u.open(e,t,i,n,a,o,r)}static setContent(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:350;u.setContent(e,t,i)}static setAdditionalClassName(e){u.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;u.close(e)}static exists(){return u.exists()}static getOffCanvas(){return u.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}let g="loader",_={BEFORE:"before",INNER:"inner"};class p{constructor(e,t=_.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===_.INNER){this.parent.innerHTML=p.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),p.getTemplate())}}remove(){this.parent.querySelectorAll(`.${g}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${g}`).length>0}_getPosition(){return this.position===_.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${g}" role="status"> 2 <span class="visually-hidden">Loading...</span> 3 </div>`}static SELECTOR_CLASS(){return g}}class h extends m{static open(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left",a=!(arguments.length>4)||void 0===arguments[4]||arguments[4],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:m.REMOVE_OFF_CANVAS_DELAY(),r=arguments.length>6&&void 0!==arguments[6]&&arguments[6],s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!e)throw Error("A url must be given!");u._removeExistingOffCanvas();let c=u._createOffCanvas(n,r,s,a);this.setContent(e,t,i,a,o),u._openOffcanvas(c)}static setContent(e,t,i,n,a){super.setContent(`<div class="offcanvas-body">${p.getTemplate()}</div>`,n,a);let o=e=>{super.setContent(e,n,a),"function"==typeof i&&i(e)};t?fetch(e,{method:"POST",body:t instanceof FormData?t:JSON.stringify(t),headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(e=>h.executeCallback(o,e)):fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(e=>h.executeCallback(o,e))}static executeCallback(e,t){"function"==typeof e&&e(t),window.PluginManager.initializePlugins()}}class v{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,i);return this._sendRequest(n,null,t)}post(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let a=this._createPreparedRequest("POST",e,n);return this._sendRequest(a,t,i)}delete(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let a=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(a,t,i)}patch(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let a=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(a,t,i)}
3abort(){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,i){return this._registerOnLoaded(e,i),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,i){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}}let y="element-loader-backdrop";class f extends p{static create(e){e.classList.add("has-element-loader"),f.exists(e)||(f.appendLoader(e),setTimeout(()=>{let t=e.querySelector(`.${y}`);t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(`.${y}`);t&&t.remove()}static exists(e){return e.querySelectorAll(`.${y}`).length>0}static getTemplate(){return` 4 <div class="${y}"> 5 <div class="loader" role="status"> 6 <span class="visually-hidden">Loading...</span> 7 </div> 8 </div> 9 `}static appendLoader(e){e.insertAdjacentHTML("beforeend",f.getTemplate())}}let w="CookieConfiguration_Update";class b extends s{static #e=this.options={offCanvasPosition:"left",submitEvent:"click",cookiePreference:"cookie-preference",cookieSelector:"[data-cookie]",buttonOpenSelector:".js-cookie-configuration-button button",buttonSubmitSelector:".js-offcanvas-cookie-submit",buttonAcceptAllSelector:".js-offcanvas-cookie-accept-all",globalButtonAcceptAllSelector:".js-cookie-accept-all-button",parentInputSelector:".offcanvas-cookie-parent-input",customLinkSelector:`[href="${window.router["frontend.cookie.offcanvas"]}"]`,entriesActiveClass:"offcanvas-cookie-entries--active",entriesClass:"offcanvas-cookie-entries",groupClass:"offcanvas-cookie-group",parentInputClass:"offcanvas-cookie-parent-input"};init(){this.lastState={active:[],inactive:[]},this._httpClient=new v,this._registerEvents()}_registerEvents(){let{submitEvent:e,buttonOpenSelector:t,customLinkSelector:i,globalButtonAcceptAllSelector:n}=this.options;Array.from(document.querySelectorAll(t)).forEach(t=>{t.addEventListener(e,this.openOffCanvas.bind(this))}),Array.from(document.querySelectorAll(i)).forEach(t=>{t.addEventListener(e,this._handleCustomLink.bind(this))}),Array.from(document.querySelectorAll(n)).forEach(t=>{t.addEventListener(e,this._acceptAllCookiesFromCookieBar.bind(this))})}_registerOffCanvasEvents(){let{submitEvent:e,buttonSubmitSelector:t,buttonAcceptAllSelector:i}=this.options,n=this._getOffCanvas();if(n){let a=n.querySelector(t),o=n.querySelector(i),r=Array.from(n.querySelectorAll('input[type="checkbox"]'));a&&a.addEventListener(e,this._handleSubmit.bind(this,c)),o&&o.addEventListener(e,this._acceptAllCookiesFromOffCanvas.bind(this,c)),r.forEach(t=>{t.addEventListener(e,this._handleCheckbox.bind(this))})}}_handleCustomLink(e){e.preventDefault(),this.openOffCanvas()}_handleUpdateListener(e,t){let i=this._getUpdatedCookies(e,t);document.$emitter.publish(w,i)}_getUpdatedCookies(e,t){let{lastState:i}=this,n={};return e.forEach(e=>{i.inactive.includes(e)&&(n[e]=!0)}),t.forEach(e=>{i.active.includes(e)&&(n[e]=!1)}),n}openOffCanvas(e){let{offCanvasPosition:t}=this.options,i=window.router["frontend.cookie.offcanvas"];this._hideCookieBar(),h.open(i,!1,this._onOffCanvasOpened.bind(this,e),t)}closeOffCanvas(e){h.close(),"function"==typeof e&&e()}_onOffCanvasOpened(e){this._registerOffCanvasEvents(),this._setInitialState(),this._setInitialOffcanvasState(),PluginManager.initializePlugins(),"function"==typeof e&&e()}_hideCookieBar(){let e=PluginManager.getPluginInstances("CookiePermission");e&&e[0]&&(e[0]._hideCookieBar(),e[0]._removeBodyPadding())}_setInitialState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||this._getCookies("all"),i=[],n=[];
9t.forEach(e=>{let{cookie:t,required:a}=e;c.getItem(t)||a?i.push(t):n.push(t)}),this.lastState={active:i,inactive:n}}_setInitialOffcanvasState(){let e=this.lastState.active,t=this._getOffCanvas();e.forEach(e=>{let i=t.querySelector(`[data-cookie="${e}"]`);i.checked=!0,this._childCheckboxEvent(i)})}_handleCheckbox(e){let{parentInputClass:t}=this.options,{target:i}=e;(i.classList.contains(t)?this._parentCheckboxEvent:this._childCheckboxEvent).call(this,i)}_findParentEl(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;for(;e&&!e.classList.contains(i);){if(e.classList.contains(t))return e;e=e.parentElement}return null}_isChecked(e){return!!e.checked}_parentCheckboxEvent(e){let{groupClass:t}=this.options,i=this._isChecked(e),n=this._findParentEl(e,t);this._toggleWholeGroup(i,n)}_childCheckboxEvent(e){let{groupClass:t}=this.options,i=this._isChecked(e),n=this._findParentEl(e,t);this._toggleParentCheckbox(i,n)}_toggleWholeGroup(e,t){Array.from(t.querySelectorAll("input")).forEach(t=>{t.checked=e})}_toggleParentCheckbox(e,t){let{parentInputSelector:i}=this.options,n=Array.from(t.querySelectorAll(`input:not(${i})`)),a=Array.from(t.querySelectorAll(`input:not(${i}):checked`));if(n.length>0){let e=t.querySelector(i);if(e){let t=a.length>0,i=t&&a.length!==n.length;e.checked=t,e.indeterminate=i}}}_handleSubmit(){let e=this._getCookies("active"),t=this._getCookies("inactive"),{cookiePreference:i}=this.options,n=[],a=[];t.forEach(e=>{let{cookie:t}=e;a.push(t),c.getItem(t)&&c.removeItem(t)}),e.forEach(e=>{let{cookie:t,value:i,expiration:a}=e;n.push(t),t&&i&&c.setItem(t,i,a)}),c.setItem(i,"1","30"),this._handleUpdateListener(n,a),this.closeOffCanvas(document.$emitter.publish("CookieConfiguration_CloseOffCanvas"))}acceptAllCookies(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!e){this._handleAcceptAll(),this.closeOffCanvas();return}f.create(this.el),fetch(window.router["frontend.cookie.offcanvas"],{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(e=>{let t=new DOMParser().parseFromString(e,"text/html");this._handleAcceptAll(t),f.remove(this.el),this._hideCookieBar()})}_acceptAllCookiesFromCookieBar(){return this.acceptAllCookies(!0)}_acceptAllCookiesFromOffCanvas(){return this.acceptAllCookies()}_handleAcceptAll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=this._getCookies("all",e);this._setInitialState(t);let{cookiePreference:i}=this.options;t.forEach(e=>{let{cookie:t,value:i,expiration:n}=e;t&&i&&c.setItem(t,i,n)}),c.setItem(i,"1","30"),this._handleUpdateListener(t.map(e=>{let{cookie:t}=e;return t}),[])}_getCookies(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"all",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,{cookieSelector:i}=this.options;return t||(t=this._getOffCanvas()),Array.from(t.querySelectorAll(i)).filter(t=>{switch(e){case"all":return!0;case"active":return this._isChecked(t);case"inactive":return!this._isChecked(t);default:return!1}}).map(e=>{let{cookie:t,cookieValue:i,cookieExpiration:n,cookieRequired:a}=e.dataset;return{cookie:t,value:i,expiration:n,required:a}})}_getOffCanvas(){let e=m?m.getOffCanvas():[];return!!e&&e.length>0&&e[0]}}class C{disableAction(){this.actionEnabled=!1}trigger(){let e=this.getActions();window.PluginManager.getPluginInstances(this.getPluginName()).forEach(t=>{Object.keys(e).forEach(i=>{t.$emitter.subscribe(i,e[i])})})}getActions(){}getPluginName(){}constructor(){this.actionEnabled=!0}}class k{static setEntry(e,t,i){sessionStorage.setItem(this.cleanString(e)+t,i),localStorage.setItem(this.cleanString(e)+t,i)}static getEntry(e,t){let i=sessionStorage.getItem(this.cleanString(e)+t);return i?i:localStorage.getItem(this.cleanString(e)+t)||null}static setEntriesIfMissing(e){e.forEach(e=>{let{entryString:t,productId:i,value:n}=e;this.getEntry(t,i)||this.setEntry(t,i,n)})}static setJsonEntry(e,t,i){sessionStorage.setItem(this.cleanString(e)+t,JSON.stringify(i)),localStorage.setItem(this.cleanString(e)+t,JSON.stringify(i)),this.getJsonEntry(this.cleanString(e),t)}static getJsonEntry(e,t){let i;if(null!==(i=sessionStorage.getItem(this.cleanString(e)+t))||null!==(i=localStorage.getItem(this.cleanString(e)+t)))return JSON.parse(i);if(!window.ga4Product||!window.ga4Product[t])return null;{let e=JSON.parse(JSON.stringify(window.ga4Product[t]));return e.extra&&delete e.extra,e}}static getOrigin(e){let t;let i={id:"",name:"",index:0};if(window.ga4Product[e]){let{item_list_id:n,item_list_name:a,index:o,extra:r}=window.ga4Product[e],s=r.parentId;null!==(t=this.getJsonEntry("ga4item_",s))?(i.id=t.item_list_id,i.name=t.item_list_name,i.index=t.index):(i.id=n,i.name=a,i.index=o)}else null!==(t=this.getJsonEntry("ga4item_",e))&&(i.id=t.item_list_id,i.name=t.item_list_name,i.index=t.index);return i}static cleanString(e){let t="";for(let i=0;i<e.length;i++)127>=e.charCodeAt(i)&&(t+=e.charAt(i));return t}}class S{static lineItemsContainer(){let e=document.querySelector(".discoga4-checkout-hidden-line-items-information");return e||((e||(e=document.querySelector(".discoga4-header-hidden-line-items-information")),e)?(console.info("discoga4-checkout-hidden-line-items-information was not found, using discoga4-header-hidden-line-items-information"),e):(e||(e=document.querySelector(".hidden-line-items-information")),e)?(console.info("discoga4-header-hidden-line-items-information was not found, using hidden-line-items-information"),e):e?void 0:(console.warn("no hidden-line-items-information found - returning empty array "),[]))}static getItemsFromStorage(e){let t,i,n;if(!e)return[];let a=e.dataset.taxstatus?e.dataset.taxstatus:"gross",o=e.querySelectorAll(".hidden-line-item"),r=[],s=[],c=0,d=0,l="",u=0;
9return o.forEach(e=>{let o=parseFloat(e.dataset.price),m=parseFloat(e.dataset.taxrate);t=0,i=0,"gross"===a&&m>0?t=Math.round(100*(t=(i=o)/(1+m/100)))/100:i=Math.round(100*(i=(t=o)*(1+m/100)))/100;let g="brutto"===window.taxConfiguration?i:t;if(o>=0){let a="brutto"===window.conversionConfiguration||"bruttoWithShipping"===window.conversionConfiguration?i:t,l=parseInt(e.dataset.quantity,10),u=e.dataset.id,m=e.dataset.sku,_=k.getEntry("productId_",m),p=k.getJsonEntry("ga4item_",_);if(p||(p=k.getJsonEntry("ga4item_",u)),p){let e=g,t=!1;window.ga4gpCoupon&&(k.getEntry("item_startPrice_"+_)&&(e=parseFloat(k.getEntry("item_startPrice_"+_))),t=e-g>0);let{item_id:i,item_name:n,price:c,coupon:d,discount:u,index:m,item_brand:h,item_category:v,item_list_name:y,item_category2:f,item_category3:w,item_category4:b,item_category5:C,item_variant:S,item_list_id:I}=p,A=t?parseFloat(c):g;r.push({item_id:i,item_name:n,affiliation:window.ga4affiliation,coupon:t?"Graduated Price":d,discount:t?Math.round((A-o)*100)/100:Math.round(100*u)/100,index:m,item_brand:h,item_category:v,item_category2:f||void 0,item_category3:w||void 0,item_category4:b||void 0,item_category5:C||void 0,item_list_id:I,item_list_name:y,item_variant:S,price:A,google_business_vertical:"retail",quantity:l}),s.push({item_id:i,item_name:n,index:m,item_brand:h,item_category:v,item_category2:f||void 0,item_category3:w||void 0,item_category4:b||void 0,item_category5:C||void 0,item_list_id:I,item_list_name:y,item_variant:S,price:a,quantity:l})}else r.push({item_id:m,item_name:e.dataset.name,affiliation:window.ga4affiliation,price:n,google_business_vertical:"retail",quantity:l}),s.push({item_id:m,item_name:e.dataset.name,affiliation:window.ga4affiliation,price:a,quantity:l});c+=t*l,d+=i*l}else o<0&&(u=Math.round((u+Math.abs(g))*100)/100,l=l+","+e.dataset.name)}),c-=u,d-=u,{items:r,ads_items:s,net:Math.round(100*c)/100,gross:Math.round(100*d)/100,coupon:l.replace(/^,+|,+$/g,"").replace(/^\s+|\s+$/gm,""),discount:u,code:l&&u&&localStorage.getItem("couponCode")?localStorage.getItem("couponCode"):void 0}}static getCoupon(e){if(!e)return[];let t=e.querySelectorAll(".hidden-line-item"),i="",n=0;return t.forEach(e=>{let t=e.dataset.price;0>parseFloat(t)&&(n=Math.round((n+Math.abs(parseFloat(t)))*100)/100,i=i+","+e.dataset.name)}),{coupon:i.replace(/^,+|,+$/g,"").replace(/^\s+|\s+$/gm,""),discount:n,code:i&&n&&localStorage.getItem("couponCode")?localStorage.getItem("couponCode"):void 0}}}class I{static getTaxAwarePrice(e,t){let i=e;return"netto"===window.taxConfiguration&&("brutto"===window.conversionConfiguration||"bruttoWithShipping"===window.conversionConfiguration)&&(i*=1+t/100),"brutto"===window.taxConfiguration&&("netto"===window.conversionConfiguration||"nettoWithShipping"===window.conversionConfiguration)&&(i/=1+t/100),Math.round(100*i)/100}static getTaxShippingAwarePrice(e,t,i,n){let a=parseFloat(e);switch(window.conversionConfiguration){case"bruttoWithShipping":a=e+t+i+n;break;case"nettoWithShipping":a=e+i;break;case"brutto":a=e+t}return Math.round(100*a)/100}}class A{static getAdsValueFromHeader(e,t){let i,n=0,a=0;if(window.ga4Product&&window.ga4Product[e]){let t=window.ga4Product[e].extra;n=window.ga4Product[e].price,a=t.taxRate}else null!==(i=k.getJsonEntry("ga4item_",e))&&(n=this.getSinglePriceFromJsonEntry(i),a=k.getEntry("taxRate_"+e)?k.getEntry("taxRate_"+e):0);let o=I.getTaxAwarePrice(n,a);return{unit:o,total:o*t}}static getValueFromHeader(e,t){let i,n=!(arguments.length>2)||void 0===arguments[2]||arguments[2],a=0;return window.ga4Product&&window.ga4Product[e]?a=parseFloat(window.ga4Product[e].price):null!==(i=k.getJsonEntry("ga4item_",e))&&(a=this.getSinglePriceFromJsonEntry(i,n)),a*t}static getFormUAItemFromHeader(e){let t,i="";return window.ga4Product&&window.ga4Product[e]?i=window.ga4Product[e].item_id:null!==(t=k.getJsonEntry("ga4item_",e))&&(i=t.item_id),{id:i,google_business_vertical:"retail"}}static getMetaItemFromItem(e,t){if(!e)return;let i=["item_category"in e&&e.item_category,"item_category2"in e&&e.item_category2,"item_category3"in e&&e.item_category3,"item_category4"in e&&e.
9item_category4,"item_category5"in e&&e.item_category5].filter(Boolean).join(">"),n=t||e.price;return{contents:{id:e.item_id,item_price:n},name:e.item_name,category:i}}static getMadsItemFromItem(e,t){if(!e)return;let i=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e),n=t||e.price;return{lineItem:{id:e.item_id,brand:e.item_brand,category:i,list_name:e.item_list_name,list_position:e.index,name:e.item_name,price:n,quantity:e.quantity,variant:e.item_variant},ecomm_prodid:[e.item_id],totalvalue:e.quantity*n}}static getPinterestItemFromItem(e,t){if(!e)return;let i=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e),n=t||e.price;return{product_name:e.item_name,product_id:e.item_id,product_category:i,product_variant_id:e.item_id,product_variant:e.item_variant,product_price:n,product_quantity:e.quantity,product_brand:e.item_brand}}static getPinterestContentsFromItems(e){if(!e||!e)return;let t=[],i=[],n=0,a=0;return e.forEach(e=>{t.push(e.item_id);let o=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e);i.push({item_name:e.item_name,id:e.item_id,item_category:o,item_price:e.price.toString(),quantity:e.quantity,item_brand:e.item_brand}),a+=e.quantity,n+=e.quantity*e.price}),{ids:t,contents:i,totalvalue:n,numberOfItems:a}}static getPinterestContentsFromWindow(e){let t;if(!e||("suggest"===e&&window.ga4SearchSuggestProduct?t=JSON.parse(JSON.stringify(window.ga4SearchSuggestProduct)):"view_search_results"===e&&window.ga4Product&&(t=JSON.parse(JSON.stringify(window.ga4Product))),!t))return;let i=[],n=[],a=0,o=0;return Object.entries(t).forEach(e=>{o+=1;let t=e[1]?e[1].item_id:void 0,r=e[1]?e[1].item_name:void 0,s=e[1]?e[1].price:void 0,c=e[1]?e[1].item_brand:void 0;i.push(t),n.push({item_name:r,id:t,item_price:+s,quantity:1,item_brand:c}),a+=+s}),{ids:i,contents:n,totalvalue:a,numberOfItems:o}}static getTikTokItemFromItem(e,t){if(!e)return;let i=["item_category"in e&&e.item_category,"item_category2"in e&&e.item_category2,"item_category3"in e&&e.item_category3,"item_category4"in e&&e.
9item_category4,"item_category5"in e&&e.item_category5].filter(Boolean).join(" > "),n=t||e.price;return{lineItem:{price:n,quantity:e.quantity,content_id:e.item_id,content_name:e.item_name,content_category:i,brand:e.item_brand},totalvalue:e.quantity*n,quantity:e.quantity}}static getGAdsItemsFromItems(e){if(!e)return;let t=[],i=0;return e.forEach(e=>{t.push({id:e.item_id,quantity:e.quantity,price:e.price}),i+=e.price*e.quantity}),{items:t,total:i}}static getMetaItemsFromItems(e){if(!e)return;let t=[],i=0;return e.forEach(e=>{i+=e.quantity,t.push({id:e.item_id,quantity:e.quantity})}),{contents:t,numberOfItems:i}}static getMetaItemsFromWindow(e){let t;if(!e||("suggest"===e&&window.ga4SearchSuggestProduct?t=JSON.parse(JSON.stringify(window.ga4SearchSuggestProduct)):"view_search_results"===e&&window.ga4Product&&(t=JSON.parse(JSON.stringify(window.ga4Product))),!t))return;let i=[],n=0;return Object.entries(t).forEach(e=>{n+=1;let t=e[1]?e[1].item_id:void 0;i.push({id:t,quantity:1})}),{contents:i,numberOfItems:n}}static getMadsItemsFromItems(e){if(!e)return;let t=[],i=[],n=0;return e.forEach(e=>{let a=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e);i.push(e.item_id),t.push({id:e.item_id,brand:e.item_brand,category:a,list_name:e.item_list_name,list_position:e.index,name:e.item_name,price:e.price,quantity:e.quantity,variant:e.item_variant}),n+=e.quantity*e.price}),{ecomm_prodid:i,lineItems:t,totalvalue:n}}static getTikTokItemsFromItems(e){if(!e)return;let t=[],i=0,n=0;return e.forEach(e=>{let a=["item_category"in e&&e.item_category,"item_category2"in e&&e.item_category2,"item_category3"in e&&e.item_category3,"item_category4"in e&&e.
9item_category4,"item_category5"in e&&e.item_category5].filter(Boolean).join(" > ");t.push({price:e.price,quantity:e.quantity,content_id:e.item_id,content_name:e.item_name,content_category:a,brand:e.item_brand}),i+=e.quantity*e.price,n+=e.quantity}),{lineItems:t,totalvalue:i,numberOfItems:n}}static getPinterestItemsFromItems(e){if(!e||!e)return;let t=[],i=0,n=0;return e.forEach(e=>{let a=[e.item_category5,e.item_category4,e.item_category3,e.item_category2,e.item_category,"home"].find(e=>void 0!==e);t.push({product_name:e.item_name,product_id:e.item_id,product_category:a,product_variant_id:e.item_id,product_variant:e.item_variant,product_price:e.price,product_quantity:e.quantity,product_brand:e.item_brand}),n+=e.quantity,i+=e.quantity*e.price}),{lineItems:t,totalvalue:i,numberOfItems:n}}static getProductFromHeader(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],r=!(arguments.length>6)||void 0===arguments[6]||arguments[6],{item_id:s,item_name:c,item_variant:d,item_brand:l,item_category:u,item_category2:m,item_category3:g,item_category4:_,item_category5:p,price:h,extra:v}=window.ga4Product[e],y=+v.realPrice,f=+h,w=+v.taxRate,b=v.parentId,C=0,S="";return o&&(k.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:e,value:i},{entryString:"ga4_item_list_id",productId:e,value:n},{entryString:"ga4_item_list_name",productId:e,value:a}]),b&&k.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:b,value:i},{entryString:"ga4_item_list_id",productId:b,value:n},{entryString:"ga4_item_list_name",productId:b,value:a}])),r&&(b&&k.getEntry("ga4_item_list_index_",b)?(i=parseInt(k.getEntry("ga4_item_list_index_",b),10),n=k.getEntry("ga4_item_list_id",b)?k.getEntry("ga4_item_list_id",b):n,a=k.getEntry("ga4_item_list_name",b)?k.getEntry("ga4_item_list_name",b):a):s&&k.getEntry("ga4_item_list_index_",s)?(i=k.getEntry("ga4_item_list_index_",s)?parseInt(k.getEntry("ga4_item_list_index_",s),10):i,n=k.getEntry("ga4_item_list_id",s)?k.getEntry("ga4_item_list_id",s):n,a=k.getEntry("ga4_item_list_name",s)?k.getEntry("ga4_item_list_name",s):a):(i=k.getEntry("ga4_item_list_index_",e)?parseInt(k.getEntry("ga4_item_list_index_",e),10):i,n=k.getEntry("ga4_item_list_id",e)?k.getEntry("ga4_item_list_id",e):n,a=k.getEntry("ga4_item_list_name",e)?k.getEntry("ga4_item_list_name",e):a)),window.ga4upCoupon&&(C=Math.round((y-f)*100)/100)>0&&(S="List price"),{ga:{item_id:s,item_name:c,affiliation:window.ga4affiliation,coupon:S,discount:C,index:i,item_brand:l,item_category:u,item_category2:m||void 0,item_category3:g||void 0,item_category4:_||void 0,item_category5:p||void 0,item_list_id:n,item_list_name:a,item_variant:d,price:f,google_business_vertical:"retail",quantity:t},channel:{item_id:s,item_name:c,index:i,item_brand:l,item_category:u,item_category2:m||void 0,item_category3:g||void 0,item_category4:_||void 0,item_category5:p||void 0,item_list_id:n,item_list_name:a,item_variant:d,price:I.getTaxAwarePrice(f,w),quantity:t}}}static getSinglePriceFromJsonEntry(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],i=parseFloat(e.discount);return(isNaN(i)&&(i=0),t)?Math.round((parseFloat(e.price)-i)*100)/100:Math.round(100*parseFloat(e.price))/100}}class E{static getItems(e,t,i,n){let a=e.querySelectorAll(".product-box"),o=[],r=[],s=[],c=0,d=0,l=1;return a.forEach(e=>{let n;if((!0!==e.parentElement.classList.contains("product-slider-item")||!1!==e.parentElement.classList.contains("tns-slide-active"))&&(n=!0===e.hasAttribute("data-product-information")&&JSON.parse(e.getAttribute("data-product-information")).id in window.ga4Product?JSON.parse(e.getAttribute("data-product-information")).id:e.querySelector("input[name=product-id]")&&e.querySelector("input[name=product-id]").value in window.ga4Product?e.querySelector("input[name=product-id]").value:e.querySelector("input[name$='][id]']")&&e.querySelector("input[name$='][id]']").value in window.ga4Product?e.querySelector("input[name$='][id]']").value:e.querySelector("input[name$='][referencedId]']")&&e.querySelector("input[name$='][referencedId]']").value in window.ga4Product?e.querySelector("input[name$='][referencedId]']").value:null)&&window.ga4Product&&window.ga4Product[n]){let a="lineItems["+n+"][quantity]";l=1,e.querySelector(`input[name='${a}']`)&&(l=parseInt(e.querySelector(`input[name='${a}']`).value,10)),c+=parseFloat(A.getAdsValueFromHeader(n,l).total),r.push(A.getFormUAItemFromHeader(n));let u=A.getProductFromHeader(n,l,d,t,i,!1,!0);s.push(u.channel),o.push(u.ga),window.ga4Product[n].index=d,window.ga4Product[n].item_list_id=t,window.ga4Product[n].item_list_name=i,d++}}),{items:o,adsItems:r,channelItems:s,total:Math.round(100*c)/100}}}let P={CA:1,US:1,KZ:7,RU:7,EG:20,ZA:27,GR:30,NL:31,BE:32,FR:33,ES:34,HU:36,IT:39,RO:40,CH:41,AT:43,GB:44,DK:45,SE:46,NO:47,SJ:47,PL:48,DE:49,PE:51,MX:52,CU:53,AR:54,BR:55,CL:56,CO:57,VE:58,MY:60,AU:61,CX:61,CC:61,ID:62,PH:63,NZ:64,PN:64,SG:65,TH:66,JP:81,KR:82,VN:84,CN:86,TR:90,IN:91,PK:92,AF:93,LK:94,MM:95,IR:98,SS:211,MA
9:212,EH:212,DZ:213,TN:216,LY:218,GM:220,SN:221,MR:222,ML:223,GN:224,CI:225,BF:226,NE:227,TG:228,BJ:229,MU:230,LR:231,SL:232,GH:233,NG:234,TD:235,CF:236,CM:237,CV:238,ST:239,GQ:240,GA:241,CG:242,CD:243,AO:244,GW:245,IO:246,SC:248,SD:249,RW:250,ET:251,SO:252,DJ:253,KE:254,TZ:255,UG:256,BI:257,MZ:258,ZM:260,MG:261,YT:262,RE:262,ZW:263,NA:264,MW:265,LS:266,BW:267,SZ:268,KM:269,SH:290,ER:291,AW:297,FO:298,GL:299,GI:350,PT:351,LU:352,IE:353,IS:354,AL:355,MT:356,CY:357,FI:358,BG:359,LT:370,LV:371,EE:372,MD:373,AM:374,BY:375,AD:376,MC:377,SM:378,VA:379,UA:380,RS:381,ME:382,XK:383,HR:385,SI:386,BA:387,MK:389,CZ:420,SK:421,LI:423,FK:500,BZ:501,GT:502,SV:503,HN:504,NI:505,CR:506,PA:507,PM:508,HT:509,BL:590,MF:590,BO:591,GY:592,EC:593,PY:595,SR:597,UY:598,CW:599,AN:599,TL:670,AQ:672,BN:673,NR:674,PG:675,TO:676,SB:677,VU:678,FJ:679,PW:680,WF:681,CK:682,NU:683,WS:685,KI:686,NC:687,TV:688,PF:689,TK:690,FM:691,MH:692,KP:850,HK:852,MO:853,KH:855,LA:856,BD:880,TW:886,MV:960,LB:961,JO:962,SY:963,IQ:964,KW:965,SA:966,YE:967,OM:968,PS:970,AE:971,IL:972,BH:973,QA:974,BT:975,MN:976,NP:977,TJ:992,TM:993,AZ:994,GE:995,KG:996,UZ:998,BS:"1-242",BB:"1-246",AI:"1-264",AG:"1-268",VG:"1-284",VI:"1-340",KY:"1-345",BM:"1-441",GD:"1-473",TC:"1-649",MS:"1-664",MP:"1-670",GU:"1-671",AS:"1-684",SX:"1-721",LC:"1-758",DM:"1-767",VC:"1-784",TT:"1-868",KN:"1-869",JM:"1-876",GG:"44-1481",JE:"44-1534",IM:"44-1624",PR:["1-787","1-939"],DO:["1-809","1-829","1-849"]};class L{static geteItnlPhone(e,t){if(!e)return;let i=e.trim();i.startsWith("+")&&i.replace("+",""),i=i.replace(/[^1-9]+|0+/g,"");let n=this.getPhonePrefixByCountryCode(t);return`+${n}${i}`}static gete164Phone(e,t){if(!e)return;let i=e.trim();if(i.startsWith("+"))return i;i=i.replace(/[^1-9]+|0+/g,"");let n=this.getPhonePrefixByCountryCode(t);return`+${n}${i}`}static getPhonePrefixByCountryCode(e){let t=P[e];return t||(t="",console.error(`Phone prefix not found for country code '${e}'`)),Array.isArray(t)&&(t=t[0]),t}}class F extends C{getPluginName(){return"AddToCart"}getActions(){return{beforeFormSubmit:this._beforeFormSubmit.bind(this)}}_beforeFormSubmit(e){if(!this.actionEnabled)return;console.log("AddToCartAction triggered");let t=e.detail,i=null;if(t.forEach((e,t)=>{t.endsWith("][id]")&&e in window.ga4Product?i=e:"product-id"===t&&e in window.ga4Product?i=e:t.endsWith("][referencedId]")&&e in window.ga4Product&&(i=e)}),!i)return;let n=parseInt(t.get("lineItems["+i+"][quantity]"),10);n||(n=1),j.addToCartFromHeader(i,n,!1,!0,!0)}}class j{static consentUpdated(){dataLayer.cleanPush({event:"consent_updated"})}static login(){let{acceptedMads:e}=window,t={event:"login",ga4_event:"login",method:"mail"};e&&(dataLayer.push({microsoft_ads_object:null}),t.microsoft_ads_object={event:"login",method:"mail"}),dataLayer.cleanPush(t)}static viewItemListAfterChange(e){let t=document.querySelectorAll(".discoga4-pagination-hidden-line-item");new F().trigger(),t&&(window.ga4Product=window.ga4Product||{},t.forEach(e=>{let t=e.getAttribute("data-id");window.ga4Product[t]={currency:e.getAttribute("data-currency"),price:e.getAttribute("data-price"),item_brand:e.getAttribute("data-item_brand"),item_name:e.getAttribute("data-item_name"),item_id:e.getAttribute("data-item_id"),item_list_id:e.getAttribute("data-item_list_id"),item_list_name:e.getAttribute("data-item_list_name"),item_variant:e.getAttribute("data-item_variant"),extra:{minPurchase:e.getAttribute("data-min-purchase"),shopware_id:t,realPrice:e.getAttribute("data-real-price"),item_startPrice:e.getAttribute("data-item_start_price"),taxRate:e.getAttribute("data-tax-rate"),parentId:e.getAttribute("data-parentId")}};let i=e.getAttribute("data-item_category").split("|");for(let e=0;e<i.length;e++)0===e?window.ga4Product[t].item_category=i[e]:window.ga4Product[t]["item_category"+e.toString()]=i[e]}),j.viewItemList(e))}static addToCartFromHeader(e,t,i,n,a){let o,r,s={event:"add_to_cart",ga4_event:"add_to_cart"};i&&(s.event="remove_from_cart",s.ga4_event="remove_from_cart",n=!1);let c=parseFloat(A.getAdsValueFromHeader(e,t).total),d=parseFloat(A.getAdsValueFromHeader(e,t).unit),l=parseFloat(A.getValueFromHeader(e,t,!1)),u=A.getFormUAItemFromHeader(e),{customTagManagerEnabled:m,ga4AdvancedConsentMode:g,acceptedGa:_,googleAnalyticsEnabled:p,ga4Currency:h,ga4Product:v,acceptedGads:y,googleAdsEnabled:f,ecomm_pagetype:w,acceptedMeta:b,acceptedMads:C,acceptedPinterest:S,acceptedTiktok:I}=window;if(v&&v[e]){let{index:i,item_list_id:s,item_list_name:c,item_id:d,extra:l}=v[e],u=A.getProductFromHeader(e,t,i,s,c,n,a);o=u.ga,r=u.channel,k.setJsonEntry("ga4item_",e,o),k.setEntriesIfMissing([{entryString:"item_startPrice_",productId:e,value:l.item_startPrice}
9,{entryString:"taxRate_",productId:e,value:l.taxRate},{entryString:"productId_",productId:d,value:e},{entryString:"SKU_",productId:e,value:d}])}if(null!==(o=k.getJsonEntry("ga4item_",e))&&(o.quantity=t,o.discount=Math.round(100*o.discount)/100),(g||_)&&p&&(dataLayer.push({ecommerce:null}),s.ecommerce={currency:h,value:parseFloat(l.toFixed(2)),items:[o]}),(g||y)&&f&&(dataLayer.push({items:null}),s.value=parseFloat(c.toFixed(2)),s.items=[u]),b){dataLayer.push({meta_object:null});let e=A.getMetaItemFromItem(r,d);s.meta_object={meta_event:i?"RemoveFromCart":"AddToCart",meta_object_data:{value:parseFloat(c.toFixed(2)),currency:h,contents:[e.contents],content_type:"product",content_name:e.name,content_category:e.category}}}if(C){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemFromItem(r,d);e?s.microsoft_ads_object={event:i?"remove_from_cart":"add_to_cart",ecomm_prodid:e.ecomm_prodid,ecomm_pagetype:w,ecomm_totalvalue:parseFloat(c.toFixed(2)),revenue_value:parseFloat(c.toFixed(2)),currency:h,items:[e.lineItem]}:s.microsoft_ads_object={event:i?"remove_from_cart":"add_to_cart",ecomm_prodid:[],ecomm_pagetype:w,ecomm_totalvalue:parseFloat(c.toFixed(2)),revenue_value:parseFloat(c.toFixed(2)),currency:h,items:void 0}}if(S&&!i){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemFromItem(r,d);if(e?s.pinterest_object={pinterest_event:"addtocart",value:parseFloat(c.toFixed(2)),currency:h,line_items:[e]}:s.pinterest_object={pinterest_event:"addtocart",currency:h,value:parseFloat(c.toFixed(2)),line_items:void 0},m){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems([r]);e?s.pinterest_object_serverside={event_name:"add_to_cart",currency:h,value:c.toFixed(2).toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}:s.pinterest_object_serverside={event_name:"add_to_cart",currency:h,value:parseFloat(c.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}}if(I){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemFromItem(r,d);e?s.tiktok_object={tiktok_event:"AddToCart",currency:h,value:parseFloat(c.toFixed(2)),quantity:e.quantity,content_type:"product",contents:[e.lineItem]}:s.tiktok_object={tiktok_event:"AddToCart",currency:h,value:void 0,quantity:void 0,content_type:"product",line_items:void 0}}dataLayer.cleanPush(s)}static viewItemList(e,t){let i,n,a,o;let{customTagManagerEnabled:r,ga4activeNavigationId:s,searchTerm:c,searchResult:d,ga4AdvancedConsentMode:l,acceptedGa:u,googleAnalyticsEnabled:m,acceptedGads:g,ga4activeNavigationName:_,googleAdsEnabled:p,ga4Currency:h,ecomm_pagetype:v,acceptedMeta:y,acceptedMads:f,acceptedPinterest:w}=window;if("category"===e?(i=document.querySelector(".cms-element-product-listing"),n=s||"",a=document.title):"search"===e?(i=document.querySelector(".cms-element-product-listing-wrapper"),n="search="+c,a="search"):"productCrossSelling"===e?(i=t,n=t&&t.getAttribute("aria-labelledby")?t.getAttribute("aria-labelledby"):"cross selling",a=document.querySelector("#"+n).innerText):(n=(i=t)&&i.getAttribute("data-cms-element-id")?i.getAttribute("data-cms-element-id"):"cms element",a=e.toString()),!i)return;let b={event:"view_item_list",ga4_event:"view_item_list"},C=E.getItems(i,n,a),k=C.items;(l||u)&&m&&(dataLayer.push({ecommerce:null}),b.ecommerce={item_list_id:n,item_list_name:a,items:k});let S=0;if((o=C.adsItems)&&(S=C.total,(l||g)&&p&&(dataLayer.push({items:null}),b.value=parseFloat(S.toFixed(2)),b.items=o)),"search"===e&&this.viewSearchResults(o,S),"search"===e&&y){dataLayer.push({meta_object:null});let e=d?A.getMetaItemsFromWindow("view_search_results"):void 0;b.meta_object={meta_event:"Search",meta_object_data:{contents:e?e.contents:void 0,content_type:"product",search_string:c}}}if(f){dataLayer.push({microsoft_ads_object:null});let t=A.getMadsItemsFromItems(C.channelItems);t?b.microsoft_ads_object={event:"view_item_list",ecomm_category:"category"===e?_:void 0,ecomm_prodid:t.ecomm_prodid,ecomm_pagetype:v,ecomm_totalvalue:parseFloat(S.toFixed(2)),revenue_value:parseFloat(S.toFixed(2)),currency:h,items:t.lineItems}:b.microsoft_ads_object={event:"view_item_list",ecomm_category:"category"===e?window.ga4activeNavigationName:void 0,ecomm_prodid:[],ecomm_pagetype:v,ecomm_totalvalue:void 0,revenue_value:void 0,currency:h,items:[]}}if(dataLayer.cleanPush(b),w&&"category"===e){let e={event:"view_category"};dataLayer.push({pinterest_object:null,microsoft_ads_object:null,meta_object:null,ecommerce:null});let t=A.getPinterestItemsFromItems(k);if(t?e.pinterest_object={pinterest_event:"viewcategory",currency:h,value:parseFloat(S.toFixed(2)),line_items:t.lineItems}:e.pinterest_object={pinterest_event:"viewcategory",currency:h,value:parseFloat(S.toFixed(2)),line_items:void 0},r){dataLayer.push({pinterest_object_serverside:null});let t=A.getPinterestContentsFromItems(C.channelItems);t?e.pinterest_object_serverside={event_name:"view_category",currency:h,value:parseFloat(S.toFixed(2)).toString(),content_ids:t.ids,content_name:window.document.title,contents:t.contents,num_items:t.numberOfItems}:e.pinterest_object_serverside={event_name:"view_category",currency:h,value:parseFloat(S.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}dataLayer.cleanPush(e)}}static viewItemFromHeader(e,t){if(!e)return;let{customTagManagerEnabled:i,ga4Product:n,ga4Currency:a,ga4AdvancedConsentMode:o,acceptedGa:r,googleAnalyticsEnabled:s,acceptedGads:c,googleAdsEnabled:d,ecomm_pagetype:l,acceptedMeta:u,acceptedMads:m,acceptedPinterest:g,acceptedTiktok:_}=window,p=A.getAdsValueFromHeader(e,t).total,h=A.getValueFromHeader(e,t);n[e].index=0,n[e].item_list_id="product",n[e].item_list_name="product";let v={event:"view_item",ga4_event:"view_item"},y=A.getProductFromHeader(e,t,0,"product","product",!1,!0);if((o||r)&&s&&(dataLayer.push({ecommerce:null}),v.ecommerce={currency:a,value:parseFloat(h.toFixed(2)),items:[y.ga]}),(o||c)&&d&&(dataLayer.push({items:null}),v.value=parseFloat(p.toFixed(2)),v.items=[A.getFormUAItemFromHeader(e)]),u){dataLayer.push({meta_object:null});let e=A.getMetaItemFromItem(y.channel);v.meta_object={meta_event:"ViewContent",meta_object_data:{value:parseFloat(p.toFixed(2)),currency:a,contents:[e.contents],content_type:"product",content_name:e.name,content_category:e.category}}}if(m){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemFromItem(y.channel);e?v.microsoft_ads_object={event:"view_item",ecomm_prodid:e.ecomm_prodid,ecomm_pagetype:l,ecomm_totalvalue:parseFloat(p.toFixed(2)),revenue_value:parseFloat(p.toFixed(2)),currency:a,items:[e.lineItem]}:v.microsoft_ads_object={event:"view_item",ecomm_prodid:[],ecomm_pagetype:l,ecomm_totalvalue:parseFloat(p.toFixed(2)),revenue_value:parseFloat(p.toFixed(2)),currency:a,items:void 0}}if(g){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemFromItem(y.channel);if(e?v.pinterest_object={pinterest_event:"pagevisit",currency:a,value:parseFloat(p.toFixed(2)),line_items:[e]}:v.pinterest_object={pinterest_event:"pagevisit",currency:a,value:parseFloat(p.toFixed(2)),line_items:void 0},i){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems([y.channel]);e?v.pinterest_object_serverside={event_name:"view_content",currency:a,value:parseFloat(p.toFixed(2)).toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}:v.pinterest_object_serverside={event_name:"view_content",currency:a,value:parseFloat(p.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}}if(_){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemFromItem(y.channel);e?v.tiktok_object={tiktok_event:"ViewContent",currency:a,value:parseFloat(p.toFixed(2)),content_type:"product",contents:[e.lineItem]}:v.tiktok_object={tiktok_event:"ViewContent",currency:a,value:void 0,content_type:"product",line_items:void 0}}k.setJsonEntry("ga4item_",e,y.ga),dataLayer.cleanPush(v)}static selectItem(e,t,i){if(!e)return;let{ga4Currency:n,ecomm_pagetype:a,acceptedMads:o}=window;dataLayer.push({ecommerce:null,value:null,items:null,meta_object:null,microsoft_ads_object:null});let r={event:"select_item",ga4_event:"select_item"};if(r.ecommerce={item_list_id:t,item_list_name:i,items:[e]},o){let t=k.getEntry("taxRate_"+e.item_id)?k.getEntry("taxRate_"+e.item_id):0,i=I.getTaxAwarePrice(e.price,t),o=A.getMadsItemFromItem(e,i);o?r.microsoft_ads_object={event:"select_content",ecomm_prodid:o.ecomm_prodid,ecomm_pagetype:a,ecomm_totalvalue:parseFloat(o.totalvalue.toFixed(2)),revenue_value:parseFloat(o.totalvalue.toFixed(2)),currency:n,items:[o.lineItem]}:r.microsoft_ads_object={event:"select_content",ecomm_prodid:[],ecomm_pagetype:a,ecomm_totalvalue:void 0,revenue_value:void 0,currency:n,items:void 0}}dataLayer.cleanPush(r)}static addToCartFromForm(e){if(!e)return;let t={event:"add_to_cart",ga4_event:"add_to_cart"},{acceptedMeta:i,ga4Currency:n}=window;dataLayer.push({ecommerce:null,value:null,items:null}),t.ecommerce={currency:n,items:[e]},i&&(dataLayer.push({meta_object:null}),t.meta_object={meta_event:"AddToCart",meta_object_data:{value:void 0,currency:n,contents:[{id:e.item_id,item_price:void 0}],content_type:"product",content_name:void 0,content_category:void 0}}),dataLayer.cleanPush(t)}static addToWishlist(e,t){if(!e)return;let i={event:"add_to_wishlist",ga4_event:"add_to_wishlist"},{ga4Currency:n,acceptedMeta:a,acceptedTiktok:o,acceptedMads:r,ecomm_pagetype:s,acceptedPinterest:c,customTagManagerEnabled:d}=window;dataLayer.push({ecommerce:null,value:null,items:null});let l=parseFloat(t.toFixed(2));i.ecommerce={currency:n,value:l,items:[e]};let u=k.getEntry("taxRate_"+e.item_id)?k.getEntry("taxRate_"+e.item_id):0,m=I.getTaxAwarePrice(e.price,u);if(a){dataLayer.push({meta_object:null});let t=A.getMetaItemFromItem(e,m);i.meta_object={meta_event:"AddToWishlist",meta_object_data:{value:parseFloat(m.toFixed(2)),currency:n,contents:[t.contents],content_type:"product",content_name:t.name,content_category:t.category}}}if(r){dataLayer.push({microsoft_ads_object:null});let t=A.getMadsItemFromItem(e,m);i.microsoft_ads_object={event:"add_to_wishlist",ecomm_prodid:t.ecomm_prodid,ecomm_pagetype:s,ecomm_totalvalue:parseFloat(m.toFixed(2)),revenue_value:parseFloat(m.toFixed(2)),currency:n,items:[t.lineItem]}}if(c){dataLayer.push({pinterest_object:null});let t=A.getPinterestItemFromItem(e,m);if(t?i.pinterest_object={pinterest_event:"addtowishlist",currency:n,value:parseFloat(m.toFixed(2)),line_items:[t]}:i.pinterest_object={pinterest_event:"addtowishlist",currency:n,value:parseFloat(m.toFixed(2)),line_items:void 0},d){dataLayer.push({pinterest_object_serverside:null});let t=A.getPinterestContentsFromItems([e]);t?i.pinterest_object_serverside={event_name:"add_to_wishlist",currency:n,value:parseFloat(m.toFixed(2)).toString(),content_ids:t.ids,content_name:window.document.title,contents:t.contents,num_items:t.numberOfItems}:i.pinterest_object_serverside={event_name:"add_to_wishlist",currency:n,value:parseFloat(m.toFixed(2)).toString(),content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:void 0}}}if(o){dataLayer.push({tiktok_object:null});let t=A.getTikTokItemFromItem(e,m);t?i.tiktok_object={tiktok_event:"AddToWishlist",currency:n,value:parseFloat(t.totalvalue.toFixed(2)),content_type:"product",contents:[t.lineItem]}:i.tiktok_object={tiktok_event:"AddToWishlist",currency:n,value:void 0,content_type:"product",line_items:void 0}}dataLayer.cleanPush(i)}static shippingInfo(e,t){if(!e||Array.isArray(e)&&0===e.length||!t)return;let{ga4Currency:i}=window;dataLayer.push({ecommerce:null,value:null,items:null});let n=S.getItemsFromStorage(e);dataLayer.cleanPush({event:"add_shipping_info",ga4_event:"add_shipping_info",ecommerce:{currency:i,value:n.net,coupon:n.coupon,shipping_tier:t.toString(),items:n.items}})}static paymentInfo(e,t){if(!e||Array.isArray(e)&&0===e.length||!t)return;let{acceptedMeta:i,acceptedMads:n,acceptedTiktok:a,ga4Currency:o,ecomm_pagetype:r,acceptedPinterest:s,customTagManagerEnabled:c}=window;dataLayer.push({ecommerce:null,value:null,items:null});let d=S.getItemsFromStorage(e),l={event:"add_payment_info",ga4_event:"add_payment_info"},u=d.items,m=parseFloat(e.dataset.tax),g=parseFloat(e.dataset.shipping),_=parseFloat(e.dataset.shippingtax),p=d.ads_items,h=d.net,v="brutto"===window.taxConfiguration?d.gross:d.net,y=I.getTaxShippingAwarePrice(h,m,g,_);if(l.ecommerce={currency:o,value:v,coupon:d.coupon,payment_type:t.toString(),items:u},i&&(dataLayer.push({meta_object:null}),l.meta_object={meta_event:"AddPaymentInfo"}),n){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemsFromItems(p);e&&e.ecomm_prodid?l.microsoft_ads_object={event:"add_payment_info",ecomm_prodid:e.ecomm_prodid,ecomm_pagetype:r}:l.microsoft_ads_object={event:"add_payment_info",ecomm_prodid:void 0,ecomm_pagetype:r}}if(s){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemsFromItems(p);if(l.pinterest_object={pinterest_event:"addpaymentinfo",value:y,currency:o,line_items:e?e.lineItems:void 0},c){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems(p);l.pinterest_object_serverside={event_name:"add_payment_info",currency:o,value:y.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}}}if(a){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemsFromItems(p);e?l.tiktok_object={tiktok_event:"AddPaymentInfo",currency:o,value:y,content_type:"product",contents:e.lineItems}:l.tiktok_object={tiktok_event:"AddPaymentInfo",currency:o,value:v,content_type:"product",contents:void 0}}dataLayer.cleanPush(l)}static async purchase(e,t){let i={event:"purchase",ga4_event:"purchase"},{customTagManagerEnabled:n,ga4Currency:a,ga4AdvancedConsentMode:o,acceptedGa:r,googleAnalyticsEnabled:s,ga4CustomerLifetimeValue:c,ga4CustomerOrderCount:d,acceptedGads:l,googleAdsEnabled:u,ecomm_pagetype:m,acceptedMeta:g,acceptedMads:_,acceptedPinterest:p,acceptedTiktok:h}=window,v=t.dataset.useremail,y=t.dataset.usergroup,f=t.dataset.salutation,w="not_specified";"mr"===f?w="male":"mrs"===f&&(w="female");
9let b=await this.sha256(v),C=t.dataset.firstname,k=await this.sha256(C),E=t.dataset.lastname,P=await this.sha256(E),F=t.dataset.street,q=t.dataset.city,x=t.dataset.zip,T=t.dataset.region,M=t.dataset.land,O=t.dataset.phone,N=await this.sha256(O),D=L.gete164Phone(O,M),R=await this.sha256(D),G=L.geteItnlPhone(O,M),$=await this.sha256(G),U=window.ga4OrderNumber.toString(),B=await j.sha256(U),H=S.getItemsFromStorage(e),V=parseFloat(e.dataset.tax),J=parseFloat(e.dataset.shipping),W=parseFloat(e.dataset.shippingtax),Q=e.dataset.taxstatus,K=parseFloat(H.discount),z=H.code,Y=H.net,Z="brutto"===window.taxConfiguration?H.gross+J:H.net,X=I.getTaxShippingAwarePrice(Y,V,J,W),ee=J;switch(!0){case"netto"===window.taxConfiguration&&"net"===Q:ee=J;break;case"netto"===window.taxConfiguration&&"gross"===Q:ee=J-W;break;case"brutto"===window.taxConfiguration&&"net"===Q:ee=J+W;break;case"brutto"===window.taxConfiguration&&"gross"===Q:ee=J}let et={transaction_id:U,value:Z,tax:V,shipping:ee,currency:window.ga4Currency,coupon:H.coupon,customer_type:!(d&&d<=1)&&c?"returning":"new",items:H.items};if((o||r)&&s&&e&&(dataLayer.push({ecommerce:null}),i.ecommerce=et,i.coupon_code=z),(o||l)&&u&&t){i.value=X,i.transaction_id=U,i.currency=a,i.discount=K,dataLayer.push({items:null}),i.items=A.getGAdsItemsFromItems(H.ads_items).items,i.email=b,i.phone_number=R;let e={};e.first_name=k,e.last_name=P,e.street=F,e.city=q,e.region=T,e.postal_code=x,e.country=M,i.address=e}if(g){dataLayer.push({meta_object:null});let e=A.getMetaItemsFromItems(H.ads_items);i.meta_object={meta_event:"Purchase",meta_object_data:{value:X,currency:a,contents:e.contents,content_type:"product",num_items:e.numberOfItems,order_id:U}}}if(_){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemsFromItems(H.ads_items);i.microsoft_ads_object={event:"purchase",transaction_id:U,ecomm_prodid:e?e.ecomm_prodid:void 0,ecomm_pagetype:m,ecomm_totalvalue:X,revenue_value:X,currency:a,tax:et.tax,shipping:et.shipping,items:e?e.lineItems:void 0}}if(p){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemsFromItems(H.ads_items);if(i.pinterest_object={pinterest_event:"checkout",order_quantity:e?e.numberOfItems:void 0,currency:a,value:X,order_id:U,promo_code:z,line_items:e?e.lineItems:void 0},n){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems(H.ads_items);i.pinterest_object_serverside={event_name:"checkout",currency:a,value:X.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems,order_id:U}}}if(h){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemsFromItems(H.ads_items);e?i.tiktok_object={tiktok_event:"CompletePayment",currency:a,quantity:e.numberOfItems,value:X,content_type:"product",contents:e.lineItems}:i.tiktok_object={tiktok_event:"CompletePayment",currency:a,quantity:void 0,value:X,content_type:"product",contents:void 0}}i.additional={email:v,customer_group:y,sha256_email:b,first_name:C,sha256_first_name:k,last_name:E,sha256_last_name:P,e164_phone_number:D,sha256_e164_phone_number:R,phone_number:O,sha256_phone_number:N,phone_number_international:G,sha256_phone_number_international:$,gender:w,street:F,city:q,postal_code:x,region:T,country:M,transaction_id:U,sha256_transaction_id:B},dataLayer.cleanPush(i)}static viewCart(e){dataLayer.push({ecommerce:null,value:null,items:null}),dataLayer.cleanPush({event:"view_cart",ga4_event:"view_cart",ecommerce:this.cartContent(e),coupon_code:S.getCoupon(e).code})}static beginCheckout(e){let t={event:"begin_checkout",ga4_event:"begin_checkout"},{ga4Currency:i,ecomm_pagetype:n,acceptedMeta:a,acceptedMads:o,acceptedTiktok:r,customTagManagerEnabled:s,acceptedPinterest:c}=window;dataLayer.push({ecommerce:null,value:null,items:null});let d=S.getItemsFromStorage(e),l=d.items,u=d.ads_items,m=parseFloat(e.dataset.tax),g=parseFloat(e.dataset.shipping),_=parseFloat(e.dataset.shippingtax),p=d.net,h="brutto"===window.taxConfiguration?d.gross:d.net,v=I.getTaxShippingAwarePrice(p,m,g,_);if(t.ecommerce={currency:i,value:h,coupon:d.coupon,items:l},a){dataLayer.push({meta_object:null});let e=A.getMetaItemsFromItems(u);t.meta_object={meta_event:"InitiateCheckout",meta_object_data:{value:v,currency:i,contents:e.contents,content_type:"product",num_items:e.numberOfItems}}}if(o){dataLayer.push({microsoft_ads_object:null});let e=A.getMadsItemsFromItems(u);t.microsoft_ads_object={event:"begin_checkout",ecomm_prodid:e?e.ecomm_prodid:void 0,ecomm_pagetype:n,ecomm_totalvalue:v,revenue_value:v,currency:i,items:e?e.lineItems:void 0}}if(c){dataLayer.push({pinterest_object:null});let e=A.getPinterestItemsFromItems(d.ads_items);if(t.pinterest_object={pinterest_event:"initiatecheckout",value:v,currency:i,line_items:e?e.lineItems:void 0},s){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromItems(u);t.pinterest_object_serverside={event_name:"initiate_checkout",currency:i,value:v.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems}}}if(r){dataLayer.push({tiktok_object:null});let e=A.getTikTokItemsFromItems(u);e?t.tiktok_object={tiktok_event:"InitiateCheckout",currency:i,value:v,content_type:"product",contents:e.lineItems}:t.tiktok_object={tiktok_event:"InitiateCheckout",currency:i,value:h,content_type:"product",contents:void 0}}dataLayer.cleanPush(t)}static signUp(){let{acceptedMeta:e,acceptedMads:t,acceptedPinterest:i,acceptedTiktok:n,customTagManagerEnabled:a}=window,o={event:"sign_up",ga4_event:"sign_up",method:"mail"};e&&(dataLayer.push({meta_object:null}),o.meta_object={meta_event:"CompleteRegistration"}),t&&(dataLayer.push({microsoft_ads_object:null}),o.microsoft_ads_object={event:"sign_up",method:"mail"}),i&&(dataLayer.push({pinterest_object:null}),o.pinterest_object={pinterest_event:"signup"},a&&(dataLayer.push({pinterest_object_serverside:null}),o.pinterest_object_serverside={event_name:"signup"})),n&&(dataLayer.push({tiktok_object:null}),o.tiktok_object={tiktok_event:"CompleteRegistration"}),dataLayer.cleanPush(o)}static viewSearchResults(e,t){let i={event:"view_search_results",ga4_event:"view_search_results"};dataLayer.push({ecommerce:null});let{searchTerm:n,searchResult:a,ga4AdvancedConsentMode:o,acceptedGads:r,googleAdsEnabled:s,ecomm_pagetype:c,acceptedMeta:d,acceptedMads:l}=window;if(i.search_term=n,i.search_result=0,a&&(i.search_result=parseInt(a,10)),(o||r)&&s&&t&&e&&(dataLayer.push({items:null}),i.value=parseFloat(t),i.items=e),d){dataLayer.push({meta_object:null});let e=a?A.getMetaItemsFromWindow("view_search_results"):void 0;i.meta_object={meta_event:"Search",meta_object_data:{contents:e?e.contents:void 0,content_type:"product",search_string:n}}}if(l){dataLayer.push({microsoft_ads_object:null});let e=[];window.ga4Product&&Object.entries(JSON.parse(JSON.stringify(window.ga4Product))).forEac
9h(t=>{t[1]&&e.push(t[1].item_id)}),e?i.microsoft_ads_object={event:"view_search_results",ecomm_query:n,ecomm_prodid:e,ecomm_pagetype:c,search_term:n}:i.microsoft_ads_object={event:"view_search_results",ecomm_query:n,ecomm_prodid:[],ecomm_pagetype:c,search_term:n}}dataLayer.cleanPush(i)}static changeQtyNumber(e){let t,i,n;let a=e.target;if(!a)return;let o=a.getAttribute("value")-a.value;if(a.closest(".cart-item"))t=a.closest(".cart-item").querySelector(".cart-item-remove-button");else{if(!a.closest(".line-item"))return;t=a.closest(".line-item").querySelector(".line-item-remove-button")}let r=t.getAttribute("data-product-id");if(null!=(i=document.querySelector(`.discoga4-checkout-hidden-line-item[data-id='${r}']`))){let e=i.getAttribute("data-sku");n=k.getEntry("productId_",e)}if(n){let e=Math.abs(o);this.addToCartFromHeader(n,e,o>0,!1,!0)}}static changeQty(e){let t,i,n;let a=e.target,o=a.querySelector("[selected='selected']").value-a.value;if(a.closest(".cart-item"))t=a.closest(".cart-item").querySelector(".cart-item-remove-button");else{if(!a.closest(".line-item"))return;t=a.closest(".line-item").querySelector(".line-item-remove-button")}let r=t.getAttribute("data-product-id");if(null!=(i=document.querySelector(`.discoga4-checkout-hidden-line-item[data-id='${r}']`))){let e=i.getAttribute("data-sku");n=k.getEntry("productId_",e)}if(n){let e=Math.abs(o);this.addToCartFromHeader(n,e,o>0,!1,!0)}}static searchSuggested(e,t){if(!e&&!t)return;let{acceptedMeta:i,acceptedMads:n,acceptedPinterest:a,acceptedTiktok:o,customTagManagerEnabled:r}=window;dataLayer.push({ecommerce:null});let s={event:"search",ga4_event:"search",search_term:e,search_result:parseInt(t,10)};if(i){dataLayer.push({meta_object:null});let i=t?A.getMetaItemsFromWindow("suggest"):void 0;s.meta_object={meta_event:"Search",meta_object_data:{contents:i?i.contents:void 0,content_type:"product",search_string:e}}}if(n&&(dataLayer.push({microsoft_ads_object:null}),s.microsoft_ads_object={event:"search",search_term:e}),a&&(dataLayer.push({pinterest_object:null}),s.pinterest_object={pinterest_event:"search",search_query:e},r)){dataLayer.push({pinterest_object_serverside:null});let t=A.getPinterestContentsFromWindow("suggest");t?s.pinterest_object_serverside={event_name:"search",currency:ga4Currency,value:t.totalvalue.toString(),content_ids:t.ids,content_name:window.document.title,contents:t.contents,num_items:t.numberOfItems,search_string:e}:s.pinterest_object_serverside={event_name:"search",search_query:e}}o&&(dataLayer.push({tiktok_object:null}),s.tiktok_object={tiktok_event:"Search",query:e}),dataLayer.cleanPush(s)}static search(){dataLayer.push({ecommerce:null});let{acceptedMads:e,acceptedPinterest:t,searchTerm:i,searchResult:n,customTagManagerEnabled:a}=window,o={event:"search",ga4_event:"search",search_term:i||void 0,search_result:n?parseInt(n,10):0};if(e&&(dataLayer.push({microsoft_ads_object:null}),o.microsoft_ads_object={event:"search",search_term:i}),t&&(dataLayer.push({pinterest_object:null}),o.pinterest_object={pinterest_event:"search",search_query:i},a)){dataLayer.push({pinterest_object_serverside:null});let e=A.getPinterestContentsFromWindow("view_search_results");e?o.pinterest_object_serverside={event_name:"search",currency:ga4Currency,value:e.totalvalue.toString(),content_ids:e.ids,content_name:window.document.title,contents:e.contents,num_items:e.numberOfItems,search_string:i}:o.pinterest_object_serverside={event_name:"search",currency:ga4Currency,value:"0",content_ids:void 0,content_name:window.document.title,contents:void 0,num_items:0,search_string:i}}dataLayer.cleanPush(o)}static addCoupon(e){dataLayer.push({ecommerce:null}),dataLayer.cleanPush({event:"add_coupon_code",ga4_event:"add_coupon_code",coupon_code:e})}static lead(){dataLayer.push({ecommerce:null,value:null,items:null});let{ga4Currency:e,ecomm_pagetype:t,acceptedMeta:i,acceptedMads:n,acceptedPinterest:a,acceptedTiktok:o,generateLeadValue:r,customTagManagerEnabled:s}=window,c=parseFloat(r),d={event:"generate_lead",ga4_event:"generate_lead",currency:e,value:c};i&&(dataLayer.push({meta_object:null}),d.meta_object={meta_event:"Lead",meta_object_data:{value:c,currency:e}}),n&&(dataLayer.push({microsoft_ads_object:null}),d.microsoft_ads_object={event:"generate_lead",ecomm_pagetype:t,ecomm_totalvalue:c,revenue_value:c,currency:e}),a&&(dataLayer.push({pinterest_object:null}),d.pinterest_object={pinterest_event:"lead",lead_type:"Contactform"},s&&(dataLayer.push({pinterest_object_serverside:null}),d.pinterest_object_serverside={event_name:"lead"})),o&&(dataLayer.push({tiktok_object:null}),d.tiktok_object={tiktok_event:"SubmitForm"}),dataLayer.cleanPush(d)}static cartContent(e){let t=S.getItemsFromStorage(e);return{currency:window.ga4Currency,value:"brutto"===window.taxConfiguration?t.gross:t.net,coupon:t.coupon,items:t.items}}static checkoutContent(e,t){let i=S.getItemsFromStorage(e);return{transaction_id:t,value:"brutto"===window.taxConfiguration?i.gross:i.net,tax:parseFloat(e.dataset.tax),shipping:parseFloat(e.dataset.shipping),currency:window.ga4Currency,coupon:i.coupon,items:i.items}}static async sha256(e){if(!e)return;let t=e.trim();if(!t)return;let i=new TextEncoder("utf-8").encode(t.toLowerCase()),n=await crypto.subtle.digest("SHA-256",i);return this.hex(n)}static hex(e){let t="",i=new DataView(e);for(let e=0;e<i.byteLength;e+=4){let n=i.getUint32(e).toString(16),a="00000000";t+=(a+n).slice(-a.length)}return t}static getTaxAwareItemPrice(e,t){return e*(1+t/100)}static replaceEmptyStringsWithUndefined(e){if("object"!=typeof e||null===e)return e;if(Array.isArray(e)){for(let t=0;t<e.length;t++)"object"==typeof e[t]&&null!==e[t]?this.replaceEmptyStringsWithUndefined(e[t]):""===e[t]&&(e[t]=void 0);return e}for(let t in e)if(e.hasOwnProperty(t)){let i=e[t];"object"==typeof i&&null!==i?this.replaceEmptyStringsWithUndefined(i):""===i&&(e[t]=void 0)}return e}}class q extends C{getPluginName(){return"OffCanvasCart"}getActions(){return{offCanvasOpened:this._sidebarOpened.bind(this)}}_sidebarOpened(){if(!this.actionEnabled)return;this._triggerViewCart();let e=document.querySelector(".begin-checkout-btn");e&&e.addEventListener("click",this._onBeginCheckoutSidebar.bind(this));let t=document.querySelectorAll(".js-offcanvas-cart-change-quantity");
9t&&t.forEach(e=>e.addEventListener("change",this._onChangeProductQuantity.bind(this)));let i=document.querySelectorAll(".js-offcanvas-cart-change-quantity-number");i&&i.forEach(e=>e.addEventListener("change",this._onChangeProductQuantityNumber.bind(this)));let n=document.querySelector(".offcanvas-cart-promotion-form");n&&n.addEventListener("submit",this._onAddPromotionOffcanvasCart.bind(this))}_onAddPromotionOffcanvasCart(){if(document.getElementById("addPromotionOffcanvasCartInput")&&document.getElementById("addPromotionOffcanvasCartInput").value){let e=document.getElementById("addPromotionOffcanvasCartInput").value;j.addCoupon(e),localStorage.setItem("couponCode",e)}}_onChangeProductQuantity(e){j.changeQty(e)}_onChangeProductQuantityNumber(e){j.changeQtyNumber(e)}_onBeginCheckoutSidebar(){let e=S.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||j.beginCheckout(e)}_triggerViewCart(){let e=S.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||j.viewCart(e)}}class x{disableAction(){this.actionEnabled=!1}trigger(){}constructor(){this.actionEnabled=!0}}class T extends x{trigger(){this._triggerViewCart();let e=document.querySelector(".begin-checkout-btn");e&&e.addEventListener("click",this._onBeginCheckoutPage.bind(this));let t=document.querySelector(".cart-add-product");t&&t.addEventListener("submit",this._addProduct.bind(this));let i=document.querySelectorAll(".quantity-select");i&&i.forEach(e=>e.addEventListener("change",this._onChangeProductQuantity.bind(this)));let n=document.querySelectorAll(".js-quantity-selector");n&&n.forEach(e=>e.addEventListener("change",this._onChangeProductQuantityNumber.bind(this)));let a=document.querySelector(".cart-add-promotion");a&&a.addEventListener("submit",this._onAddPromotion.bind(this))}_onAddPromotion(){if(document.getElementById("addPromotionInput")&&document.getElementById("addPromotionInput").value){let e=document.getElementById("addPromotionInput").value;j.addCoupon(e),localStorage.setItem("couponCode",e)}}_addProduct(e){if(!this.actionEnabled)return;let t={item_id:e.currentTarget.querySelector(".form-control").value,quantity:1,affiliation:window.ga4affiliation,item_list_id:"checkout",item_list_name:"checkout"};j.addToCartFromForm(t)}_triggerViewCart(){if(!this.actionEnabled)return;let e=S.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||j.viewCart(e)}_onBeginCheckoutPage(){if(!this.actionEnabled)return;let e=S.lineItemsContainer();!e||Array.isArray(e)&&0===e.length||j.beginCheckout(e)}_onChangeProductQuantity(e){j.changeQty(e)}_onChangeProductQuantityNumber(e){j.changeQtyNumber(e)}}class M extends x{trigger(){if(localStorage.getItem("purchaseSent")&&localStorage.getItem("purchaseSent")===new URLSearchParams(window.location.search).get("orderId"))return;let e=S.lineItemsContainer();return this._finish(e)}async _finish(e){if(!this.actionEnabled)return;localStorage.getItem("paymentSelected")&&"yes"===localStorage.getItem("paymentSelected")?console.info("paymentInfo sent in previous page"):window.ga4PaymentMethod&&j.paymentInfo(e,window.ga4PaymentMethod),localStorage.getItem("shippingSelected")&&"yes"===localStorage.getItem("shippingSelected")?console.info("shippingInfo sent in previous page"):window.ga4ShippingMethod&&j.shippingInfo(e,window.ga4ShippingMethod);let t=document.querySelector(".ga4-hidden-ads-information");window.ga4OrderNumber&&(await new Promise(e=>setTimeout(e,800)),await j.purchase(e,t),localStorage.setItem("purchaseSent",new URLSearchParams(window.location.search).get("orderId")),localStorage.removeItem("paymentSelected"),localStorage.removeItem("shippingSelected"),localStorage.removeItem("couponCode"))}}class O extends x{trigger(){this._triggerViewItem()}_triggerViewItem(){let e;if(!this.actionEnabled)return;let t=document.getElementById("productDetailPageBuyProductForm");t&&(t.querySelector("input[name$='][id]']")&&(e=t.querySelector("input[name$='][id]']").value)in window.ga4Product?j.viewItemFromHeader(e,1):t.querySelector("input[name$='][referencedId]']")&&(e=t.querySelector("input[name$='][referencedId]']").value)in window.ga4Product?j.viewItemFromHeader(e,1):t.querySelector("input[name=product-id]")&&(e=t.querySelector("input[name=product-id]").value)in window.ga4Product&&j.viewItemFromHeader(e,1))}}class N extends x{trigger(){this._triggerViewItemList(),document.querySelector(".cms-element-product-listing-wrapper")&&this._documentObserver(".cms-element-product-listing-wrapper")}_triggerViewItemList(){this.actionEnabled&&j.viewItemList("category")}_documentObserver(e){let t=document.querySelector(e),i=!1;new MutationObserver(function(e){for(let t of e)if("childList"===t.type&&t.target.classList.contains("cms-element-product-listing")){i=!0;break}i&&setTimeout(function(){j.viewItemListAfterChange("category")},1e3),i=!1}).observe(t,{subtree:!0,childList:!0})}}class D extends x{trigger(){let e=document.querySelectorAll(".cms-section");e&&D._nodeDeletedObserver(e),this._documentObserver()}_documentObserver(){let e=new MutationObserver(function(t){t.forEach(function(t){t.addedNodes.forEac
9h(function(t){t.hasChildNodes()&&t.querySelector(".cms-element-form")&&(D._nodeDeletedObserver([t]),e.disconnect())})})});e.observe(document.body,{subtree:!0,childList:!0})}static _nodeDeletedObserver(e){let t=new MutationObserver(function(e){e.forEach(function(e){e.removedNodes.forEach(function(e){e.hasChildNodes()&&e.querySelector(".cms-element-form")&&(j.lead(),t.disconnect())})})});e.forEach(e=>{e.querySelector(".cms-element-form")&&t.observe(e,{subtree:!0,childList:!0})})}}let{Feature:R}=window;class G extends x{setAddToCartAction(e){this.addToCartAction=e}trigger(){document.addEventListener("click",this._onClick.bind(this))}_onClick(e){if(this.actionEnabled)switch(this.closestForm=e.target.closest("form.buy-widget"),!0){case null!=(this.closestWishList=e.target.closest(".product-wishlist")):this._onAddToWishList(this.closestWishList);break;case!this.closestForm&&null!=(this.closestSearchSuggestItem=e.target.closest(".search-suggest-product-link")):this._onSelectItemFromSearchSuggest(this.closestSearchSuggestItem);break;case!this.closestForm&&(e.target.getAttribute("href")||e.target.parentElement&&e.target.parentElement.getAttribute("href")||e.target.closest(".product-image-link"))&&null!=(this.closestProduct=e.target.closest(".product-box")):this._onSelectItemFromListing(this.closestProduct);break;case!this.closestForm&&null!=(this.closestRemoveItem=e.target.closest(".cart-item-remove-button")):case!this.closestForm&&null!=(this.closestRemoveItem=e.target.closest(".line-item-remove-button")):this._onRemoveFromCart(this.closestRemoveItem);break;case!this.closestForm&&null!=(this.closestCartItem=e.target.closest(".cart-item-img")):case!this.closestForm&&null!=(this.closestCartItem=e.target.closest(".cart-item-label")):case!this.closestForm&&null!=(this.closestCartItem=e.target.closest(".line-item-img")):case!this.closestForm&&null!=(this.closestCartItem=e.target.closest(".line-item-label")):this._onSelectItemFromCart(this.closestCartItem)}}_onAddToWishList(e){let t,i,n,a,o;if(window.ga4UserLoggedIn&&R.isActive("v6.6.0.0")?e.querySelector("button").classList.contains("product-wishlist-not-added"):e.querySelector("button").classList.contains("product-wishlist-added")){switch(!0){case null!=(i=e.closest(".line-item-product")):if(null!=(n=i.querySelector(".line-item-remove-button"))&&(a=n.getAttribute("data-product-id"),null!=(o=document.querySelector(`.discoga4-checkout-hidden-line-item[data-id='${a}']`)))){let e=o.getAttribute("data-sku");t=k.getEntry("productId_",e)}break;case null!=(i=e.closest(".cart-item-product")):if(null!=(n=i.querySelector(".cart-item-remove-button"))&&(a=n.getAttribute("data-product-id"),null!=(o=document.querySelector(`.discoga4-checkout-hidden-line-item[data-id='${a}']`)))){let e=o.getAttribute("data-sku");t=k.getEntry("productId_",e)}break;case null!=(i=e.closest(".product-box")):null!=(n=i.querySelector("input[name$='][id]']"))&&n.value in window.ga4Product?t=n.value:null!=(n=i.querySelector("input[name=product-id]"))&&n.value in window.ga4Product?t=n.value:null!=(n=i.querySelector("input[name$='][referencedId]']"))&&n.value in window.ga4Product?t=n.value:!0===i.hasAttribute("data-product-information")&&JSON.parse(i.getAttribute("data-product-information")).id in window.ga4Product&&(t=JSON.parse(i.getAttribute("data-product-information")).id);break;case null!=(i=e.closest(".product-detail-buy")):null!=(n=i.querySelector("input[name$='][id]']"))&&n.value in window.ga4Product?t=n.value:null!=(n=i.querySelector("input[name=product-id]"))&&n.value in window.ga4Product?t=n.value:null!=(n=i.querySelector("input[name$='][referencedId]']"))&&n.value in window.ga4Product&&(t=n.value)}if(t){let e;if(window.ga4Product&&window.ga4Product[t]){let e=k.getOrigin(t),i=A.getProductFromHeader(t,1,e.index,e.id,e.name,!0,!0);j.addToWishlist(i.ga,A.getValueFromHeader(t,1))}else null!==(e=k.getJsonEntry("ga4item_",t))&&(e.discount=0,j.addToWishlist(e,A.getValueFromHeader(t,1)))}}}_onSelectItemFromListing(e){let t;if(e.closest(".product-action"))return;let i=e.closest(".product-box");if(i&&(t=!0===i.hasAttribute("data-product-information")&&JSON.parse(i.getAttribute("data-product-information")).id in window.ga4Product?JSON.parse(i.getAttribute("data-product-information")).id:i.querySelector("input[name=product-id]")&&i.querySelector("input[name=product-id]").value in window.ga4Product?i.querySelector("input[name=product-id]").value:i.querySelector("input[name$='][id]']")&&i.querySelector("input[name$='][id]']").value in window.ga4Product?i.querySelector("input[name$='][id]']").value:i.querySelector("input[name$='][referencedId]']")&&i.querySelector("input[name$='][referencedId]']").value in window.ga4Product?i.querySelector("input[name$='][referencedId]']").value:null)){let e=k.getOrigin(t),n=A.getProductFromHeader(t,1,e.index,e.id,e.name,!0,!0),a=i.closest('[data-swag-cms-extensions-quickview-box="true"]');null!==a&&a.getAttribute("data-focus-id")===t?this._subscribeQuickviewAddToCart(t):j.selectItem(n.ga,e.id,e.name)}}_subscribeQuickviewAddToCart(){let e=0,t=()=>{e++;let i=document.querySelector(".swag-cms-extensions-quickview-modal");if(!i){e<30&&setTimeout(t,100);return}this._hydrateQuickviewProducts(i),this._handleQuickviewProductChange(i),this._observeQuickviewContentChanges(i),this._watchQuickviewCarou
9selNavigation(i)};setTimeout(t,100)}_watchQuickviewCarouselNavigation(e){e._ga4CarouselListenerAttached||(e._ga4CarouselListenerAttached=!0,e.addEventListener("slid.bs.carousel",()=>{setTimeout(()=>{this._hydrateQuickviewProducts(e),this._handleQuickviewProductChange(e)},150)}))}_observeQuickviewContentChanges(e){if(e._ga4QuickviewObserverAttached)return;e._ga4QuickviewObserverAttached=!0;let t=e.querySelector(".modal-content")||e,i=null,n=new MutationObserver(()=>{clearTimeout(i),i=setTimeout(()=>{this._hydrateQuickviewProducts(e),this._handleQuickviewProductChange(e)},150)});n.observe(t,{childList:!0,subtree:!0,attributes:!0}),e._ga4QuickviewObserver=n}_handleQuickviewProductChange(e){let t=this._getQuickviewActiveProductId(e);if(!t||!window.ga4Product||!window.ga4Product[t])return;e._ga4LastQuickviewProductId!==t&&(e._ga4LastQuickviewProductId=t,j.viewItemFromHeader(t,1));let i=this._getQuickviewActiveForm(e);if(!i||(e._ga4SubscribedQuickviewForms||(e._ga4SubscribedQuickviewForms=new WeakSet),e._ga4SubscribedQuickviewForms.has(i)))return;let n=0,a=()=>{n++;let t=window.PluginManager.getPluginInstanceFromElement(i,"AddToCart");if(!t){n<20&&setTimeout(a,100);return}this.addToCartAction&&(e._ga4SubscribedQuickviewForms.add(i),t.$emitter.subscribe("beforeFormSubmit",this.addToCartAction._beforeFormSubmit.bind(this.addToCartAction)))};setTimeout(a,100)}_getQuickviewActiveForm(e){return(e.querySelector(".carousel-item.active")||e).querySelector("[data-add-to-cart], form.buy-widget, #productDetailPageBuyProductForm")}_getQuickviewActiveProductId(e){let t=this._getQuickviewActiveForm(e);if(!t)return null;let i=t.querySelector("input[name$='][id]']");if(i&&window.ga4Product&&window.ga4Product[i.value])return i.value;let n=t.querySelector("input[name=product-id]");if(n&&window.ga4Product&&window.ga4Product[n.value])return n.value;let a=t.querySelector("input[name$='][referencedId]']");if(a&&window.ga4Product&&window.ga4Product[a.value])return a.value;let o=e.querySelector(".carousel-item.active");if(o){let e=o.getAttribute("data-swag-cms-extensions-quickview-carousel-product-id");if(e&&window.ga4Product&&window.ga4Product[e])return e}return null}_hydrateQuickviewProducts(e){let t=e.querySelectorAll(".discoga4-quickview-hidden-line-item");t.length&&(window.ga4Product=window.ga4Product||{},t.forEach(e=>{let t=e.getAttribute("data-id");if(!t)return;window.ga4Product[t]={currency:e.getAttribute("data-currency"),price:e.getAttribute("data-price"),item_brand:e.getAttribute("data-item-brand"),item_name:e.getAttribute("data-item-name"),item_id:e.getAttribute("data-item-id"),item_list_id:e.getAttribute("data-item-list-id")||"product",item_list_name:e.getAttribute("data-item-list-name")||"product",item_variant:e.getAttribute("data-item-variant"),extra:{minPurchase:e.getAttribute("data-min-purchase"),shopware_id:t,realPrice:e.getAttribute("data-real-price"),item_startPrice:e.getAttribute("data-item-start-price"),taxRate:e.getAttribute("data-tax-rate"),parentId:e.getAttribute("data-parent-id")}};let i=(e.getAttribute("data-item-category")||"").split("|").filter(Boolean);for(let e=0;e<i.length;e++)0===e?window.ga4Product[t].item_category=i[e]:window.ga4Product[t]["item_category"+e.toString()]=i[e]}))}_onSelectItemFromSearchSuggest(e){let t=0,i=e.closest("li"),n=Array.from(e.closest("ul").children);if(null!==i&&null!==n&&(t=n.indexOf(i)),!window.ga4SearchSuggestProduct||!window.ga4SearchSuggestProduct[t]){let i=e.getAttribute("href"),n=e.getAttribute("title"),a=i.split("/").slice(-1)[0],o=e.querySelector(".search-suggest-product-price").innerText;k.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:a,value:t},{entryString:"ga4_item_list_id",productId:a,value:"search_suggest"},{entryString:"ga4_item_list_name",productId:a,value:"search_suggest"}]),j.selectItem({item_id:a,item_name:n,quantity:1,price:o?parseFloat(o):0},"search_suggest","search_suggest");return}let a=JSON.parse(JSON.stringify(window.ga4SearchSuggestProduct[t]));if(!a)return;let{item_id:o,item_list_id:r,item_list_name:s,extra:c}=a,d=c.parentId;a.extra&&delete a.extra,k.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:o,value:t},{entryString:"ga4_item_list_id",productId:o,value:r},{entryString:"ga4_item_list_name",productId:o,value:s}]),d&&k.setEntriesIfMissing([{entryString:"ga4_item_list_index_",productId:d,value:t},{entryString:"ga4_item_list_id",productId:d,value:r},{entryString:"ga4_item_list_name",productId:d,value:s}]),j.selectItem(a,r,s)}_onSelectItemFromCart(e){let t;if(e.closest(".cart-quantity-price"))return;let i=e.closest(".cart-item-row")?e.closest(".cart-item-row"):e.closest(".line-item");if(!i)return;let n=i.querySelector(".cart-item-remove-button")?i.querySelector(".cart-item-remove-button"):i.querySelector(".line-item-remove-button");if(!n)return;let a=n.dataset.productId?n.dataset.productId:n.dataset["product-id"];if(a&&null!==(t=k.getJsonEntry("ga4item_",a))){t.discount=Math.round(100*t.discount)/100;let e=k.getEntry("ga4_item_list_id",a),i=k.getEntry("ga4_item_list_name",a);j.selectItem(t,e,i)}}_onRemoveFromCart(e){let t=e.dataset.productId;if(!t)return;let i=e.closest(".cart-item-row")?e.closest(".cart-item-row"):e.closest(".line-item-row");
9if(!i)return;let n=1;i.querySelector("[selected='selected']")?n=i.querySelector("[selected='selected']").value:i.querySelector(".js-offcanvas-cart-change-quantity-number")?n=i.querySelector(".js-offcanvas-cart-change-quantity-number").value:i.querySelector(".js-quantity-selector")&&(n=i.querySelector(".js-quantity-selector").value),j.addToCartFromHeader(t,parseInt(n,10),!0,!1,!1)}constructor(...e){super(...e),this.addToCartAction=null}}class $ extends x{trigger(){let e=document.querySelectorAll(".product-slider-container");e&&e.forEach(e=>{this._onLoad(e)})}_onLoad(e){if(!this.actionEnabled)return;let t=this,i=e.closest(".tab-pane");if(i){if(i.classList.contains("active")){let e;j.viewItemList("productCrossSelling",i);let n=i.querySelectorAll(".product-slider-controls-prev,.product-slider-controls-next");i.querySelector(".product-slider-container")&&(e=i.querySelector(".product-slider-container").id),n&&e&&n.forEach(i=>i.addEventListener("click",function(){t._onClick("productCrossSelling",e)}))}this.respondToClassChange(i)}}respondToClassChange(e){let t=e.classList.contains("active");new MutationObserver(function(i){i.forEach(function(i){if("class"===i.attributeName){let n=i.target.classList.contains("active");t!==n&&(t=n,n&&j.viewItemList("productCrossSelling",e))}})}).observe(e,{attributes:!0})}_onClick(e,t){this.sleep(2e3).then(()=>{let i=document.getElementById(t);i&&j.viewItemList(e,i.closest(".tab-pane"))})}sleep(e){return new Promise(t=>setTimeout(t,e))}}class U extends x{trigger(){let e=document.querySelectorAll(".cms-block-product-slider"),t=document.querySelectorAll(".cms-block-product-three-column"),i=document.querySelectorAll(".cms-block-cross-selling");e&&this._onLoad(e,"cms-block-product-slider"),t&&this._onLoad(t,"cms-block-product-three-column"),i&&this._onLoad(i,"cms-block-cross-selling")}_onLoad(e,t){if(!this.actionEnabled)return;let i=this;e.forEach(e=>{let n=e.querySelectorAll("[data-cms-element-id]");n&&n.forEach(e=>{let n;j.viewItemList(t,e);let a=e.querySelectorAll(".product-slider-controls-prev,.product-slider-controls-next");e.querySelector(".product-slider-container")&&(n=e.querySelector(".product-slider-container").id
9),a&&n&&a.forEach(e=>e.addEventListener("click",function(){i._onClick(t,n)}))})})}_onClick(e,t){this.sleep(1e3).then(()=>{let i=document.getElementById(t);i&&j.viewItemList(e,i)})}sleep(e){return new Promise(t=>setTimeout(t,e))}}class B extends x{trigger(){this._triggerViewSearchResults(),this._triggerSearch(),document.querySelector(".cms-element-product-listing-wrapper")&&this._documentObserver(".cms-element-product-listing-wrapper")}_triggerSearch(){this.actionEnabled&&window.searchTerm&&j.search()}_triggerViewSearchResults(){this.actionEnabled&&j.viewItemList("search")}_documentObserver(e){let t=document.querySelector(e),i=!1;new MutationObserver(function(e){e.forEach(function(e){"childList"===e.type&&(i=!0)}),i&&setTimeout(function(){j.viewItemListAfterChange("search")},1e3)}).observe(t,{subtree:!0,childList:!0})}}class H extends x{trigger(){let e=new URLSearchParams(window.location.search).get("isPayPalExpressCheckout"),t=S.lineItemsContainer();t&&(localStorage.setItem("couponCode",t.dataset.couponcode),"1"===e&&j.beginCheckout(t));let i=document.querySelectorAll(".quantity-select");i&&i.forEach(e=>e.addEventListener("change",this._onChangeProductQuantity.bind(this)));let n=document.querySelectorAll(".payment-method-input");n&&n.forEach(e=>e.addEventListener("change",this._onChangePayment.bind(this)));let a=document.querySelectorAll(".shipping-method-input");a&&a.forEach(e=>e.addEventListener("change",this._onChangeShipping.bind(this)))}_onChangeProductQuantity(e){j.changeQty(e)}_onChangePayment(e){let t=e.target.closest(".payment-method-radio").querySelector(".payment-method-description").querySelector("strong").innerText,i=S.lineItemsContainer();t&&j.paymentInfo(i,t),localStorage.setItem("paymentSelected","yes")}_onChangeShipping(e){let t=S.lineItemsContainer(),i=e.target.closest(".shipping-method-radio").querySelector(".shipping-method-description").querySelector("strong").innerText;i&&j.shippingInfo(t,i),localStorage.setItem("shippingSelected","yes")}}class V extends C{getPluginName(){return"SearchWidget"}getActions(){return{afterSuggest:this._afterSuggest.bind(this),clearSuggestResults:this._onAfterClearSearchResults.bind(this)}}_afterSuggest(){if(!this.actionEnabled)return;let e="";if(!document.querySelector(".header-search-input").value)return;e=document.querySelector(".header-search-input").value;let t=0;if(document.querySelector(".search-suggest-container")){let e=document.querySelector(".search-suggest-container .search-suggest-total-count");t=e?parseInt(e.textContent):document.querySelectorAll(".search-suggest-container > .search-suggest-product").length}let i=document.querySelector("#ga4AfterSuggestScript");if(!i)return;let n=document.createTextNode(i.textContent),a=document.createElement("script");a.appendChild(n),document.querySelector("head").appendChild(a),j.searchSuggested(e.replace("/search?search=",""),t)}_onAfterClearSearchResults(){window.ga4SearchSuggestProduct&&delete window.ga4SearchSuggestProduct}}let{PluginManager:J}=window;!window.ga4Enabled||J.getPluginList()&&J.getPluginList().GA4||J.register("GA4",class extends s{init(){let e=this;switch(this.cookieDisGoogleTag="_dis_gtag",this.cookieDisGoogleAnalytics="_dis_ga",this.cookieDisGoogleAds="_dis_gads",this.cookieDisMeta="_dis_meta",this.cookieDisMads="_dis_mads",this.cookieDisPinterest="_dis_pinterest",this.cookieDisTikTok="_dis_tiktok",this.trackingEnabled=!1,this.tagManagerEnabled=!1,this.gaEventsTriggered=!1,this.gadsEventsTriggered=!1,this.pageViewEventTriggered=!1,this.cookieConfig=window.ga4CookieConfig,this.ga4AdvancedConsentMode=window.ga4AdvancedConsentMode,this.ga4ActiveConsentMode=window.ga4ActiveConsentMode,this.ga4customScript=window.ga4customScript,this.customTagManager=window.customTagManager,this.initializeConsent(),!0){case"cookieConsentPlus"===this.cookieConfig:case"standardCookies"===this.cookieConfig:e.activateIfConsent("gtag",c.getItem(this.cookieDisGoogleTag)),e.activateIfConsent("ga",c.getItem(this.cookieDisGoogleAnalytics)),e.activateIfConsent("gads",c.getItem(this.cookieDisGoogleAds)),e.activateIfConsent("meta",c.getItem(this.cookieDisMeta)),e.activateIfConsent("mads",c.getItem(this.cookieDisMads)),e.activateIfConsent("pinterest",c.getItem(this.cookieDisPinterest)),e.activateIfConsent("tiktok",c.getItem(this.cookieDisTikTok)),e.updateConsent(),e.triggerCoreScript(),document.$emitter.subscribe(w,this.cookieSubscriber.bind(this));break;case"cookieBot"===this.cookieConfig:window.addEventListener("CookiebotOnConsentReady",function(){e.activateIfConsent("gtag",Cookiebot.consent.statistics),e.activateIfConsent("ga",Cookiebot.consent.statistics),e.activateIfConsent("gads",Cookiebot.consent.marketing),e.activateIfConsent("meta",Cookiebot.consent.marketing),e.activateIfConsent("mads",Cookiebot.consent.marketing),e.activateIfConsent("pinterest",Cookiebot.consent.marketing),e.activateIfConsent("tiktok",Cookiebot.consent.marketing),e.updateConsent(),e.triggerCoreScript()}),window.addEventListener("CookiebotOnDecline",function(){e.activateIfConsent("gtag",!1),e.activateIfConsent("ga",!1),e.activateIfConsent("gads",!1),e.activateIfConsent("meta",!1),e.activateIfConsent("mads",!1),e.activateIfConsent("pinterest",!1),e.activateIfConsent("tiktok",!1)});break;case"userCentrics"===this.cookieConfig:setTimeout(function(){e.triggerUCConsentV3()},1e3),window.addEventListener("UC_CONSENT",function(){setTimeout(function(){e.triggerUCConsentV3()},1e3)}),window.addEventListener("consent_status",function(){setTimeout(function(){e.triggerUCConsentV3()},1e3)}),window.addEventListener("ucEvent",function(t){t.detail&&"consent_status"===t.detail.event&&setTimeout(function(){e.triggerUCConsentV3()},1e3)}),window.addEventListener("UC_UI_INITIALIZED",function(){e.triggerUCConsentV2(),setTimeout(function(){e.triggerUCConsentV3()},1e3)}),window.addEventListener("UC_UI_CMP_EVENT",function(t){("ACCEPT_ALL"===t.detail.type||"DENY_ALL"===t.detail.type||"SAVE"===t.detail.type)&&(e.triggerUCConsentV2(),setTimeout(function(){e.triggerUCConsentV3()},1e3))});break;case"didomi"===this.cookieConfig:window.didomiEventListeners=window.didomiEventListeners||[],window.didomiEventListeners.push({event:"consent.changed",listener:function(t){e.triggerDidomiConsent()}}),window.didomiEventListeners.push({event:"sync.ready",listener:function(){e.triggerDidomiConsent()}});break;case"consentManager"===this.cookieConfig:window.addEventListener("cmpEvent",function(){e.triggerCMPConsent()});break;case"ccm19"===this.cookieConfig:setTimeout(function(){e.triggerCCM19Consent()},2e3),window.addEventListener("ccm19WidgetLoaded",function(){e.triggerCCM19Consent()}),window.addEventListener("ccm19WidgetClosed",function(){e.triggerCCM19Consent()});break;case"acris"===this.cookieConfig:let t="acrisCookieStateChanged",i=()=>{window.acrisCookiePrivacy&&(e.activateIfConsent("gtag",window.acrisCookiePrivacy.c.includes(this.cookieDisGoogleTag)),e.activateIfConsent("ga",window.acrisCookiePrivacy.c.includes(this.cookieDisGoogleAnalytics)),e.activateIfConsent("gads",window.acrisCookiePrivacy.c.includes(this.cookieDisGoogleAds)),e.activateIfConsent("meta",window.acrisCookiePrivacy.c.includes(this.cookieDisMeta)),e.activateIfConsent("mads",window.acrisCookiePrivacy.c.includes(this.cookieDisMads)),e.activateIfConsent("pinterest",window.acrisCookiePrivacy.c.includes(this.cookieDisPinterest)),e.activateIfConsent("tiktok",window.acrisCookiePrivacy.c.includes(this.cookieDisTikTok)),e.updateConsent(),e.triggerCoreScript())};window.addEventListener(t,i),document.$emitter.subscribe(w,(()=>{window.dataLayer.find(e=>e.event&&"acrisCookieStateChanged"===e.event)&&i()}).bind(this));let n=0,a=setInterval(()=>{window.dataLayer.find(e=>e.event&&e.event===t)&&(window.dispatchEvent(new Event(t)),clearInterval(a)),++n>50&&(clearInterval(a),console.warn(`Missing '${t}' Acris event.`))},200);break;case"cookieFirst"===this.cookieConfig:window.addEventListener("cf_services_consent_loaded",function(){setTimeout(function(){e.triggerCookieFirstConsent()},500)}),window.addEventListener("cf_consent",function(){setTimeout(function(){e.triggerCookieFirstConsent()},1e3)});break;case"cookieScript"===this.cookieConfig:window.addEventListener("CookieScriptLoaded",function(){e.triggerCookieScriptConsent()}),window.addEventListener("CookieScriptAccept",function(){setTimeout(function(){e.triggerCookieScriptConsent()},500)}),window.addEventListener("CookieScriptAcceptAll",function(){setTimeout(function(){e.triggerCookieScriptConsent()},500)});break;case"keine"===this.cookieConfig:window.acceptedGtag=!!window.googleTagEnabled&&window.googleTagEnabled,window.acceptedGa=!!window.googleAnalyticsEnabled&&window.googleAnalyticsEnabled,window.acceptedGads=!!window.googleAdsEnabled&&window.googleAdsEnabled,window.acceptedMeta=!!window.metaAdsEnabled&&window.metaAdsEnabled,window.acceptedMads=!!window.microsoftAdsEnabled&&window.microsoftAdsEnabled,window.acceptedPinterest=!!window.pinterestAdsEnabled&&window.pinterestAdsEnabled,window.acceptedTiktok=!!window.tiktokAdsEnabled&&window.tiktokAdsEnabled,e.updateConsent(),e.triggerCoreScript()}ga4AdvancedConsentMode&&(this.tagManagerEnabled||(customTagManager&&ga4customScript?this.enableCustomTagManager():this.enableTagManager(),this.tagManagerEnabled=!0),setTimeout(function(){e.triggerCoreScript()},2e3))}triggerCCM19Consent(){if(CCM&&CCM.acceptedCookies.length){let e=["_gads","_gcl_aw"].some(e=>CCM.acceptedCookies.includes(e));this.activateIfConsent("gtag",CCM.acceptedCookies.includes("cookiePreferences")),this.activateIfConsent("ga",CCM.acceptedCookies.includes("_ga")),this.activateIfConsent("gads",e),this.activateIfConsent("meta",CCM.acceptedCookies.includes("_fbp")),this.activateIfConsent("mads",CCM.acceptedCookies.includes("_uetsid")),this.activateIfConsent("pinterest",CCM.acceptedCookies.includes("_epik")),this.activateIfConsent("tiktok",CCM.acceptedCookies.includes("_ttp")),this.updateConsent(),this.triggerCoreScript()}}triggerCookieScriptConsent(){window.CookieScript.instance&&window.CookieScript.instance.dispatchEventNames?(this.activateIfConsent("gtag",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-functionality")),this.activateIfConsent("ga",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-performance")),this.activateIfConsent("gads",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("meta",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("mads",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("pinterest",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.activateIfConsent("tiktok",window.CookieScript.instance.dispatchEventNames.includes("CookieScriptCategory-targeting")),this.updateConsent(),this.triggerCoreScript()):console.debug("CookieScript.instance null")}triggerCookieFirstConsent(){window.CookieFirst&&window.CookieFirst.acceptedServices?(this.activateIfConsent("gtag",!!window.CookieFirst.acceptedServices.google_tag_manager),this.activateIfConsent("ga",!!window.CookieFirst.acceptedServices.google_analytics),this.activateIfConsent("gads",!!window.CookieFirst.acceptedServices.google_ads),this.activateIfConsent("meta",!!window.CookieFirst.acceptedServices.facebook),this.activateIfConsent("mads",!!window.CookieFirst.acceptedServices.bing_ads),this.activateIfConsent("pinterest",!!window.CookieFirst.acceptedServices.pinterest),this.activateIfConsent("tiktok",!!window.CookieFirst.acceptedServices.tiktok),this.updateConsent(),this.triggerCoreScript()):console.debug("window.CookieFirst null")}triggerCMPConsent(){if("consent"===window.cmpCurrentStatus){let e=window.cmpConsentVendors.split(","),t=0;for(let i in window.cmpmngr.vendors){if(e.includes(window.cmpmngr.vendors[t].id))switch(window.cmpmngr.vendors[t].systemid){case"s26":this.activateIfConsent("ga",!0);break;case"s1":this.activateIfConsent("gads",!0);break;case"s905":this.activateIfConsent("gtag",!0);break;case"s7":this.activateIfConsent("meta",!0);break;case"s11":case"s2644":this.activateIfConsent("mads",!0);break;case"s49":this.activateIfConsent("pinterest",!0);break;case"s3009":this.activateIfConsent("tiktok",!0)}t++}this.updateConsent(),this.triggerCoreScript()}}triggerDidomiConsent(){if(!window.didomiState||"string"!=typeof window.didomiState.didomiVendorsConsent||""===window.didomiState.didomiVendorsConsent.trim())return;let e=new Set(window.didomiState.didomiVendorsConsent.split(",").map(e=>
9e.trim()).filter(Boolean));[{key:"gtag",vendorIds:["c:googletag-eQxZQ9ra","c:googletag-DBzKHMky"]},{key:"ga",vendorIds:["c:googleana-YRikLRaT","c:googleana-4TXnJigR"]},{key:"gads",vendorIds:["google","c:googlead-bCCgL7pD","c:googleads-eT3rZxEY"]},{key:"meta",vendorIds:["facebook","c:facebookc-KTWfawWc","c:facebookc-DQ7BXqQe","c:metaads-xKecBpgc"]},{key:"mads",vendorIds:["1126","microsoft-6zPzfpLt","c:microsoft-tZVFUA2Y","c:microsoft-analytics","c:microsoft"]},{key:"pinterest",vendorIds:["c:pinterest-aEhfiXtj","c:pinterest"]},{key:"tiktok",vendorIds:["986","tiktokad-9TKVDC6d","c:tiktokan-R4hk2Pmz"]}].forEach(t=>{let{key:i,vendorIds:n}=t;n.some(t=>e.has(t))&&this.activateIfConsent(i,!0)}),this.updateConsent(),this.triggerCoreScript()}triggerUCConsentV2(){if(!window.UC_UI)return;let e=window.UC_UI.getServicesBaseInfo();Array.isArray(e)&&[{key:"gtag",name:"Google Tag Manager"},{key:"ga",name:"Google Analytics 4"},{key:"ga",name:"Google Analytics"},{key:"gads",name:"Google Ads"},{key:"gads",name:"Google Ads Conversion Tracking"},{key:"gads",name:"Google Ads Remarketing"},{key:"meta",name:"Meta Pixel"},{key:"meta",name:"Facebook Pixel"},{key:"mads",name:"Microsoft Advertising"},{key:"mads",name:"Microsoft Conversion Tracking"},{key:"pinterest",name:"Pinterest Ads"}
9,{key:"tiktok",name:"TikTok"}].forEach(t=>{let{name:i,key:n}=t,a=e.find(e=>e.name===i);a&&this.activateIfConsent(n,a.consent.status)}),this.updateConsent(),this.triggerCoreScript()}triggerUCConsentV3(){let e=[{key:"gtag",name:"Google Tag Manager"},{key:"ga",name:"Google Analytics 4"},{key:"ga",name:"Google Analytics"},{key:"gads",name:"Google Ads"},{key:"gads",name:"Google Ads Conversion Tracking"},{key:"gads",name:"Google Ads Remarketing"},{key:"meta",name:"Meta Pixel"},{key:"meta",name:"Facebook Pixel"},{key:"mads",name:"Microsoft Advertising"},{key:"mads",name:"Microsoft Conversion Tracking"},{key:"pinterest",name:"Pinterest Ads"},{key:"tiktok",name:"TikTok"}];if(localStorage.getItem("ucData")){let t=JSON.parse(localStorage.getItem("ucData"));if(t){let i=t.consent.services;e.forEach(e=>{let{name:t,key:n}=e,a=Object.values(i).filter(e=>e.name===t);void 0!==a&&0!==a.length&&this.activateIfConsent(n,a[0].consent)})}}else void 0!==window.__ucCmp&&void 0!==window.__ucCmp.getServices()&&__ucCmp.getServices()&&e.forEach(e=>{let{name:t,key:i}=e,n=__ucCmp.getServices().filter(e=>e.id===t&!0===e.consent.status);n&&this.activateIfConsent(i,n.consent.status)});this.updateConsent(),this.triggerCoreScript()}triggerCoreScript(){let{acceptedGtag:e,customTagManager:t,ga4customScript:i,ga4AdvancedConsentMode:n,acceptedGa:a,acceptedGads:o,acceptedMeta:r,acceptedMads:s,acceptedPinterest:c,acceptedTiktok:d}=window;!this.tagManagerEnabled&&e&&(t&&i?(this.enableCustomTagManager(),window.customTagManagerEnabled=!0):this.enableTagManager(),this.tagManagerEnabled=!0),!this.gaEventsTriggered&&(n||a)&&(this.triggerGaEvents(),this.gaEventsTriggered=!0),!this.gadsEventsTriggered&&(n||o)&&(this.triggerGadsEvents(),this.gadsEventsTriggered=!0);let l=[n,a,o,r,s,c,d].some(e=>e);!this.pageViewEventTriggered&&l&&(this.triggerPageViewEvent(),this.pageViewEventTriggered=!0),!this.trackingEnabled&&l&&(this.enableTracking(),this.trackingEnabled=!0)}activateIfConsent(e,t){switch(!0){case"gtag"===e:window.acceptedGtag=!!(t&&window.googleTagEnabled);break;case"ga"===e:window.acceptedGa=!!(t&&window.googleAnalyticsEnabled);break;case"gads"===e:window.acceptedGads=!!(t&&window.googleAdsEnabled);break;case"meta"===e:window.acceptedMeta=!!(t&&window.metaAdsEnabled);break;case"mads"===e:window.acceptedMads=!!(t&&window.microsoftAdsEnabled);break;case"pinterest"===e:window.acceptedPinterest=!!(t&&window.pinterestAdsEnabled);break;case"tiktok"===e:window.acceptedTiktok=!!(t&&window.tiktokAdsEnabled)}}enableTracking(){this.controllerName=window.ga4controllerName,this.controllerAction=window.ga4controllerAction,this.actions=[],this.registerJSActions(),this.registerControllerActions(this.controllerName,this.controllerAction),this.triggerActions()}gtag(){dataLayer.push(arguments)}initializeConsent(){window.dataLayer=window.dataLayer||[],window.dataLayer.cleanPush=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];let n=[];t.forEach(e=>{let t=j.replaceEmptyStringsWithUndefined(e);n.push(t)});let{ga4controllerName:a,ga4controllerAction:o,ga4UserLoggedIn:r,ga4Guest:s,ga4UserId:c,ga4CustomerType:d,ga4CustomerLifetimeValue:l,ga4CustomerOrderCount:u,ga4salesChannelId:m,ga4salesChannelName:g,ga4HidePricesForGuests:_}=window,p="Logged Out";s?p="Guest":r&&(p="Logged In"),n[0].existing_customer=c?"yes":"no",n[0].user_id=c,n[0].account_type=d,n[0].user_login_state=p;let h=0;("customcheckout"===a&&"finishpage"===o||"checkout"===a&&"finishpage"===o)&&(h=1);let v=u&&u<=h;n[0].new_customer=!!v||!l,n[0].customer_type=!v&&l?"returning":"new",!v&&l&&(n[0].customer_lifetime_value=Math.round(100*parseFloat(l))/100),n[0].saleschannelid=m,n[0].saleschannelname=g;let y=e=>"number"==typeof e&&isFinite(e)?Math.round(100*e)/100:e,f=e=>{if(!e||"object"!=typeof e)return e;let t={...e};return"price"in t&&(t.price=y(t.price)),"item_price"in t&&(t.item_price=y(t.item_price)),"product_price"in t&&(t.product_price=y(t.product_price)),t},w=e=>{if(!e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(w);let t={...e};if("ecommerce"in t&&t.ecommerce){let e={...t.ecommerce};"value"in e&&(e.value=y(e.value)),"tax"in e&&(e.tax=y(e.tax)),"shipping"in e&&(e.shipping=y(e.shipping)),"items"in e&&Array.isArray(e.items)&&(e.items=e.items.map(f)),t.ecommerce=e}if("value"in t&&(t.value=y(t.value)),"items"in t&&Array.isArray(t.items)&&(t.items=t.items.map(f)),"meta_object"in t&&t.meta_object){let e={...t.meta_object};if("meta_object_data"in e&&e.meta_object_data){let t={...e.meta_object_data};"value"in t&&(t.value=y(t.value)),"contents"in t&&Array.isArray(t.contents)&&(t.contents=t.contents.map(f)),e.meta_object_data=t}t.meta_object=e}if("microsoft_ads_object"in t&&t.microsoft_ads_object){let e={...t.microsoft_ads_object};"ecomm_totalvalue"in e&&(e.ecomm_totalvalue=y(e.ecomm_totalvalue)),"revenue_value"in e&&(e.revenue_value=y(e.revenue_value)),"items"in e&&Array.isArray(e.items)&&(e.items=e.items.map(f)),t.microsoft_ads_object=e}if("tiktok_object"in t&&t.tiktok_object){let e={...t.tiktok_object};"value"in e&&(e.value=y(e.value)),"contents"in e&&Array.isArray(e.contents)&&(e.contents=e.contents.map(f)),t.tiktok_object=e}if("pinterest_object"in t&&t.pinterest_object){let e={...t.pinterest_object};"value"in e&&(e.value=y(e.value)),"line_items"in e&&Array.isArray(e.line_items)&&(e.line_items=e.line_items.map(f)),t.pinterest_object=e}if("pinterest_object_serverside"in t&&t.pinterest_object_serverside){let e={...t.pinterest_object_serverside};"value"in e&&(e.value=y(e.value)),"contents"in e&&Array.isArray(e.contents)&&(e.contents=e.contents.map(f)),t.pinterest_object_serverside=e}return t};if(n=n.map(w),_&&!r){let e=e=>{if(!e||"object"!=typeof e)return e;let t={...e};return"price"in t&&(t.price=void 0),"item_price"in t&&(t.item_price=void 0),"product_price"in t&&(t.product_price=void 0),t},t=i=>{if(!i||"object"!=typeof i)return i;if(Array.isArray(i))return i.map(t);let n={...i};if("ecommerce"in n&&n.ecommerce){let t={...n.ecommerce};"value"in t&&(t.value=void 0),"items"in t&&Array.isArray(t.items)&&(t.items=t.items.map(e)),n.ecommerce=t}if("value"in n&&(n.value=void 0),"items"in n&&Array.isArray(n.items)&&(n.items=n.items.map(e)),"meta_object"in n&&n.meta_object){let t={...n.meta_object};if("meta_object_data"in t&&t.meta_object_data){let i={...t.meta_object_data};
9"value"in i&&(i.value=void 0),"contents"in i&&Array.isArray(i.contents)&&(i.contents=i.contents.map(e)),t.meta_object_data=i}n.meta_object=t}if("microsoft_ads_object"in n&&n.microsoft_ads_object){let t={...n.microsoft_ads_object};"ecomm_totalvalue"in t&&(t.ecomm_totalvalue=void 0),"revenue_value"in t&&(t.revenue_value=void 0),"items"in t&&Array.isArray(t.items)&&(t.items=t.items.map(e)),n.microsoft_ads_object=t}if("tiktok_object"in n&&n.tiktok_object){let t={...n.tiktok_object};"value"in t&&(t.value=void 0),"contents"in t&&Array.isArray(t.contents)&&(t.contents=t.contents.map(e)),n.tiktok_object=t}if("pinterest_object"in n&&n.pinterest_object){let t={...n.pinterest_object};"value"in t&&(t.value=void 0),"line_items"in t&&Array.isArray(t.line_items)&&(t.line_items=t.line_items.map(e)),n.pinterest_object=t}if("pinterest_object_serverside"in n&&n.pinterest_object_serverside){let t={...n.pinterest_object_serverside};"value"in t&&(t.value=void 0),"contents"in t&&Array.isArray(t.contents)&&(t.contents=t.contents.map(e)),n.pinterest_object_serverside=t}return n};n=n.map(t)}window.dataLayer.push(...n)},this.ga4ActiveConsentMode?this.gtag("consent","default",{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied",functionality_storage:"denied",personalization_storage:"denied",security_storage:"denied"}):("cookieFirst"===this.cookieConfig||"cookieBot"===this.cookieConfig||"userCentrics"===this.cookieConfig)&&this.gtag("consent","default",{ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied"})}updateConsent(){if(!this.ga4ActiveConsentMode)return;let e={},{ga4Enabled:t,acceptedGa:i,googleAdsEnabled:n,acceptedGads:a,acceptedMads:o,ga4AdvancedConsentMode:r}=window;e.functionality_storage="granted",e.personalization_storage="granted",e.security_storage="granted",t&&i?(e.analytics_storage="granted",e.ad_storage="granted",e.ad_personalization="granted",e.ad_user_data="granted"):n&&a&&(e.ad_storage="granted",e.ad_personalization="granted",e.ad_user_data="granted"),Object.keys(e).length>0&&this.gtag("consent","update",e),o&&(window.uetq=window.uetq||[],window.uetq.push("consent","default",{ad_storage:"granted"}),window.uetq.cleanPush=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];let n=[];t.forEach(e=>{let t=j.replaceEmptyStringsWithUndefined(e);n.push(t)}),window.uetq.push(...n)}),r&&j.consentUpdated()}enableCustomTagManager(){if(window.__customTMLoaded)return;let e=()=>{if(!window.__customTMLoaded){window.__customTMLoaded=!0,window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":Date.now(),event:"gtm.js"});try{let e=(window.ga4customScript||"").replace(/<!--.*?-->/g,"");return Function(e)()}catch(e){console.error("Custom Tag Manager execution failed:",e)}}},t=()=>{e(),["scroll","mousemove","keydown","touchstart","pointerdown"].forEach(e=>window.removeEventListener(e,t,{passive:!0}))};["scroll","mousemove","keydown","touchstart","pointerdown"].forEach(e=>window.addEventListener(e,t,{once:!0,passive:!0})),"requestIdleCallback"in window?requestIdleCallback(e,{timeout:5e3}):setTimeout(e,3e3)}enableTagManager(){if(window.__gtmLoaded){console.log("[GA4] GTM already loaded, skipping");return}let e=()=>{var e,t,i,n,a;window.__gtmLoaded||(window.__gtmLoaded=!0,window.dataLayer=window.dataLayer||[],window.dataLayer.push({"gtm.start":Date.now(),event:"gtm.js"}),window,e=document,t="script",i=(window.ga4TagId||"").trim(),n=e.getElementsByTagName(t)[0],(a=e.createElement(t)).async=!0,a.src="https://www.googletagmanager.com/gtm.js?id="+encodeURIComponent(i)+(window.ga4CustomUrl||""),n.parentNode.insertBefore(a,n))},t=()=>{e(),["scroll","mousemove","keydown","touchstart","pointerdown"].forEach(e=>window.removeEventListener(e,t,{passive:!0}))};["scroll","mousemove","keydown","touchstart","pointerdown"].forEach(e=>window.addEventListener(e,t,{once:!0,passive:!0})),"requestIdleCallback"in window?requestIdleCallback(e,{timeout:5e3}):setTimeout(e,3e3)}triggerGaEvents(){let{ga4AdvancedConsentMode:e,acceptedGa:t,googleAnalyticsEnabled:i,ga4UserLoggedIn:n,ga4SignUp:a}=window;(e||t)&&i&&(window.dataLayer.cleanPush({event:"ga4_page_view"}),a&&(!localStorage.getItem("signUpSent")||"yes"!==localStorage.getItem("signUpSent"))?(j.signUp(),localStorage.setItem("signUpSent","yes")):localStorage.getItem("signUpSent")||localStorage.setItem("signUpSent","no"),n&&(!localStorage.getItem("loginSent")||"yes"!==localStorage.getItem("loginSent"))?(j.login(),localStorage.setItem("loginSent","yes")):localStorage.getItem("loginSent")||localStorage.setItem("loginSent","no"))}triggerGadsEvents(){let{googleAdsEnabled:e,ga4AdvancedConsentMode:t,acceptedGads:i}=window;(t||i)&&e&&window.dataLayer.cleanPush({event:"gads_page_view"})}cookieSubscriber(e){let t=e.detail;Object.keys(t).length>0?(Object.prototype.hasOwnProperty.call(t,this.cookieDisGoogleTag)&&window.googleTagEnabled&&t[this.cookieDisGoogleTag]&&(window.acceptedGtag=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisGoogleAnalytics)&&window.googleAnalyticsEnabled&&t[this.cookieDisGoogleAnalytics]&&(window.acceptedGa=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisGoogleAds)&&window.googleAdsEnabled&&t[this.cookieDisGoogleAds]&&(window.acceptedGads=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisMeta)&&window.metaAdsEnabled&&t[this.cookieDisMeta]&&(window.acceptedMeta=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisMads)&&window.microsoftAdsEnabled&&t[this.cookieDisMads]&&(window.acceptedMads=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisPinterest)&&window.pinterestAdsEnabled&&t[this.cookieDisPinterest]&&(window.acceptedPinterest=!0),Object.prototype.hasOwnProperty.call(t,this.cookieDisTikTok)&&window.tiktokAdsEnabled&&t[this.cookieDisTikTok]&&(window.acceptedTiktok=!0)):(this.activateIfConsent("gtag",c.getItem(this.cookieDisGoogleTag)),this.activateIfConsent("ga",c.getItem(this.cookieDisGoogleAnalytics)),this.activateIfConsent("gads",c.getItem(this.cookieDisGoogleAds)),this.activateIfConsent("meta",c.getItem(this.cookieDisMeta)),this.activateIfConsent("mads",c.getItem(this.cookieDisMads)),this.activateIfConsent("pinterest",c.getItem(this.cookieDisPinterest)),this.activateIfConsent("tiktok",c.getItem(this.cookieDisTikTok))),this.updateConsent(),this.triggerCoreScript()}
9triggerActions(){this.actions.forEach(e=>{e.trigger()})}registerJSActions(){let{ga4AdvancedConsentMode:e,acceptedGa:t,acceptedGads:i,acceptedMeta:n,acceptedMads:a,acceptedPinterest:o,acceptedTiktok:r}=window;if(this.registerActions(D),this.registerActions(F),this.registerActions(V),[e,t,i,n,a,o,r].some(e=>e)){this.registerActions(q),this.registerActions(G);let e=this.actions.find(e=>e instanceof F),t=this.actions.find(e=>e instanceof G);e&&t&&t.setAddToCartAction(e)}}registerControllerActions(e,t){switch(!0){case"account"===e&&"logout"===t:localStorage.setItem("loginSent","no"),localStorage.setItem("signUpSent","no"),console.info("logout");break;case"checkout"===e&&"cartpage"===t:this.registerActions(T);break;case"customcheckout"===e&&"finishpage"===t:case"checkout"===e&&"finishpage"===t:this.registerActions(M);break;case"checkout"===e&&"confirmpage"===t:this.registerActions(H);break;case"product"===e&&"index"===t:this.registerActions(O),this.registerActions($);break;case"wishlist"===e&&"index"===t:case"navigation"===e&&"index"===t:case"navigation"===e&&"home"===t:this.registerActions(N),this.registerActions(U);break;case"navigation"===e&&"index"!==t:this.registerActions(U);break;case"search"===e&&"search"===t:this.registerActions(B)}}registerActions(e){this.actions.push(new e)}triggerPageViewEvent(){let e;let{ga4controllerName:t,ga4controllerAction:i,ga4AdvancedConsentMode:n,acceptedGa:a,acceptedGads:o,acceptedMeta:r,acceptedMads:s,acceptedPinterest:c,acceptedTiktok:d,customTagManagerEnabled:l,ga4Currency:u,ga4activeNavigationId:m,ga4activeNavigationName:g,requestLocale:_}=window,p="other_page";switch(window.ecomm_pagetype="other",!0){case"error"===t&&"error"===i:p="error_page";break;case"accountprofile"===t&&"index"===i:case"accountprofile"===t&&"profileoverview"===i:case"orderoverview"===t&&"accountorder"===i:case"address"===t&&"accountaddressoverview"===i:case"accountpayment"===t&&"paymentoverview"===i:p="account_page";break;case"checkout"===t&&"cartpage"===i:p="checkout_cart_page",window.ecomm_pagetype="cart";break;case"customcheckout"===t&&"finishpage"===i:case"checkout"===t&&"finishpage"===i:p="checkout_finish_page",window.ecomm_pagetype="purchase";break;case"checkout"===t&&"confirmpage"===i:p="checkout_confirm_page",window.ecomm_pagetype="cart";break;case"product"===t&&"index"===i:p="product_page",window.ecomm_pagetype="product";break;case"wishlist"===t&&"index"===i:p="wishlist_page";break;case"navigation"===t&&"index"===i:p="category_page",window.ecomm_pagetype="category";break;case"navigation"===t&&"home"===i:p="homepage",window.ecomm_pagetype="home";break;case"search"===t&&"search"===i:p="search_page",window.ecomm_pagetype="searchresults";break;case"auth"===t&&"loginpage"===i:p="login_page";break;case"register"===t&&"checkoutregisterpage"===i:p="checkout_register_page",window.ecomm_pagetype="cart"}let h=sessionStorage.getItem("landingPageInit");h&&"true"===h?e=!1:(e=!0,sessionStorage.setItem("landingPageInit","true"));let v=_.split("-"),y=v[0],f=v[1];(n||o||a||r||s||c||d)&&window.dataLayer.cleanPush({event:"pageview",ga4_event:"pageview",ga4_accept:a,google_ads_accept:o,meta_accept:r,pinterest_accept:c,microsoft_accept:s,tiktok_accept:d,page_type:p,meta_object:r?{meta_event:"PageView"}:void 0,microsoft_ads_object:s?{event:"page_view",page_title:window.document.title,page_location:window.location.href,ecomm_pagetype:window.ecomm_pagetype,ecomm_category:"category"===window.ecomm_pagetype?window.ga4activeNavigationName:void 0}:void 0,pinterest_object:c?{pinterest_event:"pagevisit"}:void 0,pinterest_object_serverside:c&&l?{pinterest_event:"page_visit"}:void 0,landing_page_init:e,currency:u,language:y,country:f,category_id:"navigation"===t&&"index"===i?m:void 0,category:"navigation"===t&&"index"===i?g:void 0})}})})();
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.