1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[40091],{1369:(e,t,r)=>{r.d(t,{A:()=>o});var i=r(1452);class n{constructor(){this._storage={}}setItem(e,t){return this._storage[e]=t}getItem(e){return Object.prototype.hasOwnProperty.call(this._storage,e)?this._storage[e]:null}removeItem(e){return delete this._storage[e]}key(e){return Object.values(this._storage)[e]||null}clear(){return this._storage={}}}class s{constructor(){this._storage=null,this._chooseStorage(),this._validateStorage()}_chooseStorage(){return s._isSupported("localStorage")?this._storage=window.localStorage:s._isSupported("sessionStorage")?this._storage=window.sessionStorage:i.A.isSupported()?this._storage=i.A:this._storage=new n}static _isSupported(e){try{let t="__storage_test";return window[e].setItem(t,"1"),window[e].removeItem(t),!0}catch(e){return!1}}_validateStorage(){if("function"!=typeof this._storage.setItem)throw Error('The storage must have a "setItem" function');if("function"!=typeof this._storage.getItem)throw Error('The storage must have a "getItem" function');if("function"!=typeof this._storage.removeItem)throw Error('The storage must have a "removeItem" function');if("function"!=typeof this._storage.key)throw Error('The storage must have a "key" function');if("function"!=typeof this._storage.clear)throw Error('The storage must have a "clear" function')}getStorage(){return this._storage}}let o=Object.freeze(new s).getStorage()},91:(e,t,r)=>{r.r(t),r.d(t,{default:()=>E});var i=r(4335),n=r(746);class s{supports(e,t){return console.warn("[Google Analytics Plugin] Method 'supports' was not overridden by `"+this.constructor.name+"`. Default return set to false."),!1}execute(){console.warn("[Google Analytics Plugin] Method 'execute' was not overridden by `"+this.constructor.name+"`.")}disable(){this.active=!1}constructor(){this.active=!0}}class o extends s{execute(){let e=this.getEvents();window.PluginManager.getPluginInstances(this.getPluginName()).forEach(t=>{Object.keys(e).forEach(r=>{t.$emitter.subscribe(r,e[r])})})}getEvents(){console.warn("[Google Analytics Plugin] Method 'getEvents' was not overridden by `"+this.constructor.name+"`.")}getPluginName(){console.warn("[Google Analytics Plugin] Method 'getPluginName' was not overridden by `"+this.constructor.name+"`.")}}class a extends o{supports(){return!0}getPluginName(){return"AddToCart"}getEvents(){return{beforeFormSubmit:this._beforeFormSubmit.bind(this)}}_beforeFormSubmit(e){if(!this.active)return;let t=e.detail,r=null;if(t.forEach((e,t)=>{t.endsWith("[id]")&&(r=e)}),!r){console.warn("[Google Analytics Plugin] Product ID could not be fetched. Skipping.");return}gtag("event","add_to_cart",{items:[{id:r,name:t.get("product-name"),quantity:t.get("lineItems["+r+"][quantity]")}]})}}class c extends s{supports(e,t){return"checkout"===e&&"cartpage"===t}execute(){let e=document.querySelector(".cart-add-product");e&&e.addEventListener("submit",this._formSubmit.bind(this))}_formSubmit(e){this.active&>ag("event","add_to_cart",{items:[{id:e.currentTarget.querySelector(".form-control").value,quantity:1}]})}}class u{static getLineItems(){let e=document.querySelector(".hidden-line-items-information"),t=e.querySelectorAll(".hidden-line-item"),r=[];return t.forEach(t=>{r.push({id:t.getAttribute("data-id"),name:t.getAttribute("data-name"),quantity:t.getAttribute("data-quantity"),price:t.getAttribute("data-price"),currency:e.getAttribute("data-currency")})}),r}static getAdditionalProperties(){let e=document.querySelector(".hidden-line-items-information");return{currency:e.getAttribute("data-currency"),shipping:e.getAttribute("data-shipping"),value:e.getAttribute("data-value"),tax:e.getAttribute("data-tax")}}}class g extends o{supports(){return!!document.querySelector(".begin-checkout-btn")}getEvents(){return{offCanvasOpened:this._offCanvasOpened.bind(this)}}getPluginName(){return"OffCanvasCart"}_offCanvasOpened(){document.querySelector(".begin-checkout-btn").addEventListener("click",this._onBeginCheckout.bind(this))}_onBeginCheckout(){this.active&>ag("event","begin_checkout",{items:u.getLineItems()})}}class l extends s{supports(e,t){return"checkout"===e&&"cartpage"===t}execute(){let e=document.querySelector(".begin-checkout-btn");e&&e.addEventListener("click",this._onBeginCheckout.bind(this))}_onBeginCheckout(){this.active&>ag("event","begin_checkout",{items:u.getLineItems()})}}class d extends s{supports(e,t){return"checkout"===e&&"confirmpage"===t}execute(){this.active&>ag("event","checkout_progress",{items:u.getLineItems()})}}class h extends o{supports(e,t){return"auth"===e&&"loginpage"===t||"register"===e&&"checkoutregisterpage"===t}getPluginName(){return"FormValidation"}getEvents(){return{beforeSubmit:this._onFormSubmit.bind(this)}}_onFormSubmit(e){this.active&&e.target.classList.contains("login-form")&&e.detail.validity&>ag("event","login",{method:"mail"})}}class m extends s{supports(e,t){return"checkout"===e&&"finishpage"===t&&window.trackOrders}execute(){if(!this.active)return;let e=document.querySelector(".finish-ordernumber");if(!e){console.warn("Cannot get order number element - Skip order tracking");return}let t=e.getAttribute("data-order-number");if(!t){console.warn("Cannot determine order number - Skip order tracking");return}gtag("event","purchase",{transaction_id:t,items:u.getLineItems(),...u.getAdditionalProperties()})}}class p extends s{supports(){return!0}execute(){document.addEventListener("click",this._onRemoveFromCart.bind(this))}_onRemoveFromCart(e){if(!this.active)return;let t=e.target.closest(".line-item-remove-button");t&>ag("event","remove_from_cart",{items:[{id:t.getAttribute("data-product-id")}]})}}class v extends o{supports(){return!0}getPluginName(){return"SearchWidget"}getEvents(){return{handleInputEvent:this._onSearch.bind(this)}}_onSearch(e){this.active&>ag("event","search",{search_term:e.detail.value})}}class b extends o{supports(e,t){return"auth"===e&&"loginpage"===t||"register"===e&&"checkoutregisterpage"===t}getPluginName(){return"FormValidation"}getEvents(){return{beforeSubmit:this._onFormSubmit.bind(this)}}_onFormSubmit(e){this.active&&e.target.classList.contains("register-form")&&e.detail.validity&>ag("event","sign_up",{method:"mail"})}}var f=r(1369);class _ extends s{supports(e,t){return"product"===e&&"index"===t}execute(){if(!this.active)return;let e=document.querySelector('[itemtype="https://schema.org/Product"]');if(!e){console.warn('[Google Analytics Plugin] Product itemtype ([itemtype="https://schema.org/Product"]) could not be found in document.');return}let t=e.querySelector('meta[itemprop="productID"]'),r=e.querySelector('[itemprop="name"]');
1if(!t||!r){console.warn('[Google Analytics Plugin] Product ID (meta[itemprop="productID"]) or product name ([itemprop="name"]) could not be found within product scope.');return}let i=t.content,n=r.textContent.trim();if(!i||!n){console.warn("[Google Analytics Plugin] Product ID or product name is empty, do not track page view.");return}gtag("event","view_item",{items:[{id:i,name:n}]})}}class y extends s{supports(){return!!document.querySelector(".cms-element-product-listing-wrapper")}execute(){this.active&>ag("event","view_item_list",{items:this.getListItems()})}getListItems(){let e=document.querySelectorAll(".product-box"),t=[];if(e)return e.forEach(e=>{e.dataset.productInformation&&t.push(JSON.parse(e.dataset.productInformation))}),t}}class w extends s{supports(e,t){return"search"===e&&"search"===t}execute(){this.active&>ag("event","view_search_results",{search_term:document.querySelector(".header-search-input").value})}}var k=r(1452);class E extends i.A{init(){this.cookieEnabledName="google-analytics-enabled",this.cookieAdsEnabledName="google-ads-enabled",this.storage=f.A,this.handleTrackingLocation(),this.handleCookieChangeEvent(),(!window.useDefaultCookieConsent||k.A.getItem(this.cookieEnabledName))&&this.startGoogleAnalytics()}startGoogleAnalytics(){let e=document.createElement("script");e.src=window.gtagURL,document.head.append(e),gtag("js",new Date),gtag("config",window.gtagTrackingId,window.gtagConfig),this.controllerName=window.controllerName,this.actionName=window.actionName,this.events=[],this.registerDefaultEvents(),this.handleEvents()}handleTrackingLocation(){this.trackingUrl=new URL(window.location.href);let e=this.trackingUrl.searchParams.get("gclid");e?this.storage.setItem(this._getGclidStorageKey(),e):this.storage.getItem(this._getGclidStorageKey())&&this.trackingUrl.searchParams.set("gclid",this.storage.getItem(this._getGclidStorageKey())),this.trackingUrl.searchParams.get("gclid")&&(window.gtagConfig.page_location=this.trackingUrl.toString())}handleEvents(){this.events.forEach(e=>{e.supports(this.controllerName,this.actionName)&&e.execute()})}registerDefaultEvents(){this.registerEvent(a),this.registerEvent(c),this.registerEvent(g),this.registerEvent(l),this.registerEvent(d),this.registerEvent(h),this.registerEvent(m),this.registerEvent(p),this.registerEvent(v),this.registerEvent(b),this.registerEvent(_),this.registerEvent(y),this.registerEvent(w)}registerEvent(e){this.events.push(new e)}handleCookieChangeEvent(){document.$emitter.subscribe(n.COOKIE_CONFIGURATION_UPDATE,this.handleCookies.bind(this))}handleCookies(e){let t=e.detail;if(this._updateConsent(t),Object.prototype.hasOwnProperty.call(t,this.cookieEnabledName)){if(t[this.cookieEnabledName]){this.startGoogleAnalytics();return}this.removeCookies(),this.disableEvents()}}removeCookies(){let e=document.cookie.split(";"),t=/^(_swag_ga|_gat_gtag)/;e.forEach(e=>{let r=e.split("=")[0].trim();r.match(t)&&k.A.removeItem(r)})}disableEvents(){this.events.forEach(e=>{e.disable()})}_updateConsent(e){if(0===Object.keys(e).length)return;let t={};Object.prototype.hasOwnProperty.call(e,this.cookieEnabledName)&&(t.analytics_storage=e[this.cookieEnabledName]?"granted":"denied"),Object.prototype.hasOwnProperty.call(e,this.cookieAdsEnabledName)&&(t.ad_storage=e[this.cookieAdsEnabledName]?"granted":"denied",t.ad_user_data=e[this.cookieAdsEnabledName]?"granted":"denied",t.ad_personalization=e[this.cookieAdsEnabledName]?"granted":"denied"),0!==Object.keys(t).length&>ag("consent","update",t)}_getGclidStorageKey(){return"google-analytics-"+(window.salesChannelId||"")+"-gclid"}}}}]);
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.