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