// source --> https://bikerpro.pl/wp-content/plugins/woocommerce-google-adwords-conversion-tracking-tag/js/public/wooptpm.min.js?ver=1.11.7 
if(typeof varExists!=="function"){varExists=function(varName){return new Promise(function(resolve,reject){(function waitForVar(){if(typeof window[varName]!=="undefined")return resolve();setTimeout(waitForVar,30)})()})}}varExists("jQuery").then(function(){(function(wooptpm,$,undefined){const wgactDeduper={keyName:"_wooptpm_order_ids",cookieExpiresDays:365};const wooptpmRestSettings={cookieWooptpmRestEndpointAvailable:"_wooptpm_endpoint_available",restEndpoint:"/wp-json/",restFails:0,restFailsThreshold:10};wooptpm.useRestEndpoint=function(){return wooptpm.isSessionStorageAvailable()&&wooptpm.isRestEndpointAvailable()&&wooptpm.isBelowRestErrorThreshold()};wooptpm.isBelowRestErrorThreshold=function(){return window.sessionStorage.getItem(wooptpmRestSettings.restFails)<=wooptpmRestSettings.restFailsThreshold};wooptpm.isRestEndpointAvailable=function(){if(window.sessionStorage.getItem(wooptpmRestSettings.cookieWooptpmRestEndpointAvailable)){return JSON.parse(window.sessionStorage.getItem(wooptpmRestSettings.cookieWooptpmRestEndpointAvailable))}else{wooptpm.testEndpoint()}};wooptpm.isSessionStorageAvailable=function(){return!!window.sessionStorage};wooptpm.testEndpoint=function(url=location.protocol+"//"+location.host+wooptpmRestSettings.restEndpoint,cookieName=wooptpmRestSettings.cookieWooptpmRestEndpointAvailable){jQuery.ajax(url,{type:"HEAD",timeout:1e3,statusCode:{200:function(response){window.sessionStorage.setItem(cookieName,JSON.stringify(true))},404:function(response){window.sessionStorage.setItem(cookieName,JSON.stringify(false))},0:function(response){window.sessionStorage.setItem(cookieName,JSON.stringify(false))}}}).then(r=>{})};wooptpm.isWooptpmRestEndpointAvailable=function(cookieName=wooptpmRestSettings.cookieWooptpmRestEndpointAvailable){return!!wooptpm.getCookie(cookieName)};wooptpm.objectExists=function(obj){for(let i=1;i<arguments.length;i++){if(!obj.hasOwnProperty(arguments[i])){return false}obj=obj[arguments[i]]}return true};wooptpm.writeOrderIdToStorage=function(orderId,expireDays=365){if(!window.Storage){let expiresDate=new Date;expiresDate.setDate(expiresDate.getDate()+wgactDeduper.cookieExpiresDays);let ids=[];if(checkCookie()){ids=JSON.parse(getCookie(wgactDeduper.keyName))}if(!ids.includes(orderId)){ids.push(orderId);document.cookie=wgactDeduper.keyName+"="+JSON.stringify(ids)+";expires="+expiresDate.toUTCString()}}else{if(localStorage.getItem(wgactDeduper.keyName)===null){let ids=[];ids.push(orderId);window.localStorage.setItem(wgactDeduper.keyName,JSON.stringify(ids))}else{let ids=JSON.parse(localStorage.getItem(wgactDeduper.keyName));if(!ids.includes(orderId)){ids.push(orderId);window.localStorage.setItem(wgactDeduper.keyName,JSON.stringify(ids))}}}if(typeof wooptpm.storeOrderIdOnServer==="function"&&wooptpmDataLayer.orderDeduplication){wooptpm.storeOrderIdOnServer(orderId)}};function getCookie(cname){let name=cname+"=";let ca=document.cookie.split(";");for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)===" "){c=c.substring(1)}if(c.indexOf(name)===0){return c.substring(name.length,c.length)}}return""}function checkCookie(){let key=getCookie(wgactDeduper.keyName);return key!==""}wooptpm.isOrderIdStored=function(orderId){if(wooptpmDataLayer.orderDeduplication){if(!window.Storage){if(checkCookie()){let ids=JSON.parse(getCookie(wgactDeduper.keyName));return ids.includes(orderId)}else{return false}}else{if(localStorage.getItem(wgactDeduper.keyName)!==null){let ids=JSON.parse(localStorage.getItem(wgactDeduper.keyName));return ids.includes(orderId)}else{return false}}}else{console.log("order deduplication: off");return false}};wooptpm.isEmail=function(email){let regex=/^(([^<>()\[\]\\.,;:\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,}))$/;return regex.test(email)};wooptpm.removeProductFromCart=function(productId,quantityToRemove=null){try{if(!productId)throw Error("Wasn't able to retrieve a productId");productId=getIdBasedOndVariationsOutputSetting(productId);if(!productId)throw Error("Wasn't able to retrieve a productId");let quantity;if(quantityToRemove==null){quantity=wooptpmDataLayer.cart[productId].quantity}else{quantity=quantityToRemove}if(wooptpmDataLayer.cart[productId]){let product=wooptpm.getProductDetailsFormattedForEvent(productId,quantity);jQuery(document).trigger("wooptpmRemoveFromCart",product);if(quantityToRemove==null||wooptpmDataLayer.cart[productId].quantity===quantityToRemove){delete wooptpmDataLayer.cart[productId];if(sessionStorage)sessionStorage.setItem("wooptpmDataLayerCart",JSON.stringify(wooptpmDataLayer.cart))}else{wooptpmDataLayer.cart[productId].quantity=wooptpmDataLayer.cart[productId].quantity-quantity;if(sessionStorage)sessionStorage.setItem("wooptpmDataLayerCart",JSON.stringify(wooptpmDataLayer.cart))}}}catch(e){console.log(e)}};getIdBasedOndVariationsOutputSetting=function(productId){try{if(wooptpmDataLayer.general.variationsOutput){return productId}else{if(wooptpmDataLayer.products[productId].isVariation){return wooptpmDataLayer.products[productId].parentId}else{return productId}}}catch(e){console.log(e)}};wooptpm.addProductToCart=function(productId,quantity){try{if(!productId)throw Error("Wasn't able to retrieve a productId");productId=getIdBasedOndVariationsOutputSetting(productId);if(!productId)throw Error("Wasn't able to retrieve a productId");if(wooptpmDataLayer.products[productId]){let product=wooptpm.getProductDetailsFormattedForEvent(productId,quantity);jQuery(document).trigger("wooptpmAddToCart",product);if(wooptpmDataLayer.cart!==undefined&&wooptpmDataLayer.cart[productId]!==undefined){wooptpmDataLayer.cart[productId].quantity=wooptpmDataLayer.cart[productId].quantity+quantity;if(sessionStorage)sessionStorage.setItem("wooptpmDataLayerCart",JSON.stringify(wooptpmDataLayer.cart))}else{if(!wooptpmDataLayer.cart){wooptpmDataLayer["cart"]={[productId]:wooptpm.getProductDetailsFormattedForEvent(productId,quantity)};if(sessionStorage)sessionStorage.setItem("wooptpmDataLayerCart",JSON.stringify(wooptpmDataLayer.cart))}else{wooptpmDataLayer.cart[productId]=wooptpm.getProductDetailsFormattedForEvent(productId,quantity);if(sessionStorage)sessionStorage.setItem("wooptpmDataLayerCart",JSON.stringify(wooptpmDataLayer.cart))}}}}catch(e){console.log(e);wooptpm.getCartItemsFromBackend()}};wooptpm.getCartItems=function(){if(sessionStorage){if(!sessionStorage.getItem("wooptpmDataLayerCart")||wooptpmDataLayer.shop.page_type==="order_received_page"){sessionStorage.setItem("wooptpmDataLayerCart",JSON.stringify({}))}else{wooptpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wooptpmDataLayerCart")))}}else{wooptpm.getCartItemsFromBackend()}};wooptpm.getCartItemsFromBackend=function(){try{let data={action:"wooptpm_get_cart_items"};jQuery.ajax({type:"get",dataType:"json",url:ajax_object.ajax_url,data:data,success:function(cartItems){if(!cartItems["cart"])cartItems["cart"]={};wooptpm.saveCartObjectToDataLayer(cartItems["cart"]);if(sessionStorage)sessionStorage.setItem("wooptpmDataLayerCart",JSON.stringify(cartItems["cart"]))}})}catch(e){console.log(e)}};wooptpm.getProductsFromBackend=function(productIds){productIds=productIds.filter(item=>!wooptpmDataLayer.products.hasOwnProperty(item));if(!productIds||productIds.length===0)return;try{let data={action:"wooptpm_get_product_ids",productIds:productIds};jQuery.ajax({type:"get",dataType:"json",url:ajax_object.ajax_url,data:data,success:function(products){wooptpmDataLayer.products=Object.assign({},wooptpmDataLayer.products,products)},error:function(response){console.log(response)}})}catch(e){console.log(e)}};wooptpm.saveCartObjectToDataLayer=function(cartObject){wooptpmDataLayer.cart=cartObject;wooptpmDataLayer.products=Object.assign({},wooptpmDataLayer.products,cartObject)};wooptpm.fireCheckoutOption=function(step,checkout_option=null,value=null){let data={step:step,checkout_option:checkout_option,value:value};jQuery(document).trigger("wooptpmFireCheckoutOption",data)};wooptpm.fireCheckoutProgress=function(step){let data={step:step};jQuery(document).trigger("wooptpmFireCheckoutProgress",data)};wooptpm.getPostIdFromString=function(string){try{return string.match(/(post-)(\d+)/)[2]}catch(e){console.log(e)}};wooptpm.triggerViewItemList=function(productId){if(!productId)throw Error("Wasn't able to retrieve a productId");productId=getIdBasedOndVariationsOutputSetting(productId);if(!productId)throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wooptpmViewItemList",wooptpm.getProductDataForViewItemEvent(productId))};wooptpm.getProductDataForViewItemEvent=function(productId){if(!productId)throw Error("Wasn't able to retrieve a productId");try{if(wooptpmDataLayer.products[productId]){return wooptpm.getProductDetailsFormattedForEvent(productId)}}catch(e){console.log(e)}};wooptpm.getMainProductIdFromProductPage=function(){try{if(["simple","variable","grouped","composite"].indexOf(wooptpmDataLayer.shop.product_type)>=0){return jQuery(".wooptpmProductId:first").data("id")}else{return false}}catch(e){console.log(e)}};wooptpm.viewItemListTriggerTestMode=function(target){jQuery(target).css({position:"relative"});jQuery(target).append('<div id="viewItemListTriggerOverlay"></div>');jQuery(target).find("#viewItemListTriggerOverlay").css({"z-index":"10",display:"block",position:"absolute",height:"100%",top:"0",left:"0",right:"0",opacity:wooptpmDataLayer.viewItemListTrigger.opacity,"background-color":wooptpmDataLayer.viewItemListTrigger.backgroundColor})};wooptpm.getSearchTermFromUrl=function(){try{let urlParameters=new URLSearchParams(window.location.search);return urlParameters.get("s")}catch(e){console.log(e)}};let ioTimeouts={};wooptpm.observerCallback=function(entries,observer){entries.forEach(entry=>{try{let productId;let elementId=jQuery(entry.target).data("ioid");if(jQuery(entry.target).next(".wooptpmProductId").length){productId=jQuery(entry.target).next(".wooptpmProductId").data("id")}else{productId=jQuery(entry.target).find(".wooptpmProductId").data("id")}if(!productId)throw Error("wooptpmProductId element not found");if(entry.isIntersecting){ioTimeouts[elementId]=setTimeout(()=>{wooptpm.triggerViewItemList(productId);if(wooptpmDataLayer.viewItemListTrigger.testMode)wooptpm.viewItemListTriggerTestMode(entry.target);if(wooptpmDataLayer.viewItemListTrigger.repeat===false)observer.unobserve(entry.target)},wooptpmDataLayer.viewItemListTrigger.timeout)}else{clearTimeout(ioTimeouts[elementId]);if(wooptpmDataLayer.viewItemListTrigger.testMode)jQuery(entry.target).find("#viewItemListTriggerOverlay").remove()}}catch(e){console.log(e)}})};let io;let ioid=0;let allIoElementsToWatch;let getAllElementsToWatch=function(){allIoElementsToWatch=jQuery(".wooptpmProductId").map(function(i,elem){if(jQuery(elem).parent().hasClass("type-product")||jQuery(elem).parent().hasClass("product")||jQuery(elem).parent().hasClass("product-item-inner")){return jQuery(elem).parent()}else if(jQuery(elem).prev().hasClass("wc-block-grid__product")||jQuery(elem).prev().hasClass("product")||jQuery(elem).prev().hasClass("product-small")||jQuery(elem).prev().hasClass("woocommerce-LoopProduct-link")){return jQuery(this).prev()}else if(jQuery(elem).closest(".product").length){return jQuery(elem).closest(".product")}})};wooptpm.startIntersectionObserverToWatch=function(){try{let urlParams=new URLSearchParams(window.location.search);if(urlParams.has("vildemomode"))wooptpmDataLayer.viewItemListTrigger.testMode=true;io=new IntersectionObserver(wooptpm.observerCallback,{threshold:wooptpmDataLayer.viewItemListTrigger.threshold});getAllElementsToWatch();allIoElementsToWatch.each(function(i,elem){jQuery(elem[0]).data("ioid",ioid++);io.observe(elem[0])})}catch(e){console.log(e)}};wooptpm.startProductsMutationObserverToWatch=function(){try{let productsNode=jQuery(".wooptpmProductId:eq(0)").parents().has(jQuery(".wooptpmProductId:eq(1)").parents()).first();if(productsNode.length){productsMutationObserver.observe(productsNode[0],{attributes:true,childList:true,characterData:true})}}catch(e){console.log(e)}};let productsMutationObserver=new MutationObserver(function(mutations){mutations.forEach(function(mutation){let newNodes=mutation.addedNodes;if(newNodes!==null){let nodes=jQuery(newNodes);nodes.each(function(){if(jQuery(this).hasClass("type-product")||jQuery(this).hasClass("product-small")||jQuery(this).hasClass("wc-block-grid__product")){if(hasWooptpmProductIdElement(this)){jQuery(this).data("ioid",ioid++);io.observe(this)}}})}})});let hasWooptpmProductIdElement=function(elem){return!!(jQuery(elem).find(".wooptpmProductId").length||jQuery(elem).siblings(".wooptpmProductId").length)};wooptpm.setCookie=function(cookieName,cookieValue="",expiryDays=null){if(expiryDays){let d=new Date;d.setTime(d.getTime()+expiryDays*24*60*60*1e3);let expires="expires="+d.toUTCString();document.cookie=cookieName+"="+cookieValue+";"+expires+";path=/"}else{document.cookie=cookieName+"="+cookieValue+";path=/"}};wooptpm.getCookie=function(cookieName){let name=cookieName+"=";let decodedCookie=decodeURIComponent(document.cookie);let ca=decodedCookie.split(";");for(let i=0;i<ca.length;i++){let c=ca[i];while(c.charAt(0)==" "){c=c.substring(1)}if(c.indexOf(name)==0){return c.substring(name.length,c.length)}}return""};wooptpm.storeOrderIdOnServer=function(orderId){try{let data={action:"wooptpm_purchase_pixels_fired",order_id:orderId,nonce:ajax_object.nonce};jQuery.ajax({type:"post",dataType:"json",url:ajax_object.ajax_url,data:data,success:function(response){if(response.success===false){console.log(response)}},error:function(response){console.log(response)}})}catch(e){console.log(e)}};wooptpm.getProductIdByCartItemKeyUrl=function(url){let searchParams=new URLSearchParams(url.search);let cartItemKey=searchParams.get("remove_item");let productId=null;if(wooptpmDataLayer.cartItemKeys[cartItemKey]["variation_id"]===0){productId=wooptpmDataLayer.cartItemKeys[cartItemKey]["product_id"]}else{productId=wooptpmDataLayer.cartItemKeys[cartItemKey]["variation_id"]}return productId};wooptpm.getAddToCartLinkProductIds=function(){return jQuery("a").map(function(){let href=jQuery(this).attr("href");if(href&&href.includes("?add-to-cart=")){let matches=href.match(/(add-to-cart=)(\d+)/);if(matches)return matches[2]}}).get()};wooptpm.getProductDetailsFormattedForEvent=function(productId,quantity=1){let product={id:productId.toString(),dyn_r_ids:wooptpmDataLayer.products[productId].dyn_r_ids,name:wooptpmDataLayer.products[productId].name,list_name:wooptpmDataLayer.shop.list_name,brand:wooptpmDataLayer.products[productId].brand,category:wooptpmDataLayer.products[productId].category,variant:wooptpmDataLayer.products[productId].variant,list_position:wooptpmDataLayer.products[productId].position,quantity:quantity,price:wooptpmDataLayer.products[productId].price,currency:wooptpmDataLayer.shop.currency,isVariable:wooptpmDataLayer.products[productId].isVariable,isVariation:wooptpmDataLayer.products[productId].isVariation,parentId:wooptpmDataLayer.products[productId].parentId};if(product.isVariation)product["parentId_dyn_r_ids"]=wooptpmDataLayer.products[productId].parentId_dyn_r_ids;return product};wooptpm.setReferrerToCookie=function(){if(!wooptpm.getCookie("wooptpmReferrer")){wooptpm.setCookie("wooptpmReferrer",document.referrer)}};wooptpm.getReferrerFromCookie=function(){if(wooptpm.getCookie("wooptpmReferrer")){return wooptpm.getCookie("wooptpmReferrer")}else{return null}};wooptpm.getClidFromBrowser=function(clidId="gclid"){let clidCookieId;clidCookieId={gclid:"_gcl_aw",dclid:"_gcl_dc"};if(wooptpm.getCookie(clidCookieId[clidId])){let clidCookie=wooptpm.getCookie(clidCookieId[clidId]);let matches=clidCookie.match(/(GCL.[\d]*.)(.*)/);return matches[2]}else{return""}};wooptpm.getUserAgent=function(){return navigator.userAgent};wooptpm.getViewPort=function(){return{width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}};window["wooptpmLoaded"]={}})(window.wooptpm=window.wooptpm||{},jQuery);jQuery(function(){wooptpm.startIntersectionObserverToWatch();wooptpm.startProductsMutationObserverToWatch();let body=jQuery("body");let products=jQuery(".products, .product");jQuery(document).on("click",".remove_from_cart_button, .remove",function(e){try{let url=new URL(jQuery(this).attr("href"));let productId=wooptpm.getProductIdByCartItemKeyUrl(url);wooptpm.removeProductFromCart(productId)}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(wooptpmDataLayer.shop.page_type==="product"){if(typeof jQuery(this).attr("href")!=="undefined"&&jQuery(this).attr("href").includes("add-to-cart")){let quantity=1;let productId=jQuery(this).data("product_id");wooptpm.addProductToCart(productId,quantity)}else{if(wooptpmDataLayer.shop.product_type==="simple"){let quantity=Number(jQuery(".input-text.qty").val());if(!quantity&&quantity!==0)quantity=1;let productId=jQuery(this).val();wooptpm.addProductToCart(productId,quantity)}else if(wooptpmDataLayer.shop.product_type==="variable"){let quantity=Number(jQuery(".input-text.qty").val());if(!quantity&&quantity!==0)quantity=1;let productId=jQuery("[name='variation_id']").val();wooptpm.addProductToCart(productId,quantity)}else if(wooptpmDataLayer.shop.product_type==="grouped"){jQuery(".woocommerce-grouped-product-list-item").each(function(){let quantity=Number(jQuery(this).find(".input-text.qty").val());if(!quantity&&quantity!==0)quantity=1;let classes=jQuery(this).attr("class");let productId=wooptpm.getPostIdFromString(classes);wooptpm.addProductToCart(productId,quantity)})}}}else{let quantity=1;let productId=jQuery(this).data("product_id");wooptpm.addProductToCart(productId,quantity)}}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(event){try{if(jQuery(event.target).closest("a").attr("href")){let href=jQuery(event.target).closest("a").attr("href");if(href.includes("add-to-cart=")){let matches=href.match(/(add-to-cart=)(\d+)/);if(matches)wooptpm.addProductToCart(matches[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 productId=jQuery(this).nextAll(".wooptpmProductId:first").data("id");if(productId){productId=getIdBasedOndVariationsOutputSetting(productId);if(!productId)throw Error("Wasn't able to retrieve a productId");if(wooptpmDataLayer.products&&wooptpmDataLayer.products[productId]){let product=wooptpm.getProductDetailsFormattedForEvent(productId);jQuery(document).trigger("wooptpmSelectContentGaUa",product);jQuery(document).trigger("wooptpmSelectItem",product)}}}catch(e){console.log(e)}});jQuery(document).one("click",".checkout-button, .cart-checkout-button, .button.checkout",function(e){jQuery(document).trigger("wooptpmBeginCheckout")});let emailSelected=false;jQuery(document).on("input","#billing_email",function(){if(wooptpm.isEmail(jQuery(this).val())){wooptpm.fireCheckoutProgress(2);emailSelected=true}});let paymentMethodSelected=false;jQuery(document).on("click",".wc_payment_methods",function(){if(paymentMethodSelected===false){wooptpm.fireCheckoutProgress(3)}wooptpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val());paymentMethodSelected=true});jQuery(document).one("click","#place_order",function(){if(emailSelected===false){wooptpm.fireCheckoutProgress(2)}if(paymentMethodSelected===false){wooptpm.fireCheckoutProgress(3);wooptpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())}wooptpm.fireCheckoutProgress(4)});jQuery(document).on("click","[name='update_cart']",function(e){try{jQuery(".cart_item").each(function(){let url=new URL(jQuery(this).find(".product-remove").find("a").attr("href"));let productId=wooptpm.getProductIdByCartItemKeyUrl(url);let quantity=jQuery(this).find(".qty").val();if(quantity===0){wooptpm.removeProductFromCart(productId)}else if(quantity<wooptpmDataLayer.cart[productId].quantity){wooptpm.removeProductFromCart(productId,wooptpmDataLayer.cart[productId].quantity-quantity)}else if(quantity>wooptpmDataLayer.cart[productId].quantity){wooptpm.addProductToCart(productId,quantity-wooptpmDataLayer.cart[productId].quantity)}})}catch(e){console.log(e);wooptpm.getCartItemsFromBackend()}});jQuery(".single_variation_wrap").on("show_variation",function(event,variation){try{let productId=getIdBasedOndVariationsOutputSetting(variation.variation_id);if(!productId)throw Error("Wasn't able to retrieve a productId");if(wooptpmDataLayer.products&&wooptpmDataLayer.products[productId]){let product=wooptpm.getProductDetailsFormattedForEvent(productId);jQuery(document).trigger("wooptpmViewItem",product)}}catch(e){console.log(e)}});jQuery(document).on("click",".add_to_wishlist, .wl-add-to",function(){try{let productId;if(jQuery(this).data("productid")){productId=jQuery(this).data("productid")}else if(jQuery(this).data("product-id")){productId=jQuery(this).data("product-id")}if(!productId)throw Error("Wasn't able to retrieve a productId");let product=wooptpm.getProductDetailsFormattedForEvent(productId);jQuery(document).trigger("wooptpmAddToWishlist",product)}catch(e){console.log(e)}});jQuery(document).on("updated_cart_totals",function(){jQuery(document).trigger("wooptpmViewCart")})});jQuery(document).ajaxSend(function(event,jqxhr,settings){if(settings.url.includes("get_refreshed_fragments")&&sessionStorage){if(!sessionStorage.getItem("wooptpmMiniCartActive")){sessionStorage.setItem("wooptpmMiniCartActive",JSON.stringify(true))}}});jQuery(window).on("load",function(){try{if(JSON.parse(sessionStorage.getItem("wooptpmMiniCartActive"))&&JSON.parse(sessionStorage.getItem("wooptpmFirstPageLoad"))&&wooptpmDataLayer.shop.mini_cart.track===true){wooptpm.getCartItems()}else{sessionStorage.setItem("wooptpmFirstPageLoad",JSON.stringify(true))}}catch(e){console.log(e)}});jQuery(window).on("load",function(){wooptpmDataLayer.products=wooptpmDataLayer.products||{};let productIds=wooptpm.getAddToCartLinkProductIds();wooptpm.getProductsFromBackend(productIds)});jQuery(window).on("load",function(){if(!wooptpm.getCookie("wooptpmReferrer")){if(document.referrer){let referrerUrl=new URL(document.referrer);let referrerHostname=referrerUrl.hostname;if(referrerHostname!==window.location.host){wooptpm.setCookie("wooptpmReferrer",referrerHostname)}else{wooptpm.setCookie("wooptpmReferrer","")}}else{wooptpm.setCookie("wooptpmReferrer","")}}})}).catch(function(){console.log("object couldn't be loaded")});