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