1(()=>{var t=function t(e){try{e()}catch(n){var a=function(){return t(e)};"complete"!==document.readyState?document.addEventListener("DOMContentLoaded",function(t,e){var a;return function(){for(var e=this,n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];clearTimeout(a),a=setTimeout((function(){return t.apply(e,o)}),50)}}(a)):setTimeout(a,100)}},e={homeshow:function(){},productshow:function(){},productshowincategory:function(){},searchshow:function(){document.body.addEventListener("click",(function(t){var e,a,n,o,r=null===(e=t.target.closest(".product .image-container a:not(.quickview), .product .pdp-link a"))||void 0===e||null===(a=e.closest)||void 0===a?void 0:a.call(e,".product");if(r)try{var c,d=null!==(c=null==r?void 0:r.dataset.gtmdata)&&void 0!==c?c:null==r?void 0:r.getAttribute("data-gtmdata");n=d="string"==typeof d?JSON.parse(d):d,(o={event:"productClick",ecommerce:{click:{actionField:{list:"Search Results"},products:[]}}}).ecommerce.click.products.push(n),dataLayer.push(o)}catch(t){var i;return void(null===(i=window.console)||void 0===i||i.error("Failed to parse gtmdata string:",t))}}))},cartshow:function(){},checkoutbegin:function(){},orderconfirm:function(){},all:function(){document.body.addEventListener("click",(function(t){var e,o=null===(e=t.target)||void 0===e?void 0:e.closest(".add-to-cart, .add-to-cart-global");if(o&&null!=o&&o.matches(":not(.isDisabled):not(.disabled)")){var r,c,d=null!==(r=null===(c=o.closest(".product-wrapper"))||void 0===c||null===(c=c.querySelector(".quantity-select"))||void 0===c?void 0:c.value)&&void 0!==r?r:1;["gtmdata","gtmga4data"].forEach((function(t){var e,r=null!==(e=o.dataset[t])&&void 0!==e?e:o.getAttribute("data-"+t),c="gtmga4data"===t?n:a;try{c(r="string"==typeof r?JSON.parse(r):r,(d="string"==typeof d?parseInt(d,10):d)||1)}catch(e){var i;null===(i=window.console)||void 0===i||i.error("Invalid JSON in data-"+t+":",e)}}))}})),document.body.addEventListener("click",(function(t){var e,a,n,c=null===(e=t.target)||void 0===e?void 0:e.closest(".remove-product"),d=null!==(a=null==c||null===(n=c.closest(".card"))||void 0===n||null===(n=n.querySelector("select.quantity"))||void 0===n?void 0:n.value)&&void 0!==a?a:1;if(c){var i={gtmdata:null,gtmga4data:null};
1Object.keys(i).forEach((function(t){var e;i[t]=null!==(e=c.dataset[t])&&void 0!==e?e:c.getAttribute("data-"+t)})),document.body.addEventListener("click",(function t(e){e.target.classList.contains("cart-delete-confirmation-btn")&&(Object.keys(i).forEach((function(t){var e="gtmga4data"===t?r:o;i[t]&&e("string"==typeof i[t]?JSON.parse(i[t]):i[t],d||1)})),document.body.removeEventListener("click",t))}))}})),t((function(){$("body").on("product:updateAddToCart",(function(t,e){$("button.add-to-cart, button.add-to-cart-global",e.$productContainer).attr("data-gtmdata",JSON.stringify(e.product.gtmData)).attr("data-gtmga4data",JSON.stringify(e.product.gtmGA4Data))}))}))}};function a(t,e){var a={quantity:e},n={event:"addToCart",ecommerce:{add:{products:[]}}};n.ecommerce.add.products.push(Object.assign(t,a)),dataLayer.push({ecommerce:null}),dataLayer.push(n)}function n(t,e){var a={quantity:e},n={event:"add_to_cart",ecommerce:{currencyCode:t.currencyCode,items:[Object.assign(t,a)],value:(Number(t.price)*Number(e)).toFixed(2)}};dataLayer.push({ecommerce:null}),dataLayer.push(n)}function o(t,e){var a={quantity:e},n={event:"removeFromCart",ecommerce:{remove:{products:[]}}};n.ecommerce.remove.products.push(Object.assign(t,a)),dataLayer.push({ecommerce:null}),dataLayer.push(n)}function r(t,e){var a={quantity:e},n={event:"remove_from_cart",ecommerce:{currencyCode:t.currencyCode,items:[Object.assign(t,a)],value:(Number(t.price)*Number(e)).toFixed(2)}};dataLayer.push({ecommerce:null}),dataLayer.push(n)}document.addEventListener("DOMContentLoaded",(function(){window.gtmEnabled&&(pageAction&&e[pageAction]&&e[pageAction](),e.all())})),t((function(){$(document).ajaxSuccess((function(t,e,a,n){a.dataTypes.indexOf("json")>-1&&n&&"__gtmEvents"in n&&Array.isArray(n.__gtmEvents)&&n.__gtmEvents.forEach((function(t){t&&(dataLayer.push({ecommerce:null}),dataLayer.push(t))}))}))}))})(); 2//# sourceMappingURL=tagmanager.js.map
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.