"use strict";(()=>{var v=Object.defineProperty,M=Object.defineProperties;var T=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var F=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var E=(o,e,t)=>e in o?v(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,d=(o,e)=>{for(var t in e||(e={}))F.call(e,t)&&E(o,t,e[t]);if(h)for(var t of h(e))H.call(e,t)&&E(o,t,e[t]);return o},L=(o,e)=>M(o,T(e));var p=(o,e,t)=>new Promise((n,i)=>{var m=r=>{try{a(t.next(r))}catch(c){i(c)}},u=r=>{try{a(t.throw(r))}catch(c){i(c)}},a=r=>r.done?n(r.value):Promise.resolve(r.value).then(m,u);a((t=t.apply(o,e)).next())});const f=new WeakMap;function W(o){var t;const e=o.dataset.cfWidgetId;e&&((t=window.captchafox)==null||t.reset(e))}function k(o){const e=document.querySelector(o);e&&W(e)}function x(){document.querySelectorAll("form, .gform_editor").forEach(e=>p(this,null,function*(){const[t]=e.querySelectorAll('[type="submit"], .forminator-button-submit'),n=e.querySelector(".captchafox"),i=n==null?void 0:n.hasChildNodes(),m=(n==null?void 0:n.dataset.cfRendering)==="1";if(!n||!window.captchafox||i||m)return;n.dataset.cfRendering="1";const u=n.dataset.mode,a=n.dataset.sitekey,r=n.dataset.theme,c=n.dataset.lang,w=n.dataset.start;let l;try{l=yield window.captchafox.render(n,L(d(d(d(d({sitekey:a!=null?a:""},u&&{mode:u}),c&&{lang:c}),r&&{theme:r}),w&&{start:w}),{onError:s=>console.error(s)}))}catch(s){console.error(s);return}finally{delete n.dataset.cfRendering}if(e.dataset.cfWidgetId=l,n.dataset.mode==="hidden"&&t){const s=f.get(t);s&&t.removeEventListener("click",s,!0);const g=y=>q(y,e,l,t);f.set(t,g),t.addEventListener("click",g,!0)}}))}function q(o,e,t,n){return p(this,null,function*(){if(o.preventDefault(),o.stopPropagation(),!(!e||!window.captchafox)){if(yield window.captchafox.execute(t),n.classList.contains("ninja-forms-field")){const i=f.get(n);i&&(f.delete(n),n.removeEventListener("click",i,!0)),n.click();return}if(e.requestSubmit){e.requestSubmit(n);return}e.submit()}})}window.captchaFoxWPReset=k;window.captchaFoxOnLoad=x;function R(){var t;if(document.getElementById("captchafox-api"))return;const o=(t=window.captchaFoxConfig)==null?void 0:t.api;if(!o)return;const e=document.createElement("script");e.id="captchafox-api",e.src=o,e.async=!0,document.head.appendChild(e)}function S(){var t;if(((t=window.captchaFoxConfig)==null?void 0:t.delay)!=="1"||window.captchafox)return;const o=["mousemove","mousedown","keydown","touchstart","focusin"],e=()=>{o.forEach(n=>window.removeEventListener(n,e,!0)),R()};o.forEach(n=>window.addEventListener(n,e,{capture:!0,passive:!0}))}S();window.captchafox&&x();})();