PageSourceSearch

https://www.tiendacartucho.es/modules/lgtagmanager/views/js/tracking.js?v=2.0.2

js tiendacartucho.es collected 2026-10-08 17:02:56 UTC 200,488 bytes, 4,091 lines download raw bytes

1/**
2 * Copyright 2023 LÍNEA GRÁFICA E.C.E S.L.
3 *
4 * @author    Línea Gráfica E.C.E. S.L.
5 * @copyright Lineagrafica.es - Línea Gráfica E.C.E. S.L. all rights reserved.
6 * @license   https://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * https://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21(() => {
22    "use strict";
23    const t = function () {
24        function t() {
25            this.hasSessionStorage = "Storage" === Object.prototype.toString.call(sessionStorage).slice(8, -1)
26        }
27
28        return t.prototype.getItem = function (t) {
29            var e = null;
30            return this.hasSessionStorage && (e = sessionStorage.getItem(t)), e
31        }, t.prototype.setItem = function (t, e) {
32            this.hasSessionStorage && sessionStorage.setItem(t, e)
33        }, t.prototype.removeItem = function (t) {
34            this.hasSessionStorage && sessionStorage.removeItem(t)
35        }, t.prototype.clearAll = function () {
36            this.hasSessionStorage && sessionStorage.clear()
37        }, t
38    }(), e = function () {
39        function t(t, e) {
40            this.sessionStorage = t, this.idLang = e, this.storageKey = "LGPList", this.storageValue = {}, this.initStorage()
41        }
42
43        return t.prototype.initStorage = function () {
44            var t = this.sessionStorage.getItem(this.storageKey);
45            t && (this.storageValue = JSON.parse(t))
46        }, t.prototype.addProduct = function (t) {
47            this.storageValue[t.id_index] = t, this.updateSessionStorageValue()
48        }, t.prototype.updateSessionStorageValue = function () {
49            var t = JSON.stringify(this.storageValue);
50            this.sessionStorage.setItem(this.storageKey, t)
51        }, t.prototype.getProduct = function (t) {
52            var e = null, n = this.buildIndex(t);
53            return Object.prototype.hasOwnProperty.call(this.storageValue, n) && (e = this.storageValue[n]), e
54        }, t.prototype.buildIndex = function (t) {
55            return [t.idProduct, t.idProductAttribute, this.idLang].join("-")
56        }, t
57    }(), n = function () {
58        function t(t) {
59            this.storageKey = "LGAList", this.storageValue = {}, this.sessionStorage = t, this.initStorage()
60        }
61
62        return t.prototype.initStorage = function () {
63            var t = this.sessionStorage.getItem(this.storageKey);
64            t && (this.storageValue = JSON.parse(t))
65        }, t.prototype.addAttribution = function (t, e) {
66            this.storageValue[t] = e, this.updateSessionStorageValue()
67        }, t.prototype.updateSessionStorageValue = function () {
68            var t = JSON.stringify(this.storageValue);
69            this.sessionStorage.setItem(this.storageKey, t)
70        }, t.prototype.getAttributionList = function () {
71            return this.storageValue
72        }, t.prototype.getAttribution = function (t) {
73            var e = null;
74            return Object.prototype.hasOwnProperty.call(this.storageValue, t) && (e = this.storageValue[t]), e
75        }, t.prototype.removeSessionStorageKey = function () {
76            this.sessionStorage.removeItem(this.storageKey)
77        }, t
78    }(), r = function () {
79        function r(r) {
80            this.config = r;
81            var o = this.config.context.localization.id_lang, i = new t;
82            this.attributionStorage = new n(i), this.productStorage = new e(i, o)
83        }
84
85        return r.prototype.initTrackingData = function (t) {
86            Object.prototype.hasOwnProperty.call(t, "detail_products_list") && t.detail_products_list.length && this.addProductsList(t.detail_products_list)
87        }, r.prototype.getProductModel = function (t) {
88            return this.productStorage.getProduct(t)
89        }, r.prototype.addProductsList = function (t) {
90            var e = this;
91            t.forEach((function (t) {
92                return e.productStorage.addProduct(t)
93            }))
94        }, r.prototype.addAttributionData = function (t, e) {
95            var n = {productList: this.config.context.page.controller_name, productPosition: e};
96            this.attributionStorage.addAttribution(t, n)
97        }, r.prototype.getAttributionDataList = function () {
98            return this.attributionStorage.getAttributionList()
99        }, r
100    }(), o = function () {
101        function t() {
102            this.errorLog = [], this.config = t.getTemplateData(this.getConfigNode()), this.sessionStorage = new r(this.config)
103        }
104
105        return t.getTemplateData = function (e) {
106            var n = t.getRawTrackingData(e);
107            return t.parseModuleData(n)
108        }, t.getRawTrackingData = function (t) {
109            var e = "", n = document.querySelector(t);
110            return n instanceof HTMLElement && n.dataset.trackingData && n.dataset.trackingData.length && (e = n.dataset.trackingData), e
111        }, t.parseModuleData = function (t) {
112            return JSON.parse(decodeURIComponent(t) || "{}")
113        }, t
114    }(), i = function () {
115        function t(t) {
116            this.config = t
117        }
118
119
120        return t.prototype.initScripts = function () {
121            this.isAvailable() && (this.config.optimize.hiding_timeout && this.config.optimize.hiding_class_name && (this.addHidingStyle(), this.addHiddingScript()), this.addOptimizeScript())
122        }, t.prototype.isAvailable = function () {
123            return Boolean(this.config.optimize.tracking_id)
124        }, t.prototype.getTrackingId = function () {
125            return this.config.optimize.tracking_id
126        }, t.prototype.getHidingClassName = function () {
127            return this.config.optimize.hiding_class_name
128        }, t.prototype.getHidingTimeout = function () {
129            return this.config.optimize.hiding_timeout
130        }, t.prototype.addHidingStyle = function () {
131            var t = document.createElement("style");
132            t.setAttribute("type", "text/css"), t.innerHTML = ".".concat(this.getHidingClassName(), " { opacity: 0 !important };"), document.head.appendChild(t)
133        }, t.prototype.addHiddingScript = function () {
134            var t = document.createElement("script");
135            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)
136        }, t.prototype.addOptimizeScript = function () {
137            var t = document.createElement("script");
138            t.src = "https://www.googleoptimize.com/optimize.js?id=".concat(this.getTrackingId()), t.async = this.config.optimize.is_async, document.head.appendChild(t)
139        }, t
140    }(), a = function () {
141        function t(t, e, n) {
142            this.trackingPlatform = t, this.config = e, this.sessionStorage = n, this.actionTrackingEvents = [], this.dataTrackingEvents = [], this.createPageEvents()
143        }
144
145        return t.prototype.createPageEvents = function () {
146            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()
147        }, t.prototype.initPageEvents = function () {
148            this.actionTrackingEvents.forEach((function (t) {
149                return t.initEvent()
150            }))
151        }, t.prototype.initDataEvents = function (t) {
152            t && this.dataTrackingEvents.forEach((function (e) {
153                return e.initDataEvent(t)
154            }))
155        }, t
156    }(), c = function (t, e, n) {
157        this.trackingPlatform = t, this.config = e, this.sessionStorage = n, this.quantity = 0
158    };
159    const s = function () {
160        function t(t) {
161            this.requestConfig = t, this.errorMessage = "Something went wrong on request", this.requestConfig = t, this.formData = this.buildFormData()
162        }
163
164        return t.prototype.buildFormData = function () {
165            var t = new FormData;
166            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
167        }, t.prototype.fetchRequest = function () {
168            return t = this, e = void 0, r = function () {
169                var t, e, n, r;
170                return function (t, e) {
171                    var n, r, o, i, a = {
172                        label: 0, sent: function () {
173                            if (1 & o[0]) throw o[1];
174                            return o[1]
175                        }, trys: [], ops: []
176                    };
177                    return i = {
178                        next: c(0),
179                        throw: c(1),
180                        return: c(2)
181                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
182                        return this
183                    }), i;
184
185                    function c(i) {
186                        return function (c) {
187                            return function (i) {
188                                if (n) throw new TypeError("Generator is already executing.");
189                                for (; a;) try {
190                                    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;
191                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
192                                        case 0:
193                                        case 1:
194                                            o = i;
195                                            break;
196                                        case 4:
197                                            return a.label++, {value: i[1], done: !1};
198                                        case 5:
199                                            a.label++, r = i[1], i = [0];
200                                            continue;
201                                        case 7:
202                                            i = a.ops.pop(), a.trys.pop();
203                                            continue;
204                                        default:
205                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
206                                                a = 0;
207                                                continue
208                                            }
209                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
210                                                a.label = i[1];
211                                                break
212                                            }
213                                            if (6 === i[0] && a.label < o[1]) {
214                                                a.label = o[1], o = i;
215                                                break
216                                            }
217                                            if (o && a.label < o[2]) {
218                                                a.label = o[2], a.ops.push(i);
219                                                break
220                                            }
221                                            o[2] && a.ops.pop(), a.trys.pop();
222                                            continue
223                                    }
224                                    i = e.call(t, a)
225                                } catch (t) {
226                                    i = [6, t], r = 0
227                                } finally {
228                                    n = o = 0
229                                }
230                                if (5 & i[0]) throw i[1];
231                                return {value: i[0] ? i[1] : void 0, done: !0}
232                            }([i, c])
233                        }
234                    }
235                }(this, (function (o) {
236                    switch (o.label) {
237                        case 0:
238                            return t = {
239                                method: "POST",
240                                mode: "same-origin",
241                                body: this.formData
242                            }
242, e = new Request(this.requestConfig.url, t), [4, fetch(e)];
243                        case 1:
244                            return (n = o.sent()).ok ? [4, n.json()] : [3, 3];
245                        case 2:
246                            return r = o.sent(), [2, Promise.resolve(r)];
247                        case 3:
248                            return [2, Promise.reject()]
249                    }
250                }))
251            }, new ((n = void 0) || (n = Promise))((function (o, i) {
252                function a(t) {
253                    try {
254                        s(r.next(t))
255                    } catch (t) {
256                        i(t)
257                    }
258                }
259
260                function c(t) {
261                    try {
262                        s(r.throw(t))
263                    } catch (t) {
264                        i(t)
265                    }
266                }
267
268                function s(t) {
269                    var e;
270                    t.done ? o(t.value) : (e = t.value, e instanceof n ? e : new n((function (t) {
271                        t(e)
272                    }))).then(a, c)
273                }
274
275                s((r = r.apply(t, e || [])).next())
276            }));
277            var t, e, n, r
278        }, t.prototype.xhrRequest = function () {
279            var t = this;
280            return new Promise((function (e, n) {
281                var r = new XMLHttpRequest;
282                r.open("POST", t.requestConfig.url, !0), r.responseType = "json", r.onload = function () {
283                    200 === r.status ? e(r.response) : n(new Error(t.errorMessage))
284                }, r.send(t.formData)
285            }))
286        }, t
287    }();
288    var u = function (t, e, n, r) {
289        return new (n || (n = Promise))((function (o, i) {
290            function a(t) {
291                try {
292                    s(r.next(t))
293                } catch (t) {
294                    i(t)
295                }
296            }
297
298            function c(t) {
299                try {
300                    s(r.throw(t))
301                } catch (t) {
302                    i(t)
303                }
304            }
305
306            function s(t) {
307                var e;
308                t.done ? o(t.value) : (e = t.value, e instanceof n ? e : new n((function (t) {
309                    t(e)
310                }))).then(a, c)
311            }
312
313            s((r = r.apply(t, e || [])).next())
314        }))
315    }, p = function (t, e) {
316        var n, r, o, i, a = {
317            label: 0, sent: function () {
318                if (1 & o[0]) throw o[1];
319                return o[1]
320            }, trys: [], ops: []
321        };
322        return i = {
323            next: c(0),
324            throw: c(1),
325            return: c(2)
326        }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
327            return this
328        }), i;
329
330        function c(i) {
331            return function (c) {
332                return function (i) {
333                    if (n) throw new TypeError("Generator is already executing.");
334                    for (; a;) try {
335                        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;
336                        switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
337                            case 0:
338                            case 1:
339                                o = i;
340                                break;
341                            case 4:
342                                return a.label++, {value: i[1], done: !1};
343                            case 5:
344                                a.label++, r = i[1], i = [0];
345                                continue;
346                            case 7:
347                                i = a.ops.pop(), a.trys.pop();
348                                continue;
349                            default:
350                                if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
351                                    a = 0;
352                                    continue
353                                }
354                                if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
355                                    a.label = i[1];
356                                    break
357                                }
358                                if (6 === i[0] && a.label < o[1]) {
359                                    a.label = o[1], o = i;
360                                    break
361                                }
362                                if (o && a.label < o[2]) {
363                                    a.label = o[2], a.ops.push(i);
364                                    break
365                                }
366                                o[2] && a.ops.pop(), a.trys.pop();
367                                continue
368                        }
369                        i = e.call(t, a)
370                    } catch (t) {
371                        i = [6, t], r = 0
372                    } finally {
373                        n = o = 0
374                    }
375                    if (5 & i[0]) throw i[1];
376                    return {value: i[0] ? i[1] : void 0, done: !0}
377                }([i, c])
378            }
379        }
380    }, l = function (t, e, n) {
381        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]);
382        return t.concat(r || Array.prototype.slice.call(e))
383    };
384    const f = function () {
385        function t() {
386        }
387
388        return t.getProductsDetailList = function (e, n, r) {
389            return u(this, void 0, void 0, (function () {
390                var o, i, a;
391                return p(this, (function (c) {
392                    switch (c.label) {
393                        case 0:
394                            return o = [], i = [], e.forEach((function (t) {
395                                var e = r.getProductModel(t);
396                                e ? o.push(e) : i.push(t)
397                            })), i.length ? [4, t.fetchProductsLists(e, n)] : [3, 2];
398                        case 1:
399                            (a = c.sent()).length && r.addProductsList(a), o = l(l([], o, !0), a, !0), c.label = 2;
400                        case 2:
401                            return [2, o]
402                    }
403                }))
404            }))
405        }, t.fetchProductsLists = function (t, e) {
406            return u(this, void 0, void 0, (function () {
407                var n;
408                return p(this, (function (r) {
409                    return n = {
410                        url: e.context.shop.base_dir + "index.php",
411                        fc: "module",
412                        module: e.context.tracking_module.module_name,
413                        controller: "datarequest",
414                        action: "getProductsDetail",
415                        data: t,
416                        token: e.context.tracking_module.token
417                    }, [2, new s(n).fetchRequest()]
418                }))
419            }))
420        }, t
421    }();
422    var h, d = (h = function (t, e) {
423        return h = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
424            t.__proto__ = e
425        } || function (t, e) {
426            for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
427        }, h(t, e)
428    }, function (t, e) {
429        if ("function" != typeof e && null !== e) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
430
431        function n() {
432            this.constructor = t
433        }
434
435        h(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, new n)
436    });
437    const y = function (t) {
438        function e() {
439            return null !== t && t.apply(this, arguments) || this
440        }
441
442        return d(e, t), e.prototype.initEvent = function () {
443            document.addEventListener("click", this.triggerCartQuantity.bind(this), !0), prestashop.on("updateCart", this.triggerEvent.bind(this))
444        }, e.prototype.triggerCartQuantity = function (t) {
445            if (0 === t.button && t.target instanceof Element) {
446                var n = e.getAddToCartQuantity(t.target);
447                n && (this.quantity = n)
448            }
449        }, e.getAddToCartQuantity = function (t) {
450            var e = 0, n = t.closest("[data-button-action=add-to-cart]");
451            if (n instanceof HTMLElement) {
452                var r = null, o = "";
453                if (e = 1, n.matches("form *") ? r = n.closest("form") : n.hasAttribute("form") && (r = document.querySelector("#" + n.getAttribute("form"))), r instanceof HTMLFormElement) {
454                    o = r.id;
455                    var i = r.querySelector("[name=qty]") || document.querySelector("[name=qty][form=" + o + "]");
456                    (i instanceof HTMLInputElement || i instanceof HTMLSelectElement) && (e = parseInt(i.value))
457                }
458            }
459            return e
460        }, e.prototype.triggerEvent = function (t) {
461            return n = this, r = void 0, i = function () {
462                var n, r;
463                return function (t, e) {
464                    var n, r, o, i, a = {
465                        label: 0, sent: function () {
466                            if (1 & o[0]) throw o[1];
467                            return o[1]
468                        }, trys: [], ops: []
469                    };
470                    return i = {
471                        next: c(0),
472                        throw: c(1),
473                        return: c(2)
474                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
475                        return this
476                    }), i;
477
478                    function c(i) {
479                        return function (c) {
480                            return function (i) {
481                                if (n) throw new TypeError("Generator is already executing.");
482                                for (; a;) try {
483                                    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;
484                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
485                                        case 0:
486                                        case 1:
487                                            o = i;
488                                            break;
489                                        case 4:
490                                            return a.label++, {value: i[1], done: !1};
491                                        case 5:
492                                            a.label++, r = i[1], i = [0];
493                                            continue;
494                                        case 7:
495                                            i = a.ops.pop(), a.trys.pop();
496                                            continue;
497                                        default:
498                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
499                                                a = 0;
500                                                continue
501                                            }
502                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
503                                                a.label = i[1];
504                                                break
505                                            }
506                                            if (6 === i[0] && a.label < o[1]) {
507                                                a.label = o[1], o = i;
508                                                break
509                                            }
510                                            if (o && a.label < o[2]) {
511                                                a.label = o[2], a.ops.push(i);
512                                                break
513                                            }
514                                            o[2] && a.ops.pop(), a.trys.pop();
515                                            continue
516                                    }
517                                    i = e.call(t, a)
518                                } catch (t) {
519                                    i = [6, t], r = 0
520                                } finally {
521                                    n = o = 0
522                                }
523                                if (5 & i[0]) throw i[1];
524                                return {value: i[0] ? i[1] : void 0, done: !0}
525                            }([i, c])
526                        }
527                    }
528                }(this, (function (o) {
529                    switch (o.label) {
530                        case 0:
531                            return (n = e.getProductsDataList(t)).length ? [4, f.getProductsDetailList(n, this.config, this.sessionStorage)] : [3, 2];
532                        case 1:
533                            (r = o.sent()).length && this.quantity && this.trackingPlatform.addToCart(r[0], this.quantity), o.label = 2;
534                        case 2:
535                            return this.quantity = 0, [2]
536                    }
537                }))
538            }, new ((o = void 0) || (o = Promise))((function (t, e) {
539                function a(t) {
540                    try {
541                        s(i.next(t))
542                    } catch (t) {
543                        e(t)
544                    }
545                }
546
547                function c(t) {
548                    try {
549                        s(i.throw(t))
550                    } catch (t) {
551                        e(t)
552                    }
553                }
554
555                function s(e) {
556                    var n;
557                    e.done ? t(e.value) : (n = e.value, n instanceof o ? n : new o((function (t) {
558                        t(n)
559                    }))).then(a, c)
560                }
561
562                s((i = i.apply(n, r || [])).next())
563            }));
564            var n, r, o, i
565        }, e.getProductsDataList = function (t) {
566            var n = [];
567            return e.isValidResponse(t) && n.push({
568                idProduct: t.resp.id_product,
569                idProductAttribute: t.resp.id_product_attribute
570            }), n
571        }, e.isValidResponse = function (t) {
572            return Object.prototype.hasOwnProperty.call(t, "resp") && t.resp.success
573        }, e
574    }(c), g = function () {
575        function t(t, e, n) {
576            this.trackingPlatform = t, this.config = e, this.sessionStorage = n
577        }
578
579        return t.prototype.initDataEvent = function (t) {
580            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)
581        }, t
582    }();
583    var v = function () {
584        var t = function (e, n) {
585            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
586                t.__proto__ = e
587            } || function (t, e) {
588                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
589            }, t(e, n)
590        };
591        return function (e, n) {
592            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
593
594            function r() {
595                this.constructor = e
596            }
597
598            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
599        }
600    }(), m = function (t, e, n, r) {
601        return new (n || (n = Promise))((function (o, i) {
602            function a(t) {
603                try {
604                    s(r.next(t))
605                } catch (t) {
606                    i(t)
607                }
608            }
609
610            function c(t) {
611                try {
612                    s(r.throw(t))
613                } catch (t) {
614                    i(t)
615                }
616            }
617
618            function s(t) {
619                var e;
620                t.done ? o(t.value) : (e = t.value, e instanceof n ? e : new n((function (t) {
621                    t(e)
622                }))).then(a, c)
623            }
624
625            s((r = r.apply(t, e || [])).next())
626        }))
627    }, _ = function (t, e) {
628        var n, r, o, i, a = {
629            label: 0, sent: function () {
630                if (1 & o[0]) throw o[1];
631                return o[1]
632            }, trys: [], ops: []
633        };
634        return i = {
635            next: c(0),
636            throw: c(1),
637            return: c(2)
638        }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
639            return this
640        }), i;
641
642        function c(i) {
643            return function (c) {
644                return function (i) {
645                    if (n) throw new TypeError("Generator is already executing.");
646                    for (; a;) try {
647                        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;
648                        switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
649                            case 0:
650                            case 1:
651                                o = i;
652                                break;
653                            case 4:
654                                return a.label++, {value: i[1], done: !1};
655                            case 5:
656                                a.label++, r = i[1], i = [0];
657                                continue;
658                            case 7:
659                                i = a.ops.pop(), a.trys.pop();
660                                continue;
661                            default:
662                                if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
663                                    a = 0;
664                                    continue
665                                }
666                                if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
667                                    a.label = i[1];
668                                    break
669                                }
670                                if (6 === i[0] && a.label < o[1]) {
671                                    a.label = o[1], o = i;
672                                    break
673                                }
674                                if (o && a.label < o[2]) {
675                                    a.label = o[2], a.ops.push(i);
676                                    break
677                                }
678                                o[2] && a.ops.pop(), a.trys.pop();
679                                continue
680                        }
681                        i = e.call(t, a)
682                    } catch (t) {
683                        i = [6, t], r = 0
684                    } finally {
685                        n = o = 0
686                    }
687                    if (5 & i[0]) throw i[1];
688                    return {value: i[0] ? i[1] : void 0, done: !0}
689                }([i, c])
690            }
691        }
692    };
693    const w = function (t) {
694        function e() {
695            var e = null !== t && t.apply(this, arguments) || this;
696            return e.cartProductsQuantities = {}, e.lastInputFocus = "", e
697        }
698
699        return v(e, t), e.prototype.initEvent = function () {
700            document.addEventListener("click", this.handleEvent.bind(this), !0), prestashop.on("updateCart", this.updateQuantity.bind(this))
701        }, e.prototype.handleEvent = function (t) {
702            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))
703        }, e.isFocused = function (t) {
704            var e = t.closest(".cart-item");
705            if (e instanceof HTMLElement) {
706                var n = e.querySelector(".js-cart-line-product-quantity");
707                return document.activeElement === n
708            }
709            return !1
710        }, e.prototype.increaseQuantity = function (t) {
711            return m(this, void 0, void 0, (function () {
712                var n;
713                return _(this, (function (r) {
714                    return n = e.getProductsDataList(t), this.triggerEvent(n, 1, this.trackingPlatform.addToCart.bind(this.trackingPlatform)), [2]
715                }))
716            }))
717        }, e.prototype.decreaseQuantity = function (t) {
718            return m(this, void 0, void 0, (function () {
719                var n;
720                return _(this, (function (r) {
721                    return n = e.getProductsDataList(t), this.triggerEvent(n, 1, this.trackingPlatform.removeFromCart.bind(this.trackingPlatform)), [2]
722                }))
723            }))
724        }, e.prototype.removeFromCart = function (t) {
725            var n = e.getProductsDataList(t), r = t.closest(".cart-item");
726            if (r instanceof HTMLElement) {
727                var o = r.querySelector(".js-cart-line-product-quantity");
728                if (o instanceof HTMLInputElement) {
729                    var i = parseInt(o.value);
730                    this.triggerEvent(n, i, this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))
731                }
732            }
733        }, e.getProductsDataList = function (t) {
734            var e, n, r = t.closest(".cart-item"), o = [];
735            if (r instanceof HTMLElement) {
736                var i = r.querySelector(".remove-from-cart");
737                i instanceof HTMLElement && (e = parseInt(i.dataset.idProduct || "0"), n = parseInt(i.dataset.idProductAttribute || "0"), e && o.push({
738                    idProduct: e,
739                    idProductAttribute: n
740                }))
741            }
742            return o
743        }, e.prototype.setInputCurrentQuantity = function (t) {
744            return m(this, void 0, void 0, (function () {
745                var n, r, o, i;
746                return _(this, (function (a) {
747                    return n = e.getProductsDataList(t), r = n[0], o = t.closest(".
747js-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]
748                }))
749            }))
750        }, e.prototype.updateQuantity = function (t) {
751            return m(this, void 0, void 0, (function () {
752                var e, n, r, o, i;
753                return _(this, (function (a) {
754                    return t.reason.success && (e = {
755                        idProduct: t.reason.id_product,
756                        idProductAttribute: t.reason.id_product_attribute
757                    }, (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]
758                }))
759            }))
760        }, e.prototype.triggerEvent = function (t, e, n) {
761            return m(this, void 0, void 0, (function () {
762                var r;
763                return _(this, (function (o) {
764                    switch (o.label) {
765                        case 0:
766                            return t.length ? [4, f.getProductsDetailList(t, this.config, this.sessionStorage)] : [3, 2];
767                        case 1:
768                            (r = o.sent()).length && e && n(r[0], e), o.label = 2;
769                        case 2:
770                            return [2]
771                    }
772                }))
773            }))
774        }, e.prototype.initDataEvent = function (t) {
775            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)
776        }, e
777    }(g), P = function () {
778        function t(t, e) {
779            this.trackingPlatform = t, this.config = e
780        }
781
782        return t.prototype.initEvent = function () {
783            this.triggerEvent()
784        }, t.prototype.triggerEvent = function () {
785            this.hasCategoryData() && this.trackingPlatform.categoryPageView()
786        }, t.prototype.hasCategoryData = function () {
787            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")
788        }, t
789    }();
790    var b = function () {
791        var t = function (e, n) {
792            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
793                t.__proto__ = e
794            } || function (t, e) {
795                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
796            }, t(e, n)
797        };
798        return function (e, n) {
799            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
800
801            function r() {
802                this.constructor = e
803            }
804
805            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
806        }
807    }();
808    const E = function (t) {
809        function e() {
810            return null !== t && t.apply(this, arguments) || this
811        }
812
813        return b(e, t), e
814    }(P), k = function () {
815        function t(t, e, n) {
816            this.trackingPlatform = t, this.config = e, this.sessionStorage = n, this.checkoutController = this.getCheckoutModule()
817        }
818
819        return t.prototype.initEvent = function () {
820            this.isValidCheckoutController() && this.checkoutController.initEvent()
821        }, t.prototype.isValidCheckoutController = function () {
822            return this.config.context.page.controller_name === this.config.context.tracking_module.checkout_module.controller
823        }, t.prototype.initDataEvent = function (e) {
824            this.isValidCheckoutController() && t.isValidTrackingData(e) && this.checkoutController.initDataEvent(e)
825        }, t.isValidTrackingData = function (t) {
826            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)
827        }, t
828    }(), S = function () {
829        function t(t, e, n) {
830            this.trackingPlatform = t, this.config = e, this.sessionStorage = n, this.step = 1, this.carrierSelected = "", this.paymentSelected = ""
831        }
832
833        return t.prototype.initCheckoutEvent = function () {
834            this.setDefaultCheckoutValues(), document.addEventListener("click", this.delegateCheckoutEvent.bind(this), !0)
835        }, t.isValidMouseEvent = function (t) {
836            return 0 === t.button && t.isTrusted
837        }, t.isValidAgreement = function () {
838            var t = document.querySelector("input[name=cgv]");
839            return !(t instanceof HTMLInputElement) || t.checked
840        }, t.isCheckoutWithCarrier = function (t) {
841            return Boolean(document.querySelector(t))
842        }, t.prototype.sendTrackingCarrierOption = function () {
843            this.trackingPlatform.checkoutOption("shipping", this.carrierSelected, this.step)
844        }, t.prototype.sendTrackingPaymentOption = function () {
845            this.trackingPlatform.checkoutOption("payment", this.paymentSelected, this.step)
846        }, t.prototype.initDataEvent = function (t) {
847            this.trackingPlatform.checkoutProgress(t.detail_products_list, t.order_products_list, this.step)
848        }, t
849    }();
850    var O = function () {
851        var t = function (e, n) {
852            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
853                t.__proto__ = e
854            } || function (t, e) {
855                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
856            }, t(e, n)
857        };
858        return function (e, n) {
859            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
860
861            function r() {
862                this.constructor = e
863            }
864
865            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
866        }
867    }();
868    const C = function (t) {
869        function e() {
870            return null !== t && t.apply(this, arguments) || this
871        }
872
873        return O(e, t), e.prototype.initEvent = function () {
874            this.setCurrentStep(), this.initCheckoutEvent()
875        }, e.prototype.setCurrentStep = function () {
876            var t = document.querySelectorAll(".checkout-step"), e = Array.prototype.findIndex.call(t, (function (t) {
877                return t.classList.contains("js-current-step")
878            }));
879            this.step = -1 !== e ? e : 1
880        }, e.prototype.setDefaultCheckoutValues = function () {
881            this.getCarrierSelected()
882        }, e.prototype.delegateCheckoutEvent = function (t) {
883            if (e.isValidMouseEvent(t)) {
884                var n = t.target;
885                e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidCarrierEvent(n) ? this.sendTrackingCarrierOption() : e.isValidPaymentSelectionEvent(n) ? this.getPaymentSelected() : e.isValidPurchaseEvent(n) && this.sendTrackingPaymentOption()
886            }
887        }, e.isValidCarrierSelectionEvent = function (t) {
888            return t.matches("#checkout-delivery-step .delivery-options *")
889        }, e.prototype.getCarrierSelected = function () {
890            var t = "", e = document.querySelector("[id^=delivery_option_]:checked");
891            (e = (e = e ? e.closest(".delivery-option") : null) ? e.querySelector(".carrier-name") : null) && (t = e.textContent || ""), this.carrierSelected = t.trim()
892        }, e.isValidCarrierEvent = function (t) {
893            return Boolean(t.closest("#checkout-delivery-step button[type=submit]"))
894        }, e.isValidPaymentSelectionEvent = function (t) {
895            return t.matches("#checkout-payment-step .payment-options *")
896        }, e.prototype.getPaymentSelected = function () {
897            var t = "", e = document.querySelector("[id^=payment-option-]:checked");
898            e && Object.hasOwnProperty.call(e.dataset, "moduleName") && (t = e.dataset.moduleName || ""), this.paymentSelected = t.trim()
899        }, e.isValidPurchaseEvent = function (t) {
900            return Boolean(t.closest("#payment-confirmation button[type=submit]")) && e.isValidAgreement()
901        }, e.isValidAgreement = function () {
902            var t = document.querySelector("input[name^=conditions_to_approve]");
903            return !(t instanceof HTMLInputElement) || t.checked
904        }, e.prototype.initDataEvent = function (e) {
905            0 !== this.step && t.prototype.initDataEvent.call(this, e)
906        }, e
907    }(S);
908    var L = function () {
909        var t = function (e, n) {
910            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
911                t.__proto__ = e
912            } || function (t, e) {
913                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
914            }, t(e, n)
915        };
916        return function (e, n) {
917            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
918
919            function r() {
920                this.constructor = e
921            }
922
923            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
924        }
925    }();
926    const T = function (t) {
927        function e() {
928            return null !== t && t.apply(this, arguments) || this
929        }
930
931        return L(e, t), e.prototype.setDefaultCheckoutValues = function () {
932            this.getCarrierSelected(), this.getPaymentSelected()
933        }, e.isValidCarrierSelectionEvent = function (t) {
934            return t.matches("#pwc-delivery-options *")
935        }, e.prototype.getPaymentSelected = function () {
936            this.paymentSelected = "sveacheckout"
937        }, e.isValidPurchaseEvent = function (t) {
938            return t.matches("a *")
939        }, e.prototype.triggerPurchaseEvent = function () {
940            this.sendTrackingCarrierOption(), this.sendTrackingPaymentOption()
941        }, e
942    }(S);
943    var j = function () {
944        var t = function (e, n) {
945            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
946                t.__proto__ = e
947            } || function (t, e) {
948                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
949            }, t(e, n)
950        };
951        return function (e, n) {
952            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
953
954            function r() {
955                this.constructor = e
956            }
957
958            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
959        }
960    }();
961    const V = function (t) {
962        function e(e, n, r) {
963            var o = t.call(this, e, n, r) || this;
964            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.cartViewEvent = new w(o.trackingPlatform, o.config, o.sessionStorage), o
965        }
966
967        return j(e, t), e.prototype.initEvent = function () {
968            this.cartViewEvent.initEvent(), this.initCheckoutEvent()
969        }, e.prototype.delegateCheckoutEvent = function (t) {
970            if (e.isValidMouseEvent(t)) {
971                var n = t.target;
972                e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidPurchaseEvent(n) && this.triggerPurchaseEvent()
973            }
974        }, e.prototype.getCarrierSelected = function () {
975            var t = "", e = document.querySelector(".selected[id^=delivery_option] .flex-grow-1.flex-shrink-1");
976            return e instanceof HTMLElement && e.firstElementChild instanceof HTMLElement && (t = e.firstElementChild.innerText.trim().toLowerCase()), this.carrierSelected = t
977        }, e
978    }(T);
979    var x = function () {
980        var t = function (e, n) {
981            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
982                t.__proto__ = e
983            } || function (t, e) {
984                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
985            }, t(e, n)
986        };
987        return function (e, n) {
988            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
989
990            function r() {
991                this.constructor = e
992            }
993
994            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
995        }
996    }();
997    const D = function (t) {
998        function e() {
999            return null !== t && t.apply(this, arguments) || this
1000        }
1001
1002        return x(e, t), e.prototype.setDefaultCheckoutValues = function () {
1003            this.getCarrierSelected(), this.getPaymentSelected()
1004        }, e.isValidCarrierSelectionEvent = function (t) {
1005            return t.matches("#klarnacarrier *")
1006        }, e.prototype.getPaymentSelected = function () {
1007            this.paymentSelected = "klarna"
1008        }, e.prototype.triggerPurchaseEvent = function () {
1009            this.sendTrackingCarrierOption(), this.sendTrackingPaymentOption()
1010        }, e.isValidPurchaseEvent = function (t) {
1011            return t.matches("a *")
1012        }, e
1013    }(S);
1014    var A = function () {
1015        var t = function (e, n) {
1016            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1017                t.__proto__ = e
1018            } || function (t, e) {
1019                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1020            }, t(e, n)
1021        };
1022        return function (e, n) {
1023            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1024
1025            function r() {
1026                this.constructor = e
1027            }
1028
1029            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1030        }
1031    }();
1032    const M = function (t) {
1033        function e(e, n, r) {
1034            var o = t.call(this, e, n, r) || this;
1035            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.cartViewEvent = new w(o.trackingPlatform, o.config, o.sessionStorage), o
1036        }
1037
1038        return A(e, t), e.prototype.initEvent = function () {
1039            this.cartViewEvent.initEvent(), this.initCheckoutEvent()
1040        }, e.prototype.delegateCheckoutEvent = function (t) {
1041            if (e.isValidMouseEvent(t)) {
1042                var n = t.target;
1043                e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidPurchaseEvent(n) && this.triggerPurchaseEvent()
1044            }
1045        }, e.prototype.getCarrierSelected = function () {
1046            var t = "", e = document.querySelector("#klarnacarrier .selected .kco-sel-list__item__title");
1047            e instanceof HTMLElement && e.firstElementChild instanceof HTMLElement && (t = e.firstElementChild.innerText.trim().toLowerCase()), this.carrierSelected = t
1048        }, e
1049    }(D);
1050    var I = function () {
1051        var t = function (e, n) {
1052            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1053                t.__proto__ = e
1054            } || function (t, e) {
1055                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1056            }, t(e, n)
1057        };
1058        return function (e, n) {
1059            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1060
1061            function r() {
1062 
1062               this.constructor = e
1063            }
1064
1065            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1066        }
1067    }();
1068    const q = function (t) {
1069        function e() {
1070            return null !== t && t.apply(this, arguments) || this
1071        }
1072
1073        return I(e, t), e.prototype.delegateCheckoutEvent = function (t) {
1074        }, e.prototype.setDefaultCheckoutValues = function () {
1075            this.getCarrierSelected(), this.getPaymentSelected()
1076        }, e.prototype.getCarrierSelected = function () {
1077            this.carrierSelected = "not detected"
1078        }, e.prototype.getPaymentSelected = function () {
1079            this.paymentSelected = "qliro"
1080        }, e
1081    }(S);
1082    var H = function () {
1083        var t = function (e, n) {
1084            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1085                t.__proto__ = e
1086            } || function (t, e) {
1087                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1088            }, t(e, n)
1089        };
1090        return function (e, n) {
1091            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1092
1093            function r() {
1094                this.constructor = e
1095            }
1096
1097            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1098        }
1099    }();
1100    const N = function (t) {
1101        function e(e, n, r) {
1102            var o = t.call(this, e, n, r) || this;
1103            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.cartViewEvent = new w(o.trackingPlatform, o.config, o.sessionStorage), o
1104        }
1105
1106        return H(e, t), e.prototype.initEvent = function () {
1107            this.cartViewEvent.initEvent()
1108        }, e
1109    }(q);
1110    var Q = function () {
1111        var t = function (e, n) {
1112            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1113                t.__proto__ = e
1114            } || function (t, e) {
1115                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1116            }, t(e, n)
1117        };
1118        return function (e, n) {
1119            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1120
1121            function r() {
1122                this.constructor = e
1123            }
1124
1125            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1126        }
1127    }();
1128    const B = function (t) {
1129        function e() {
1130            return null !== t && t.apply(this, arguments) || this
1131        }
1132
1133        return Q(e, t), e.prototype.setDefaultCheckoutValues = function () {
1134            setTimeout(this.getCheckoutLazyOptions.bind(this), 1e3)
1135        }, e.prototype.getCheckoutLazyOptions = function () {
1136            document.querySelector("#thecheckout-payment") ? (this.getCarrierSelected(), this.getPaymentSelected()) : setTimeout(this.getCheckoutLazyOptions.bind(this), 1e3)
1137        }, e
1138    }(S);
1139    var F = function () {
1140        var t = function (e, n) {
1141            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1142                t.__proto__ = e
1143            } || function (t, e) {
1144                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1145            }, t(e, n)
1146        };
1147        return function (e, n) {
1148            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1149
1150            function r() {
1151                this.constructor = e
1152            }
1153
1154            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1155        }
1156    }();
1157    const R = function (t) {
1158        function e(e, n, r) {
1159            var o = t.call(this, e, n, r) || this;
1160            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.cartViewEvent = new w(o.trackingPlatform, o.config, o.sessionStorage), o
1161        }
1162
1163        return F(e, t), e.prototype.initEvent = function () {
1164            this.cartViewEvent.initEvent(), this.initCheckoutEvent()
1165        }, e.prototype.delegateCheckoutEvent = function (t) {
1166            if (e.isValidMouseEvent(t)) {
1167                var n = t.target;
1168                n.matches("#tc-container *") && (e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidPaymentSelectionEvent(n) ? this.getPaymentSelected() : e.isValidPurchaseEvent(n) && this.triggerPurchaseEvent())
1169            }
1170        }, e.isValidCarrierSelectionEvent = function (t) {
1171            return t.matches("#thecheckout-shipping *")
1172        }, e.prototype.getCarrierSelected = function () {
1173            var t = "", e = document.querySelector(".delivery-options input:checked");
1174            if (e instanceof HTMLInputElement) {
1175                var n = e.closest(".delivery-option-row");
1176                if (n instanceof HTMLElement) {
1177                    var r = n.querySelector(".carrier-name");
1178                    t = r instanceof HTMLElement ? r.innerText : ""
1179                }
1180            }
1181            this.carrierSelected = t.trim().toLowerCase()
1182        }, e.isValidPaymentSelectionEvent = function (t) {
1183            return t.matches("#thecheckout-payment *")
1184        }, e.prototype.getPaymentSelected = function () {
1185            var t = "", e = document.querySelector(".payment-options input:checked");
1186            e instanceof HTMLInputElement && (t = e.dataset.moduleName || ""), this.paymentSelected = t.trim().toLowerCase()
1187        }, e.isValidPurchaseEvent = function (t) {
1188            return Boolean(t.closest("#confirm_order")) && e.isValidAgreement()
1189        }, e.isValidAgreement = function () {
1190            var t = document.querySelector("input[name^=conditions_to_approve]");
1191            return !(t instanceof HTMLInputElement) || t.checked
1192        }, e.prototype.triggerPurchaseEvent = function () {
1193            e.isCheckoutWithCarrier("body:not(.is-virtual-cart) #thecheckout-shipping") && this.sendTrackingCarrierOption(), this.sendTrackingPaymentOption()
1194        }, e
1195    }(B);
1196    var z = function () {
1197        var t = function (e, n) {
1198            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1199                t.__proto__ = e
1200            } || function (t, e) {
1201                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1202            }, t(e, n)
1203        };
1204        return function (e, n) {
1205            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1206
1207            function r() {
1208                this.constructor = e
1209            }
1210
1211            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1212        }
1213    }();
1214    const U = function (t) {
1215        function e() {
1216            var e = null !== t && t.apply(this, arguments) || this;
1217            return e.checkoutCarrierNodeSelector = "#onepagecheckoutps_contenedor #js-delivery, #opc_main #form-shipping_container", e
1218        }
1219
1220        return z(e, t), e.isCartViewEvent = function () {
1221            return Boolean(document.querySelector("#cart_summary"))
1222        }, e.prototype.setDefaultCheckoutValues = function () {
1223            setTimeout(this.getCheckoutLazyOptions.bind(this), 1e3)
1224        }, e.prototype.getCheckoutLazyOptions = function () {
1225            document.querySelector("#payment_method_container") ? (this.getCarrierSelected(), this.getPaymentSelected()) : setTimeout(this.getCheckoutLazyOptions.bind(this), 1e3)
1226        }, e.isValidCarrierSelectionEvent = function (t) {
1227            return t.matches("#js-delivery *, #form-shipping_container .delivery-options *")
1228        }, e.isValidPaymentSelectionEvent = function (t) {
1229            return t.matches("#payment_method_container *")
1230        }, e.isValidPurchaseEvent = function (t) {
1231            return Boolean(t.closest("#btn_place_order, #btn-placer_order")) && S.isValidAgreement()
1232        }, e
1233    }(S);
1234    var G = function () {
1235        var t = function (e, n) {
1236            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1237                t.__proto__ = e
1238            } || function (t, e) {
1239                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1240            }, t(e, n)
1241        };
1242        return function (e, n) {
1243            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1244
1245            function r() {
1246                this.constructor = e
1247            }
1248
1249            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1250        }
1251    }();
1252    const J = function (t) {
1253        function e(e, n, r) {
1254            var o = t.call(this, e, n, r) || this;
1255            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.cartViewEvent = new w(o.trackingPlatform, o.config, o.sessionStorage), o
1256        }
1257
1258        return G(e, t), e.prototype.initEvent = function () {
1259            e.isCartViewEvent() ? this.cartViewEvent.initEvent() : this.initCheckoutEvent()
1260        }, e.prototype.delegateCheckoutEvent = function (t) {
1261            if (e.isValidMouseEvent(t)) {
1262                var n = t.target;
1263                n.matches("#onepagecheckoutps_contenedor *, #opc_main *") && (e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidPaymentSelectionEvent(n) ? this.getPaymentSelected() : e.isValidPurchaseEvent(n) && this.triggerPurchaseEvent())
1264            }
1265        }, e.prototype.getCarrierSelected = function () {
1266            var t = "", e = document.querySelector("[name^=delivery_option]:checked");
1267            if (e instanceof HTMLInputElement) {
1268                var n = e.closest(".delivery-option");
1269                if (n instanceof HTMLElement) {
1270                    var r = n.querySelector(".delivery_option_title");
1271                    t = r instanceof HTMLElement && r.textContent ? r.textContent : ""
1272                }
1273            }
1274            this.carrierSelected = t.trim().toLowerCase()
1275        }, e.prototype.getPaymentSelected = function () {
1276            var t = "", e = document.querySelector("[name=payment-option]:checked");
1277            e instanceof HTMLInputElement && (t = e.value.trim().toLowerCase()), this.paymentSelected = t
1278        }, e.isValidAgreement = function () {
1279            var t = document.querySelector("input[name^=conditions_to_approve]");
1280            return !(t instanceof HTMLInputElement) || t.checked
1281        }, e.prototype.triggerPurchaseEvent = function () {
1282            e.isCheckoutWithCarrier(this.checkoutCarrierNodeSelector) && this.sendTrackingCarrierOption(), this.sendTrackingPaymentOption()
1283        }, e.prototype.initDataEvent = function (n) {
1284            e.isCartViewEvent() ? this.cartViewEvent.initDataEvent(n) : t.prototype.initDataEvent.call(this, n)
1285        }, e
1286    }(U);
1287    var K = function () {
1288        var t = function (e, n) {
1289            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1290                t.__proto__ = e
1291            } || function (t, e) {
1292                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1293            }, t(e, n)
1294        };
1295        return function (e, n) {
1296            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1297
1298            function r() {
1299                this.constructor = e
1300            }
1301
1302            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1303        }
1304    }();
1305    const W = function (t) {
1306        function e() {
1307            return null !== t && t.apply(this, arguments) || this
1308        }
1309
1310        return K(e, t), e.prototype.setDefaultCheckoutValues = function () {
1311            setTimeout(this.getCheckoutLazyOptions.bind(this), 1e3)
1312        }, e.prototype.getCheckoutLazyOptions = function () {
1313            document.querySelector("#st-checkout-payment-step") ? (this.getCarrierSelected(), this.getPaymentSelected()) : setTimeout(this.getCheckoutLazyOptions.bind(this), 1e3)
1314        }, e
1315    }(S);
1316    var Y = function () {
1317        var t = function (e, n) {
1318            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1319                t.__proto__ = e
1320            } || function (t, e) {
1321                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1322            }, t(e, n)
1323        };
1324        return function (e, n) {
1325            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1326
1327            function r() {
1328                this.constructor = e
1329            }
1330
1331            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1332        }
1333    }();
1334    const X = function (t) {
1335        function e(e, n, r) {
1336            var o = t.call(this, e, n, r) || this;
1337            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.cartViewEvent = new w(o.trackingPlatform, o.config, o.sessionStorage), o
1338        }
1339
1340        return Y(e, t), e.prototype.initEvent = function () {
1341            this.cartViewEvent.initEvent(), this.initCheckoutEvent()
1342        }, e.prototype.delegateCheckoutEvent = function (t) {
1343            if (e.isValidMouseEvent(t)) {
1344                var n = t.target;
1345                n.matches("#content.steco_container *") && (e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidPaymentSelectionEvent(n) ? this.getPaymentSelected() : e.isValidPurchaseEvent(n) && this.triggerPurchaseEvent())
1346            }
1347        }, e.isValidCarrierSelectionEvent = function (t) {
1348            return t.matches("#st-checkout-delivery-step *")
1349        }, e.prototype.getCarrierSelected = function () {
1350            var t = "", e = document.querySelector(".delivery-options input:checked");
1351            if (e instanceof HTMLInputElement) {
1352                var n = e.closest(".delivery-option");
1353                if (n instanceof HTMLElement) {
1354                    var r = n.querySelector(".carrier-name");
1355                    t = r instanceof HTMLElement ? r.innerText : ""
1356                }
1357            }
1358            this.carrierSelected = t.trim().toLowerCase()
1359        }, e.isValidPaymentSelectionEvent = function (t) {
1360            return t.matches("#st-checkout-payment-step *")
1361        }, e.prototype.getPaymentSelected = function () {
1362            var t = "", e = document.querySelector(".payment-options input:checked");
1363            e instanceof HTMLInputElement && (t = e.dataset.moduleName || ""), this.paymentSelected = t.trim().toLowerCase()
1364        }, e.isValidPurchaseEvent = function (t) {
1365            return Boolean(t.closest("#payment-confirmation")) && e.isValidAgreement()
1366        }, e.isValidAgreement = function () {
1367            var t = document.querySelector("input[name^=conditions_to_approve]");
1368            return !(t instanceof HTMLInputElement) || t.checked
1369        }, e.prototype.triggerPurchaseEvent = function () {
1370            e.isCheckoutWithCarrier("#st-checkout-delivery-step") && this.sendTrackingCarrierOption(), this.sendTrackingPaymentOption()
1371        }, e
1372    }(W);
1373    var Z = function () {
1374        var t = function (e, n) {
1375            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1376                t.__proto__ = e
1377            } || function (t, e) {
1378                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1379            }, t(e, n)
1380        };
1381        return function (e, n) {
1382            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1383
1384            function r() {
1385                this.constructor = e
1386            }
1387
1388            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1389        }
1390    }();
1391    const $ = function (t) {
1392        function e() {
1393            return null !== t && t.apply(this, argume
1393nts) || this
1394        }
1395
1396        return Z(e, t), e.prototype.setDefaultCheckoutValues = function () {
1397            setTimeout(this.getCheckoutLazyOptions.bind(this), 1e3)
1398        }, e.prototype.getCheckoutLazyOptions = function () {
1399            document.querySelector("#supercheckout-fieldset") ? (this.getCarrierSelected(), this.getPaymentSelected()) : setTimeout(this.getCheckoutLazyOptions.bind(this), 1e3)
1400        }, e
1401    }(S);
1402    var tt = function () {
1403        var t = function (e, n) {
1404            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1405                t.__proto__ = e
1406            } || function (t, e) {
1407                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1408            }, t(e, n)
1409        };
1410        return function (e, n) {
1411            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1412
1413            function r() {
1414                this.constructor = e
1415            }
1416
1417            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1418        }
1419    }();
1420    const et = function (t) {
1421        function e(e, n, r) {
1422            var o = t.call(this, e, n, r) || this;
1423            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.cartViewEvent = new w(o.trackingPlatform, o.config, o.sessionStorage), o
1424        }
1425
1426        return tt(e, t), e.prototype.initEvent = function () {
1427            this.cartViewEvent.initEvent(), this.initCheckoutEvent()
1428        }, e.prototype.delegateCheckoutEvent = function (t) {
1429            if (e.isValidMouseEvent(t)) {
1430                var n = t.target;
1431                n.matches("#supercheckout-fieldset *") && (e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidPaymentSelectionEvent(n) ? this.getPaymentSelected() : e.isValidPurchaseEvent(n) && this.triggerPurchaseEvent())
1432            }
1433        }, e.isValidCarrierSelectionEvent = function (t) {
1434            return t.matches("#shipping-method *")
1435        }, e.prototype.getCarrierSelected = function () {
1436            var t = "", e = document.querySelector("input.supercheckout_shipping_option:checked");
1437            if (e instanceof HTMLInputElement) {
1438                var n = e.closest("li");
1439                if (n instanceof HTMLElement) {
1440                    var r = n.querySelector("img") || n.querySelector("label");
1441                    r instanceof HTMLImageElement ? t = r.alt : r instanceof HTMLLabelElement && r.firstChild instanceof Text && r.firstChild.textContent && (t = r.firstChild.textContent)
1442                }
1443            }
1444            this.carrierSelected = t.trim().toLowerCase()
1445        }, e.isValidPaymentSelectionEvent = function (t) {
1446            return t.matches("#payment-method *")
1447        }, e.prototype.getPaymentSelected = function () {
1448            var t = "", e = document.querySelector(".payment-options input:checked");
1449            e instanceof HTMLInputElement && (t = e.dataset.moduleName || ""), this.paymentSelected = t.trim().toLowerCase()
1450        }, e.isValidPurchaseEvent = function (t) {
1451            return Boolean(t.closest("#supercheckout_confirm_order")) && e.isValidAgreement()
1452        }, e.isValidAgreement = function () {
1453            var t = document.querySelector("input[name^=conditions_to_approve]");
1454            return !(t instanceof HTMLInputElement) || t.checked
1455        }, e.prototype.triggerPurchaseEvent = function () {
1456            e.isCheckoutWithCarrier("input.supercheckout_shipping_option") && this.sendTrackingCarrierOption(), this.sendTrackingPaymentOption()
1457        }, e
1458    }($), nt = function () {
1459        function t() {
1460        }
1461
1462        return t.getCheckoutController = function (t, e, n) {
1463            var r;
1464            switch (e.context.tracking_module.checkout_module.module) {
1465                case"klarnaofficial":
1466                    r = new M(t, e, n);
1467                    break;
1468                case"onepagecheckoutps":
1469                    r = new J(t, e, n);
1470                    break;
1471                case"pw_qlirocheckout":
1472                    r = new N(t, e, n);
1473                    break;
1474                case"steasycheckout":
1475                    r = new X(t, e, n);
1476                    break;
1477                case"supercheckout":
1478                    r = new et(t, e, n);
1479                    break;
1480                case"sveacheckout":
1481                    r = new V(t, e, n);
1482                    break;
1483                case"thecheckout":
1484                    r = new R(t, e, n);
1485                    break;
1486                default:
1487                    r = new C(t, e, n)
1488            }
1489            return r
1490        }, t
1491    }();
1492    var rt = function () {
1493        var t = function (e, n) {
1494            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1495                t.__proto__ = e
1496            } || function (t, e) {
1497                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1498            }, t(e, n)
1499        };
1500        return function (e, n) {
1501            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1502
1503            function r() {
1504                this.constructor = e
1505            }
1506
1507            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1508        }
1509    }();
1510    const ot = function (t) {
1511        function e() {
1512            return null !== t && t.apply(this, arguments) || this
1513        }
1514
1515        return rt(e, t), e.prototype.getCheckoutModule = function () {
1516            return nt.getCheckoutController(this.trackingPlatform, this.config, this.sessionStorage)
1517        }, e
1518    }(k), it = function () {
1519        function t(t, e) {
1520            this.trackingPlatform = t, this.config = e
1521        }
1522
1523        return t.prototype.initEvent = function () {
1524            this.triggerEvent()
1525        }, t.prototype.triggerEvent = function () {
1526            this.config.context.user && this.config.context.user.is_new_login && this.trackingPlatform.customerLogin()
1527        }, t
1528    }();
1529    var at = function () {
1530        var t = function (e, n) {
1531            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1532                t.__proto__ = e
1533            } || function (t, e) {
1534                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1535            }, t(e, n)
1536        };
1537        return function (e, n) {
1538            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1539
1540            function r() {
1541                this.constructor = e
1542            }
1543
1544            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1545        }
1546    }();
1547    const ct = function (t) {
1548        function e() {
1549            return null !== t && t.apply(this, arguments) || this
1550        }
1551
1552        return at(e, t), e
1553    }(it), st = function () {
1554        function t(t, e) {
1555            this.trackingPlatform = t, this.config = e
1556        }
1557
1558        return t.prototype.initEvent = function () {
1559            this.triggerEvent()
1560        }, t.prototype.triggerEvent = function () {
1561            this.config.context.user && this.config.context.user.is_new_account && this.trackingPlatform.customerSignUp()
1562        }, t
1563    }();
1564    var ut = function () {
1565        var t = function (e, n) {
1566            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1567                t.__proto__ = e
1568            } || function (t, e) {
1569                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1570            }, t(e, n)
1571        };
1572        return function (e, n) {
1573            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1574
1575            function r() {
1576                this.constructor = e
1577            }
1578
1579            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1580        }
1581    }();
1582    const pt = function (t) {
1583        function e() {
1584            return null !== t && t.apply(this, arguments) || this
1585        }
1586
1587        return ut(e, t), e
1588    }(st), lt = function () {
1589        function t(t, e) {
1590            this.trackingPlatform = t, this.config = e
1591        }
1592
1593        return t.prototype.initEvent = function () {
1594            "index" === this.config.context.page.controller_name && this.triggerEvent()
1595        }, t.prototype.triggerEvent = function () {
1596            this.trackingPlatform.homePageView()
1597        }, t
1598    }();
1599    var ft = function () {
1600        var t = function (e, n) {
1601            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1602                t.__proto__ = e
1603            } || function (t, e) {
1604                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1605            }, t(e, n)
1606        };
1607        return function (e, n) {
1608            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1609
1610            function r() {
1611                this.constructor = e
1612            }
1613
1614            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1615        }
1616    }();
1617    const ht = function (t) {
1618        function e() {
1619            return null !== t && t.apply(this, arguments) || this
1620        }
1621
1622        return ft(e, t), e
1623    }(lt), dt = function () {
1624        function t(t, e, n) {
1625            this.trackingPlatform = t, this.config = e, this.sessionStorage = n
1626        }
1627
1628        return t.prototype.initDataEvent = function (e) {
1629            t.isValidTrackingData(e) && (this.trackingPlatform.isAvailable() ? (console.log("normal order executed"), this.trackingPlatform.orderComplete(e.order_complete_data, e.detail_products_list, e.order_products_list, e.order_context_user_data, this.setOrderTrackingStatus.bind(this))) : (console.log("exception order by Adblock"), this.handleAdBlockOrderAborted(e.order_complete_data)))
1630        }, t.isValidTrackingData = function (t) {
1631            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)
1632        }, t.prototype.setOrderTrackingStatus = function (t) {
1633            this.serverRequest("setOrderTrackingStatus", t)
1634        }, t.prototype.handleAdBlockOrderAborted = function (t) {
1635            this.serverRequest("handleAdBlockOrderAborted", t)
1636        }, t.prototype.serverRequest = function (t, e) {
1637            var n = {
1638                url: this.config.context.shop.base_dir + "index.php",
1639                fc: "module",
1640                module: this.config.context.tracking_module.module_name,
1641                controller: "datarequest",
1642                action: t,
1643                data: e,
1644                token: this.config.context.tracking_module.token
1645            };
1646            new s(n).fetchRequest()
1647        }, t
1648    }();
1649    var yt = function () {
1650        var t = function (e, n) {
1651            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1652                t.__proto__ = e
1653            } || function (t, e) {
1654                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1655            }, t(e, n)
1656        };
1657        return function (e, n) {
1658            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1659
1660            function r() {
1661                this.constructor = e
1662            }
1663
1664            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1665        }
1666    }();
1667    const gt = function (t) {
1668        function e() {
1669            return null !== t && t.apply(this, arguments) || this
1670        }
1671
1672        return yt(e, t), e
1673    }(dt);
1674    const vt = function () {
1675        function t(t, e, n) {
1676            this.trackingPlatform = t, this.config = e, this.sessionStorage = n
1677        }
1678
1679        return t.prototype.initEvent = function () {
1680            document.addEventListener("click", this.handleEvent.bind(this), !0)
1681        }, t.prototype.triggerEvent = function (t) {
1682            return e = this, n = void 0, o = function () {
1683                var e, n;
1684                return function (t, e) {
1685                    var n, r, o, i, a = {
1686                        label: 0, sent: function () {
1687                            if (1 & o[0]) throw o[1];
1688                            return o[1]
1689                        }, trys: [], ops: []
1690                    };
1691                    return i = {
1692                        next: c(0),
1693                        throw: c(1),
1694                        return: c(2)
1695                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
1696                        return this
1697                    }), i;
1698
1699                    function c(i) {
1700                        return function (c) {
1701                            return function (i) {
1702                                if (n) throw new TypeError("Generator is already executing.");
1703                                for (; a;) try {
1704                                    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;
1705                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
1706                                        case 0:
1707                                        case 1:
1708                                            o = i;
1709                                            break;
1710                                        case 4:
1711                                            return a.label++, {value: i[1], done: !1};
1712                                        case 5:
1713                                            a.label++, r = i[1], i = [0];
1714                                            continue;
1715                                        case 7:
1716                                            i = a.ops.pop(), a.trys.pop();
1717                                            continue;
1718                                        default:
1719                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
1720                                                a = 0;
1721                                                continue
1722                                            }
1723                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
1724                                                a.label = i[1];
1725                                                break
1726                                            }
1727                                            if (6 === i[0] && a.label < o[1]) {
1728                                                a.label = o[1], o = i;
1729                                                break
1730                                            }
1731                                            if (o && a.label < o[2]) {
1732                                                a.label = o[2], a.ops.push(i);
1733                                                break
1734                                            }
1735                                            o[2] && a.ops.pop(), a.trys.pop();
1736                                            continue
1737                                    }
1738                                    i = e.call(t, a)
1739                                } catch (t) {
1740                                    i = [6, t], r = 0
1741                                } finally {
1742                                    n = o = 0
1743                                }
1744                                if (5 & i[0]) throw i[1];
1745                                return {value: i[0] ? i[1] : void 0, done: !0}
1746                            }([i, c])
1747                        }
1748                    }
1749                }(this, (function (r) {
1750                    switch (r.label) {
1751                        case 0:
1752                            return t.length ? [4, f.getProductsDetail
1752List(t, this.config, this.sessionStorage)] : [3, 2];
1753                        case 1:
1754                            (e = r.sent()).length && (n = this.sessionStorage.getAttributionDataList(), this.trackingPlatform.productClick(e[0], n)), r.label = 2;
1755                        case 2:
1756                            return [2]
1757                    }
1758                }))
1759            }, new ((r = void 0) || (r = Promise))((function (t, i) {
1760                function a(t) {
1761                    try {
1762                        s(o.next(t))
1763                    } catch (t) {
1764                        i(t)
1765                    }
1766                }
1767
1768                function c(t) {
1769                    try {
1770                        s(o.throw(t))
1771                    } catch (t) {
1772                        i(t)
1773                    }
1774                }
1775
1776                function s(e) {
1777                    var n;
1778                    e.done ? t(e.value) : (n = e.value, n instanceof r ? n : new r((function (t) {
1779                        t(n)
1780                    }))).then(a, c)
1781                }
1782
1783                s((o = o.apply(e, n || [])).next())
1784            }));
1785            var e, n, r, o
1786        }, t
1787    }();
1788    var mt = function () {
1789        var t = function (e, n) {
1790            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1791                t.__proto__ = e
1792            } || function (t, e) {
1793                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1794            }, t(e, n)
1795        };
1796        return function (e, n) {
1797            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1798
1799            function r() {
1800                this.constructor = e
1801            }
1802
1803            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1804        }
1805    }();
1806    const _t = function (t) {
1807        function e() {
1808            return null !== t && t.apply(this, arguments) || this
1809        }
1810
1811        return mt(e, t), e.prototype.handleEvent = function (t) {
1812            if (0 === t.button && t.target instanceof Element) {
1813                var n = e.getProductThemeDataList(t.target);
1814                this.triggerEvent(n)
1815            }
1816        }, e.getProductThemeDataList = function (t) {
1817            var e = [];
1818            if (t.closest(".js-product-miniature a")) {
1819                var n = t.closest(".js-product-miniature");
1820                if (n instanceof HTMLElement) {
1821                    var r = parseInt(n.dataset.idProduct || "0"), o = parseInt(n.dataset.idProductAttribute || "0");
1822                    r && e.push({idProduct: r, idProductAttribute: o})
1823                }
1824            }
1825            return e
1826        }, e
1827    }(vt);
1828    const wt = function () {
1829        function t(t, e, n) {
1830            this.trackingPlatform = t, this.config = e, this.sessionStorage = n
1831        }
1832
1833        return t.prototype.initEvent = function () {
1834            document.addEventListener("click", this.handleEvent.bind(this), !1)
1835        }, t.prototype.triggerEvent = function (t, e) {
1836            return n = this, r = void 0, i = function () {
1837                var n;
1838                return function (t, e) {
1839                    var n, r, o, i, a = {
1840                        label: 0, sent: function () {
1841                            if (1 & o[0]) throw o[1];
1842                            return o[1]
1843                        }, trys: [], ops: []
1844                    };
1845                    return i = {
1846                        next: c(0),
1847                        throw: c(1),
1848                        return: c(2)
1849                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
1850                        return this
1851                    }), i;
1852
1853                    function c(i) {
1854                        return function (c) {
1855                            return function (i) {
1856                                if (n) throw new TypeError("Generator is already executing.");
1857                                for (; a;) try {
1858                                    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;
1859                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
1860                                        case 0:
1861                                        case 1:
1862                                            o = i;
1863                                            break;
1864                                        case 4:
1865                                            return a.label++, {value: i[1], done: !1};
1866                                        case 5:
1867                                            a.label++, r = i[1], i = [0];
1868                                            continue;
1869                                        case 7:
1870                                            i = a.ops.pop(), a.trys.pop();
1871                                            continue;
1872                                        default:
1873                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
1874                                                a = 0;
1875                                                continue
1876                                            }
1877                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
1878                                                a.label = i[1];
1879                                                break
1880                                            }
1881                                            if (6 === i[0] && a.label < o[1]) {
1882                                                a.label = o[1], o = i;
1883                                                break
1884                                            }
1885                                            if (o && a.label < o[2]) {
1886                                                a.label = o[2], a.ops.push(i);
1887                                                break
1888                                            }
1889                                            o[2] && a.ops.pop(), a.trys.pop();
1890                                            continue
1891                                    }
1892                                    i = e.call(t, a)
1893                                } catch (t) {
1894                                    i = [6, t], r = 0
1895                                } finally {
1896                                    n = o = 0
1897                                }
1898                                if (5 & i[0]) throw i[1];
1899                                return {value: i[0] ? i[1] : void 0, done: !0}
1900                            }([i, c])
1901                        }
1902                    }
1903                }(this, (function (r) {
1904                    switch (r.label) {
1905                        case 0:
1906                            return t.length && e ? [4, f.getProductsDetailList(t, this.config, this.sessionStorage)] : [3, 2];
1907                        case 1:
1908                            (n = r.sent()).length && this.trackingPlatform.productShare(n[0], e), r.label = 2;
1909                        case 2:
1910                            return [2]
1911                    }
1912                }))
1913            }, new ((o = void 0) || (o = Promise))((function (t, e) {
1914                function a(t) {
1915                    try {
1916                        s(i.next(t))
1917                    } catch (t) {
1918                        e(t)
1919                    }
1920                }
1921
1922                function c(t) {
1923                    try {
1924                        s(i.throw(t))
1925                    } catch (t) {
1926                        e(t)
1927                    }
1928                }
1929
1930                function s(e) {
1931                    var n;
1932                    e.done ? t(e.value) : (n = e.value, n instanceof o ? n : new o((function (t) {
1933                        t(n)
1934                    }))).then(a, c)
1935                }
1936
1937                s((i = i.apply(n, r || [])).next())
1938            }));
1939            var n, r, o, i
1940        }, t.getSocialNetwork = function (t) {
1941            return t.dataset.network || t.dataset.type || t.title || ""
1942        }, t
1943    }();
1944    var Pt = function () {
1945        var t = function (e, n) {
1946            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1947                t.__proto__ = e
1948            } || function (t, e) {
1949                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
1950            }, t(e, n)
1951        };
1952        return function (e, n) {
1953            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
1954
1955            function r() {
1956                this.constructor = e
1957            }
1958
1959            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
1960        }
1961    }();
1962    const bt = function (t) {
1963        function e() {
1964            var e = null !== t && t.apply(this, arguments) || this;
1965            return e.productView = {idProduct: 0, idProductAttribute: 0}, e.productQuickView = {
1966                idProduct: 0,
1967                idProductAttribute: 0
1968            }, e
1969        }
1970
1971        return Pt(e, t), e.prototype.initEvent = function () {
1972            t.prototype.initEvent.call(this), prestashop.on("clickQuickView", this.handlePSEvent.bind(this)), prestashop.on("updatedProduct", this.handlePSEvent.bind(this))
1973        }, e.prototype.handlePSEvent = function (t) {
1974            e.isEventQuickView(t) ? (this.productQuickView.idProduct = t.dataset.idProduct, this.productQuickView.idProductAttribute = t.dataset.idProductAttribute) : this.productView.idProductAttribute = parseInt(t.id_product_attribute)
1975        }, e.isEventQuickView = function (t) {
1976            return Object.prototype.hasOwnProperty.call(t, "dataset")
1977        }, e.prototype.handleEvent = function (t) {
1978            if (0 === t.button && t.target instanceof Element) {
1979                var n = t.target.closest(".js-social-sharing");
1980                if (n instanceof HTMLElement) {
1981                    var r = this.getProductsDataList(n), o = e.getSocialNetwork(n);
1982                    this.triggerEvent(r, o)
1983                }
1984            }
1985        }, e.prototype.getProductsDataList = function (t) {
1986            var e = [],
1987                n = t.closest("[id^=quickview-modal-]") instanceof HTMLElement ? this.productQuickView : this.productView;
1988            return n.idProduct && e.push(n), e
1989        }, e.prototype.initDataEvent = function (t) {
1990            "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)
1991        }, e
1992    }(wt), Et = function (t, e, n) {
1993        this.trackingPlatform = t, this.config = e, this.sessionStorage = n
1994    };
1995    var kt = function () {
1996        var t = function (e, n) {
1997            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
1998                t.__proto__ = e
1999            } || function (t, e) {
2000                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2001            }, t(e, n)
2002        };
2003        return function (e, n) {
2004            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2005
2006            function r() {
2007                this.constructor = e
2008            }
2009
2010            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2011        }
2012    }();
2013    const St = function (t) {
2014        function e() {
2015            var e = null !== t && t.apply(this, arguments) || this;
2016            return e.latestProductView = "", e.productView = {
2017                idProduct: 0,
2018                idProductAttribute: 0
2019            }, e.productQuickView = {idProduct: 0, idProductAttribute: 0}, e
2020        }
2021
2022        return kt(e, t), e.prototype.initEvent = function () {
2023            prestashop.on("clickQuickView", this.triggerEvent.bind(this)), prestashop.on("updatedProduct", this.triggerEvent.bind(this))
2024        }, e.prototype.triggerEvent = function (t) {
2025            return e = this, n = void 0, o = function () {
2026                var e, n;
2027                return function (t, e) {
2028                    var n, r, o, i, a = {
2029                        label: 0, sent: function () {
2030                            if (1 & o[0]) throw o[1];
2031                            return o[1]
2032                        }, trys: [], ops: []
2033                    };
2034                    return i = {
2035                        next: c(0),
2036                        throw: c(1),
2037                        return: c(2)
2038                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
2039                        return this
2040                    }), i;
2041
2042                    function c(i) {
2043                        return function (c) {
2044                            return function (i) {
2045                                if (n) throw new TypeError("Generator is already executing.");
2046                                for (; a;) try {
2047                                    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;
2048                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
2049                                        case 0:
2050                                        case 1:
2051                                            o = i;
2052                                            break;
2053                                        case 4:
2054                                            return a.label++, {value: i[1], done: !1};
2055                                        case 5:
2056                                            a.label++, r = i[1], i = [0];
2057                                            continue;
2058                                        case 7:
2059                                            i = a.ops.pop(), a.trys.pop();
2060                                            continue;
2061                                        default:
2062                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
2063                                                a = 0;
2064                                                continue
2065                                            }
2066                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
2067                                                a.label = i[1];
2068                                                break
2069                                            }
2070                                            if (6 === i[0] && a.label < o[1]) {
2071                                                a.label = o[1], o = i;
2072                                                break
2073                                            }
2074                                            if (o && a.label < o[2]) {
2075                                                a.label = o[2], a.ops.push(i);
2076                                                break
2077                                            }
2078                                            o[2] && a.ops.pop(), a.trys.pop();
2079                                            continue
2080                                    }
2081                                    i = e.call(t, a)
2082                                } catch (t) {
2083                                    i = [6, t], r = 0
2084                                } finally {
2085                                    n = o = 0
2086                                }
2087                                if (5 & i[0]) throw i[1];
2088                                return {value: i[0] ? i[1] : void 0, done: !0}
2089                            }([i, c])
2090                        }
2091                    }
2092                }(this, (function (r) {
2093                    switch (r.label) {
2094                        case 0:
2095                            return (e = this.getProductsDataList(t)).length ? [4, f.getProductsDetail
2095List(e, this.config, this.sessionStorage)] : [3, 2];
2096                        case 1:
2097                            (n = r.sent()).length && this.trackingPlatform.productView(n[0]), r.label = 2;
2098                        case 2:
2099                            return [2]
2100                    }
2101                }))
2102            }, new ((r = void 0) || (r = Promise))((function (t, i) {
2103                function a(t) {
2104                    try {
2105                        s(o.next(t))
2106                    } catch (t) {
2107                        i(t)
2108                    }
2109                }
2110
2111                function c(t) {
2112                    try {
2113                        s(o.throw(t))
2114                    } catch (t) {
2115                        i(t)
2116                    }
2117                }
2118
2119                function s(e) {
2120                    var n;
2121                    e.done ? t(e.value) : (n = e.value, n instanceof r ? n : new r((function (t) {
2122                        t(n)
2123                    }))).then(a, c)
2124                }
2125
2126                s((o = o.apply(e, n || [])).next())
2127            }));
2128            var e, n, r, o
2129        }, e.prototype.getProductsDataList = function (t) {
2130            var n = [];
2131            if (e.isEventQuickView(t)) this.productQuickView.idProduct = t.dataset.idProduct, this.productQuickView.idProductAttribute = t.dataset.idProductAttribute, n.push(this.productQuickView); else {
2132                var r = e.isQuickViewModal() ? this.productQuickView : this.productView;
2133                r.idProductAttribute = parseInt(t.id_product_attribute), this.isLatestProductView(r) && (n.push(r), this.setLatestProductView(r))
2134            }
2135            return n
2136        }, e.isEventQuickView = function (t) {
2137            return Object.prototype.hasOwnProperty.call(t, "dataset")
2138        }, e.isQuickViewModal = function () {
2139            return Boolean(document.querySelector("[id^=quickview]"))
2140        }, e.prototype.isLatestProductView = function (t) {
2141            return this.latestProductView !== JSON.stringify(t)
2142        }, e.prototype.setLatestProductView = function (t) {
2143            this.latestProductView = JSON.stringify(t)
2144        }, e.prototype.initDataEvent = function (t) {
2145            if (Object.prototype.hasOwnProperty.call(t, "detail_product_view") && t.detail_product_view.length) {
2146                this.sessionStorage.addProductsList(t.detail_product_view);
2147                var e = t.detail_product_view[0];
2148                this.productView.idProduct = e.id_product, this.productView.idProductAttribute = e.id_attribute, this.trackingPlatform.productView(e), this.setLatestProductView(this.productView)
2149            }
2150        }, e
2151    }(Et), Ot = function () {
2152        function t() {
2153            this.promoData = {promoURL: "", promoParams: {pid: "", pnm: "", pps: "", cnm: "", csl: ""}}
2154        }
2155
2156        return t.getPromotionData = function (e) {
2157            var n = e.href, r = new t, o = r.getPromotionParams(e.search);
2158            return t.isPromoParams(o) && (r.setPromoURL(n), r.setPromoParams(o)), r.promoData
2159        }, t.prototype.getPromotionParams = function (e) {
2160            var n = {};
2161            if (e) {
2162                var r = new URLSearchParams(e);
2163                t.hasRequiredPromotionParams(r) && Object.keys(this.promoData.promoParams).forEach((function (t) {
2164                    var e = r.get(t);
2165                    e && (n[t] = e)
2166                }))
2167            }
2168            return n
2169        }, t.hasRequiredPromotionParams = function (t) {
2170            return Boolean(t.get("pid"))
2171        }, t.isPromoParams = function (t) {
2172            return Boolean(Object.keys(t).length)
2173        }, t.prototype.setPromoURL = function (t) {
2174            this.promoData.promoURL = t
2175        }, t.prototype.setPromoParams = function (t) {
2176            this.promoData.promoParams = t
2177        }, t
2178    }(), Ct = function () {
2179        function t(t) {
2180            this.trackingPlatform = t
2181        }
2182
2183        return t.prototype.initEvent = function () {
2184            document.addEventListener("click", this.triggerEvent.bind(this), !0)
2185        }, t.prototype.triggerEvent = function (t) {
2186            var e = this.getPromotionData(t);
2187            e && this.trackingPlatform.promotionClick([e])
2188        }, t.prototype.getPromotionData = function (t) {
2189            var e = null;
2190            if (0 === t.button && t.target instanceof Element) {
2191                var n = t.target.closest(".js-track-promo a");
2192                e = n ? Ot.getPromotionData(n) : null
2193            }
2194            return e
2195        }, t
2196    }();
2197    var Lt = function () {
2198        var t = function (e, n) {
2199            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2200                t.__proto__ = e
2201            } || function (t, e) {
2202                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2203            }, t(e, n)
2204        };
2205        return function (e, n) {
2206            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2207
2208            function r() {
2209                this.constructor = e
2210            }
2211
2212            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2213        }
2214    }();
2215    const Tt = function (t) {
2216        function e() {
2217            return null !== t && t.apply(this, arguments) || this
2218        }
2219
2220        return Lt(e, t), e
2221    }(Ct), jt = function () {
2222        function t(t, e) {
2223            this.trackingPlatform = t, this.config = e
2224        }
2225
2226        return t.prototype.initEvent = function () {
2227            var t;
2228            (null === (t = this.config.context.page.search_term) || void 0 === t ? void 0 : t.length) && this.trackingPlatform.searchPageView()
2229        }, t
2230    }();
2231    var Vt = function () {
2232        var t = function (e, n) {
2233            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2234                t.__proto__ = e
2235            } || function (t, e) {
2236                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2237            }, t(e, n)
2238        };
2239        return function (e, n) {
2240            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2241
2242            function r() {
2243                this.constructor = e
2244            }
2245
2246            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2247        }
2248    }();
2249    const xt = function (t) {
2250        function e() {
2251            return null !== t && t.apply(this, arguments) || this
2252        }
2253
2254        return Vt(e, t), e
2255    }(jt), Dt = function () {
2256        function t(t, e, n) {
2257            this.trackingPlatform = t, this.config = e, this.sessionStorage = n, this.scrollTimeout = 0, this.allItemsList = this.getAllItemsList()
2258        }
2259
2260        return t.prototype.initEvent = function () {
2261            window.addEventListener("scroll", this.triggerEvent.bind(this), !0), this.parseItemsList(), this.sendItems()
2262        }, t.prototype.triggerEvent = function () {
2263            var t = this;
2264            window.clearTimeout(this.scrollTimeout), this.parseItemsList(), this.scrollTimeout = window.setTimeout((function () {
2265                return t.sendItems()
2266            }), 800)
2267        }, t.prototype.parseItemsList = function () {
2268            this.allItemsList.length && this.allItemsList.forEach((function (e) {
2269                var n = e.getItemsListDetected();
2270                n.length && n.forEach((function (n) {
2271                    t.isElementInViewport(n) && e.addItem(n)
2272                }))
2273            }))
2274        }, t.isElementInViewport = function (t) {
2275            var e, n, r, o, i = !1, a = window.innerHeight, c = window.pageYOffset, s = c, u = c + a,
2276                p = t.clientHeight;
2277            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
2278        }, t.prototype.sendItems = function () {
2279            this.allItemsList.forEach((function (t) {
2280                t.sendItems()
2281            })), window.clearTimeout(this.scrollTimeout)
2282        }, t
2283    }();
2284    var At = function (t, e, n) {
2285        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]);
2286        return t.concat(r || Array.prototype.slice.call(e))
2287    };
2288    const Mt = function () {
2289        function t(t, e, n, r) {
2290            this.itemSelector = t, this.trackingPlatform = e, this.config = n, this.sessionStorage = r, this.sendProducts = new Set, this.sentProducts = new Set, this.productsPosition = {}
2291        }
2292
2293        return t.prototype.getItemsListDetected = function () {
2294            return document.querySelectorAll(this.itemSelector)
2295        }, t.prototype.addItem = function (t) {
2296            var e = parseInt(t.getAttribute("data-id-product")) || 0,
2297                n = parseInt(t.getAttribute("data-id-product-attribute")) || 0;
2298            if (e) {
2299                var r = {idProduct: e, idProductAttribute: n}, o = JSON.stringify(r);
2300                this.sentProducts.has(o) || this.sendProducts.has(o) || this.sendProducts.add(o)
2301            }
2302        }, t.prototype.sendItems = function () {
2303            return t = this, e = void 0, r = function () {
2304                var t, e;
2305                return function (t, e) {
2306                    var n, r, o, i, a = {
2307                        label: 0, sent: function () {
2308                            if (1 & o[0]) throw o[1];
2309                            return o[1]
2310                        }, trys: [], ops: []
2311                    };
2312                    return i = {
2313                        next: c(0),
2314                        throw: c(1),
2315                        return: c(2)
2316                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
2317                        return this
2318                    }), i;
2319
2320                    function c(i) {
2321                        return function (c) {
2322                            return function (i) {
2323                                if (n) throw new TypeError("Generator is already executing.");
2324                                for (; a;) try {
2325                                    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;
2326                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
2327                                        case 0:
2328                                        case 1:
2329                                            o = i;
2330                                            break;
2331                                        case 4:
2332                                            return a.label++, {value: i[1], done: !1};
2333                                        case 5:
2334                                            a.label++, r = i[1], i = [0];
2335                                            continue;
2336                                        case 7:
2337                                            i = a.ops.pop(), a.trys.pop();
2338                                            continue;
2339                                        default:
2340                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
2341                                                a = 0;
2342                                                continue
2343                                            }
2344                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
2345                                                a.label = i[1];
2346                                                break
2347                                            }
2348                                            if (6 === i[0] && a.label < o[1]) {
2349                                                a.label = o[1], o = i;
2350                                                break
2351                                            }
2352                                            if (o && a.label < o[2]) {
2353                                                a.label = o[2], a.ops.push(i);
2354                                                break
2355                                            }
2356                                            o[2] && a.ops.pop(), a.trys.pop();
2357                                            continue
2358                                    }
2359                                    i = e.call(t, a)
2360                                } catch (t) {
2361                                    i = [6, t], r = 0
2362                                } finally {
2363                                    n = o = 0
2364                                }
2365                                if (5 & i[0]) throw i[1];
2366                                return {value: i[0] ? i[1] : void 0, done: !0}
2367                            }([i, c])
2368                        }
2369                    }
2370                }(this, (function (n) {
2371                    switch (n.label) {
2372                        case 0:
2373                            return this.sendProducts.size ? (this.buildProductPositions(), t = this.getProductsDataListFromSendProducts(), [4, f.getProductsDetailList(t, this.config, this.sessionStorage)]) : [3, 2];
2374                        case 1:
2375                            (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;
2376                        case 2:
2377                            return [2]
2378                    }
2379                }))
2380            }, new ((n = void 0) || (n = Promise))((function (o, i) {
2381                function a(t) {
2382                    try {
2383                        s(r.next(t))
2384                    } catch (t) {
2385                        i(t)
2386                    }
2387                }
2388
2389                function c(t) {
2390                    try {
2391                        s(r.throw(t))
2392                    } catch (t) {
2393                        i(t)
2394                    }
2395                }
2396
2397                function s(t) {
2398                    var e;
2399                    t.done ? o(t.value) : (e = t.value, e instanceof n ? e : new n((function (t) {
2400                        t(e)
2401                    }))).then(a, c)
2402                }
2403
2404                s((r = r.apply(t, e || [])).next())
2405            }));
2406            var t, e, n, r
2407        }, t.prototype.getProductsDataListFromSendProducts = function () {
2408            var t = [];
2409            return this.sendProducts.forEach((function (e) {
2410                t.push(JSON.parse(e))
2411            })), t
2412        }, t.prototype.buildProductPositions = function () {
2413            var t, e, n = this, r = this.getItemsListDetected(), o = this.getPageFirstPosition();
2414            r.forEach((function (r) {
2415                if (t = parseInt(r.getAttribute("data-id-product")) || 0, e = parseInt(r.getAttribute("data-id-product-attribute")) || 0, t) {
2416                    var i = {idProduct: t, idProductAttribute: e}, a = JSON.stringify(i);
2417                    Object.prototype.hasOwnProperty.call(n.productsPosition, a) || (n.productsPosition[a] = o, o += 1), n.sessionStorage.addAttributionData(a, n.productsPosition[a])
2418                }
2419            }))
2420        }, t
2421    }();
2422    var It = function () {
2423        var t = function (e, n) {
2424            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2425                t.__proto__ = e
2426            } || function (t, e) {
2427                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2428            }, t(e, n)
2429        };
2430        return function (e, n) {
2431            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2432
2433            function r() {
2434                this.constructor = e
2435            }
2436
2437            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2438        }
2439    }();
2440    const qt = function (t) {
2441        function e(e, n, r) {
2442            return t.call(this, ".js-product-miniature", e, n, r) || this
2443        }
2444
2445        return It(e, t), e.prototype.getPageFirstPosition = function () {
2446            var t = 1, e = this.config.context.page.products_per_page,
2447                n = new URLSearchParams(window.location.search).get("page");
2448            return n && (t = parseInt(n)), e * t - e + 1
2449        }, e
2450    }(Mt);
2451    var Ht = function (t, e, n) {
2452        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]);
2453        return t.concat(r || Array.prototype.slice.call(e))
2454    };
2455    const Nt = function () {
2456        function t(t) {
2457            this.trackingPlatform = t, this.itemSelector = ".js-track-promo", this.sendPromotions = new Set, this.sentPromotions = new Set
2458        }
2459
2460        return t.prototype.getItemsListDetected = function () {
2461            return document.querySelectorAll(this.itemSelector)
2462        }, t.prototype.addItem = function (t) {
2463            var e = t.querySelector("a");
2464            if (e) {
2465                var n = Ot.getPromotionData(e);
2466                if (n.promoParams.pid) {
2467                    var r = JSON.stringify(n);
2468                    this.sendPromotions.has(r) || this.sentPromotions.has(r) || this.sendPromotions.add(r)
2469                }
2470            }
2471        }, t.prototype.sendItems = function () {
2472            if (this.sendPromotions.size) {
2473                var t = [];
2474                this.sendPromotions.forEach((function (e) {
2475                    t.push(JSON.parse(e))
2476                })), this.trackingPlatform.promotionsList(t), this.sentPromotions = new Set(Ht(Ht([], Array.from(this.sentPromotions), !0), Array.from(this.sendPromotions), !0)), this.sendPromotions.clear()
2477            }
2478        }, t
2479    }();
2480    var Qt = function () {
2481        var t = function (e, n) {
2482            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2483                t.__proto__ = e
2484            } || function (t, e) {
2485                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2486            }, t(e, n)
2487        };
2488        return function (e, n) {
2489            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2490
2491            function r() {
2492                this.constructor = e
2493            }
2494
2495            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2496        }
2497    }();
2498    const Bt = function (t) {
2499        function e() {
2500            return null !== t && t.apply(this, arguments) || this
2501        }
2502
2503        return Qt(e, t), e
2504    }(Nt);
2505    var Ft = function () {
2506        var t = function (e, n) {
2507            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2508                t.__proto__ = e
2509            } || function (t, e) {
2510                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2511            }, t(e, n)
2512        };
2513        return function (e, n) {
2514            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2515
2516            function r() {
2517                this.constructor = e
2518            }
2519
2520            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2521        }
2522    }();
2523    const Rt = function (t) {
2524        function e() {
2525            return null !== t && t.apply(this, arguments) || this
2526        }
2527
2528        return Ft(e, t), e.prototype.getAllItemsList = function () {
2529            return [new qt(this.trackingPlatform, this.config, this.sessionStorage), new Bt(this.trackingPlatform)]
2530        }, e
2531    }(Dt);
2532    var zt = function () {
2533        var t = function (e, n) {
2534            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2535                t.__proto__ = e
2536            } || function (t, e) {
2537                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2538            }, t(e, n)
2539        };
2540        return function (e, n) {
2541            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2542
2543            function r() {
2544                this.constructor = e
2545            }
2546
2547            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2548        }
2549    }();
2550    const Ut = function (t) {
2551        function e() {
2552            return null !== t && t.apply(this, arguments) || this
2553        }
2554
2555        return zt(e, t), e.prototype.createAddToCartEvent = function () {
2556            this.actionTrackingEvents.push(new y(this.trackingPlatform, this.config, this.sessionStorage))
2557        }, e.prototype.createCartViewEvent = function () {
2558            if ("cart" === this.config.context.page.controller_name) {
2559                var t = new w(this.trackingPlatform, this.config, this.sessionStorage);
2560                this.actionTrackingEvents.push(t), this.dataTrackingEvents.push(t)
2561            }
2562        }, e.prototype.createCategoryEvent = function () {
2563            "category" === this.config.context.page.controller_name && this.actionTrackingEvents.push(new E(this.trackingPlatform, this.config))
2564        }, e.prototype.createCheckoutEvent = function () {
2565            if (this.config.context.page.controller_name === this.config.context.tracking_module.checkout_module.controller) {
2566                var t = new ot(this.trackingPlatform, this.config, this.sessionStorage);
2567                this.actionTrackingEvents.push(t), this.dataTrackingEvents.push(t)
2568            }
2569        }, e.prototype.createCustomerLogin = function () {
2570            this.config.context.user.is_new_login && this.actionTrackingEvents.push(new ct(this.trackingPlatform, this.config))
2571        }, e.prototype.createCustomerSignUp = function () {
2572            this.config.context.user.is_new_account && this.actionTrackingEvents.push(new pt(this.trackingPlatform, this.config))
2573        }, e.prototype.createHomeEvent = function () {
2574            this.actionTrackingEvents.push(new ht(this.trackingPlatform, this.config))
2575        }, e.prototype.createOrderCompleteEvent = function () {
2576            this.dataTrackingEvents.push(new gt(this.trackingPlatform, this.config, this.sessionStorage))
2577        }, e.prototype.createProductClickEvent = function () {
2578            this.actionTrackingEvents.push(new _t(this.trackingPlatform, this.config, this.sessionStorage))
2579        }, e.prototype.createProductShareEvent = function () {
2580            var t = new bt(this.trackingPlatform, this.config, this.sessionStorage);
2581            this.actionTrackingEvents.push(t), "product" === this.config.context.page.controller_name && this.dataTrackingEvents.push(t)
2582        }, e.prototype.createProductViewEvent = function () {
2583            var t = new St(this.trackingPlatform, this.config, this.sessionStorage);
2584            this.actionTrackingEvents.push(t), "product" === this.config.context.page.controller_name && this.dataTrackingEvents.push(t)
2585        }, e.prototype.createPromotionClickEvent = function () {
2586            this.actionTrackingEvents.push(new Tt(this.trackingPlatform))
2587        }, e.prototype.createSearchEvent = function () {
2588            new RegExp("search").test(this.config.context.page.controller_name) && this.actionTrackingEvents.push(new xt(this.trackingPlatform, this.config))
2589        }, e.prototype.createViewItemsListEvent = function () {
2590            this.actionTrackingEvents.push(new Rt(this.trackingPlatform, this.config, this.sessionStorage))
2591        }, e
2592    }(a);
2593    var Gt = function () {
2594        var t = function (e, n) {
2595            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2596                t.__proto__ = e
2597            } || function (t, e) {
2598                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2599            }, t(e, n)
2600        };
2601        return function (e, n) {
2602            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2603
2604            function r() {
2605                this.constructor = e
2606            }
2607
2608            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2609        }
2610    }();
2611    const Jt = function (t) {
2612        function e() {
2613            return null !== t && t.apply(this, arguments) || this
2614        }
2615
2616        return Gt(e, t), e.prototype.initEvent = function () {
2617            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)
2618        }, e.prototype.removeFromCart = function (t) {
2619            if (0 === t.button && t.target instanceof Element) {
2620                var n = t.target.closest(".ajax_cart_block_remove_link");
2621                if (n instanceof HTMLAnchorElement) {
2622                    var r = "cart_block_product_", o = n.closest("[data-id^=".concat(r, "]"));
2623                    if (o instanceof HTMLElement) {
2624                        var i = e.getProductDataCartBlock(o, r), a = e.getQuantityCartBlock(o);
2625                        this.triggerEvent(i, a, this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))
2626                    }
2627                }
2628            }
2629        }, e.getProductDataCartBlock = function (t, e) {
2630            var n = [];
2631            if (t.dataset.id && t.dataset.id.length) {
2632                var r = t.dataset.id.replace(e, "").split("_");
2633                r.length && n.push({idProduct: parseInt(r[0]), idProductAttribute: parseInt(r[1] || "0")})
2634            }
2635            return n
2636        }, e.getQuantityCartBlock = function (t) {
2637            var e = 0, n = t.querySelector(".quantity");
2638            return n instanceof HTMLElement && (e = parseInt(n.innerText.trim())), e
2639        }, e.prototype.addToCartProductList = function (t) {
2640            console.log("--------- añadido al carrito ---------");
2641
2642            if (0 === t.button && t.target instanceof Element) {
2643                var n = t.target.closest(".ajax_add_to_cart_button");
2644                if (n instanceof HTMLElement) {
2645                    var r = e.getProductDataProductList(n), o = e.getQuantityProductList(n);
2646                    this.triggerEvent(r, o, this.trackingPlatform.addToCart.bind(this.trackingPlatform))
2647                }
2648            }
2649        }, e.getProductDataProductList = function (t) {
2650            var e = [];
2651            if (t.dataset.idProduct && t.dataset.idProductAttribute) {
2652                var n = parseInt(t.dataset.idProduct.trim()), r = parseInt(t.dataset.idProductAttribute.trim() || "0");
2653                n && e.push({idProduct: n, idProductAttribute: r})
2654            }
2655            return e
2656        },
2656 e.getQuantityProductList = function (t) {
2657            var e = 0, n = t.closest(".ajax_block_product");
2658            if (n instanceof HTMLElement) {
2659                var r = n.querySelector("[name=qty]");
2660                (r instanceof HTMLInputElement || r instanceof HTMLSelectElement) && (e = parseInt(r.value))
2661            }
2662            return !e && t.dataset.minimal_quantity && (e = parseInt(t.dataset.minimal_quantity.trim())), e
2663        }, e.prototype.addToCartProductView = function (t) {
2664            if (0 === t.button && t.target instanceof Element) {
2665                var n = t.target.closest("#add_to_cart");
2666                if (n instanceof HTMLElement) {
2667                    var r = n.closest("form");
2668                    if (r instanceof HTMLFormElement) {
2669                        var o = e.getProductDataProductView(r), i = e.getQuantityProductView(r);
2670                        this.triggerEvent(o, i, this.trackingPlatform.addToCart.bind(this.trackingPlatform))
2671                    }
2672                }
2673            }
2674        }, e.getProductDataProductView = function (t) {
2675            var e = [], n = t.querySelector("[name=id_product]"), r = t.querySelector("[name=id_product_attribute]");
2676            return n && r && e.push({idProduct: parseInt(n.value), idProductAttribute: parseInt(r.value || "0")}), e
2677        }, e.getQuantityProductView = function (t) {
2678            var e = 0, n = t.querySelector("[name=qty]");
2679            return n instanceof HTMLInputElement && (e = parseInt(n.value)), e
2680        }, e.prototype.triggerEvent = function (t, e, n) {
2681            return r = this, o = void 0, a = function () {
2682                var r;
2683                return function (t, e) {
2684                    var n, r, o, i, a = {
2685                        label: 0, sent: function () {
2686                            if (1 & o[0]) throw o[1];
2687                            return o[1]
2688                        }, trys: [], ops: []
2689                    };
2690                    return i = {
2691                        next: c(0),
2692                        throw: c(1),
2693                        return: c(2)
2694                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
2695                        return this
2696                    }), i;
2697
2698                    function c(i) {
2699                        return function (c) {
2700                            return function (i) {
2701                                if (n) throw new TypeError("Generator is already executing.");
2702                                for (; a;) try {
2703                                    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;
2704                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
2705                                        case 0:
2706                                        case 1:
2707                                            o = i;
2708                                            break;
2709                                        case 4:
2710                                            return a.label++, {value: i[1], done: !1};
2711                                        case 5:
2712                                            a.label++, r = i[1], i = [0];
2713                                            continue;
2714                                        case 7:
2715                                            i = a.ops.pop(), a.trys.pop();
2716                                            continue;
2717                                        default:
2718                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
2719                                                a = 0;
2720                                                continue
2721                                            }
2722                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
2723                                                a.label = i[1];
2724                                                break
2725                                            }
2726                                            if (6 === i[0] && a.label < o[1]) {
2727                                                a.label = o[1], o = i;
2728                                                break
2729                                            }
2730                                            if (o && a.label < o[2]) {
2731                                                a.label = o[2], a.ops.push(i);
2732                                                break
2733                                            }
2734                                            o[2] && a.ops.pop(), a.trys.pop();
2735                                            continue
2736                                    }
2737                                    i = e.call(t, a)
2738                                } catch (t) {
2739                                    i = [6, t], r = 0
2740                                } finally {
2741                                    n = o = 0
2742                                }
2743                                if (5 & i[0]) throw i[1];
2744                                return {value: i[0] ? i[1] : void 0, done: !0}
2745                            }([i, c])
2746                        }
2747                    }
2748                }(this, (function (o) {
2749                    switch (o.label) {
2750                        case 0:
2751                            return t.length ? [4, f.getProductsDetail
2751List(t, this.config, this.sessionStorage)] : [3, 2];
2752                        case 1:
2753                            (r = o.sent()).length && e && n(r[0], e), o.label = 2;
2754                        case 2:
2755                            return [2]
2756                    }
2757                }))
2758            }, new ((i = void 0) || (i = Promise))((function (t, e) {
2759                function n(t) {
2760                    try {
2761                        s(a.next(t))
2762                    } catch (t) {
2763                        e(t)
2764                    }
2765                }
2766
2767                function c(t) {
2768                    try {
2769                        s(a.throw(t))
2770                    } catch (t) {
2771                        e(t)
2772                    }
2773                }
2774
2775                function s(e) {
2776                    var r;
2777                    e.done ? t(e.value) : (r = e.value, r instanceof i ? r : new i((function (t) {
2778                        t(r)
2779                    }))).then(n, c)
2780                }
2781
2782                s((a = a.apply(r, o || [])).next())
2783            }));
2784            var r, o, i, a
2785        }, e
2786    }(c);
2787    var Kt = function () {
2788        var t = function (e, n) {
2789            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2790                t.__proto__ = e
2791            } || function (t, e) {
2792                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2793            }, t(e, n)
2794        };
2795        return function (e, n) {
2796            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2797
2798            function r() {
2799                this.constructor = e
2800            }
2801
2802            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2803        }
2804    }();
2805    const Wt = function (t) {
2806        function e() {
2807            return null !== t && t.apply(this, arguments) || this
2808        }
2809
2810        return Kt(e, t), e.prototype.initEvent = function () {
2811            "category" === this.config.context.page.controller_name && t.prototype.initEvent.call(this)
2812        }, e
2813    }(P);
2814    var Yt = function () {
2815        var t = function (e, n) {
2816            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2817                t.__proto__ = e
2818            } || function (t, e) {
2819                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2820            }, t(e, n)
2821        };
2822        return function (e, n) {
2823            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2824
2825            function r() {
2826                this.constructor = e
2827            }
2828
2829            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2830        }
2831    }();
2832    const Xt = function (t) {
2833        function e() {
2834            return null !== t && t.apply(this, arguments) || this
2835        }
2836
2837        return Yt(e, t), e.prototype.initEvent = function () {
2838            document.addEventListener("click", this.handleEvent.bind(this), !0)
2839        }, e.prototype.handleEvent = function (t) {
2840            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))
2841        }, e.prototype.increaseQuantity = function (t) {
2842            var n = e.getProductData(t);
2843            this.triggerEvent(n, 1, this.trackingPlatform.addToCart.bind(this.trackingPlatform))
2844        }, e.prototype.decreaseQuantity = function (t) {
2845            var n = e.getProductData(t);
2846            this.triggerEvent(n, 1, this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))
2847        }, e.prototype.removeFromCart = function (t) {
2848            var n = e.getProductData(t), r = e.getProductQuantity(t);
2849            this.triggerEvent(n, r, this.trackingPlatform.removeFromCart.bind(this.trackingPlatform))
2850        }, e.getProductData = function (t) {
2851            var e = [], n = "product_", r = t.closest("[id^=".concat(n, "]"));
2852            if (r instanceof HTMLElement) {
2853                var o = r.id.replace(n, "").split("_");
2854                if (o.length) {
2855                    var i = parseInt(o[0] || "0"), a = parseInt(o[1] || "0");
2856                    i && e.push({idProduct: i, idProductAttribute: a})
2857                }
2858            }
2859            return e
2860        }, e.getProductQuantity = function (t) {
2861            var e = 0, n = t.closest("[id^=".concat("product_", "]"));
2862            if (n instanceof HTMLElement) {
2863                var r = n.id.replace("product", "quantity"), o = n.querySelector("[name^=".concat(r, "]"));
2864                o instanceof HTMLInputElement && (e = parseInt(o.value || "0"))
2865            }
2866            return e
2867        }, e.prototype.triggerEvent = function (t, e, n) {
2868            return r = this, o = void 0, a = function () {
2869                var r;
2870                return function (t, e) {
2871                    var n, r, o, i, a = {
2872                        label: 0, sent: function () {
2873                            if (1 & o[0]) throw o[1];
2874                            return o[1]
2875                        }, trys: [], ops: []
2876                    };
2877                    return i = {
2878                        next: c(0),
2879                        throw: c(1),
2880                        return: c(2)
2881                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
2882                        return this
2883                    }), i;
2884
2885                    function c(i) {
2886                        return function (c) {
2887                            return function (i) {
2888                                if (n) throw new TypeError("Generator is already executing.");
2889                                for (; a;) try {
2890                                    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;
2891                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
2892                                        case 0:
2893                                        case 1:
2894                                            o = i;
2895                                            break;
2896                                        case 4:
2897                                            return a.label++, {value: i[1], done: !1};
2898                                        case 5:
2899                                            a.label++, r = i[1], i = [0];
2900                                            continue;
2901                                        case 7:
2902                                            i = a.ops.pop(), a.trys.pop();
2903                                            continue;
2904                                        default:
2905                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
2906                                                a = 0;
2907                                                continue
2908                                            }
2909                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
2910                                                a.label = i[1];
2911                                                break
2912                                            }
2913                                            if (6 === i[0] && a.label < o[1]) {
2914                                                a.label = o[1], o = i;
2915                                                break
2916                                            }
2917                                            if (o && a.label < o[2]) {
2918                                                a.label = o[2], a.ops.push(i);
2919                                                break
2920                                            }
2921                                            o[2] && a.ops.pop(), a.trys.pop();
2922                                            continue
2923                                    }
2924                                    i = e.call(t, a)
2925                                } catch (t) {
2926                                    i = [6, t], r = 0
2927                                } finally {
2928                                    n = o = 0
2929                                }
2930                                if (5 & i[0]) throw i[1];
2931                                return {value: i[0] ? i[1] : void 0, done: !0}
2932                            }([i, c])
2933                        }
2934                    }
2935                }(this, (function (o) {
2936                    switch (o.label) {
2937                        case 0:
2938                            return t.length ? [4, f.getProductsDetailList(t, this.config, this.sessionStorage)] : [3, 2];
2939                        case 1:
2940                            (r = o.sent()).length && e && n(r[0], e), o.label = 2;
2941                        case 2:
2942                            return [2]
2943                    }
2944                }))
2945            }, new ((i = void 0) || (i = Promise))((function (t, e) {
2946                function n(t) {
2947                    try {
2948                        s(a.next(t))
2949                    } catch (t) {
2950                        e(t)
2951                    }
2952                }
2953
2954                function c(t) {
2955                    try {
2956                        s(a.throw(t))
2957                    } catch (t) {
2958                        e(t)
2959                    }
2960                }
2961
2962                function s(e) {
2963                    var r;
2964                    e.done ? t(e.value) : (r = e.value, r instanceof i ? r : new i((function (t) {
2965                        t(r)
2966                    }))).then(n, c)
2967                }
2968
2969                s((a = a.apply(r, o || [])).next())
2970            }));
2971            var r, o, i, a
2972        }, e
2973    }(g);
2974    var Zt = function () {
2975        var t = function (e, n) {
2976            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
2977                t.__proto__ = e
2978            } || function (t, e) {
2979                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
2980            }, t(e, n)
2981        };
2982        return function (e, n) {
2983            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
2984
2985            function r() {
2986                this.constructor = e
2987            }
2988
2989            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
2990        }
2991    }();
2992    const $t = function (t) {
2993        function e(e, n, r) {
2994            var o = t.call(this, e, n, r) || this;
2995            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.cartViewEvent = new Xt(o.trackingPlatform, o.config, o.sessionStorage), o
2996        }
2997
2998        return Zt(e, t), e.prototype.initEvent = function () {
2999            e.isCartViewEvent() ? this.cartViewEvent.initEvent() : this.initCheckoutEvent()
3000        }, e.prototype.delegateCheckoutEvent = function (t) {
3001            if (e.isValidMouseEvent(t)) {
3002                var n = t.target;
3003                n.matches("#onepagecheckoutps_contenedor *") && (e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidPaymentSelectionEvent(n) ? this.getPaymentSelected() : e.isValidPurchaseEvent(n) && this.triggerPurchaseEvent())
3004            }
3005        }, e.prototype.getCarrierSelected = function () {
3006            var t = "", e = document.querySelector("[name^=delivery_option]:checked");
3007            if (e instanceof HTMLInputElement) {
3008                var n = e.closest(".delivery_option");
3009                if (n instanceof HTMLElement) {
3010                    var r = n.querySelector(".delivery_option_title");
3011                    t = r instanceof HTMLElement && r.textContent ? r.textContent : ""
3012                }
3013            }
3014            this.carrierSelected = t.trim().toLowerCase()
3015        }, e.prototype.getPaymentSelected = function () {
3016            var t = "", e = document.querySelector("[name^=method_payment]:checked");
3017            e instanceof HTMLInputElement && (t = e.value || ""), this.paymentSelected = t.trim().toLowerCase()
3018        }, e.prototype.triggerPurchaseEvent = function () {
3019            e.isCheckoutWithCarrier(this.checkoutCarrierNodeSelector) && this.sendTrackingCarrierOption(), this.sendTrackingPaymentOption()
3020        }, e.prototype.initDataEvent = function (n) {
3021            e.isCartViewEvent() ? this.cartViewEvent.initDataEvent(n) : t.prototype.initDataEvent.call(this, n)
3022        }, e
3023    }(U);
3024    var te = function () {
3025        var t = function (e, n) {
3026            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3027                t.__proto__ = e
3028            } || function (t, e) {
3029                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3030            }, t(e, n)
3031        };
3032        return function (e, n) {
3033            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3034
3035            function r() {
3036                this.constructor = e
3037            }
3038
3039            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3040        }
3041    }();
3042    const ee = function (t) {
3043        function e(e, n, r) {
3044            var o = t.call(this, e, n, r) || this;
3045            return o.trackingPlatform = e, o.config = n, o.sessionStorage = r, o.paymentTarget = null, o.lastSelectedOptions = {
3046                carrierSelected: "",
3047                paymentSelected: ""
3048            }, o.cartViewEvent = new Xt(o.trackingPlatform, o.config, o.sessionStorage), o
3049        }
3050
3051        return te(e, t), e.prototype.getCarrierSelected = function () {
3052            var t = "", e = document.querySelector(".delivery_options_address input:checked");
3053            if (e instanceof HTMLInputElement) if (e.dataset.carrier) t = e.dataset.carrier; else {
3054                var n = e.closest(".delivery_option");
3055                if (n instanceof HTMLElement) {
3056                    var r = n.querySelector("td > strong");
3057                    t = r instanceof HTMLElement ? r.innerText.trim() : ""
3058                }
3059            }
3060            this.carrierSelected = t
3061        }, e.prototype.getPaymentSelected = function () {
3062            if (this.paymentTarget instanceof Element) {
3063                var t = this.paymentTarget, n = "not detected",
3064                    r = t.closest("[data-module-name]") || t.closest("a[class]") || t.closest("a[href]") || t.closest("[title]");
3065                if (r instanceof Element) {
3066                    var o;
3067                    (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)
3068                }
3069                this.paymentSelected = n
3070            }
3071        }, e.isValidURL = function (t) {
3072            var e;
3073            try {
3074                e = "null" !== new URL(t).origin
3075            } catch (t) {
3076                e = !1
3077            }
3078            return e
3079        }, e.getModuleFromURL = function (t) {
3080            var e = t.pathname.split("/"), n = e.indexOf("module") + 1;
3081            return e[n] || ""
3082        }, e.isValidCarrierSelectionEvent = function (t) {
3083            return t.matches("#carrier_area .delivery_options *")
3084        }, e.isValidPurchaseEvent = function (t) {
3085            return t.matches("#HOOK_PAYMENT *") && !e.isInvalidTarget(t) && e.isValidAgreement()
3086        }, e.isInvalidTarget = function (t) {
3087            return Boolean(["#ps_checkout-displayPayment .payment_module.open:not([data-module-name]) *", "#ps_checkout-displayPayment .ps_checkout-payment-option.row"].find((function (e) {
3088                return t.matches(e)
3089            })))
3090        }, e
3091    }(S);
3092    var ne = function () {
3093        var t = function (e, n) {
3094            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3095                t.__proto__ = e
3096            } || function (t, e) {
3097                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3098            }, t(e, n)
3099        };
3100        return function (e, n) {
3101            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3102
3103            function r() {
3104                this.constructor = e
3105            }
3106
3107            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3108        }
3109    }();
3110    const re = function (t) {
3111        function e() {
3112            return null !== t && t.apply(this, arguments) || this
3113        }
3114
3115        return ne(e, t), e.prototype.initEvent = function () {
3116            this.setCurrentStep(), this.initStepEvent()
3117        }, e.prototype.setCurrentStep = function () {
3118            var t = this;
3119            document.querySelectorAll("#order_step li").forEach((function (e, n) {
3120                e.classList.contains("step_current") && (t.step = n > 1 ? n - 1 : 0)
3121            }))
3122        }, e.prototype.initStepEvent = function () {
3123            0 === this.step ? this.cartViewEvent.initEvent() : this.step >= 2 && this.initCheckoutEvent()
3124        }, e.prototype.setDefaultCheckoutValues = function () {
3125            2 === this.step && this.getCarrierSelected()
3126        }, e.prototype.delegateCheckoutEvent = function (t) {
3127            if (e.isValidMouseEvent(t) && t.target instanceof Element) {
3128                var n = t.target;
3129                e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidCarrierEvent(n) ? this.sendTrackingCarrierOption() : e.isValidPurchaseEvent(n) && (this.paymentTarget = n, this.triggerPurchaseEvent())
3130            }
3131        }, e.isValidCarrierEvent = function (t) {
3132            return Boolean(t.closest("button[name^=processCarrier]")) && e.isValidAgreement() && !document.querySelector("#input_virtual_carrier")
3133        }, e.prototype.triggerPurchaseEvent = function () {
3134            this.getPaymentSelected(), this.lastSelectedOptions.paymentSelected !== this.paymentSelected && (this.sendTrackingPaymentOption(), this.lastSelectedOptions.paymentSelected = this.paymentSelected)
3135        }, e.prototype.initDataEvent = function (e) {
3136            0 === this.step ? this.cartViewEvent.initDataEvent(e) : t.prototype.initDataEvent.call(this, e)
3137        }, e
3138    }(ee);
3139    var oe = function () {
3140        var t = function (e, n) {
3141            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3142                t.__proto__ = e
3143            } || function (t, e) {
3144                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3145            }, t(e, n)
3146        };
3147        return function (e, n) {
3148            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3149
3150            function r() {
3151                this.constructor = e
3152            }
3153
3154            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3155        }
3156    }();
3157    const ie = function (t) {
3158        function e() {
3159            return null !== t && t.apply(this, arguments) || this
3160        }
3161
3162        return oe(e, t), e.prototype.initEvent = function () {
3163            this.cartViewEvent.initEvent(), this.initCheckoutEvent()
3164        }, e.prototype.setDefaultCheckoutValues = function () {
3165            this.getCarrierSelected()
3166        }, e.prototype.delegateCheckoutEvent = function (t) {
3167            if (e.isValidMouseEvent(t) && t.target instanceof Element) {
3168                var n = t.target;
3169                e.isValidCarrierSelectionEvent(n) ? this.getCarrierSelected() : e.isValidPurchaseEvent(n) && (this.paymentTarget = n, this.triggerPurchaseEvent())
3170            }
3171        }, e.prototype.triggerPurchaseEvent = function () {
3172            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)
3173        }, e.isValidCheckoutWithCarrier = function () {
3174            return Boolean(document.querySelector("#carrier_area .delivery_options"))
3175        }, e
3176    }(ee), ae = function () {
3177        function t() {
3178        }
3179
3180        return t.getCheckoutController = function (t, e, n) {
3181            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)
3182        }, t
3183    }();
3184    var ce = function () {
3185        var t = function (e, n) {
3186            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3187                t.__proto__ = e
3188            } || function (t, e) {
3189                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3190            }, t(e, n)
3191        };
3192        return function (e, n) {
3193            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3194
3195            function r() {
3196                this.constructor = e
3197            }
3198
3199            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3200        }
3201    }();
3202    const se = function (t) {
3203        function e() {
3204            return null !== t && t.apply(this, arguments) || this
3205        }
3206
3207        return ce(e, t), e.prototype.getCheckoutModule = function () {
3208            return ae.getCheckoutController(this.trackingPlatform, this.config, this.sessionStorage)
3209        }, e
3210    }(k);
3211    var ue = function () {
3212        var t = function (e, n) {
3213            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3214                t.__proto__ = e
3215            } || function (t, e) {
3216                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3217            }, t(e, n)
3218        };
3219        return function (e, n) {
3220            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3221
3222            function r() {
3223                this.constructor = e
3224            }
3225
3226            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3227        }
3228    }();
3229   
3229 const pe = function (t) {
3230        function e() {
3231            return null !== t && t.apply(this, arguments) || this
3232        }
3233
3234        return ue(e, t), e
3235    }(it);
3236    var le = function () {
3237        var t = function (e, n) {
3238            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3239                t.__proto__ = e
3240            } || function (t, e) {
3241                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3242            }, t(e, n)
3243        };
3244        return function (e, n) {
3245            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3246
3247            function r() {
3248                this.constructor = e
3249            }
3250
3251            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3252        }
3253    }();
3254    const fe = function (t) {
3255        function e() {
3256            return null !== t && t.apply(this, arguments) || this
3257        }
3258
3259        return le(e, t), e
3260    }(st);
3261    var he = function () {
3262        var t = function (e, n) {
3263            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3264                t.__proto__ = e
3265            } || function (t, e) {
3266                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3267            }, t(e, n)
3268        };
3269        return function (e, n) {
3270            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3271
3272            function r() {
3273                this.constructor = e
3274            }
3275
3276            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3277        }
3278    }();
3279    const de = function (t) {
3280        function e() {
3281            return null !== t && t.apply(this, arguments) || this
3282        }
3283
3284        return he(e, t), e
3285    }(lt);
3286    var ye = function () {
3287        var t = function (e, n) {
3288            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3289                t.__proto__ = e
3290            } || function (t, e) {
3291                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3292            }, t(e, n)
3293        };
3294        return function (e, n) {
3295            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3296
3297            function r() {
3298                this.constructor = e
3299            }
3300
3301            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3302        }
3303    }();
3304    const ge = function (t) {
3305        function e() {
3306            return null !== t && t.apply(this, arguments) || this
3307        }
3308
3309        return ye(e, t), e
3310    }(dt);
3311    var ve = function () {
3312        var t = function (e, n) {
3313            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3314                t.__proto__ = e
3315            } || function (t, e) {
3316                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3317            }, t(e, n)
3318        };
3319        return function (e, n) {
3320            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3321
3322            function r() {
3323                this.constructor = e
3324            }
3325
3326            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3327        }
3328    }();
3329    const me = function (t) {
3330        function e() {
3331            return null !== t && t.apply(this, arguments) || this
3332        }
3333
3334        return ve(e, t), e.prototype.handleEvent = function (t) {
3335            if (0 === t.button && t.target instanceof Element) {
3336                var n = e.getProductThemeDataList(t.target);
3337                this.triggerEvent(n)
3338            }
3339        }, e.getProductThemeDataList = function (t) {
3340            var e = ".ajax_block_product",
3341                n = ["a.product_img_link", "a.quick-view-mobile", "a.quick-view", "a.product-name", "a.button.lnk_view"].join(","),
3342                r = [];
3343            if (t.closest(e) && t.closest(n)) {
3344                var o = t.closest(e);
3345                if (o instanceof HTMLElement) {
3346                    var i = o.querySelector(".ajax_add_to_cart_button");
3347                    if (o.dataset.idProduct && o.dataset.idProductAttribute) {
3348                        var a = parseInt(o.dataset.idProduct || "0"), c = parseInt(o.dataset.idProductAttribute || "0");
3349                        a && r.push({idProduct: a, idProductAttribute: c})
3350                    } 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({
3351                        idProduct: a,
3352                        idProductAttribute: c
3353                    }))
3354                }
3355            }
3356            return r
3357        }, e
3358    }(vt);
3359    var _e = function () {
3360        var t = function (e, n) {
3361            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3362                t.__proto__ = e
3363            } || function (t, e) {
3364                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3365            }, t(e, n)
3366        };
3367        return function (e, n) {
3368            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3369
3370            function r() {
3371                this.constructor = e
3372            }
3373
3374            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3375        }
3376    }();
3377    const we = function (t) {
3378        function e() {
3379            return null !== t && t.apply(this, arguments) || this
3380        }
3381
3382        return _e(e, t), e.prototype.handleEvent = function (t) {
3383            if (0 === t.button && t.target instanceof Element) {
3384                var n = t.target.closest(".js-social-sharing, .social-sharing");
3385                if (n instanceof HTMLElement) {
3386                    var r = e.getProductsDataList(n), o = e.getSocialNetwork(n);
3387                    this.triggerEvent(r, o)
3388                }
3389            }
3390        }, e.getProductsDataList = function (t) {
3391            var e = [], n = t.closest("body");
3392            if (n instanceof HTMLElement) {
3393                var r = n.querySelector("[name^=id_product]"), o = n.querySelector("[name^=id_product_attribute]");
3394                if (r instanceof HTMLInputElement && o instanceof HTMLInputElement) {
3395                    var i = parseInt(r.value), a = parseInt(o.value || "0");
3396                    Number.isInteger(i) && Number.isInteger(a) && e.push({idProduct: i, idProductAttribute: a})
3397                }
3398            }
3399            return e
3400        }, e.prototype.initDataEvent = function (t) {
3401        }, e
3402    }(wt);
3403    var Pe = function () {
3404        var t = function (e, n) {
3405            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3406                t.__proto__ = e
3407            } || function (t, e) {
3408                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3409            }, t(e, n)
3410        };
3411        return function (e, n) {
3412            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3413
3414            function r() {
3415                this.constructor = e
3416            }
3417
3418            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3419        }
3420    }();
3421    const be = function (t) {
3422        function e() {
3423            var e = null !== t && t.apply(this, arguments) || this;
3424            return e.productBuyBlockSelector = "#buy_block", e
3425        }
3426
3427        return Pe(e, t), e.prototype.initEvent = function () {
3428            var t = document.querySelector("[name=id_product_attribute]");
3429            t instanceof HTMLInputElement && new MutationObserver(this.handleMutation.bind(this)).observe(t, {
3430                attributes: !0,
3431                attributeOldValue: !0
3432            })
3433        }, e.prototype.handleMutation = function (t) {
3434            var e = this;
3435            t.forEach((function (t) {
3436                if ("attributes" === t.type && t.target instanceof HTMLInputElement && t.target.value !== t.oldValue) {
3437                    var n = t.target.closest(e.productBuyBlockSelector);
3438                    n instanceof HTMLFormElement && e.handleEventFromBuyBlockNode(n)
3439                }
3440            }))
3441        }, e.prototype.handleEventFromBuyBlockNode = function (t) {
3442            var n = e.getProductsDataList(t);
3443            this.triggerEvent(n)
3444        }, e.getProductsDataList = function (t) {
3445            var e = [], n = t.querySelector("[name^=id_product]"), r = t.querySelector("[name^=id_product_attribute]");
3446            if (n instanceof HTMLInputElement && r instanceof HTMLInputElement) {
3447                var o = parseInt(n.value || "0"), i = parseInt(r.value || "0");
3448                o > 0 && e.push({idProduct: o, idProductAttribute: i})
3449            }
3450            return e
3451        }, e.prototype.triggerEvent = function (t) {
3452            return e = this, n = void 0, o = function () {
3453                var e;
3454                return function (t, e) {
3455                    var n, r, o, i, a = {
3456                        label: 0, sent: function () {
3457                            if (1 & o[0]) throw o[1];
3458                            return o[1]
3459                        }, trys: [], ops: []
3460                    };
3461                    return i = {
3462                        next: c(0),
3463                        throw: c(1),
3464                        return: c(2)
3465                    }, "function" == typeof Symbol && (i[Symbol.iterator] = function () {
3466                        return this
3467                    }), i;
3468
3469                    function c(i) {
3470                        return function (c) {
3471                            return function (i) {
3472                                if (n) throw new TypeError("Generator is already executing.");
3473                                for (; a;) try {
3474                                    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;
3475                                    switch (r = 0, o && (i = [2 & i[0], o.value]), i[0]) {
3476                                        case 0:
3477                                        case 1:
3478                                            o = i;
3479                                            break;
3480                                        case 4:
3481                                            return a.label++, {value: i[1], done: !1};
3482                                        case 5:
3483                                            a.label++, r = i[1], i = [0];
3484                                            continue;
3485                                        case 7:
3486                                            i = a.ops.pop(), a.trys.pop();
3487                                            continue;
3488                                        default:
3489                                            if (!((o = (o = a.trys).length > 0 && o[o.length - 1]) || 6 !== i[0] && 2 !== i[0])) {
3490                                                a = 0;
3491                                                continue
3492                                            }
3493                                            if (3 === i[0] && (!o || i[1] > o[0] && i[1] < o[3])) {
3494                                                a.label = i[1];
3495                                                break
3496                                            }
3497                                            if (6 === i[0] && a.label < o[1]) {
3498                                                a.label = o[1], o = i;
3499                                                break
3500                                            }
3501                                            if (o && a.label < o[2]) {
3502                                                a.label = o[2], a.ops.push(i);
3503                                                break
3504                                            }
3505                                            o[2] && a.ops.pop(), a.trys.pop();
3506                                            continue
3507                                    }
3508                                    i = e.call(t, a)
3509                                } catch (t) {
3510                                    i = [6, t], r = 0
3511                                } finally {
3512                                    n = o = 0
3513                                }
3514                                if (5 & i[0]) throw i[1];
3515                                return {value: i[0] ? i[1] : void 0, done: !0}
3516                            }([i, c])
3517                        }
3518                    }
3519                }(this, (function (n) {
3520                    switch (n.label) {
3521                        case 0:
3522                            return t.length ? [4, f.getProductsDetailList(t, this.config, this.sessionStorage)] : [3, 2];
3523                        case 1:
3524                            (e = n.sent()).length && this.trackingPlatform.productView(e[0]), n.label = 2;
3525                        case 2:
3526                            return [2]
3527                    }
3528                }))
3529            }, new ((r = void 0) || (r = Promise))((function (t, i) {
3530                function a(t) {
3531                    try {
3532                        s(o.next(t))
3533                    } catch (t) {
3534                        i(t)
3535                    }
3536                }
3537
3538                function c(t) {
3539                    try {
3540                        s(o.throw(t))
3541                    } catch (t) {
3542                        i(t)
3543                    }
3544                }
3545
3546                function s(e) {
3547                    var n;
3548                    e.done ? t(e.value) : (n = e.value, n instanceof r ? n : new r((function (t) {
3549                        t(n)
3550                    }))).then(a, c)
3551                }
3552
3553                s((o = o.apply(e, n || [])).next())
3554            }));
3555            var e, n, r, o
3556        }, e.prototype.initDataEvent = function (t) {
3557            if (Object.prototype.hasOwnProperty.call(t, "detail_product_view") && t.detail_product_view.length) {
3558                this.sessionStorage.addProductsList(t.detail_product_view);
3559                var e = document.querySelector(this.productBuyBlockSelector);
3560                e instanceof HTMLFormElement && this.handleEventFromBuyBlockNode(e)
3561            }
3562        }, e
3563    }(Et);
3564    var Ee = function () {
3565        var t = function (e, n) {
3566            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3567                t.__proto__ = e
3568            } || function (t, e) {
3569                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3570            }, t(e, n)
3571        };
3572        return function (e, n) {
3573            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3574
3575            function r() {
3576                this.constructor = e
3577            }
3578
3579            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3580        }
3581    }();
3582    const ke = function (t) {
3583        function e() {
3584            return null !== t && t.apply(this, arguments) || this
3585        }
3586
3587        return Ee(e, t), e
3588    }(Ct);
3589    var Se = function () {
3590        var t = function (e, n) {
3591            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3592                t.__proto__ = e
3593            } || function (t, e) {
3594                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3595            }, t(e, n)
3596        };
3597        return function (e, n) {
3598            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3599
3600            function r() {
3601                this.constructor = e
3602            }
3603
3604            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3605        }
3606    }();
3607    const Oe = function (t) {
3608        function e() {
3609            return null !== t && t.apply(this, arguments) || this
3610        }
3611
3612        return Se(e, t), e
3613    }(jt);
3614    var Ce = function () {
3615        var t = function (e, n) {
3616            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3617                t.__proto__ = e
3618            } || function (t, e) {
3619                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3620            }, t(e, n)
3621        };
3622        return function (e, n) {
3623            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3624
3625            function r() {
3626                this.constructor = e
3627            }
3628
3629            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3630        }
3631    }();
3632    const Le = function (t) {
3633        function e(e, n, r) {
3634            return t.call(this, ".ajax_block_product", e, n, r) || this
3635        }
3636
3637        return Ce(e, t), e.prototype.getPageFirstPosition = function () {
3638            var t = 1, e = this.config.context.page.products_per_page,
3639                n = new URLSearchParams(window.location.search).get("p");
3640            return n && (t = parseInt(n)), e * t - e + 1
3641        }, e
3642    }(Mt);
3643    var Te = function () {
3644        var t = function (e, n) {
3645            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3646                t.__proto__ = e
3647            } || function (t, e) {
3648                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3649            }, t(e, n)
3650        };
3651        return function (e, n) {
3652            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3653
3654            function r() {
3655                this.constructor = e
3656            }
3657
3658            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3659        }
3660    }();
3661    const je = function (t) {
3662        function e() {
3663            return null !== t && t.apply(this, arguments) || this
3664        }
3665
3666        return Te(e, t), e
3667    }(Nt);
3668    var Ve = function () {
3669        var t = function (e, n) {
3670            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3671                t.__proto__ = e
3672            } || function (t, e) {
3673                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3674            }, t(e, n)
3675        };
3676        return function (e, n) {
3677            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3678
3679            function r() {
3680                this.constructor = e
3681            }
3682
3683            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3684        }
3685    }();
3686    const xe = function (t) {
3687        function e() {
3688            return null !== t && t.apply(this, arguments) || this
3689        }
3690
3691        return Ve(e, t), e.prototype.getAllItemsList = function () {
3692            return [new Le(this.trackingPlatform, this.config, this.sessionStorage), new je(this.trackingPlatform)]
3693        }, e
3694    }(Dt);
3695    var De = function () {
3696        var t = function (e, n) {
3697            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
3698                t.__proto__ = e
3699            } || function (t, e) {
3700                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
3701            }, t(e, n)
3702        };
3703        return function (e, n) {
3704            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
3705
3706            function r() {
3707                this.constructor = e
3708            }
3709
3710            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
3711        }
3712    }();
3713    const Ae = function (t) {
3714        function e() {
3715            return null !== t && t.apply(this, arguments) || this
3716        }
3717
3718        return De(e, t), e.prototype.createAddToCartEvent = function () {
3719            this.actionTrackingEvents.push(new Jt(this.trackingPlatform, this.config, this.sessionStorage))
3720        }, e.prototype.createCartViewEvent = function () {
3721        }, e.prototype.createCategoryEvent = function () {
3722            this.actionTrackingEvents.push(new Wt(this.trackingPlatform, this.config))
3723        }, e.prototype.createCheckoutEvent = function () {
3724            var t = new se(this.trackingPlatform, this.config, this.sessionStorage);
3725            this.actionTrackingEvents.push(t), this.dataTrackingEvents.push(t)
3726        }, e.prototype.createCustomerLogin = function () {
3727            this.config.context.user.is_new_login && this.actionTrackingEvents.push(new pe(this.trackingPlatform, this.config))
3728        }, e.prototype.createCustomerSignUp = function () {
3729            this.config.context.user.is_new_account && this.actionTrackingEvents.push(new fe(this.trackingPlatform, this.config))
3730        }, e.prototype.createHomeEvent = function () {
3731            this.actionTrackingEvents.push(new de(this.trackingPlatform, this.config))
3732        }, e.prototype.createOrderCompleteEvent = function () {
3733            this.dataTrackingEvents.push(new ge(this.trackingPlatform, this.config, this.sessionStorage))
3734        }, e.prototype.createProductClickEvent = function () {
3735            this.actionTrackingEvents.push(new me(this.trackingPlatform, this.config, this.sessionStorage))
3736        }, e.prototype.createProductShareEvent = function () {
3737            this.actionTrackingEvents.push(new we(this.trackingPlatform, this.config, this.sessionStorage))
3738        }, e.prototype.createProductViewEvent = function () {
3739            var t = new be(this.trackingPlatform, this.config, this.sessionStorage);
3740            this.actionTrackingEvents.push(t), this.dataTrackingEvents.push(t)
3741        }, e.prototype.createPromotionClickEvent = function () {
3742            this.actionTrackingEvents.push(new ke(this.trackingPlatform))
3743        }, e.prototype.createSearchEvent = function () {
3744            new RegExp("search").test(this.config.context.page.controller_name) && this.actionTrackingEvents.push(new Oe(this.trackingPlatform, this.config))
3745        }, e.prototype.createViewItemsListEvent = function () {
3746            this.actionTrackingEvents.push(new xe(this.trackingPlatform, this.config, this.sessionStorage))
3747        }, e
3748    }(a), Me = function () {
3749        function t() {
3750        }
3751
3752        return t.getEventFactory = function (t, e, n) {
3753            switch (e.context.tracking_module.service_version) {
3754                case"16":
3755                    return new Ae(t, e, n);
3756                case"17":
3757                    return new Ut(t, e, n);
3758                default:
3759                    throw Error("Unable to load event manager")
3760            }
3761        }, t
3762    }(), Ie = function () {
3763        function t() {
3764        }
3765
3766        return t.getProductPosition = function (e, n) {
3767            var r = 0, o = t.getProductThemeData(e), i = JSON.stringify(o);
3768            return Object.prototype.hasOwnProperty.call(n, i) && (r = n[i]), r
3769        }, t.getProductAttribution = function (e, n) {
3770            var r = null, o = t.getProductThemeData(e), i = JSON.stringify(o);
3771            return Object.prototype.hasOwnProperty.call(n, i) && (r = n[i]), r
3772        }, t.getProductThemeData = function (t) {
3773            return {idProduct: t.id_product, idProductAttribute: t.id_attribute}
3774        }, t
3775    }();
3776    var qe = function () {
3777        return qe = Object.assign || function (t) {
3778            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]);
3779            return t
3780        }, qe.apply(this, arguments)
3781    };
3782    const He = function () {
3783        function t(t) {
3784            this.config = t, this.layer = {}
3785        }
3786
3787        return t.prototype.decorate = function () {
3788            return {common_model: this.layer}
3789        }, t.prototype.initConfig = function () {
3790            return this.layer = {}, this.decorate()
3791        }, t.prototype.homePageView = function () {
3792            return this.layer = {}, this.decorate()
3793        }, t.prototype.categoryPageView = function () {
3794            return this.layer = {}, this.decorate()
3795        }, t.prototype.productsList = function (e, n) {
3796            var r = [], o = this.config.context.page.controller_name;
3797            return e.forEach((function (e) {
3798                var i = Ie.getProductPosition(e, n);
3799                r.push(t.getProductData(e, 0, o, i))
3800            })), this.layer = {items: r}, this.decorate()
3801        }, t.prototype.productClick = function (e, n) {
3802            var r = 0, o = this.config.context.page.controller_name, i = Ie.getProductAttribution(e, n), a = [];
3803            return i && (r = i.productPosition, o = i.productList), a.push(t.getProductData(e, 0, o, r)), this.layer = {items: a}, this.decorate()
3804        }, t.prototype.productView = function (e) {
3805            var n = [];
3806            return n.push(t.getProductData(e)), this.layer = {items: n}, this.decorate()
3807        }, t.prototype.productShare = function (e, n) {
3808            var r = [];
3809            return r.push(t.getProductData(e)), this.layer = {items: r, parameters: {method: n}}, this.decorate()
3810        }, t.prototype.addToCart = function (e, n) {
3811            var r = [];
3812            return r.push(t.getProductData(e, n)), this.layer = {items: r}, this.decorate()
3813        }, t.prototype.removeFromCart = function (e, n) {
3814            var r = [];
3815            return r.push(t.getProductData(e, n)), this.layer = {items: r}, this.decorate()
3816        }, t.prototype.cartView = function (e, n) {
3817            var r = t.getCartProducts(e, n);
3818            return this.layer = {items: r}, this.decorate()
3819        }, t.prototype.checkoutProgress = function (e, n, r) {
3820            var o = t.getCartProducts(e, n);
3821            return this.layer = {items: o, checkout: {step: r}}, this.decorate()
3822        }, t.prototype.checkoutOption = function (t, e, n) {
3823            return this.layer = {checkout: {step: n, option_type: t, option_value: e}}, this.decorate()
3824        }, t.prototype.orderComplete = function (e, n, r) {
3825            var o = t.getCartProducts(n, r), i = qe({}, e);
3826            return this.layer = {items: o, order: i}, this.decorate()
3827        }, t.prototype.promotionsList = function (e) {
3828            var n = [];
3829            return e.forEach((function (e) {
3830                var r = t.getPromotionData(e);
3831                r && n.push(r)
3832            })), this.layer = {items: n}, this.decorate()
3833        }, t.prototype.promotionClick = function (e) {
3834            var n = [];
3835            return e.forEach((function (e) {
3836                var r = t.getPromotionData(e);
3837                r && n.push(r)
3838            })), this.layer = {items: n}, this.decorate()
3839        }, t.prototype.searchPageView = function () {
3840            return this.layer = {}, this.decorate()
3841        }, t.prototype.customerLogin = function () {
3842            return this.layer = {}, this.decorate()
3843        }, t.prototype.customerSignUp = function () {
3844            return this.layer = {}, this.decorate()
3845        }, t.getCartProducts = function (e, n) {
3846            var r = [];
3847            return e.forEach((function (e) {
3848                var o = n.find((function (t) {
3849                    return t.id_index === e.id_index
3850                }));
3851                o && r.push(t.getProductData(e, o.quantity))
3852            })), r
3853        }, t.getProductData = function (t, e, n, r) {
3854            var o = {
3855                attributes: t.attributes,
3856                category_path: t.category_path,
3857                condition: t.condition,
3858                ean: t.ean,
3859                id_attribute: t.id_attribute,
3860                id_category: t.id_category,
3861                id_index: t.id_index,
3862                id_manufacturer: t.id_manufacturer,
3863                id_product: t.id_product,
3864                is_available: t.is_available,
3865                isbn: t.isbn,
3866                manufacturer_name: t.manufacturer_name,
3867                name: t.name,
3868                mpn: t.mpn,
3869                price: t.price,
3870                price_old: t.price_old,
3871                price_old_tax_excl: t.price_old_tax_excl,
3872                price_tax_excl: t.price_tax_excl,
3873                reference: t.reference,
3874                upc: t.upc
3875            };
3876            return e && (o.quantity = e), n && (o.list_name = n), r && (o.list_index = r), o
3877        }, t.getPromotionData = function (t) {
3878            var e = {promotion_id: t.promoParams.pid};
3879            return Object.entries({
3880                promotion_id: "pid",
3881                promotion_name: "pnm",
3882                promotion_position: "pps",
3883                creative_name: "cnm",
3884                creative_slot: "csl"
3885            }
3885).forEach((function (n) {
3886                var r = n[0], o = n[1];
3887                e[r] = t.promoParams[o]
3888            })), e
3889        }, t.prototype.resetLayer = function () {
3890            return this.layer = {items: void 0, parameters: void 0}, this.decorate()
3891        }, t
3892    }();
3893    var Ne = function () {
3894        return Ne = Object.assign || function (t) {
3895            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]);
3896            return t
3897        }, Ne.apply(this, arguments)
3898    };
3899    const Qe = function () {
3900        function t(t, e) {
3901            this.eventLayer = t, this.config = e, this.layer = {}, this.eventTimeout = 300
3902        }
3903
3904        return t.prototype.resetLayer = function () {
3905            return this.layer.event = "reset_common_model", Ne(Ne({}, this.layer), this.eventLayer.resetLayer())
3906        }, t.prototype.initConfig = function () {
3907            return this.layer = {
3908                config: this.getConfigData(),
3909                context: this.getContextData()
3910            }, Ne(Ne({}, this.layer), this.eventLayer.initConfig())
3911        }, t.prototype.getConfigData = function () {
3912            return {
3913                bing: this.config.bing,
3914                meta: this.config.meta,
3915                ga4: this.config.ga4,
3916                gads: this.config.gads,
3917                gfeeds: this.config.gfeeds,
3918            }
3919        }, t.prototype.getContextData = function () {
3920            return {
3921                browser: Ne(Ne({}, this.config.context.browser), {
3922                    user_agent: navigator.userAgent,
3923                    navigator_lang: navigator.language
3924                }),
3925                page: {
3926                    controller_name: this.config.context.page.controller_name,
3927                    category: this.config.context.page.category,
3928                    search_term: this.config.context.page.search_term
3929                },
3930                localization: this.config.context.localization,
3931                shop: this.config.context.shop,
3932                user: this.config.context.user
3933            }
3934        }, t.prototype.homePageView = function () {
3935            return this.setEventModel("view_home"), Ne(Ne({}, this.layer), this.eventLayer.homePageView())
3936        }, t.prototype.categoryPageView = function () {
3937            return this.setEventModel("view_category"), Ne(Ne({}, this.layer), this.eventLayer.categoryPageView())
3938        }, t.prototype.searchPageView = function () {
3939            return this.setEventModel("view_search"), Ne(Ne({}, this.layer), this.eventLayer.searchPageView())
3940        }, t.prototype.productsList = function (t, e) {
3941            return this.setEventModel("view_product_list"), Ne(Ne({}, this.layer), this.eventLayer.productsList(t, e))
3942        }, t.prototype.productClick = function (t, e) {
3943            return this.setEventModel("product_click"), Ne(Ne({}, this.layer), this.eventLayer.productClick(t, e))
3944        }, t.prototype.productView = function (t) {
3945            return this.setEventModel("view_product"), Ne(Ne({}, this.layer), this.eventLayer.productView(t))
3946        }, t.prototype.productShare = function (t, e) {
3947            return this.setEventModel("share_product"), Ne(Ne({}, this.layer), this.eventLayer.productShare(t, e))
3948        }, t.prototype.addToCart = function (t, e) {
3949            return this.setEventModel("add_to_cart"), Ne(Ne({}, this.layer), this.eventLayer.addToCart(t, e))
3950        }, t.prototype.removeFromCart = function (t, e) {
3951            return this.setEventModel("remove_from_cart"), Ne(Ne({}, this.layer), this.eventLayer.removeFromCart(t, e))
3952        }, t.prototype.cartView = function (t, e) {
3953            return this.setEventModel("view_cart"), Ne(Ne({}, this.layer), this.eventLayer.cartView(t, e))
3954        }, t.prototype.checkoutProgress = function (t, e, n) {
3955            return this.setEventModel("checkout_progress"), Ne(Ne({}, this.layer), this.eventLayer.checkoutProgress(t, e, n))
3956        }, t.prototype.checkoutOption = function (t, e, n) {
3957            return this.setEventModel("checkout_option"), Ne(Ne({}, this.layer), this.eventLayer.checkoutOption(t, e, n))
3958        }, t.prototype.orderComplete = function (t, e, n, r, o) {
3959            var trackingId = this.config.gtm && this.config.gtm.LG_TAGMANAGER_GTM_ID;
3960            return this.setEventModel("purchase"), this.layer.context = this.getContextData(), this.layer.context.user = r, Ne(Ne(Ne({}, this.layer), this.eventLayer.orderComplete(t, e, n, r)), {
3961                eventCallback: function () {
3962                    for (var e = [], n = 0; n < arguments.length; n++) e[n] = arguments[n];
3963                    trackingId && e[0] === trackingId && o(t)
3964                }, eventTimeout: this.eventTimeout
3965            })
3966        }, t.prototype.promotionsList = function (t) {
3967            return this.setEventModel("view_promotion_list"), Ne(Ne({}, this.layer), this.eventLayer.promotionsList(t))
3968        }, t.prototype.promotionClick = function (t) {
3969            return this.setEventModel("promotion_click"), Ne(Ne({}, this.layer), this.eventLayer.promotionClick(t))
3970        }, t.prototype.customerSignUp = function () {
3971            return this.setEventModel("customer_sign_up"), Ne(Ne({}, this.layer), this.eventLayer.customerSignUp())
3972        }, t.prototype.customerLogin = function () {
3973            return this.setEventModel("customer_login"), Ne(Ne({}, this.layer), this.eventLayer.customerLogin())
3974        }, t.prototype.setEventModel = function (t) {
3975            this.layer = {event: t}
3976        }, t
3977    }(), Be = function (t) {
3978        this.config = t;
3979        var e = new He(this.config);
3980        this.dataLayerComponent = new Qe(e, this.config)
3981    }, Fe = function () {
3982        function t(t) {
3983            this.config = t, this.dataLayer = {}, this.dataLayerComponent = new Be(this.config).dataLayerComponent
3984        }
3985
3986        return t.prototype.isAvailable = function () {
3987            return Boolean(this.getTrackingId() && Object.prototype.hasOwnProperty.call(window, "google_tag_manager"))
3988        }, t.prototype.getTrackingId = function () {
3989            // return this.config.gtm.tracking_id //original code
3990            return this.config.gtm.LG_TAGMANAGER_GTM_ID
3991        }, t.prototype.initConfig = function () {
3992            this.dataLayer = this.dataLayerComponent.initConfig(), this.pushDataLayer()
3993        }, t.prototype.pushDataLayer = function () {
3994            window.dataLayer = window.dataLayer || [], window.dataLayer.push(this.dataLayer), this.resetDataLayer()
3995        }, t.prototype.resetDataLayer = function () {
3996            this.dataLayer = {}
3997        }, t.prototype.initScripts = function () {
3998            this.addGTMScript()
3999        }, t.prototype.addGTMScript = function () {
4000            var trackingId = this.getTrackingId();
4001            if (!trackingId) return;
4002            if (window.google_tag_manager && window.google_tag_manager[trackingId]) return;
4003            // An async container may already be requested but not yet initialized.
4004            var scripts = document.getElementsByTagName("script");
4005            for (var index = 0; index < scripts.length; index++) {
4006                var source = scripts[index].src || "";
4007                if (!/^https?:\/\/www\.googletagmanager\.com\/gtm\.js\?/i.test(source)) continue;
4008                var match = /[?&]id=([^&#]+)/.exec(source);
4009                if (match && match[1] === trackingId) return;
4010            }
4011            var t = document.createElement("script");
4012            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='
4012+i+dl;f.parentNode.insertBefore(j,f);\n            })(window, document, 'script', 'dataLayer', '".concat(this.getTrackingId(), "');\n        "), document.head.appendChild(t)
4013        }, t.prototype.homePageView = function () {
4014            this.dataLayer = this.dataLayerComponent.homePageView(), this.pushDataLayer()
4015        }, t.prototype.categoryPageView = function () {
4016            this.dataLayer = this.dataLayerComponent.categoryPageView(), this.pushDataLayer()
4017        }, t.prototype.searchPageView = function () {
4018            this.dataLayer = this.dataLayerComponent.searchPageView(), this.pushDataLayer()
4019        }, t.prototype.productShare = function (t, e) {
4020            this.resetLayer(), this.dataLayer = this.dataLayerComponent.productShare(t, e), this.pushDataLayer()
4021        }, t.prototype.customerSignUp = function () {
4022            this.dataLayer = this.dataLayerComponent.customerSignUp(), this.pushDataLayer()
4023        }, t.prototype.customerLogin = function () {
4024            this.dataLayer = this.dataLayerComponent.customerLogin(), this.pushDataLayer()
4025        }, t.prototype.productsList = function (t, e) {
4026            this.resetLayer(), this.dataLayer = this.dataLayerComponent.productsList(t, e), this.pushDataLayer()
4027        }, t.prototype.productClick = function (t, e) {
4028            this.resetLayer(), this.dataLayer = this.dataLayerComponent.productClick(t, e), this.pushDataLayer()
4029        }, t.prototype.productView = function (t) {
4030            this.resetLayer(), this.dataLayer = this.dataLayerComponent.productView(t), this.pushDataLayer()
4031        }, t.prototype.addToCart = function (t, e) {
4032            this.resetLayer(), this.dataLayer = this.dataLayerComponent.addToCart(t, e), this.pushDataLayer()
4033        }, t.prototype.removeFromCart = function (t, e) {
4034            this.resetLayer(), this.dataLayer = this.dataLayerComponent.removeFromCart(t, e), this.pushDataLayer()
4035        }, t.prototype.cartView = function (t, e) {
4036            this.resetLayer(), this.dataLayer = this.dataLayerComponent.cartView(t, e), this.pushDataLayer()
4037        }, t.prototype.checkoutProgress = function (t, e, n) {
4038            this.resetLayer(), this.dataLayer = this.dataLayerComponent.checkoutProgress(t, e, n), this.pushDataLayer()
4039        }, t.prototype.checkoutOption = function (t, e, n) {
4040            this.dataLayer = this.dataLayerComponent.checkoutOption(t, e, n), this.pushDataLayer()
4041        }, t.prototype.orderComplete = function (t, e, n, r, o) {
4042            this.resetLayer(), this.dataLayer = this.dataLayerComponent.orderComplete(t, e, n, r, o), this.pushDataLayer()
4043        }, t.prototype.promotionsList = function (t) {
4044            this.resetLayer(), this.dataLayer = this.dataLayerComponent.promotionsList(t), this.pushDataLayer()
4045        }, t.prototype.promotionClick = function (t) {
4046            this.resetLayer(), this.dataLayer = this.dataLayerComponent.promotionClick(t), this.pushDataLayer()
4047        }, t.prototype.resetLayer = function () {
4048            this.dataLayer = this.dataLayerComponent.resetLayer(), this.pushDataLayer()
4049        }, t
4050    }();
4051    var Re = function () {
4052        var t = function (e, n) {
4053            return t = Object.setPrototypeOf || {__proto__: []} instanceof Array && function (t, e) {
4054                t.__proto__ = e
4055            } || function (t, e) {
4056                for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n])
4057            }, t(e, n)
4058        };
4059        return function (e, n) {
4060            if ("function" != typeof n && null !== n) throw new TypeError("Class extends value " + String(n) + " is not a constructor or null");
4061
4062            function r() {
4063                this.constructor = e
4064            }
4065
4066            t(e, n), e.prototype = null === n ? Object.create(n) : (r.prototype = n.prototype, new r)
4067        }
4068    }();
4069    const ze = function (t) {
4070        function e() {
4071            var e = t.call(this) || this;
4072            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(
4072)), e
4073        }
4074
4075        return Re(e, t), e.prototype.getConfigNode = function () {
4076            return "#js-lg-gtm-tracking-conf"
4077        }, e.prototype.getTrackingDataNode = function () {
4078            return "#js-lg-gtm-tracking-data"
4079        }, e.prototype.init = function () {
4080            this.initTracking(), this.initEvents()
4081        }, e.prototype.initTracking = function () {
4082            var t, e, n;
4083            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()
4084        }, e.prototype.initEvents = function () {
4085            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())
4086        }, e.prototype.initTrackingDataEvents = function () {
4087            this.trackingData = o.getTemplateData(this.getTrackingDataNode()), Object.keys(this.trackingData).length && this.sessionStorage && this.eventManager && (this.sessionStorage.initTrackingData(this.trackingData), this.eventManager.initDataEvents(this.trackingData))
4088        }, e
4089    }(o);
4090    Object.hasOwnProperty.call(window, "LG_GTM_Client") || (window.LG_GTM_Client = new ze)
4091})();

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.