1(()=>{"use strict";let t;function e(t,e){const o=parseInt(t&&t[e],10);return Number.isNaN(o)?null:o}function o(){return"undefined"!=typeof gtm4wp_list_attribution&&!!gtm4wp_list_attribution}function n(){document.querySelectorAll(".product-quantity input.qty").forEach(function(t){const e=t.defaultValue;let o=parseInt(t.value);if(isNaN(o)&&(o=e),e!=o){const n=t.closest(".cart_item"),r=n&&n.querySelector(".remove");if(!r)return;const c=gtm4wp_read_json_from_node(r,"gtm4wp_product_data");if(!c)return!0;e<o?(c.quantity=o-e,gtm4wp_push_ecommerce("add_to_cart",[c],{currency:gtm4wp_currency,value:c.price*c.quantity})):(c.quantity=e-o,gtm4wp_push_ecommerce("remove_from_cart",[c],{currency:gtm4wp_currency,value:c.price*c.quantity}))}})}function r(){if(gtm4wp_checkout_step_fired.indexOf("payment_method")>-1)return;if("complete"!=document.readyState)return;let t="(payment type not found)",e=document.querySelector(".payment_methods input:checked");e||(e=document.querySelector("input[name^=payment_method]")),e&&(t=e.value),gtm4wp_push_ecommerce("add_payment_info",window.gtm4wp_checkout_products,{currency:gtm4wp_currency,payment_type:t,value:window.gtm4wp_checkout_value}),gtm4wp_checkout_step_fired.push("payment_method")}function c(){if(gtm4wp_checkout_step_fired.indexOf("shipping_method")>-1)return;if("complete"!=document.readyState)return;let t="(shipping tier not found)",e=document.querySelector("input[name^=shipping_method]:checked");e||(e=document.querySelector("input[name^=shipping_method]")),e&&(t=e.value),gtm4wp_push_ecommerce("add_shipping_info",window.gtm4wp_checkout_products,{currency:gtm4wp_currency,shipping_tier:t,value:window.gtm4wp_checkout_value}),gtm4wp_checkout_step_fired.push("shipping_method")}function i(n,r,c){if(!n||!n.closest)return!1;const i=c&&"function"==typeof c.emit?c.emit:gtm4wp_push_ecommerce,u=n.closest(".single_add_to_cart_button")||n;if(u.classList&&(u.classList.contains("disabled")||u.disabled))return!1;const d=r||n.closest("form.cart");if(!d)return!1;if("function"==typeof d.checkValidity&&!d.checkValidity())return!1;const _=d.querySelectorAll("[name=variation_id]"),a=d.classList&&d.classList.contains("grouped_form");if(_.length>0){if(t){const o=e(d.querySelector("[name=quantity]"),"value");t.quantity=null===o||o<1?1:o,i("add_to_cart",[t],{currency:gtm4wp_currency,value:(t.price*t.quantity).toFixed(2)})}}else if(a){const t=document.querySelectorAll(".grouped_form .gtm4wp_productdata"),n=[];let r=0;if(t.forEach(function(t){const c=gtm4wp_read_json_from_node(t,"gtm4wp_product_data",["productlink"]);if(!c)return!0;let i=0;const u=document.querySelectorAll("input[name=quantity\\["+c.internal_id+"\\]]");return!(u.length>0)||(i=e(u[0],"value"),0===i||(c.quantity=null===i||i<1?1:i,o()&>m4wp_apply_stored_item_list(c,c.internal_id),delete c.internal_id,n.push(c),void(r+=c.price*c.quantity)))}),0==n.length)return!1;i("add_to_cart",n,{currency:gtm4wp_currency,value:r.toFixed(2)})}else{const t=d.querySelector(".gtm4wp_single_productdata,[name=gtm4wp_product_data]");if(!t)return!1;const n=gtm4wp_read_from_json(t.dataset&&t.dataset.gtm4wp_product_data||t.value,["productlink"]);if(!n)return!1;const r=e(d.querySelector("[name=quantity]"),"value");n.quantity=null===r||r<1?1:r,o()&>m4wp_apply_stored_item_list(n,n.internal_id),delete n.internal_id,i("add_to_cart",[n],{currency:gtm4wp_currency,value:n.price*n.quantity})}return!0}void 0===window.gtm4wp_view_item_fired_during_pageload&&(window.gtm4wp_view_item_fired_during_pageload=!1),void 0===window.gtm4wp_checkout_step_fired&&(window.gtm4wp_checkout_step_fired=[]),void 0===window.gtm4wp_first_container_id&&(window.gtm4wp_first_container_id="");let u=null,d=null;function _(){d&&window.clearTimeout(d),u=null,d=null}function a(){const t=u;_(),t&&(t.pushes?t.pushes.forEach(function(t){gtm4wp_push_ecommerce(t[0],t[1],t[2])}):function(t){const e="string"==typeof window.gtm4wp_store_api_cart_url?window.gtm4wp_store_api_cart_url:"";return""===e||"function"!=typeof window.fetch?Promise.resolve(null):window.fetch(e,{credentials:"same-origin",headers:{Accept:"application/json"}}).then(function(t){return t&&t.ok?t.json():null}).then(function(e){if(!e||!Array.isArray(e.items))return null;const o=e.items.find(function(e){return e&&String(e.id)===String(t)}),n=o&&o.extensions&&o.extensions.gtm4wp;return n?function(t){if(!t)return null;if("string"==typeof t)try{return JSON.parse(t)}catch(t){return null}return t}(n.item):null}).catch(function(){return null})}(t.lookup.product_id).then(function(e){e&&(e.quantity=t.lookup.quantity,delete e.internal_id,gtm4wp_push_ecommerce("add_to_cart",[e],{currency:gtm4wp_currency,value:(e.price*e.quantity).toFixed(2)}))}))}function p(t){if(!t||!t.closest)return!1;const e=t.closest(".product,.wc-block-grid__product,.wc-block-product"),o=e&&e.querySelector(".gtm4wp_productdata");let n;if(o)n=gtm4wp_read_json_from_node(o,"gtm4wp_product_data");else{const e=t.closest(".add_to_cart_button");n=e&>m4wp_read_json_from_node(e,"gtm4wp_product_data")}return!!n&&"variable"!==n.product_type&&"grouped"!==n.product_type&&(n.productlink&&delete n.productlink,delete n.product_type,n.quantity=1,gtm4wp_push_ecommerce("add_to_cart",[n],{currency:gtm4wp_currency,value:n.price}),!0)}function s(){if(window.gtm4wp_woocommerce_inited)return;window.gtm4wp_woocommerce_inited=!0;const s={"wp-block-handpicked-products":{displayname:"Handpicked Products",listid:"handpicked-products",counter:1},"wp-block-product-best-sellers":{displayname:"Best Selling Products",listid:"best-selling-products",counter:1},"wp-block-product-category":{displayname:"Product Category List",listid:"product-category-list",counter:1},"wp-block-product-new":{displayname:"New Products",listid:"new-products",counter:1},"wp-block-product-on-sale":{displayname:"Sale Products",listid:"sale-products",counter:1},"wp-block-products-by-attribute":{displayname:"Products By Attribute",listid:"products-by-attribute",counter:1},"wp-block-product-tag":{displayname:"Products By Tag",listid:"products-by-tag",counter:1},"wp-block-product-top-rated":{displayname:"Top Rated Products",listid:"top-rated-products",counter:1}};if(document.querySelectorAll(".wc-block-grid .wc-block-grid__product").forEach(function(t){const e=t.closest(".wc-block-grid"),o=t.querySelector(".gtm4wp_productdata");if(e&&o){const t=e.classList;if(t)for(const e in s)t.contains(e)&&(gtm4wp_update_json_in_node(o,"gtm4wp_product_data","item_list_name",s[e].displayname),gtm4wp_update_json_in_node(o,"gtm4wp_product_data","item_list_id",s[e].listid),gtm4wp_update_json_in_node(o,"gtm4wp_product_data","index",s[e].counter),s[e].counter++)}}),document.querySelectorAll(".gtm4wp_productdata,.widget-product-item").length>0){const t=[];if(document.querySelectorAll(".gtm4wp_productdata,.widget-product-item").forEach(function(e){const o=gtm4wp_read_json_from_node(e,"gtm4wp_product_data");if(!o)return!0;t.push(o)}),gtm4wp_product_per_impression>0){let e;for(;t.length;)e=t.splice(0,gtm4wp_product_per_impression),gtm4wp_push_ecommerce("view_item_list",e,{currency:gtm4wp_currency})}else gtm4wp_push_ecommerce("view_item_list",t,{currency:gtm4wp_currency})}document.addEventListener("wc-blocks_added_to_cart",a),document.addEventListener("click",function(t){const n=t.target;if(!n)return!0;n.closest(".add_to_cart_button:not(.product_type_variable, .product_type_grouped, .product_type_bundle_input_required, .single_add_to_cart_button)")&&(_(),p(n));const r=n.closest(".single_add_to_cart_button");if(r){const t=function(t){const e=t.closest("form");return!e||e.classList&&e.classList.contains("cart")?null:e}(r);t?function(t,o){_();const n=[];i(t,o,{emit(t,e,o){n.push([t,e,o])}});let r=n.length?{pushes:n}:null;if(!r){const t=o.querySelector("[name=variation_id]"),n=parseInt(t&&t.value,10);if(!n)return!1;const c=e(o.querySelector("[name=quantity]"),"value");r={lookup:{product_id:n,quantity:null===c||c<1?1:c}}}u=r,d=window.setTimeout(_,1e4)}(r,t):i(r)}if(n.closest(".mini_cart_item a.remove,.product-remove a.remove")){const t=n&&n.closest(".mini_cart_item a.remove,.product-remove a.remove");
1if(!t)return!0;const o=gtm4wp_read_json_from_node(t,"gtm4wp_product_data");if(!o)return!0;let r=null;const c=t.closest(".cart_item");let i=c&&c.querySelectorAll(".product-quantity input.qty");if(i&&0!==i.length)r=e(i[0],"value");else{const o=t.closest(".mini_cart_item");i=o&&o.querySelectorAll(".quantity"),i&&i.length>0&&(r=e(i[0],"textContent"))}if(null===r||r<1)return!0;o.quantity=r,gtm4wp_push_ecommerce("remove_from_cart",[o],{currency:gtm4wp_currency,value:o.price*o.quantity})}const c=n.closest(".products li:not(.product-category) a:not(.add_to_cart_button):not(.quick-view-button),.wc-block-grid__products li:not(.product-category) a:not(.add_to_cart_button):not(.quick-view-button),.wc-block-product-template li.wc-block-product a:not(.add_to_cart_button):not(.quick-view-button),.products>div:not(.product-category) a:not(.add_to_cart_button):not(.quick-view-button),.widget-product-item,.woocommerce-grouped-product-list-item__label a");if(c){if("undefined"==typeof google_tag_manager)return!0;const e=t.target;let n,r=e.closest(".product,.wc-block-grid__product,.wc-block-product");r?n=r.querySelector(".gtm4wp_productdata"):(r=e.closest(".products li"),r?n=r.querySelector(".gtm4wp_productdata"):(r=e.closest(".products>div"),r?n=r.querySelector(".gtm4wp_productdata"):(r=e.closest(".woocommerce-grouped-product-list-item__label"),n=r?r.querySelector(".gtm4wp_productdata"):e)));const i=gtm4wp_read_json_from_node(n,"gtm4wp_product_data",["internal_id"]);if(!i)return!0;if(i.productlink!=c.getAttribute("href"))return!0;if(o()&&i.item_list_name){const t=gtm4wp_read_json_from_node(n,"gtm4wp_product_data",[]);t&&t.internal_id&>m4wp_store_item_list_attribution(t.internal_id,i.item_list_name,i.item_list_id)}for(const t in window.google_tag_manager)if("gtm-"==t.substring(0,4).toLowerCase()){window.gtm4wp_first_container_id=t;break}if(""===window.gtm4wp_first_container_id)return!0;let u=2e3;if("undefined"!=typeof gtm4wp_datalayer_max_timeout&&(u=gtm4wp_datalayer_max_timeout),u>0){const e=t.ctrlKey||t.metaKey,o="_blank"===c.target,n=t.defaultPrevented;n||t.preventDefault(),(e||o)&&(window.productpage_window=window.open("about:blank","_blank"));const r=i.productlink;delete i.productlink,gtm4wp_push_ecommerce("select_item",[i],{currency:gtm4wp_currency},function(t){if(void 0!==t&&window.gtm4wp_first_container_id!=t)return!0;n||((o||e)&&productpage_window?productpage_window.location.href=r:document.location.href=r)},u)}else delete i.productlink,gtm4wp_push_ecommerce("select_item",[i],{currency:gtm4wp_currency})}},{capture:!0}),jQuery(document).on("found_variation",function(e,n){if(void 0===n)return;if("interactive"===document.readyState&>m4wp_view_item_fired_during_pageload)return;const r=e.target;if(!r)return!0;const c=r.querySelector(".gtm4wp_single_productdata,[name=gtm4wp_product_data]");if(!c)return!0;let i;try{i=JSON.parse(c.dataset&&c.dataset.gtm4wp_product_data||c.value)}catch(t){return console&&console.error&&console.error(t.message),!0}if(!i)return!0;i.price=gtm4wp_make_sure_is_float(i.price),i.item_group_id=i.id,i.id=gtm4wp_remarketing_prod_id_prefix?gtm4wp_remarketing_prod_id_prefix+n.variation_id:n.variation_id,i.item_id=n.variation_id,i.sku=n.sku,gtm4wp_use_sku_instead&&n.sku&&""!==n.sku&&(i.id=gtm4wp_remarketing_prod_id_prefix?gtm4wp_remarketing_prod_id_prefix+n.sku:n.sku,i.item_id=n.sku),i.price=gtm4wp_make_sure_is_float(n.display_price);const u=[];for(const t in n.attributes)u.push(n.attributes[t]);i.item_variant=u.join(","),t=i;const d=i.internal_id;delete i.internal_id,i.quantity=1,o()&>m4wp_apply_stored_item_list(i,d),gtm4wp_push_ecommerce("view_item",[i],{currency:gtm4wp_currency,value:i.price}),"interactive"===document.readyState&&(gtm4wp_view_item_fired_during_pageload=!0)}),jQuery(".variations select").trigger("change"),jQuery(document).ajaxSuccess(function(t,e,n){void 0!==n&&n.url.indexOf("wc-api=WC_Quick_View")>-1&&setTimeout(function(){const t=document.querySelector("#gtm4wp_quickview_data");if(t&&t.dataset&&t.dataset.gtm4wp_datalayer)try{const e=JSON.parse(t.dataset.gtm4wp_datalayer);o()&&e&&e.ecommerce&&e.ecommerce.item&>m4wp_apply_stored_item_list(e.ecommerce.item,e.ecommerce.item.internal_id),e&&window[gtm4wp_datalayer_name]&&window[gtm4wp_datalayer_name].push(e)}catch(t){console&&console.error&&console.error(t.message)}},500)});let m=!1,l=!1;const w=document.querySelector("body");w&&(m=w.classList&&w.classList.contains("woocommerce-cart"),l=w.classList&&w.classList.contains("woocommerce-checkout")),m&&(document.addEventListener("click",function(t){const e=t.target;return!e||!e.closest("[name=update_cart]")||void n()}),document.addEventListener("keypress",function(t){const e=t.target;return!e||!e.closest(".woocommerce-cart-form input[type=number]")||void n()})),l&&(window.gtm4wp_checkout_value=window.gtm4wp_checkout_value||0,window.gtm4wp_checkout_products=window.gtm4wp_checkout_products||[],window.gtm4wp_checkout_products_ga4=window.gtm4wp_checkout_products_ga4||[],document.addEventListener("change",function(t){const e=t.target;return!e||!e.closest("input[name^=shipping_method]")||void c()}),document.addEventListener("change",function(t){const e=t.target;return!e||!e.closest("input[name=payment_method]")||void r()}),jQuery("form.checkout").on("checkout_place_order",function(){-1==gtm4wp_checkout_step_fired.indexOf("shipping_method")&&c(),-1==gtm4wp_checkout_step_fired.indexOf("payment_method")&&r()})),"undefined"!=typeof gtm4wp_checkoutwc&>m4wp_checkoutwc&&(window.gtm4wp_checkout_value=window.gtm4wp_checkout_value||0,window.gtm4wp_checkout_products=window.gtm4wp_checkout_products||[],window.gtm4wp_checkout_products_ga4=window.gtm4wp_checkout_products_ga4||[],document.addEventListener("cfw_step_changed",function(t){const e=function(t){let e="";return t&&t.detail&&(e="string"==typeof t.detail?t.detail:t.detail.step||t.detail.current||t.detail.to||t.detail.name||""),(""+e).toLowerCase()}(t);e.indexOf("payment")>-1||e.indexOf("review")>
1-1?(c(),r()):e.indexOf("shipping")>-1&&c()}),jQuery(document.body).on("cfw_before_submit checkout_place_order",function(){c(),r()}))}function m(){document.removeEventListener("DOMContentLoaded",m),window.removeEventListener("load",m),s()}window.gtm4wp_track_single_add_to_cart=i,window.gtm4wp_track_list_add_to_cart=p,"loading"!==document.readyState?window.setTimeout(s):(document.addEventListener("DOMContentLoaded",m),window.addEventListener("load",m))})();
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.