var WPFormsUtils=window.WPFormsUtils||(o=>{let a={triggerEvent(r,t,e=[]){t=new o.Event(t);return r.trigger(t,e),t},debounce(o,s,l){let a;return function(){let r=this,t=arguments;var e=l&&!a;clearTimeout(a),a=setTimeout(function(){a=null,l||o.apply(r,t)},s),e&&o.apply(r,t)}},cssColorsUtils:{isTransparentColor(r,t=.33){r=a.cssColorsUtils.getColorAsRGBArray(r);return Number(r?.[3])<=t},getColorAsRGBArray(r){if(!a.cssColorsUtils.isValidColor(r))return!1;r="transparent"===(r=r.replace(/^#/,"").replaceAll(" ",""))?"rgba(0,0,0,0)":r;let t;return r.match(/[0-9a-f]{6,8}$/gi)?(t=r.match(/\w\w/g).map(r=>parseInt(r,16)))[3]=t[3]||0===t[3]?(t[3]/255).toFixed(2):1:t=r.split("(")[1].split(")")[0].split(","),t},isValidColor(r){var t=(new Option).style;return t.color=r,""!==t.color},getContrastColor(r){var r=a.cssColorsUtils.getColorAsRGBArray(r),t=r.reduce((r,t)=>r+t,0);return Math.round(t/3*(r[3]??1))<150?"#ffffff":"#000000"},getColorWithOpacity(r,t){r=r.trim();var e=a.cssColorsUtils.getColorAsRGBArray(r);if(!e)return r;t=t&&0!==t.length?t.toString():"1";r=4===e.length?parseFloat(e[3]):1,t=parseFloat(t)*r;return`rgba(${e[0]},${e[1]},${e[2]},${t})`.replace(/\s+/g,"")},rgbaToHex(r){var t,e,o,s,l;return/^rgb/.test(r)?!!(s=a.cssColorsUtils.getColorAsRGBArray(r))&&(t=Number(s[0]),e=Number(s[1]),o=Number(s[2]),s=s[3]?Math.round(255*Number(s[3])):255,("#"+[(l=r=>r.toString(16).padStart(2,"0"))(t),l(e),l(o),s<255?l(s):""].join("")).toLowerCase()):r}}};return a})((document,window,jQuery));
var WPForms=window.WPForms||{};WPForms.Analytics=WPForms.Analytics||((s,o,i)=>{let n={config:{VISIBILITY_THRESHOLD:0,SESSION_ID_MAX_LENGTH:64,MOBILE_TAB_DEBOUNCE_MS:1e3,TRIGGER_TAB_SWITCH:1,TRIGGER_FORM_SUBMISSION:2,SUBMIT_ANALYTICS_INPUT_NAME:"wpforms[analytics]"},el:{},filters:{},actions:{},states:new Map,bootstrappedForms:new WeakSet,sessionId:"",init(){n.sessionId=n.generateSessionId(),n.el.$doc=i(s),n.attachGlobalTriggers(),n.attachPopupTriggers(),i(()=>n.bootstrapForms()),n.el.$doc.on("wpformsReady",()=>n.bootstrapForms())},sendBeacon(e){var t,s=o.wpforms_settings?.ajaxurl;s&&("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon?navigator.sendBeacon(s,e):((t=new XMLHttpRequest).open("POST",s,!0),t.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),t.send(e.toString())))},buildPayload(e){return n.applyFilters("payload",{page:e.currentPage,fields:[],viewDurationMs:0<e.viewStartedAt?Math.max(Date.now()-e.viewStartedAt,0):0},e)},sendTabSwitchSnapshot(e){var t,e="number"==typeof e?n.states.get(e):e;e&&!e.snapshotSent&&e.dirty&&n.applyFilters("shouldSend",!0,e)&&(t=n.buildPayload(e),t=JSON.stringify(t),n.doAction("beforeSnapshotSend",e),t=new URLSearchParams({action:"wpforms_analytics_snapshot",nonce:o.wpforms_settings?.nonce,form_id:String(e.formId),session_id:e.sessionId,trigger:String(n.config.TRIGGER_TAB_SWITCH),form_visible:e.hasBeenVisible?"1":"0",payload:o.wpforms_settings?.analytics_base64?btoa(t):t}),n.sendBeacon(t),e.snapshotSent=!0,e.dirty=!1,n.doAction("afterSnapshotSend",e))},attachGlobalTriggers(){s.addEventListener("visibilitychange",n.onVisibilityChange),o.addEventListener("beforeunload",n.onBeforeUnload)},attachPopupTriggers(){o.addEventListener("elementor/popup/show",n.onPopupShow),o.addEventListener("elementor/popup/hide",n.onPopupHide)},onPopupShow(e){n.bootstrapForms();e=e?.detail?.instance?.$element;e&&e.length&&e.find(".wpforms-form").each(function(){var e=n.states.get(Number.parseInt(i(this).data("formid"),10));e&&!e.hasBeenVisible&&(e.hasBeenVisible=!0,e.dirty=!0,e.viewStartedAt=Date.now(),n.doAction("formVisible",this,e))})},onPopupHide(e){e=e?.detail?.instance?.$element;e&&e.length&&e.find(".wpforms-form").each(function(){var e=Number.parseInt(i(this).data("formid"),10);e&&n.flush(e)})},onVisibilityChange(){var t=n.config.MOBILE_TAB_DEBOUNCE_MS;for(let e of n.states.values())"visible"===s.visibilityState?(clearTimeout(e._tabSwitchTimer),e._tabSwitchTimer=null,e.snapshotSent=!1):e.hasBeenVisible&&(0<t?e._tabSwitchTimer=setTimeout(()=>n.sendTabSwitchSnapshot(e),t):n.sendTabSwitchSnapshot(e))},onBeforeUnload(){for(var e of n.states.values())e.hasBeenVisible&&n.sendTabSwitchSnapshot(e)},addFilter(e,t){n.filters[e]??=[],n.filters[e].push(t)},addAction(e,t){n.actions[e]??=[],n.actions[e].push(t)},applyFilters(e,t,...s){for(var o of n.filters[e]??[])t=o(t,...s);return t},doAction(e,...t){for(var s of n.actions[e]??[])s(...t)},generateSessionId(){var e;return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():(e=()=>Math.random().toString(16).slice(2),(`${Date.now().toString(16)}-${e()}-`+e()).slice(0,n.config.SESSION_ID_MAX_LENGTH))},createState(e){var t={formId:e,sessionId:n.sessionId,hasBeenVisible:!1,currentPage:1,snapshotSent:!1,dirty:!1,viewStartedAt:0,_tabSwitchTimer:null};return n.applyFilters("stateDefaults",t,e)},getState(e){return n.states.get(e)},registerForm(e){var t,e=Number.parseInt(i(e).data("formid"),10);return e?n.states.has(e)?n.states.get(e):(t=n.createState(e),n.states.set(e,t),t):null},isComputedVisible(e){for(;e&&e!==s.body;){var t=o.getComputedStyle(e);if("none"===t.display||"hidden"===t.visibility||0===Number.parseFloat(t.opacity))return!1;e=e.parentElement}return!0},observeForm(s,o){let i=new IntersectionObserver(e=>{for(var t of e)t.isIntersecting&&n.isComputedVisible(t.target)&&(o.hasBeenVisible=!0,o.dirty=!0,o.viewStartedAt=Date.now(),n.doAction("formVisible",s,o),i.unobserve(t.target))},{threshold:n.config.VISIBILITY_THRESHOLD});i.observe(s)},bootstrapForms(){i(".wpforms-form").each(function(){var e=n.registerForm(this);e&&!n.bootstrappedForms.has(this)&&(n.bootstrappedForms.add(this),n.observeForm(this,e),n.attachSubmitListeners(this,e),n.doAction("init",this,e))})},injectSubmissionEnvelope(e,t){e=i(e),t={session_id:t.sessionId,trigger:n.config.TRIGGER_FORM_SUBMISSION,form_visible:t.hasBeenVisible?1:0,payload:n.buildPayload(t)},t=JSON.stringify(t),t=o.wpforms_settings?.analytics_base64?btoa(t):t;e.find(`input[name="${n.config.SUBMIT_ANALYTICS_INPUT_NAME}"]`).remove(),i('<input type="hidden">').attr("name",n.config.SUBMIT_ANALYTICS_INPUT_NAME).val(t).appendTo(e)},markSubmissionComplete(e){e.snapshotSent=!0,e.dirty=!1},attachSubmitListeners(e,t){i(e).on("wpformsBeforeFormSubmit",()=>{n.injectSubmissionEnvelope(e,t),n.markSubmissionComplete(t)}).on("wpformsAjaxSubmitSuccess",()=>n.markSubmissionComplete(t)).on("wpformsAjaxSubmitFailed wpformsAjaxSubmitError",()=>{t.snapshotSent=!1}).on("submit",()=>n.markSubmissionComplete(t))},flush(e){let t=n.states.get(e);t&&(n.sendTabSwitchSnapshot(t),t.hasBeenVisible=!1,t.dirty=!1,t.snapshotSent=!1,t.viewStartedAt=0,n.doAction("flush",t),i(`.wpforms-form[data-formid="${e}"]`).each(function(){n.observeForm(this,t)}))}};return n})(document,window,jQuery),WPForms.Analytics.init();
window.WPForms=window.WPForms||{},((e,r)=>{let t={noStateCountries:[],init(){r(e).on("load",t.onLoad),r(document).on("wpformsRepeaterFieldCloneCreated",t.setChangeHandlers)},onLoad(){t.noStateCountries=wpforms_settings?.address_field?.list_countries_without_states||[],t.noStateCountries.length&&t.setChangeHandlers()},setChangeHandlers(){r(".wpforms-field-address").each(function(){var e=r(this).find("select.wpforms-field-address-country");e.length&&(t.handleCountryChange(e),e.off("change").on("change",function(){t.handleCountryChange(this)}))})},handleCountryChange(e){var e=r(e),s=e.closest(".wpforms-field").find(".wpforms-field-address-state"),d=s.closest(".wpforms-field-row");d.length&&(e=e.val(),t.handleStateInput(s,d,e))},handleStateInput(e,s,d){t.noStateCountries.includes(d)?(e.val("").prop("disabled",!0).prop("required",!1).on("change",function(){r(this).val("")}),s.addClass("wpforms-without-state")):(e.prop("disabled",!1).prop("required",s.find(".wpforms-first input").prop("required")).off("change"),s.removeClass("wpforms-without-state"))}},d={requiredAddressFields:["addressLine1","adminArea2","countryCode","postalCode"],getFieldValue(e){var s,d;return e.hasClass("wpforms-field-address")?(s=e.data("field-id"),e=e.closest(".wpforms-form").data("formid"),d=r(`#wpforms-${e}-field_${s}-country`),{addressLine1:r(`#wpforms-${e}-field_`+s).val(),addressLine2:r(`#wpforms-${e}-field_${s}-address2`).val(),adminArea2:r(`#wpforms-${e}-field_${s}-city`).val(),adminArea1:r(`#wpforms-${e}-field_${s}-state`).val(),countryCode:d.length?d.val():"US",postalCode:r(`#wpforms-${e}-field_${s}-postal`).val()}):{}},isValidAddress(e){let s=e||{};return!(!d.requiredAddressFields.every(e=>!!s?.[e])||(e=s.countryCode||"")&&!t.noStateCountries.includes(e)&&!s.adminArea1)}};t.init(),e.WPForms.Address=d})(window,jQuery);