Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more - Version 1.22.1

Version Description

26.09.2022

  • Tweak: Adjusted the consent API settings parameters
Download this release

Release Info

Developer alekv
Plugin Icon 128x128 Pixel Manager for WooCommerce – Track Google Analytics, Google Ads, Facebook and more
Version 1.22.1
Comparing to
See all releases

Code changes from version 1.22.0 to 1.22.1

js/public/wpm-public.p1.min.js CHANGED
@@ -1,2 +1,2 @@
1
- (()=>{var __webpack_modules__={164:()=>{jQuery(document).on("wpmLoadPixels",(()=>{var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.facebook)&&void 0!==i&&i.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToCart",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideBeginCheckout",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","InitiateCheckout",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideAddToWishlist",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToWishlist",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideViewItem",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","ViewContent",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideSearch",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","Search",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(()=>{try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideOrderReceivedPage",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,a=document,o="script",t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(i=a.createElement(o)).async=!0,i.src="https://connect.facebook.net/en_US/fbevents.js",(n=a.getElementsByTagName(o)[0]).parentNode.insertBefore(i,n));let d={};e.isFbpSet()&&(d={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,d),fbq("track","PageView")}catch(o){console.error(o)}var t,a,o,r,i,n},e.getUserIdentifiersForFb=()=>{var e,t,a,o,r,i,n,d,l,s,c,u,p,m,g,w,y,v,_,f,h,L,D,b,k,C,x,j,S,I,P,Q,E,O,T,A,F,V,R,G,q,M,N,W;let U={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(U.external_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.order)&&void 0!==o&&o.user_id&&(U.external_id=wpmDataLayer.order.user_id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.user)&&void 0!==i&&null!==(n=i.facebook)&&void 0!==n&&n.email&&(U.em=wpmDataLayer.user.facebook.email),null!==(d=wpmDataLayer)&&void 0!==d&&null!==(l=d.order)&&void 0!==l&&l.billing_email_hashed&&(U.em=wpmDataLayer.order.billing_email_hashed),null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.facebook)&&void 0!==u&&u.first_name&&(U.fn=wpmDataLayer.user.facebook.first_name),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_first_name&&(U.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(w=g.user)&&void 0!==w&&null!==(y=w.facebook)&&void 0!==y&&y.last_name&&(U.ln=wpmDataLayer.user.facebook.last_name),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&_.billing_last_name&&(U.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.user)&&void 0!==h&&null!==(L=h.facebook)&&void 0!==L&&L.phone&&(U.ph=wpmDataLayer.user.facebook.phone),null!==(D=wpmDataLayer)&&void 0!==D&&null!==(b=D.order)&&void 0!==b&&b.billing_phone&&(U.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(k=wpmDataLayer)&&void 0!==k&&null!==(C=k.user)&&void 0!==C&&null!==(x=C.facebook)&&void 0!==x&&x.city&&(U.ct=wpmDataLayer.user.facebook.city),null!==(j=wpmDataLayer)&&void 0!==j&&null!==(S=j.order)&&void 0!==S&&S.billing_city&&(U.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(I=wpmDataLayer)&&void 0!==I&&null!==(P=I.user)&&void 0!==P&&null!==(Q=P.facebook)&&void 0!==Q&&Q.state&&(U.st=wpmDataLayer.user.facebook.state),null!==(E=wpmDataLayer)&&void 0!==E&&null!==(O=E.order)&&void 0!==O&&O.billing_state&&(U.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(T=wpmDataLayer)&&void 0!==T&&null!==(A=T.user)&&void 0!==A&&null!==(F=A.facebook)&&void 0!==F&&F.postcode&&(U.zp=wpmDataLayer.user.facebook.postcode),null!==(V=wpmDataLayer)&&void 0!==V&&null!==(R=V.order)&&void 0!==R&&R.billing_postcode&&(U.zp=wpmDataLayer.order.billing_postcode),null!==(G=wpmDataLayer)&&void 0!==G&&null!==(q=G.user)&&void 0!==q&&null!==(M=q.facebook)&&void 0!==M&&M.country&&(U.country=wpmDataLayer.user.facebook.country),null!==(N=wpmDataLayer)&&void 0!==N&&null!==(W=N.order)&&void 0!==W&&W.billing_country&&(U.country=wpmDataLayer.order.billing_country.toLowerCase()),U},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(o={...o,...e.getFbUserDataFromBrowser()},o),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,a;let o={};return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(o.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(o.fbc=e.getCookie("_fbc")),null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&(o.external_id=wpmDataLayer.user.id),navigator.userAgent&&(o.client_user_agent=navigator.userAgent),o},e.isFbpSet=()=>!!e.getCookie("_fbp"),e.isValidFbp=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.\d{8,20}$/).test(e),e.isValidFbc=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.[\da-zA-Z_-]{8,}/).test(e),e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_name:e.name,content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:parseFloat(e.quantity*e.price),currency:e.currency}),e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:{};try{var r,i,n;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.facebook)||void 0===n||!n.loaded)return;let a=e.getFbRandomEventId();fbq("trackCustom",t,o,{eventID:a}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:a,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:o})}catch(e){console.error(e)}},e.fbGetContentIdsFromCart=()=>{let e=[];for(const t in wpmDataLayer.cart)e.push(wpmDataLayer.products[t].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]);return e}}(window.wpm=window.wpm||{},jQuery)},12:(e,t,a)=>{a(1),a(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,d,l,s,c,u,p,m,g;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(d=n.pixels)||void 0===d||null===(l=d.google)||void 0===l||null===(s=l.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.user)&&void 0!==g&&g.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,d,l,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(d=n.pixels)||void 0===d||null===(l=d.google)||void 0===l||null===(s=l.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),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}]};null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var a,o,r,i,n,d,l,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(d=n.pixels)||void 0===d||null===(l=d.google)||void 0===l||null===(s=l.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers()};t&&(e.value=(t.quantity?t.quantity:1)*t.price,e.items=[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]),null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,d,l,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(d=n.ads)||void 0===d||null===(l=d.dynamic_remarketing)||void 0===l||!l.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let m=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var u,p;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;m.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}let g={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:m};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(g.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",g)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,d,l,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(d=n.ads)||void 0===d||null===(l=d.dynamic_remarketing)||void 0===l||!l.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","purchase",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,d,l,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(d=n.ads)||void 0===d||null===(l=d.dynamic_remarketing)||void 0===l||!l.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","login",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let n={},d={};n={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.order)&&void 0!==t&&t.clv_order_value_filtered&&(n.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&(n.user_id=wpmDataLayer.user.id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.aw_merchant_id&&(d={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...n,...d})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,a,o;let r=[];if(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&o.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&r.push(e+"/"+t);return r},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},190:(e,t,a)=>{a(42),a(165)},625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,d,l,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.analytics)&&void 0!==l&&null!==(s=l.universal)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,i]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:i.quantity,price:i.price,name:i.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[i.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==i.variation_id?(r.id=String(wpmDataLayer.products[i.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[i.variation_id].variant_name,r.brand=wpmDataLayer.products[i.variation_id].brand):(r.id=String(wpmDataLayer.products[i.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[i.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(19),a(625)},572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,d,l,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.analytics)&&void 0!==l&&null!==(s=l.ga4)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},522:(e,t,a)=>{a(228),a(572)},774:(e,t,a)=>{a(562),a(522)},294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,i;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,i,n,d,l,s,c,u,p,m,g,w,y,v,_,f,h,L,D;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.ads)&&void 0!==l&&l.conversionIds&&null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.pixels)&&void 0!==g&&null!==(w=g.google)&&void 0!==w&&null!==(y=w.ads)&&void 0!==y&&y.phone_conversion_number&&gtag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.shop)&&void 0!==_&&_.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(D=L.ads)&&void 0!==D&&D.enhanced_conversion_data&&gtag("set","user_data",wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{var e,t,a,o,r;wpmDataLayer.pixels.google.analytics.ga4.state="loading";let i=wpmDataLayer.pixels.google.analytics.ga4.parameters;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.ga4)&&void 0!==r&&r.debug_mode&&(i.debug_mode=!0),gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,i),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,i,n,d,l,s,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.analytics)&&void 0!==l&&null!==(s=l.ga4)&&void 0!==s&&s.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(m=p.ads)||void 0===m?void 0:m.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,i,n,d,l,s;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.analytics)&&void 0!==l&&null!==(s=l.ga4)&&void 0!==s&&s.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).then((function(t,a){try{var o,r,i,n,d,l,s,c,u,p,m,g,w,y,v,_,f,h,L,D,b,k;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.google)&&void 0!==i&&null!==(n=i.consent_mode)&&void 0!==n&&n.active){var C,x,j,S;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(C=wpmDataLayer)&&void 0!==C&&null!==(x=C.pixels)&&void 0!==x&&null!==(j=x.google)&&void 0!==j&&null!==(S=j.consent_mode)&&void 0!==S&&S.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(d=wpmDataLayer)&&void 0!==d&&null!==(l=d.pixels)&&void 0!==l&&null!==(s=l.google)&&void 0!==s&&null!==(c=s.linker)&&void 0!==c&&c.settings&&gtag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(w=wpmDataLayer)&&void 0!==w&&null!==(y=w.pixels)&&void 0!==y&&null!==(v=y.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(b=D.analytics)&&void 0!==b&&null!==(k=b.ga4)&&void 0!==k&&k.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let i=0;!function a(){var o,r,n;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(n=r.google)||void 0===n?void 0:n.state)?e():i>=5e3?t():(i+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},580:(e,t,a)=>{a(860),a(294)},69:(e,t,a)=>{a(580),a(190),a(774),a(463)},945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.pixels)&&void 0!==i&&null!==(n=i.google)&&void 0!==n&&null!==(d=n.optimize)&&void 0!==d&&d.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},463:(e,t,a)=>{a(962),a(945)},300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,d,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.hotjar)&&void 0!==i&&i.loaded||!wpm.canIFire("analytics","hotjar")||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(d=n.pixels)&&void 0!==d&&null!==(l=d.hotjar)&&void 0!==l&&l.loaded||wpm.load_hotjar_pixel()}))},376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,e=window,t=document,e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},a=t.getElementsByTagName("head")[0],(o=t.createElement("script")).async=1,o.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,a.appendChild(o)}catch(e){console.error(e)}var e,t,a,o}}(window.wpm=window.wpm||{},jQuery)},787:(e,t,a)=>{a(376),a(300)},473:()=>{!function(e,t,a){let o=()=>{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}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},i={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>i,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];i.categories.analytics=e,i.categories.ads=t},e.updateConsentCookieValues=function(){let t,n=arguments.length>0&&arguments[0]!==a?arguments[0]:null,d=arguments.length>1&&arguments[1]!==a?arguments[1]:null,l=arguments.length>2&&arguments[2]!==a&&arguments[2];return i.categories.analytics=!l,i.categories.ads=!l,n||d?(n&&(i.categories.analytics=!!n),void(d&&(i.categories.ads=!!d))):(t=e.getCookie("pmw_cookie_consent"))?(t=JSON.parse(t),i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=!0)):(t=e.getCookie("CookieConsent"))?(t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,void(i.visitorHasChosen=!0)):(t=e.getCookie("CookieScriptConsent"))?(t=JSON.parse(t),"reject"===t.action?(i.categories.analytics=!1,i.categories.ads=!1):2===t.categories.length?(i.categories.analytics=!0,i.categories.ads=!0):(i.categories.analytics=t.categories.indexOf("performance")>=0,i.categories.ads=t.categories.indexOf("targeting")>=0),void(i.visitorHasChosen=!0)):(t=e.getCookie("borlabs-cookie"))?(t=decodeURI(t),t=JSON.parse(t),i.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),i.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),i.visitorHasChosen=!0,i.pixels=[...(null===(m=t)||void 0===m||null===(g=m.consents)||void 0===g?void 0:g.statistics)||[],...(null===(w=t)||void 0===w||null===(y=w.consents)||void 0===y?void 0:y.marketing)||[]],void(i.mode="pixel")):(t=o())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=t.visitorHasChosen)):(t=e.getCookie("cookie_notice_accepted"))?(i.categories.analytics=!0,i.categories.ads=!0,void(i.visitorHasChosen=!0)):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],void(i.visitorHasChosen=!0)):(t=r())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=!0===t.visitorHasChosen)):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,void(i.visitorHasChosen=!0)):void 0;var s,c,u,p,m,g,w,y},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{i.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===i.mode?o=!!i.categories[t]:"pixel"===i.mode?(o=i.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=i.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)'):console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].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}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,n;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||i.visitorHasChosen)&&("category"!==i.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>i.categories[e])))&&("pixel"!==i.mode||!i.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==i.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){let t=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];e.setConsentValueCategories(t,o),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},document.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===i.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(i.pixels.includes("google-analytics"),i.pixels.includes("google-ads"))):(e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads))})),document.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(i.categories.analytics=!0),Cookiebot.consent.marketing&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}),!1),document.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(i.categories.analytics=!0),t.detail.categories.includes("targeting")&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),document.addEventListener("CookieScriptAcceptAll",(()=>{e.setConsentValueCategories(!0,!0),e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),e.cmplzStatusChange=t=>{t.detail.categories.includes("statistics")&&e.updateConsentCookieValues(!0,null),t.detail.categories.includes("marketing")&&e.updateConsentCookieValues(null,!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)},document.addEventListener("cmplzStatusChange",e.cmplzStatusChange),document.addEventListener("cmplz_status_change",e.cmplzStatusChange),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&document.querySelector(".hu-cookies-save").addEventListener("click",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),e.explicitConsentStateAlreadySet=()=>{if(i.explicitConsentStateAlreadySet)return!0;i.explicitConsentStateAlreadySet=!0}}(window.wpm=window.wpm||{},jQuery),function(e,t,a){e.consentAcceptAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:365;e.consentSetCookie(!0,!0,t),wpm.unblockAllScripts(!0,!0),wpm.updateGoogleConsentMode(!0,!0)},e.consentAdjustSelectively=function(t,o){let r=arguments.length>2&&arguments[2]!==a?arguments[2]:365;e.consentSetCookie(t,o,r),wpm.unblockAllScripts(t,o),wpm.updateGoogleConsentMode(t,o)},e.consentRevokeAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:365;wpm.setConsentValueCategories(!1,!1),e.consentSetCookie(!1,!1,t),wpm.updateGoogleConsentMode(!1,!1)},e.consentSetCookie=function(e,t){let o=arguments.length>2&&arguments[2]!==a?arguments[2]:365;wpm.setCookie("pmw_cookie_consent",JSON.stringify({analytics:e,ads:t}),o)},jQuery(document).trigger("pmw_cookie_consent_management_loaded")}(window.pmw=window.pmw||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),a=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(a)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(e=>{try{let t,a=1;"product"===wpmDataLayer.shop.page_type?(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart")&&(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a)),"simple"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,a)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,a)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,o)=>{a=Number(jQuery(o).find(".input-text.qty").val()),a||0===a||(a=1);let r=jQuery(o).attr("class");t=wpm.getPostIdFromString(r),wpm.addProductToCart(t,a)})),"bundle"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,a))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a))}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(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.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmSelectContentGaUa",e),jQuery(document).trigger("wpmSelectItem",e)}}}catch(e){console.error(e)}})),jQuery(document).one("click init_checkout",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(","),(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("wpmLoad",(e=>{jQuery(document).on("payment_method_selected",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0}))})),jQuery((()=>{jQuery("form.checkout").on("checkout_place_order_success",(()=>{!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)}))})),jQuery(document).on("click","[name='update_cart']",(e=>{try{jQuery(".cart_item").each(((e,t)=>{let a=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),o=wpm.getProductIdByCartItemKeyUrl(a),r=jQuery(t).find(".qty").val();0===r?wpm.removeProductFromCart(o):r<wpmDataLayer.cart[o].quantity?wpm.removeProductFromCart(o,wpmDataLayer.cart[o].quantity-r):r>wpmDataLayer.cart[o].quantity&&wpm.addProductToCart(o,r-wpmDataLayer.cart[o].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery((function(){jQuery(".add_to_wishlist,.wl-add-to").on("click",(e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let a=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",a)}catch(e){console.error(e)}}))})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery((()=>{jQuery(".single_variation_wrap").on("show_variation",((e,t)=>{try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");wpm.triggerViewItemEventPrep(e)}catch(e){console.error(e)}}))})),jQuery(document).on("wpmLoad",(()=>{try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(document).on("wpmLoad",(()=>{if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(document).on("wpmLoad",(()=>{try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a,o;if(jQuery(document).trigger("wpmLoadAlways"),null!==(t=wpmDataLayer)&&void 0!==t&&t.shop)if("product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(async()=>{window.sessionStorage&&window.sessionStorage.getItem("_pmw_endpoint_available")&&!JSON.parse(window.sessionStorage.getItem("_pmw_endpoint_available"))&&console.error("Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.")})),jQuery(document).on("wpmPreLoadPixels",(()=>{var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var a,o,r;let i={event:"addToCart",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(i.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToCart",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,a;let o={event:"beginCheckout"};var r;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(r=wpmDataLayer)&&void 0!==r&&r.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(o.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),jQuery(document).trigger("wpmClientSideBeginCheckout",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var a,o,r;let i={event:"addToWishlist",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(i.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToWishlist",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmViewItem",(function(e){var t,a,o;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i={event:"viewItem",product:r};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.facebook)&&void 0!==o&&o.loaded&&(i.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},r&&(i.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(r))),jQuery(document).trigger("wpmClientSideViewItem",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmSearch",(()=>{var e,t,a;let o={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,a;let o={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Purchase",event_id:wpmDataLayer.order.id,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",o)}))},584:()=>{(function(wpm,$,undefined){const wpmDeduper={keyName:"_wpm_order_ids",cookieExpiresDays:365},wpmRestSettings={cookiePmwRestEndpointAvailable:"_pmw_endpoint_available",restEndpointPost:"pmw/v1/test/",restFails:0,restFailsThreshold:10};function checkCookie(){return""!==wpm.getCookie(wpmDeduper.keyName)}wpm.emailSelected=!1,wpm.paymentMethodSelected=!1,wpm.useRestEndpoint=()=>wpm.isSessionStorageAvailable()&&wpm.isRestEndpointAvailable()&&wpm.isBelowRestErrorThreshold(),wpm.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(wpmRestSettings.restFails)<=wpmRestSettings.restFailsThreshold,wpm.isRestEndpointAvailable=async()=>window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)?JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)):await wpm.testEndpoint(),wpm.isSessionStorageAvailable=()=>!!window.sessionStorage,wpm.testEndpoint=async function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:wpm.root+wpmRestSettings.restEndpointPost,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:wpmRestSettings.cookiePmwRestEndpointAvailable,a=await fetch(e,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===a.status?(window.sessionStorage.setItem(t,JSON.stringify(!0)),!0):404===a.status||0===a.status?(window.sessionStorage.setItem(t,JSON.stringify(!1)),!1):void 0},wpm.isWpmRestEndpointAvailable=function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:wpmRestSettings.cookiePmwRestEndpointAvailable;return!!wpm.getCookie(e)},wpm.writeOrderIdToStorage=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"thankyou_page";if(window.Storage)if(null===localStorage.getItem(wpmDeduper.keyName)){let t=[];t.push(e),window.localStorage.setItem(wpmDeduper.keyName,JSON.stringify(t))}else{let t=JSON.parse(localStorage.getItem(wpmDeduper.keyName));t.includes(e)||(t.push(e),window.localStorage.setItem(wpmDeduper.keyName,JSON.stringify(t)))}else{let t=new Date;t.setDate(t.getDate()+wpmDeduper.cookieExpiresDays);let a=[];checkCookie()&&(a=JSON.parse(wpm.getCookie(wpmDeduper.keyName))),a.includes(e)||(a.push(e),document.cookie=wpmDeduper.keyName+"="+JSON.stringify(a)+";expires="+t.toUTCString())}"function"==typeof wpm.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&wpm.storeOrderIdOnServer(e,t)},wpm.isOrderIdStored=e=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(wpmDeduper.keyName)&&JSON.parse(localStorage.getItem(wpmDeduper.keyName)).includes(e):!!checkCookie()&&JSON.parse(wpm.getCookie(wpmDeduper.keyName)).includes(e):(console.log("order duplication prevention: off"),!1),wpm.isEmail=e=>/^(([^<>()\[\]\\.,;:\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),wpm.removeProductFromCart=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;try{if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==t?wpmDataLayer.cart[e].quantity:t,wpmDataLayer.cart[e]){let o=wpm.getProductDetailsFormattedForEvent(e,a);jQuery(document).trigger("wpmRemoveFromCart",o),null==t||wpmDataLayer.cart[e].quantity===t?(delete wpmDataLayer.cart[e],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[e].quantity=wpmDataLayer.cart[e].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},wpm.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},wpm.addProductToCart=(e,t)=>{try{var a;if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");if(null!==(a=wpmDataLayer)&&void 0!==a&&a.products[e]){var o;let a=wpm.getProductDetailsFormattedForEvent(e,t);jQuery(document).trigger("wpmAddToCart",a),null!==(o=wpmDataLayer)&&void 0!==o&&o.cart[e]?wpmDataLayer.cart[e].quantity=wpmDataLayer.cart[e].quantity+t:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[e]=wpm.getProductDetailsFormattedForEvent(e,t)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(e){console.error(e),wpm.getCartItemsFromBackend()}},wpm.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?wpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):wpm.getCartItemsFromBackend()},wpm.getCartItemsFromBackend=()=>{try{fetch(wpm.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0}).then((e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")})).then((e=>{if(!e.success)throw Error("Error getting cart items from backend");e.data.cart||(e.data.cart={}),wpm.saveCartObjectToDataLayer(e.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(e.data.cart))}))}catch(e){console.error(e)}},wpm.getProductsFromBackend=async e=>{var t;if(null!==(t=wpmDataLayer)&&void 0!==t&&t.products&&(e=e.filter((e=>!wpmDataLayer.products.hasOwnProperty(e)))),e&&0!==e.length){try{let t;if(t=await wpm.isRestEndpointAvailable()?await fetch(wpm.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}):await fetch(wpm.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:e})}),t.ok){let e=await t.json();e.success&&(wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e.data))}else console.error("Error getting products from backend")}catch(e){console.error(e)}return!0}},wpm.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},wpm.triggerViewItemEventPrep=async e=>{wpmDataLayer.products&&wpmDataLayer.products[e]||await wpm.getProductsFromBackend([e]),wpm.triggerViewItemEvent(e)},wpm.triggerViewItemEvent=e=>{let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)},wpm.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},wpm.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null,a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null,o={step:e,checkout_option:t,value:a};jQuery(document).trigger("wpmFireCheckoutOption",o)},wpm.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},wpm.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},wpm.triggerViewItemList=e=>{if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",wpm.getProductDataForViewItemEvent(e))},wpm.getProductDataForViewItemEvent=e=>{if(!e)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[e])return wpm.getProductDetailsFormattedForEvent(e)}catch(e){console.error(e)}},wpm.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},wpm.viewItemListTriggerTestMode=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})},wpm.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let ioTimeouts={},io;wpm.observerCallback=(e,t)=>{e.forEach((e=>{try{let a,o=jQuery(e.target).data("ioid");if(a=jQuery(e.target).next(".wpmProductId").length?jQuery(e.target).next(".wpmProductId").data("id"):jQuery(e.target).find(".wpmProductId").data("id"),!a)throw Error("wpmProductId element not found");e.isIntersecting?ioTimeouts[o]=setTimeout((()=>{wpm.triggerViewItemList(a),wpmDataLayer.viewItemListTrigger.testMode&&wpm.viewItemListTriggerTestMode(e.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&t.unobserve(e.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(ioTimeouts[o]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(e.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let ioid=0,allIoElementsToWatch,getAllElementsToWatch=()=>{allIoElementsToWatch=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}))};wpm.startIntersectionObserverToWatch=()=>{try{wpm.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),io=new IntersectionObserver(wpm.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),getAllElementsToWatch(),allIoElementsToWatch.each(((e,t)=>{jQuery(t[0]).data("ioid",ioid++),io.observe(t[0])}))}catch(e){console.error(e)}},wpm.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&productsMutationObserver.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let productsMutationObserver=new MutationObserver((e=>{e.forEach((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"))&&hasWpmProductIdElement(this)&&(jQuery(this).data("ioid",ioid++),io.observe(this))}))}))})),hasWpmProductIdElement=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);wpm.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"",a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(a){let o=new Date;o.setTime(o.getTime()+24*a*60*60*1e3);let r="expires="+o.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},wpm.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},wpm.deleteCookie=e=>{wpm.setCookie(e,"",-1)},wpm.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},wpm.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},wpm.storeOrderIdOnServer=async(e,t)=>{try{let a;a=await wpm.isRestEndpointAvailable()?await fetch(wpm.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:e,source:t}),keepalive:!0,cache:"no-cache"}):await fetch(wpm.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:e,source:t}),keepalive:!0}),a.ok?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error")}catch(e){console.error(e)}},wpm.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},wpm.getAddToCartLinkProductIds=()=>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(),wpm.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1,a={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 a.isVariation&&(a.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),a},wpm.setReferrerToCookie=()=>{wpm.getCookie("wpmReferrer")||wpm.setCookie("wpmReferrer",document.referrer)},wpm.getReferrerFromCookie=()=>wpm.getCookie("wpmReferrer")?wpm.getCookie("wpmReferrer"):null,wpm.getClidFromBrowser=function(){let e,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"gclid";return e={gclid:"_gcl_aw",dclid:"_gcl_dc"},wpm.getCookie(e[t])?wpm.getCookie(e[t]).match(/(GCL.[\d]*.)(.*)/)[2]:""},wpm.getUserAgent=()=>navigator.userAgent,wpm.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),wpm.version=()=>{console.log(wpmDataLayer.version)},wpm.loadScriptAndCacheIt=url=>fetch(url,{method:"GET",cache:"default",keepalive:!0}).then((e=>{if(e.ok)return e.text();throw new Error("Network response was not ok: "+url)})).then((script=>{eval(script)})).catch((e=>{console.error(e)})),wpm.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,wpm.hasLoginEventFired=()=>{let e=wpm.getWpmSessionData();return null==e?void 0:e.loginEventFired},wpm.setLoginEventFired=()=>{let e=wpm.getWpmSessionData();e.loginEventFired=!0,wpm.setWpmSessionData(e)},wpm.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),wpm.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),wpm.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),wpm.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),wpm.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},wpm.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),wpm.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e),wpm.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join(""))),wpm.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let a=wpmDataLayer.cart[e];t+=a.quantity*a.price}return t}})(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((function(){wpm.pageLoaded().then((function(){document.dispatchEvent(new Event("wpmLoad"))}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var a=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](a,a.exports,__webpack_require__),a.exports}var __webpack_exports__={};__webpack_require__(534),wpm.jQueryExists().then((function(){__webpack_require__(299),__webpack_require__(69),__webpack_require__(12),__webpack_require__(787),__webpack_require__(207)}))})();
2
  //# sourceMappingURL=wpm-public.p1.min.js.map
1
+ (()=>{var __webpack_modules__={164:()=>{jQuery(document).on("wpmLoadPixels",(()=>{var e,t,a,o,r,i;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.pixel_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.facebook)&&void 0!==i&&i.loaded||wpm.canIFire("ads","facebook-ads")&&wpm.loadFacebookPixel()})),jQuery(document).on("wpmClientSideAddToCart",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToCart",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideBeginCheckout",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","InitiateCheckout",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideAddToWishlist",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","AddToWishlist",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideViewItem",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","ViewContent",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideSearch",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","Search",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}})),jQuery(document).on("wpmLoadAlways",(()=>{try{var e,t,a;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.facebook)||void 0===a||!a.loaded)return;wpm.setFbUserData()}catch(e){console.error(e)}})),jQuery(document).on("wpmClientSideOrderReceivedPage",((e,t)=>{try{var a,o,r;if(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.facebook)||void 0===r||!r.loaded)return;fbq("track","Purchase",t.facebook.custom_data,{eventID:t.facebook.event_id})}catch(e){console.error(e)}}))},1:()=>{!function(e,t,a){let o;e.loadFacebookPixel=()=>{try{wpmDataLayer.pixels.facebook.loaded=!0,t=window,a=document,o="script",t.fbq||(r=t.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},t._fbq||(t._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(i=a.createElement(o)).async=!0,i.src="https://connect.facebook.net/en_US/fbevents.js",(n=a.getElementsByTagName(o)[0]).parentNode.insertBefore(i,n));let d={};e.isFbpSet()&&(d={...e.getUserIdentifiersForFb()}),fbq("init",wpmDataLayer.pixels.facebook.pixel_id,d),fbq("track","PageView")}catch(o){console.error(o)}var t,a,o,r,i,n},e.getUserIdentifiersForFb=()=>{var e,t,a,o,r,i,n,d,l,s,c,u,p,m,g,w,y,v,_,f,h,L,D,b,k,C,x,j,S,I,P,Q,E,O,T,A,F,V,R,G,q,M,N,W;let U={};return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.user)&&void 0!==t&&t.id&&(U.external_id=wpmDataLayer.user.id),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.order)&&void 0!==o&&o.user_id&&(U.external_id=wpmDataLayer.order.user_id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.user)&&void 0!==i&&null!==(n=i.facebook)&&void 0!==n&&n.email&&(U.em=wpmDataLayer.user.facebook.email),null!==(d=wpmDataLayer)&&void 0!==d&&null!==(l=d.order)&&void 0!==l&&l.billing_email_hashed&&(U.em=wpmDataLayer.order.billing_email_hashed),null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&null!==(u=c.facebook)&&void 0!==u&&u.first_name&&(U.fn=wpmDataLayer.user.facebook.first_name),null!==(p=wpmDataLayer)&&void 0!==p&&null!==(m=p.order)&&void 0!==m&&m.billing_first_name&&(U.fn=wpmDataLayer.order.billing_first_name.toLowerCase()),null!==(g=wpmDataLayer)&&void 0!==g&&null!==(w=g.user)&&void 0!==w&&null!==(y=w.facebook)&&void 0!==y&&y.last_name&&(U.ln=wpmDataLayer.user.facebook.last_name),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.order)&&void 0!==_&&_.billing_last_name&&(U.ln=wpmDataLayer.order.billing_last_name.toLowerCase()),null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.user)&&void 0!==h&&null!==(L=h.facebook)&&void 0!==L&&L.phone&&(U.ph=wpmDataLayer.user.facebook.phone),null!==(D=wpmDataLayer)&&void 0!==D&&null!==(b=D.order)&&void 0!==b&&b.billing_phone&&(U.ph=wpmDataLayer.order.billing_phone.replace("+","")),null!==(k=wpmDataLayer)&&void 0!==k&&null!==(C=k.user)&&void 0!==C&&null!==(x=C.facebook)&&void 0!==x&&x.city&&(U.ct=wpmDataLayer.user.facebook.city),null!==(j=wpmDataLayer)&&void 0!==j&&null!==(S=j.order)&&void 0!==S&&S.billing_city&&(U.ct=wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g,"")),null!==(I=wpmDataLayer)&&void 0!==I&&null!==(P=I.user)&&void 0!==P&&null!==(Q=P.facebook)&&void 0!==Q&&Q.state&&(U.st=wpmDataLayer.user.facebook.state),null!==(E=wpmDataLayer)&&void 0!==E&&null!==(O=E.order)&&void 0!==O&&O.billing_state&&(U.st=wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/,"")),null!==(T=wpmDataLayer)&&void 0!==T&&null!==(A=T.user)&&void 0!==A&&null!==(F=A.facebook)&&void 0!==F&&F.postcode&&(U.zp=wpmDataLayer.user.facebook.postcode),null!==(V=wpmDataLayer)&&void 0!==V&&null!==(R=V.order)&&void 0!==R&&R.billing_postcode&&(U.zp=wpmDataLayer.order.billing_postcode),null!==(G=wpmDataLayer)&&void 0!==G&&null!==(q=G.user)&&void 0!==q&&null!==(M=q.facebook)&&void 0!==M&&M.country&&(U.country=wpmDataLayer.user.facebook.country),null!==(N=wpmDataLayer)&&void 0!==N&&null!==(W=N.order)&&void 0!==W&&W.billing_country&&(U.country=wpmDataLayer.order.billing_country.toLowerCase()),U},e.getFbRandomEventId=()=>(Math.random()+1).toString(36).substring(2),e.getFbUserData=()=>(o={...o,...e.getFbUserDataFromBrowser()},o),e.setFbUserData=()=>{o=e.getFbUserDataFromBrowser()},e.getFbUserDataFromBrowser=()=>{var t,a;let o={};return e.getCookie("_fbp")&&e.isValidFbp(e.getCookie("_fbp"))&&(o.fbp=e.getCookie("_fbp")),e.getCookie("_fbc")&&e.isValidFbc(e.getCookie("_fbc"))&&(o.fbc=e.getCookie("_fbc")),null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.user)&&void 0!==a&&a.id&&(o.external_id=wpmDataLayer.user.id),navigator.userAgent&&(o.client_user_agent=navigator.userAgent),o},e.isFbpSet=()=>!!e.getCookie("_fbp"),e.isValidFbp=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.\d{8,20}$/).test(e),e.isValidFbc=e=>new RegExp(/^fb\.[0-2]\.\d{13}\.[\da-zA-Z_-]{8,}/).test(e),e.fbGetProductDataForCapiEvent=e=>({content_type:"product",content_name:e.name,content_ids:[e.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]],value:parseFloat(e.quantity*e.price),currency:e.currency}),e.facebookContentIds=()=>{let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?e.push(String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])):e.push(String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))}return e},e.trackCustomFacebookEvent=function(t){let o=arguments.length>1&&arguments[1]!==a?arguments[1]:{};try{var r,i,n;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.facebook)||void 0===n||!n.loaded)return;let a=e.getFbRandomEventId();fbq("trackCustom",t,o,{eventID:a}),jQuery(document).trigger("wpmFbCapiEvent",{event_name:t,event_id:a,user_data:e.getFbUserData(),event_source_url:window.location.href,custom_data:o})}catch(e){console.error(e)}},e.fbGetContentIdsFromCart=()=>{let e=[];for(const t in wpmDataLayer.cart)e.push(wpmDataLayer.products[t].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]);return e}}(window.wpm=window.wpm||{},jQuery)},12:(e,t,a)=>{a(1),a(164)},165:()=>{jQuery(document).on("wpmViewItemList",(function(e,t){try{var a,o,r,i,n,d,l,s,c,u,p,m,g;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(d=n.pixels)||void 0===d||null===(l=d.google)||void 0===l||null===(s=l.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;if(!t)return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]};null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.user)&&void 0!==g&&g.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item_list",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmAddToCart",(function(e,t){try{var a,o,r,i,n,d,l,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(d=n.pixels)||void 0===d||null===(l=d.google)||void 0===l||null===(s=l.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers(),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}]};null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","add_to_cart",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmViewItem",(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var a,o,r,i,n,d,l,s,c,u,p;if(jQuery.isEmptyObject(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.ads)||void 0===i?void 0:i.conversionIds))return;if(null===(n=wpmDataLayer)||void 0===n||null===(d=n.pixels)||void 0===d||null===(l=d.google)||void 0===l||null===(s=l.ads)||void 0===s||null===(c=s.dynamic_remarketing)||void 0===c||!c.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let e={send_to:wpm.getGoogleAdsConversionIdentifiers()};t&&(e.value=(t.quantity?t.quantity:1)*t.price,e.items=[{id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],quantity:t.quantity?t.quantity:1,price:t.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical}]),null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.user)&&void 0!==p&&p.id&&(e.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_item",e)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmSearch",(function(){try{var e,t,a,o,r,i,n,d,l,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(d=n.ads)||void 0===d||null===(l=d.dynamic_remarketing)||void 0===l||!l.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let m=[];for(const[e,t]of Object.entries(wpmDataLayer.products)){var u,p;if(null!==(u=wpmDataLayer)&&void 0!==u&&null!==(p=u.general)&&void 0!==p&&p.variationsOutput&&t.isVariable&&!1===wpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids)return;m.push({id:t.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical})}let g={send_to:wpm.getGoogleAdsConversionIdentifiers(),items:m};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(g.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","view_search_results",g)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,d,l,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(d=n.ads)||void 0===d||null===(l=d.dynamic_remarketing)||void 0===l||!l.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers(),value:wpmDataLayer.order.value_filtered,items:wpm.getGoogleAdsDynamicRemarketingOrderItems()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","purchase",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmLogin",(function(){try{var e,t,a,o,r,i,n,d,l,s,c;if(jQuery.isEmptyObject(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.ads)||void 0===o?void 0:o.conversionIds))return;if(null===(r=wpmDataLayer)||void 0===r||null===(i=r.pixels)||void 0===i||null===(n=i.google)||void 0===n||null===(d=n.ads)||void 0===d||null===(l=d.dynamic_remarketing)||void 0===l||!l.status)return;if(!wpm.googleConfigConditionsMet("ads"))return;let u={send_to:wpm.getGoogleAdsConversionIdentifiers()};null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.user)&&void 0!==c&&c.id&&(u.user_id=wpmDataLayer.user.id),wpm.gtagLoaded().then((function(){gtag("event","login",u)}))}catch(e){console.error(e)}})),jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i;if(jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel()))return;if(!wpm.googleConfigConditionsMet("ads"))return;let n={},d={};n={send_to:wpm.getGoogleAdsConversionIdentifiersWithLabel(),transaction_id:wpmDataLayer.order.number,value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,new_customer:wpmDataLayer.order.new_customer},null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.order)&&void 0!==t&&t.clv_order_value_filtered&&(n.customer_lifetime_value=wpmDataLayer.order.clv_order_value_filtered),null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&(n.user_id=wpmDataLayer.user.id),null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.order)&&void 0!==i&&i.aw_merchant_id&&(d={discount:wpmDataLayer.order.discount,aw_merchant_id:wpmDataLayer.order.aw_merchant_id,aw_feed_country:wpmDataLayer.order.aw_feed_country,aw_feed_language:wpmDataLayer.order.aw_feed_language,items:wpm.getGoogleAdsRegularOrderItems()}),wpm.gtagLoaded().then((function(){gtag("event","conversion",{...n,...d})}))}catch(e){console.error(e)}}))},42:()=>{!function(e,t,a){e.getGoogleAdsConversionIdentifiersWithLabel=function(){var e,t,a,o;let r=[];if(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&o.conversionIds)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))t&&r.push(e+"/"+t);return r},e.getGoogleAdsConversionIdentifiers=function(){let e=[];for(const[t,a]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))e.push(t);return e},e.getGoogleAdsRegularOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e},e.getGoogleAdsDynamicRemarketingOrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,google_business_vertical:wpmDataLayer.pixels.google.ads.google_business_vertical},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o)):(o.id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type]),e.push(o))}return e}}(window.wpm=window.wpm||{},jQuery)},190:(e,t,a)=>{a(42),a(165)},625:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,d,l,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.universal)||void 0===r||!r.property_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.analytics)&&void 0!==l&&null!==(s=l.universal)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.universal.property_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGAUAOrderItems()})}))}catch(e){console.error(e)}}))},19:()=>{!function(e,t,a){e.getGAUAOrderItems=function(){let t=[];for(const[r,i]of Object.entries(wpmDataLayer.order.items)){var a,o;let r;r={quantity:i.quantity,price:i.price,name:i.name,currency:wpmDataLayer.order.currency,category:wpmDataLayer.products[i.id].category.join("/")},null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.general)&&void 0!==o&&o.variationsOutput&&0!==i.variation_id?(r.id=String(wpmDataLayer.products[i.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.variant=wpmDataLayer.products[i.variation_id].variant_name,r.brand=wpmDataLayer.products[i.variation_id].brand):(r.id=String(wpmDataLayer.products[i.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),r.brand=wpmDataLayer.products[i.id].brand),r=e.ga3AddListNameToProduct(r),t.push(r)}return t},e.ga3AddListNameToProduct=function(e){let t=arguments.length>1&&arguments[1]!==a?arguments[1]:null;return e.list_name=wpmDataLayer.shop.list_name,t&&(e.list_position=t),e}}(window.wpm=window.wpm||{},jQuery)},562:(e,t,a)=>{a(19),a(625)},572:()=>{jQuery(document).on("wpmOrderReceivedPage",(function(){try{var e,t,a,o,r,i,n,d,l,s;if(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.analytics)||void 0===o||null===(r=o.ga4)||void 0===r||!r.measurement_id)return;if(null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.analytics)&&void 0!==l&&null!==(s=l.ga4)&&void 0!==s&&s.mp_active)return;if(!wpm.googleConfigConditionsMet("analytics"))return;wpm.gtagLoaded().then((function(){gtag("event","purchase",{send_to:[wpmDataLayer.pixels.google.analytics.ga4.measurement_id],transaction_id:wpmDataLayer.order.number,affiliation:wpmDataLayer.order.affiliation,currency:wpmDataLayer.order.currency,value:wpmDataLayer.order.value_regular,discount:wpmDataLayer.order.discount,tax:wpmDataLayer.order.tax,shipping:wpmDataLayer.order.shipping,coupon:wpmDataLayer.order.coupon,items:wpm.getGA4OrderItems()})}))}catch(e){console.error(e)}}))},228:()=>{!function(e,t,a){e.getGA4OrderItems=function(){let e=[];for(const[o,r]of Object.entries(wpmDataLayer.order.items)){var t,a;let o;o={quantity:r.quantity,price:r.price,item_name:r.name,currency:wpmDataLayer.order.currency,item_category:wpmDataLayer.products[r.id].category.join("/")},null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput&&0!==r.variation_id?(o.item_id=String(wpmDataLayer.products[r.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_variant=wpmDataLayer.products[r.variation_id].variant_name,o.item_brand=wpmDataLayer.products[r.variation_id].brand):(o.item_id=String(wpmDataLayer.products[r.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type]),o.item_brand=wpmDataLayer.products[r.id].brand),e.push(o)}return e}}(window.wpm=window.wpm||{},jQuery)},522:(e,t,a)=>{a(228),a(572)},774:(e,t,a)=>{a(562),a(522)},294:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a;void 0===(null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a?void 0:a.state)&&(wpm.canGoogleLoad()?wpm.loadGoogle():wpm.logPreventedPixelLoading("google","analytics / ads"))}))},860:()=>{!function(e,t,a){e.googleConfigConditionsMet=function(t){var a,o,r,i;return!(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(i=r.consent_mode)||void 0===i||!i.active)||("category"===e.getConsentValues().mode?!0===e.getConsentValues().categories[t]:"pixel"===e.getConsentValues().mode&&e.getConsentValues().pixels.includes("google-"+t))},e.getVisitorConsentStatusAndUpdateGoogleConsentSettings=function(t){return"category"===e.getConsentValues().mode?(e.getConsentValues().categories.analytics&&(t.analytics_storage="granted"),e.getConsentValues().categories.ads&&(t.ad_storage="granted")):"pixel"===e.getConsentValues().mode&&(t.analytics_storage=e.getConsentValues().pixels.includes("google-analytics")?"granted":"denied",t.ad_storage=e.getConsentValues().pixels.includes("google-ads")?"granted":"denied"),t},e.updateGoogleConsentMode=function(){let e=!(arguments.length>0&&arguments[0]!==a)||arguments[0],t=!(arguments.length>1&&arguments[1]!==a)||arguments[1];try{if(!window.gtag||!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent)return;gtag("consent","update",{analytics_storage:e?"granted":"denied",ad_storage:t?"granted":"denied"})}catch(e){console.error(e)}},e.fireGtagGoogleAds=function(){try{var e,t,a,o,r,i,n,d,l,s,c,u,p,m,g,w,y,v,_,f,h,L,D;if(wpmDataLayer.pixels.google.ads.state="loading",null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.ads)&&void 0!==o&&null!==(r=o.enhanced_conversions)&&void 0!==r&&r.active)for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e,{allow_enhanced_conversions:!0});else for(const[e,t]of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds))gtag("config",e);null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.ads)&&void 0!==l&&l.conversionIds&&null!==(s=wpmDataLayer)&&void 0!==s&&null!==(c=s.pixels)&&void 0!==c&&null!==(u=c.google)&&void 0!==u&&null!==(p=u.ads)&&void 0!==p&&p.phone_conversion_label&&null!==(m=wpmDataLayer)&&void 0!==m&&null!==(g=m.pixels)&&void 0!==g&&null!==(w=g.google)&&void 0!==w&&null!==(y=w.ads)&&void 0!==y&&y.phone_conversion_number&&gtag("config",Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]+"/"+wpmDataLayer.pixels.google.ads.phone_conversion_label,{phone_conversion_number:wpmDataLayer.pixels.google.ads.phone_conversion_number}),null!==(v=wpmDataLayer)&&void 0!==v&&null!==(_=v.shop)&&void 0!==_&&_.page_type&&"order_received_page"===wpmDataLayer.shop.page_type&&null!==(f=wpmDataLayer)&&void 0!==f&&null!==(h=f.order)&&void 0!==h&&null!==(L=h.google)&&void 0!==L&&null!==(D=L.ads)&&void 0!==D&&D.enhanced_conversion_data&&gtag("set","user_data",wpmDataLayer.order.google.ads.enhanced_conversion_data),wpmDataLayer.pixels.google.ads.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsUA=function(){try{wpmDataLayer.pixels.google.analytics.universal.state="loading",gtag("config",wpmDataLayer.pixels.google.analytics.universal.property_id,wpmDataLayer.pixels.google.analytics.universal.parameters),wpmDataLayer.pixels.google.analytics.universal.state="ready"}catch(e){console.error(e)}},e.fireGtagGoogleAnalyticsGA4=function(){try{var e,t,a,o,r;wpmDataLayer.pixels.google.analytics.ga4.state="loading";let i=wpmDataLayer.pixels.google.analytics.ga4.parameters;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.ga4)&&void 0!==r&&r.debug_mode&&(i.debug_mode=!0),gtag("config",wpmDataLayer.pixels.google.analytics.ga4.measurement_id,i),wpmDataLayer.pixels.google.analytics.ga4.state="ready"}catch(e){console.error(e)}},e.isGoogleActive=function(){var e,t,a,o,r,i,n,d,l,s,c,u,p,m;return!(!(null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id||null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.analytics)&&void 0!==l&&null!==(s=l.ga4)&&void 0!==s&&s.measurement_id)&&jQuery.isEmptyObject(null===(c=wpmDataLayer)||void 0===c||null===(u=c.pixels)||void 0===u||null===(p=u.google)||void 0===p||null===(m=p.ads)||void 0===m?void 0:m.conversionIds))},e.getGoogleGtagId=function(){var e,t,a,o,r,i,n,d,l,s;return null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.google)&&void 0!==a&&null!==(o=a.analytics)&&void 0!==o&&null!==(r=o.universal)&&void 0!==r&&r.property_id?wpmDataLayer.pixels.google.analytics.universal.property_id:null!==(i=wpmDataLayer)&&void 0!==i&&null!==(n=i.pixels)&&void 0!==n&&null!==(d=n.google)&&void 0!==d&&null!==(l=d.analytics)&&void 0!==l&&null!==(s=l.ga4)&&void 0!==s&&s.measurement_id?wpmDataLayer.pixels.google.analytics.ga4.measurement_id:Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]},e.loadGoogle=function(){e.isGoogleActive()&&(wpmDataLayer.pixels.google.state="loading",e.loadScriptAndCacheIt("https://www.googletagmanager.com/gtag/js?id="+e.getGoogleGtagId()).then((function(t,a){try{var o,r,i,n,d,l,s,c,u,p,m,g,w,y,v,_,f,h,L,D,b,k;if(window.dataLayer=window.dataLayer||[],window.gtag=function(){dataLayer.push(arguments)},null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.google)&&void 0!==i&&null!==(n=i.consent_mode)&&void 0!==n&&n.active){var C,x,j,S;let t={ad_storage:wpmDataLayer.pixels.google.consent_mode.ad_storage,analytics_storage:wpmDataLayer.pixels.google.consent_mode.analytics_storage,wait_for_update:wpmDataLayer.pixels.google.consent_mode.wait_for_update};null!==(C=wpmDataLayer)&&void 0!==C&&null!==(x=C.pixels)&&void 0!==x&&null!==(j=x.google)&&void 0!==j&&null!==(S=j.consent_mode)&&void 0!==S&&S.region&&(t.region=wpmDataLayer.pixels.google.consent_mode.region),t=e.getVisitorConsentStatusAndUpdateGoogleConsentSettings(t),gtag("consent","default",t),gtag("set","ads_data_redaction",wpmDataLayer.pixels.google.consent_mode.ads_data_redaction),gtag("set","url_passthrough",wpmDataLayer.pixels.google.consent_mode.url_passthrough)}null!==(d=wpmDataLayer)&&void 0!==d&&null!==(l=d.pixels)&&void 0!==l&&null!==(s=l.google)&&void 0!==s&&null!==(c=s.linker)&&void 0!==c&&c.settings&&gtag("set","linker",wpmDataLayer.pixels.google.linker.settings),gtag("js",new Date),jQuery.isEmptyObject(null===(u=wpmDataLayer)||void 0===u||null===(p=u.pixels)||void 0===p||null===(m=p.google)||void 0===m||null===(g=m.ads)||void 0===g?void 0:g.conversionIds)||(e.googleConfigConditionsMet("ads")?e.fireGtagGoogleAds():e.logPreventedPixelLoading("google-ads","ads")),null!==(w=wpmDataLayer)&&void 0!==w&&null!==(y=w.pixels)&&void 0!==y&&null!==(v=y.google)&&void 0!==v&&null!==(_=v.analytics)&&void 0!==_&&null!==(f=_.universal)&&void 0!==f&&f.property_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsUA():e.logPreventedPixelLoading("google-universal-analytics","analytics")),null!==(h=wpmDataLayer)&&void 0!==h&&null!==(L=h.pixels)&&void 0!==L&&null!==(D=L.google)&&void 0!==D&&null!==(b=D.analytics)&&void 0!==b&&null!==(k=b.ga4)&&void 0!==k&&k.measurement_id&&(e.googleConfigConditionsMet("analytics")?e.fireGtagGoogleAnalyticsGA4():e.logPreventedPixelLoading("ga4","analytics")),wpmDataLayer.pixels.google.state="ready"}catch(e){console.error(e)}})))},e.canGoogleLoad=function(){var t,a,o,r;return!(null===(t=wpmDataLayer)||void 0===t||null===(a=t.pixels)||void 0===a||null===(o=a.google)||void 0===o||null===(r=o.consent_mode)||void 0===r||!r.active)||("category"===e.getConsentValues().mode?!(!e.getConsentValues().categories.ads&&!e.getConsentValues().categories.analytics):"pixel"===e.getConsentValues().mode?e.getConsentValues().pixels.includes("google-ads")||e.getConsentValues().pixels.includes("google-analytics"):(console.error("Couldn't find a valid load condition for Google mode in wpmConsentValues"),!1))},e.gtagLoaded=function(){return new Promise((function(e,t){var a,o,r;void 0===(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r?void 0:r.state)&&t();let i=0;!function a(){var o,r,n;return"ready"===(null===(o=wpmDataLayer)||void 0===o||null===(r=o.pixels)||void 0===r||null===(n=r.google)||void 0===n?void 0:n.state)?e():i>=5e3?t():(i+=200,void setTimeout(a,200))}()}))}}(window.wpm=window.wpm||{},jQuery)},580:(e,t,a)=>{a(860),a(294)},69:(e,t,a)=>{a(580),a(190),a(774),a(463)},945:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,d;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.google)||void 0===a||null===(o=a.optimize)||void 0===o||!o.container_id||null!==(r=wpmDataLayer)&&void 0!==r&&null!==(i=r.pixels)&&void 0!==i&&null!==(n=i.google)&&void 0!==n&&null!==(d=n.optimize)&&void 0!==d&&d.loaded||wpm.canIFire("analytics","google-optimize")&&wpm.load_google_optimize_pixel()}))},962:()=>{!function(e,t,a){e.load_google_optimize_pixel=function(){try{wpmDataLayer.pixels.google.optimize.loaded=!0,e.loadScriptAndCacheIt("https://www.googleoptimize.com/optimize.js?id="+wpmDataLayer.pixels.google.optimize.container_id)}catch(e){console.error(e)}}}(window.wpm=window.wpm||{},jQuery)},463:(e,t,a)=>{a(962),a(945)},300:()=>{jQuery(document).on("wpmLoadPixels",(function(){var e,t,a,o,r,i,n,d,l;null===(e=wpmDataLayer)||void 0===e||null===(t=e.pixels)||void 0===t||null===(a=t.hotjar)||void 0===a||!a.site_id||null!==(o=wpmDataLayer)&&void 0!==o&&null!==(r=o.pixels)&&void 0!==r&&null!==(i=r.hotjar)&&void 0!==i&&i.loaded||!wpm.canIFire("analytics","hotjar")||null!==(n=wpmDataLayer)&&void 0!==n&&null!==(d=n.pixels)&&void 0!==d&&null!==(l=d.hotjar)&&void 0!==l&&l.loaded||wpm.load_hotjar_pixel()}))},376:()=>{!function(e,t,a){e.load_hotjar_pixel=function(){try{wpmDataLayer.pixels.hotjar.loaded=!0,e=window,t=document,e.hj=e.hj||function(){(e.hj.q=e.hj.q||[]).push(arguments)},e._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6},a=t.getElementsByTagName("head")[0],(o=t.createElement("script")).async=1,o.src="https://static.hotjar.com/c/hotjar-"+e._hjSettings.hjid+".js?sv="+e._hjSettings.hjsv,a.appendChild(o)}catch(e){console.error(e)}var e,t,a,o}}(window.wpm=window.wpm||{},jQuery)},787:(e,t,a)=>{a(376),a(300)},473:()=>{!function(e,t,a){let o=()=>{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}},r=()=>{let t=e.getCookie("cookielawinfo-checkbox-analytics")||e.getCookie("cookielawinfo-checkbox-analytiques"),a=e.getCookie("cookielawinfo-checkbox-advertisement")||e.getCookie("cookielawinfo-checkbox-performance")||e.getCookie("cookielawinfo-checkbox-publicite"),o=e.getCookie("CookieLawInfoConsent");return!(!t&&!a)&&{analytics:"yes"===t,ads:"yes"===a,visitorHasChosen:!!o}},i={categories:{},pixels:[],mode:"category",visitorHasChosen:!1};e.getConsentValues=()=>i,e.setConsentValueCategories=function(){let e=arguments.length>0&&arguments[0]!==a&&arguments[0],t=arguments.length>1&&arguments[1]!==a&&arguments[1];i.categories.analytics=e,i.categories.ads=t},e.updateConsentCookieValues=function(){let t,n=arguments.length>0&&arguments[0]!==a?arguments[0]:null,d=arguments.length>1&&arguments[1]!==a?arguments[1]:null,l=arguments.length>2&&arguments[2]!==a&&arguments[2];return i.categories.analytics=!l,i.categories.ads=!l,n||d?(n&&(i.categories.analytics=!!n),void(d&&(i.categories.ads=!!d))):(t=e.getCookie("pmw_cookie_consent"))?(t=JSON.parse(t),i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=!0)):(t=e.getCookie("CookieConsent"))?(t=decodeURI(t),i.categories.analytics=t.indexOf("statistics:true")>=0,i.categories.ads=t.indexOf("marketing:true")>=0,void(i.visitorHasChosen=!0)):(t=e.getCookie("CookieScriptConsent"))?(t=JSON.parse(t),"reject"===t.action?(i.categories.analytics=!1,i.categories.ads=!1):2===t.categories.length?(i.categories.analytics=!0,i.categories.ads=!0):(i.categories.analytics=t.categories.indexOf("performance")>=0,i.categories.ads=t.categories.indexOf("targeting")>=0),void(i.visitorHasChosen=!0)):(t=e.getCookie("borlabs-cookie"))?(t=decodeURI(t),t=JSON.parse(t),i.categories.analytics=!(null===(s=t)||void 0===s||null===(c=s.consents)||void 0===c||!c.statistics),i.categories.ads=!(null===(u=t)||void 0===u||null===(p=u.consents)||void 0===p||!p.marketing),i.visitorHasChosen=!0,i.pixels=[...(null===(m=t)||void 0===m||null===(g=m.consents)||void 0===g?void 0:g.statistics)||[],...(null===(w=t)||void 0===w||null===(y=w.consents)||void 0===y?void 0:y.marketing)||[]],void(i.mode="pixel")):(t=o())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=t.visitorHasChosen)):(t=e.getCookie("cookie_notice_accepted"))?(i.categories.analytics=!0,i.categories.ads=!0,void(i.visitorHasChosen=!0)):(t=e.getCookie("hu-consent"))?(t=JSON.parse(t),i.categories.analytics=!!t.categories[3],i.categories.ads=!!t.categories[4],void(i.visitorHasChosen=!0)):(t=r())?(i.categories.analytics=!0===t.analytics,i.categories.ads=!0===t.ads,void(i.visitorHasChosen=!0===t.visitorHasChosen)):(t=e.getCookie("moove_gdpr_popup"))?(t=JSON.parse(t),i.categories.analytics="1"===t.thirdparty,i.categories.ads="1"===t.advanced,void(i.visitorHasChosen=!0)):void 0;var s,c,u,p,m,g,w,y},e.updateConsentCookieValues(),e.setConsentDefaultValuesToExplicit=()=>{i.categories={analytics:!1,ads:!1}},e.canIFire=(t,a)=>{let o;return"category"===i.mode?o=!!i.categories[t]:"pixel"===i.mode?(o=i.pixels.includes(a),!1===o&&"microsoft-ads"===a&&(o=i.pixels.includes("bing-ads"))):(console.error("Couldn't find a valid consent mode in wpmConsentValues"),o=!1),!!o||(e.logPreventedPixelLoading(a,t),!1)},e.logPreventedPixelLoading=(e,t)=>{var a,o,r;null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.shop)&&void 0!==o&&null!==(r=o.cookie_consent_mgmt)&&void 0!==r&&r.explicit_consent?console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)'):console.log('Pixel Manager for WooCommerce: The "'+e+" (category: "+t+')" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)')},e.scriptTagObserver=new MutationObserver((a=>{a.forEach((a=>{let{addedNodes:o}=a;[...o].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}),document.addEventListener("DOMContentLoaded",(()=>e.scriptTagObserver.disconnect())),e.shouldScriptBeActive=e=>{var a,o,r,n;return!((wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent||i.visitorHasChosen)&&("category"!==i.mode||!t(e).data("wpm-cookie-category").split(",").some((e=>i.categories[e])))&&("pixel"!==i.mode||!i.pixels.includes(t(e).data("wpm-pixel-name")))&&("pixel"!==i.mode||"google"!==t(e).data("wpm-pixel-name")||!["google-analytics","google-ads"].some((e=>i.pixels.includes(e))))&&(null===(a=wpmDataLayer)||void 0===a||null===(o=a.pixels)||void 0===o||null===(r=o.google)||void 0===r||null===(n=r.consent_mode)||void 0===n||!n.active||"google"!==t(e).data("wpm-pixel-name")))},e.unblockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove();let r=t(e).data("wpm-src");r&&t(e).attr("src",r),e.type="text/javascript",o&&t(e).appendTo("head"),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.blockScript=function(e){let o=arguments.length>1&&arguments[1]!==a&&arguments[1];o&&t(e).remove(),t(e).attr("src")&&t(e).removeAttr("src"),e.type="blocked/javascript",o&&t(e).appendTo("head")},e.unblockAllScripts=function(){let t=!(arguments.length>0&&arguments[0]!==a)||arguments[0],o=!(arguments.length>1&&arguments[1]!==a)||arguments[1];e.setConsentValueCategories(t,o),document.dispatchEvent(new Event("wpmPreLoadPixels"))},e.unblockSelectedPixels=()=>{document.dispatchEvent(new Event("wpmPreLoadPixels"))},document.addEventListener("borlabs-cookie-consent-saved",(()=>{e.updateConsentCookieValues(),"pixel"===i.mode?(e.unblockSelectedPixels(),e.updateGoogleConsentMode(i.pixels.includes("google-analytics"),i.pixels.includes("google-ads"))):(e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads))})),document.addEventListener("CookiebotOnAccept",(()=>{Cookiebot.consent.statistics&&(i.categories.analytics=!0),Cookiebot.consent.marketing&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}),!1),document.addEventListener("CookieScriptAccept",(t=>{t.detail.categories.includes("performance")&&(i.categories.analytics=!0),t.detail.categories.includes("targeting")&&(i.categories.ads=!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),document.addEventListener("CookieScriptAcceptAll",(()=>{e.setConsentValueCategories(!0,!0),e.unblockAllScripts(!0,!0),e.updateGoogleConsentMode(!0,!0)})),e.cmplzStatusChange=t=>{t.detail.categories.includes("statistics")&&e.updateConsentCookieValues(!0,null),t.detail.categories.includes("marketing")&&e.updateConsentCookieValues(null,!0),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)},document.addEventListener("cmplzStatusChange",e.cmplzStatusChange),document.addEventListener("cmplz_status_change",e.cmplzStatusChange),document.addEventListener("setCookieNotice",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)})),e.huObserver=new MutationObserver((t=>{t.forEach((t=>{let{addedNodes:a}=t;[...a].forEach((t=>{"hu"===t.id&&document.querySelector(".hu-cookies-save").addEventListener("click",(()=>{e.updateConsentCookieValues(),e.unblockAllScripts(i.categories.analytics,i.categories.ads),e.updateGoogleConsentMode(i.categories.analytics,i.categories.ads)}))}))}))})),window.hu&&e.huObserver.observe(document.documentElement||document.body,{childList:!0,subtree:!0}),e.explicitConsentStateAlreadySet=()=>{if(i.explicitConsentStateAlreadySet)return!0;i.explicitConsentStateAlreadySet=!0}}(window.wpm=window.wpm||{},jQuery),function(e,t,a){e.consentAcceptAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,e.consentSetCookie(!0,!0,t.duration),wpm.unblockAllScripts(!0,!0),wpm.updateGoogleConsentMode(!0,!0)},e.consentAdjustSelectively=t=>{t.analytics=t.analytics!==a?t.analytics:wpm.getConsentValues().categories.analytics,t.ads=t.ads!==a?t.ads:wpm.getConsentValues().categories.ads,t.duration=t.duration||365,e.consentSetCookie(t.analytics,t.ads,t.duration),wpm.unblockAllScripts(t.analytics,t.ads),wpm.updateGoogleConsentMode(t.analytics,t.ads)},e.consentRevokeAll=function(){let t=arguments.length>0&&arguments[0]!==a?arguments[0]:{};t.duration=t.duration||365,wpm.setConsentValueCategories(!1,!1),e.consentSetCookie(!1,!1,t.duration),wpm.updateGoogleConsentMode(!1,!1)},e.consentSetCookie=function(e,t){let o=arguments.length>2&&arguments[2]!==a?arguments[2]:365;wpm.setCookie("pmw_cookie_consent",JSON.stringify({analytics:e,ads:t}),o)},jQuery(document).trigger("pmw_cookie_consent_management_loaded")}(window.pmw=window.pmw||{},jQuery)},299:()=>{jQuery(document).on("click",".remove_from_cart_button, .remove",(e=>{try{let t=new URL(jQuery(e.currentTarget).attr("href")),a=wpm.getProductIdByCartItemKeyUrl(t);wpm.removeProductFromCart(a)}catch(e){console.error(e)}})),jQuery(document).on("click",".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button",(e=>{try{let t,a=1;"product"===wpmDataLayer.shop.page_type?(void 0!==jQuery(e.currentTarget).attr("href")&&jQuery(e.currentTarget).attr("href").includes("add-to-cart")&&(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a)),"simple"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery(e.currentTarget).val(),wpm.addProductToCart(t,a)),["variable","variable-subscription"].indexOf(wpmDataLayer.shop.product_type)>=0&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("[name='variation_id']").val(),wpm.addProductToCart(t,a)),"grouped"===wpmDataLayer.shop.product_type&&jQuery(".woocommerce-grouped-product-list-item").each(((e,o)=>{a=Number(jQuery(o).find(".input-text.qty").val()),a||0===a||(a=1);let r=jQuery(o).attr("class");t=wpm.getPostIdFromString(r),wpm.addProductToCart(t,a)})),"bundle"===wpmDataLayer.shop.product_type&&(a=Number(jQuery(".input-text.qty").val()),a||0===a||(a=1),t=jQuery("input[name=add-to-cart]").val(),wpm.addProductToCart(t,a))):(t=jQuery(e.currentTarget).data("product_id"),wpm.addProductToCart(t,a))}catch(e){console.error(e)}})),jQuery(document).one("click","a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)",(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.error(e)}})),jQuery(document).on("click",".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product",(e=>{try{let t=jQuery(e.currentTarget).nextAll(".wpmProductId:first").data("id");if(t){if(t=wpm.getIdBasedOndVariationsOutputSetting(t),!t)throw Error("Wasn't able to retrieve a productId");if(wpmDataLayer.products&&wpmDataLayer.products[t]){let e=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmSelectContentGaUa",e),jQuery(document).trigger("wpmSelectItem",e)}}}catch(e){console.error(e)}})),jQuery(document).one("click init_checkout",[".checkout-button",".cart-checkout-button",".button.checkout",".xoo-wsc-ft-btn-checkout",".elementor-button--checkout"].join(","),(()=>{jQuery(document).trigger("wpmBeginCheckout")})),jQuery(document).on("input","#billing_email",(e=>{wpm.isEmail(jQuery(e.currentTarget).val())&&(wpm.fireCheckoutProgress(2),wpm.emailSelected=!0)})),jQuery(document).on("wpmLoad",(e=>{jQuery(document).on("payment_method_selected",(()=>{!1===wpm.paymentMethodSelected&&wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val()),wpm.paymentMethodSelected=!0}))})),jQuery((()=>{jQuery("form.checkout").on("checkout_place_order_success",(()=>{!1===wpm.emailSelected&&wpm.fireCheckoutProgress(2),!1===wpm.paymentMethodSelected&&(wpm.fireCheckoutProgress(3),wpm.fireCheckoutOption(3,jQuery("input[name='payment_method']:checked").val())),wpm.fireCheckoutProgress(4)}))})),jQuery(document).on("click","[name='update_cart']",(e=>{try{jQuery(".cart_item").each(((e,t)=>{let a=new URL(jQuery(t).find(".product-remove").find("a").attr("href")),o=wpm.getProductIdByCartItemKeyUrl(a),r=jQuery(t).find(".qty").val();0===r?wpm.removeProductFromCart(o):r<wpmDataLayer.cart[o].quantity?wpm.removeProductFromCart(o,wpmDataLayer.cart[o].quantity-r):r>wpmDataLayer.cart[o].quantity&&wpm.addProductToCart(o,r-wpmDataLayer.cart[o].quantity)}))}catch(e){console.error(e),wpm.getCartItemsFromBackend()}})),jQuery((function(){jQuery(".add_to_wishlist,.wl-add-to").on("click",(e=>{try{let t;if(jQuery(e.currentTarget).data("productid")?t=jQuery(e.currentTarget).data("productid"):jQuery(e.currentTarget).data("product-id")&&(t=jQuery(e.currentTarget).data("product-id")),!t)throw Error("Wasn't able to retrieve a productId");let a=wpm.getProductDetailsFormattedForEvent(t);jQuery(document).trigger("wpmAddToWishlist",a)}catch(e){console.error(e)}}))})),jQuery(document).on("updated_cart_totals",(()=>{jQuery(document).trigger("wpmViewCart")})),jQuery((()=>{jQuery(".single_variation_wrap").on("show_variation",((e,t)=>{try{let e=wpm.getIdBasedOndVariationsOutputSetting(t.variation_id);if(!e)throw Error("Wasn't able to retrieve a productId");wpm.triggerViewItemEventPrep(e)}catch(e){console.error(e)}}))})),jQuery(document).on("wpmLoad",(()=>{try{wpm.doesWooCommerceCartExist()&&wpm.getCartItems()}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(()=>{wpmDataLayer.products=wpmDataLayer.products||{};let e=wpm.getAddToCartLinkProductIds();wpm.getProductsFromBackend(e)})),jQuery(document).on("wpmLoad",(()=>{if(!wpm.getCookie("wpmReferrer")&&document.referrer){let e=new URL(document.referrer).hostname;e!==window.location.host&&wpm.setCookie("wpmReferrer",e)}})),jQuery(document).on("wpmLoad",(()=>{try{var e;if("undefined"!=typeof wpmDataLayer&&(null===(e=wpmDataLayer)||void 0===e||!e.wpmLoadFired)){var t,a,o;if(jQuery(document).trigger("wpmLoadAlways"),null!==(t=wpmDataLayer)&&void 0!==t&&t.shop)if("product"===wpmDataLayer.shop.page_type&&"variable"!==wpmDataLayer.shop.product_type&&wpm.getMainProductIdFromProductPage()){let e=wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage());jQuery(document).trigger("wpmViewItem",e)}else"product_category"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmCategory"):"search"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmSearch"):"cart"===wpmDataLayer.shop.page_type?jQuery(document).trigger("wpmViewCart"):"order_received_page"===wpmDataLayer.shop.page_type&&wpmDataLayer.order?wpm.isOrderIdStored(wpmDataLayer.order.id)||(jQuery(document).trigger("wpmOrderReceivedPage"),wpm.writeOrderIdToStorage(wpmDataLayer.order.id),"function"==typeof wpm.acrRemoveCookie&&wpm.acrRemoveCookie()):jQuery(document).trigger("wpmEverywhereElse");else jQuery(document).trigger("wpmEverywhereElse");null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.user)&&void 0!==o&&o.id&&!wpm.hasLoginEventFired()&&(jQuery(document).trigger("wpmLogin"),wpm.setLoginEventFired()),wpmDataLayer.wpmLoadFired=!0}}catch(e){console.error(e)}})),jQuery(document).on("wpmLoad",(async()=>{window.sessionStorage&&window.sessionStorage.getItem("_pmw_endpoint_available")&&!JSON.parse(window.sessionStorage.getItem("_pmw_endpoint_available"))&&console.error("Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.")})),jQuery(document).on("wpmPreLoadPixels",(()=>{var e,t,a;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.shop)&&void 0!==t&&null!==(a=t.cookie_consent_mgmt)&&void 0!==a&&a.explicit_consent&&!wpm.explicitConsentStateAlreadySet()&&wpm.updateConsentCookieValues(null,null,!0),jQuery(document).trigger("wpmLoadPixels",{})})),jQuery(document).on("wpmAddToCart",((e,t)=>{var a,o,r;let i={event:"addToCart",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(i.facebook={event_name:"AddToCart",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToCart",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmBeginCheckout",(()=>{var e,t,a;let o={event:"beginCheckout"};var r;null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"InitiateCheckout",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},null!==(r=wpmDataLayer)&&void 0!==r&&r.cart&&!jQuery.isEmptyObject(wpmDataLayer.cart)&&(o.facebook.custom_data={content_type:"product",content_ids:wpm.fbGetContentIdsFromCart(),value:wpm.getCartValue(),currency:wpmDataLayer.shop.currency})),jQuery(document).trigger("wpmClientSideBeginCheckout",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmAddToWishlist",((e,t)=>{var a,o,r;let i={event:"addToWishlist",product:t};null!==(a=wpmDataLayer)&&void 0!==a&&null!==(o=a.pixels)&&void 0!==o&&null!==(r=o.facebook)&&void 0!==r&&r.loaded&&(i.facebook={event_name:"AddToWishlist",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:wpm.fbGetProductDataForCapiEvent(t)}),jQuery(document).trigger("wpmClientSideAddToWishlist",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmViewItem",(function(e){var t,a,o;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i={event:"viewItem",product:r};null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.pixels)&&void 0!==a&&null!==(o=a.facebook)&&void 0!==o&&o.loaded&&(i.facebook={event_name:"ViewContent",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{}},r&&(i.facebook.custom_data=wpm.fbGetProductDataForCapiEvent(r))),jQuery(document).trigger("wpmClientSideViewItem",i),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(i)})),jQuery(document).on("wpmSearch",(()=>{var e,t,a;let o={event:"search"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Search",event_id:wpm.getFbRandomEventId(),user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{search_string:wpm.getSearchTermFromUrl()}}),jQuery(document).trigger("wpmClientSideSearch",o),"function"==typeof wpm.sendEventPayloadToServer&&wpm.sendEventPayloadToServer(o)})),jQuery(document).on("wpmOrderReceivedPage",(()=>{var e,t,a;let o={event:"orderReceived"};null!==(e=wpmDataLayer)&&void 0!==e&&null!==(t=e.pixels)&&void 0!==t&&null!==(a=t.facebook)&&void 0!==a&&a.loaded&&(o.facebook={event_name:"Purchase",event_id:wpmDataLayer.order.id,user_data:wpm.getFbUserData(),event_source_url:window.location.href,custom_data:{content_type:"product",value:wpmDataLayer.order.value_filtered,currency:wpmDataLayer.order.currency,content_ids:wpm.facebookContentIds()}}),jQuery(document).trigger("wpmClientSideOrderReceivedPage",o)}))},584:()=>{(function(wpm,$,undefined){const wpmDeduper={keyName:"_wpm_order_ids",cookieExpiresDays:365},wpmRestSettings={cookiePmwRestEndpointAvailable:"_pmw_endpoint_available",restEndpointPost:"pmw/v1/test/",restFails:0,restFailsThreshold:10};function checkCookie(){return""!==wpm.getCookie(wpmDeduper.keyName)}wpm.emailSelected=!1,wpm.paymentMethodSelected=!1,wpm.useRestEndpoint=()=>wpm.isSessionStorageAvailable()&&wpm.isRestEndpointAvailable()&&wpm.isBelowRestErrorThreshold(),wpm.isBelowRestErrorThreshold=()=>window.sessionStorage.getItem(wpmRestSettings.restFails)<=wpmRestSettings.restFailsThreshold,wpm.isRestEndpointAvailable=async()=>window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)?JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)):await wpm.testEndpoint(),wpm.isSessionStorageAvailable=()=>!!window.sessionStorage,wpm.testEndpoint=async function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:wpm.root+wpmRestSettings.restEndpointPost,t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:wpmRestSettings.cookiePmwRestEndpointAvailable,a=await fetch(e,{method:"POST",mode:"cors",cache:"no-cache",keepalive:!0});return 200===a.status?(window.sessionStorage.setItem(t,JSON.stringify(!0)),!0):404===a.status||0===a.status?(window.sessionStorage.setItem(t,JSON.stringify(!1)),!1):void 0},wpm.isWpmRestEndpointAvailable=function(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:wpmRestSettings.cookiePmwRestEndpointAvailable;return!!wpm.getCookie(e)},wpm.writeOrderIdToStorage=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"thankyou_page";if(window.Storage)if(null===localStorage.getItem(wpmDeduper.keyName)){let t=[];t.push(e),window.localStorage.setItem(wpmDeduper.keyName,JSON.stringify(t))}else{let t=JSON.parse(localStorage.getItem(wpmDeduper.keyName));t.includes(e)||(t.push(e),window.localStorage.setItem(wpmDeduper.keyName,JSON.stringify(t)))}else{let t=new Date;t.setDate(t.getDate()+wpmDeduper.cookieExpiresDays);let a=[];checkCookie()&&(a=JSON.parse(wpm.getCookie(wpmDeduper.keyName))),a.includes(e)||(a.push(e),document.cookie=wpmDeduper.keyName+"="+JSON.stringify(a)+";expires="+t.toUTCString())}"function"==typeof wpm.storeOrderIdOnServer&&wpmDataLayer.orderDeduplication&&wpm.storeOrderIdOnServer(e,t)},wpm.isOrderIdStored=e=>wpmDataLayer.orderDeduplication?window.Storage?null!==localStorage.getItem(wpmDeduper.keyName)&&JSON.parse(localStorage.getItem(wpmDeduper.keyName)).includes(e):!!checkCookie()&&JSON.parse(wpm.getCookie(wpmDeduper.keyName)).includes(e):(console.log("order duplication prevention: off"),!1),wpm.isEmail=e=>/^(([^<>()\[\]\\.,;:\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),wpm.removeProductFromCart=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null;try{if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");let a;if(a=null==t?wpmDataLayer.cart[e].quantity:t,wpmDataLayer.cart[e]){let o=wpm.getProductDetailsFormattedForEvent(e,a);jQuery(document).trigger("wpmRemoveFromCart",o),null==t||wpmDataLayer.cart[e].quantity===t?(delete wpmDataLayer.cart[e],sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))):(wpmDataLayer.cart[e].quantity=wpmDataLayer.cart[e].quantity-a,sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart)))}}catch(e){console.error(e)}},wpm.getIdBasedOndVariationsOutputSetting=e=>{try{var t,a;return null!==(t=wpmDataLayer)&&void 0!==t&&null!==(a=t.general)&&void 0!==a&&a.variationsOutput?e:wpmDataLayer.products[e].isVariation?wpmDataLayer.products[e].parentId:e}catch(e){console.error(e)}},wpm.addProductToCart=(e,t)=>{try{var a;if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");if(null!==(a=wpmDataLayer)&&void 0!==a&&a.products[e]){var o;let a=wpm.getProductDetailsFormattedForEvent(e,t);jQuery(document).trigger("wpmAddToCart",a),null!==(o=wpmDataLayer)&&void 0!==o&&o.cart[e]?wpmDataLayer.cart[e].quantity=wpmDataLayer.cart[e].quantity+t:("cart"in wpmDataLayer||(wpmDataLayer.cart={}),wpmDataLayer.cart[e]=wpm.getProductDetailsFormattedForEvent(e,t)),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(wpmDataLayer.cart))}}catch(e){console.error(e),wpm.getCartItemsFromBackend()}},wpm.getCartItems=()=>{sessionStorage?sessionStorage.getItem("wpmDataLayerCart")&&"order_received_page"!==wpmDataLayer.shop.page_type?wpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem("wpmDataLayerCart"))):sessionStorage.setItem("wpmDataLayerCart",JSON.stringify({})):wpm.getCartItemsFromBackend()},wpm.getCartItemsFromBackend=()=>{try{fetch(wpm.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_cart_items"}),keepalive:!0}).then((e=>{if(e.ok)return e.json();throw Error("Error getting cart items from backend")})).then((e=>{if(!e.success)throw Error("Error getting cart items from backend");e.data.cart||(e.data.cart={}),wpm.saveCartObjectToDataLayer(e.data.cart),sessionStorage&&sessionStorage.setItem("wpmDataLayerCart",JSON.stringify(e.data.cart))}))}catch(e){console.error(e)}},wpm.getProductsFromBackend=async e=>{var t;if(null!==(t=wpmDataLayer)&&void 0!==t&&t.products&&(e=e.filter((e=>!wpmDataLayer.products.hasOwnProperty(e)))),e&&0!==e.length){try{let t;if(t=await wpm.isRestEndpointAvailable()?await fetch(wpm.root+"pmw/v1/products/",{method:"POST",cache:"no-cache",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}):await fetch(wpm.ajax_url,{method:"POST",cache:"no-cache",body:new URLSearchParams({action:"pmw_get_product_ids",productIds:e})}),t.ok){let e=await t.json();e.success&&(wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e.data))}else console.error("Error getting products from backend")}catch(e){console.error(e)}return!0}},wpm.saveCartObjectToDataLayer=e=>{wpmDataLayer.cart=e,wpmDataLayer.products=Object.assign({},wpmDataLayer.products,e)},wpm.triggerViewItemEventPrep=async e=>{wpmDataLayer.products&&wpmDataLayer.products[e]||await wpm.getProductsFromBackend([e]),wpm.triggerViewItemEvent(e)},wpm.triggerViewItemEvent=e=>{let t=wpm.getProductDetailsFormattedForEvent(e);jQuery(document).trigger("wpmViewItem",t)},wpm.triggerViewItemEventNoProduct=()=>{jQuery(document).trigger("wpmViewItem")},wpm.fireCheckoutOption=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:null,a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null,o={step:e,checkout_option:t,value:a};jQuery(document).trigger("wpmFireCheckoutOption",o)},wpm.fireCheckoutProgress=e=>{let t={step:e};jQuery(document).trigger("wpmFireCheckoutProgress",t)},wpm.getPostIdFromString=e=>{try{return e.match(/(post-)(\d+)/)[2]}catch(e){console.error(e)}},wpm.triggerViewItemList=e=>{if(!e)throw Error("Wasn't able to retrieve a productId");if(!(e=wpm.getIdBasedOndVariationsOutputSetting(e)))throw Error("Wasn't able to retrieve a productId");jQuery(document).trigger("wpmViewItemList",wpm.getProductDataForViewItemEvent(e))},wpm.getProductDataForViewItemEvent=e=>{if(!e)throw Error("Wasn't able to retrieve a productId");try{if(wpmDataLayer.products[e])return wpm.getProductDetailsFormattedForEvent(e)}catch(e){console.error(e)}},wpm.getMainProductIdFromProductPage=()=>{try{return["simple","variable","grouped","composite","bundle"].indexOf(wpmDataLayer.shop.product_type)>=0&&jQuery(".wpmProductId:first").data("id")}catch(e){console.error(e)}},wpm.viewItemListTriggerTestMode=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})},wpm.getSearchTermFromUrl=()=>{try{return new URLSearchParams(window.location.search).get("s")}catch(e){console.error(e)}};let ioTimeouts={},io;wpm.observerCallback=(e,t)=>{e.forEach((e=>{try{let a,o=jQuery(e.target).data("ioid");if(a=jQuery(e.target).next(".wpmProductId").length?jQuery(e.target).next(".wpmProductId").data("id"):jQuery(e.target).find(".wpmProductId").data("id"),!a)throw Error("wpmProductId element not found");e.isIntersecting?ioTimeouts[o]=setTimeout((()=>{wpm.triggerViewItemList(a),wpmDataLayer.viewItemListTrigger.testMode&&wpm.viewItemListTriggerTestMode(e.target),!1===wpmDataLayer.viewItemListTrigger.repeat&&t.unobserve(e.target)}),wpmDataLayer.viewItemListTrigger.timeout):(clearTimeout(ioTimeouts[o]),wpmDataLayer.viewItemListTrigger.testMode&&jQuery(e.target).find("#viewItemListTriggerOverlay").remove())}catch(e){console.error(e)}}))};let ioid=0,allIoElementsToWatch,getAllElementsToWatch=()=>{allIoElementsToWatch=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}))};wpm.startIntersectionObserverToWatch=()=>{try{wpm.urlHasParameter("vildemomode")&&(wpmDataLayer.viewItemListTrigger.testMode=!0),io=new IntersectionObserver(wpm.observerCallback,{threshold:wpmDataLayer.viewItemListTrigger.threshold}),getAllElementsToWatch(),allIoElementsToWatch.each(((e,t)=>{jQuery(t[0]).data("ioid",ioid++),io.observe(t[0])}))}catch(e){console.error(e)}},wpm.startProductsMutationObserverToWatch=()=>{try{let e=jQuery(".wpmProductId:eq(0)").parents().has(jQuery(".wpmProductId:eq(1)").parents()).first();e.length&&productsMutationObserver.observe(e[0],{attributes:!0,childList:!0,characterData:!0})}catch(e){console.error(e)}};let productsMutationObserver=new MutationObserver((e=>{e.forEach((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"))&&hasWpmProductIdElement(this)&&(jQuery(this).data("ioid",ioid++),io.observe(this))}))}))})),hasWpmProductIdElement=e=>!(!jQuery(e).find(".wpmProductId").length&&!jQuery(e).siblings(".wpmProductId").length);wpm.setCookie=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:"",a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:null;if(a){let o=new Date;o.setTime(o.getTime()+24*a*60*60*1e3);let r="expires="+o.toUTCString();document.cookie=e+"="+t+";"+r+";path=/"}else document.cookie=e+"="+t+";path=/"},wpm.getCookie=e=>{let t=e+"=",a=decodeURIComponent(document.cookie).split(";");for(let e=0;e<a.length;e++){let o=a[e];for(;" "==o.charAt(0);)o=o.substring(1);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""},wpm.deleteCookie=e=>{wpm.setCookie(e,"",-1)},wpm.getWpmSessionData=()=>{if(window.sessionStorage){let e=window.sessionStorage.getItem("_wpm");return null!==e?JSON.parse(e):{}}return{}},wpm.setWpmSessionData=e=>{window.sessionStorage&&window.sessionStorage.setItem("_wpm",JSON.stringify(e))},wpm.storeOrderIdOnServer=async(e,t)=>{try{let a;a=await wpm.isRestEndpointAvailable()?await fetch(wpm.root+"pmw/v1/pixels-fired/",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({order_id:e,source:t}),keepalive:!0,cache:"no-cache"}):await fetch(wpm.ajax_url,{method:"POST",body:new URLSearchParams({action:"pmw_purchase_pixels_fired",order_id:e,source:t}),keepalive:!0}),a.ok?console.log("wpm.storeOrderIdOnServer success"):console.error("wpm.storeOrderIdOnServer error")}catch(e){console.error(e)}},wpm.getProductIdByCartItemKeyUrl=e=>{let t,a=new URLSearchParams(e.search).get("remove_item");return t=0===wpmDataLayer.cartItemKeys[a].variation_id?wpmDataLayer.cartItemKeys[a].product_id:wpmDataLayer.cartItemKeys[a].variation_id,t},wpm.getAddToCartLinkProductIds=()=>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(),wpm.getProductDetailsFormattedForEvent=function(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1,a={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 a.isVariation&&(a.parentId_dyn_r_ids=wpmDataLayer.products[e].parentId_dyn_r_ids),a},wpm.setReferrerToCookie=()=>{wpm.getCookie("wpmReferrer")||wpm.setCookie("wpmReferrer",document.referrer)},wpm.getReferrerFromCookie=()=>wpm.getCookie("wpmReferrer")?wpm.getCookie("wpmReferrer"):null,wpm.getClidFromBrowser=function(){let e,t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"gclid";return e={gclid:"_gcl_aw",dclid:"_gcl_dc"},wpm.getCookie(e[t])?wpm.getCookie(e[t]).match(/(GCL.[\d]*.)(.*)/)[2]:""},wpm.getUserAgent=()=>navigator.userAgent,wpm.getViewPort=()=>({width:Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),height:Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)}),wpm.version=()=>{console.log(wpmDataLayer.version)},wpm.loadScriptAndCacheIt=url=>fetch(url,{method:"GET",cache:"default",keepalive:!0}).then((e=>{if(e.ok)return e.text();throw new Error("Network response was not ok: "+url)})).then((script=>{eval(script)})).catch((e=>{console.error(e)})),wpm.getOrderItemPrice=e=>(e.total+e.total_tax)/e.quantity,wpm.hasLoginEventFired=()=>{let e=wpm.getWpmSessionData();return null==e?void 0:e.loginEventFired},wpm.setLoginEventFired=()=>{let e=wpm.getWpmSessionData();e.loginEventFired=!0,wpm.setWpmSessionData(e)},wpm.wpmDataLayerExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof wpmDataLayer)return e();setTimeout(t,50)}()})),wpm.jQueryExists=()=>new Promise((e=>{!function t(){if("undefined"!=typeof jQuery)return e();setTimeout(t,100)}()})),wpm.pageLoaded=()=>new Promise((e=>{!function t(){if("complete"===document.readyState)return e();setTimeout(t,50)}()})),wpm.pageReady=()=>new Promise((e=>{!function t(){if("interactive"===document.readyState||"complete"===document.readyState)return e();setTimeout(t,50)}()})),wpm.isMiniCartActive=()=>{if(window.sessionStorage){for(const[e,t]of Object.entries(window.sessionStorage))if(e.includes("wc_fragments"))return!0;return!1}return!1},wpm.doesWooCommerceCartExist=()=>document.cookie.includes("woocommerce_items_in_cart"),wpm.urlHasParameter=e=>new URLSearchParams(window.location.search).has(e),wpm.hashAsync=(e,t)=>crypto.subtle.digest(e,new TextEncoder("utf-8").encode(t)).then((e=>Array.prototype.map.call(new Uint8Array(e),(e=>("00"+e.toString(16)).slice(-2))).join(""))),wpm.getCartValue=()=>{var e;let t=0;if(null!==(e=wpmDataLayer)&&void 0!==e&&e.cart)for(const e in wpmDataLayer.cart){let a=wpmDataLayer.cart[e];t+=a.quantity*a.price}return t}})(window.wpm=window.wpm||{},jQuery)},534:(e,t,a)=>{a(584),a(473)},207:()=>{wpm.wpmDataLayerExists().then((function(){console.log("Pixel Manager for WooCommerce: "+(wpmDataLayer.version.pro?"Pro":"Free")+" Version "+wpmDataLayer.version.number+" loaded"),document.dispatchEvent(new Event("wpmPreLoadPixels"))})).then((function(){wpm.pageLoaded().then((function(){document.dispatchEvent(new Event("wpmLoad"))}))})),wpm.pageReady().then((function(){wpm.wpmDataLayerExists().then((function(){wpm.startIntersectionObserverToWatch(),wpm.startProductsMutationObserverToWatch()}))}))}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var a=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e](a,a.exports,__webpack_require__),a.exports}var __webpack_exports__={};__webpack_require__(534),wpm.jQueryExists().then((function(){__webpack_require__(299),__webpack_require__(69),__webpack_require__(12),__webpack_require__(787),__webpack_require__(207)}))})();
2
  //# sourceMappingURL=wpm-public.p1.min.js.map
js/public/wpm-public.p1.min.js.br CHANGED
Binary file
js/public/wpm-public.p1.min.js.gz CHANGED
Binary file
js/public/wpm-public.p1.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"wpm-public.p1.min.js","mappings":"wCAOAA,OAAOC,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AO1G,aAAa+H,KAAM,CAGpC,IAAIpC,EAAU3F,aAAa+H,KAAKrB,GAEhCP,GAASR,EAAQU,SAAWV,EAAQW,KACpC,CAGF,OAAOH,CAAP,CAj9BD,GAo9BC9E,OAAOhB,IAAMgB,OAAOhB,KAAO,CAAC,EAAGR,O,gBCn9BjCmI,EAAQ,KACRA,EAAQ,I,WCKR3H,IAAIygB,qBACFjY,MAAK,WACL9H,QAAQwQ,IAAI,mCAAqCvR,aAAa+B,QAAQugB,IAAM,MAAQ,QAAS,YAActiB,aAAa+B,QAAQsH,OAAS,WAEzIvJ,SAASkT,cAAc,IAAIC,MAAM,oBACjC,IACApK,MAAK,WACLxI,IAAI6gB,aAAarY,MAAK,WACrB/I,SAASkT,cAAc,IAAIC,MAAM,WACjC,GACD,IAQF5S,IAAI+gB,YAAYvY,MAAK,WAMpBxI,IAAIygB,qBACFjY,MAAK,WAELxI,IAAIgd,mCAGJhd,IAAIod,sCACJ,GACF,G,GC5CG8E,yBAA2B,CAAC,EAGhC,SAASC,oBAAoBC,GAE5B,IAAIC,EAAeH,yBAAyBE,GAC5C,QAAqBvhB,IAAjBwhB,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,yBAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,oBAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,qBAG/CI,EAAOD,OACf,C,2BClBA3a,oBAAQ,KAGR3H,IAAI2gB,eAAenY,MAAK,WAEvBb,oBAAQ,KAERA,oBAAQ,IACRA,oBAAQ,IACRA,oBAAQ,KAuBRA,oBAAQ,IACR,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/cookie_consent.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/init.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fbUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id) data.external_id = wpmDataLayer.user.id\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.facebook?.email) data.em = wpmDataLayer.user.facebook.email\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.facebook?.first_name) data.fn = wpmDataLayer.user.facebook.first_name\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.facebook?.last_name) data.ln = wpmDataLayer.user.facebook.last_name\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.facebook?.phone) data.ph = wpmDataLayer.user.facebook.phone\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.facebook?.city) data.ct = wpmDataLayer.user.facebook.city\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.facebook?.state) data.st = wpmDataLayer.user.facebook.state\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.facebook?.postcode) data.zp = wpmDataLayer.user.facebook.postcode\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.facebook?.country) data.country = wpmDataLayer.user.facebook.country\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user data is too slow.\n\t\t *\n\t\t * But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t *\n\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfbUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.external_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (navigator.userAgent) {\n\t\t\tdata.client_user_agent = navigator.userAgent\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\n\t// \t\t\tevent_name : \"ViewContent\",\n\t// \t\t\tevent_id : eventId,\n\t// \t\t\tuser_data : wpm.getFbUserData(),\n\t// \t\t\tevent_source_url: window.location.href,\n\t// \t\t}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\n\t// \t} catch (e) {\n\t// \t\tconsole.error(e)\n\t// \t}\n\t// }\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getFbRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\tcustom_data : customData,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor(const key in wpmDataLayer.cart){\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\t\t\n\t\treturn content_ids\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}]\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// conversion event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.clv_order_value_filtered) {\n\t\t\tdata_basic.customer_lifetime_value = wpmDataLayer.order.clv_order_value_filtered\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (wpmDataLayer?.shop?.page_type && \"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\t// window.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\n\t\t\t\tgtag(\"set\", \"user_data\", wpmDataLayer.order.google.ads.enhanced_conversion_data)\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.then(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .then(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\t// Update the PMW consent values with values coming from a CMP\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.addEventListener(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t// jQuery(document).on(\"borlabs-cookie-consent-saved\", () => {\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\t// jQuery(document).on(\"CookiebotOnAccept\", () => {\n\tdocument.addEventListener(\"CookiebotOnAccept\", () => {\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (duration = 365) => {\n\n\t\tpmw.consentSetCookie(true, true, duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (analytics, ads, duration = 365) => {\n\n\t\tpmw.consentSetCookie(analytics, ads, duration)\n\t\twpm.unblockAllScripts(analytics, ads)\n\t\twpm.updateGoogleConsentMode(analytics, ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (duration = 365) => {\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tjQuery(document).trigger(\"pmw_cookie_consent_management_loaded\")\n\n}(window.pmw = window.pmw || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// add_to_cart event\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", (event) => {\n\n\ttry {\n\n\t\tlet quantity = 1,\n\t\t\tproductId\n\n\t\t// Only process on product pages\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(event.currentTarget).attr(\"href\") !== \"undefined\" && jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is simple product\n\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is variable product or variable-subscription\n\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is grouped product\n\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\tproductId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// If is bundle product\n\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (event) => {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(event.currentTarget).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n\t\".elementor-button--checkout\",\n]\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).one(\"click init_checkout\", checkoutButtonClasses.join(\",\"), () => {\n\t// console.log(\"begin_checkout\", new Date().getTime())\n\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n// track checkout option event: purchase click\n// jQuery(document).one(\"click\", \"#place_order\", () => {\n// https://stackoverflow.com/a/34112407/4688612\njQuery(() => {\n\tjQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t\tif (false === wpm.emailSelected) {\n\t\t\twpm.fireCheckoutProgress(2)\n\t\t}\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\t}\n\n\t\twpm.fireCheckoutProgress(4)\n\t})\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", (event) => {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(element).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n\n// add_to_wishlist\njQuery(function () {\n\n\tjQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\t\ttry {\n\n\t\t\tlet productId\n\n\t\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t\t}\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(() => {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\twpm.triggerViewItemEventPrep(productId)\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n//\n// \t\ttry {\n// \t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n// \t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n//\n// \t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n//\n// \t\t\t/**\n// \t\t\t * If we have a variable product with no preset,\n// \t\t\t * and variations output is enabled,\n// \t\t\t * then we send a viewItem event with the first\n// \t\t\t * variation we find for the parent.\n// \t\t\t * If variations output is disabled,\n// \t\t\t * we just send the parent ID.\n// \t\t\t *\n// \t\t\t * And if Facebook microdata is active, use the\n// \t\t\t * microdata product ID.\n// \t\t\t */\n//\n// \t\t\tif (\n// \t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n// \t\t\t\twpmDataLayer?.general?.variationsOutput\n// \t\t\t) {\n// \t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n// \t\t\t\t\tif (\"parentId\" in product) {\n//\n// \t\t\t\t\t\tproductId = product.id\n// \t\t\t\t\t\tbreak\n// \t\t\t\t\t}\n// \t\t\t\t}\n//\n// \t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n// \t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n// \t\t\t\t}\n// \t\t\t}\n//\n// \t\t\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\n// })\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(document).on(\"wpmLoad\", () => {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(document).on(\"wpmLoad\", () => {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t}\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\t\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null, true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n\n\n/**\n * All ecommerce events\n */\n\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmSearch\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\n\n\n\n\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookiePmwRestEndpointAvailable: \"_pmw_endpoint_available\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, source = \"thankyou_page\", expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId, source)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet 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,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(data.data[\"cart\"]))\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// reduce productIds by products already in the dataLayer\n\t\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\t\t}\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify(productIds),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = async (orderId, source) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource: source\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache\t: \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\")\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t// https://api.jquery.com/jquery.getscript/\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\treturn fetch(url, {\n\t\t\tmethod : \"GET\",\n\t\t\tcache : \"default\",\n\t\t\tkeepalive: true,\n\t\t})\n\t\t\t.then(response => {\n\t\t\t\tif (response.ok) {\n\t\t\t\t\t// console.log(\"response\", response)\n\t\t\t\t\treturn response.text()\n\t\t\t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(script => {\n\t\t\t\t// Execute the script\n\t\t\t\t// console.error(\"executing script: \" + script)\n\t\t\t\teval(script)\n\t\t\t\t// console.log(\"executed script: \" + script)\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconsole.error(e)\n\t\t\t})\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./wpm/event_listeners_premium\")\n// \trequire(\"./microsoft-ads/loader\")\n// \trequire(\"./pinterest/loader\")\n// \trequire(\"./snapchat/loader\")\n// \trequire(\"./tiktok/loader\")\n// \trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","$","undefined","fbUserData","f","window","b","e","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","getUserIdentifiersForFb","user","id","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","toLowerCase","last_name","ln","billing_last_name","phone","ph","billing_phone","replace","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","Math","random","toString","substring","getFbUserData","getFbUserDataFromBrowser","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","RegExp","test","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","facebookContentIds","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","value_filtered","getGoogleAdsDynamicRemarketingOrderItems","getGoogleAdsConversionIdentifiersWithLabel","data_basic","data_with_cart","transaction_id","number","new_customer","clv_order_value_filtered","customer_lifetime_value","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","category","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","shop","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","hj","q","_hjSettings","hjid","hjsv","a","r","appendChild","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","JSON","parse","decodeURI","indexOf","action","length","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","forEach","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","addEventListener","disconnect","split","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","Cookiebot","consent","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","explicitConsentStateAlreadySet","pmw","consentAcceptAll","duration","consentSetCookie","consentAdjustSelectively","consentRevokeAll","setCookie","stringify","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","each","index","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","triggerViewItemEventPrep","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","getItem","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","wpmDeduper","keyName","cookieExpiresDays","wpmRestSettings","cookiePmwRestEndpointAvailable","restEndpointPost","restFails","restFailsThreshold","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","setItem","isWpmRestEndpointAvailable","orderId","source","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","URLSearchParams","ok","json","success","filter","hasOwnProperty","headers","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","get","ioTimeouts","io","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","ioid","allIoElementsToWatch","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","this","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","has","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","deleteCookie","getWpmSessionData","setWpmSessionData","order_id","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","text","eval","catch","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Array","prototype","call","Uint8Array","x","slice","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
1
+ {"version":3,"file":"wpm-public.p1.min.js","mappings":"wCAOAA,OAAOC,UAAUC,GAAG,iBAAiB,KAAM,gBAE1B,QAAZ,EAAAC,oBAAA,mBAAcC,cAAd,mBAAsBC,gBAAtB,UAAgCC,UAAY,UAACH,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,OAAC,EAAgCE,QAC5EC,IAAIC,SAAS,MAAO,iBAAiBD,IAAIE,mBAC7C,IAKFV,OAAOC,UAAUC,GAAG,0BAA0B,CAACS,EAAOC,KAErD,IAAI,UACH,GAAI,UAACT,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,QAAC,EAAgCE,OAAQ,OAE7CM,IAAI,QAAS,YAAaD,EAAQP,SAASS,YAAa,CACvDC,QAASH,EAAQP,SAASW,UAI3B,CAFC,MAAOC,GACRC,QAAQD,MAAMA,EACd,KAKFjB,OAAOC,UAAUC,GAAG,8BAA8B,CAACS,EAAOC,KAEzD,IAAI,UACH,GAAI,UAACT,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,QAAC,EAAgCE,OAAQ,OAE7CM,IAAI,QAAS,mBAAoBD,EAAQP,SAASS,YAAa,CAC9DC,QAASH,EAAQP,SAASW,UAI3B,CAFC,MAAOC,GACRC,QAAQD,MAAMA,EACd,KAKFjB,OAAOC,UAAUC,GAAG,8BAA8B,CAACS,EAAOC,KAEzD,IAAI,UACH,GAAI,UAACT,oBAAD,iBAAC,EAAcC,cAAf,iBAAC,EAAsBC,gBAAvB,QAAC,EAAgCE,OAAQ,OAE7CM,IAAI,QAAS,gBAAiBD,EAAQP,SAASS,Y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SAASC,oBAAoBC,GAE5B,IAAIC,EAAeH,yBAAyBE,GAC5C,QAAqBvhB,IAAjBwhB,EACH,OAAOA,EAAaC,QAGrB,IAAIC,EAASL,yBAAyBE,GAAY,CAGjDE,QAAS,CAAC,GAOX,OAHAE,oBAAoBJ,GAAUG,EAAQA,EAAOD,QAASH,qBAG/CI,EAAOD,OACf,C,2BClBA3a,oBAAQ,KAGR3H,IAAI2gB,eAAenY,MAAK,WAEvBb,oBAAQ,KAERA,oBAAQ,IACRA,oBAAQ,IACRA,oBAAQ,KAuBRA,oBAAQ,IACR,G","sources":["webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/facebook/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/ads/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga3/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/ga4/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/analytics/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/base/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/google/optimize/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/hotjar/loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/cookie_consent.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/event_listeners.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/functions_loader.js","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/wpm/init.js","webpack://Pixel-Manager-for-WooCommerce/webpack/bootstrap","webpack://Pixel-Manager-for-WooCommerce/./src/js/public/main.js"],"sourcesContent":["/**\n * All event listeners\n *\n * https://developers.facebook.com/docs/meta-pixel/reference\n * */\n\n// Load pixel event\njQuery(document).on(\"wpmLoadPixels\", () => {\n\n\tif (wpmDataLayer?.pixels?.facebook?.pixel_id && !wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tif (wpm.canIFire(\"ads\", \"facebook-ads\")) wpm.loadFacebookPixel()\n\t}\n})\n\n// AddToCart event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToCart\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToCart\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// InitiateCheckout event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideBeginCheckout\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"InitiateCheckout\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// AddToWishlist event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideAddToWishlist\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"AddToWishlist\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// ViewContent event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideViewItem\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"ViewContent\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n\n// view search event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideSearch\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Search\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// load always event\njQuery(document).on(\"wpmLoadAlways\", () => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\twpm.setFbUserData()\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n\n// view order received page event\n// https://developers.facebook.com/docs/meta-pixel/reference\njQuery(document).on(\"wpmClientSideOrderReceivedPage\", (event, payload) => {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\tfbq(\"track\", \"Purchase\", payload.facebook.custom_data, {\n\t\t\teventID: payload.facebook.event_id,\n\t\t})\n\t} catch (error) {\n\t\tconsole.error(error)\n\t}\n})\n","/**\n * Add functions for Facebook\n * */\n\n(function (wpm, $, undefined) {\n\n\tlet fbUserData\n\n\twpm.loadFacebookPixel = () => {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.facebook.loaded = true\n\n\t\t\t// @formatter:off\n\t\t\t!function(f,b,e,v,n,t,s)\n\t\t\t{if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n\t\t\t\tn.callMethod.apply(n,arguments):n.queue.push(arguments)};\n\t\t\t\tif(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n\t\t\t\tn.queue=[];t=b.createElement(e);t.async=!0;\n\t\t\t\tt.src=v;s=b.getElementsByTagName(e)[0];\n\t\t\t\ts.parentNode.insertBefore(t,s)}(window, document,'script',\n\t\t\t\t'https://connect.facebook.net/en_US/fbevents.js');\n\t\t\t// @formatter:on\n\n\t\t\tlet data = {}\n\n\t\t\t// Add user identifiers to data,\n\t\t\t// and only if fbp was set\n\t\t\tif (wpm.isFbpSet()) {\n\t\t\t\tdata = {...wpm.getUserIdentifiersForFb()}\n\t\t\t}\n\n\t\t\tfbq(\"init\", wpmDataLayer.pixels.facebook.pixel_id, data)\n\t\t\tfbq(\"track\", \"PageView\")\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// https://developers.facebook.com/docs/meta-pixel/advanced/advanced-matching\n\twpm.getUserIdentifiersForFb = () => {\n\n\t\tlet data = {}\n\n\t\t// external ID\n\t\tif (wpmDataLayer?.user?.id) data.external_id = wpmDataLayer.user.id\n\t\tif (wpmDataLayer?.order?.user_id) data.external_id = wpmDataLayer.order.user_id\n\n\t\t// email\n\t\tif (wpmDataLayer?.user?.facebook?.email) data.em = wpmDataLayer.user.facebook.email\n\t\tif (wpmDataLayer?.order?.billing_email_hashed) data.em = wpmDataLayer.order.billing_email_hashed\n\n\t\t// first name\n\t\tif (wpmDataLayer?.user?.facebook?.first_name) data.fn = wpmDataLayer.user.facebook.first_name\n\t\tif (wpmDataLayer?.order?.billing_first_name) data.fn = wpmDataLayer.order.billing_first_name.toLowerCase()\n\n\t\t// last name\n\t\tif (wpmDataLayer?.user?.facebook?.last_name) data.ln = wpmDataLayer.user.facebook.last_name\n\t\tif (wpmDataLayer?.order?.billing_last_name) data.ln = wpmDataLayer.order.billing_last_name.toLowerCase()\n\n\t\t// phone\n\t\tif (wpmDataLayer?.user?.facebook?.phone) data.ph = wpmDataLayer.user.facebook.phone\n\t\tif (wpmDataLayer?.order?.billing_phone) data.ph = wpmDataLayer.order.billing_phone.replace(\"+\", \"\")\n\n\t\t// city\n\t\tif (wpmDataLayer?.user?.facebook?.city) data.ct = wpmDataLayer.user.facebook.city\n\t\tif (wpmDataLayer?.order?.billing_city) data.ct = wpmDataLayer.order.billing_city.toLowerCase().replace(/ /g, \"\")\n\n\t\t// state\n\t\tif (wpmDataLayer?.user?.facebook?.state) data.st = wpmDataLayer.user.facebook.state\n\t\tif (wpmDataLayer?.order?.billing_state) data.st = wpmDataLayer.order.billing_state.toLowerCase().replace(/[a-zA-Z]{2}-/, \"\")\n\n\t\t// postcode\n\t\tif (wpmDataLayer?.user?.facebook?.postcode) data.zp = wpmDataLayer.user.facebook.postcode\n\t\tif (wpmDataLayer?.order?.billing_postcode) data.zp = wpmDataLayer.order.billing_postcode\n\n\t\t// country\n\t\tif (wpmDataLayer?.user?.facebook?.country) data.country = wpmDataLayer.user.facebook.country\n\t\tif (wpmDataLayer?.order?.billing_country) data.country = wpmDataLayer.order.billing_country.toLowerCase()\n\n\t\treturn data\n\t}\n\n\twpm.getFbRandomEventId = () => (Math.random() + 1).toString(36).substring(2)\n\n\twpm.getFbUserData = () => {\n\n\t\t/**\n\t\t * We need to cache the FB user data for InitiateCheckout\n\t\t * where getting the user data from the browser is too slow\n\t\t * using wpm.getCookie().\n\t\t *\n\t\t * And we need the object merge because the ViewContent hit happens too fast\n\t\t * after adding a variation to the cart because the function to cache\n\t\t * the user data is too slow.\n\t\t *\n\t\t * But we can get the user_data using wpm.getCookie()\n\t\t * because we don't move away from the page and can wait for the browser\n\t\t * to get it.\n\t\t *\n\t\t * Also, the merge ensures that new data will be added to fbUserData if new\n\t\t * data is being added later, like user ID, or fbc.\n\t\t */\n\n\t\tfbUserData = {...fbUserData, ...wpm.getFbUserDataFromBrowser()}\n\n\t\treturn fbUserData\n\t}\n\n\twpm.setFbUserData = () => {\n\t\tfbUserData = wpm.getFbUserDataFromBrowser()\n\t}\n\n\twpm.getFbUserDataFromBrowser = () => {\n\n\t\tlet\n\t\t\tdata = {}\n\n\t\tif (wpm.getCookie(\"_fbp\") && wpm.isValidFbp(wpm.getCookie(\"_fbp\"))) {\n\t\t\tdata.fbp = wpm.getCookie(\"_fbp\")\n\t\t}\n\n\t\tif (wpm.getCookie(\"_fbc\") && wpm.isValidFbc(wpm.getCookie(\"_fbc\"))) {\n\t\t\tdata.fbc = wpm.getCookie(\"_fbc\")\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.external_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (navigator.userAgent) {\n\t\t\tdata.client_user_agent = navigator.userAgent\n\t\t}\n\n\t\treturn data\n\t}\n\n\twpm.isFbpSet = () => {\n\t\treturn !!wpm.getCookie(\"_fbp\")\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbp = fbp => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.\\d{8,20}$/)\n\n\t\treturn re.test(fbp)\n\t}\n\n\t// https://developers.facebook.com/docs/marketing-api/conversions-api/parameters/fbp-and-fbc/\n\twpm.isValidFbc = fbc => {\n\n\t\tlet re = new RegExp(/^fb\\.[0-2]\\.\\d{13}\\.[\\da-zA-Z_-]{8,}/)\n\n\t\treturn re.test(fbc)\n\t}\n\n\t// wpm.fbViewContent = (product = null) => {\n\t//\n\t// \ttry {\n\t// \t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\t//\n\t// \t\tlet eventId = wpm.getFbRandomEventId()\n\t//\n\t// \t\tlet data = {}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tdata.content_type = \"product\"\n\t// \t\t\tdata.content_name = product.name\n\t// \t\t\t// data.content_category = product.category\n\t// \t\t\tdata.content_ids = product.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]\n\t// \t\t\tdata.currency = wpmDataLayer.shop.currency\n\t// \t\t\tdata.value = product.price\n\t// \t\t}\n\t//\n\t// \t\tfbq(\"track\", \"ViewContent\", data, {\n\t// \t\t\teventID: eventId,\n\t// \t\t})\n\t//\n\t// \t\tlet capiData = {\n\t// \t\t\tevent_name : \"ViewContent\",\n\t// \t\t\tevent_id : eventId,\n\t// \t\t\tuser_data : wpm.getFbUserData(),\n\t// \t\t\tevent_source_url: window.location.href,\n\t// \t\t}\n\t//\n\t// \t\tif (product) {\n\t// \t\t\tproduct[\"currency\"] = wpmDataLayer.shop.currency\n\t// \t\t\tcapiData.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t// \t\t}\n\t//\n\t// \t\tjQuery(document).trigger(\"wpmFbCapiEvent\", capiData)\n\t// \t} catch (e) {\n\t// \t\tconsole.error(e)\n\t// \t}\n\t// }\n\n\twpm.fbGetProductDataForCapiEvent = product => {\n\t\treturn {\n\t\t\tcontent_type: \"product\",\n\t\t\tcontent_name: product.name,\n\t\t\tcontent_ids : [\n\t\t\t\tproduct.dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type],\n\t\t\t],\n\t\t\tvalue : parseFloat(product.quantity * product.price),\n\t\t\tcurrency : product.currency,\n\t\t}\n\t}\n\n\twpm.facebookContentIds = () => {\n\t\tlet prodIds = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t} else {\n\t\t\t\tprodIds.push(String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type]))\n\t\t\t}\n\t\t}\n\n\t\treturn prodIds\n\t}\n\n\twpm.trackCustomFacebookEvent = (eventName, customData = {}) => {\n\t\ttry {\n\t\t\tif (!wpmDataLayer?.pixels?.facebook?.loaded) return\n\n\t\t\tlet eventId = wpm.getFbRandomEventId()\n\n\t\t\tfbq(\"trackCustom\", eventName, customData, {\n\t\t\t\teventID: eventId,\n\t\t\t})\n\n\t\t\tjQuery(document).trigger(\"wpmFbCapiEvent\", {\n\t\t\t\tevent_name : eventName,\n\t\t\t\tevent_id : eventId,\n\t\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\t\tevent_source_url: window.location.href,\n\t\t\t\tcustom_data : customData,\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fbGetContentIdsFromCart = () => {\n\n\t\tlet content_ids = []\n\n\t\tfor(const key in wpmDataLayer.cart){\n\t\t\tcontent_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\t\t}\n\t\t\n\t\treturn content_ids\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Facebook loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n\n","/**\n * Load Google Ads event listeners\n * */\n\n// view_item_list event\njQuery(document).on(\"wpmViewItemList\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tif (\n\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\tproduct.isVariable &&\n\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t) return\n\n\t\t// try to prevent that WC sends cached hits to Google\n\t\tif (!product) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item_list\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// add_to_cart event\njQuery(document).on(\"wpmAddToCart\", function (event, product) {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : product.quantity * product.price,\n\t\t\titems : [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : product.quantity,\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}],\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"add_to_cart\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// view_item event\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (product) {\n\t\t\tdata.value = (product.quantity ? product.quantity : 1) * product.price\n\t\t\tdata.items = [{\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tquantity : (product.quantity ? product.quantity : 1),\n\t\t\t\tprice : product.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}]\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_item\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view search event\njQuery(document).on(\"wpmSearch\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\n\t\tlet products = []\n\n\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n\n\t\t\tif (\n\t\t\t\twpmDataLayer?.general?.variationsOutput &&\n\t\t\t\tproduct.isVariable &&\n\t\t\t\twpmDataLayer.pixels.google.ads.dynamic_remarketing.send_events_with_parent_ids === false\n\t\t\t) return\n\n\t\t\tproducts.push({\n\t\t\t\tid : product.dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type],\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t})\n\t\t}\n\n\t\t// console.log(products);\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\t// value : 1 * product.price,\n\t\t\titems: products,\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"view_search_results\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// view order received page event\n// TODO distinguish with or without cart data active\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\titems : wpm.getGoogleAdsDynamicRemarketingOrderItems(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", data)\n\t\t})\n\n\t\t// console.log(wpm.getGoogleAdsDynamicRemarketingOrderItems())\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// user log in event\njQuery(document).on(\"wpmLogin\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) return\n\t\tif (!wpmDataLayer?.pixels?.google?.ads?.dynamic_remarketing?.status) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data = {\n\t\t\tsend_to: wpm.getGoogleAdsConversionIdentifiers(),\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"login\", data)\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// conversion event\n// new_customer parameter: https://support.google.com/google-ads/answer/9917012\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (jQuery.isEmptyObject(wpm.getGoogleAdsConversionIdentifiersWithLabel())) return\n\t\tif (!wpm.googleConfigConditionsMet(\"ads\")) return\n\n\t\tlet data_basic = {}\n\t\tlet data_with_cart = {}\n\n\t\tdata_basic = {\n\t\t\tsend_to : wpm.getGoogleAdsConversionIdentifiersWithLabel(),\n\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\tnew_customer : wpmDataLayer.order.new_customer,\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.clv_order_value_filtered) {\n\t\t\tdata_basic.customer_lifetime_value = wpmDataLayer.order.clv_order_value_filtered\n\t\t}\n\n\t\tif (wpmDataLayer?.user?.id) {\n\t\t\tdata_basic.user_id = wpmDataLayer.user.id\n\t\t}\n\n\t\tif (wpmDataLayer?.order?.aw_merchant_id) {\n\t\t\tdata_with_cart = {\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\taw_merchant_id : wpmDataLayer.order.aw_merchant_id,\n\t\t\t\taw_feed_country : wpmDataLayer.order.aw_feed_country,\n\t\t\t\taw_feed_language: wpmDataLayer.order.aw_feed_language,\n\t\t\t\titems : wpm.getGoogleAdsRegularOrderItems(),\n\t\t\t}\n\t\t}\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"conversion\", {...data_basic, ...data_with_cart})\n\t\t})\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load Google Ads functions\n * */\n\n(function (wpm, $, undefined) {\n\n\n\twpm.getGoogleAdsConversionIdentifiersWithLabel = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds) {\n\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\tif (item) {\n\t\t\t\t\tconversionIdentifiers.push(key + \"/\" + item)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsConversionIdentifiers = function () {\n\n\t\tlet conversionIdentifiers = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\tconversionIdentifiers.push(key)\n\t\t}\n\n\t\treturn conversionIdentifiers\n\t}\n\n\twpm.getGoogleAdsRegularOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.getGoogleAdsDynamicRemarketingOrderItems = function () {\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tgoogle_business_vertical: wpmDataLayer.pixels.google.ads.google_business_vertical,\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.ads.dynamic_remarketing.id_type])\n\t\t\t\torderItems.push(orderItem)\n\t\t\t}\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google Ads\n */\n\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Google Universal Analytics (GA3) event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.universal.property_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGAUAOrderItems(),\n\t\t\t})\n\t\t})\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Add functions for Google Analytics Universal\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGAUAOrderItems = function () {\n\n\t\t// \"id\" : \"34\",\n\t\t// \"name\" : \"Hoodie\",\n\t\t// \"brand\" : \"\",\n\t\t// \"category\" : \"Hoodies\",\n\t\t// \"list_position\": 1,\n\t\t// \"price\" : 45,\n\t\t// \"quantity\" : 1,\n\t\t// \"variant\" : \"Color: blue | Logo: yes\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity: item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\tname : item.name,\n\t\t\t\tcurrency: wpmDataLayer.order.currency,\n\t\t\t\tcategory: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItem = wpm.ga3AddListNameToProduct(orderItem)\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n\twpm.ga3AddListNameToProduct = function (item_data, productPosition = null) {\n\n\t\t// if (wpm.ga3CanProductListBeSet(item_data.id)) {\n\t\t// \titem_data.listname = wpmDataLayer.shop.list_name\n\t\t//\n\t\t// \tif (productPosition) {\n\t\t// \t\titem_data.list_position = productPosition\n\t\t// \t}\n\t\t// }\n\n\t\titem_data.list_name = wpmDataLayer.shop.list_name\n\n\t\tif (productPosition) {\n\t\t\titem_data.list_position = productPosition\n\t\t}\n\n\t\treturn item_data\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Google Universal Analytics (GA3) loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load GA4 event listeners\n * */\n\n\n// view order received page event\njQuery(document).on(\"wpmOrderReceivedPage\", function () {\n\n\ttry {\n\t\tif (!wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) return\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.mp_active) return\n\t\tif (!wpm.googleConfigConditionsMet(\"analytics\")) return\n\n\t\twpm.gtagLoaded().then(function () {\n\t\t\tgtag(\"event\", \"purchase\", {\n\t\t\t\tsend_to : [wpmDataLayer.pixels.google.analytics.ga4.measurement_id],\n\t\t\t\ttransaction_id: wpmDataLayer.order.number,\n\t\t\t\taffiliation : wpmDataLayer.order.affiliation,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tvalue : wpmDataLayer.order.value_regular,\n\t\t\t\tdiscount : wpmDataLayer.order.discount,\n\t\t\t\ttax : wpmDataLayer.order.tax,\n\t\t\t\tshipping : wpmDataLayer.order.shipping,\n\t\t\t\tcoupon : wpmDataLayer.order.coupon,\n\t\t\t\titems : wpm.getGA4OrderItems(),\n\t\t\t})\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n","/**\n * Load GA4 functions\n * */\n\n(function (wpm, $, undefined) {\n\n\twpm.getGA4OrderItems = function () {\n\n\t\t// \"item_id\" : \"34\",\n\t\t// \"item_name\" : \"Hoodie\",\n\t\t// \"quantity\" : 1,\n\t\t// \"item_brand\" : \"\",\n\t\t// \"item_variant\" : \"Color: blue | Logo: yes\",\n\t\t// \"price\" : 45,\n\t\t// \"currency\" : \"CHF\",\n\t\t// \"item_category\": \"Hoodies\"\n\n\n\t\tlet orderItems = []\n\n\t\tfor (const [key, item] of Object.entries(wpmDataLayer.order.items)) {\n\n\t\t\tlet orderItem\n\n\t\t\torderItem = {\n\t\t\t\tquantity : item.quantity,\n\t\t\t\tprice : item.price,\n\t\t\t\titem_name : item.name,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\titem_category: wpmDataLayer.products[item.id].category.join(\"/\"),\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.general?.variationsOutput && 0 !== item.variation_id) {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.variation_id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_variant = wpmDataLayer.products[item.variation_id].variant_name\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.variation_id].brand\n\t\t\t} else {\n\n\t\t\t\torderItem.item_id = String(wpmDataLayer.products[item.id].dyn_r_ids[wpmDataLayer.pixels.google.analytics.id_type])\n\t\t\t\torderItem.item_brand = wpmDataLayer.products[item.id].brand\n\t\t\t}\n\n\t\t\torderItems.push(orderItem)\n\t\t}\n\n\t\treturn orderItems\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * GA4 loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Google Analytics loader\n */\n\nrequire(\"./ga3/loader\")\nrequire(\"./ga4/loader\")\n","/**\n * Load Google base event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") {\n\t\tif (wpm.canGoogleLoad()) {\n\t\t\twpm.loadGoogle()\n\t\t} else {\n\t\t\twpm.logPreventedPixelLoading(\"google\", \"analytics / ads\")\n\t\t}\n\t}\n})\n","/**\n * Load Google base functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.googleConfigConditionsMet = function (type) {\n\n\t\t// always returns true if Google Consent Mode is active\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (wpm.getConsentValues().mode === \"category\") {\n\t\t\treturn wpm.getConsentValues().categories[type] === true\n\t\t} else if (wpm.getConsentValues().mode === \"pixel\") {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-\" + type)\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings = function (google_consent_settings) {\n\n\t\tif (wpm.getConsentValues().mode === \"category\") {\n\n\t\t\tif (wpm.getConsentValues().categories.analytics) google_consent_settings.analytics_storage = \"granted\"\n\t\t\tif (wpm.getConsentValues().categories.ads) google_consent_settings.ad_storage = \"granted\"\n\t\t} else if ((wpm.getConsentValues().mode === \"pixel\")) {\n\n\t\t\tgoogle_consent_settings.analytics_storage = wpm.getConsentValues().pixels.includes(\"google-analytics\") ? \"granted\" : \"denied\"\n\t\t\tgoogle_consent_settings.ad_storage = wpm.getConsentValues().pixels.includes(\"google-ads\") ? \"granted\" : \"denied\"\n\t\t}\n\n\t\treturn google_consent_settings\n\t}\n\n\twpm.updateGoogleConsentMode = function (analytics = true, ads = true) {\n\n\t\ttry {\n\t\t\tif (\n\t\t\t\t!window.gtag ||\n\t\t\t\t!wpmDataLayer.shop.cookie_consent_mgmt.explicit_consent\n\t\t\t) return\n\n\t\t\tgtag(\"consent\", \"update\", {\n\t\t\t\tanalytics_storage: analytics ? \"granted\" : \"denied\",\n\t\t\t\tad_storage : ads ? \"granted\" : \"denied\",\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAds = function () {\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.ads.state = \"loading\"\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.enhanced_conversions?.active) {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key, {\"allow_enhanced_conversions\": true})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (const [key, item] of Object.entries(wpmDataLayer.pixels.google.ads.conversionIds)) {\n\t\t\t\t\tgtag(\"config\", key)\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.ads?.conversionIds && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_label && wpmDataLayer?.pixels?.google?.ads?.phone_conversion_number) {\n\t\t\t\tgtag(\"config\", Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0] + \"/\" + wpmDataLayer.pixels.google.ads.phone_conversion_label, {\n\t\t\t\t\tphone_conversion_number: wpmDataLayer.pixels.google.ads.phone_conversion_number,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// ! enhanced_conversion_data needs to set on the window object\n\t\t\t// https://support.google.com/google-ads/answer/9888145#zippy=%2Cvalidate-your-implementation-using-chrome-developer-tools\n\t\t\tif (wpmDataLayer?.shop?.page_type && \"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer?.order?.google?.ads?.enhanced_conversion_data) {\n\t\t\t\t// window.enhanced_conversion_data = wpmDataLayer.order.google.ads.enhanced_conversion_data\n\n\t\t\t\tgtag(\"set\", \"user_data\", wpmDataLayer.order.google.ads.enhanced_conversion_data)\n\t\t\t}\n\n\t\t\twpmDataLayer.pixels.google.ads.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsUA = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"loading\"\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.universal.property_id, wpmDataLayer.pixels.google.analytics.universal.parameters)\n\t\t\twpmDataLayer.pixels.google.analytics.universal.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.fireGtagGoogleAnalyticsGA4 = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"loading\"\n\n\t\t\tlet parameters = wpmDataLayer.pixels.google.analytics.ga4.parameters\n\n\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.debug_mode) {\n\t\t\t\tparameters.debug_mode = true\n\t\t\t}\n\n\t\t\tgtag(\"config\", wpmDataLayer.pixels.google.analytics.ga4.measurement_id, parameters)\n\n\t\t\twpmDataLayer.pixels.google.analytics.ga4.state = \"ready\"\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.isGoogleActive = function () {\n\n\t\tif (\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.universal?.property_id ||\n\t\t\twpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id ||\n\t\t\t!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)\n\t\t) {\n\t\t\treturn true\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.getGoogleGtagId = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.universal.property_id\n\t\t} else if (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) {\n\t\t\treturn wpmDataLayer.pixels.google.analytics.ga4.measurement_id\n\t\t} else {\n\t\t\treturn Object.keys(wpmDataLayer.pixels.google.ads.conversionIds)[0]\n\t\t}\n\t}\n\n\n\twpm.loadGoogle = function () {\n\n\t\tif (wpm.isGoogleActive()) {\n\n\t\t\twpmDataLayer.pixels.google.state = \"loading\"\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googletagmanager.com/gtag/js?id=\" + wpm.getGoogleGtagId())\n\t\t\t\t.then(function (script, textStatus) {\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\t// Initiate Google dataLayer and gtag\n\t\t\t\t\t\twindow.dataLayer = window.dataLayer || []\n\t\t\t\t\t\twindow.gtag = function gtag() {\n\t\t\t\t\t\t\tdataLayer.push(arguments)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Consent Mode\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\n\t\t\t\t\t\t\tlet google_consent_settings = {\n\t\t\t\t\t\t\t\t\"ad_storage\" : wpmDataLayer.pixels.google.consent_mode.ad_storage,\n\t\t\t\t\t\t\t\t\"analytics_storage\": wpmDataLayer.pixels.google.consent_mode.analytics_storage,\n\t\t\t\t\t\t\t\t\"wait_for_update\" : wpmDataLayer.pixels.google.consent_mode.wait_for_update,\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.region) {\n\t\t\t\t\t\t\t\tgoogle_consent_settings.region = wpmDataLayer.pixels.google.consent_mode.region\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tgoogle_consent_settings = wpm.getVisitorConsentStatusAndUpdateGoogleConsentSettings(google_consent_settings)\n\n\t\t\t\t\t\t\tgtag(\"consent\", \"default\", google_consent_settings)\n\t\t\t\t\t\t\tgtag(\"set\", \"ads_data_redaction\", wpmDataLayer.pixels.google.consent_mode.ads_data_redaction)\n\t\t\t\t\t\t\tgtag(\"set\", \"url_passthrough\", wpmDataLayer.pixels.google.consent_mode.url_passthrough)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Linker\n\t\t\t\t\t\t// https://developers.google.com/gtagjs/devguide/linker\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.linker?.settings) {\n\t\t\t\t\t\t\tgtag(\"set\", \"linker\", wpmDataLayer.pixels.google.linker.settings)\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgtag(\"js\", new Date())\n\n\t\t\t\t\t\t// Google Ads loader\n\t\t\t\t\t\tif (!jQuery.isEmptyObject(wpmDataLayer?.pixels?.google?.ads?.conversionIds)) { // Only run if the pixel has set up\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"ads\")) { \t\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAds()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-ads\", \"ads\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Google Universal Analytics loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.universal?.property_id) { \t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsUA()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"google-universal-analytics\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// GA4 loader\n\t\t\t\t\t\tif (wpmDataLayer?.pixels?.google?.analytics?.ga4?.measurement_id) { \t\t\t// Only run if the pixel has set up\n\n\t\t\t\t\t\t\tif (wpm.googleConfigConditionsMet(\"analytics\")) {\t\t\t\t\t\t// Only run if cookie consent has been given\n\t\t\t\t\t\t\t\twpm.fireGtagGoogleAnalyticsGA4()\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twpm.logPreventedPixelLoading(\"ga4\", \"analytics\")\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twpmDataLayer.pixels.google.state = \"ready\"\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\t}\n\n\twpm.canGoogleLoad = function () {\n\n\t\tif (wpmDataLayer?.pixels?.google?.consent_mode?.active) {\n\t\t\treturn true\n\t\t} else if (\"category\" === wpm.getConsentValues().mode) {\n\t\t\treturn !!(wpm.getConsentValues().categories[\"ads\"] || wpm.getConsentValues().categories[\"analytics\"])\n\t\t} else if (\"pixel\" === wpm.getConsentValues().mode) {\n\t\t\treturn wpm.getConsentValues().pixels.includes(\"google-ads\") || wpm.getConsentValues().pixels.includes(\"google-analytics\")\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid load condition for Google mode in wpmConsentValues\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.gtagLoaded = function () {\n\t\treturn new Promise(function (resolve, reject) {\n\n\t\t\tif (typeof wpmDataLayer?.pixels?.google?.state === \"undefined\") reject()\n\n\t\t\tlet startTime = 0\n\t\t\tlet timeout = 5000\n\t\t\tlet frequency = 200;\n\n\t\t\t(function wait() {\n\t\t\t\tif (wpmDataLayer?.pixels?.google?.state === \"ready\") return resolve()\n\t\t\t\tif (startTime >= timeout) return reject()\n\t\t\t\tstartTime += frequency\n\t\t\t\tsetTimeout(wait, frequency)\n\t\t\t})()\n\t\t})\n\t}\n\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load Google base\n */\n\n// Load base\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// require(\"./event_listeners_premium\")\n// #endif\n","/**\n * Load Google\n */\n\n// Load base\nrequire(\"./base/loader\")\n\n//Load additional Google libraries\nrequire(\"./ads/loader\")\nrequire(\"./analytics/loader\")\nrequire(\"./optimize/loader\")\n\n\n","/**\n * Load Google Optimize event listeners\n */\n\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.google?.optimize?.container_id && !wpmDataLayer?.pixels?.google?.optimize?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"google-optimize\")) wpm.load_google_optimize_pixel()\n\t}\n})\n","/**\n * Load Google Optimize functions\n */\n\n\n(function (wpm, $, undefined) {\n\n\twpm.load_google_optimize_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.google.optimize.loaded = true\n\n\t\t\twpm.loadScriptAndCacheIt(\"https://www.googleoptimize.com/optimize.js?id=\" + wpmDataLayer.pixels.google.optimize.container_id)\n\t\t\t// .then(function (script, textStatus) {\n\t\t\t// \t\tconsole.log('Google Optimize loaded')\n\t\t\t// });\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Load Google Optimize\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Load Hotjar event listeners\n */\n\n// Pixel load event listener\njQuery(document).on(\"wpmLoadPixels\", function () {\n\n\tif (wpmDataLayer?.pixels?.hotjar?.site_id && !wpmDataLayer?.pixels?.hotjar?.loaded) {\n\t\tif (wpm.canIFire(\"analytics\", \"hotjar\") && !wpmDataLayer?.pixels?.hotjar?.loaded) wpm.load_hotjar_pixel()\n\t}\n})\n","/**\n * Load Hotjar functions\n */\n\n(function (wpm, $, undefined) {\n\n\twpm.load_hotjar_pixel = function () {\n\n\t\ttry {\n\t\t\twpmDataLayer.pixels.hotjar.loaded = true;\n\n\t\t\t// @formatter:off\n\t\t\t(function(h,o,t,j,a,r){\n\t\t\t\th.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\n\t\t\t\th._hjSettings={hjid:wpmDataLayer.pixels.hotjar.site_id,hjsv:6};\n\t\t\t\ta=o.getElementsByTagName('head')[0];\n\t\t\t\tr=o.createElement('script');r.async=1;\n\t\t\t\tr.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\n\t\t\t\ta.appendChild(r);\n\t\t\t})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\n\t\t\t// @formatter:on\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n","/**\n * Hotjar loader\n */\n\nrequire(\"./functions\")\nrequire(\"./event_listeners\")\n","/**\n * Consent Mode functions\n */\n\n(function (wpm, $, undefined) {\n\n\n\t/**\n\t * Handle Cookie Management Platforms\n\t */\n\n\tlet getComplianzCookies = () => {\n\n\t\tlet cmplz_statistics = wpm.getCookie(\"cmplz_statistics\")\n\t\tlet cmplz_marketing = wpm.getCookie(\"cmplz_marketing\")\n\t\tlet cmplz_consent_status = wpm.getCookie(\"cmplz_consent_status\") || wpm.getCookie(\"cmplz_banner-status\")\n\n\t\tif (cmplz_consent_status) {\n\t\t\treturn {\n\t\t\t\tanalytics : cmplz_statistics === \"allow\",\n\t\t\t\tads : cmplz_marketing === \"allow\",\n\t\t\t\tvisitorHasChosen: true,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\tlet getCookieLawInfoCookies = () => {\n\n\t\tlet analyticsCookie = wpm.getCookie(\"cookielawinfo-checkbox-analytics\") || wpm.getCookie(\"cookielawinfo-checkbox-analytiques\")\n\t\tlet adsCookie = wpm.getCookie(\"cookielawinfo-checkbox-advertisement\") || wpm.getCookie(\"cookielawinfo-checkbox-performance\") || wpm.getCookie(\"cookielawinfo-checkbox-publicite\")\n\t\tlet visitorHasChosen = wpm.getCookie(\"CookieLawInfoConsent\")\n\n\t\tif (analyticsCookie || adsCookie) {\n\n\t\t\treturn {\n\t\t\t\tanalytics : analyticsCookie === \"yes\",\n\t\t\t\tads : adsCookie === \"yes\",\n\t\t\t\tvisitorHasChosen: !!visitorHasChosen,\n\t\t\t}\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\t/**\n\t * Initialize and set default values\n\t */\n\n\tlet\n\t\twpmConsentValues = {}\n\twpmConsentValues.categories = {}\n\twpmConsentValues.pixels = []\n\twpmConsentValues.mode = \"category\"\n\twpmConsentValues.visitorHasChosen = false\n\n\t// Return current consent values\n\twpm.getConsentValues = () => wpmConsentValues\n\n\twpm.setConsentValueCategories = (analytics = false, ads = false) => {\n\t\twpmConsentValues.categories.analytics = analytics\n\t\twpmConsentValues.categories.ads = ads\n\t}\n\n\t// Update the PMW consent values with values coming from a CMP\n\twpm.updateConsentCookieValues = (analytics = null, ads = null, explicitConsent = false) => {\n\n\t\t// ad_storage\n\t\t// analytics_storage\n\t\t// functionality_storage\n\t\t// personalization_storage\n\t\t// security_storage\n\n\t\tlet cookie\n\n\t\t/**\n\t\t * Setup defaults\n\t\t */\n\n\t\t// consentValues.categories.analytics = true\n\t\t// consentValues.categories.ads = true\n\n\t\twpmConsentValues.categories.analytics = !explicitConsent\n\t\twpmConsentValues.categories.ads = !explicitConsent\n\n\n\t\tif (analytics || ads) {\n\n\t\t\tif (analytics) {\n\t\t\t\twpmConsentValues.categories.analytics = !!analytics\n\t\t\t}\n\n\t\t\tif (ads) {\n\t\t\t\twpmConsentValues.categories.ads = !!ads\n\t\t\t}\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * PMW Cookie Consent\n\t\t *\n\t\t * Must be before every other CMP for the case that one of the included CMPs\n\t\t * decides to implement the PMW cookie consent API. In that case\n\t\t * the PMW consent cookie must take precedence.\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"pmw_cookie_consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookiebot\n\t\t * https://wordpress.org/plugins/cookiebot/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieConsent\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.indexOf(\"statistics:true\") >= 0\n\t\t\twpmConsentValues.categories.ads = cookie.indexOf(\"marketing:true\") >= 0\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Script\n\t\t * https://wordpress.org/plugins/cookie-script-com/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"CookieScriptConsent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\tif (cookie.action === \"reject\") {\n\t\t\t\twpmConsentValues.categories.analytics = false\n\t\t\t\twpmConsentValues.categories.ads = false\n\t\t\t} else if (cookie.categories.length === 2) {\n\t\t\t\twpmConsentValues.categories.analytics = true\n\t\t\t\twpmConsentValues.categories.ads = true\n\t\t\t} else {\n\t\t\t\twpmConsentValues.categories.analytics = cookie.categories.indexOf(\"performance\") >= 0\n\t\t\t\twpmConsentValues.categories.ads = cookie.categories.indexOf(\"targeting\") >= 0\n\t\t\t}\n\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Borlabs Cookie\n\t\t * https://borlabs.io/borlabs-cookie/\n\t\t */\n\t\tif (cookie = wpm.getCookie(\"borlabs-cookie\")) {\n\n\t\t\tcookie = decodeURI(cookie)\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie?.consents?.statistics\n\t\t\twpmConsentValues.categories.ads = !!cookie?.consents?.marketing\n\t\t\twpmConsentValues.visitorHasChosen = true\n\t\t\twpmConsentValues.pixels = [...cookie?.consents?.statistics || [], ...cookie?.consents?.marketing || []]\n\t\t\twpmConsentValues.mode = \"pixel\"\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Complianz Cookie\n\t\t * https://wordpress.org/plugins/complianz-gdpr/\n\t\t */\n\n\t\tif (cookie = getComplianzCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (free version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"cookie_notice_accepted\")) {\n\n\t\t\twpmConsentValues.categories.analytics = true\n\t\t\twpmConsentValues.categories.ads = true\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * Cookie Compliance (pro version)\n\t\t * https://wordpress.org/plugins/cookie-notice/\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"hu-consent\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = !!cookie.categories[\"3\"]\n\t\t\twpmConsentValues.categories.ads = !!cookie.categories[\"4\"]\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * CookieYes, GDPR Cookie Consent (Cookie Law Info)\n\t\t * https://wordpress.org/plugins/cookie-law-info/\n\t\t */\n\n\t\tif (cookie = getCookieLawInfoCookies()) {\n\n\t\t\twpmConsentValues.categories.analytics = cookie.analytics === true\n\t\t\twpmConsentValues.categories.ads = cookie.ads === true\n\t\t\twpmConsentValues.visitorHasChosen = cookie.visitorHasChosen === true\n\n\t\t\treturn\n\t\t}\n\n\t\t/**\n\t\t * GDPR Cookie Compliance Plugin by Moove Agency\n\t\t * https://wordpress.org/plugins/gdpr-cookie-compliance/\n\t\t *\n\t\t * TODO write documentation on how to set up the plugin in order for this to work properly\n\t\t */\n\n\t\tif (cookie = wpm.getCookie(\"moove_gdpr_popup\")) {\n\n\t\t\tcookie = JSON.parse(cookie)\n\n\t\t\twpmConsentValues.categories.analytics = cookie.thirdparty === \"1\"\n\t\t\twpmConsentValues.categories.ads = cookie.advanced === \"1\"\n\t\t\twpmConsentValues.visitorHasChosen = true\n\n\t\t\treturn\n\t\t}\n\t}\n\n\twpm.updateConsentCookieValues()\n\n\twpm.setConsentDefaultValuesToExplicit = () => {\n\t\twpmConsentValues.categories = {\n\t\t\tanalytics: false,\n\t\t\tads : false,\n\t\t}\n\t}\n\n\twpm.canIFire = (category, pixelName) => {\n\n\t\tlet canIFireMode\n\n\t\tif (\"category\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = !!wpmConsentValues.categories[category]\n\t\t} else if (\"pixel\" === wpmConsentValues.mode) {\n\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(pixelName)\n\n\t\t\t// If a user sets \"bing-ads\" in Borlabs Cookie instead of\n\t\t\t// \"microsoft-ads\" in the Borlabs settings, we need to check\n\t\t\t// for that too.\n\t\t\tif (false === canIFireMode && \"microsoft-ads\" === pixelName) {\n\t\t\t\tcanIFireMode = wpmConsentValues.pixels.includes(\"bing-ads\")\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.error(\"Couldn't find a valid consent mode in wpmConsentValues\")\n\t\t\tcanIFireMode = false\n\t\t}\n\n\t\tif (canIFireMode) {\n\t\t\treturn true\n\t\t} else {\n\t\t\tif (true || wpm.urlHasParameter(\"debugConsentMode\")) {\n\t\t\t\twpm.logPreventedPixelLoading(pixelName, category)\n\t\t\t}\n\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.logPreventedPixelLoading = (pixelName, category) => {\n\n\t\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent) {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have not given consent for it yet. (PMW is in explicit consent mode.)\")\n\t\t} else {\n\t\t\tconsole.log(\"Pixel Manager for WooCommerce: The \\\"\" + pixelName + \" (category: \" + category + \")\\\" pixel has not fired because you have removed consent for this pixel. (PMW is in implicit consent mode.)\")\n\t\t}\n\t}\n\n\t/**\n\t * Runs through each script in <head> and blocks / unblocks it according to the plugin settings\n\t * and user consent.\n\t */\n\n\t// https://stackoverflow.com/q/65453565/4688612\n\twpm.scriptTagObserver = new MutationObserver((mutations) => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif ($(node).data(\"wpm-cookie-category\")) {\n\n\t\t\t\t\t\t// If the pixel category has been approved > unblock\n\t\t\t\t\t\t// If the pixel belongs to more than one category, then unblock if one of the categories has been approved\n\t\t\t\t\t\t// If no category has been approved, but the Google Consent Mode is active, then only unblock the Google scripts\n\n\t\t\t\t\t\tif (wpm.shouldScriptBeActive(node)) {\n\t\t\t\t\t\t\twpm.unblockScript(node)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twpm.blockScript(node)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\twpm.scriptTagObserver.observe(document.head, {childList: true, subtree: true})\n\t// jQuery(document).on(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\tdocument.addEventListener(\"DOMContentLoaded\", () => wpm.scriptTagObserver.disconnect())\n\n\twpm.shouldScriptBeActive = node => {\n\n\t\tif (\n\t\t\twpmDataLayer.shop.cookie_consent_mgmt.explicit_consent ||\n\t\t\twpmConsentValues.visitorHasChosen\n\t\t) {\n\n\t\t\tif (wpmConsentValues.mode === \"category\" && $(node).data(\"wpm-cookie-category\").split(\",\").some(element => wpmConsentValues.categories[element])) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && wpmConsentValues.pixels.includes($(node).data(\"wpm-pixel-name\"))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmConsentValues.mode === \"pixel\" && $(node).data(\"wpm-pixel-name\") === \"google\" && [\"google-analytics\", \"google-ads\"].some(element => wpmConsentValues.pixels.includes(element))) {\n\t\t\t\treturn true\n\t\t\t} else if (wpmDataLayer?.pixels?.google?.consent_mode?.active && $(node).data(\"wpm-pixel-name\") === \"google\") {\n\t\t\t\treturn true\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} else {\n\t\t\treturn true\n\t\t}\n\t}\n\n\n\twpm.unblockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tlet wpmSrc = $(scriptNode).data(\"wpm-src\")\n\t\tif (wpmSrc) $(scriptNode).attr(\"src\", wpmSrc)\n\n\t\tscriptNode.type = \"text/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.blockScript = (scriptNode, removeAttach = false) => {\n\n\t\tif (removeAttach) $(scriptNode).remove()\n\n\t\tif ($(scriptNode).attr(\"src\")) $(scriptNode).removeAttr(\"src\")\n\t\tscriptNode.type = \"blocked/javascript\"\n\n\t\tif (removeAttach) $(scriptNode).appendTo(\"head\")\n\t}\n\n\twpm.unblockAllScripts = (analytics = true, ads = true) => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\twpm.setConsentValueCategories(analytics, ads)\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\twpm.unblockSelectedPixels = () => {\n\t\t// jQuery(document).trigger(\"wpmPreLoadPixels\")\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t}\n\n\n\t/**\n\t * Block or unblock scripts for each CMP immediately after cookie consent has been updated\n\t * by the visitor.\n\t */\n\n\t// Borlabs Cookie\n\t// If visitor accepts cookies in Borlabs Cookie unblock the scripts\n\t// jQuery(document).on(\"borlabs-cookie-consent-saved\", () => {\n\tdocument.addEventListener(\"borlabs-cookie-consent-saved\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\tif (wpmConsentValues.mode === \"pixel\") {\n\n\t\t\twpm.unblockSelectedPixels()\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.pixels.includes(\"google-analytics\"), wpmConsentValues.pixels.includes(\"google-ads\"))\n\t\t} else {\n\n\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t}\n\t})\n\n\t// Cookiebot\n\t// If visitor accepts cookies in Cookiebot unblock the scripts\n\t// https://www.cookiebot.com/en/developer/\n\t// jQuery(document).on(\"CookiebotOnAccept\", () => {\n\tdocument.addEventListener(\"CookiebotOnAccept\", () => {\n\t\tif (Cookiebot.consent.statistics) wpmConsentValues.categories.analytics = true\n\t\tif (Cookiebot.consent.marketing) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\n\t}, false)\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/article/20-custom-events\n\t */\n\t// jQuery(document).on(\"CookieScriptAccept\", e => {\n\tdocument.addEventListener(\"CookieScriptAccept\", e => {\n\n\t\tif (e.detail.categories.includes(\"performance\")) wpmConsentValues.categories.analytics = true\n\t\tif (e.detail.categories.includes(\"targeting\")) wpmConsentValues.categories.ads = true\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Script\n\t * If visitor accepts cookies in Cookie Script unblock the scripts\n\t * https://support.cookie-script.com/\n\t */\n\t// jQuery(document).on(\"CookieScriptAcceptAll\", () => {\n\tdocument.addEventListener(\"CookieScriptAcceptAll\", () => {\n\n\t\twpm.setConsentValueCategories(true, true)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t})\n\n\t/**\n\t * Complianz Cookie\n\t *\n\t * If visitor accepts cookies in Complianz unblock the scripts\n\t */\n\n\twpm.cmplzStatusChange = (cmplzConsentData) => {\n\n\t\tif (cmplzConsentData.detail.categories.includes(\"statistics\")) wpm.updateConsentCookieValues(true, null)\n\t\tif (cmplzConsentData.detail.categories.includes(\"marketing\")) wpm.updateConsentCookieValues(null, true)\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t}\n\n\t// jQuery(document).on(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplzStatusChange\", wpm.cmplzStatusChange)\n\t// jQuery(document).on(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\tdocument.addEventListener(\"cmplz_status_change\", wpm.cmplzStatusChange)\n\n\t// Cookie Compliance by hu-manity.co (free and pro)\n\t// If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (free version)\n\t// https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t// jQuery(document).on(\"setCookieNotice\", () => {\n\tdocument.addEventListener(\"setCookieNotice\", () => {\n\t\twpm.updateConsentCookieValues()\n\n\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t})\n\n\t/**\n\t * Cookie Compliance by hu-manity.co (free and pro)\n\t * If visitor accepts cookies in Cookie Notice by hu-manity.co unblock the scripts (pro version)\n\t * https://wordpress.org/support/topic/events-on-consent-change/#post-15202792\n\t * Because Cookie Notice has no documented API or event that is being triggered on consent save or update\n\t * we have to solve this by using a mutation observer.\n\t *\n\t * @type {MutationObserver}\n\t */\n\n\twpm.huObserver = new MutationObserver(mutations => {\n\t\tmutations.forEach(({addedNodes}) => {\n\t\t\t[...addedNodes]\n\t\t\t\t.forEach(node => {\n\n\t\t\t\t\tif (node.id === \"hu\") {\n\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\").on(\"click\", function () {\n\t\t\t\t\t\t// jQuery(\".hu-cookies-save\") in pure JavaScript\n\t\t\t\t\t\tdocument.querySelector(\".hu-cookies-save\").addEventListener(\"click\", () => {\n\t\t\t\t\t\t\twpm.updateConsentCookieValues()\n\t\t\t\t\t\t\twpm.unblockAllScripts(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t\twpm.updateGoogleConsentMode(wpmConsentValues.categories.analytics, wpmConsentValues.categories.ads)\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t})\n\t})\n\n\tif (window.hu) {\n\t\twpm.huObserver.observe(document.documentElement || document.body, {childList: true, subtree: true})\n\t}\n\n\twpm.explicitConsentStateAlreadySet = () => {\n\n\t\tif (wpmConsentValues.explicitConsentStateAlreadySet) {\n\t\t\treturn true\n\t\t} else {\n\t\t\twpmConsentValues.explicitConsentStateAlreadySet = true\n\t\t}\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery));\n\n\n(function (pmw, $, undefined) {\n\n\t// Accept consent for all cookies\n\tpmw.consentAcceptAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(true, true, settings.duration)\n\t\twpm.unblockAllScripts(true, true)\n\t\twpm.updateGoogleConsentMode(true, true)\n\t}\n\n\t// Accept consent selectively\n\tpmw.consentAdjustSelectively = (settings) => {\n\n\t\t// If settings.analytics is set, keep it, otherwise set it to wpm.getConsentValues().categories.analytics\n\t\tsettings.analytics = settings.analytics !== undefined ? settings.analytics : wpm.getConsentValues().categories.analytics\n\t\tsettings.ads = settings.ads !== undefined ? settings.ads : wpm.getConsentValues().categories.ads\n\t\tsettings.duration = settings.duration || 365\n\n\t\tpmw.consentSetCookie(settings.analytics, settings.ads, settings.duration)\n\t\twpm.unblockAllScripts(settings.analytics, settings.ads)\n\t\twpm.updateGoogleConsentMode(settings.analytics, settings.ads)\n\t}\n\n\t// Remove consent for all cookies\n\tpmw.consentRevokeAll = (settings = {}) => {\n\n\t\tsettings.duration = settings.duration || 365\n\n\t\twpm.setConsentValueCategories(false, false)\n\t\tpmw.consentSetCookie(false, false, settings.duration)\n\t\twpm.updateGoogleConsentMode(false, false)\n\t}\n\n\t// Set a cookie called pmw_cookie_consent with the value of pmw_cookie_consent\n\t// and set the default expiration date to 1 year from now\n\tpmw.consentSetCookie = (analytics, ads, duration = 365) => {\n\t\twpm.setCookie(\"pmw_cookie_consent\", JSON.stringify({analytics, ads}), duration)\n\t}\n\n\t// Trigger an event once the PMW consent management has been loaded\n\tjQuery(document).trigger(\"pmw_cookie_consent_management_loaded\")\n\n}(window.pmw = window.pmw || {}, jQuery))\n","/**\n * Register event listeners\n */\n\n// remove_from_cart event\n// jQuery('.remove_from_cart_button, .remove').on('click', function (e) {\njQuery(document).on(\"click\", \".remove_from_cart_button, .remove\", (event) => {\n\n\ttry {\n\n\t\tlet url = new URL(jQuery(event.currentTarget).attr(\"href\"))\n\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\t\twpm.removeProductFromCart(productId)\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n// add_to_cart event\njQuery(document).on(\"click\", \".add_to_cart_button:not(.product_type_variable), .ajax_add_to_cart, .single_add_to_cart_button\", (event) => {\n\n\ttry {\n\n\t\tlet quantity = 1,\n\t\t\tproductId\n\n\t\t// Only process on product pages\n\t\tif (wpmDataLayer.shop.page_type === \"product\") {\n\n\t\t\t// First process related and upsell products\n\t\t\tif (typeof jQuery(event.currentTarget).attr(\"href\") !== \"undefined\" && jQuery(event.currentTarget).attr(\"href\").includes(\"add-to-cart\")) {\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is simple product\n\t\t\tif (wpmDataLayer.shop.product_type === \"simple\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(event.currentTarget).val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is variable product or variable-subscription\n\t\t\tif ([\"variable\", \"variable-subscription\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"[name='variation_id']\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t\t// If is grouped product\n\t\t\tif (wpmDataLayer.shop.product_type === \"grouped\") {\n\n\t\t\t\tjQuery(\".woocommerce-grouped-product-list-item\").each((index, element) => {\n\n\t\t\t\t\tquantity = Number(jQuery(element).find(\".input-text.qty\").val())\n\t\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\t\tlet classes = jQuery(element).attr(\"class\")\n\t\t\t\t\tproductId = wpm.getPostIdFromString(classes)\n\n\t\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t\t})\n\t\t\t}\n\n\t\t\t// If is bundle product\n\t\t\tif (wpmDataLayer.shop.product_type === \"bundle\") {\n\n\t\t\t\tquantity = Number(jQuery(\".input-text.qty\").val())\n\t\t\t\tif (!quantity && quantity !== 0) quantity = 1\n\t\t\t\tproductId = jQuery(\"input[name=add-to-cart]\").val()\n\n\t\t\t\twpm.addProductToCart(productId, quantity)\n\t\t\t}\n\n\t\t} else {\n\n\t\t\tproductId = jQuery(event.currentTarget).data(\"product_id\")\n\t\t\twpm.addProductToCart(productId, quantity)\n\t\t}\n\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n\n/**\n * If someone clicks anywhere on a custom /?add-to-cart=123 link\n * trigger the add to cart event\n */\n// jQuery('a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)').one('click', function (event) {\njQuery(document).one(\"click\", \"a:not(.add_to_cart_button, .ajax_add_to_cart, .single_add_to_cart_button)\", (event) => {\n\n\ttry {\n\t\tif (jQuery(event.target).closest(\"a\").attr(\"href\")) {\n\n\t\t\tlet href = jQuery(event.target).closest(\"a\").attr(\"href\")\n\n\t\t\tif (href.includes(\"add-to-cart=\")) {\n\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) wpm.addProductToCart(matches[2], 1)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// select_content GA UA event\n// select_item GA 4 event\n// jQuery(document).on('click', '.woocommerce-LoopProduct-link, .wc-block-grid__product, .product-small.box', function (e) {\n// jQuery('.woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product').on('click', function (e) {\njQuery(document).on(\"click\", \".woocommerce-LoopProduct-link, .wc-block-grid__product, .product, .product-small, .type-product\", (event) => {\n\n\ttry {\n\n\t\t/**\n\t\t * On some pages the event fires multiple times, and on product pages\n\t\t * even on page load. Using e.stopPropagation helps to prevent this,\n\t\t * but I don't know why. We don't even have to use this, since only a real\n\t\t * product click yields a valid productId. So we filter the invalid click\n\t\t * events out later down in the code. I'll keep it that way because this is\n\t\t * the most compatible way across shops.\n\t\t *\n\t\t * e.stopPropagation();\n\t\t * */\n\n\t\tlet productId = jQuery(event.currentTarget).nextAll(\".wpmProductId:first\").data(\"id\")\n\n\t\t/**\n\t\t * On product pages, for some reason, the click event is triggered on the main product on page load.\n\t\t * In that case no ID is found. But we can discard it, since we only want to trigger the event on\n\t\t * related products, which are found below.\n\t\t */\n\n\t\tif (productId) {\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\t\t\tjQuery(document).trigger(\"wpmSelectContentGaUa\", product)\n\t\t\t\tjQuery(document).trigger(\"wpmSelectItem\", product)\n\t\t\t}\n\t\t}\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// begin_checkout event\nlet checkoutButtonClasses = [\n\t\".checkout-button\",\n\t\".cart-checkout-button\",\n\t\".button.checkout\",\n\t\".xoo-wsc-ft-btn-checkout\", // https://xootix.com/side-cart-for-woocommerce/\n\t\".elementor-button--checkout\",\n]\n\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).one(\"click init_checkout\", checkoutButtonClasses.join(\",\"), () => {\n\t// console.log(\"begin_checkout\", new Date().getTime())\n\n\tjQuery(document).trigger(\"wpmBeginCheckout\")\n})\n\n\n// checkout_progress event\n// track checkout option event: entered valid billing email\njQuery(document).on(\"input\", \"#billing_email\", (event) => {\n\n\tif (wpm.isEmail(jQuery(event.currentTarget).val())) {\n\t\t// wpm.fireCheckoutOption(2);\n\t\twpm.fireCheckoutProgress(2)\n\t\twpm.emailSelected = true\n\t}\n})\n\n// track checkout option event: purchase click\n// https://wordpress.stackexchange.com/a/352171/68337\njQuery(document).on(\"wpmLoad\", (event) => {\n\tjQuery(document).on(\"payment_method_selected\", () => {\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t}\n\n\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\twpm.paymentMethodSelected = true\n\t})\n})\n\n// track checkout option event: purchase click\n// jQuery(document).one(\"click\", \"#place_order\", () => {\n// https://stackoverflow.com/a/34112407/4688612\njQuery(() => {\n\tjQuery(\"form.checkout\").on(\"checkout_place_order_success\", () => {\n\n\t\tif (false === wpm.emailSelected) {\n\t\t\twpm.fireCheckoutProgress(2)\n\t\t}\n\n\t\tif (false === wpm.paymentMethodSelected) {\n\t\t\twpm.fireCheckoutProgress(3)\n\t\t\twpm.fireCheckoutOption(3, jQuery(\"input[name='payment_method']:checked\").val())\n\t\t}\n\n\t\twpm.fireCheckoutProgress(4)\n\t})\n})\n\n// update cart event\n// jQuery(\"[name='update_cart']\").on('click', function (e) {\njQuery(document).on(\"click\", \"[name='update_cart']\", (event) => {\n\n\ttry {\n\t\tjQuery(\".cart_item\").each((index, element) => {\n\n\t\t\tlet url = new URL(jQuery(element).find(\".product-remove\").find(\"a\").attr(\"href\"))\n\t\t\tlet productId = wpm.getProductIdByCartItemKeyUrl(url)\n\n\n\t\t\tlet quantity = jQuery(element).find(\".qty\").val()\n\n\t\t\tif (quantity === 0) {\n\t\t\t\twpm.removeProductFromCart(productId)\n\t\t\t} else if (quantity < wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.removeProductFromCart(productId, wpmDataLayer.cart[productId].quantity - quantity)\n\t\t\t} else if (quantity > wpmDataLayer.cart[productId].quantity) {\n\t\t\t\twpm.addProductToCart(productId, quantity - wpmDataLayer.cart[productId].quantity)\n\t\t\t}\n\t\t})\n\t} catch (e) {\n\t\tconsole.error(e)\n\t\twpm.getCartItemsFromBackend()\n\t}\n})\n\n\n// add_to_wishlist\njQuery(function () {\n\n\tjQuery(\".add_to_wishlist,.wl-add-to\").on(\"click\", event => {\n\n\t\ttry {\n\n\t\t\tlet productId\n\n\t\t\tif (jQuery(event.currentTarget).data(\"productid\")) { // for the WooCommerce wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"productid\")\n\t\t\t} else if (jQuery(event.currentTarget).data(\"product-id\")) { // for the YITH wishlist plugin\n\n\t\t\t\tproductId = jQuery(event.currentTarget).data(\"product-id\")\n\t\t\t}\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\n\t\t\tjQuery(document).trigger(\"wpmAddToWishlist\", product)\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\njQuery(document).on(\"updated_cart_totals\", () => {\n\tjQuery(document).trigger(\"wpmViewCart\")\n})\n\n\n/**\n * Called when the user selects all the required dropdowns / attributes\n *\n * Has to be hooked after document ready !\n *\n * https://stackoverflow.com/a/27849208/4688612\n * https://stackoverflow.com/a/65065335/4688612\n */\n\njQuery(() => {\n\n\tjQuery(\".single_variation_wrap\").on(\"show_variation\", (event, variation) => {\n\n\t\ttry {\n\t\t\tlet productId = wpm.getIdBasedOndVariationsOutputSetting(variation.variation_id)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\twpm.triggerViewItemEventPrep(productId)\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t})\n})\n\n\n/**\n * Called on variable products when no selection has been done yet\n * or when the visitor deselects his choice.\n *\n * Has to be hooked after document ready !\n */\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n//\n// \t\ttry {\n// \t\t\tlet classes = jQuery(\"body\").attr(\"class\")\n// \t\t\tlet productId = classes.match(/(postid-)(\\d+)/)[2]\n//\n// \t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n//\n// \t\t\t/**\n// \t\t\t * If we have a variable product with no preset,\n// \t\t\t * and variations output is enabled,\n// \t\t\t * then we send a viewItem event with the first\n// \t\t\t * variation we find for the parent.\n// \t\t\t * If variations output is disabled,\n// \t\t\t * we just send the parent ID.\n// \t\t\t *\n// \t\t\t * And if Facebook microdata is active, use the\n// \t\t\t * microdata product ID.\n// \t\t\t */\n//\n// \t\t\tif (\n// \t\t\t\t\"variable\" === wpmDataLayer.shop.product_type &&\n// \t\t\t\twpmDataLayer?.general?.variationsOutput\n// \t\t\t) {\n// \t\t\t\tfor (const [key, product] of Object.entries(wpmDataLayer.products)) {\n// \t\t\t\t\tif (\"parentId\" in product) {\n//\n// \t\t\t\t\t\tproductId = product.id\n// \t\t\t\t\t\tbreak\n// \t\t\t\t\t}\n// \t\t\t\t}\n//\n// \t\t\t\tif (wpmDataLayer?.pixels?.facebook?.microdata_product_id) {\n// \t\t\t\t\tproductId = wpmDataLayer.pixels.facebook.microdata_product_id\n// \t\t\t\t}\n// \t\t\t}\n//\n// \t\t\t// console.log(\"hmm\")\n// \t\t\twpm.triggerViewItemEventPrep(productId)\n//\n// \t\t} catch (e) {\n// \t\t\tconsole.error(e)\n// \t\t}\n// \t})\n// })\n\n// jQuery(function () {\n//\n// \tjQuery(\".single_variation_wrap\").on(\"hide_variation\", function () {\n// \t\tjQuery(document).trigger(\"wpmviewitem\")\n// \t})\n// })\n\n\n/**\n * Set up wpm events\n */\n\n// populate the wpmDataLayer with the cart items\njQuery(document).on(\"wpmLoad\", () => {\n\n\ttry {\n\t\t// When a new session is initiated there are no items in the cart,\n\t\t// so we can save the call to get the cart items\n\t\tif (wpm.doesWooCommerceCartExist()) wpm.getCartItems()\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\n// get all add-to-cart= products from backend\njQuery(document).on(\"wpmLoad\", () => {\n\n\twpmDataLayer.products = wpmDataLayer.products || {}\n\n\t// scan page for add-to-cart= links\n\tlet productIds = wpm.getAddToCartLinkProductIds()\n\n\twpm.getProductsFromBackend(productIds)\n})\n\n/**\n * Save the referrer into a cookie\n */\n\njQuery(document).on(\"wpmLoad\", () => {\n\n\t// can't use session storage as we can't read it from the server\n\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\n\t\tif (document.referrer) {\n\t\t\tlet referrerUrl = new URL(document.referrer)\n\t\t\tlet referrerHostname = referrerUrl.hostname\n\n\t\t\tif (referrerHostname !== window.location.host) {\n\t\t\t\twpm.setCookie(\"wpmReferrer\", referrerHostname)\n\t\t\t}\n\t\t}\n\t}\n})\n\n\n/**\n * Create our own load event in order to better handle script flow execution when JS \"optimizers\" shuffle the code.\n */\n\njQuery(document).on(\"wpmLoad\", () => {\n\t// document.addEventListener(\"wpmLoad\", function () {\n\ttry {\n\t\tif (typeof wpmDataLayer != \"undefined\" && !wpmDataLayer?.wpmLoadFired) {\n\n\t\t\tjQuery(document).trigger(\"wpmLoadAlways\")\n\n\t\t\tif (wpmDataLayer?.shop) {\n\t\t\t\tif (\n\t\t\t\t\t\"product\" === wpmDataLayer.shop.page_type &&\n\t\t\t\t\t\"variable\" !== wpmDataLayer.shop.product_type &&\n\t\t\t\t\twpm.getMainProductIdFromProductPage()\n\t\t\t\t) {\n\t\t\t\t\tlet product = wpm.getProductDataForViewItemEvent(wpm.getMainProductIdFromProductPage())\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t\t\t\t} else if (\"product_category\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmCategory\")\n\t\t\t\t} else if (\"search\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmSearch\")\n\t\t\t\t} else if (\"cart\" === wpmDataLayer.shop.page_type) {\n\t\t\t\t\tjQuery(document).trigger(\"wpmViewCart\")\n\t\t\t\t} else if (\"order_received_page\" === wpmDataLayer.shop.page_type && wpmDataLayer.order) {\n\t\t\t\t\tif (!wpm.isOrderIdStored(wpmDataLayer.order.id)) {\n\t\t\t\t\t\tjQuery(document).trigger(\"wpmOrderReceivedPage\")\n\t\t\t\t\t\twpm.writeOrderIdToStorage(wpmDataLayer.order.id)\n\t\t\t\t\t\tif (typeof wpm.acrRemoveCookie === \"function\") wpm.acrRemoveCookie()\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjQuery(document).trigger(\"wpmEverywhereElse\")\n\t\t\t}\n\n\t\t\tif (wpmDataLayer?.user?.id && !wpm.hasLoginEventFired()) {\n\t\t\t\tjQuery(document).trigger(\"wpmLogin\")\n\t\t\t\twpm.setLoginEventFired()\n\t\t\t}\n\n\t\t\t// /**\n\t\t\t// * Load mini cart fragments into a wpm session storage key,\n\t\t\t// * after the document load event.\n\t\t\t// */\n\t\t\t// jQuery(document).ajaxSend(function (event, jqxhr, settings) {\n\t\t\t// \t// console.log('settings.url: ' + settings.url);\n\t\t\t//\n\t\t\t// \tif (settings.url.includes(\"get_refreshed_fragments\") && sessionStorage) {\n\t\t\t// \t\tif (!sessionStorage.getItem(\"wpmMiniCartActive\")) {\n\t\t\t// \t\t\tsessionStorage.setItem(\"wpmMiniCartActive\", JSON.stringify(true))\n\t\t\t// \t\t}\n\t\t\t// \t}\n\t\t\t// })\n\n\t\t\twpmDataLayer.wpmLoadFired = true\n\t\t}\n\n\t} catch (e) {\n\t\tconsole.error(e)\n\t}\n})\n\njQuery(document).on(\"wpmLoad\", async () => {\n\n\tif (\n\t\twindow.sessionStorage &&\n\t\twindow.sessionStorage.getItem(\"_pmw_endpoint_available\") &&\n\t\t!JSON.parse(window.sessionStorage.getItem(\"_pmw_endpoint_available\"))\n\t) {\n\t\tconsole.error(\"Pixel Manager for WooCommerce: REST endpoint is not available. Using admin-ajax.php instead.\")\n\t}\n})\n\n\n/**\n * Load all pixels\n */\njQuery(document).on(\"wpmPreLoadPixels\", () => {\n\n\tif (wpmDataLayer?.shop?.cookie_consent_mgmt?.explicit_consent && !wpm.explicitConsentStateAlreadySet()) {\n\t\twpm.updateConsentCookieValues(null, null, true)\n\t}\n\n\tjQuery(document).trigger(\"wpmLoadPixels\", {})\n})\n\n\n/**\n * All ecommerce events\n */\n\njQuery(document).on(\"wpmAddToCart\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToCart\",\n\t\tproduct: product,\n\t}\n\n\t// If Facebook pixel is loaded, add Facebook server to server event data to the payload\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToCart\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToCart\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmBeginCheckout\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"beginCheckout\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"InitiateCheckout\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (wpmDataLayer?.cart && !jQuery.isEmptyObject(wpmDataLayer.cart)) {\n\t\t\tpayload.facebook.custom_data = {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tcontent_ids : wpm.fbGetContentIdsFromCart(),\n\t\t\t\tvalue : wpm.getCartValue(),\n\t\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideBeginCheckout\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmAddToWishlist\", (event, product) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"addToWishlist\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"AddToWishlist\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : wpm.fbGetProductDataForCapiEvent(product),\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideAddToWishlist\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmViewItem\", (event, product = null) => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent : \"viewItem\",\n\t\tproduct: product,\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"ViewContent\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {},\n\t\t}\n\n\t\tif (product) {\n\t\t\tpayload.facebook.custom_data = wpm.fbGetProductDataForCapiEvent(product)\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideViewItem\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmSearch\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"search\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Search\",\n\t\t\tevent_id : wpm.getFbRandomEventId(),\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tsearch_string: wpm.getSearchTermFromUrl(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideSearch\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// If function wpm.isServerToServerEnabled() exists, then run it\n\tif (typeof wpm.sendEventPayloadToServer === \"function\") {\n\t\twpm.sendEventPayloadToServer(payload)\n\t}\n})\n\njQuery(document).on(\"wpmOrderReceivedPage\", () => {\n\n\t/**\n\t * Prepare the payload\n\t */\n\n\tlet payload = {\n\t\tevent: \"orderReceived\",\n\t}\n\n\tif (wpmDataLayer?.pixels?.facebook?.loaded) {\n\t\tpayload.facebook = {\n\t\t\tevent_name : \"Purchase\",\n\t\t\tevent_id : wpmDataLayer.order.id,\n\t\t\tuser_data : wpm.getFbUserData(),\n\t\t\tevent_source_url: window.location.href,\n\t\t\tcustom_data : {\n\t\t\t\tcontent_type: \"product\",\n\t\t\t\tvalue : wpmDataLayer.order.value_filtered,\n\t\t\t\tcurrency : wpmDataLayer.order.currency,\n\t\t\t\tcontent_ids : wpm.facebookContentIds(),\n\t\t\t},\n\t\t}\n\t}\n\n\t/**\n\t * Process the client-to-server event\n\t */\n\n\tjQuery(document).trigger(\"wpmClientSideOrderReceivedPage\", payload)\n\n\t/**\n\t * Process the server-to-server event\n\t */\n\n\t// ! No server-to-server event is sent for this event because it is compiled and sent from the server directly\n})\n\n\n\n\n\n","/**\n * Create a wpm namespace under which all functions are declared\n */\n\n// https://stackoverflow.com/a/5947280/4688612\n\n(function (wpm, $, undefined) {\n\n\tconst wpmDeduper = {\n\t\tkeyName : \"_wpm_order_ids\",\n\t\tcookieExpiresDays: 365,\n\t}\n\n\tconst wpmRestSettings = {\n\t\t// cookiesAvailable : '_wpm_cookies_are_available',\n\t\tcookiePmwRestEndpointAvailable: \"_pmw_endpoint_available\",\n\t\trestEndpointPost : \"pmw/v1/test/\",\n\t\trestFails : 0,\n\t\trestFailsThreshold : 10,\n\t}\n\n\twpm.emailSelected = false\n\twpm.paymentMethodSelected = false\n\n\t// wpm.checkIfCookiesAvailable = function () {\n\t//\n\t// // read the cookie if previously set, if it is return true, otherwise continue\n\t// if (wpm.getCookie(wpmRestSettings.cookiesAvailable)) {\n\t// return true;\n\t// }\n\t//\n\t// // set the cookie for the session\n\t// Cookies.set(wpmRestSettings.cookiesAvailable, true);\n\t//\n\t// // read cookie, true if ok, false if not ok\n\t// return !!wpm.getCookie(wpmRestSettings.cookiesAvailable);\n\t// }\n\n\twpm.useRestEndpoint = () => {\n\n\t\t// only if sessionStorage is available\n\n\t\t// only if REST API endpoint is generally accessible\n\t\t// check in sessionStorage if we checked before and return answer\n\t\t// otherwise check if the endpoint is available, save answer in sessionStorage and return answer\n\n\t\t// only if not too many REST API errors happened\n\n\t\treturn wpm.isSessionStorageAvailable() &&\n\t\t\twpm.isRestEndpointAvailable() &&\n\t\t\twpm.isBelowRestErrorThreshold()\n\t}\n\n\twpm.isBelowRestErrorThreshold = () => window.sessionStorage.getItem(wpmRestSettings.restFails) <= wpmRestSettings.restFailsThreshold\n\n\twpm.isRestEndpointAvailable = async () => {\n\n\t\tif (window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable)) {\n\t\t\treturn JSON.parse(window.sessionStorage.getItem(wpmRestSettings.cookiePmwRestEndpointAvailable))\n\t\t} else {\n\t\t\treturn await wpm.testEndpoint()\n\t\t}\n\t}\n\n\twpm.isSessionStorageAvailable = () => !!window.sessionStorage\n\n\t// Test the endpoint by sending a POST request\n\twpm.testEndpoint = async (\n\t\turl = wpm.root + wpmRestSettings.restEndpointPost,\n\t\tcookieName = wpmRestSettings.cookiePmwRestEndpointAvailable,\n\t) => {\n\n\t\tlet response = await fetch(url, {\n\t\t\tmethod : \"POST\",\n\t\t\tmode : \"cors\",\n\t\t\tcache : \"no-cache\",\n\t\t\tkeepalive: true,\n\t\t})\n\n\t\tif (response.status === 200) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(true))\n\t\t\treturn true\n\t\t} else if (response.status === 404) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t} else if (response.status === 0) {\n\t\t\twindow.sessionStorage.setItem(cookieName, JSON.stringify(false))\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isWpmRestEndpointAvailable = (cookieName = wpmRestSettings.cookiePmwRestEndpointAvailable) => !!wpm.getCookie(cookieName)\n\n\twpm.writeOrderIdToStorage = (orderId, source = \"thankyou_page\", expireDays = 365) => {\n\n\t\t// save the order ID in the browser storage\n\n\t\tif (!window.Storage) {\n\t\t\tlet expiresDate = new Date()\n\t\t\texpiresDate.setDate(expiresDate.getDate() + wpmDeduper.cookieExpiresDays)\n\n\t\t\tlet ids = []\n\t\t\tif (checkCookie()) {\n\t\t\t\tids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t}\n\n\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\tids.push(orderId)\n\t\t\t\tdocument.cookie = wpmDeduper.keyName + \"=\" + JSON.stringify(ids) + \";expires=\" + expiresDate.toUTCString()\n\t\t\t}\n\n\t\t} else {\n\t\t\tif (localStorage.getItem(wpmDeduper.keyName) === null) {\n\t\t\t\tlet ids = []\n\t\t\t\tids.push(orderId)\n\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\n\t\t\t} else {\n\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\tif (!ids.includes(orderId)) {\n\t\t\t\t\tids.push(orderId)\n\t\t\t\t\twindow.localStorage.setItem(wpmDeduper.keyName, JSON.stringify(ids))\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (typeof wpm.storeOrderIdOnServer === \"function\" && wpmDataLayer.orderDeduplication) {\n\t\t\twpm.storeOrderIdOnServer(orderId, source)\n\t\t}\n\t}\n\n\tfunction checkCookie() {\n\t\tlet key = wpm.getCookie(wpmDeduper.keyName)\n\t\treturn key !== \"\"\n\t}\n\n\twpm.isOrderIdStored = orderId => {\n\n\t\tif (wpmDataLayer.orderDeduplication) {\n\n\t\t\tif (!window.Storage) {\n\n\t\t\t\tif (checkCookie()) {\n\t\t\t\t\tlet ids = JSON.parse(wpm.getCookie(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (localStorage.getItem(wpmDeduper.keyName) !== null) {\n\t\t\t\t\tlet ids = JSON.parse(localStorage.getItem(wpmDeduper.keyName))\n\t\t\t\t\treturn ids.includes(orderId)\n\t\t\t\t} else {\n\t\t\t\t\treturn false\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tconsole.log(\"order duplication prevention: off\")\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.isEmail = email => {\n\n\t\t// https://emailregex.com/\n\n\t\tlet 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,}))$/\n\n\t\treturn regex.test(email)\n\t}\n\n\twpm.removeProductFromCart = (productId, quantityToRemove = null) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tlet quantity\n\n\t\t\tif (quantityToRemove == null) {\n\t\t\t\tquantity = wpmDataLayer.cart[productId].quantity\n\t\t\t} else {\n\t\t\t\tquantity = quantityToRemove\n\t\t\t}\n\n\t\t\tif (wpmDataLayer.cart[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmRemoveFromCart\", product)\n\n\t\t\t\tif (quantityToRemove == null || wpmDataLayer.cart[productId].quantity === quantityToRemove) {\n\n\t\t\t\t\tdelete wpmDataLayer.cart[productId]\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t} else {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity - quantity\n\n\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t\t// console.log('getting cart from back end');\n\t\t\t// wpm.getCartItemsFromBackend();\n\t\t\t// console.log('getting cart from back end done');\n\t\t}\n\t}\n\n\twpm.getIdBasedOndVariationsOutputSetting = productId => {\n\n\t\ttry {\n\t\t\tif (wpmDataLayer?.general?.variationsOutput) {\n\n\t\t\t\treturn productId\n\t\t\t} else {\n\t\t\t\tif (wpmDataLayer.products[productId].isVariation) {\n\n\t\t\t\t\treturn wpmDataLayer.products[productId].parentId\n\t\t\t\t} else {\n\n\t\t\t\t\treturn productId\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// add_to_cart\n\twpm.addProductToCart = (productId, quantity) => {\n\n\t\ttry {\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\t\tif (wpmDataLayer?.products[productId]) {\n\n\t\t\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\n\t\t\t\tjQuery(document).trigger(\"wpmAddToCart\", product)\n\n\t\t\t\t// add product to cart wpmDataLayer['cart']\n\n\t\t\t\t// if the product already exists in the object, only add the additional quantity\n\t\t\t\t// otherwise create that product object in the wpmDataLayer['cart']\n\t\t\t\tif (wpmDataLayer?.cart[productId]) {\n\n\t\t\t\t\twpmDataLayer.cart[productId].quantity = wpmDataLayer.cart[productId].quantity + quantity\n\t\t\t\t} else {\n\n\t\t\t\t\tif (!(\"cart\" in wpmDataLayer)) wpmDataLayer.cart = {}\n\n\t\t\t\t\twpmDataLayer.cart[productId] = wpm.getProductDetailsFormattedForEvent(productId, quantity)\n\t\t\t\t}\n\n\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(wpmDataLayer.cart))\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\n\t\t\t// fallback if wpmDataLayer.cart and wpmDataLayer.products got out of sync in case cart caching has an issue\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\twpm.getCartItems = () => {\n\n\t\tif (sessionStorage) {\n\t\t\tif (!sessionStorage.getItem(\"wpmDataLayerCart\") || wpmDataLayer.shop.page_type === \"order_received_page\") {\n\t\t\t\tsessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify({}))\n\t\t\t} else {\n\t\t\t\twpm.saveCartObjectToDataLayer(JSON.parse(sessionStorage.getItem(\"wpmDataLayerCart\")))\n\t\t\t}\n\t\t} else {\n\t\t\twpm.getCartItemsFromBackend()\n\t\t}\n\t}\n\n\t// get all cart items from the backend\n\twpm.getCartItemsFromBackend = () => {\n\t\ttry {\n\n\t\t\t/**\n\t\t\t * Can't use a REST API endpoint, as the cart session will not be loaded if the\n\t\t\t * endpoint is called.\n\t\t\t *\n\t\t\t * https://wordpress.org/support/topic/wc-cart-is-null-in-custom-rest-api/#post-11442843\n\t\t\t */\n\n\t\t\t/**\n\t\t\t * Get the cart items from the backend the data object using fetch API\n\t\t\t * and log success or error messages\n\t\t\t * and url encoded data\n\t\t\t */\n\t\t\tfetch(wpm.ajax_url, {\n\t\t\t\tmethod : \"POST\",\n\t\t\t\tcache : \"no-cache\",\n\t\t\t\tbody : new URLSearchParams({action: \"pmw_get_cart_items\"}),\n\t\t\t\tkeepalive: true,\n\t\t\t})\n\t\t\t\t.then(response => {\n\t\t\t\t\tif (response.ok) {\n\t\t\t\t\t\treturn response.json()\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.then(data => {\n\n\t\t\t\t\tif (data.success) {\n\n\t\t\t\t\t\tif (!data.data[\"cart\"]) data.data[\"cart\"] = {}\n\n\t\t\t\t\t\twpm.saveCartObjectToDataLayer(data.data[\"cart\"])\n\n\t\t\t\t\t\tif (sessionStorage) sessionStorage.setItem(\"wpmDataLayerCart\", JSON.stringify(data.data[\"cart\"]))\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow Error(\"Error getting cart items from backend\")\n\t\t\t\t\t}\n\t\t\t\t})\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// get productIds from the backend\n\twpm.getProductsFromBackend = async productIds => {\n\n\t\tif (wpmDataLayer?.products) {\n\t\t\t// reduce productIds by products already in the dataLayer\n\t\t\tproductIds = productIds.filter(item => !wpmDataLayer.products.hasOwnProperty(item))\n\t\t}\n\n\t\t// if no products IDs are in the object, don't try to get anything from the server\n\t\tif (!productIds || productIds.length === 0) return\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/products/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify(productIds),\n\t\t\t\t})\n\t\t\t} else {\n\n\t\t\t\t// Get the product details from the backend the data object using fetch API\n\t\t\t\t// and log success or error messages\n\t\t\t\t// and url encoded data\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod: \"POST\",\n\t\t\t\t\tcache : \"no-cache\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_get_product_ids\",\n\t\t\t\t\t\tproductIds: productIds,\n\t\t\t\t\t}),\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tlet responseData = await response.json()\n\t\t\t\tif (responseData.success) {\n\t\t\t\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, responseData.data)\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconsole.error(\"Error getting products from backend\")\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\n\t\treturn true\n\t}\n\n\twpm.saveCartObjectToDataLayer = cartObject => {\n\n\t\twpmDataLayer.cart = cartObject\n\t\twpmDataLayer.products = Object.assign({}, wpmDataLayer.products, cartObject)\n\t}\n\n\twpm.triggerViewItemEventPrep = async productId => {\n\n\t\tif (wpmDataLayer.products && wpmDataLayer.products[productId]) {\n\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t} else {\n\t\t\tawait wpm.getProductsFromBackend([productId])\n\t\t\twpm.triggerViewItemEvent(productId)\n\t\t}\n\t}\n\n\twpm.triggerViewItemEvent = productId => {\n\n\t\tlet product = wpm.getProductDetailsFormattedForEvent(productId)\n\n\t\tjQuery(document).trigger(\"wpmViewItem\", product)\n\t}\n\n\twpm.triggerViewItemEventNoProduct = () => {\n\t\tjQuery(document).trigger(\"wpmViewItem\")\n\t}\n\n\twpm.fireCheckoutOption = (step, checkout_option = null, value = null) => {\n\n\t\tlet data = {\n\t\t\tstep : step,\n\t\t\tcheckout_option: checkout_option,\n\t\t\tvalue : value,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutOption\", data)\n\t}\n\n\twpm.fireCheckoutProgress = step => {\n\n\t\tlet data = {\n\t\t\tstep: step,\n\t\t}\n\n\t\tjQuery(document).trigger(\"wpmFireCheckoutProgress\", data)\n\t}\n\n\twpm.getPostIdFromString = string => {\n\n\t\ttry {\n\t\t\treturn string.match(/(post-)(\\d+)/)[2]\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.triggerViewItemList = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tproductId = wpm.getIdBasedOndVariationsOutputSetting(productId)\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\tjQuery(document).trigger(\"wpmViewItemList\", wpm.getProductDataForViewItemEvent(productId))\n\t}\n\n\twpm.getProductDataForViewItemEvent = productId => {\n\n\t\tif (!productId) throw Error(\"Wasn't able to retrieve a productId\")\n\n\t\ttry {\n\t\t\tif (wpmDataLayer.products[productId]) {\n\n\t\t\t\treturn wpm.getProductDetailsFormattedForEvent(productId)\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getMainProductIdFromProductPage = () => {\n\n\t\ttry {\n\t\t\tif ([\"simple\", \"variable\", \"grouped\", \"composite\", \"bundle\"].indexOf(wpmDataLayer.shop.product_type) >= 0) {\n\t\t\t\treturn jQuery(\".wpmProductId:first\").data(\"id\")\n\t\t\t} else {\n\t\t\t\treturn false\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.viewItemListTriggerTestMode = target => {\n\n\t\tjQuery(target).css({\"position\": \"relative\"})\n\t\tjQuery(target).append(\"<div id=\\\"viewItemListTriggerOverlay\\\"></div>\")\n\t\tjQuery(target).find(\"#viewItemListTriggerOverlay\").css({\n\t\t\t\"z-index\" : \"10\",\n\t\t\t\"display\" : \"block\",\n\t\t\t\"position\" : \"absolute\",\n\t\t\t\"height\" : \"100%\",\n\t\t\t\"top\" : \"0\",\n\t\t\t\"left\" : \"0\",\n\t\t\t\"right\" : \"0\",\n\t\t\t\"opacity\" : wpmDataLayer.viewItemListTrigger.opacity,\n\t\t\t\"background-color\": wpmDataLayer.viewItemListTrigger.backgroundColor,\n\t\t})\n\t}\n\n\twpm.getSearchTermFromUrl = () => {\n\n\t\ttry {\n\t\t\tlet urlParameters = new URLSearchParams(window.location.search)\n\t\t\treturn urlParameters.get(\"s\")\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// we need this to track timeouts for intersection observers\n\tlet ioTimeouts = {}\n\n\twpm.observerCallback = (entries, observer) => {\n\n\t\tentries.forEach((entry) => {\n\n\t\t\ttry {\n\t\t\t\tlet productId\n\n\t\t\t\tlet elementId = jQuery(entry.target).data(\"ioid\")\n\n\t\t\t\t// Get the productId from next element, if wpmProductId is a sibling, like in Gutenberg blocks\n\t\t\t\t// otherwise go search in children, like in regular WC loop items\n\t\t\t\tif (jQuery(entry.target).next(\".wpmProductId\").length) {\n\t\t\t\t\t// console.log('test 1');\n\t\t\t\t\tproductId = jQuery(entry.target).next(\".wpmProductId\").data(\"id\")\n\t\t\t\t} else {\n\t\t\t\t\tproductId = jQuery(entry.target).find(\".wpmProductId\").data(\"id\")\n\t\t\t\t}\n\n\n\t\t\t\tif (!productId) throw Error(\"wpmProductId element not found\")\n\n\t\t\t\tif (entry.isIntersecting) {\n\n\t\t\t\t\tioTimeouts[elementId] = setTimeout(() => {\n\n\t\t\t\t\t\twpm.triggerViewItemList(productId)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) wpm.viewItemListTriggerTestMode(entry.target)\n\t\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.repeat === false) observer.unobserve(entry.target)\n\t\t\t\t\t}, wpmDataLayer.viewItemListTrigger.timeout)\n\n\t\t\t\t} else {\n\n\t\t\t\t\tclearTimeout(ioTimeouts[elementId])\n\t\t\t\t\tif (wpmDataLayer.viewItemListTrigger.testMode) jQuery(entry.target).find(\"#viewItemListTriggerOverlay\").remove()\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(e)\n\t\t\t}\n\t\t})\n\t}\n\n\t// fire view_item_list only on products that have become visible\n\tlet io\n\tlet ioid = 0\n\tlet allIoElementsToWatch\n\n\tlet getAllElementsToWatch = () => {\n\n\t\tallIoElementsToWatch = jQuery(\".wpmProductId\")\n\t\t\t.map(function (i, elem) {\n\n\t\t\t\tif (\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"type-product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).parent().hasClass(\"product-item-inner\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(elem).parent()\n\t\t\t\t} else if (\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"wc-block-grid__product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"product-small\") ||\n\t\t\t\t\tjQuery(elem).prev().hasClass(\"woocommerce-LoopProduct-link\")\n\t\t\t\t) {\n\t\t\t\t\treturn jQuery(this).prev()\n\t\t\t\t} else if (jQuery(elem).closest(\".product\").length) {\n\t\t\t\t\treturn jQuery(elem).closest(\".product\")\n\t\t\t\t}\n\t\t\t})\n\t}\n\n\twpm.startIntersectionObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// enable view_item_list test mode from browser\n\t\t\tif (wpm.urlHasParameter(\"vildemomode\")) wpmDataLayer.viewItemListTrigger.testMode = true\n\n\t\t\t// set up intersection observer\n\t\t\tio = new IntersectionObserver(wpm.observerCallback, {\n\t\t\t\tthreshold: wpmDataLayer.viewItemListTrigger.threshold,\n\t\t\t})\n\n\t\t\tgetAllElementsToWatch()\n\n\t\t\tallIoElementsToWatch.each((i, elem) => {\n\n\t\t\t\tjQuery(elem[0]).data(\"ioid\", ioid++)\n\n\t\t\t\tio.observe(elem[0])\n\t\t\t})\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// watch DOM for new lazy loaded products and add them to the intersection observer\n\twpm.startProductsMutationObserverToWatch = () => {\n\n\t\ttry {\n\t\t\t// Pass in the target node, as well as the observer options\n\n\t\t\t// selects the most common parent node\n\t\t\t// https://stackoverflow.com/a/7648323/4688612\n\t\t\tlet productsNode = jQuery(\".wpmProductId:eq(0)\").parents().has(jQuery(\".wpmProductId:eq(1)\").parents()).first()\n\n\t\t\tif (productsNode.length) {\n\t\t\t\tproductsMutationObserver.observe(productsNode[0], {\n\t\t\t\t\tattributes : true,\n\t\t\t\t\tchildList : true,\n\t\t\t\t\tcharacterData: true,\n\t\t\t\t})\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\t// Create an observer instance\n\tlet productsMutationObserver = new MutationObserver(mutations => {\n\n\t\tmutations.forEach(mutation => {\n\t\t\tlet newNodes = mutation.addedNodes // DOM NodeList\n\t\t\tif (newNodes !== null) { // If there are new nodes added\n\t\t\t\tlet nodes = jQuery(newNodes) // jQuery set\n\t\t\t\tnodes.each(function () {\n\t\t\t\t\tif (\n\t\t\t\t\t\tjQuery(this).hasClass(\"type-product\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"product-small\") ||\n\t\t\t\t\t\tjQuery(this).hasClass(\"wc-block-grid__product\")\n\t\t\t\t\t) {\n\t\t\t\t\t\t// check if the node has a child or sibling wpmProductId\n\t\t\t\t\t\t// if yes add it to the intersectionObserver\n\t\t\t\t\t\tif (hasWpmProductIdElement(this)) {\n\t\t\t\t\t\t\tjQuery(this).data(\"ioid\", ioid++)\n\t\t\t\t\t\t\tio.observe(this)\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\t})\n\n\tlet hasWpmProductIdElement = elem =>\n\t\t!!(jQuery(elem).find(\".wpmProductId\").length ||\n\t\t\tjQuery(elem).siblings(\".wpmProductId\").length)\n\n\twpm.setCookie = (cookieName, cookieValue = \"\", expiryDays = null) => {\n\n\t\tif (expiryDays) {\n\n\t\t\tlet d = new Date()\n\t\t\td.setTime(d.getTime() + (expiryDays * 24 * 60 * 60 * 1000))\n\t\t\tlet expires = \"expires=\" + d.toUTCString()\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";\" + expires + \";path=/\"\n\t\t} else {\n\t\t\tdocument.cookie = cookieName + \"=\" + cookieValue + \";path=/\"\n\t\t}\n\t}\n\n\twpm.getCookie = cookieName => {\n\n\t\tlet name = cookieName + \"=\"\n\t\tlet decodedCookie = decodeURIComponent(document.cookie)\n\t\tlet ca = decodedCookie.split(\";\")\n\n\t\tfor (let i = 0; i < ca.length; i++) {\n\n\t\t\tlet c = ca[i]\n\n\t\t\twhile (c.charAt(0) == \" \") {\n\t\t\t\tc = c.substring(1)\n\t\t\t}\n\n\t\t\tif (c.indexOf(name) == 0) {\n\t\t\t\treturn c.substring(name.length, c.length)\n\t\t\t}\n\t\t}\n\n\t\treturn \"\"\n\t}\n\n\twpm.deleteCookie = cookieName => {\n\t\twpm.setCookie(cookieName, \"\", -1)\n\t}\n\n\twpm.getWpmSessionData = () => {\n\n\t\tif (window.sessionStorage) {\n\n\t\t\tlet data = window.sessionStorage.getItem(\"_wpm\")\n\n\t\t\tif (data !== null) {\n\t\t\t\treturn JSON.parse(data)\n\t\t\t} else {\n\t\t\t\treturn {}\n\t\t\t}\n\t\t} else {\n\t\t\treturn {}\n\t\t}\n\t}\n\n\twpm.setWpmSessionData = data => {\n\t\tif (window.sessionStorage) {\n\t\t\twindow.sessionStorage.setItem(\"_wpm\", JSON.stringify(data))\n\t\t}\n\t}\n\n\twpm.storeOrderIdOnServer = async (orderId, source) => {\n\n\t\ttry {\n\n\t\t\tlet response\n\n\t\t\tif (await wpm.isRestEndpointAvailable()) {\n\n\t\t\t\tresponse = await fetch(wpm.root + \"pmw/v1/pixels-fired/\", {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\theaders: {\n\t\t\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t\t\t},\n\t\t\t\t\tbody : JSON.stringify({\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource: source\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t\tcache\t: \"no-cache\",\n\t\t\t\t})\n\n\t\t\t} else {\n\t\t\t\t// save the state in the database\n\n\t\t\t\t// Send the data object with ajax request\n\t\t\t\t// and log success or error using fetch API and url encoded\n\t\t\t\tresponse = await fetch(wpm.ajax_url, {\n\t\t\t\t\tmethod : \"POST\",\n\t\t\t\t\tbody : new URLSearchParams({\n\t\t\t\t\t\taction : \"pmw_purchase_pixels_fired\",\n\t\t\t\t\t\torder_id: orderId,\n\t\t\t\t\t\tsource : source,\n\t\t\t\t\t}),\n\t\t\t\t\tkeepalive: true,\n\t\t\t\t})\n\t\t\t}\n\n\t\t\tif (response.ok) {\n\t\t\t\tconsole.log(\"wpm.storeOrderIdOnServer success\")\n\t\t\t} else {\n\t\t\t\tconsole.error(\"wpm.storeOrderIdOnServer error\")\n\t\t\t}\n\n\t\t} catch (e) {\n\t\t\tconsole.error(e)\n\t\t}\n\t}\n\n\twpm.getProductIdByCartItemKeyUrl = url => {\n\n\t\tlet searchParams = new URLSearchParams(url.search)\n\t\tlet cartItemKey = searchParams.get(\"remove_item\")\n\n\t\tlet productId\n\n\t\tif (wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"] === 0) {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"product_id\"]\n\t\t} else {\n\t\t\tproductId = wpmDataLayer.cartItemKeys[cartItemKey][\"variation_id\"]\n\t\t}\n\n\t\treturn productId\n\t}\n\n\twpm.getAddToCartLinkProductIds = () =>\n\t\tjQuery(\"a\").map(function () {\n\t\t\tlet href = jQuery(this).attr(\"href\")\n\n\t\t\tif (href && href.includes(\"?add-to-cart=\")) {\n\t\t\t\tlet matches = href.match(/(add-to-cart=)(\\d+)/)\n\t\t\t\tif (matches) return matches[2]\n\t\t\t}\n\t\t}).get()\n\n\twpm.getProductDetailsFormattedForEvent = (productId, quantity = 1) => {\n\n\t\tlet product = {\n\t\t\tid : productId.toString(),\n\t\t\tdyn_r_ids : wpmDataLayer.products[productId].dyn_r_ids,\n\t\t\tname : wpmDataLayer.products[productId].name,\n\t\t\tlist_name : wpmDataLayer.shop.list_name,\n\t\t\tbrand : wpmDataLayer.products[productId].brand,\n\t\t\tcategory : wpmDataLayer.products[productId].category,\n\t\t\tvariant : wpmDataLayer.products[productId].variant,\n\t\t\tlist_position: wpmDataLayer.products[productId].position,\n\t\t\tquantity : quantity,\n\t\t\tprice : wpmDataLayer.products[productId].price,\n\t\t\tcurrency : wpmDataLayer.shop.currency,\n\t\t\tisVariable : wpmDataLayer.products[productId].isVariable,\n\t\t\tisVariation : wpmDataLayer.products[productId].isVariation,\n\t\t\tparentId : wpmDataLayer.products[productId].parentId,\n\t\t}\n\n\t\tif (product.isVariation) product[\"parentId_dyn_r_ids\"] = wpmDataLayer.products[productId].parentId_dyn_r_ids\n\n\t\treturn product\n\t}\n\n\twpm.setReferrerToCookie = () => {\n\n\t\t// can't use session storage as we can't read it from the server\n\t\tif (!wpm.getCookie(\"wpmReferrer\")) {\n\t\t\twpm.setCookie(\"wpmReferrer\", document.referrer)\n\t\t}\n\t}\n\n\twpm.getReferrerFromCookie = () => {\n\n\t\tif (wpm.getCookie(\"wpmReferrer\")) {\n\t\t\treturn wpm.getCookie(\"wpmReferrer\")\n\t\t} else {\n\t\t\treturn null\n\t\t}\n\t}\n\n\twpm.getClidFromBrowser = (clidId = \"gclid\") => {\n\n\t\tlet clidCookieId\n\n\t\tclidCookieId = {\n\t\t\tgclid: \"_gcl_aw\",\n\t\t\tdclid: \"_gcl_dc\",\n\t\t}\n\n\t\tif (wpm.getCookie(clidCookieId[clidId])) {\n\n\t\t\tlet clidCookie = wpm.getCookie(clidCookieId[clidId])\n\t\t\tlet matches = clidCookie.match(/(GCL.[\\d]*.)(.*)/)\n\t\t\treturn matches[2]\n\t\t} else {\n\t\t\treturn \"\"\n\t\t}\n\t}\n\n\twpm.getUserAgent = () => navigator.userAgent\n\n\twpm.getViewPort = () => ({\n\t\twidth : Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0),\n\t\theight: Math.max(document.documentElement.clientHeight || 0, window.innerHeight || 0),\n\t})\n\n\n\twpm.version = () => {\n\t\tconsole.log(wpmDataLayer.version)\n\t}\n\n\t// https://api.jquery.com/jquery.getscript/\n\twpm.loadScriptAndCacheIt = url => {\n\n\t\t// Get and load the script using fetch API, if possible from cache, and return it without using eval\n\t\treturn fetch(url, {\n\t\t\tmethod : \"GET\",\n\t\t\tcache : \"default\",\n\t\t\tkeepalive: true,\n\t\t})\n\t\t\t.then(response => {\n\t\t\t\tif (response.ok) {\n\t\t\t\t\t// console.log(\"response\", response)\n\t\t\t\t\treturn response.text()\n\t\t\t\t\t// console.log(\"wpm.loadScriptAndCacheIt success: \" + url)\n\t\t\t\t} else {\n\t\t\t\t\tthrow new Error(\"Network response was not ok: \" + url)\n\t\t\t\t}\n\t\t\t})\n\t\t\t.then(script => {\n\t\t\t\t// Execute the script\n\t\t\t\t// console.error(\"executing script: \" + script)\n\t\t\t\teval(script)\n\t\t\t\t// console.log(\"executed script: \" + script)\n\t\t\t})\n\t\t\t.catch(e => {\n\t\t\t\tconsole.error(e)\n\t\t\t})\n\t}\n\n\twpm.getOrderItemPrice = orderItem => (orderItem.total + orderItem.total_tax) / orderItem.quantity\n\n\twpm.hasLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\treturn data?.loginEventFired\n\t}\n\n\twpm.setLoginEventFired = () => {\n\t\tlet data = wpm.getWpmSessionData()\n\t\tdata[\"loginEventFired\"] = true\n\t\twpm.setWpmSessionData(data)\n\t}\n\n\twpm.wpmDataLayerExists = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (typeof wpmDataLayer !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.jQueryExists = () => new Promise(resolve => {\n\t\t(function waitForjQuery() {\n\t\t\tif (typeof jQuery !== \"undefined\") return resolve()\n\t\t\tsetTimeout(waitForjQuery, 100)\n\t\t})()\n\t})\n\n\twpm.pageLoaded = () => new Promise(resolve => {\n\t\t(function waitForVar() {\n\t\t\tif (\"complete\" === document.readyState) return resolve()\n\t\t\tsetTimeout(waitForVar, 50)\n\t\t})()\n\t})\n\n\twpm.pageReady = () => {\n\t\treturn new Promise(resolve => {\n\t\t\t(function waitForVar() {\n\t\t\t\tif (\"interactive\" === document.readyState || \"complete\" === document.readyState) return resolve()\n\t\t\t\tsetTimeout(waitForVar, 50)\n\t\t\t})()\n\t\t})\n\t}\n\n\twpm.isMiniCartActive = () => {\n\t\tif (window.sessionStorage) {\n\t\t\tfor (const [key, value] of Object.entries(window.sessionStorage)) {\n\t\t\t\tif (key.includes(\"wc_fragments\")) {\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false\n\t\t} else {\n\t\t\treturn false\n\t\t}\n\t}\n\n\twpm.doesWooCommerceCartExist = () => document.cookie.includes(\"woocommerce_items_in_cart\")\n\n\twpm.urlHasParameter = parameter => {\n\t\tlet urlParams = new URLSearchParams(window.location.search)\n\t\treturn urlParams.has(parameter)\n\t}\n\n\t// https://stackoverflow.com/a/60606893/4688612\n\twpm.hashAsync = (algo, str) => {\n\t\treturn crypto.subtle.digest(algo, new TextEncoder(\"utf-8\").encode(str)).then(buf => {\n\t\t\treturn Array.prototype.map.call(new Uint8Array(buf), x => ((\"00\" + x.toString(16)).slice(-2))).join(\"\")\n\t\t})\n\t}\n\n\twpm.getCartValue = () => {\n\n\t\tlet value = 0\n\n\t\tif (wpmDataLayer?.cart) {\n\n\t\t\tfor (const key in wpmDataLayer.cart) {\n\t\t\t\t// content_ids.push(wpmDataLayer.products[key].dyn_r_ids[wpmDataLayer.pixels.facebook.dynamic_remarketing.id_type])\n\n\t\t\t\tlet product = wpmDataLayer.cart[key]\n\n\t\t\t\tvalue += product.quantity * product.price\n\t\t\t}\n\t\t}\n\n\t\treturn value\n\t}\n\n}(window.wpm = window.wpm || {}, jQuery))\n","/**\n * Load all WPM functions\n *\n * Ignore event listeners. They need to be loaded after\n * we made sure that jQuery has been loaded.\n */\n\nrequire(\"./functions\")\nrequire(\"./cookie_consent\")\n\n// #if process.env.TIER === 'premium'\n// require(\"./functions_premium\")\n// #endif\n","/**\n * After WPM is loaded\n * we first check if wpmDataLayer is loaded,\n * and as soon as it is, we load the pixels,\n * and as soon as the page load is complete,\n * we fire the wpmLoad event.\n *\n * @param {{pro:bool}} wpmDataLayer.version\n *\n * https://stackoverflow.com/a/25868457/4688612\n * https://stackoverflow.com/a/44093516/4688612\n */\n\nwpm.wpmDataLayerExists()\n\t.then(function () {\n\t\tconsole.log(\"Pixel Manager for WooCommerce: \" + (wpmDataLayer.version.pro ? \"Pro\" : \"Free\") +\" Version \" + wpmDataLayer.version.number + \" loaded\")\n\n\t\tdocument.dispatchEvent(new Event(\"wpmPreLoadPixels\"))\n\t})\n\t.then(function () {\n\t\twpm.pageLoaded().then(function () {\n\t\t\tdocument.dispatchEvent(new Event(\"wpmLoad\"))\n\t\t})\n\t})\n\n\n\n/**\n * Run when page is ready\n */\n\nwpm.pageReady().then(function () {\n\n\t/**\n\t * Run as soon as wpm namespace is loaded\n\t */\n\n\twpm.wpmDataLayerExists()\n\t\t.then(function () {\n\t\t\t// watch for products visible in viewport\n\t\t\twpm.startIntersectionObserverToWatch()\n\n\t\t\t// watch for lazy loaded products\n\t\t\twpm.startProductsMutationObserverToWatch()\n\t\t})\n})\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","/**\n * Load all essential scripts first\n */\n\nrequire(\"./wpm/functions_loader\")\n\n// Only load the event listeners after jQuery has been loaded for sure\nwpm.jQueryExists().then(function () {\n\n\trequire(\"./wpm/event_listeners\")\n\n\trequire(\"./google/loader\")\n\trequire(\"./facebook/loader\")\n\trequire(\"./hotjar/loader\")\n\n\t/**\n\t * Load all premium scripts\n\t */\n\n\t// #if process.env.TIER === 'premium'\n// \trequire(\"./wpm/event_listeners_premium\")\n// \trequire(\"./microsoft-ads/loader\")\n// \trequire(\"./pinterest/loader\")\n// \trequire(\"./snapchat/loader\")\n// \trequire(\"./tiktok/loader\")\n// \trequire(\"./twitter/loader\")\n\t// #endif\n\n\n\t/**\n\t * Initiate WPM.\n\t *\n\t * It makes sure that the script flow gets executed correctly,\n\t * no matter how JS \"optimizers\" shuffle the code.\n\t */\n\n\trequire(\"./wpm/init\")\n})\n\n"],"names":["jQuery","document","on","wpmDataLayer","pixels","facebook","pixel_id","loaded","wpm","canIFire","loadFacebookPixel","event","payload","fbq","custom_data","eventID","event_id","error","console","setFbUserData","$","undefined","fbUserData","f","window","b","e","n","callMethod","apply","arguments","queue","push","_fbq","version","t","createElement","async","src","s","getElementsByTagName","parentNode","insertBefore","data","isFbpSet","getUserIdentifiersForFb","user","id","external_id","order","user_id","email","em","billing_email_hashed","first_name","fn","billing_first_name","toLowerCase","last_name","ln","billing_last_name","phone","ph","billing_phone","replace","city","ct","billing_city","state","st","billing_state","postcode","zp","billing_postcode","country","billing_country","getFbRandomEventId","Math","random","toString","substring","getFbUserData","getFbUserDataFromBrowser","getCookie","isValidFbp","fbp","isValidFbc","fbc","navigator","userAgent","client_user_agent","RegExp","test","fbGetProductDataForCapiEvent","product","content_type","content_name","name","content_ids","dyn_r_ids","dynamic_remarketing","id_type","value","parseFloat","quantity","price","currency","facebookContentIds","prodIds","key","item","Object","entries","items","general","variationsOutput","variation_id","String","products","trackCustomFacebookEvent","eventName","customData","eventId","trigger","event_name","user_data","event_source_url","location","href","fbGetContentIdsFromCart","cart","require","isEmptyObject","google","ads","conversionIds","status","googleConfigConditionsMet","isVariable","send_events_with_parent_ids","send_to","getGoogleAdsConversionIdentifiers","google_business_vertical","gtagLoaded","then","gtag","value_filtered","getGoogleAdsDynamicRemarketingOrderItems","getGoogleAdsConversionIdentifiersWithLabel","data_basic","data_with_cart","transaction_id","number","new_customer","clv_order_value_filtered","customer_lifetime_value","aw_merchant_id","discount","aw_feed_country","aw_feed_language","getGoogleAdsRegularOrderItems","conversionIdentifiers","orderItems","orderItem","analytics","universal","property_id","mp_active","affiliation","value_regular","tax","shipping","coupon","getGAUAOrderItems","category","join","variant","variant_name","brand","ga3AddListNameToProduct","item_data","productPosition","list_name","shop","list_position","ga4","measurement_id","getGA4OrderItems","item_name","item_category","item_id","item_variant","item_brand","canGoogleLoad","loadGoogle","logPreventedPixelLoading","type","consent_mode","active","getConsentValues","mode","categories","includes","getVisitorConsentStatusAndUpdateGoogleConsentSettings","google_consent_settings","analytics_storage","ad_storage","updateGoogleConsentMode","cookie_consent_mgmt","explicit_consent","fireGtagGoogleAds","enhanced_conversions","phone_conversion_label","phone_conversion_number","keys","page_type","enhanced_conversion_data","fireGtagGoogleAnalyticsUA","parameters","fireGtagGoogleAnalyticsGA4","debug_mode","isGoogleActive","getGoogleGtagId","loadScriptAndCacheIt","script","textStatus","dataLayer","wait_for_update","region","ads_data_redaction","url_passthrough","linker","settings","Date","Promise","resolve","reject","startTime","wait","setTimeout","optimize","container_id","load_google_optimize_pixel","hotjar","site_id","load_hotjar_pixel","h","o","hj","q","_hjSettings","hjid","hjsv","a","r","appendChild","getComplianzCookies","cmplz_statistics","cmplz_marketing","visitorHasChosen","getCookieLawInfoCookies","analyticsCookie","adsCookie","wpmConsentValues","setConsentValueCategories","updateConsentCookieValues","cookie","explicitConsent","JSON","parse","decodeURI","indexOf","action","length","consents","statistics","marketing","thirdparty","advanced","setConsentDefaultValuesToExplicit","pixelName","canIFireMode","log","scriptTagObserver","MutationObserver","mutations","forEach","addedNodes","node","shouldScriptBeActive","unblockScript","blockScript","observe","head","childList","subtree","addEventListener","disconnect","split","some","element","scriptNode","removeAttach","remove","wpmSrc","attr","appendTo","dispatchEvent","Event","removeAttr","unblockAllScripts","unblockSelectedPixels","Cookiebot","consent","detail","cmplzStatusChange","cmplzConsentData","huObserver","querySelector","hu","documentElement","body","explicitConsentStateAlreadySet","pmw","consentAcceptAll","duration","consentSetCookie","consentAdjustSelectively","consentRevokeAll","setCookie","stringify","url","URL","currentTarget","productId","getProductIdByCartItemKeyUrl","removeProductFromCart","addProductToCart","product_type","Number","val","each","index","find","classes","getPostIdFromString","one","target","closest","matches","match","nextAll","getIdBasedOndVariationsOutputSetting","Error","getProductDetailsFormattedForEvent","isEmail","fireCheckoutProgress","emailSelected","paymentMethodSelected","fireCheckoutOption","getCartItemsFromBackend","variation","triggerViewItemEventPrep","doesWooCommerceCartExist","getCartItems","productIds","getAddToCartLinkProductIds","getProductsFromBackend","referrer","referrerHostname","hostname","host","wpmLoadFired","getMainProductIdFromProductPage","getProductDataForViewItemEvent","isOrderIdStored","writeOrderIdToStorage","acrRemoveCookie","hasLoginEventFired","setLoginEventFired","sessionStorage","getItem","sendEventPayloadToServer","getCartValue","search_string","getSearchTermFromUrl","wpmDeduper","keyName","cookieExpiresDays","wpmRestSettings","cookiePmwRestEndpointAvailable","restEndpointPost","restFails","restFailsThreshold","checkCookie","useRestEndpoint","isSessionStorageAvailable","isRestEndpointAvailable","isBelowRestErrorThreshold","testEndpoint","root","cookieName","response","fetch","method","cache","keepalive","setItem","isWpmRestEndpointAvailable","orderId","source","Storage","localStorage","ids","expiresDate","setDate","getDate","toUTCString","storeOrderIdOnServer","orderDeduplication","quantityToRemove","isVariation","parentId","saveCartObjectToDataLayer","ajax_url","URLSearchParams","ok","json","success","filter","hasOwnProperty","headers","responseData","assign","cartObject","triggerViewItemEvent","triggerViewItemEventNoProduct","step","checkout_option","string","triggerViewItemList","viewItemListTriggerTestMode","css","append","viewItemListTrigger","opacity","backgroundColor","search","get","ioTimeouts","io","observerCallback","observer","entry","elementId","next","isIntersecting","testMode","repeat","unobserve","timeout","clearTimeout","ioid","allIoElementsToWatch","getAllElementsToWatch","map","i","elem","parent","hasClass","prev","this","startIntersectionObserverToWatch","urlHasParameter","IntersectionObserver","threshold","startProductsMutationObserverToWatch","productsNode","parents","has","first","productsMutationObserver","attributes","characterData","mutation","newNodes","hasWpmProductIdElement","siblings","cookieValue","expiryDays","d","setTime","getTime","expires","ca","decodeURIComponent","c","charAt","deleteCookie","getWpmSessionData","setWpmSessionData","order_id","cartItemKey","cartItemKeys","position","parentId_dyn_r_ids","setReferrerToCookie","getReferrerFromCookie","getClidFromBrowser","clidCookieId","clidId","gclid","dclid","getUserAgent","getViewPort","width","max","clientWidth","innerWidth","height","clientHeight","innerHeight","text","eval","catch","getOrderItemPrice","total","total_tax","loginEventFired","wpmDataLayerExists","waitForVar","jQueryExists","waitForjQuery","pageLoaded","readyState","pageReady","isMiniCartActive","parameter","hashAsync","algo","str","crypto","subtle","digest","TextEncoder","encode","buf","Array","prototype","call","Uint8Array","x","slice","pro","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__"],"sourceRoot":""}
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: woocommerce, google analytics, google ads, facebook, conversion tracking,
4
  Requires at least: 3.7
5
  Tested up to: 6.0
6
  Requires PHP: 7.3
7
- Stable tag: 1.22.0
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -211,6 +211,10 @@ You can send the link to the front page of your shop too if you think it would b
211
 
212
  == Changelog ==
213
 
 
 
 
 
214
  = 1.22.0 = 26.09.2022
215
 
216
 
@@ -218,7 +222,7 @@ You can send the link to the front page of your shop too if you think it would b
218
 
219
  * Tweak: Included the action scheduler library to avoid the buggy WooCommerce implementation of the action scheduler.
220
  * Tweak: Implemented a dynamic rate limiter that prevents possible timeouts if too many orders are being analysed in the payment gateway accuracy report.
221
- * Fix: Fixed the <input> tag name for the product data.
222
  * Fix: Fix for the bug that caused multiple action scheduler entries.
223
 
224
  = 1.21.0 = 12.09.2022
4
  Requires at least: 3.7
5
  Tested up to: 6.0
6
  Requires PHP: 7.3
7
+ Stable tag: 1.22.1
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
211
 
212
  == Changelog ==
213
 
214
+ = 1.22.1 = 26.09.2022
215
+
216
+ * Tweak: Adjusted the consent API settings parameters
217
+
218
  = 1.22.0 = 26.09.2022
219
 
220
 
222
 
223
  * Tweak: Included the action scheduler library to avoid the buggy WooCommerce implementation of the action scheduler.
224
  * Tweak: Implemented a dynamic rate limiter that prevents possible timeouts if too many orders are being analysed in the payment gateway accuracy report.
225
+ * Fix: Fixed the input tag name for the product data.
226
  * Fix: Fix for the bug that caused multiple action scheduler entries.
227
 
228
  = 1.21.0 = 12.09.2022
wgact.php CHANGED
@@ -10,7 +10,7 @@
10
  * Developer URI: https://sweetcode.com
11
  * Text Domain: woocommerce-google-adwords-conversion-tracking-tag
12
  * Domain path: /languages
13
- * * Version: 1.22.0
14
  *
15
  * WC requires at least: 3.7
16
  * WC tested up to: 6.8
@@ -19,7 +19,7 @@
19
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
20
  *
21
  **/
22
- const WPM_CURRENT_VERSION = '1.22.0' ;
23
  // TODO add option checkbox on uninstall and ask if user wants to delete options from db
24
 
25
  if ( !defined( 'ABSPATH' ) ) {
10
  * Developer URI: https://sweetcode.com
11
  * Text Domain: woocommerce-google-adwords-conversion-tracking-tag
12
  * Domain path: /languages
13
+ * * Version: 1.22.1
14
  *
15
  * WC requires at least: 3.7
16
  * WC tested up to: 6.8
19
  * License URI: http://www.gnu.org/licenses/gpl-3.0.html
20
  *
21
  **/
22
+ const WPM_CURRENT_VERSION = '1.22.1' ;
23
  // TODO add option checkbox on uninstall and ask if user wants to delete options from db
24
 
25
  if ( !defined( 'ABSPATH' ) ) {