(()=>{"use strict";const e="email",t="phone",n="name",r={[e]:["email","e-mail","mail","email address"],[t]:["phone","tel","mobile","cell","telephone","phone number"],[n]:["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 i(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===n}).map(e=>{let{value:t}=e;return l(t)}).filter(Boolean);if(!t.length)return;const[r,...a]=1===t.length?t[0].split(" "):t;return{first_name:r,...a?.length>0?{last_name:a.join(" ")}:{}}}function o(t){return t.find(t=>{let{type:n}=t;return n===e})?.value}function u(e){return e.find(e=>{let{type:n}=e;return n===t})?.value}var m,c;m=globalThis.jQuery,c=globalThis.PUM,m&&c&&c.hooks.addAction("pum.integration.form.success",(m,c)=>{const g=globalThis._googlesitekit?.gtagUserData,p=g&&(d=c.formProvider,!f.includes(d))?function(m){if(!(m=m instanceof HTMLFormElement?m:m[0]))return;const c=new FormData(m);return function(e){const t=[["address",s(e)],["email",o(e)],["phone_number",u(e)]].filter(e=>{let[,t]=e;return t});if(0!==t.length)return Object.fromEntries(t)}(Array.from(c.entries()).map(s=>{let[o,u]=s;const c=m.querySelector(`[name='${o}']`),f=c?.type;return"hidden"===f?null:function(s){let{type:o,name:u,value:m,label:c}=s||{};switch(o=l(o),u=l(u),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),o){case"email":return{type:e,value:a(m)};case"tel":return{type:t,value:i(m)}}return function(e){if(!e)return!1;const t=a(e);return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}(m)||r[e].includes(u)||r[e].includes(c)?{type:e,value:a(m)}:r[t].includes(u)||r[t].includes(c)?{type:t,value:i(m)}:r[n].includes(u)||r[n].includes(c)?{type:n,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=i(e);if(!/^\+?\d{7,}$/.test(t))return!1;const n=/[\s\-()+.]/.test(e),r=e.trim().startsWith("+");return!(!n&&!r)}(m)?{type:t,value:i(m)}:null}({type:f,label:(c?.id?m.querySelector(`label[for='${c?.id}']`)?.textContent:null)||c?.closest("label")?.textContent,name:o,value:u})}).filter(Boolean))}(m):void 0;var d;globalThis._googlesitekit?.gtagEvent?.("submit_lead_form",p?{user_data:p}:void 0)});const f=["wpforms","contactform7","ninjaforms","mc4wp"]})();