(()=>{"use strict";var e={};function t(e){let t=e.replace(/[^\d.,]/g,"").trim();const r=t.lastIndexOf(","),a=t.lastIndexOf(".");return r>-1&&a>-1?t=r>a?t.replace(/\./g,"").replace(",","."):t.replace(/,/g,""):r>-1?t=3===t.length-r?t.replace(",","."):t.replace(/,/g,""):a>-1&&3!==t.length-a&&(t=t.replace(/\./g,"")),parseFloat(t)||0}e.d=(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(e=>{if(!e)return;const r=e("body"),a=globalThis._googlesitekit.easyDigitalDownloadsCurrency;r.on("edd_cart_item_added",(e,r)=>{const o=t(r.total),{id:i,name:l,price:c}=function(e){const r=(new DOMParser).parseFromString(e,"text/html");return{id:r.querySelector(".edd-remove-from-cart")?.dataset.downloadId||"",name:r.querySelector(".edd-cart-item-title")?.textContent.trim()||"",price:t(r.querySelector(".edd-cart-item-price")?.textContent.trim()||"")}}(r.cart_item);globalThis._googlesitekit?.gtagEvent?.("add_to_cart",{currency:a,value:o,items:[{item_id:i,item_name:l,price:c}]})}),globalThis._googlesitekit?.edddata?.purchase&&globalThis._googlesitekit?.gtagEvent?.("purchase",{currency:a,...globalThis._googlesitekit.edddata.purchase})})(globalThis.jQuery)})();