(()=>{var t={};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),(e=>{if(!e)return;const{currency:o,products:n,purchase:i,add_to_cart:r,eventsToTrack:a}=t.g._googlesitekit?.wcdata||{},c=a?.includes("add_to_cart"),s=a?.includes("purchase");if(r&&c){const{price:e}=r,n=u(e,o,r);t.g._googlesitekit?.gtagEvent?.("add_to_cart",n)}if(i&&s){const{id:e,totals:o,items:n,user_data:r}=i,a=u(o.total_price,o.currency_code,n,e,o.shipping_total,o.tax_total);t.g._googlesitekit?.gtagUserData&&r&&(a.user_data=r),t.g._googlesitekit?.gtagEvent?.("purchase",a)}const d=e("body");function u(t,e,o){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;const a={value:l(t),currency:e,items:[]};if(n&&(a.transaction_id=n),"number"==typeof i&&(a.shipping=i),"number"==typeof r&&(a.tax=r),o&&o.length)for(const t of o)a.items.push(g(t));else o&&o.id&&(a.items=[g(o)]);return a}function g(t){const{id:e,name:o,price:n,variation:i,quantity:r,categories:a}=t,c={item_id:e,item_name:o,price:l(n)};if(r&&(c.quantity=r),i&&(c.item_variant=i),a&&a?.length){let t=1;for(const e of a)c[t>1?`item_category${t}`:"item_category"]=e.name,t++}return c}function l(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return parseInt(t,10)/10**e}c&&(d.on("added_to_cart",(e,i,r,a)=>{if(!a?.jquery)return;const c=parseInt(a.data("product_id"),10);if(!c)return;const s=n?.find(t=>t?.id===c)||{},{price:d}=s,g=u(d,o,s);t.g._googlesitekit?.gtagEvent?.("add_to_cart",g)}),e(".products-block-post-template .product, .wc-block-product-template .product").each(function(){const i=e(this),r=parseInt(i.find("[data-product_id]").attr("data-product_id"),10);r&&i.on("click",i=>{const a=e(i.target).closest(".wc-block-components-product-button [data-product_id]");if(!a.length||!a.hasClass("add_to_cart_button")||a.hasClass("product_type_variable"))return;const c=n?.find(t=>t?.id===r)||{},{price:s}=c,d=u(s,o,c);t.g._googlesitekit?.gtagEvent?.("add_to_cart",d)})}))})(t.g.jQuery)})();
(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();const t="email",n="phone",r="name",i={[t]:["email","e-mail","mail","email address"],[n]:["phone","tel","mobile","cell","telephone","phone number"],[r]:["name","full-name","full name","full_name","fullname","first-name","first name","first_name","firstname","last-name","last name","last_name","lastname","given-name","given name","given_name","givenname","family-name","family name","family_name","familyname","fname","lname","first","last","your-name","your name"]};function l(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function a(e){const t=l(e),n=t.lastIndexOf("@");if(-1===n)return t;const r=t.slice(n+1);return["gmail.com","googlemail.com"].includes(r)?`${t.slice(0,n).replace(/\./g,"")}@${r}`:t}function u(e){const t=l(e),n=t.replace(/\D/g,"");return t.startsWith("+")?`+${n}`:n}function s(e){const t=e.filter(e=>{let{type:t}=e;return t===r}).map(e=>{let{value:t}=e;return l(t)}).filter(Boolean);if(!t.length)return;const[n,...i]=1===t.length?t[0].split(" "):t;return{first_name:n,...i?.length>0?{last_name:i.join(" ")}:{}}}function o(e){return e.find(e=>{let{type:n}=e;return n===t})?.value}function m(e){return e.find(e=>{let{type:t}=e;return t===n})?.value}var c;(c=e.g.jQuery)&&c(e.g.document.body).on("wpformsAjaxSubmitSuccess",c=>{const f=e.g._googlesitekit?.gtagUserData,g=f?function(e){if(!(e&&e instanceof HTMLFormElement))return;const c=new FormData(e);return function(e){const t=[["address",s(e)],["email",o(e)],["phone_number",m(e)]].filter(e=>{let[,t]=e;return t});if(0!==t.length)return Object.fromEntries(t)}(Array.from(c.entries()).map(s=>{let[o,m]=s,c=e.querySelector(`[name='${o}']`);"hidden"===c?.type&&"hidden"!==c?.previousSibling?.type&&(c=c.previousSibling);const f=c?.type;return"hidden"===f||"submit"===f?null:function(e){let{type:s,name:o,value:m,label:c}=e||{};switch(s=l(s),o=l(o),m=l(m),c=function(e){return e&&"string"==typeof e?e.trim().toLowerCase().replace(/\s*\*+\s*$/,"").replace(/\s*\(required\)\s*$/i,"").replace(/\s*:\s*$/,"").trim():""}(c),s){case"email":return{type:t,value:a(m)};case"tel":return{type:n,value:u(m)}}return function(e){if(!e)return!1;const t=a(e);return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}(m)||i[t].includes(o)||i[t].includes(c)?{type:t,value:a(m)}:i[n].includes(o)||i[n].includes(c)?{type:n,value:u(m)}:i[r].includes(o)||i[r].includes(c)?{type:r,value:l(m)}:function(e){if(!e)return!1;if(!function(e){const t=e.replace(/\D/g,"");return!(t.length<7||t.length<e.length/2)&&/^[\s\-()+.\d]*$/.test(e)}(e))return!1;const t=u(e);if(!/^\+?\d{7,}$/.test(t))return!1;const n=/[\s\-()+.]/.test(e),r=e.trim().startsWith("+");return!(!n&&!r)}(m)?{type:n,value:u(m)}:null}({type:f,label:c?.id?e.querySelector(`label[for='${c?.id}']`)?.textContent:void 0,name:o,value:m})}).filter(Boolean))}(c.target):null;e.g._googlesitekit?.gtagEvent?.("submit_lead_form",g?{user_data:g}:void 0)})})();