(()=>{"use strict";function e(e){return e.pathname.split("/").filter(Boolean)}function t(e){return(e||"").toLowerCase()}const o=[{type:"phone",schemes:["tel:"]},{type:"email",schemes:["mailto:"]},{type:"sms",schemes:["sms:","smsto:"]},{type:"whatsapp",schemes:["whatsapp:"],hosts:["wa.me","api.whatsapp.com","web.whatsapp.com"],hasRecipient:o=>{if("wa.me"===o.hostname){const[n,i]=e(o);return/^\d+$/.test(n||"")||["message","qr"].includes(t(n))&&!!i}return!!o.searchParams.get("phone")}},{type:"messenger",schemes:["fb-messenger:"],hosts:["m.me","messenger.com"],hasRecipient:o=>{if("m.me"===o.hostname)return e(o).length>0;if("messenger.com"===o.hostname){const[n,i]=e(o);return"t"===t(n)&&!!i}return["user-thread","user"].includes(o.hostname)}},{type:"telegram",schemes:["tg:"],hosts:["t.me","telegram.me"],hasRecipient:o=>{if("tg:"===o.protocol)return"resolve"===o.hostname&&!!o.searchParams.get("domain");const[n]=e(o);return!!n&&!n.startsWith("+")&&!["share","joinchat","addstickers","proxy"].includes(t(n))}},{type:"viber",schemes:["viber:"],hasRecipient:e=>["chat","add","pa"].includes(e.hostname)},{type:"signal",schemes:["sgnl:"],hosts:["signal.me"],hasRecipient:e=>"sgnl:"===e.protocol||e.hash.startsWith("#p/")&&e.hash.length>3},{type:"line",schemes:["line:"],hosts:["line.me","page.line.me"],hasRecipient:o=>{if("page.line.me"===o.hostname)return e(o).length>0;const n="line:"===o.protocol?[o.hostname,...e(o)]:e(o),[i,s,r,a]="r"===t(n[0])?n.slice(1):n;return"ti"===t(i)&&"p"===t(s)&&!!r&&!a}}],n=Object.create(null),i=Object.create(null);o.forEach(e=>{e.schemes?.forEach(t=>{n[t]=e}),e.hosts?.forEach(t=>{i[t]=e})});const s=["sponsored","ugc","nofollow"];function r(e){return"http:"===e.protocol||"https:"===e.protocol?{transport_type:"beacon"}:{}}const a="a.post-page-numbers";function l(e){try{const t=new URL(e.href);for(const e of["page","paged"]){const o=parseInt(t.searchParams.get(e)||"",10);if(o>0)return o}const o=t.pathname.split("/").filter(Boolean).pop()||"";if(/^\d+$/.test(o)){const e=parseInt(o,10);if(e>0)return e}}catch{}const t=parseInt(e.textContent?.trim()||"",10);return t>0?t:1}const c="https://player.vimeo.com/api/player.js",h="data-googlesitekit-vimeo-sdk";function m(){return globalThis.Vimeo}function d(e,t){return new Promise((o,n)=>{let i;function s(e){return(...t)=>{clearTimeout(i),e(...t)}}e.addEventListener("load",s(()=>o()),{once:!0}),e.addEventListener("error",s(()=>n(new Error("Site Kit: failed to load the Vimeo Player SDK script."))),{once:!0}),void 0!==t&&(i=setTimeout(s(()=>n(new Error("Site Kit: timed out waiting for the Vimeo Player SDK script to load."))),t))})}let u=null;const g=[10,25,50,75];function p(e,t){try{e()}catch(e){console.error(...t?[t,e]:[e])}}const f={postID:0,isReadableSinglePost:!1,hasVimeoEmbed:!1,wordCount:0,estimatedReadTimeSeconds:0,isLastPageOfMultiPagePost:!1,readTimeThresholdPercent:85,minimumReadTimeSeconds:5,...globalThis._googlesitekit?.contentEvents||{}};!async function(e){if(!e.hasVimeoEmbed)return;const t=globalThis.document.querySelectorAll('iframe[src*="player.vimeo.com"]');if(t.length)try{const e=await function(){const e=m();return"function"==typeof e?.Player?Promise.resolve(e.Player):(u||(u=async function(){const e=globalThis.document.querySelector(`script[src^="${c}"]`);if(e&&!e.hasAttribute(h))return void await d(e,1e4);e?.remove();const t=globalThis.document.createElement("script");t.src=c,t.setAttribute(h,"");const o=d(t);globalThis.document.head.appendChild(t),await o}().then(()=>{const e=m()?.Player;if("function"!=typeof e)throw new Error("Site Kit: the Vimeo Player SDK script did not expose Vimeo.Player.");return e}).catch(e=>{throw u=null,e})),u)}();await Promise.allSettled(Array.from(t).map(async(t,o)=>{await async function(e,t){const o=Promise.all([e.getVideoTitle(),e.getVideoUrl()]).then(([e,o])=>({video_provider:"vimeo",video_title:e,video_url:o,video_instance_index:t}));function n(e,t){o.then(o=>{globalThis._googlesitekit?.gtagEvent?.(e,{...o,video_percent:t})}).catch(()=>{})}o.catch(e=>{console.error("Site Kit: failed to fetch this Vimeo video’s title/URL; its engagement events will not be tracked.",e)});let i=!1,s=!1;const r=new Set;e.on("play",()=>{i||(i=!0,n("video_start",0))}),e.on("timeupdate",e=>{if(r.size===g.length)return;const t=Math.floor(100*e.percent);g.forEach(e=>{t>=e&&!r.has(e)&&(r.add(e),n("video_progress",e))})}),e.on("ended",()=>{s||(s=!0,n("video_complete",100))}),await o}(new e(t),o)}))}catch(e){console.error("Site Kit: failed to load the Vimeo Player SDK; video engagement events will not be tracked on this page.",e)}}(f),p(()=>function(e){globalThis.document.addEventListener("click",t=>{try{if(!(t.target instanceof Element))return;const o=t.target.closest(`${a}, body.single-topic .bbp-pagination-links a.page-numbers`);if(!o)return;const n=o.matches(a)?"post":"bbpress";globalThis._googlesitekit?.gtagEvent?.("pagination_click",{pagination_type:n,page_number:l(o),post_id:e.postID,transport_type:"beacon"})}catch(e){console.error("Site Kit: failed to track this pagination click.",e)}})}(f),"Site Kit: failed to initialize pagination click tracking."),p(()=>{globalThis.document.addEventListener("click",e=>{try{if(!(e.target instanceof Element))return;const t=e.target.closest("a[href]");if(!t)return;let o;try{o=new URL(t.href)}catch{return}const a=function(e){const t=new URL(e),o="http:"===t.protocol||"https:"===t.protocol;t.hostname=o?t.hostname.replace(/^www\./,""):t.hostname.toLowerCase();const s=o?i[t.hostname]:n[t.protocol];return s?s.hasRecipient?s.hasRecipient(t)?s.type:null:s.type:null}(o);if(a)globalThis._googlesitekit?.gtagEvent?.("contact_link_click",{link_type:a,...r(o)});else{const e=function(e,t){if("http:"!==t.protocol&&"https:"!==t.protocol||t.hostname===globalThis.location.hostname)return null;const o=new Set((e.getAttribute("rel")||"").toLowerCase().split(/[\s,]+/).filter(Boolean));return s.filter(e=>o.has(e)).join(" ")||null}(t,o);e&&globalThis._googlesitekit?.gtagEvent?.("outbound_link_click",{link_rel:e,link_url:o.href,link_domain:o.hostname,...r(o)})}}catch(e){console.error("Site Kit: failed to track this link click.",e)}})},"Site Kit: failed to initialize link click tracking."),p(()=>function(e){const{postID:t,isReadableSinglePost:o,isLastPageOfMultiPagePost:n,wordCount:i,estimatedReadTimeSeconds:s,readTimeThresholdPercent:r,minimumReadTimeSeconds:a}=e;if(!o||!n)return;const l=1e3*Math.max(a,s*r/100);let c=!1,h=!1,m=null,d=null,u=0,g=0;function p(){if(c&&h){try{globalThis._googlesitekit?.gtagEvent?.("read_article",{post_id:t,word_count:i,estimated_read_time_seconds:s})}catch(e){console.error("Site Kit: failed to send the read article event.",e)}f(),T(),globalThis.removeEventListener("blur",y),globalThis.removeEventListener("focus",y),globalThis.document.removeEventListener("visibilitychange",y)}}function f(){m?.disconnect(),m=null,globalThis.removeEventListener("scroll",v)}function b(){c=!0,f(),p()}function v(){(globalThis.scrollY+globalThis.innerHeight)/globalThis.document.documentElement.scrollHeight>=.9&&b()}function T(){null!==d&&(globalThis.clearTimeout(d),d=null,u+=globalThis.performance.now()-g)}function y(){"hidden"!==globalThis.document.visibilityState&&globalThis.document.hasFocus()?h||null!==d||(g=globalThis.performance.now(),d=globalThis.setTimeout(()=>{d=null,h=!0,p()},l-u)):T()}const w=function(){const e=globalThis.document.createTreeWalker(globalThis.document.body,globalThis.NodeFilter.SHOW_COMMENT);for(;e.nextNode();){const t=e.currentNode;if("[googlesitekit-end-of-content]"!==t.data)continue;let o=t.previousElementSibling;for(;o&&0===o.getClientRects().length;)o=o.previousElementSibling;return o||t.parentElement}return null}();w&&"function"==typeof globalThis.IntersectionObserver?(m=new globalThis.IntersectionObserver(e=>{e.some(e=>!e.isIntersecting&&e.rootBounds&&e.boundingClientRect.bottom<=e.rootBounds.top)&&b()},{rootMargin:"-100% 0px 1000000px 0px"}),"complete"===globalThis.document.readyState?m.observe(w):globalThis.addEventListener("load",()=>m?.observe(w),{once:!0})):(globalThis.addEventListener("scroll",v,{passive:!0}),v()),globalThis.addEventListener("blur",y),globalThis.addEventListener("focus",y),globalThis.document.addEventListener("visibilitychange",y),y()}(f),"Site Kit: failed to initialize read article tracking.")})();
(()=>{"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 i(e){return e&&"string"==typeof e?e.trim().toLowerCase():""}function l(e){const t=i(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 a(e){const t=i(e),n=t.replace(/\D/g,"");return t.startsWith("+")?`+${n}`:n}function s(e){const t=e.filter(({type:e})=>e===n).map(({value:e})=>i(e)).filter(Boolean);if(!t.length)return;const[r,...l]=1===t.length?t[0].split(" "):t;return{first_name:r,...l?.length>0?{last_name:l.join(" ")}:{}}}function o(t){return t.find(({type:t})=>t===e)?.value}function u(e){return e.find(({type:e})=>e===t)?.value}var m;(m=globalThis.jQuery)&&m(globalThis.document.body).on("wpformsAjaxSubmitSuccess",m=>{const c=globalThis._googlesitekit?.gtagUserData,f=c?function(m){if(!(m&&m instanceof HTMLFormElement))return;const c=new FormData(m);return function(e){const t=[["address",s(e)],["email",o(e)],["phone_number",u(e)]].filter(([,e])=>e);if(0!==t.length)return Object.fromEntries(t)}(Array.from(c.entries()).map(([s,o])=>{let u=m.querySelector(`[name='${s}']`);"hidden"===u?.type&&"hidden"!==u?.previousSibling?.type&&(u=u.previousSibling);const c=u?.type;return"hidden"===c||"submit"===c||"string"!=typeof o?null:function(s){let{type:o,name:u,value:m,label:c}=s||{};switch(o=i(o),u=i(u),m=i(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:l(m)};case"tel":return{type:t,value:a(m)}}return function(e){if(!e)return!1;const t=l(e);return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)}(m)||r[e].includes(u)||r[e].includes(c)?{type:e,value:l(m)}:r[t].includes(u)||r[t].includes(c)?{type:t,value:a(m)}:r[n].includes(u)||r[n].includes(c)?{type:n,value:i(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=a(e);if(!/^\+?\d{7,}$/.test(t))return!1;const n=/[\s\-()+.]/.test(e),r=e.trim().startsWith("+");return!(!n&&!r)}(m)?{type:t,value:a(m)}:null}({type:c,label:u?.id?m.querySelector(`label[for='${u?.id}']`)?.textContent:void 0,name:s,value:o})}).filter(e=>null!==e))}(m.target):null,g=m.target?.dataset?.formid;globalThis._googlesitekit?.gtagEvent?.("submit_lead_form",{googlesitekit_event_provider:"wpforms",...g?{googlesitekit_form_id:String(g)}:{},...f?{user_data:f}:{}})})})();