// source --> https://www.tonerizastampace.com/wp-content/plugins/woocommerce-google-adwords-conversion-tracking-tag/js/public/wpm-public.p1.min.js?ver=1.14.1 
(()=>{var e={398:()=>{!function(e,t,a){let r;e.getRandomEventId=function(){return(Math.random()+1).toString(36).substring(2)},e.getFbUserData=function(){return r||e.getFbUserDataFromBrowser()},e.setFbUserData=function(){r=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=function(){return{fbp:e.getCookie("_fbp"),fbc:e.getCookie("_fbc"),client_user_agent:navigator.userAgent}},e.fbViewContent=function(t){if(!window.fbq)return;let a=e.getRandomEventId();fbq("track","ViewContent",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],currency:wpmDataLayer.shop.currency,value:t.price},{eventID:a}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"ViewContent",event_id:a,user_data:e.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})}}(window.wpm=window.wpm||{},jQuery),jQuery((function(){wpmDataLayer?.pixels?.facebook&&(jQuery(document).on("wpmAddToCart",(function(e,t){if(!window.fbq)return;let a=wpm.getRandomEventId();fbq("track","AddToCart",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:a}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToCart",event_id:a,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})})),jQuery(document).on("wpmBeginCheckout",(function(e){if(!window.fbq)return;let t=wpm.getRandomEventId();fbq("track","InitiateCheckout",{},{eventID:t}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"InitiateCheckout",event_id:t,user_data:wpm.getFbUserData(),event_source_url:window.location.href})})),jQuery(document).on("wpmAddToWishlist",(function(e,t){if(!window.fbq)return;let a=wpm.getRandomEventId();fbq("track","AddToWishlist",{content_type:"product",content_name:t.name,content_ids:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],value:parseFloat(t.quantity*t.price),currency:t.currency},{eventID:a}),t.currency=wpmDataLayer.shop.currency,jQuery(document).trigger("wpmFbCapiEvent",{event_name:"AddToWishlist",event_id:a,user_data:wpm.getFbUserData(),product_data:t,product_id:t.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],event_source_url:window.location.href})})),jQuery(document).on("wpmViewItem",(function(e,t){window.fbq&&wpm.fbViewContent(t)})))})),jQuery(window).on("load",(function(){wpmDataLayer?.pixels?.facebook&&(wpm.setFbUserData(),wpmExists().then((function(){try{if("product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());wpm.fbViewContent(e)}else if("search"===wpmDataLayer.shop.page_type){if(!window.fbq)return;let e=wpm.getRandomEventId();fbq("track","Search",{},{eventID:e}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:"Search",event_id:e,user_data:wpm.getFbUserData(),event_source_url:window.location.href})}}catch(e){console.log(e)}})))}))},832:()=>{jQuery((function(){wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status&&(jQuery(document).on("wpmViewItemList",(function(e,t){wpmDataLayer.general.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids||t&&googleConfigConditionsMet("ads")&&gtag("event","view_item_list",{send_to:wpmDataLayer.pixels.google.ads.conversionIds,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})})),jQuery(document).on("wpmAddToCart",(function(e,t){gtag("event","add_to_cart",{send_to:wpmDataLayer.pixels.google.ads.conversionIds,value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})})),jQuery(document).on("wpmViewItem",(function(e,t){gtag("event","view_item",{send_to:wpmDataLayer.pixels.google.ads.conversionIds,value:t.quantity*t.price,items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})})))})),jQuery(window).on("load",(function(){wpmExists().then((function(){try{if("product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());gtag("event","view_item",{send_to:wpmDataLayer.pixels.google.ads.conversionIds,value:1*e.price,items:[{id:e.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]})}else if("search"===wpmDataLayer.shop.page_type){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.products)){if(wpmDataLayer.general.variationsOutput&&a.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;e.push({id:a.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}gtag("event","view_search_results",{send_to:wpmDataLayer.pixels.google.ads.conversionIds,items:e})}}catch(e){console.log(e)}}))}))},712:()=>{!function(e,t,a){const r="_wpm_order_ids",o="_wpm_endpoint_available",i="/wp-json/";function n(){return""!==e.getCookie(r)}e.useRestEndpoint=function(){return e.isSessionStorageAvailable()&&e.isRestEndpointAvailable()&&e.isBelowRestErrorThreshold()},e.isBelowRestErrorThreshold=function(){return window.sessionStorage.getItem(0)<=10},e.isRestEndpointAvailable=function(){if(window.sessionStorage.getItem(o))return JSON.parse(window.sessionStorage.getItem(o));e.testEndpoint()},e.isSessionStorageAvailable=function(){return!!window.sessionStorage},e.testEndpoint=function(){let e=arguments.length>0&&arguments[0]!==a?arguments[0]:location.protocol+"//"+location.host+i,t=arguments.length>1&&arguments[1]!==a?arguments[1]:o;jQuery.ajax(e,{type:"HEAD",timeout:1e3,statusCode:{200:function(e){window.sessionStorage.setItem(t,JSON.stringify(!0))},404:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))},0:function(e){window.sessionStorage.setItem(t,JSON.stringify(!1))}}}).then((e=>{}))},e.isWpmRestEndpointAvailable=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:o;return!!e.getCookie(t)},e.writeOrderIdToStorage=function(t){if(window.Storage)if(null===localStorage.getItem(r)){let e=[];e.push(t),window.localStorage.setItem(r,JSON.stringify(e))}else{let e=JSON.parse(localStorage.getItem(r));e.includes(t)||(e.push(t),window.localStorage.setItem(r,JSON.stringify(e)))}else{let a=new Date;a.setDate(a.getDate()+365);let o=[];n()&&(o=JSON.parse(e.getCookie(r))),o.includes(t)||(o.push(t),document.cookie="_wpm_order_ids="+JSON.stringify(o)+";expires="+a.toUTCString())}"function"==typeof e.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&e.storeOrderIdOnServer(t)},e.isOrderIdStored=function(t){return wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(r)&&JSON.parse(localStorage.getItem(r)).includes(t):!!n()&&JSON.parse(e.getCookie(r)).includes(t):(console.log("order deduplication: off"),!1)},e.isEmail=function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},e.removeProductFromCart=function(t){let r=arguments.length>1&&arguments[1]!==a?arguments[1]:null;try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==r?wpmDataLayer.cart[t].quantity:r,wpmDataLayer.cart[t]){let o=e.getProductDetailsFormattedForEvent(t,a);jQuery(document).trigger("wpmRemoveFromCart",o),null==r||wpmDataLayer.cart[t].quantity===r?(delete wpmDataLayer.cart[t],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.log(e)}},getIdBasedOndVariationsOutputSetting=function(e){try{return wpmDataLayer.general.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.log(e)}},e.addProductToCart=function(t,r){try{if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products[t]){let o=e.getProductDetailsFormattedForEvent(t,r);jQuery(document).trigger("wpmAddToCart",o),wpmDataLayer.cart!==a&&wpmDataLayer.cart[t]!==a?(wpmDataLayer.cart[t].quantity=wpmDataLayer.cart[t].quantity+r,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):wpmDataLayer.cart?(wpmDataLayer.cart[t]=e.getProductDetailsFormattedForEvent(t,r),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart={[t]:e.getProductDetailsFormattedForEvent(t,r)},sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(t){console.log(t),e.getCartItemsFromBackend()}},e.getCartItems=function(){sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?e.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):e.getCartItemsFromBackend()},e.getCartItemsFromBackend=function(){try{let t={action:"wpm_get_cart_items"};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:t,success:function(t){t.cart||(t.cart={}),e.saveCartObjectToDataLayer(t.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(t.cart))}})}catch(e){console.log(e)}},e.getProductsFromBackend=function(t){if((t=t.filter((e=>!wpmDataLayer.products.hasOwnProperty(e))))&&0!==t.length)try{let a={action:"wpm_get_product_ids",productIds:t};jQuery.ajax({type:"get",dataType:"json",url:e.ajax_url,data:a,success:function(e){wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},error:function(e){console.log(e)}})}catch(e){console.log(e)}},e.saveCartObjectToDataLayer=function(e){wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},e.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null,r=arguments.length>2&&arguments[2]!==a?arguments[2]:null,o={step:e,checkout_option:t,value:r};jQuery(document).trigger("wpmFireCheckoutOption",o)},e.fireCheckoutProgress=function(e){let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},e.getPostIdFromString=function(e){try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.log(e)}},e.triggerViewItemList=function(t){if(!t)throw Error("Wasn't able to retrieve a productId");if(!(t=getIdBasedOndVariationsOutputSetting(t)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",e.getProductDataForViewItemEvent(t))},e.getProductDataForViewItemEvent=function(t){if(!t)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[t])return e.getProductDetailsFormattedForEvent(t)}catch(e){console.log(e)}},e.getMainProductIdFromProductPage=function(){try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.log(e)}},e.viewItemListTriggerTestMode=function(e){jQuery(e).css({position:"relative"}),jQuery(e).append('<div id="viewItemListTriggerOverlay"></div>'),jQuery(e).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wpmDataLayer.viewItemListTrigger.opacity,"background-color":wpmDataLayer.viewItemListTrigger.backgroundColor})},e.getSearchTermFromUrl=function(){try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.log(e)}};let s,c={};e.observerCallback=function(t,a){t.forEach((t=>{try{let r,o=jQuery(t.target).data("ioid");if(r=jQuery(t.target).next(".wpmProductId").length?jQuery(t.target).next(".wpmProductId").data("id"):jQuery(t.target).find(".wpmProductId").data("id"),!r)throw Error("wpmProductId element not found");t.isIntersecting?c[o]=setTimeout((()=>{e.triggerViewItemList(r),wpmDataLayer.viewItemListTrigger.testMode&&e.viewItemListTriggerTestMode(t.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&a.unobserve(t.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(c[o]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(t.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.log(e)}}))};let d,u=0;e.startIntersectionObserverToWatch=function(){try{new URLSearchParams(window.location.search).has("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),s=new IntersectionObserver(e.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),d=jQuery(".wpmProductId").map((function(e,t){return jQuery(t).parent().hasClass("type-product")||jQuery(t).parent().hasClass("product")||jQuery(t).parent().hasClass("product-item-inner")?jQuery(t).parent():jQuery(t).prev().hasClass("wc-block-grid__product")||jQuery(t).prev().hasClass("product")||jQuery(t).prev().hasClass("product-small")||jQuery(t).prev().hasClass("woocommerce-LoopProduct-link")?jQuery(this).prev():jQuery(t).closest(".product").length?jQuery(t).closest(".product"):void 0})),d.each((function(e,t){jQuery(t[0]).data("ioid",u++),s.observe(t[0])}))}catch(e){console.log(e)}},e.startProductsMutationObserverToWatch=function(){try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&p.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.log(e)}};let p=new MutationObserver((function(e){e.forEach((function(e){let t=e.addedNodes;null!==t&&jQuery(t).each((function(){(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product"))&&l(this)&&(jQuery(this).data("ioid",u++),s.observe(this))}))}))})),l=function(e){return!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length)};e.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:"",r=arguments.length>2&&arguments[2]!==a?arguments[2]:null;if(r){let a=new Date;a.setTime(a.getTime()+24*r*60*60*1e3);let o="expires="+a.toUTCString();document.cookie=e+"="+t+";"+o+";path=/"}else document.cookie=e+"="+t+";path=/"},e.getCookie=function(e){let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let r=a[e];for(;" "==r.charAt(0);)r=r.substring(1);if(0==r.indexOf(t))return r.substring(t.length,r.length)}return""},e.storeOrderIdOnServer=function(t){try{let a={action:"wpm_purchase_pixels_fired",order_id:t,nonce:e.nonce};jQuery.ajax({type:"post",dataType:"json",url:e.ajax_url,data:a,success:function(e){!1===e.success&&console.log(e)},error:function(e){console.log(e)}})}catch(e){console.log(e)}},e.getProductIdByCartItemKeyUrl=function(e){let t=new URLSearchParams(e.search).get("remove_item"),a=null;return a=0===wpmDataLayer.cartItemKeys[t].variation_id?wpmDataLayer.cartItemKeys[t].product_id:wpmDataLayer.cartItemKeys[t].variation_id,a},e.getAddToCartLinkProductIds=function(){return jQuery("a").map((function(){let e=jQuery(this).attr("href");if(e&&e.includes("?add-to-cart=")){let t=e.match(/(add-to-cart=)(\d+)/);if(t)return t[2]}})).get()},e.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:1,r={id:e.toString(),dyn_r_ids:wpmDataLayer.products[e].dyn_r_ids,name:wpmDataLayer.products[e].name,list_name:wpmDataLayer.shop.list_name,brand:wpmDataLayer.products[e].brand,category:wpmDataLayer.products[e].category,variant:wpmDataLayer.products[e].variant,list_position:wpmDataLayer.products[e].position,quantity:t,price:wpmDataLayer.products[e].price,currency:wpmDataLayer.shop.currency,isVariable:wpmDataLayer.products[e].isVariable,isVariation:wpmDataLayer.products[e].isVariation,parentId:wpmDataLayer.products[e].parentId};return r.isVariation&&(r.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),r},e.setReferrerToCookie=function(){e.getCookie("wpmReferrer")||e.setCookie("wpmReferrer",document.referrer)},e.getReferrerFromCookie=function(){return e.getCookie("wpmReferrer")?e.getCookie("wpmReferrer"):null},e.getClidFromBrowser=function(){let t,r=arguments.length>0&&arguments[0]!==a?arguments[0]:"gclid";return t={gclid:"_gcl_aw",dclid:"_gcl_dc"},e.getCookie(t[r])?e.getCookie(t[r]).match(/(GCL.[\d]*.)(.*)/)[2]:""},e.getUserAgent=function(){return navigator.userAgent},e.getViewPort=function(){return{width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}};let g=function(){let t=e.getCookie("cmplz_statistics"),a=e.getCookie("cmplz_marketing");return!(!e.getCookie("cmplz_consent_status")&&!e.getCookie("cmplz_banner-status"))&&{analytics:"allow"===t,ads:"allow"===a,visitorHasChosen:!0}},m=function(){let t=e.getCookie("cookielawinfo-checkbox-analytics"),a=e.getCookie("cookielawinfo-checkbox-advertisement"),r=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!r}},y={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=function(){return y},e.updateConsentCookieValues=function(){let t,r=arguments.length>0&&arguments[0]!==a&&arguments[0];(t=e.getCookie("CookieConsent"))?(t=decodeURI(t),y.categories.analytics=t.indexOf("statistics:true")>=0,y.categories.ads=t.indexOf("marketing:true")>=0,y.visitorHasChosen=!0):(t=e.getCookie("CookieScriptConsent"))?(t=JSON.parse(t),"reject"===t.action?(y.categories.analytics=!1,y.categories.ads=!1):2===t.categories.length?(y.categories.analytics=!0,y.categories.ads=!0):(y.categories.analytics=t.categories.indexOf("performance")>=0,y.categories.ads=t.categories.indexOf("targeting")>=0),y.visitorHasChosen=!0):(t=e.getCookie("borlabs-cookie"))?(t=decodeURI(t),t=JSON.parse(t),y.categories.analytics=!!t?.consents?.statistics,y.categories.ads=!!t?.consents?.marketing,y.visitorHasChosen=!0,y.pixels=[...t?.consents?.statistics||[],...t?.consents?.marketing||[]],y.mode="pixel"):(t=g())?(y.categories.analytics=!0===t.analytics,y.categories.ads=!0===t.ads,y.visitorHasChosen=t.visitorHasChosen):(t=e.getCookie("cookie_notice_accepted"))?(y.categories.analytics=!0,y.categories.ads=!0,y.visitorHasChosen=!0):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),y.categories.analytics=!!t.categories[3],y.categories.ads=!!t.categories[4],y.visitorHasChosen=!0):(t=m())?(y.categories.analytics=!0===t.analytics,y.categories.ads=!0===t.ads,y.visitorHasChosen=!0===t.visitorHasChosen):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),y.categories.analytics="1"===t.thirdparty,y.categories.ads="1"===t.advanced,y.visitorHasChosen=!0):(y.categories.analytics=!r,y.categories.ads=!r)},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=function(){y.categories={analytics:!1,ads:!1}},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:r}=a;[...r].forEach((a=>{t(a).data("wpm-cookie-category")&&(e.shouldScriptBeActive(a)?e.unblockScript(a):e.blockScript(a))}))}))})),e.scriptTagObserver.observe(document.head,{childList:!0,subtree:!0}),window.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=function(e){return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||y.visitorHasChosen)&&("category"!==y.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>y.categories[e])))&&("pixel"!==y.mode||!y.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==y.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>y.pixels.includes(e))))&&(!wpmDataLayer?.pixels?.google?.consent_mode?.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let r=arguments.length>1&&arguments[1]!==a&&arguments[1];r&&t(e).remove();let o=t(e).data("wpm-src");o&&t(e).attr("src",o),e.type="text/javascript",r&&t(e).appendTo("head")},e.blockScript=function(e){let r=arguments.length>1&&arguments[1]!==a&&arguments[1];r&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",r&&t(e).appendTo("head")},e.unblockAllScripts=function(){let r=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];t.each(t('script[type="blocked/javascript"]'),(function(a,i){(t(i).data("wpm-cookie-category").includes("analytics")&&r||t(i).data("wpm-cookie-category").includes("ads")&&o)&&e.unblockScript(i,!0)}))},e.unblockSelectedPixels=function(){t.each(t('script[type="blocked/javascript"]'),(function(a,r){(y.pixels.includes(t(r).data("wpm-pixel-name"))||"google"===t(r).data("wpm-pixel-name")&&["google-analytics","google-ads"].some((e=>y.pixels.includes(e))))&&e.unblockScript(r,!0)}))},e.googleConfigConditionsMet=function(e){return!!wpmDataLayer.pixels.google.consent_mode.active||("category"===y.mode?!0===y.categories[e]:"pixel"===y.mode&&y.pixels.includes("google-"+e))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(e){return"category"===y.mode?(y.categories.analytics&&(e.analytics_storage="granted"),y.categories.ads&&(e.ad_storage="granted")):"pixel"===y.mode&&(e.analytics_storage=y.pixels.includes("google-analytics")?"granted":"denied",e.ad_storage=y.pixels.includes("google-ads")?"granted":"denied"),e},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];window.gtag&&wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent&&gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})},window.addEventListener("borlabs-cookie-consent-saved",(function(t){e.updateConsentCookieValues(),"pixel"===y.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(y.pixels.includes("google-analytics"),y.pixels.includes("google-ads"))):(e.unblockAllScripts(y.categories.analytics,y.categories.ads),e.updateGoogleConsentMode(y.categories.analytics,y.categories.ads))})),window.addEventListener("CookiebotOnAccept",(function(t){Cookiebot.consent.statistics&&(y.categories.analytics=!0),Cookiebot.consent.marketing&&(y.categories.ads=!0),e.unblockAllScripts(y.categories.analytics,y.categories.ads),e.updateGoogleConsentMode(y.categories.analytics,y.categories.ads)}),!1),window.addEventListener("CookieScriptAccept",(function(t){t.detail.categories.includes("performance")&&(y.categories.analytics=!0),t.detail.categories.includes("targeting")&&(y.categories.ads=!0),e.unblockAllScripts(y.categories.analytics,y.categories.ads),e.updateGoogleConsentMode(y.categories.analytics,y.categories.ads)})),window.addEventListener("CookieScriptAcceptAll",(function(t){e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),document.addEventListener("cmplzStatusChange",(function(t){e.updateConsentCookieValues(),e.unblockAllScripts(y.categories.analytics,y.categories.ads),e.updateGoogleConsentMode(y.categories.analytics,y.categories.ads)})),document.addEventListener("setCookieNotice",(function(t){e.updateConsentCookieValues(),e.unblockAllScripts(y.categories.analytics,y.categories.ads),e.updateGoogleConsentMode(y.categories.analytics,y.categories.ads)})),e.huObserver=new MutationObserver((function(t){t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&jQuery(".hu-cookies-save").on("click",(function(t){e.updateConsentCookieValues(),e.unblockAllScripts(y.categories.analytics,y.categories.ads),e.updateGoogleConsentMode(y.categories.analytics,y.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),e.version=function(){console.log(wpmDataLayer.version)},window.wpmLoaded={}}(window.wpm=window.wpm||{},jQuery),jQuery((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch(),jQuery("body"),jQuery(".products, .product"),jQuery(document).on("click",".remove_from_cart_button, .remove",(function(e){try{let e=new URL(jQuery(this).attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e);wpm.removeProductFromCart(t)}catch(e){console.log(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(function(e){try{if("product"===wpmDataLayer.shop.page_type){if(void 0!==jQuery(this).attr("href")&&jQuery(this).attr("href").includes("add-to-cart")){let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}else if("simple"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).val();wpm.addProductToCart(t,e)}else if("variable"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("[name='variation_id']").val();wpm.addProductToCart(t,e)}else if("grouped"===wpmDataLayer.shop.product_type)jQuery(".woocommerce-grouped-product-list-item").each((function(){let e=Number(jQuery(this).find(".input-text.qty").val());e||0===e||(e=1);let t=jQuery(this).attr("class"),a=wpm.getPostIdFromString(t);wpm.addProductToCart(a,e)}));else if("bundle"===wpmDataLayer.shop.product_type){let e=Number(jQuery(".input-text.qty").val());e||0===e||(e=1);let t=jQuery("input[name=add-to-cart]").val();wpm.addProductToCart(t,e)}}else{let e=1,t=jQuery(this).data("product_id");wpm.addProductToCart(t,e)}}catch(e){console.log(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(function(e){try{if(jQuery(e.target).closest("a").attr("href")){let t=jQuery(e.target).closest("a").attr("href");if(t.includes("add-to-cart=")){let e=t.match(/(add-to-cart=)(\d+)/);e&&wpm.addProductToCart(e[2],1)}}}catch(e){console.log(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(function(e){try{let e=jQuery(this).nextAll(".wpmProductId:first").data("id");if(e){if(e=getIdBasedOndVariationsOutputSetting(e),!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmSelectContentGaUa",t),jQuery(document).trigger("wpmSelectItem",t)}}}catch(e){console.log(e)}})),jQuery(document).one("click",".checkout-button, .cart-checkout-button, .button.checkout",(function(e){jQuery(document).trigger("wpmBeginCheckout")}));let e=!1;jQuery(document).on("input","#billing_email",(function(){wpm.isEmail(jQuery(this).val())&&(wpm.fireCheckoutProgress(2),e=!0)}));let t=!1;jQuery(document).on("click",".wc_payment_methods",(function(){!1===t&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),t=!0})),jQuery(document).one("click","#place_order",(function(){!1===e&&wpm.fireCheckoutProgress(2),!1===t&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)})),jQuery(document).on("click","[name='update_cart']",(function(e){try{jQuery(".cart_item").each((function(){let e=new URL(jQuery(this).find(".product-remove").find("a").attr("href")),t=wpm.getProductIdByCartItemKeyUrl(e),a=jQuery(this).find(".qty").val();0===a?wpm.removeProductFromCart(t):a<wpmDataLayer.cart[t].quantity?wpm.removeProductFromCart(t,wpmDataLayer.cart[t].quantity-a):a>wpmDataLayer.cart[t].quantity&&wpm.addProductToCart(t,a-wpmDataLayer.cart[t].quantity)}))}catch(e){console.log(e),wpm.getCartItemsFromBackend()}})),jQuery(".single_variation_wrap").on("show_variation",(function(e,t){try{let e=getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[e]){let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)}}catch(e){console.log(e)}})),jQuery(document).on("click",".add_to_wishlist, .wl-add-to",(function(){try{let e;if(jQuery(this).data("productid")?e=jQuery(this).data("productid"):jQuery(this).data("product-id")&&(e=jQuery(this).data("product-id")),!e)throw Error("Wasn't able to retrieve a productId");let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmAddToWishlist",t)}catch(e){console.log(e)}})),jQuery(document).on("updated_cart_totals",(function(){jQuery(document).trigger("wpmViewCart")}))})),jQuery(document).ajaxSend((function(e,t,a){a.url.includes("get_refreshed_fragments")&&sessionStorage&&(sessionStorage.getItem("wpmMiniCartActive")||sessionStorage.setItem("wpmMiniCartActive",JSON.stringify(!0)))})),jQuery(window).on("load",(function(){try{JSON.parse(sessionStorage.getItem("wpmMiniCartActive"))&&JSON.parse(sessionStorage.getItem("wpmFirstPageLoad"))&&!0===wpmDataLayer.shop.mini_cart.track?wpm.getCartItems():sessionStorage.setItem("wpmFirstPageLoad",JSON.stringify(!0))}catch(e){console.log(e)}})),jQuery(window).on("load",(function(){wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(window).on("load",(function(){if(!wpm.getCookie("wpmReferrer"))if(document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host?wpm.setCookie("wpmReferrer",e):wpm.setCookie("wpmReferrer","")}else wpm.setCookie("wpmReferrer","")}))}},t={};function a(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,a),i.exports}a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";a(712),a(832),a(398)})()})();
//# sourceMappingURL=wpm-public.p1.min.js.map;