PageSourceSearch

https://www.teegschwendner.de/theme/f9d914ed92de006a841861dd773785…/dtgs-google-tag-manager-sw6.js?1790939832

js teegschwendner.de collected 2026-10-03 19:36:59 UTC 43,358 bytes, 10 lines download raw bytes

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)?a(Array.isArray(e)?[]:{},e,t):e}function s(e,t,i){return e.concat(t).map(function(e){return n(e,i)})}function r(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||s,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=n;var c,u,d=Array.isArray(i);return d!==Array.isArray(e)?n(i,l):d?l.arrayMerge(e,i,l):(u={},(c=l).isMergeableObject(e)&&r(e).forEach(function(t){u[t]=n(e[t],c)}),r(i).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&c.isMergeableObject(i[t])?u[t]=(function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a})(t,c)(e[t],i[t],c):u[t]=n(i[t],c))}),u)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})},e.exports=a}},t={};function i(n){var s=t[n];if(void 0!==s)return s.exports;var r=t[n]={exports:{}};return e[n](r,r.exports,i),r.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),s=i.n(n);class r{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=r.toUpperCamelCase(e,t);return r.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>r.ucFirst(e.toLowerCase())).join(""):r.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}class o{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,s=e.split("."),r=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=r;r=function(i){n.unsubscribe(e),t(i)}}return this.el.addEventListener(s[0],r),this.listeners.push({splitEventName:s,opts:i,cb:r}),!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 a{constructor(e,t={},i=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=e,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(i),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}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()),s().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=r.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=r.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 l{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 s="";"https:"===location.protocol&&(s="secure"),document.cookie=`${e}=${t};expires=${n.toUTCString()};path=/;sameSite=lax;${s}`}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 c="js-offcanvas-singleton";class u{constructor(){this.$emitter=new o}open(e,t,i,n,s,r,o){this._removeExistingOffCanvas();let a=this._createOffCanvas(i,r,o,n);this.setContent(e,s),this._openOffcanvas(a,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(`.${c}`)}close(e){let t=this.getOffCanvas();
1t.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"),u.bsOffcanvas.show(),window.history.pushState("offcanvas-open",""),"function"==typeof t&&t()}_registerEvents(e){let t=this.getOffCanvas();t.forEach(i=>{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(){this.getOffCanvas().forEach(e=>{let t=bootstrap.Offcanvas.getInstance(e);t&&"function"==typeof t.dispose&&t.dispose(),e.remove()}),u.bsOffcanvas=null}_getPositionClass(e){return"left"===e?"offcanvas-start":"right"===e?"offcanvas-end":`offcanvas-${e}`}_createOffCanvas(e,t,i,n){let s=document.createElement("div");if(s.classList.add("offcanvas",c),s.classList.add(this._getPositionClass(e)),s.setAttribute("tabindex","-1"),!0===t&&s.classList.add("is-fullwidth"),i){let e=typeof i;if("string"===e)s.classList.add(i);else if(Array.isArray(i))i.forEach(e=>{s.classList.add(e)});else throw Error(`The type "${e}" is not supported. Please pass an array or a string.`)}return document.body.appendChild(s),u.bsOffcanvas=new bootstrap.Offcanvas(s,{backdrop:!1!==n||"static"}),s}}let d=Object.freeze(new u);class h{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],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:350,r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"";d.open(e,t,i,n,s,r,o)}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;d.setContent(e,t,i)}static setAdditionalClassName(e){d.setAdditionalClassName(e)}static close(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:350;d.close(e)}static exists(){return d.exists()}static getOffCanvas(){return d.getOffCanvas()}static REMOVE_OFF_CANVAS_DELAY(){return 350}}let g="loader",f={BEFORE:"before",INNER:"inner"};class m{constructor(e,t=f.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===f.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=m.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),m.getTemplate())}}remove(){if(this.position===f.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${g}`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${g}`).length>0}_getPosition(){return this.position===f.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 p extends h{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",s=!(arguments.length>4)||void 0===arguments[4]||arguments[4],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:h.REMOVE_OFF_CANVAS_DELAY(),o=arguments.length>6&&void 0!==arguments[6]&&arguments[6],a=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"";if(!e)throw Error("A url must be given!");d._removeExistingOffCanvas();let l=d._createOffCanvas(n,o,a,s);this.setContent(e,t,i,s,r),d._openOffcanvas(l)}static setContent(e,t,i,n,s){super.setContent(`<div class="offcanvas-body">${m.getTemplate()}</div>`,s);let r=e=>{super.setContent(e,s),"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=>p.executeCallback(r,e)):fetch(e,{headers:{"X-Requested-With":"XMLHttpRequest"}}).then(e=>e.text()).then(e=>p.executeCallback(r,e))}static executeCallback(e,t){"function"==typeof e&&e(t);let i=h.getOffCanvas();i.length>0&&window.PluginManager.initializePluginsInParentElement(i[0])}}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 s=this._createPreparedRequest("POST",e,n);return this._sendRequest(s,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 s=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(s,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 s=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(s,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 b="CookieConfiguration_Update",_="CookieConfiguration_CloseOffCanvas";class C extends a{static #e=this.lastTriggerElement=null;static #t=this.options={defaultCookieExpiration:30,offCanvasPosition:"left",submitEvent:"click",cookiePreference:"cookie-preference",cookieConfigHash:"cookie-config-hash",cookieSelector:"[data-cookie]",buttonOpenSelector:".js-cookie-configuration-button button",buttonSubmitSelector:".js-offcanvas-cookie-submit",buttonPermissionSelector:".js-cookie-permission-button",buttonAcceptAllSelector:".js-offcanvas-cookie-accept-all",globalButtonAcceptAllSelector:".js-cookie-accept-all-button",globalButtonPermissionSelector:".js-cookie-permission-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",consentAcceptButtonSelector:".js-wishlist-cookie-accept",consentLoginButtonSelector:".js-wishlist-login",consentCancelButtonSelector:".js-wishlist-cookie-offcanvas-cancel",consentPreferencesButtonSelector:".js-wishlist-cookie-preferences"};init(){this.lastState={active:[],inactive:[]},this._cleanupTasks=[],this._httpClient=new v,this._registerEvents(),this._checkCookieConfigurationHash(),document.$emitter.subscribe("CookieConfiguration/requestConsent",e=>{e instanceof CustomEvent&&(e=e.detail),this.openRequestConsentOffCanvas(e.route,e.cookieName)}),this._registerCleanup(()=>{document.$emitter.unsubscribe("CookieConfiguration/requestConsent")})}destroy(){if(this._cleanupTasks&&this._cleanupTasks.length>0){let e=this._cleanupTasks.slice();this._cleanupTasks=[];for(let t=0;t<e.length;t++)try{e[t]()}catch(e){}}}_getDefaultCookieExpiration(){let{defaultCookieExpiration:e}=this.options,t=Number(e);return Number.isInteger(t)&&t>0?t:30}_registerEvents(){if(this._delegatedEventHandler)return;let{submitEvent:e,buttonOpenSelector:t,customLinkSelector:i,buttonPermissionSelector:n,globalButtonAcceptAllSelector:s}=this.options;this._delegatedEventHandler=e=>{let r=e.target;if(r.closest(i)){this._handleCustomLink(e);return}if(r.closest(t)){this.openOffCanvas();return}if(r.closest(n)){this._handlePermission(e);return}if(r.closest(s)){this._acceptAllCookiesFromCookieBar(e);return}},document.addEventListener(e,this._delegatedEventHandler,!0),this._registerCleanup(()=>{document.removeEventListener(e,this._delegatedEventHandler,!0),this._delegatedEventHandler=null})}_registerOffCanvasEvents(){let e=this._getOffCanvas();e&&!e.hasAttribute("data-offcanvas-events-registered")&&(this._offCanvasDelegatedHandler||(this._offCanvasDelegatedHandler=this._handleOffCanvasClick.bind(this)),e.setAttribute("data-offcanvas-events-registered","true"),e.addEventListener("click",this._offCanvasDelegatedHandler,!0),this._registerCleanup(()=>{e.removeEventListener("click",this._offCanvasDelegatedHandler,!0),e.removeAttribute("data-offcanvas-events-registered"),this._offCanvasDelegatedHandler=null}))}_handleOffCanvasClick(e){let{buttonSubmitSelector:t,buttonAcceptAllSelector:i}=this.options,n=e.target;if(n.closest(t)){e.preventDefault(),this._handleSubmit(e);return}if(n.closest(i)){e.preventDefault(),this._acceptAllCookiesFromOffCanvas(e);return}if("checkbox"===n.type){this._handleCheckbox(e);return}}_handleCustomLink(e){0!==e.button||e.ctrlKey||e.metaKey||e.shiftKey||e.defaultPrevented||(e.preventDefault(),this.openOffCanvas())}async _fetchCookieGroups(){try{let e=window.router["frontend.cookie.groups"],t=await fetch(e,{method:"GET",headers:{"X-Requested-With":"XMLHttpRequest"}});return await t.json()}catch(e){return console.error("Failed to fetch cookie groups:",e),null}}async _checkCookieConfigurationHash(){let{cookiePreference:e,cookieConfigHash:t}=this.options,i=l.getItem(e),n=l.getItem(t);if(!i&&!n)return;let s=await this._fetchCookieGroups();if(!s)return;let r=s.hash,o=s.languageId,a=this._getStoredHashForLanguage(n,o);if(a&&a!==r||i&&!a){await this._resetCookieConfiguration(s);return}a&&this._storeHashForLanguage(o,r,n)}_parseStoredHashes(e){if(!e)return{};try{let t=JSON.parse(e);if("object"==typeof t&&null!==t)return t}catch(e){}return{}}_getStoredHashForLanguage(e,t){return this._parseStoredHashes(e)[t]||null}_storeHashForLanguage(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,{cookieConfigHash:n}=this.options,s=i??l.getItem(n),r=this._parseStoredHashes(s);r[e]=t,l.setItem(n,JSON.stringify(r),this._getDefaultCookieExpiration())}async _resetCookieConfiguration(e){let t=e.elements||[],{activeCookieNames:i,inactiveCookieNames:n}=this._applyCookieConfiguration(t,"required",[],e.languageId);l.removeItem(this.options.cookiePreference);let s=i.filter(e=>e!==this.options.cookiePreference);this._handleUpdateListener(s,n),this._checkAndShowCookieBarIfNeeded()}_getTechnicallyRequiredCookieNames(){return["session-","timezone"]}async _handlePermission(e){e.preventDefault();let t=await this._fetchCookieGroups();if(!t)return;let i=t.elements,{activeCookieNames:n,inactiveCookieNames:s}=this._applyCookieConfiguration(i,"required",[],t.languageId);this._handleUpdateListener(n,s),this._hideCookieBar(),this.closeOffCanvas()}_applyCookieConfiguration(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this._getTechnicallyRequiredCookieNames(),r=this._extractAllCookiesFromGroups(e),o=[],a=[];for(let e=0;e<r.length;e++){let n=r[e];("required"===t?n.isRequired:"selected"!==t||n.isRequired||i.includes(n.cookie))?o.push(n):a.push(n.cookie)}for(let e=0;e<a.length;e++)l.getItem(a[e])&&l.removeItem(a[e]);let c=[...s];for(let e=0;e<o.length;
3e++){let t=o[e],i=s.some(e=>t.cookie===e),r=t.cookie===this.options.cookieConfigHash;i||c.push(t.cookie),!t.value||i||(r&&n?this._storeHashForLanguage(n,t.value):r||l.setItem(t.cookie,t.value,t.expiration||this._getDefaultCookieExpiration()))}return{activeCookieNames:c,inactiveCookieNames:a}}_extractAllCookiesFromGroups(e){let t=[];for(let i=0;i<e.length;i++){let n=e[i],s=n.isRequired||!1;if(n.entries)for(let e=0;e<n.entries.length;e++){let i=n.entries[e];i.cookie&&t.push({cookie:i.cookie,value:i.value,expiration:i.expiration,isRequired:s})}n.cookie&&t.push({cookie:n.cookie,value:n.value,expiration:n.expiration,isRequired:s})}return t}_handleUpdateListener(e,t){let i=this._getUpdatedCookies(e,t);"function"==typeof window.registerGoogleReCaptchaPlugins&&(window.registerGoogleReCaptchaPlugins(),PluginManager.initializePlugins()),document.$emitter.publish(b,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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,{offCanvasPosition:t}=this.options,i=window.router["frontend.cookie.offcanvas"];this._hideCookieBar(),p.open(i,!1,this._onOffCanvasOpened.bind(this,e),t)}closeOffCanvas(e){p.close(),"function"==typeof e&&e()}_checkAndShowCookieBarIfNeeded(){let{cookiePreference:e}=this.options;if(!l.getItem(e)){let e=new CustomEvent("showCookieBar");document.dispatchEvent(e)}}_onOffCanvasOpened(e){this._registerOffCanvasEvents(),this._setInitialState(),this._setInitialOffcanvasState(),this._registerOffCanvasCloseListener(),PluginManager.initializePlugins(),"function"==typeof e&&e()}_registerOffCanvasCloseListener(){this._onOffCanvasOnceHandler=()=>{this._checkAndShowCookieBarIfNeeded()},d.$emitter.subscribe("onCloseOffcanvas",this._onOffCanvasOnceHandler,{once:!0}),this._registerCleanup(()=>{d.$emitter.unsubscribe("onCloseOffcanvas"),this._onOffCanvasOnceHandler=null})}_registerCleanup(e){this._cleanupTasks||(this._cleanupTasks=[]),this._cleanupTasks.push(e)}_hideCookieBar(){let e=new CustomEvent("hideCookieBar");document.dispatchEvent(e)}openRequestConsentOffCanvas(e,t){e&&t&&(C.lastTriggerElement=document.activeElement,p.open(e,!1,()=>{window.PluginManager.initializePlugins();let e=document.querySelector(".offcanvas");e&&this._registerConsentOffcanvasEvents(e,t)},"left"))}_registerConsentOffcanvasEvents(e,t){let{consentAcceptButtonSelector:i,consentLoginButtonSelector:n,consentCancelButtonSelector:s,consentPreferencesButtonSelector:r}=this.options,o=e.querySelector(i);o&&o.addEventListener("click",this._onAccept.bind(this,t));let a=e.querySelector(n);a&&a.addEventListener("click",this._onLogin.bind(this));let l=e.querySelector(s);l&&l.addEventListener("click",this._onCancel.bind(this));let c=e.querySelector(r);c&&c.addEventListener("click",this._onPreferences.bind(this))}_setInitialState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=e||this._getCookies("all"),i=[],n=[];t.forEach(e=>{let{cookie:t,required:s}=e;l.getItem(t)||s?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})`)),s=Array.from(t.querySelectorAll(`input:not(${i}):checked`));if(n.length>0){let e=t.querySelector(i);if(e){let t=s.length>0,i=t&&s.length!==n.length;e.checked=t,e.indeterminate=i}}}async _handleSubmit(){let e=this._getCookies("active").filter(e=>{let{required:t}=e;return!t}).map(e=>{let{cookie:t}=e;return t}),t=await this._fetchCookieGroups();if(!t)return;let i=t.elements,{activeCookieNames:n,inactiveCookieNames:s}=this._applyCookieConfiguration(i,"selected",e,t.languageId);this._handleUpdateListener(n,s),this.closeOffCanvas(document.$emitter.publish(_))}async acceptAllCookies(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];let e=await this._fetchCookieGroups();if(!e)return;let t=e.elements,{activeCookieNames:i,inactiveCookieNames:n}=this._applyCookieConfiguration(t,"all",[],e.languageId);this._handleUpdateListener(i,n),this._hideCookieBar(),this.closeOffCanvas()}async _acceptAllCookiesFromCookieBar(){let e=await this._fetchCookieGroups();if(!e)return;let t=e.elements,{activeCookieNames:i,inactiveCookieNames:n}=this._applyCookieConfiguration(t,"all",[],e.languageId);this._handleUpdateListener(i,n),this._hideCookieBar()}async _acceptAllCookiesFromOffCanvas(){let e=await this._fetchCookieGroups();if(!e)return;let t=e.elements,{activeCookieNames:i,inactiveCookieNames:n}=this._applyCookieConfiguration(t,"all",[],e.languageId);this._handleUpdateListener(i,n),this.closeOffCanvas(document.$emitter.publish(_))}_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:s}=e.dataset;return{cookie:t,value:i,expiration:n,required:s}})}_getOffCanvas(){let e=h?h.getOffCanvas():[];return!!e&&e.length>0&&e[0]}_onAccept(e){l.setItem(e,"1",this._getDefaultCookieExpiration()),p.close()}_navigateTo(e){window.location.href=e}_onLogin(){p.close(),this._navigateTo(window.router["frontend.account.login.page"])}_onCancel(){p.close()}_onPreferences(e){e.preventDefault(),p.close(),this.openOffCanvas(()=>{let e=document.querySelector(".offcanvas");e&&e.addEventListener("hidden.bs.offcanvas",this._restoreFocus.bind(this),{once:!0})})}_restoreFocus(){let e=C.lastTriggerElement;e?.focus?.()}}
3class y{supports(e,t,i){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 k extends y{execute(){this._subscribedElements=this._subscribedElements||new WeakSet,this._subscribeToPluginInstances(),this._subscribeToListingUpdates()}_getPluginInstances(e){try{let t=window.PluginManager.getPluginInstances(e);return t?.length>0?t:null}catch{return null}}_subscribeToPluginInstances(){let e=this._getPluginInstances(this.getPluginName());if(!e)return;let t=this.getEvents();e.forEach(e=>{let i=e.el||e;this._subscribedElements.has(i)||(Object.keys(t).forEach(i=>{e.$emitter.subscribe(i,t[i])}),this._subscribedElements.add(i))})}_subscribeToListingUpdates(){if("Listing"===this.getPluginName()||this._listingSubscribed)return;let e=this._getPluginInstances("Listing");e&&(e.forEach(e=>{e.$emitter.subscribe("Listing/afterRenderResponse",async()=>{await window.PluginManager.initializePlugins(),this._subscribeToPluginInstances()})}),this._listingSubscribed=!0)}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 E extends k{supports(){return!0}getPluginName(){return"AddToCart"}getEvents(){return{beforeFormSubmit:this._beforeFormSubmit.bind(this)}}_beforeFormSubmit(e){if(!this.active)return;let t=e.detail,i=null;if(t.forEach((e,t)=>{t.endsWith("[id]")&&(i=e)}),!i){console.warn("[codiverse GTM] Product ID could not be fetched. Skipping.");return}let n=this.getProductsObjectFromFormData(t,i),s="add_to_cart";document.querySelector("body").classList.contains("is-ctl-navigation")&&(s="add_to_cart_list"),dataLayer.push({ecommerce:null}),dataLayer.push({event:s,ecommerce:{currency:t.get("dtgs-gtm-currency-code"),value:n.price*n.quantity,items:[n]}})}getProductsObjectFromFormData(e,t){let i={item_name:e.get("product-name"),item_id:e.get("dtgs-gtm-product-sku"),quantity:Number(e.get("lineItems["+t+"][quantity]"))};return null!==e.get("dtgs-gtm-product-variantname")&&Object.assign(i,{item_variant:e.get("dtgs-gtm-product-variantname")}),null!==e.get("dtgs-gtm-product-category")&&Object.assign(i,{item_category:e.get("dtgs-gtm-product-category")}),null!==e.get("dtgs-gtm-product-price")&&Object.assign(i,{price:Number(e.get("dtgs-gtm-product-price"))}),null!==e.get("brand-name")&&Object.assign(i,{item_brand:e.get("brand-name")}),null!==e.get("dtgs-gtm-product-db-id")&&Object.assign(i,{item_db_id:e.get("dtgs-gtm-product-db-id")}),"undefined"!=typeof dtgsRemarketingEnabled&&!0===dtgsRemarketingEnabled&&(Object.assign(i,{id:e.get("dtgs-gtm-product-sku")}),Object.assign(i,{google_business_vertical:"retail"})),i}}class w{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!w.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===w.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=t.replace(/^data(|-)/,""),s=r.toLowerCamelCase(n,"-");if(!w.isNode(e)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let o=e.dataset[s];if(void 0===o){if(i)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return o}return r.parsePrimitive(o)}static querySelector(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!w.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelector(t)||!1;if(i&&!1===n)throw Error(`The required element "${t}" does not exist in parent node!`);return n}static querySelectorAll(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!w.isNode(e))throw Error("The parent node is not a valid HTML Node!");let n=e.querySelectorAll(t);if(0===n.length&&(n=!1),i&&!1===n)throw Error(`At least one item of "${t}" must exist in parent node!`);return n}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=`
4            input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]),
5            select:not([tabindex^="-"]):not([disabled]),
6            textarea:not([tabindex^="-"]):not([disabled]),
7            button:not([tabindex^="-"]):not([disabled]),
8            a[href]:not([tabindex^="-"]):not([disabled]),
9            [tabindex]:not([tabindex^="-"]):not([disabled])
10        `;return e.querySelectorAll(t)}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}class O extends y{supports(){return!0}execute(){document.addEventListener("click",this._onRemoveFromCart.bind(this))}_onRemoveFromCart(e){if(!this.active||!e.target.closest(".line-item-remove-button"))return;let t=w.querySelector(e.target.closest(".line-item-remove"),"input[name=dtgs-gtm-product-sku]");if(!t)return;let i=w.querySelector(e.target.closest(".line-item-remove"),"input[name=dtgs-gtm-product-name]"),n=w.querySelector(e.target.closest(".line-item-remove"),"input[name=dtgs-gtm-product-price]"),s=w.querySelector(e.target.closest(".line-item-remove"),"input[name=dtgs-gtm-total-price]"),r=w.querySelector(e.target.closest(".line-item-remove"),"input[name=dtgs-gtm-product-quantity]"),o=w.querySelector(e.target.closest(".line-item-remove"),"input[name=dtgs-gtm-currency-code]");dataLayer.push({ecommerce:null}),dataLayer.push({event:"remove_from_cart",ecommerce:{currency:o.value,value:Number(s.value),items:[{item_id:t.value,item_name:i.value,quantity:Number(r.value),price:Number(n.value),index:0}]}})}}class S extends y{constructor(){super(),this.quantityBeforeChange=new Map}supports(){return!0}execute(){document.addEventListener("change",this._onQuantityInputChange.bind(this)),this.storeInitialQuantities()}storeInitialQuantities(){this._refreshStoredQuantities()}_refreshStoredQuantities(){let e=w.querySelectorAll(document,'input[name="quantity"].js-quantity-selector',!1);e&&e.forEach(e=>{let t=this._getLineItemId(e);if(t){let i=parseInt(e.value)||1;this.quantityBeforeChange.set(t,i)}})}_onQuantityInputChange(e){if(!this.active||!e.target.classList.contains("js-quantity-selector")||"quantity"!==e.target.name)return;let t=e.target,i=this._getLineItemId(t);if(!i)return;let n=parseInt(t.value)||1,s=this.quantityBeforeChange.get(i)||1;this._fireQuantityChangeEvent(t,s,n),this.quantityBeforeChange.set(i,n)}_getLineItemId(e){let t=e.closest(".line-item");if(!t)return null;let i=w.querySelector(t,".line-item-remove form",!1);if(i){let e=w.querySelector(i,'input[name="dtgs-gtm-product-sku"]',!1);if(e&&e.value)return e.value}return this._getFallbackLineItemId(t)}_getFallbackLineItemId(e){let t=w.querySelectorAll(document,".line-item",!1);if(t){let i=Array.from(t).indexOf(e);return`line-item-${i}`}return null}_fireQuantityChangeEvent(e,t,i){if(t===i)return;let n=e.closest(".line-item");if(!n)return;let s=i-t,r=s>0,o=Math.abs(s),a=w.querySelector(n,".line-item-remove form",!1);if(!a){console.warn("[GTM Quantity Change] Could not find remove form");return}let l=this._extractCommonFormData(a);if(!l)return;let c=r?this._buildIncreaseEventData(l,o):this._buildDecreaseEventData(l,o);this._pushToDataLayer(r?"add_to_cart":"remove_from_cart",c)}_extractCommonFormData(e){let t=w.querySelector(e,'input[name="dtgs-gtm-product-sku"]',!1),i=w.querySelector(e,'input[name="dtgs-gtm-product-name"]',!1),n=w.querySelector(e,'input[name="dtgs-gtm-product-price"]',!1),s=w.querySelector(e,'input[name="dtgs-gtm-currency-code"]',!1);return t&&i&&s?{sku:t.value,name:i.value,price:n?Number(n.value):0,currency:s.value,removeForm:e}:(console.warn("[GTM Quantity Change] Missing required form data"),null)}_buildIncreaseEventData(e,t){let i={item_name:e.name,item_id:e.sku,quantity:t};return this._addOptionalFields(i,e,e.removeForm),this._addRemarketingFields(i,e.sku),{currency:e.currency,value:e.price*t,items:[i]}}_buildDecreaseEventData(e,t){let i={item_id:e.sku,item_name:e.name,quantity:t,price:e.price,index:0};return{currency:e.currency,value:e.price*t,items:[i]}}_addOptionalFields(e,t,i){t.price>0&&(e.price=t.price);let n=w.querySelector(i,'input[name="dtgs-gtm-product-db-id"]',!1);n&&n.value&&""!==n.value&&(e.item_db_id=n.value)}_addRemarketingFields(e,t){"undefined"!=typeof dtgsRemarketingEnabled&&!0===dtgsRemarketingEnabled&&(e.id=t,e.google_business_vertical="retail")}_pushToDataLayer(e,t){dataLayer.push({ecommerce:null}),dataLayer.push({event:e,ecommerce:t})}}
10class A extends y{supports(){return!0}execute(){let e=w.querySelector(document,".login-submit button",!1);e&&e.addEventListener("click",this._fireLoginEvent.bind(this))}_fireLoginEvent(){this.active&&window.dataLayer.push({event:"login"})}}class q extends y{supports(){return!0}execute(){let e=w.querySelector(document,".register-submit button",!1);e&&e.addEventListener("click",this._fireSignUpEvent.bind(this))}_fireSignUpEvent(){this.active&&window.dataLayer.push({event:"sign_up"})}}class L{static getCategoriesFromElement(e){let t={};for(let i=1;i<=5;i++){let n=e.getAttribute(`data-category-${i}`);if(n)t[1===i?"item_category":`item_category${i}`]=n;else break}return t}static getLineItems(){let e=document.querySelector(".hidden-line-items-information").querySelectorAll(".hidden-line-item"),t=[];return e.forEach(e=>{let i={id:e.getAttribute("data-id"),name:e.getAttribute("data-name"),quantity:e.getAttribute("data-quantity"),price:e.getAttribute("data-price"),brand:e.getAttribute("data-brand")};t.push({...i,...L.getCategoriesFromElement(e)})}),t}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")}}static getProductData(e){if(!document.querySelector(".hidden-line-items-information"))return null;let t=L.getLineItems().find(t=>t.id===e);if(!t)return null;let i=L.getAdditionalProperties(),n={};for(let[e,i]of Object.entries(t))e.startsWith("item_category")&&(n[e]=i);return{name:t.name,brand:t.brand,value:t.price,currency:i.currency,categories:n}}}window.PluginManager.register("GoogleTagManager",class extends a{init(){if(this.cookieEnabledName="dtgsAllowGtmTracking",this.cookieAdsEnabledName=window.googleAdsCookieName||"google-ads-enabled",this.handleCookieChangeEvent(),this.startGoogleTagManager(),!l.getItem(this.cookieEnabledName)){let e=document.querySelector("[data-off-canvas-cart]");if(e){let t=window.PluginManager.getPluginInstanceFromElement(e,"OffCanvasCart");t&&t.$emitter.subscribe("offCanvasOpened",this.onOffCanvasOpenedForInitialQuantities.bind(this))}return}this.fireCookieConsentEvent();let e=document.querySelector("[data-off-canvas-cart]");if(e){let t=window.PluginManager.getPluginInstanceFromElement(e,"OffCanvasCart");t&&t.$emitter.subscribe("offCanvasOpened",this.onOffCanvasOpened.bind(this))}let t=document.querySelector("[data-listing-pagination]");if(t){let e=window.PluginManager.getPluginInstanceFromElement(t,"Listing");e&&e.$emitter.subscribe("Listing/afterRenderResponse",this.onPageSwitched.bind(this))}let i=w.querySelector(document,"#wishlist-basket",!1);if(i){let e=window.PluginManager.getPluginInstanceFromElement(i,"WishlistStorage");e&&e.$emitter.subscribe("Wishlist/onProductAdded",this.onWishlistAdd.bind(this)),e&&e.$emitter.subscribe("Wishlist/onProductRemoved",this.onWishlistRemove.bind(this))}let n=w.querySelector(document,".product-wishlist-form",!1);n&&n.addEventListener("submit",this.onWishlistRemoveFormSubmit.bind(this))}fireCookieConsentEvent(){window.dataLayer.push({event:"cookieConsentGiven"})}fireSelectItemEvent(e){let t=e.target.closest(".card-body"),i={item_name:t.querySelector('input[name="product-name"]').value,item_id:t.querySelector('input[name="dtgs-gtm-product-sku"]').value},n=t.querySelector('input[name="dtgs-gtm-product-variantname"]'),s=t.querySelector('input[name="dtgs-gtm-product-category"]'),r=t.querySelector('input[name="dtgs-gtm-product-price"]'),o=t.querySelector('input[name="dtgs-gtm-product-brand"]');null!==n&&Object.assign(i,{item_variant:n.value}),null!==s&&Object.assign(i,{item_category:s.value}),null!==o&&Object.assign(i,{item_brand:o.value}),null!==r&&Object.assign(i,{price:Number(r.value)}),dataLayer.push({ecommerce:null}),dataLayer.push({event:"select_item",ecommerce:{item_list_name:"Category",items:[i]}})}startGoogleTagManager(){this.controllerName=window.controllerName,this.actionName=window.actionName,this.events=[],this.registerDefaultEvents(),this.handleEvents()}
10handleEvents(){this.events.forEach(e=>{e.supports(this.controllerName,this.actionName)&&e.execute()})}registerDefaultEvents(){this.registerEvent(E),this.registerEvent(O),this.registerEvent(S),this.registerEvent(A),this.registerEvent(q),this.registerSelectItemEvent()}registerEvent(e){this.events.push(new e)}handleCookieChangeEvent(){document.$emitter.subscribe(b,this.handleCookies.bind(this))}handleCookies(e){let t=e.detail;if(this.updateConsentMode(t),t.hasOwnProperty(this.cookieEnabledName)){if(t[this.cookieEnabledName]){this.fireCookieConsentEvent(),this.loadGoogleTagManager(),this.startGoogleTagManager();return}this.removeGoogleTagManager(),this.removeCookies(),this.disableEvents()}}removeCookies(){let e=document.cookie.split(";"),t=/^(_ga|_gat_UA$|_gid)/;e.forEach(e=>{let i=e.split("=")[0].trim();i.match(t)&&l.removeItem(i)})}disableEvents(){this.events.forEach(e=>{e.disable()})}loadGoogleTagManager(){!window.dtgsGtmConfig||!window.dtgsGtmConfig.containerIds||!1===window.dtgsGtmConfig.loadGoogleScriptAfterConsent&&document.querySelector('script[src*="googletagmanager.com/gtm.js"], script[src*="/gtm.js"]')||window.dtgsGtmConfig.containerIds.forEach(e=>{"function"==typeof window.dtgsLoadGTM&&window.dtgsLoadGTM(e)})}removeGoogleTagManager(){"function"==typeof window.dtgsRemoveGTM&&window.dtgsRemoveGTM()}updateConsentMode(e){if(0===Object.keys(e).length||"undefined"!=typeof dtgsConsentHandler&&"thirdpartyCmp"===dtgsConsentHandler)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&&gtag("consent","update",t)}registerSelectItemEvent(){let e=w.querySelectorAll(document,"a.product-name, a.product-image-link, a.product-button-detail",!1);e&&e.forEach(e=>{e.addEventListener("click",this.fireSelectItemEvent)})}onPageSwitched(){this.registerSelectItemEvent()}onWishlistAdd(e){let t=this.getSkuFromEvent(e);this.fireWishlistEvent(t,"add_to_wishlist")}onWishlistRemove(e){let t=this.getSkuFromEvent(e);this.fireWishlistEvent(t,"remove_from_wishlist")}onWishlistRemoveFormSubmit(e){let t=w.querySelector(e.target,'input[name="dtgs-gtm-product-sku"]',!1);this.fireWishlistEvent(t,"remove_from_wishlist")}fireWishlistEvent(e,t){null!==e&&dataLayer.push({event:t,ecommerce:{items:{item_id:e.value}}})}onOffCanvasOpened(){let e=L.getAdditionalProperties(),t=this.getLineItems();window.dataLayer.push({event:"view_cart",currency:e.currency,ecommerce:{items:t}}),this.events.forEach(e=>{e.hasOwnProperty("quantityBeforeChange")&&e.storeInitialQuantities()})}onOffCanvasOpenedForInitialQuantities(){this.events.forEach(e=>{e.hasOwnProperty("quantityBeforeChange")&&e.storeInitialQuantities()})}getLineItems(){let e=w.querySelector(document,".hidden-line-items-information",!1),t=w.querySelectorAll(e,".hidden-line-item",!1),i=[];return!1===t?[]:(t.forEach(e=>{let t={item_id:w.getDataAttribute(e,"data-dtgs-sku"),item_name:w.getDataAttribute(e,"name"),quantity:w.getDataAttribute(e,"quantity"),price:w.getDataAttribute(e,"data-dtgs-price")};void 0!==w.getDataAttribute(e,"data-dtgs-db-id",!1)&&(t.item_db_id=w.getDataAttribute(e,"id")),i.push(t)}),i)}getSkuFromEvent(e){let t=e.detail.productId,i=w.querySelector(document,'input[value="'+t+'"]',!1);if(i)return w.querySelector(i.parentNode,'input[name="dtgs-gtm-product-sku"]',!1)}}),window.PluginManager.register("DtgsGtmServicesPlugin",class extends a{init(){this.gtmConsentCookie=window.dtgsGtmConsentCookieName||"dtgsAllowGtmTracking",this.services=Array.isArray(window.dtgsGtmCustomServices)?window.dtgsGtmCustomServices:[],this.handleCookieChangeEvent(),this.fireForConsentedServices()}handleCookieChangeEvent(){document.$emitter.subscribe(b,this.handleCookies.bind(this))}handleCookies(e){let t=e.detail;
10this.isGtmConsentGranted(t)&&this.services.forEach(e=>{let i=e.cookie;t.hasOwnProperty(i)&&t[i]&&this.pushEvent(e.eventName)})}fireForConsentedServices(){l.getItem(this.gtmConsentCookie)&&this.services.forEach(e=>{l.getItem(e.cookie)&&this.pushEvent(e.eventName)})}isGtmConsentGranted(e){return e&&Object.prototype.hasOwnProperty.call(e,this.gtmConsentCookie)?!!e[this.gtmConsentCookie]:!!l.getItem(this.gtmConsentCookie)}pushEvent(e){void 0===window.dataLayer&&(window.dataLayer=[]),window.dataLayer.push({event:e})}})})();

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.