1/** 2 * NOTICE OF LICENSE 3 * 4 * This source file is subject to a trade license awarded by 5 * Garamo Online S.L. 6 * 7 * Any use, public communication, reproduction, modification or 8 * distribution of this source file without the written consent of 9 * Garamo Online S.L. It Is prohibited. 10 * 11 * @author ReactionCode <[email protected]> 12 * @copyright Garamo Online S.L. 2015-2023. 13 * @license Commercial license 14 */(()=>{"use strict";const t=function(){function t(){this.hasSessionStorage="Storage"===Object.prototype.toString.call(sessionStorage).slice(8,-1)}return t.prototype.getItem=function(t){var e=null;return this.hasSessionStorage&&(e=sessionStorage.getItem(t)),e},t.prototype.setItem=function(t,e){this.hasSessionStorage&&sessionStorage.setItem(t,e)},t.prototype.removeItem=function(t){this.hasSessionStorage&&sessionStorage.removeItem(t)},t.prototype.clearAll=function(){this.hasSessionStorage&&sessionStorage.clear()},t}(),e=function(){function t(t,e){this.sessionStorage=t,this.idLang=e,this.storageKey="RcProductList",this.storageValue={},this.initStorage()}return t.prototype.initStorage=function(){var t=this.sessionStorage.getItem(this.storageKey);t&&(this.storageValue=JSON.parse(t))},t.prototype.addProduct=function(t){this.storageValue[t.id_index]=t,this.updateSessionStorageValue()},t.prototype.updateSessionStorageValue=function(){var t=JSON.stringify(this.storageValue);this.sessionStorage.setItem(this.storageKey,t)},t.prototype.getProduct=function(t){var e=null,n=this.buildIndex(t);return Object.prototype.hasOwnProperty.call(this.storageValue,n)&&(e=this.storageValue[n]),e},t.prototype.buildIndex=function(t){return[t.idProduct,t.idProductAttribute,this.idLang].join("-")},t}(),n=function(){function t(t){this.storageKey="RcAttributionList",this.storageValue={},this.sessionStorage=t,this.initStorage()}return t.prototype.initStorage=function(){var t=this.sessionStorage.getItem(this.storageKey);t&&(this.storageValue=JSON.parse(t))},t.prototype.addAttribution=function(t,e){this.storageValue[t]=e,this.updateSessionStorageValue()},t.prototype.updateSessionStorageValue=function(){var t=JSON.stringify(this.storageValue);this.sessionStorage.setItem(this.storageKey,t)},t.prototype.getAttributionList=function(){return this.storageValue},t.prototype.getAttribution=function(t){var e=null;return Object.prototype.hasOwnProperty.call(this.storageValue,t)&&(e=this.storageValue[t]),e},t.prototype.removeSessionStorageKey=function(){this.sessionStorage.removeItem(this.storageKey)},t}(),r=function(){function r(r){this.config=r;var o=this.config.context.localization.id_lang,i=new t;this.attributionStorage=new n(i),this.productStorage=new e(i,o)}return r.prototype.initTrackingData=function(t){Object.prototype.hasOwnProperty.call(t,"detail_products_list")&&t.detail_products_list.length&&this.addProductsList(t.detail_products_list)},r.prototype.getProductModel=function(t){return this.productStorage.getProduct(t)},r.prototype.addProductsList=function(t){var e=this;t.forEach((function(t){return e.productStorage.addProduct(t)}))},r.prototype.addAttributionData=function(t,e){var n={productList:this.config.context.page.controller_name,productPosition:e};this.attributionStorage.addAttribution(t,n)},r.prototype.getAttributionDataList=function(){return this.attributionStorage.getAttributionList()},r}(),o=function(){function t(){this.errorLog=[],this.config=t.getTemplateData(this.getConfigNode()),this.sessionStorage=new r(this.config)}return t.getTemplateData=function(e){var n=t.getRawTrackingData(e);return t.parseModuleData(n)},t.getRawTrackingData=function(t){var e="",n=document.querySelector(t);return n instanceof HTMLElement&&n.dataset.trackingData&&n.dataset.trackingData.length&&(e=n.dataset.trackingData),e},t.parseModuleData=function(t){return JSON.parse(decodeURIComponent(t)||"{}")},t}(),i=function(){function t(t){this.config=t}return t.prototype.initScripts=function(){this.isAvailable()&&(this.config.optimize.hiding_timeout&&this.config.optimize.hiding_class_name&&(this.addHidingStyle(),this.addHiddingScript()),this.addOptimizeScript())},t.prototype.isAvailable=function(){return Boolean(this.config.optimize.tracking_id&&this.config.gua.tracking_id)},t.prototype.getTrackingId=function(){return this.config.optimize.tracking_id},t.prototype.getHidingClassName=function(){return this.config.optimize.hiding_class_name},t.prototype.getHidingTimeout=function(){return this.config.optimize.hiding_timeout},t.prototype.addHidingStyle=function(){var t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=".".concat(this.getHidingClassName()," { opacity: 0 !important };"),document.head.appendChild(t)},t.prototype.addHiddingScript=function(){var t=document.createElement("script");t.innerText="\n (function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date;\n h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')};\n (a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c;\n })(window, document.documentElement, '".concat(this.getHidingClassName(),"', 'dataLayer', ").concat(this.getHidingTimeout(),", {'").concat(this.getTrackingId(),"': true});\n "),document.head.appendChild(t)},t.prototype.addOptimizeScript=function(){var t=document.createElement("script");t.src="https://www.googleoptimize.com/optimize.js?id=".concat(this.getTrackingId()),t.async=this.config.optimize.is_async,document.head.appendChild(t)},t}(),a=function(){function t(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n,this.actionTrackingEvents=[],this.dataTrackingEvents=[],this.createPageEvents()}return t.prototype.createPageEvents=function(){this.createAddToCartEvent(),this.createCartViewEvent(),this.createCategoryEvent(),this.createCheckoutEvent(),this.createCustomerLogin(),this.createCustomerSignUp(),this.createHomeEvent(),this.createOrderCompleteEvent(),this.createProductClickEvent(),this.createProductShareEvent(),this.createProductViewEvent(),this.createPromotionClickEvent(),this.createSearchEvent(),this.createViewItemsListEvent()},t.prototype.initPageEvents=function(){this.actionTrackingEvents.forEac
14h((function(t){return t.initEvent()}))},t.prototype.initDataEvents=function(t){t&&this.dataTrackingEvents.forEach((function(e){return e.initDataEvent(t)}))},t}(),c=function(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n,this.quantity=0};const s=function(){function t(t){this.requestConfig=t,this.errorMessage="Something went wrong on request",this.requestConfig=t,this.formData=this.buildFormData()}return t.prototype.buildFormData=function(){var t=new FormData;return t.append("fc",this.requestConfig.fc),t.append("module",this.requestConfig.module),t.append("controller",this.requestConfig.controller),t.append("action",this.requestConfig.action),t.append("data",encodeURIComponent(JSON.stringify(this.requestConfig.data))),t.append("token",this.requestConfig.token),t},t.prototype.fetchRequest=function(){return t=this,e=void 0,r=function(){var t,e,n,r;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(o){switch(o.label){case 0:return t={method:"POST",mode:"same-origin",body:this.formData},e=new Request(this.requestConfig.url,t),[4,fetch(e)];case 1:return(n=o.sent()).ok?[4,n.json()]:[3,3];case 2:return r=o.sent(),[2,Promise.resolve(r)];case 3:return[2,Promise.reject(new Error(this.errorMessage))]}}))},new((n=void 0)||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}));var t,e,n,r},t.prototype.xhrRequest=function(){var t=this;return new Promise((function(e,n){var r=new XMLHttpRequest;r.open("POST",t.requestConfig.url,!0),r.responseType="json",r.onload=function(){200===r.status?e(r.response):n(new Error(t.errorMessage))},r.send(t.formData)}))},t}();var u=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},p=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}},l=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};const f=function(){function t(){}
14return t.getProductsDetailList=function(e,n,r){return u(this,void 0,void 0,(function(){var o,i,a;return p(this,(function(c){switch(c.label){case 0:return o=[],i=[],e.forEach((function(t){var e=r.getProductModel(t);e?o.push(e):i.push(t)})),i.length?[4,t.fetchProductsLists(e,n)]:[3,2];case 1:(a=c.sent()).length&&r.addProductsList(a),o=l(l([],o,!0),a,!0),c.label=2;case 2:return[2,o]}}))}))},t.fetchProductsLists=function(t,e){return u(this,void 0,void 0,(function(){var n;return p(this,(function(r){return n={url:e.context.shop.base_dir+"index.php",fc:"module",module:e.context.tracking_module.module_name,controller:"datarequest",action:"getProductsDetail",data:t,token:e.context.tracking_module.token},[2,new s(n).fetchRequest()]}))}))},t}();var h,d=(h=function(t,e){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},h(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}h(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});const y=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.initEvent=function(){document.addEventListener("click",this.triggerCartQuantity.bind(this),!0),prestashop.on("updateCart",this.triggerEvent.bind(this))},e.prototype.triggerCartQuantity=function(t){if(0===t.button&&t.target instanceof Element){var n=e.getAddToCartQuantity(t.target);n&&(this.quantity=n)}},e.getAddToCartQuantity=function(t){var e=0,n=t.closest("[data-button-action=add-to-cart]");if(n instanceof HTMLElement){var r=null,o="";if(e=1,n.matches("form *")?r=n.closest("form"):n.hasAttribute("form")&&(r=document.querySelector("#"+n.getAttribute("form"))),r instanceof HTMLFormElement){o=r.id;var i=r.querySelector("[name=qty]")||document.querySelector("[name=qty][form="+o+"]");(i instanceof HTMLInputElement||i instanceof HTMLSelectElement)&&(e=parseInt(i.value))}}return e},e.prototype.triggerEvent=function(t){return n=this,r=void 0,i=function(){var n,r;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(o){switch(o.label){case 0:return(n=e.getProductsDataList(t)).length?[4,f.getProductsDetailList(n,this.config,this.sessionStorage)]:[3,2];case 1:(r=o.sent()).length&&this.quantity&&this.trackingPlatform.addToCart(r[0],this.quantity),o.label=2;case 2:return this.quantity=0,[2]}}))},new((o=void 0)||(o=Promise))((function(t,e){function a(t){try{s(i.next(t))}catch(t){e(t)}}function c(t){try{s(i.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,c)}s((i=i.apply(n,r||[])).next())}));var n,r,o,i},e.getProductsDataList=function(t){var n=[];return e.isValidResponse(t)&&n.push({idProduct:t.resp.id_product,idProductAttribute:t.resp.id_product_attribute}),n},e.isValidResponse=function(t){return Object.prototype.hasOwnProperty.call(t,"resp")&&t.resp.success},e}(c),g=function(){function t(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n}return t.prototype.initDataEvent=function(t){Object.prototype.hasOwnProperty.call(t,"detail_products_list")&&Object.prototype.hasOwnProperty.call(t,"order_products_list")&&t.detail_products_list.length&&t.order_products_list.length&&this.trackingPlatform.cartView(t.detail_products_list,t.order_products_list)},t}();var v=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}
14(),m=function(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}))},_=function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};const w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cartProductsQuantities={},e.lastInputFocus="",e}return v(e,t),e.prototype.initEvent=function(){document.addEventListener("click",this.handleEvent.bind(this),!0),prestashop.on("updateCart",this.updateQuantity.bind(this))},e.prototype.handleEvent=function(t){0===t.button&&t.target instanceof HTMLElement&&(t.target.closest(".js-increase-product-quantity")&&!e.isFocused(t.target)?this.increaseQuantity(t.target):t.target.closest(".js-decrease-product-quantity")&&!e.isFocused(t.target)?this.decreaseQuantity(t.target):t.target.closest(".js-cart-line-product-quantity")?this.setInputCurrentQuantity(t.target):t.target.closest(".remove-from-cart")&&this.removeFromCart(t.target))},e.isFocused=function(t){var e=t.closest(".cart-item");if(e instanceof HTMLElement){var n=e.querySelector(".js-cart-line-product-quantity");return document.activeElement===n}return!1},e.prototype.increaseQuantity=function(t){return m(this,void 0,void 0,(function(){var n;return _(this,(function(r){return n=e.getProductsDataList(t),this.triggerEvent(n,1,this.trackingPlatform.addToCart.bind(this.trackingPlatform)),[2]}))}))},e.prototype.decreaseQuantity=function(t){return m(this,void 0,void 0,(function(){var n;return _(this,(function(r){return n=e.getProductsDataList(t),this.triggerEvent(n,1,this.trackingPlatform.removeFromCart.bind(this.trackingPlatform)),[2]}))}))},e.prototype.removeFromCart=function(t){var n=e.getProductsDataList(t),r=t.closest(".cart-item");if(r instanceof HTMLElement){var o=r.querySelector(".js-cart-line-product-quantity");if(o instanceof HTMLInputElement){var i=parseInt(o.value);this.triggerEvent(n,i,this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))}}},e.getProductsDataList=function(t){var e,n,r=t.closest(".cart-item"),o=[];if(r instanceof HTMLElement){var i=r.querySelector(".remove-from-cart");i instanceof HTMLElement&&(e=parseInt(i.dataset.idProduct||"0"),n=parseInt(i.dataset.idProductAttribute||"0"),e&&o.push({idProduct:e,idProductAttribute:n}))}return o},e.prototype.setInputCurrentQuantity=function(t){return m(this,void 0,void 0,(function(){var n,r,o,i;return _(this,(function(a){return n=e.getProductsDataList(t),r=n[0],o=t.closest(".js-cart-line-product-quantity"),n.length&&o instanceof HTMLInputElement&&(i=JSON.stringify(r))!==this.lastInputFocus&&(this.cartProductsQuantities[i]=parseInt(o.value),this.lastInputFocus=i),[2]}))}
14))},e.prototype.updateQuantity=function(t){return m(this,void 0,void 0,(function(){var e,n,r,o,i;return _(this,(function(a){return t.reason.success&&(e={idProduct:t.reason.id_product,idProductAttribute:t.reason.id_product_attribute},(n=[e]).length&&(r=JSON.stringify(e),o=t.reason.quantity,this.lastInputFocus="",o>this.cartProductsQuantities[r]?(i=o-this.cartProductsQuantities[r],this.triggerEvent(n,i,this.trackingPlatform.addToCart.bind(this.trackingPlatform))):(i=this.cartProductsQuantities[r]-o,this.triggerEvent(n,i,this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))))),[2]}))}))},e.prototype.triggerEvent=function(t,e,n){return m(this,void 0,void 0,(function(){var r;return _(this,(function(o){switch(o.label){case 0:return t.length?[4,f.getProductsDetailList(t,this.config,this.sessionStorage)]:[3,2];case 1:(r=o.sent()).length&&e&&n(r[0],e),o.label=2;case 2:return[2]}}))}))},e.prototype.initDataEvent=function(t){Object.prototype.hasOwnProperty.call(t,"detail_products_list")&&Object.prototype.hasOwnProperty.call(t,"order_products_list")&&t.detail_products_list.length&&t.order_products_list.length&&this.trackingPlatform.cartView(t.detail_products_list,t.order_products_list)},e}(g),P=function(){function t(t,e){this.trackingPlatform=t,this.config=e}return t.prototype.initEvent=function(){this.triggerEvent()},t.prototype.triggerEvent=function(){this.hasCategoryData()&&this.trackingPlatform.categoryPageView()},t.prototype.hasCategoryData=function(){return Object.prototype.hasOwnProperty.call(this.config.context.page,"category")&&Object.prototype.hasOwnProperty.call(this.config.context.page.category,"id_category")&&Object.prototype.hasOwnProperty.call(this.config.context.page.category,"name")&&Object.prototype.hasOwnProperty.call(this.config.context.page.category,"path")},t}();var b=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return b(e,t),e}(P),k=function(){function t(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n,this.checkoutController=this.getCheckoutModule()}return t.prototype.initEvent=function(){this.isValidCheckoutController()&&this.checkoutController.initEvent()},t.prototype.isValidCheckoutController=function(){return this.config.context.page.controller_name===this.config.context.tracking_module.checkout_module.controller},t.prototype.initDataEvent=function(e){this.isValidCheckoutController()&&t.isValidTrackingData(e)&&this.checkoutController.initDataEvent(e)},t.isValidTrackingData=function(t){return Object.prototype.hasOwnProperty.call(t,"detail_products_list")&&Object.prototype.hasOwnProperty.call(t,"order_products_list")&&Boolean(t.detail_products_list.length)&&Boolean(t.order_products_list.length)},t}(),S=function(){function t(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n,this.step=1,this.carrierSelected="",this.paymentSelected=""}return t.prototype.initCheckoutEvent=function(){this.setDefaultCheckoutValues(),document.addEventListener("click",this.delegateCheckoutEvent.bind(this),!0)},t.isValidMouseEvent=function(t){return 0===t.button&&t.isTrusted},t.isValidAgreement=function(){var t=document.querySelector("input[name=cgv]");return!(t instanceof HTMLInputElement)||t.checked},t.isCheckoutWithCarrier=function(t){return Boolean(document.querySelector(t))},t.prototype.sendTrackingCarrierOption=function(){this.trackingPlatform.checkoutOption("shipping",this.carrierSelected,this.step)},t.prototype.sendTrackingPaymentOption=function(){this.trackingPlatform.checkoutOption("payment",this.paymentSelected,this.step)},t.prototype.initDataEvent=function(t){this.trackingPlatform.checkoutProgress(t.detail_products_list,t.order_products_list,this.step)},t}();var O=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const C=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return O(e,t),e.prototype.initEvent=function(){this.setCurrentStep(),this.initCheckoutEvent()},e.prototype.setCurrentStep=function(){var t=document.querySelectorAll(".checkout-step"),e=Array.prototype.findIndex.call(t,(function(t){return t.classList.contains("js-current-step")}));this.step=-1!==e?e:1},e.prototype.setDefaultCheckoutValues=function(){this.getCarrierSelected()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)){var n=t.target;e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidCarrierEvent(n)?this.sendTrackingCarrierOption():e.isValidPaymentSelectionEvent(n)?this.getPaymentSelected():e.isValidPurchaseEvent(n)&&this.sendTrackingPaymentOption()}},e.isValidCarrierSelectionEvent=function(t){return t.matches("#checkout-delivery-step .delivery-options *")},e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector("[id^=delivery_option_]:checked");(e=(e=e?e.closest(".delivery-option"):null)?e.querySelector(".carrier-name"):null)&&(t=e.textContent||""),this.carrierSelected=t.trim()},e.isValidCarrierEvent=function(t){return Boolean(t.closest("#checkout-delivery-step button[type=submit]"))},e.isValidPaymentSelectionEvent=function(t){return t.matches("#checkout-payment-step .payment-options *")},e.prototype.getPaymentSelected=function(){var t="",e=document.querySelector("[id^=payment-option-]:checked");e&&Object.hasOwnProperty.call(e.dataset,"moduleName")&&(t=e.dataset.moduleName||""),this.paymentSelected=t.trim()},e.isValidPurchaseEvent=function(t){return Boolean(t.closest("#payment-confirmation button[type=submit]"))&&e.isValidAgreement()},e.isValidAgreement=function(){var t=document.querySelector("input[name^=conditions_to_approve]");return!(t instanceof HTMLInputElement)||t.checked},e.prototype.initDataEvent=function(e){0!==this.step&&t.prototype.initDataEvent.call(this,e)},e}(S);var L=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const T=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return L(e,t),e.prototype.setDefaultCheckoutValues=function(){this.getCarrierSelected(),this.getPaymentSelected()},e.isValidCarrierSelectionEvent=function(t){return t.matches("#pwc-delivery-options *")},e.prototype.getPaymentSelected=function(){this.paymentSelected="sveacheckout"},e.isValidPurchaseEvent=function(t){return t.matches("a *")},e.prototype.triggerPurchaseEvent=function(){this.sendTrackingCarrierOption(),this.sendTrackingPaymentOption()},e}(S);var j=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const V=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.cartViewEvent=new w(o.trackingPlatform,o.config,o.sessionStorage),o}return j(e,t),e.prototype.initEvent=function(){this.cartViewEvent.initEvent(),this.initCheckoutEvent()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)){var n=t.target;e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidPurchaseEvent(n)&&this.triggerPurchaseEvent()}},e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector(".selected[id^=delivery_option] .flex-grow-1.flex-shrink-1");return e instanceof HTMLElement&&e.firstElementChild instanceof HTMLElement&&(t=e.firstElementChild.innerText.trim().toLowerCase()),this.carrierSelected=t},e}(T);var x=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const D=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.setDefaultCheckoutValues=function(){this.getCarrierSelected(),this.getPaymentSelected()},e.isValidCarrierSelectionEvent=function(t){return t.matches("#klarnacarrier *")},e.prototype.getPaymentSelected=function(){this.paymentSelected="klarna"},e.prototype.triggerPurchaseEvent=function(){this.sendTrackingCarrierOption(),this.sendTrackingPaymentOption()},e.isValidPurchaseEvent=function(t){return t.matches("a *")},e}(S);var A=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const M=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.cartViewEvent=new w(o.trackingPlatform,o.config,o.sessionStorage),o}return A(e,t),e.prototype.initEvent=function(){this.cartViewEvent.initEvent(),this.initCheckoutEvent()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)){var n=t.target;e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidPurchaseEvent(n)&&this.triggerPurchaseEvent()}},e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector("#klarnacarrier .selected .kco-sel-list__item__title");e instanceof HTMLElement&&e.firstElementChild instanceof HTMLElement&&(t=e.firstElementChild.innerText.trim().toLowerCase()),this.carrierSelected=t},e}(D);var I=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const q=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return I(e,t),e.prototype.delegateCheckoutEvent=function(t){},e.prototype.setDefaultCheckoutValues=function(){this.getCarrierSelected(),this.getPaymentSelected()},e.prototype.getCarrierSelected=function(){this.carrierSelected="not detected"},e.prototype.getPaymentSelected=function(){this.paymentSelected="qliro"},e}(S);var H=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const N=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.cartViewEvent=new w(o.trackingPlatform,o.config,o.sessionStorage),o}return H(e,t),e.prototype.initEvent=function(){this.cartViewEvent.initEvent()},e}(q);var Q=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Q(e,t),e.prototype.setDefaultCheckoutValues=function(){setTimeout(this.getCheckoutLazyOptions.bind(this),1e3)},e.prototype.getCheckoutLazyOptions=function(){document.querySelector("#thecheckout-payment")?(this.getCarrierSelected(),this.getPaymentSelected()):setTimeout(this.getCheckoutLazyOptions.bind(this),1e3)},e}(S);var F=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const R=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.cartViewEvent=new w(o.trackingPlatform,o.config,o.sessionStorage),o}return F(e,t),e.prototype.initEvent=function(){this.cartViewEvent.initEvent(),this.initCheckoutEvent()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)){var n=t.target;n.matches("#tc-container *")&&(e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidPaymentSelectionEvent(n)?this.getPaymentSelected():e.isValidPurchaseEvent(n)&&this.triggerPurchaseEvent())}},e.isValidCarrierSelectionEvent=function(t){return t.matches("#thecheckout-shipping *")},e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector(".delivery-options input:checked");if(e instanceof HTMLInputElement){var n=e.closest(".delivery-option-row");if(n instanceof HTMLElement){var r=n.querySelector(".carrier-name");t=r instanceof HTMLElement?r.innerText:""}}this.carrierSelected=t.trim().toLowerCase()},e.isValidPaymentSelectionEvent=function(t){return t.matches("#thecheckout-payment *")},e.prototype.getPaymentSelected=function(){var t="",e=document.querySelector(".payment-options input:checked");e instanceof HTMLInputElement&&(t=e.dataset.moduleName||""),this.paymentSelected=t.trim().toLowerCase()},e.isValidPurchaseEvent=function(t){return Boolean(t.closest("#confirm_order"))&&e.isValidAgreement()},e.isValidAgreement=function(){var t=document.querySelector("input[name^=conditions_to_approve]");return!(t instanceof HTMLInputElement)||t.checked},e.prototype.triggerPurchaseEvent=function(){e.isCheckoutWithCarrier("body:not(.is-virtual-cart) #thecheckout-shipping")&&this.sendTrackingCarrierOption(),this.sendTrackingPaymentOption()},e}(B);var z=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n
14?Object.create(n):(r.prototype=n.prototype,new r)}}();const U=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.checkoutCarrierNodeSelector="#onepagecheckoutps_contenedor #js-delivery, #opc_main #form-shipping_container",e}return z(e,t),e.isCartViewEvent=function(){return Boolean(document.querySelector("#cart_summary"))},e.prototype.setDefaultCheckoutValues=function(){setTimeout(this.getCheckoutLazyOptions.bind(this),1e3)},e.prototype.getCheckoutLazyOptions=function(){document.querySelector("#payment_method_container")?(this.getCarrierSelected(),this.getPaymentSelected()):setTimeout(this.getCheckoutLazyOptions.bind(this),1e3)},e.isValidCarrierSelectionEvent=function(t){return t.matches("#js-delivery *, #form-shipping_container .delivery-options *")},e.isValidPaymentSelectionEvent=function(t){return t.matches("#payment_method_container *")},e.isValidPurchaseEvent=function(t){return Boolean(t.closest("#btn_place_order, #btn-placer_order"))&&S.isValidAgreement()},e}(S);var J=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const G=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.cartViewEvent=new w(o.trackingPlatform,o.config,o.sessionStorage),o}return J(e,t),e.prototype.initEvent=function(){e.isCartViewEvent()?this.cartViewEvent.initEvent():this.initCheckoutEvent()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)){var n=t.target;n.matches("#onepagecheckoutps_contenedor *, #opc_main *")&&(e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidPaymentSelectionEvent(n)?this.getPaymentSelected():e.isValidPurchaseEvent(n)&&this.triggerPurchaseEvent())}},e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector("[name^=delivery_option]:checked");if(e instanceof HTMLInputElement){var n=e.closest(".delivery-option");if(n instanceof HTMLElement){var r=n.querySelector(".delivery_option_title");t=r instanceof HTMLElement&&r.textContent?r.textContent:""}}this.carrierSelected=t.trim().toLowerCase()},e.prototype.getPaymentSelected=function(){var t="",e=document.querySelector("[name=payment-option]:checked");e instanceof HTMLInputElement&&(t=e.value.trim().toLowerCase()),this.paymentSelected=t},e.isValidAgreement=function(){var t=document.querySelector("input[name^=conditions_to_approve]");return!(t instanceof HTMLInputElement)||t.checked},e.prototype.triggerPurchaseEvent=function(){e.isCheckoutWithCarrier(this.checkoutCarrierNodeSelector)&&this.sendTrackingCarrierOption(),this.sendTrackingPaymentOption()},e.prototype.initDataEvent=function(n){e.isCartViewEvent()?this.cartViewEvent.initDataEvent(n):t.prototype.initDataEvent.call(this,n)},e}(U);var K=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const W=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return K(e,t),e.prototype.setDefaultCheckoutValues=function(){setTimeout(this.getCheckoutLazyOptions.bind(this),1e3)},e.prototype.getCheckoutLazyOptions=function(){document.querySelector("#st-checkout-payment-step")?(this.getCarrierSelected(),this.getPaymentSelected()):setTimeout(this.getCheckoutLazyOptions.bind(this),1e3)},e}(S);var Y=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const X=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.cartViewEvent=new w(o.trackingPlatform,o.config,o.sessionStorage),o}return Y(e,t),e.prototype.initEvent=function(){this.cartViewEvent.initEvent(),this.initCheckoutEvent()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)){var n=t.target;n.matches("#content.steco_container *")&&(e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidPaymentSelectionEvent(n)?this.getPaymentSelected():e.isValidPurchaseEvent(n)&&this.triggerPurchaseEvent())}},e.isValidCarrierSelectionEvent=function(t){return t.matches("#st-checkout-delivery-step *")},e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector(".delivery-options input:checked");if(e instanceof HTMLInputElement){var n=e.closest(".delivery-option");if(n instanceof HTMLElement){var r=n.querySelector(".carrier-name");t=r instanceof HTMLElement?r.innerText:""}}this.carrierSelected=t.trim().toLowerCase()},e.isValidPaymentSelectionEvent=function(t){return t.matches("#st-checkout-payment-step *")},e.prototype.getPaymentSelected=function(){var t="",e=document.querySelector(".payment-options input:checked");e instanceof HTMLInputElement&&(t=e.dataset.moduleName||""),this.paymentSelected=t.trim().toLowerCase()},e.isValidPurchaseEvent=function(t){return Boolean(t.closest("#payment-confirmation"))&&e.isValidAgreement()},e.isValidAgreement=function(){var t=document.querySelector("input[name^=conditions_to_approve]");return!(t instanceof HTMLInputElement)||t.checked},e.prototype.triggerPurchaseEvent=function(){e.isCheckoutWithCarrier("#st-checkout-delivery-step")&&this.sendTrackingCarrierOption(),this.sendTrackingPaymentOption()},e}(W);var Z=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const $=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Z(e,t),e.prototype.setDefaultCheckoutValues=function(){setTimeout(this.getCheckoutLazyOptions.bind(this),1e3)},e.prototype.getCheckoutLazyOptions=function(){document.querySelector("#supercheckout-fieldset")?(this.getCarrierSelected(),this.getPaymentSelected()):setTimeout(this.getCheckoutLazyOptions.bind(this),1e3)},e}(S);var tt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const et=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.cartViewEvent=new w(o.trackingPlatform,o.config,o.sessionStorage),o}return tt(e,t),e.prototype.initEvent=function(){this.cartViewEvent.initEvent(),this.initCheckoutEvent()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)){var n=t.target;n.matches("#supercheckout-fieldset *")&&(e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidPaymentSelectionEvent(n)?this.getPaymentSelected():e.isValidPurchaseEvent(n)&&this.triggerPurchaseEvent())}},e.isValidCarrierSelectionEvent=function(t){return t.matches("#shipping-method *")},e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector("input.supercheckout_shipping_option:checked");if(e instanceof HTMLInputElement){var n=e.closest("li");if(n instanceof HTMLElement){var r=n.querySelector("img")||n.querySelector("label");r instanceof HTMLImageElement?t=r.alt:r instanceof HTMLLabelElement&&r.firstChild instanceof Text&&r.firstChild.textContent&&(t=r.firstChild.textContent)}}this.carrierSelected=t.trim().toLowerCase()},e.isValidPaymentSelectionEvent=function(t){return t.matches("#payment-method *")},e.prototype.getPaymentSelected=function(){var t="",e=document.querySelector(".payment-options input:checked");e instanceof HTMLInputElement&&(t=e.dataset.moduleName||""),this.paymentSelected=t.trim().toLowerCase()},e.isValidPurchaseEvent=function(t){return Boolean(t.closest("#supercheckout_confirm_order"))&&e.isValidAgreement()},e.isValidAgreement=function(){var t=document.querySelector("input[name^=conditions_to_approve]");return!(t instanceof HTMLInputElement)||t.checked},e.prototype.triggerPurchaseEvent=function(){e.isCheckoutWithCarrier("input.supercheckout_shipping_option")&&this.sendTrackingCarrierOption(),this.sendTrackingPaymentOption()},e}($),nt=function(){function t(){}return t.getCheckoutController=function(t,e,n){var r;switch(e.context.tracking_module.checkout_module.module){case"klarna
14official":r=new M(t,e,n);break;case"onepagecheckoutps":r=new G(t,e,n);break;case"pw_qlirocheckout":r=new N(t,e,n);break;case"steasycheckout":r=new X(t,e,n);break;case"supercheckout":r=new et(t,e,n);break;case"sveacheckout":r=new V(t,e,n);break;case"thecheckout":r=new R(t,e,n);break;default:r=new C(t,e,n)}return r},t}();var rt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ot=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rt(e,t),e.prototype.getCheckoutModule=function(){return nt.getCheckoutController(this.trackingPlatform,this.config,this.sessionStorage)},e}(k),it=function(){function t(t,e){this.trackingPlatform=t,this.config=e}return t.prototype.initEvent=function(){this.triggerEvent()},t.prototype.triggerEvent=function(){this.config.context.user&&this.config.context.user.is_new_login&&this.trackingPlatform.customerLogin()},t}();var at=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ct=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return at(e,t),e}(it),st=function(){function t(t,e){this.trackingPlatform=t,this.config=e}return t.prototype.initEvent=function(){this.triggerEvent()},t.prototype.triggerEvent=function(){this.config.context.user&&this.config.context.user.is_new_account&&this.trackingPlatform.customerSignUp()},t}();var ut=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ut(e,t),e}(st),lt=function(){function t(t,e){this.trackingPlatform=t,this.config=e}return t.prototype.initEvent=function(){"index"===this.config.context.page.controller_name&&this.triggerEvent()},t.prototype.triggerEvent=function(){this.trackingPlatform.homePageView()},t}();var ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ft(e,t),e}(lt),dt=function(){function t(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n}return t.prototype.initDataEvent=function(e){t.isValidTrackingData(e)&&(this.trackingPlatform.isAvailable()?(this.trackingPlatform.orderComplete(e.order_complete_data,e.detail_products_list,e.order_products_list,e.order_context_user_data),this.setOrderTrackingStatus(e.order_complete_data)):this.handleAdBlockOrderAborted(e.order_complete_data))},t.isValidTrackingData=function(t){return Object.prototype.hasOwnProperty.call(t,"order_complete_data")&&Object.prototype.hasOwnProperty.call(t,"detail_products_list")&&Object.prototype.hasOwnProperty.call(t,"order_products_list")&&Object.prototype.hasOwnProperty.call(t,"order_context_user_data")&&Boolean(Object.keys(t.order_complete_data).length)&&Boolean(Object.keys(t.detail_products_list).length)&&Boolean(Object.keys(t.order_products_list).length)&&Boolean(Object.keys(t.order_context_user_data).length)},t.prototype.setOrderTrackingStatus=function(t){this.serverRequest
14("setOrderTrackingStatus",t)},t.prototype.handleAdBlockOrderAborted=function(t){this.serverRequest("handleAdBlockOrderAborted",t)},t.prototype.serverRequest=function(t,e){var n={url:this.config.context.shop.base_dir+"index.php",fc:"module",module:this.config.context.tracking_module.module_name,controller:"datarequest",action:t,data:e,token:this.config.context.tracking_module.token};new s(n).fetchRequest()},t}();var yt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return yt(e,t),e}(dt);const vt=function(){function t(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n}return t.prototype.initEvent=function(){document.addEventListener("click",this.handleEvent.bind(this),!0)},t.prototype.triggerEvent=function(t){return e=this,n=void 0,o=function(){var e,n;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(r){switch(r.label){case 0:return t.length?[4,f.getProductsDetailList(t,this.config,this.sessionStorage)]:[3,2];case 1:(e=r.sent()).length&&(n=this.sessionStorage.getAttributionDataList(),this.trackingPlatform.productClick(e[0],n)),r.label=2;case 2:return[2]}}
14))},new((r=void 0)||(r=Promise))((function(t,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function c(t){try{s(o.throw(t))}catch(t){i(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(a,c)}s((o=o.apply(e,n||[])).next())}));var e,n,r,o},t}();var mt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const _t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return mt(e,t),e.prototype.handleEvent=function(t){if(0===t.button&&t.target instanceof Element){var n=e.getProductThemeDataList(t.target);this.triggerEvent(n)}},e.getProductThemeDataList=function(t){var e=[];if(t.closest(".js-product-miniature a")){var n=t.closest(".js-product-miniature");
14if(n instanceof HTMLElement){var r=parseInt(n.dataset.idProduct||"0"),o=parseInt(n.dataset.idProductAttribute||"0");r&&e.push({idProduct:r,idProductAttribute:o})}}return e},e}(vt);const wt=function(){function t(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n}return t.prototype.initEvent=function(){document.addEventListener("click",this.handleEvent.bind(this),!1)},t.prototype.triggerEvent=function(t,e){return n=this,r=void 0,i=function(){var n;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(r){switch(r.label){case 0:return t.length&&e?[4,f.getProductsDetailList(t,this.config,this.sessionStorage)]:[3,2];case 1:(n=r.sent()).length&&this.trackingPlatform.productShare(n[0],e),r.label=2;case 2:return[2]}}
14))},new((o=void 0)||(o=Promise))((function(t,e){function a(t){try{s(i.next(t))}catch(t){e(t)}}function c(t){try{s(i.throw(t))}catch(t){e(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof o?n:new o((function(t){t(n)}))).then(a,c)}s((i=i.apply(n,r||[])).next())}));var n,r,o,i},t.getSocialNetwork=function(t){return t.dataset.network||t.dataset.type||t.title||""},t}();var Pt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const bt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.productView={idProduct:0,idProductAttribute:0},e.productQuickView={idProduct:0,idProductAttribute:0},e}return Pt(e,t),e.prototype.initEvent=function(){t.prototype.initEvent.call(this),prestashop.on("clickQuickView",this.handlePSEvent.bind(this)),prestashop.on("updatedProduct",this.handlePSEvent.bind(this))},e.prototype.handlePSEvent=function(t){e.isEventQuickView(t)?(this.productQuickView.idProduct=t.dataset.idProduct,this.productQuickView.idProductAttribute=t.dataset.idProductAttribute):this.productView.idProductAttribute=parseInt(t.id_product_attribute)},e.isEventQuickView=function(t){return Object.prototype.hasOwnProperty.call(t,"dataset")},e.prototype.handleEvent=function(t){if(0===t.button&&t.target instanceof Element){var n=t.target.closest(".js-social-sharing");if(n instanceof HTMLElement){var r=this.getProductsDataList(n),o=e.getSocialNetwork(n);this.triggerEvent(r,o)}}},e.prototype.getProductsDataList=function(t){var e=[],n=t.closest("[id^=quickview-modal-]")instanceof HTMLElement?this.productQuickView:this.productView;return n.idProduct&&e.push(n),e},e.prototype.initDataEvent=function(t){"product"===this.config.context.page.controller_name&&Object.prototype.hasOwnProperty.call(t,"detail_product_view")&&t.detail_product_view.length&&(this.productView.idProduct=t.detail_product_view[0].id_product,this.productView.idProductAttribute=t.detail_product_view[0].id_attribute)},e}(wt),Et=function(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n};var kt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const St=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.latestProductView="",e.productView={idProduct:0,idProductAttribute:0},e.productQuickView={idProduct:0,idProductAttribute:0},e}return kt(e,t),e.prototype.initEvent=function(){prestashop.on("clickQuickView",this.triggerEvent.bind(this)),prestashop.on("updatedProduct",this.triggerEvent.bind(this))},e.prototype.triggerEvent=function(t){return e=this,n=void 0,o=function(){var e,n;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(r){switch(r.label){case 0:return(e=this.getProductsDataList(t)).length?[4,f.getProductsDetail
14List(e,this.config,this.sessionStorage)]:[3,2];case 1:(n=r.sent()).length&&this.trackingPlatform.productView(n[0]),r.label=2;case 2:return[2]}}))},new((r=void 0)||(r=Promise))((function(t,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function c(t){try{s(o.throw(t))}catch(t){i(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(a,c)}s((o=o.apply(e,n||[])).next())}));var e,n,r,o},e.prototype.getProductsDataList=function(t){var n=[];if(e.isEventQuickView(t))this.productQuickView.idProduct=t.dataset.idProduct,this.productQuickView.idProductAttribute=t.dataset.idProductAttribute,n.push(this.productQuickView);else{var r=e.isQuickViewModal()?this.productQuickView:this.productView;r.idProductAttribute=parseInt(t.id_product_attribute),this.isLatestProductView(r)&&(n.push(r),this.setLatestProductView(r))}return n},e.isEventQuickView=function(t){return Object.prototype.hasOwnProperty.call(t,"dataset")},e.isQuickViewModal=function(){return Boolean(document.querySelector("[id^=quickview]"))},e.prototype.isLatestProductView=function(t){return this.latestProductView!==JSON.stringify(t)},e.prototype.setLatestProductView=function(t){this.latestProductView=JSON.stringify(t)},e.prototype.initDataEvent=function(t){if(Object.prototype.hasOwnProperty.call(t,"detail_product_view")&&t.detail_product_view.length){this.sessionStorage.addProductsList(t.detail_product_view);var e=t.detail_product_view[0];this.productView.idProduct=e.id_product,this.productView.idProductAttribute=e.id_attribute,this.trackingPlatform.productView(e),this.setLatestProductView(this.productView)}},e}(Et),Ot=function(){function t(){this.promoData={promoURL:"",promoParams:{pid:"",pnm:"",pps:"",cnm:"",csl:""}}}return t.getPromotionData=function(e){var n=e.href,r=new t,o=r.getPromotionParams(e.search);return t.isPromoParams(o)&&(r.setPromoURL(n),r.setPromoParams(o)),r.promoData},t.prototype.getPromotionParams=function(e){var n={};if(e){var r=new URLSearchParams(e);t.hasRequiredPromotionParams(r)&&Object.keys(this.promoData.promoParams).forEach((function(t){var e=r.get(t);e&&(n[t]=e)}))}return n},t.hasRequiredPromotionParams=function(t){return Boolean(t.get("pid"))},t.isPromoParams=function(t){return Boolean(Object.keys(t).length)},t.prototype.setPromoURL=function(t){this.promoData.promoURL=t},t.prototype.setPromoParams=function(t){this.promoData.promoParams=t},t}(),Ct=function(){function t(t){this.trackingPlatform=t}return t.prototype.initEvent=function(){document.addEventListener("click",this.triggerEvent.bind(this),!0)},t.prototype.triggerEvent=function(t){var e=this.getPromotionData(t);e&&this.trackingPlatform.promotionClick([e])},t.prototype.getPromotionData=function(t){var e=null;if(0===t.button&&t.target instanceof Element){var n=t.target.closest(".js-track-promo a");e=n?Ot.getPromotionData(n):null}return e},t}();var Lt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Lt(e,t),e}(Ct),jt=function(){function t(t,e){this.trackingPlatform=t,this.config=e}return t.prototype.initEvent=function(){var t;(null===(t=this.config.context.page.search_term)||void 0===t?void 0:t.length)&&this.trackingPlatform.searchPageView()},t}();var Vt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Vt(e,t),e}(jt),Dt=function(){function t(t,e,n){this.trackingPlatform=t,this.config=e,this.sessionStorage=n,this.scrollTimeout=0,this.allItemsList=this.getAllItemsList()}return t.prototype.initEvent=function(){window.addEventListener("scroll",this.triggerEvent.bind(this),!0),this.parseItemsList(),this.sendItems()},t.prototype.triggerEvent=function(){var t=this;window.clearTimeout(this.scrollTimeout),this.parseItemsList(),this.scrollTimeout=window.setTimeout((function(){return t.sendItems()}),800)},t.prototype.parseItemsList=function(){this.allItemsList.length&&this.allItemsList.forEach((function(e){var n=e.getItemsListDetected();
14n.length&&n.forEach((function(n){t.isElementInViewport(n)&&e.addItem(n)}))}))},t.isElementInViewport=function(t){var e,n,r,o,i=!1,a=window.innerHeight,c=window.pageYOffset,s=c,u=c+a,p=t.clientHeight;return p&&(r=getComputedStyle(t),o=parseInt(r.paddingTop)+parseInt(r.paddingBottom),n=(e=t.getBoundingClientRect().top+c)+(p-o),i=e>=s&&e<u||n>=s&&n<u),i},t.prototype.sendItems=function(){this.allItemsList.forEach((function(t){t.sendItems()})),window.clearTimeout(this.scrollTimeout)},t}();var At=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};const Mt=function(){function t(t,e,n,r){this.itemSelector=t,this.trackingPlatform=e,this.config=n,this.sessionStorage=r,this.sendProducts=new Set,this.sentProducts=new Set,this.productsPosition={}}return t.prototype.getItemsListDetected=function(){return document.querySelectorAll(this.itemSelector)},t.prototype.addItem=function(t){var e=parseInt(t.getAttribute("data-id-product"))||0,n=parseInt(t.getAttribute("data-id-product-attribute"))||0;if(e){var r={idProduct:e,idProductAttribute:n},o=JSON.stringify(r);this.sentProducts.has(o)||this.sendProducts.has(o)||this.sendProducts.add(o)}},t.prototype.sendItems=function(){return t=this,e=void 0,r=function(){var t,e;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(n){switch(n.label){case 0:return this.sendProducts.size?(this.buildProductPositions(),t=this.getProductsDataListFromSendProducts(),[4,f.getProductsDetailList(t,this.config,this.sessionStorage)]):[3,2];case 1:(e=n.sent()).length&&(this.trackingPlatform.productsList(e,this.productsPosition),this.sentProducts=new Set(At(At([],Array.from(this.sentProducts),!0),Array.from(this.sendProducts),!0)),this.sendProducts.clear()),n.label=2;case 2:return[2]}}
14))},new((n=void 0)||(n=Promise))((function(o,i){function a(t){try{s(r.next(t))}catch(t){i(t)}}function c(t){try{s(r.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((r=r.apply(t,e||[])).next())}));var t,e,n,r},t.prototype.getProductsDataListFromSendProducts=function(){var t=[];return this.sendProducts.forEach((function(e){t.push(JSON.parse(e))})),t},t.prototype.buildProductPositions=function(){var t,e,n=this,r=this.getItemsListDetected(),o=this.getPageFirstPosition();r.forEach((function(r){if(t=parseInt(r.getAttribute("data-id-product"))||0,e=parseInt(r.getAttribute("data-id-product-attribute"))||0,t){var i={idProduct:t,idProductAttribute:e},a=JSON.stringify(i);Object.prototype.hasOwnProperty.call(n.productsPosition,a)||(n.productsPosition[a]=o,o+=1),n.sessionStorage.addAttributionData(a,n.productsPosition[a])}}))},t}();var It=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const qt=function(t){function e(e,n,r){return t.call(this,".js-product-miniature",e,n,r)||this}return It(e,t),e.prototype.getPageFirstPosition=function(){var t=1,e=this.config.context.page.products_per_page,n=new URLSearchParams(window.location.search).get("page");return n&&(t=parseInt(n)),e*t-e+1},e}(Mt);var Ht=function(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))};const Nt=function(){function t(t){this.trackingPlatform=t,this.itemSelector=".js-track-promo",this.sendPromotions=new Set,this.sentPromotions=new Set}return t.prototype.getItemsListDetected=function(){return document.querySelectorAll(this.itemSelector)},t.prototype.addItem=function(t){var e=t.querySelector("a");if(e){var n=Ot.getPromotionData(e);if(n.promoParams.pid){var r=JSON.stringify(n);this.sendPromotions.has(r)||this.sentPromotions.has(r)||this.sendPromotions.add(r)}}},t.prototype.sendItems=function(){if(this.sendPromotions.size){var t=[];this.sendPromotions.forEach((function(e){t.push(JSON.parse(e))})),this.trackingPlatform.promotionsList(t),this.sentPromotions=new Set(Ht(Ht([],Array.from(this.sentPromotions),!0),Array.from(this.sendPromotions),!0)),this.sendPromotions.clear()}},t}();var Qt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Qt(e,t),e}(Nt);var Ft=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ft(e,t),e.prototype.getAllItemsList=function(){return[new qt(this.trackingPlatform,this.config,this.sessionStorage),new Bt(this.trackingPlatform)]},e}(Dt);var zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return zt(e,t),e.prototype.createAddToCartEvent=function(){this.actionTrackingEvents.push(new y(this.trackingPlatform,this.config,this.sessionStorage))},e.prototype.createCartViewEvent=function(){if("cart"===this.config.context.page.controller_name){var t=new w(this.trackingPlatform,this.config,this.sessionStorage);this.actionTrackingEvents.push(t),this.dataTrackingEvents.push(t)}},e.prototype.createCategoryEvent=function(){"category"===this.config.context.page.controller_name&&this.actionTrackingEvents.push(new E(this.trackingPlatform,this.config))},e.prototype.createCheckoutEvent=function(){if(this.config.context.page.controller_name===this.config.context.tracking_module.checkout_module.controller){var t=new ot(this.trackingPlatform,this.config,this.sessionStorage);this.actionTrackingEvents.push(t),this.dataTrackingEvents.push(t)}},e.prototype.createCustomerLogin=function(){this.config.context.user.is_new_login&&this.actionTrackingEvents.push(new ct(this.trackingPlatform,this.config))},e.prototype.createCustomerSignUp=function(){this.config.context.user.is_new_account&&this.actionTrackingEvents.push(new pt(this.trackingPlatform,this.config))},e.prototype.createHomeEvent=function(){this.actionTrackingEvents.push(new ht(this.trackingPlatform,this.config))},e.prototype.createOrderCompleteEvent=function(){this.dataTrackingEvents.push(new gt(this.trackingPlatform,this.config,this.sessionStorage))},e.prototype.createProductClickEvent=function(){this.actionTrackingEvents.push(new _t(this.trackingPlatform,this.config,this.sessionStorage))},e.prototype.createProductShareEvent=function(){var t=new bt(this.trackingPlatform,this.config,this.sessionStorage);this.actionTrackingEvents.push(t),"product"===this.config.context.page.controller_name&&this.dataTrackingEvents.push(t)},e.prototype.createProductViewEvent=function(){var t=new St(this.trackingPlatform,this.config,this.sessionStorage);this.actionTrackingEvents.push(t),"product"===this.config.context.page.controller_name&&this.dataTrackingEvents.push(t)},e.prototype.createPromotionClickEvent=function(){this.actionTrackingEvents.push(new Tt(this.trackingPlatform))},e.prototype.createSearchEvent=function(){new RegExp("search").test(this.config.context.page.controller_name)&&this.actionTrackingEvents.push(new xt(this.trackingPlatform,this.config))},e.prototype.createViewItemsListEvent=function(){this.actionTrackingEvents.push(new Rt(this.trackingPlatform,this.config,this.sessionStorage))},e}(a);var Jt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Jt(e,t),e.prototype.initEvent=function(){document.addEventListener("click",this.removeFromCart.bind(this),!0),document.addEventListener("click",this.addToCartProductList.bind(this),!0),"product"===this.config.context.page.controller_name&&document.addEventListener("click",this.addToCartProductView.bind(this),!0)},e.prototype.removeFromCart=function(t){if(0===t.button&&t.target instanceof Element){var n=t.target.closest(".ajax_cart_block_remove_link");if(n instanceof HTMLAnchorElement){var r="cart_block_product_",o=n.closest("[data-id^=".concat(r,"]"));if(o instanceof HTMLElement){var i=e.getProductDataCartBlock(o,r),a=e.getQuantityCartBlock(o);this.triggerEvent(i,a,this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))}}}},e.getProductDataCartBlock=function(t,e){var n=[];if(t.dataset.id&&t.dataset.id.length){var r=t.dataset.id.replace(e,"").split("_");r.length&&n.push({idProduct:parseInt(r[0]),idProductAttribute:parseInt(r[1]||"0")})}return n},e.getQuantityCartBlock=function(t){var e=0,n=t.querySelector(".quantity");return n instanceof HTMLElement&&(e=parseInt(n.innerText.trim())),e},e.prototype.addToCartProductList=function(t){if(0===t.button&&t.target instanceof Element){var n=t.target.closest(".ajax_add_to_cart_button");if(n instanceof HTMLElement){var r=e.getProductDataProductList(n),o=e.getQuantityProductList(n);this.triggerEvent(r,o,this.trackingPlatform.addToCart.bind(this.trackingPlatform))}}},e.getProductDataProductList=function(t){var e=[];
14if(t.dataset.idProduct&&t.dataset.idProductAttribute){var n=parseInt(t.dataset.idProduct.trim()),r=parseInt(t.dataset.idProductAttribute.trim()||"0");n&&e.push({idProduct:n,idProductAttribute:r})}return e},e.getQuantityProductList=function(t){var e=1;return t.dataset.minimal_quantity&&(e=parseInt(t.dataset.minimal_quantity.trim())),e},e.prototype.addToCartProductView=function(t){if(0===t.button&&t.target instanceof Element){var n=t.target.closest("#add_to_cart");if(n instanceof HTMLElement){var r=n.closest("form");if(r instanceof HTMLFormElement){var o=e.getProductDataProductView(r),i=e.getQuantityProductView(r);this.triggerEvent(o,i,this.trackingPlatform.addToCart.bind(this.trackingPlatform))}}}},e.getProductDataProductView=function(t){var e=[],n=t.querySelector("[name=id_product]"),r=t.querySelector("[name=id_product_attribute]");return n&&r&&e.push({idProduct:parseInt(n.value),idProductAttribute:parseInt(r.value||"0")}),e},e.getQuantityProductView=function(t){var e=0,n=t.querySelector("[name=qty]");return n instanceof HTMLInputElement&&(e=parseInt(n.value)),e},e.prototype.triggerEvent=function(t,e,n){return r=this,o=void 0,a=function(){var r;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(o){switch(o.label){case 0:return t.length?[4,f.getProductsDetailList(t,this.config,this.sessionStorage)]:[3,2];case 1:(r=o.sent()).length&&e&&n(r[0],e),o.label=2;case 2:return[2]}}
14))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{s(a.next(t))}catch(t){e(t)}}function c(t){try{s(a.throw(t))}catch(t){e(t)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(t){t(r)}))).then(n,c)}s((a=a.apply(r,o||[])).next())}));var r,o,i,a},e}(c);var Kt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Wt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Kt(e,t),e.prototype.initEvent=function(){"category"===this.config.context.page.controller_name&&t.prototype.initEvent.call(this)},e}(P);var Yt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Xt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Yt(e,t),e.prototype.initEvent=function(){document.addEventListener("click",this.handleEvent.bind(this),!0)},e.prototype.handleEvent=function(t){0===t.button&&t.target instanceof HTMLElement&&(t.target.closest(".cart_quantity_up")?this.increaseQuantity(t.target):t.target.closest(".cart_quantity_down")?this.decreaseQuantity(t.target):t.target.closest(".cart_quantity_delete")&&this.removeFromCart(t.target))},e.prototype.increaseQuantity=function(t){var n=e.getProductData(t);this.triggerEvent(n,1,this.trackingPlatform.addToCart.bind(this.trackingPlatform))},e.prototype.decreaseQuantity=function(t){var n=e.getProductData(t);this.triggerEvent(n,1,this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))},e.prototype.removeFromCart=function(t){var n=e.getProductData(t),r=e.getProductQuantity(t);this.triggerEvent(n,r,this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))},e.getProductData=function(t){var e=[],n="product_",r=t.closest("[id^=".concat(n,"]"));if(r instanceof HTMLElement){var o=r.id.replace(n,"").split("_");if(o.length){var i=parseInt(o[0]||"0"),a=parseInt(o[1]||"0");i&&e.push({idProduct:i,idProductAttribute:a})}}return e},e.getProductQuantity=function(t){var e=0,n=t.closest("[id^=".concat("product_","]"));if(n instanceof HTMLElement){var r=n.id.replace("product","quantity"),o=n.querySelector("[name^=".concat(r,"]"));o instanceof HTMLInputElement&&(e=parseInt(o.value||"0"))}return e},e.prototype.triggerEvent=function(t,e,n){return r=this,o=void 0,a=function(){var r;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(o){switch(o.label){case 0:return t.length?[4,f.getProductsDetail
14List(t,this.config,this.sessionStorage)]:[3,2];case 1:(r=o.sent()).length&&e&&n(r[0],e),o.label=2;case 2:return[2]}}))},new((i=void 0)||(i=Promise))((function(t,e){function n(t){try{s(a.next(t))}catch(t){e(t)}}function c(t){try{s(a.throw(t))}catch(t){e(t)}}function s(e){var r;e.done?t(e.value):(r=e.value,r instanceof i?r:new i((function(t){t(r)}))).then(n,c)}s((a=a.apply(r,o||[])).next())}));var r,o,i,a},e}(g);var Zt=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const $t=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.cartViewEvent=new Xt(o.trackingPlatform,o.config,o.sessionStorage),o}return Zt(e,t),e.prototype.initEvent=function(){e.isCartViewEvent()?this.cartViewEvent.initEvent():this.initCheckoutEvent()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)){var n=t.target;n.matches("#onepagecheckoutps_contenedor *")&&(e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidPaymentSelectionEvent(n)?this.getPaymentSelected():e.isValidPurchaseEvent(n)&&this.triggerPurchaseEvent())}},e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector("[name^=delivery_option]:checked");if(e instanceof HTMLInputElement){var n=e.closest(".delivery_option");if(n instanceof HTMLElement){var r=n.querySelector(".delivery_option_title");t=r instanceof HTMLElement&&r.textContent?r.textContent:""}}this.carrierSelected=t.trim().toLowerCase()},e.prototype.getPaymentSelected=function(){var t="",e=document.querySelector("[name^=method_payment]:checked");e instanceof HTMLInputElement&&(t=e.value||""),this.paymentSelected=t.trim().toLowerCase()},e.prototype.triggerPurchaseEvent=function(){e.isCheckoutWithCarrier(this.checkoutCarrierNodeSelector)&&this.sendTrackingCarrierOption(),this.sendTrackingPaymentOption()},e.prototype.initDataEvent=function(n){e.isCartViewEvent()?this.cartViewEvent.initDataEvent(n):t.prototype.initDataEvent.call(this,n)},e}(U);var te=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ee=function(t){function e(e,n,r){var o=t.call(this,e,n,r)||this;return o.trackingPlatform=e,o.config=n,o.sessionStorage=r,o.paymentTarget=null,o.lastSelectedOptions={carrierSelected:"",paymentSelected:""},o.cartViewEvent=new Xt(o.trackingPlatform,o.config,o.sessionStorage),o}return te(e,t),e.prototype.getCarrierSelected=function(){var t="",e=document.querySelector(".delivery_options_address input:checked");if(e instanceof HTMLInputElement)if(e.dataset.carrier)t=e.dataset.carrier;else{var n=e.closest(".delivery_option");if(n instanceof HTMLElement){var r=n.querySelector("td > strong");t=r instanceof HTMLElement?r.innerText.trim():""}}this.carrierSelected=t},e.prototype.getPaymentSelected=function(){if(this.paymentTarget instanceof Element){var t=this.paymentTarget,n="not detected",r=t.closest("[data-module-name]")||t.closest("a[class]")||t.closest("a[href]")||t.closest("[title]");if(r instanceof Element){var o;(o=r.hasAttribute("data-module-name")&&r.getAttribute("data-module-name")?r.getAttribute("data-module-name"):r.hasAttribute("href")&&e.isValidURL(r.getAttribute("href")||"")?e.getModuleFromURL(new URL(r.getAttribute("href"))):r.getAttribute("class")||r.getAttribute("title")||"")&&(n=o)}this.paymentSelected=n}},e.isValidURL=function(t){var e;try{e="null"!==new URL(t).origin}catch(t){e=!1}return e},e.getModuleFromURL=function(t){var e=t.pathname.split("/"),n=e.indexOf("module")+1;return e[n]||""},e.isValidCarrierSelectionEvent=function(t){return t.matches("#carrier_area .delivery_options *")},e.isValidPurchaseEvent=function(t){return t.matches("#HOOK_PAYMENT *")&&!e.isInvalidTarget(t)&&e.isValidAgreement()},e.isInvalidTarget=function(t){return Boolean(["#ps_checkout-displayPayment .payment_module.open:not([data-module-name]) *","#ps_checkout-displayPayment .ps_checkout-payment-option.row"].find((function(e){return t.matches(e)})))},e}(S);var ne=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const re=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ne(e,t),e.prototype.initEvent=function(){this.setCurrentStep(),this.initStepEvent()},e.prototype.setCurrentStep=function(){var t=this;document.querySelectorAll("#order_step li").forEach((function(e,n){e.classList.contains("step_current")&&(t.step=n>1?n-1:0)}))},e.prototype.initStepEvent=function(){0===this.step?this.cartViewEvent.initEvent():this.step>=2&&this.initCheckoutEvent()},e.prototype.setDefaultCheckoutValues=function(){2===this.step&&this.getCarrierSelected()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)&&t.target instanceof Element){var n=t.target;e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidCarrierEvent(n)?this.sendTrackingCarrierOption():e.isValidPurchaseEvent(n)&&(this.paymentTarget=n,this.triggerPurchaseEvent())}},e.isValidCarrierEvent=function(t){return Boolean(t.closest("button[name^=processCarrier]"))&&e.isValidAgreement()&&!document.querySelector("#input_virtual_carrier")},e.prototype.triggerPurchaseEvent=function(){this.getPaymentSelected(),this.lastSelectedOptions.paymentSelected!==this.paymentSelected&&(this.sendTrackingPaymentOption(),this.lastSelectedOptions.paymentSelected=this.paymentSelected)},e.prototype.initDataEvent=function(e){0===this.step?this.cartViewEvent.initDataEvent(e):t.prototype.initDataEvent.call(this,e)},e}(ee);var oe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ie=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oe(e,t),e.prototype.initEvent=function(){this.cartViewEvent.initEvent(),this.initCheckoutEvent()},e.prototype.setDefaultCheckoutValues=function(){this.getCarrierSelected()},e.prototype.delegateCheckoutEvent=function(t){if(e.isValidMouseEvent(t)&&t.target instanceof Element){var n=t.target;e.isValidCarrierSelectionEvent(n)?this.getCarrierSelected():e.isValidPurchaseEvent(n)&&(this.paymentTarget=n,this.triggerPurchaseEvent())}},e.prototype.triggerPurchaseEvent=function(){e.isValidCheckoutWithCarrier()&&this.lastSelectedOptions.carrierSelected!==this.carrierSelected&&(this.sendTrackingCarrierOption(),this.lastSelectedOptions.carrierSelected=this.carrierSelected),this.getPaymentSelected(),this.lastSelectedOptions.paymentSelected!==this.paymentSelected&&(this.sendTrackingPaymentOption(),this.lastSelectedOptions.paymentSelected=this.paymentSelected)},e.isValidCheckoutWithCarrier=function(){return Boolean(document.querySelector("#carrier_area .delivery_options"))},e}(ee),ae=function(){function t(){}return t.getCheckoutController=function(t,e,n){return"onepagecheckoutps"===e.context.tracking_module.checkout_module.module?new $t(t,e,n):"order"===e.context.page.controller_name?new re(t,e,n):new ie(t,e,n)},t}();var ce=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const se=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ce(e,t),e.prototype.getCheckoutModule=function(){return ae.getCheckoutController(this.trackingPlatform,this.config,this.sessionStorage)},e}(k);var ue=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const pe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ue(e,t),e}(it);var le=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const fe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return le(e,t),e}(st);var he=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const de=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return he(e,t),e}(lt);var ye=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ge=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ye(e,t),e}(dt);var ve=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const me=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ve(e,t),e.prototype.handleEvent=function(t){if(0===t.button&&t.target instanceof Element){var n=e.getProductThemeDataList(t.target);this.triggerEvent(n)}},e.getProductThemeDataList=function(t){var e=".ajax_block_product",n=["a.product_img_link","a.quick-view-mobile","a.quick-view","a.product-name","a.button.lnk_view"].join(","),r=[];if(t.closest(e)&&t.closest(n)){var o=t.closest(e);
14if(o instanceof HTMLElement){var i=o.querySelector(".ajax_add_to_cart_button");if(o.dataset.idProduct&&o.dataset.idProductAttribute){var a=parseInt(o.dataset.idProduct||"0"),c=parseInt(o.dataset.idProductAttribute||"0");a&&r.push({idProduct:a,idProductAttribute:c})}else i instanceof HTMLElement&&i.dataset.idProduct&&i.dataset.idProductAttribute&&(a=parseInt(i.dataset.idProduct||"0"),c=parseInt(i.dataset.idProductAttribute||"0"),a&&r.push({idProduct:a,idProductAttribute:c}))}}return r},e}(vt);var _e=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const we=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return _e(e,t),e.prototype.handleEvent=function(t){if(0===t.button&&t.target instanceof Element){var n=t.target.closest(".js-social-sharing, .social-sharing");if(n instanceof HTMLElement){var r=e.getProductsDataList(n),o=e.getSocialNetwork(n);this.triggerEvent(r,o)}}},e.getProductsDataList=function(t){var e=[],n=t.closest("body");if(n instanceof HTMLElement){var r=n.querySelector("[name^=id_product]"),o=n.querySelector("[name^=id_product_attribute]");if(r instanceof HTMLInputElement&&o instanceof HTMLInputElement){var i=parseInt(r.value),a=parseInt(o.value||"0");Number.isInteger(i)&&Number.isInteger(a)&&e.push({idProduct:i,idProductAttribute:a})}}return e},e.prototype.initDataEvent=function(t){},e}(wt);var Pe=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const be=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.productBuyBlockSelector="#buy_block",e}return Pe(e,t),e.prototype.initEvent=function(){var t=document.querySelector("[name=id_product_attribute]");t instanceof HTMLInputElement&&new MutationObserver(this.handleMutation.bind(this)).observe(t,{attributes:!0,attributeOldValue:!0})},e.prototype.handleMutation=function(t){var e=this;t.forEach((function(t){if("attributes"===t.type&&t.target instanceof HTMLInputElement&&t.target.value!==t.oldValue){var n=t.target.closest(e.productBuyBlockSelector);n instanceof HTMLFormElement&&e.handleEventFromBuyBlockNode(n)}}))},e.prototype.handleEventFromBuyBlockNode=function(t){var n=e.getProductsDataList(t);this.triggerEvent(n)},e.getProductsDataList=function(t){var e=[],n=t.querySelector("[name^=id_product]"),r=t.querySelector("[name^=id_product_attribute]");if(n instanceof HTMLInputElement&&r instanceof HTMLInputElement){var o=parseInt(n.value||"0"),i=parseInt(r.value||"0");o>0&&e.push({idProduct:o,idProductAttribute:i})}return e},e.prototype.triggerEvent=function(t){return e=this,n=void 0,o=function(){var e;return function(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}(this,(function(n){switch(n.label){case 0:return t.length?[4,f.getProductsDetail
14List(t,this.config,this.sessionStorage)]:[3,2];case 1:(e=n.sent()).length&&this.trackingPlatform.productView(e[0]),n.label=2;case 2:return[2]}}))},new((r=void 0)||(r=Promise))((function(t,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function c(t){try{s(o.throw(t))}catch(t){i(t)}}function s(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(a,c)}s((o=o.apply(e,n||[])).next())}));var e,n,r,o},e.prototype.initDataEvent=function(t){if(Object.prototype.hasOwnProperty.call(t,"detail_product_view")&&t.detail_product_view.length){this.sessionStorage.addProductsList(t.detail_product_view);var e=document.querySelector(this.productBuyBlockSelector);e instanceof HTMLFormElement&&this.handleEventFromBuyBlockNode(e)}},e}(Et);var Ee=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ke=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ee(e,t),e}(Ct);var Se=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Oe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Se(e,t),e}(jt);var Ce=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Le=function(t){function e(e,n,r){return t.call(this,".ajax_block_product",e,n,r)||this}return Ce(e,t),e.prototype.getPageFirstPosition=function(){var t=1,e=this.config.context.page.products_per_page,n=new URLSearchParams(window.location.search).get("p");return n&&(t=parseInt(n)),e*t-e+1},e}(Mt);var Te=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Te(e,t),e}(Nt);var Ve=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const xe=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ve(e,t),e.prototype.getAllItemsList=function(){return[new Le(this.trackingPlatform,this.config,this.sessionStorage),new je(this.trackingPlatform)]},e}(Dt);var De=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const Ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return De(e,t),e.prototype.createAddToCartEvent=function(){this.actionTrackingEvents.push(new Gt(this.trackingPlatform,this.config,this.sessionStorage))},e.prototype.createCartViewEvent=function(){},e.prototype.createCategoryEvent=function(){this.actionTrackingEvents.push(new Wt(this.trackingPlatform,this.config))},e.prototype.createCheckoutEvent=function(){var t=new se(this.trackingPlatform,this.config,this.sessionStorage);this.actionTrackingEvents.push(t),this.dataTrackingEvents.push(t)},e.prototype.createCustomerLogin=function(){this.config.context.user.is_new_login&&this.actionTrackingEvents.push(new pe(this.trackingPlatform,this.config))},e.prototype.createCustomerSignUp=function(){this.config.context.user.is_new_account&&this.actionTrackingEvents.push(new fe(this.trackingPlatform,this.config))},e.prototype.createHomeEvent=function(){this.actionTrackingEvents.push(new de(this.trackingPlatform,this.config))},e.prototype.createOrderCompleteEvent=function(){this.dataTrackingEvents.push(new ge(this.trackingPlatform,this.config,this.sessionStorage))},e.prototype.createProductClickEvent=function(){this.actionTrackingEvents.push(new me(this.trackingPlatform,this.config,this.sessionStorage))},e.prototype.createProductShareEvent=function(){this.actionTrackingEvents.push(new we(this.trackingPlatform,this.config,this.sessionStorage))},e.prototype.createProductViewEvent=function(){var t=new be(this.trackingPlatform,this.config,this.sessionStorage);this.actionTrackingEvents.push(t),this.dataTrackingEvents.push(t)},e.prototype.createPromotionClickEvent=function(){this.actionTrackingEvents.push(new ke(this.trackingPlatform))},e.prototype.createSearchEvent=function(){new RegExp("search").test(this.config.context.page.controller_name)&&this.actionTrackingEvents.push(new Oe(this.trackingPlatform,this.config))},e.prototype.createViewItemsListEvent=function(){this.actionTrackingEvents.push(new xe(this.trackingPlatform,this.config,this.sessionStorage))},e}(a),Me=function(){function t(){}return t.getEventFactory=function(t,e,n){switch(e.context.tracking_module.service_version){case"16":return new Ae(t,e,n);case"17":return new Ut(t,e,n);default:throw Error("Unable to load event manager")}},t}(),Ie=function(){function t(){}return t.getProductPosition=function(e,n){var r=0,o=t.getProductThemeData(e),i=JSON.stringify(o);return Object.prototype.hasOwnProperty.call(n,i)&&(r=n[i]),r},t.getProductAttribution=function(e,n){var r=null,o=t.getProductThemeData(e),i=JSON.stringify(o);return Object.prototype.hasOwnProperty.call(n,i)&&(r=n[i]),r},t.getProductThemeData=function(t){return{idProduct:t.id_product,idProductAttribute:t.id_attribute}},t}();var qe=function(){return qe=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},qe.apply(this,arguments)};const He=function(){function t(t){this.config=t,this.layer={}}return t.prototype.decorate=function(){return{common_model:this.layer}},t.prototype.initConfig=function(){return this.layer={},this.decorate()},t.prototype.homePageView=function(){return this.layer={},this.decorate()},t.prototype.categoryPageView=function(){return this.layer={},this.decorate()},t.prototype.productsList=function(e,n){var r=[],o=this.config.context.page.controller_name;return e.forEach((function(e){var i=Ie.getProductPosition(e,n);r.push(t.getProductData(e,0,o,i))})),this.layer={items:r},this.decorate()},t.prototype.productClick=function(e,n){var r=0,o=this.config.context.page.controller_name,i=Ie.getProductAttribution(e,n),a=[];return i&&(r=i.productPosition,o=i.productList),a.push(t.getProductData(e,0,o,r)),this.layer={items:a},this.decorate()},t.prototype.productView=function(e){var n=[];return n.push(t.getProductData(e)),this.layer={items:n},this.decorate()},t.prototype.productShare=function(e,n){var r=[];return r.push(t.getProductData(e)),this.layer={items:r,parameters:{method:n}},this.decorate()},t.prototype.addToCart=function(e,n){var r=[];return r.push(t.getProductData(e,n)),this.layer={items:r},this.decorate()},t.prototype.removeFromCart=function(e,n){var r=[];return r.push(t.getProductData(e,n)),this.layer={items:r},this.decorate()},t.prototype.cartView=function(e,n){var r=t.getCartProducts(e,n);return this.layer={items:r},this.decorate()},t.prototype.checkoutProgress=function(e,n,r){var o=t.getCartProducts(e,n);return this.layer={items:o,checkout:{step:r}},this.decorate()},t.prototype.checkoutOption=function(t,e,n){return this.layer={checkout:{step:n,option_type:t,option_value:e}},this.decorate()},t.prototype.orderComplete=function(e,n,r){var o=t.getCartProducts(n,r),i=qe({},e);return this.layer={items:o,order:i},this.decorate()},t.prototype.promotionsList=function(e){var n=[];return e.forEach((function(e){var r=t.getPromotionData(e);r&&n.push(r)})),this.layer={items:n},this.decorate()},t.prototype.promotionClick=function(e){var n=[];return e.forEach((function(e){var r=t.getPromotionData(e);r&&n.push(r)})),this.layer={items:n},this.decorate()},t.prototype.searchPageView=function(){return this.layer={},this.decorate()},t.prototype.customerLogin=function(){return this.layer={},this.decorate()},t.prototype.customerSignUp=function(){return this.layer={},this.decorate()},t.getCartProducts=function(e,n){var r=[];return e.forEach((function(e){var o=n.find((function(t){return t.id_index===e.id_index}));o&&r.push(t.getProductData(e,o.quantity))})),r},t.getProductData=function(t,e,n,r){var o={attributes:t.attributes,category_path:t.category_path,condition:t.condition,ean:t.ean,id_attribute:t.id_attribute,id_category:t.id_category,id_index:t.id_index,id_manufacturer:t.id_manufacturer,id_product:t.id_product,is_available:t.is_available,isbn:t.isbn,manufacturer_name:t.manufacturer_name,name:t.name,mpn:t.mpn,price:t.price,price_old:t.price_old,price_old_tax_excl:t.price_old_tax_excl,price_tax_excl:t.price_tax_excl,reference:t.reference,upc:t.upc};return e&&(o.quantity=e),n&&(o.list_name=n),r&&(o.list_index=r),o},t.getPromotionData=function(t){var e={promotion_id:t.promoParams.pid};return Object.entries({promotion_id:"pid",promotion_name:"pnm",promotion_position:"pps",creative_name:"cnm",creative_slot:"csl"}
14).forEach((function(n){var r=n[0],o=n[1];e[r]=t.promoParams[o]})),e},t.prototype.resetLayer=function(){return this.layer={items:void 0,parameters:void 0},this.decorate()},t}();var Ne=function(){return Ne=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},Ne.apply(this,arguments)};const Qe=function(){function t(t,e){this.eventLayer=t,this.config=e,this.layer={}}return t.prototype.resetLayer=function(){return this.layer.event="reset_common_model",Ne(Ne({},this.layer),this.eventLayer.resetLayer())},t.prototype.initConfig=function(){return this.layer={config:this.getConfigData(),context:this.getContextData()},Ne(Ne({},this.layer),this.eventLayer.initConfig())},t.prototype.getConfigData=function(){return{bing:this.config.bing,criteo:this.config.criteo,facebook:this.config.facebook,ga4:this.config.ga4,gads:this.config.gads,gua:this.config.gua,gfeeds:this.config.gfeeds,pinterest:this.config.pinterest,twitter:this.config.twitter,tiktok:this.config.tiktok}},t.prototype.getContextData=function(){return{browser:Ne(Ne({},this.config.context.browser),{user_agent:navigator.userAgent,navigator_lang:navigator.language}),page:{controller_name:this.config.context.page.controller_name,category:this.config.context.page.category,search_term:this.config.context.page.search_term},localization:this.config.context.localization,shop:this.config.context.shop,user:this.config.context.user}},t.prototype.homePageView=function(){return this.setEventModel("view_home"),Ne(Ne({},this.layer),this.eventLayer.homePageView())},t.prototype.categoryPageView=function(){return this.setEventModel("view_category"),Ne(Ne({},this.layer),this.eventLayer.categoryPageView())},t.prototype.searchPageView=function(){return this.setEventModel("view_search"),Ne(Ne({},this.layer),this.eventLayer.searchPageView())},t.prototype.productsList=function(t,e){return this.setEventModel("view_product_list"),Ne(Ne({},this.layer),this.eventLayer.productsList(t,e))},t.prototype.productClick=function(t,e){return this.setEventModel("product_click"),Ne(Ne({},this.layer),this.eventLayer.productClick(t,e))},t.prototype.productView=function(t){return this.setEventModel("view_product"),Ne(Ne({},this.layer),this.eventLayer.productView(t))},t.prototype.productShare=function(t,e){return this.setEventModel("share_product"),Ne(Ne({},this.layer),this.eventLayer.productShare(t,e))},t.prototype.addToCart=function(t,e){return this.setEventModel("add_to_cart"),Ne(Ne({},this.layer),this.eventLayer.addToCart(t,e))},t.prototype.removeFromCart=function(t,e){return this.setEventModel("remove_from_cart"),Ne(Ne({},this.layer),this.eventLayer.removeFromCart(t,e))},t.prototype.cartView=function(t,e){return this.setEventModel("view_cart"),Ne(Ne({},this.layer),this.eventLayer.cartView(t,e))},t.prototype.checkoutProgress=function(t,e,n){return this.setEventModel("checkout_progress"),Ne(Ne({},this.layer),this.eventLayer.checkoutProgress(t,e,n))},t.prototype.checkoutOption=function(t,e,n){return this.setEventModel("checkout_option"),Ne(Ne({},this.layer),this.eventLayer.checkoutOption(t,e,n))},t.prototype.orderComplete=function(t,e,n,r){return this.setEventModel("purchase"),this.layer.context=this.getContextData(),this.layer.context.user=r,Ne(Ne({},this.layer),this.eventLayer.orderComplete(t,e,n,r))},t.prototype.promotionsList=function(t){return this.setEventModel("view_promotion_list"),Ne(Ne({},this.layer),this.eventLayer.promotionsList(t))},t.prototype.promotionClick=function(t){return this.setEventModel("promotion_click"),Ne(Ne({},this.layer),this.eventLayer.promotionClick(t))},t.prototype.customerSignUp=function(){return this.setEventModel("customer_sign_up"),Ne(Ne({},this.layer),this.eventLayer.customerSignUp())},t.prototype.customerLogin=function(){return this.setEventModel("customer_login"),Ne(Ne({},this.layer),this.eventLayer.customerLogin())},t.prototype.setEventModel=function(t){this.layer={event:t}},t}(),Be=function(t){this.config=t;var e=new He(this.config);this.dataLayerComponent=new Qe(e,this.config)},Fe=function(){function t(t){this.config=t,this.dataLayer={},this.dataLayerComponent=new Be(this.config).dataLayerComponent}return t.prototype.isAvailable=function(){return Boolean(this.getTrackingId()&&Object.prototype.hasOwnProperty.call(window,"google_tag_manager"))},t.prototype.getTrackingId=function(){return this.config.gtm.tracking_id},t.prototype.initConfig=function(){this.dataLayer=this.dataLayerComponent.initConfig(),this.pushDataLayer()},t.prototype.pushDataLayer=function(){window.dataLayer=window.dataLayer||[],window.dataLayer.push(this.dataLayer),this.resetDataLayer()},t.prototype.resetDataLayer=function(){this.dataLayer={}},t.prototype.initScripts=function(){this.addGTMScript()},t.prototype.addGTMScript=function(){var t=document.createElement("script");t.innerText="\n (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':\n new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],\n j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=\n 'https://www.googletagmanager.com/gtm.js?id='
14+i+dl;f.parentNode.insertBefore(j,f);\n })(window, document, 'script', 'dataLayer', '".concat(this.getTrackingId(),"');\n "),document.head.appendChild(t)},t.prototype.homePageView=function(){this.dataLayer=this.dataLayerComponent.homePageView(),this.pushDataLayer()},t.prototype.categoryPageView=function(){this.dataLayer=this.dataLayerComponent.categoryPageView(),this.pushDataLayer()},t.prototype.searchPageView=function(){this.dataLayer=this.dataLayerComponent.searchPageView(),this.pushDataLayer()},t.prototype.productShare=function(t,e){this.resetLayer(),this.dataLayer=this.dataLayerComponent.productShare(t,e),this.pushDataLayer()},t.prototype.customerSignUp=function(){this.dataLayer=this.dataLayerComponent.customerSignUp(),this.pushDataLayer()},t.prototype.customerLogin=function(){this.dataLayer=this.dataLayerComponent.customerLogin(),this.pushDataLayer()},t.prototype.productsList=function(t,e){this.resetLayer(),this.dataLayer=this.dataLayerComponent.productsList(t,e),this.pushDataLayer()},t.prototype.productClick=function(t,e){this.resetLayer(),this.dataLayer=this.dataLayerComponent.productClick(t,e),this.pushDataLayer()},t.prototype.productView=function(t){this.resetLayer(),this.dataLayer=this.dataLayerComponent.productView(t),this.pushDataLayer()},t.prototype.addToCart=function(t,e){this.resetLayer(),this.dataLayer=this.dataLayerComponent.addToCart(t,e),this.pushDataLayer()},t.prototype.removeFromCart=function(t,e){this.resetLayer(),this.dataLayer=this.dataLayerComponent.removeFromCart(t,e),this.pushDataLayer()},t.prototype.cartView=function(t,e){this.resetLayer(),this.dataLayer=this.dataLayerComponent.cartView(t,e),this.pushDataLayer()},t.prototype.checkoutProgress=function(t,e,n){this.resetLayer(),this.dataLayer=this.dataLayerComponent.checkoutProgress(t,e,n),this.pushDataLayer()},t.prototype.checkoutOption=function(t,e,n){this.dataLayer=this.dataLayerComponent.checkoutOption(t,e,n),this.pushDataLayer()},t.prototype.orderComplete=function(t,e,n,r){this.resetLayer(),this.dataLayer=this.dataLayerComponent.orderComplete(t,e,n,r),this.pushDataLayer()},t.prototype.promotionsList=function(t){this.resetLayer(),this.dataLayer=this.dataLayerComponent.promotionsList(t),this.pushDataLayer()},t.prototype.promotionClick=function(t){this.resetLayer(),this.dataLayer=this.dataLayerComponent.promotionClick(t),this.pushDataLayer()},t.prototype.resetLayer=function(){this.dataLayer=this.dataLayerComponent.resetLayer(),this.pushDataLayer()},t}();var Re=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},t(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();const ze=function(t){function e(){var e=t.call(this)||this;return e.config&&e.sessionStorage&&(e.gtm=new Fe(e.config),e.optimize=new i(e.config),e.eventManager=Me.getEventFactory(e.gtm,e.config,e.sessionStorage),e.init()),e}return Re(e,t),e.prototype.getConfigNode=function(){return"#js-rcpgtm-tracking-config"},e.prototype.getTrackingDataNode=function(){return"#js-rcpgtm-tracking-data"},e.prototype.init=function(){this.initTracking(),this.initEvents()},e.prototype.initTracking=function(){var t,e,n;null===(t=this.gtm)||void 0===t||t.initConfig(),null===(e=this.optimize)||void 0===e||e.initScripts(),null===(n=this.gtm)||void 0===n||n.initScripts()},e.prototype.initEvents=function(){this.eventManager&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",this.eventManager.initPageEvents.bind(this.eventManager),!1):this.eventManager.initPageEvents(),"complete"!==document.readyState?window.addEventListener("load",this.initTrackingDataEvents.bind(this),!1):this.initTrackingDataEvents())},e.prototype.initTrackingDataEvents=function(){this.trackingData=o.getTemplateData(this.getTrackingDataNode()),Object.keys(this.trackingData).length&&this.sessionStorage&&this.eventManager&&(this.sessionStorage.
14initTrackingData(this.trackingData),this.eventManager.initDataEvents(this.trackingData))},e}(o);Object.hasOwnProperty.call(window,"RCPGTMClient")||(window.RCPGTMClient=new ze)})();
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.