index of
/
home
/
thefkyzp
/
hulmvisaadvisor.com
/
wp-content
/
plugins
/
suretriggers
/
app
/
build
/
File: /home/thefkyzp/hulmvisaadvisor.com/wp-content/plugins/suretriggers/app/build/main.js
!function(){var e,t,r,n={293:function(e,t,r){const n=r(196),a=n.forwardRef((function({title:e,titleId:t,...r},a){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:a,"aria-labelledby":t},r),e?n.createElement("title",{id:t},e):null,n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3"}))}));e.exports=a},664:function(e){let t=new Proxy({},{get:(e,t)=>{if("__esModule"===t)return{};throw new Error(`You're trying to import \`@heroicons/react/outline/${t}\` from Heroicons v1 but have installed Heroicons v2. Install \`@heroicons/react@v1\` to resolve this error.`)}});e.exports=t},341:function(e,t,r){"use strict";var n=window.wp.element,a=r(196),o=r.t(a,2),i=r.n(a),s=window.ReactDOM,l=r.n(s);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==u(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===u(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d,f,m,p,g,v=["type"];function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var b,w,E={currentPage:"home",initials:[],siteContentAccessKey:(null===(d=sureTriggerData)||void 0===d||null===(f=d.siteContent)||void 0===f?void 0:f.accessKey)||"",suretriggercontentProjectID:(null===(m=sureTriggerData)||void 0===m||null===(p=m.siteContent)||void 0===p?void 0:p.projectID)||"",enabledIntegrations:null===(g=sureTriggerData)||void 0===g?void 0:g.enabledIntegrations,saveNotification:!1,projects:sureTriggerData.projects||[],notificationMessage:""},x=(0,a.createContext)(),O=function(){return(0,a.useContext)(x)};function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}(w=b||(b={})).Pop="POP",w.Push="PUSH",w.Replace="REPLACE";const T="popstate";function k(e,t){if(!1===e||null==e)throw new Error(t)}function C(e,t){return{usr:e.state,key:e.key,idx:t}}function N(e,t,r,n){return void 0===r&&(r=null),S({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?D(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function P(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&"?"!==r&&(t+="?"===r.charAt(0)?r:"?"+r),n&&"#"!==n&&(t+="#"===n.charAt(0)?n:"#"+n),t}function D(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var A;function _(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(A||(A={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const L=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",F=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";class j extends Error{}const R=["post","put","patch","delete"],I=(new Set(R),["get",...R]);function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},M.apply(this,arguments)}new Set(I),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,Symbol("deferred");const V=a.createContext(null),U=a.createContext(null),B=a.createContext(null),H=a.createContext({outlet:null,matches:[],isDataRoute:!1});function q(){return null!=a.useContext(B)}function W(e){a.useContext(U).static||a.useLayoutEffect(e)}function $(){let{isDataRoute:e}=a.useContext(H);return e?function(){let{router:e}=function(e){let t=a.useContext(V);return t||k(!1),t}(G.UseNavigateStable),t=function(e){let t=function(e){let t=a.useContext(H);return t||k(!1),t}(),r=t.matches[t.matches.length-1];return r.route.id||k(!1),r.route.id}(Y.UseNavigateStable),r=a.useRef(!1);return W((()=>{r.current=!0})),a.useCallback((function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,M({fromRouteId:t},a)))}),[e,t])}():function(){q()||k(!1);let{basename:e,navigator:t}=a.useContext(U),{matches:r}=a.useContext(H),{pathname:n}=(q()||k(!1),a.useContext(B).location),o=JSON.stringify(function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(r).map((e=>e.pathnameBase))),i=a.useRef(!1);return W((()=>{i.current=!0})),a.useCallback((function(r,a){if(void 0===a&&(a={}),!i.current)return;if("number"==typeof r)return void t.go(r);let s=function(e,t,r,n){let a;void 0===n&&(n=!1),"string"==typeof e?a=D(e):(a=S({},e),k(!a.pathname||!a.pathname.includes("?"),_("?","pathname","search",a)),k(!a.pathname||!a.pathname.includes("#"),_("#","pathname","hash",a)),k(!a.search||!a.search.includes("#"),_("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(n||null==s)o=r;else{let e=t.length-1;if(s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:a=""}="string"==typeof e?D(e):e,o=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:o,search:L(n),hash:F(a)}}(a,o),u=s&&"/"!==s&&s.endsWith("/"),c=(i||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!u&&!c||(l.pathname+="/"),l}(r,JSON.parse(o),n,"path"===a.relative);"/"!==e&&(s.pathname="/"===s.pathname?e:[e,s.pathname].join("/").replace(/\/\/+/g,"/")),(a.replace?t.replace:t.push)(s,a.state,a)}),[e,t,o,n])}()}class z extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error||t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error?React.createElement(H.Provider,{value:this.props.routeContext},React.createElement(RouteErrorContext.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}var G,Y,K,Q,J;function X(e){let{basename:t="/",children:r=null,location:n,navigationType:o=b.Pop,navigator:i,static:s=!1}=e;q()&&k(!1);let l=t.replace(/^\/*/,"/"),u=a.useMemo((()=>({basename:l,navigator:i,static:s})),[l,i,s]);"string"==typeof n&&(n=D(n));let{pathname:c="/",search:d="",hash:f="",state:m=null,key:p="default"}=n,g=a.useMemo((()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}(c,l);return null==e?null:{location:{pathname:e,search:d,hash:f,state:m,key:p},navigationType:o}}),[l,c,d,f,m,p,o]);return null==g?null:a.createElement(U.Provider,{value:u},a.createElement(B.Provider,{children:r,value:g}))}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(G||(G={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(Y||(Y={})),function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(K||(K={})),new Promise((()=>{}));class Z extends a.Component{constructor(e){super(e),this.state={error:null}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("<Await> caught the following error during render",e,t)}render(){let{children:e,errorElement:t,resolve:r}=this.props,n=null,a=K.pending;if(r instanceof Promise)if(this.state.error){K.error;let e=this.state.error;Promise.reject().catch((()=>{})),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_error",{get:()=>e})}else r._tracked?void 0!==n._error?K.error:void 0!==n._data?K.success:K.pending:(K.pending,Object.defineProperty(r,"_tracked",{get:()=>!0}),r.then((e=>Object.defineProperty(r,"_data",{get:()=>e})),(e=>Object.defineProperty(r,"_error",{get:()=>e}))));else K.success,Promise.resolve(),Object.defineProperty(n,"_tracked",{get:()=>!0}),Object.defineProperty(n,"_data",{get:()=>r});if(a===K.error&&n._error instanceof AbortedDeferredError)throw neverSettledPromise;if(a===K.error&&!t)throw n._error;if(a===K.error)return React.createElement(AwaitContext.Provider,{value:n,children:t});if(a===K.success)return React.createElement(AwaitContext.Provider,{value:n,children:e});throw n}}function ee(e){let{basename:t,children:r,window:n}=e,o=a.useRef();var i;null==o.current&&(o.current=(void 0===(i={window:n,v5Compat:!0})&&(i={}),function(e,t,r,n){void 0===n&&(n={});let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,s=b.Pop,l=null,u=c();function c(){return(i.state||{idx:null}).idx}function d(){s=b.Pop;let e=c(),t=null==e?null:e-u;u=e,l&&l({action:s,location:m.location,delta:t})}function f(e){let t="null"!==a.location.origin?a.location.origin:a.location.href,r="string"==typeof e?e:P(e);return k(t,"No window.location.(origin|href) available to create URL for href: "+r),new URL(r,t)}null==u&&(u=0,i.replaceState(S({},i.state,{idx:u}),""));let m={get action(){return s},get location(){return e(a,i)},listen(e){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(T,d),l=e,()=>{a.removeEventListener(T,d),l=null}},createHref(e){return t(a,e)},createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=b.Push;let n=N(m.location,e,t);r&&r(n,e),u=c()+1;let d=C(n,u),f=m.createHref(n);try{i.pushState(d,"",f)}catch(e){a.location.assign(f)}o&&l&&l({action:s,location:m.location,delta:1})},replace:function(e,t){s=b.Replace;let n=N(m.location,e,t);r&&r(n,e),u=c();let a=C(n,u),d=m.createHref(n);i.replaceState(a,"",d),o&&l&&l({action:s,location:m.location,delta:0})},go(e){return i.go(e)}};return m}((function(e,t){let{pathname:r,search:n,hash:a}=e.location;return N("",{pathname:r,search:n,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:P(t)}),null,i)));let s=o.current,[l,u]=a.useState({action:s.action,location:s.location});return a.useLayoutEffect((()=>s.listen(u)),[s]),a.createElement(X,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s})}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,_x,o,i=[],_n=!0,s=!1;try{if(_x=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;_n=!1}else for(;!(_n=(n=_x.call(r)).done)&&(i.push(n.value),i.length!==t);_n=!0);}catch(e){s=!0,a=e}finally{try{if(!_n&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(s)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return te(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?te(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ne(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ne(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"}(Q||(Q={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(J||(J={}));var ae=function(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ne(e))&&(n&&(n+=" "),n+=t);return n};function oe(){return oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oe.apply(this,arguments)}function ie(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}function se(e){return"number"==typeof e&&!isNaN(e)}function le(e){return"boolean"==typeof e}function ue(e){return"string"==typeof e}function ce(e){return"function"==typeof e}function de(e){return ue(e)||ce(e)?e:null}function fe(e){return 0===e||e}var me=!("undefined"==typeof window||!window.document||!window.document.createElement);function pe(e){return(0,a.isValidElement)(e)||ue(e)||ce(e)||se(e)}var ge={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},ve={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function he(e){var t=e.enter,r=e.exit,n=e.appendPosition,o=void 0!==n&&n,s=e.collapse,l=void 0===s||s,u=e.collapseDuration,c=void 0===u?300:u;return function(e){var n=e.children,s=e.position,u=e.preventExitTransition,d=e.done,f=e.nodeRef,m=e.isIn,p=o?t+"--"+s:t,g=o?r+"--"+s:r,v=(0,a.useRef)(),h=(0,a.useRef)(0);function y(e){if(e.target===f.current){var t=f.current;t.dispatchEvent(new Event("d")),t.removeEventListener("animationend",y),t.removeEventListener("animationcancel",y),0===h.current&&(t.className=v.current)}}function b(){var e=f.current;e.removeEventListener("animationend",b),l?function(e,t,r){void 0===r&&(r=300);var n=e.scrollHeight,a=e.style;requestAnimationFrame((function(){a.minHeight="initial",a.height=n+"px",a.transition="all "+r+"ms",requestAnimationFrame((function(){a.height="0",a.padding="0",a.margin="0",setTimeout(t,r)}))}))}(e,d,c):d()}return(0,a.useLayoutEffect)((function(){var e;e=f.current,v.current=e.className,e.className+=" "+p,e.addEventListener("animationend",y),e.addEventListener("animationcancel",y)}),[]),(0,a.useEffect)((function(){m||(u?b():function(){h.current=1;var e=f.current;e.className+=" "+g,e.addEventListener("animationend",b)}())}),[m]),i().createElement(i().Fragment,null,n)}}var ye={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var r=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,r),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];this.list.has(e)&&this.list.get(e).forEach((function(r){var a=setTimeout((function(){r.apply(void 0,n)}),0);t.emitQueue.has(e)||t.emitQueue.set(e,[]),t.emitQueue.get(e).push(a)}))}},be=["delay","staleId"];function we(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Ee(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function xe(e){var t=e.closeToast,r=e.theme,n=e.ariaLabel,o=void 0===n?"close":n;return(0,a.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+r,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":o},(0,a.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},(0,a.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Oe(e){var t,r,n=e.delay,o=e.isRunning,i=e.closeToast,s=e.type,l=e.hide,u=e.className,c=e.style,d=e.controlledProgress,f=e.progress,m=e.rtl,p=e.isIn,g=e.theme,v=oe({},c,{animationDuration:n+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(v.transform="scaleX("+f+")");var h=ae("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+g,"Toastify__progress-bar--"+s,((t={})["Toastify__progress-bar--rtl"]=m,t)),y=ce(u)?u({rtl:m,type:s,defaultClassName:h}):ae(h,u),b=((r={})[d&&f>=1?"onTransitionEnd":"onAnimationEnd"]=d&&f<1?null:function(){p&&i()},r);return(0,a.createElement)("div",Object.assign({role:"progressbar","aria-hidden":l?"true":"false","aria-label":"notification timer",className:y,style:v},b))}Oe.defaultProps={type:ve.DEFAULT,hide:!1};var Se=["theme","type"],Te=function(e){var t=e.theme,r=e.type,n=ie(e,Se);return(0,a.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-"+r+")"},n))},ke={info:function(e){return(0,a.createElement)(Te,Object.assign({},e),(0,a.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return(0,a.createElement)(Te,Object.assign({},e),(0,a.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return(0,a.createElement)(Te,Object.assign({},e),(0,a.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return(0,a.createElement)(Te,Object.assign({},e),(0,a.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return(0,a.createElement)("div",{className:"Toastify__spinner"})}},Ce=function(e){var t,r,n=function(e){var t=(0,a.useState)(!1),r=t[0],n=t[1],o=(0,a.useState)(!1),i=o[0],s=o[1],l=(0,a.useRef)(null),u=(0,a.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,c=(0,a.useRef)(e),d=e.autoClose,f=e.pauseOnHover,m=e.closeToast,p=e.onClick,g=e.closeOnClick;function v(t){if(e.draggable){u.didMove=!1,document.addEventListener("mousemove",w),document.addEventListener("mouseup",E),document.addEventListener("touchmove",w),document.addEventListener("touchend",E);var r=l.current;u.canCloseOnClick=!0,u.canDrag=!0,u.boundingRect=r.getBoundingClientRect(),r.style.transition="",u.x=we(t.nativeEvent),u.y=Ee(t.nativeEvent),"x"===e.draggableDirection?(u.start=u.x,u.removalDistance=r.offsetWidth*(e.draggablePercent/100)):(u.start=u.y,u.removalDistance=r.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(){if(u.boundingRect){var t=u.boundingRect,r=t.top,n=t.bottom,a=t.left,o=t.right;e.pauseOnHover&&u.x>=a&&u.x<=o&&u.y>=r&&u.y<=n?b():y()}}function y(){n(!0)}function b(){n(!1)}function w(t){var n=l.current;u.canDrag&&n&&(u.didMove=!0,r&&b(),u.x=we(t),u.y=Ee(t),"x"===e.draggableDirection?u.delta=u.x-u.start:u.delta=u.y-u.start,u.start!==u.x&&(u.canCloseOnClick=!1),n.style.transform="translate"+e.draggableDirection+"("+u.delta+"px)",n.style.opacity=""+(1-Math.abs(u.delta/u.removalDistance)))}function E(){document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",E),document.removeEventListener("touchmove",w),document.removeEventListener("touchend",E);var t=l.current;if(u.canDrag&&u.didMove&&t){if(u.canDrag=!1,Math.abs(u.delta)>u.removalDistance)return s(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}(0,a.useEffect)((function(){c.current=e})),(0,a.useEffect)((function(){return l.current&&l.current.addEventListener("d",y,{once:!0}),ce(e.onOpen)&&e.onOpen((0,a.isValidElement)(e.children)&&e.children.props),function(){var e=c.current;ce(e.onClose)&&e.onClose((0,a.isValidElement)(e.children)&&e.children.props)}}),[]),(0,a.useEffect)((function(){return e.pauseOnFocusLoss&&(document.hasFocus()||b(),window.addEventListener("focus",y),window.addEventListener("blur",b)),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",y),window.removeEventListener("blur",b))}}),[e.pauseOnFocusLoss]);var x={onMouseDown:v,onTouchStart:v,onMouseUp:h,onTouchEnd:h};return d&&f&&(x.onMouseEnter=b,x.onMouseLeave=y),g&&(x.onClick=function(e){p&&p(e),u.canCloseOnClick&&m()}),{playToast:y,pauseToast:b,isRunning:r,preventExitTransition:i,toastRef:l,eventHandlers:x}}(e),o=n.isRunning,i=n.preventExitTransition,s=n.toastRef,l=n.eventHandlers,u=e.closeButton,c=e.children,d=e.autoClose,f=e.onClick,m=e.type,p=e.hideProgressBar,g=e.closeToast,v=e.transition,h=e.position,y=e.className,b=e.style,w=e.bodyClassName,E=e.bodyStyle,x=e.progressClassName,O=e.progressStyle,S=e.updateId,T=e.role,k=e.progress,C=e.rtl,N=e.toastId,P=e.deleteToast,D=e.isIn,A=e.isLoading,_=e.icon,L=e.theme,F=ae("Toastify__toast","Toastify__toast-theme--"+L,"Toastify__toast--"+m,((t={})["Toastify__toast--rtl"]=C,t)),j=ce(y)?y({rtl:C,position:h,type:m,defaultClassName:F}):ae(F,y),R=!!k,I=ke[m],M={theme:L,type:m},V=I&&I(M);return!1===_?V=void 0:ce(_)?V=_(M):(0,a.isValidElement)(_)?V=(0,a.cloneElement)(_,M):ue(_)?V=_:A&&(V=ke.spinner()),(0,a.createElement)(v,{isIn:D,done:P,position:h,preventExitTransition:i,nodeRef:s},(0,a.createElement)("div",Object.assign({id:N,onClick:f,className:j},l,{style:b,ref:s}),(0,a.createElement)("div",Object.assign({},D&&{role:T},{className:ce(w)?w({type:m}):ae("Toastify__toast-body",w),style:E}),V&&(0,a.createElement)("div",{className:ae("Toastify__toast-icon",(r={},r["Toastify--animate-icon Toastify__zoom-enter"]=!A,r))},V),(0,a.createElement)("div",null,c)),function(e){if(e){var t={closeToast:g,type:m,theme:L};return ce(e)?e(t):(0,a.isValidElement)(e)?(0,a.cloneElement)(e,t):void 0}}(u),(d||R)&&(0,a.createElement)(Oe,Object.assign({},S&&!R?{key:"pb-"+S}:{},{rtl:C,theme:L,delay:d,isRunning:o,isIn:D,closeToast:g,hide:p,type:m,style:O,className:x,controlledProgress:R,progress:k}))))},Ne=he({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),Pe=function(e){var t=function(e){var t=(0,a.useReducer)((function(e){return e+1}),0)[1],r=(0,a.useState)([]),n=r[0],o=r[1],i=(0,a.useRef)(null),s=(0,a.useRef)(new Map).current,l=function(e){return-1!==n.indexOf(e)},u=(0,a.useRef)({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:l,getToast:function(e){return s.get(e)}}).current;function c(e){var t=e.containerId;!u.props.limit||t&&u.containerId!==t||(u.count-=u.queue.length,u.queue=[])}function d(e){o((function(t){return fe(e)?t.filter((function(t){return t!==e})):[]}))}function f(){var e=u.queue.shift();p(e.toastContent,e.toastProps,e.staleId)}function m(e,r){var n=r.delay,o=r.staleId,l=ie(r,be);if(pe(e)&&!function(e){return!i.current||u.props.enableMultiContainer&&e.containerId!==u.props.containerId||s.has(e.toastId)&&null==e.updateId}(l)){var c=l.toastId,m=l.updateId,g=l.data,v=u.props,h=function(){return d(c)},y=null==m;y&&u.count++;var b,w,E={toastId:c,updateId:m,isLoading:l.isLoading,theme:l.theme||v.theme,icon:null!=l.icon?l.icon:v.icon,isIn:!1,key:l.key||u.toastKey++,type:l.type,closeToast:h,closeButton:l.closeButton,rtl:v.rtl,position:l.position||v.position,transition:l.transition||v.transition,className:de(l.className||v.toastClassName),bodyClassName:de(l.bodyClassName||v.bodyClassName),style:l.style||v.toastStyle,bodyStyle:l.bodyStyle||v.bodyStyle,onClick:l.onClick||v.onClick,pauseOnHover:le(l.pauseOnHover)?l.pauseOnHover:v.pauseOnHover,pauseOnFocusLoss:le(l.pauseOnFocusLoss)?l.pauseOnFocusLoss:v.pauseOnFocusLoss,draggable:le(l.draggable)?l.draggable:v.draggable,draggablePercent:l.draggablePercent||v.draggablePercent,draggableDirection:l.draggableDirection||v.draggableDirection,closeOnClick:le(l.closeOnClick)?l.closeOnClick:v.closeOnClick,progressClassName:de(l.progressClassName||v.progressClassName),progressStyle:l.progressStyle||v.progressStyle,autoClose:!l.isLoading&&(b=l.autoClose,w=v.autoClose,!1===b||se(b)&&b>0?b:w),hideProgressBar:le(l.hideProgressBar)?l.hideProgressBar:v.hideProgressBar,progress:l.progress,role:l.role||v.role,deleteToast:function(){s.delete(c);var e=u.queue.length;if(u.count=fe(c)?u.count-1:u.count-u.displayedToast,u.count<0&&(u.count=0),e>0){var r=fe(c)?1:u.props.limit;if(1===e||1===r)u.displayedToast++,f();else{var n=r>e?e:r;u.displayedToast=n;for(var a=0;a<n;a++)f()}}else t()}};ce(l.onOpen)&&(E.onOpen=l.onOpen),ce(l.onClose)&&(E.onClose=l.onClose),E.closeButton=v.closeButton,!1===l.closeButton||pe(l.closeButton)?E.closeButton=l.closeButton:!0===l.closeButton&&(E.closeButton=!pe(v.closeButton)||v.closeButton);var x=e;(0,a.isValidElement)(e)&&!ue(e.type)?x=(0,a.cloneElement)(e,{closeToast:h,toastProps:E,data:g}):ce(e)&&(x=e({closeToast:h,toastProps:E,data:g})),v.limit&&v.limit>0&&u.count>v.limit&&y?u.queue.push({toastContent:x,toastProps:E,staleId:o}):se(n)&&n>0?setTimeout((function(){p(x,E,o)}),n):p(x,E,o)}}function p(e,t,r){var n=t.toastId;r&&s.delete(r),s.set(n,{content:e,props:t}),o((function(e){return[].concat(e,[n]).filter((function(e){return e!==r}))}))}return(0,a.useEffect)((function(){return u.containerId=e.containerId,ye.cancelEmit(3).on(0,m).on(1,(function(e){return i.current&&d(e)})).on(5,c).emit(2,u),function(){return ye.emit(3,u)}}),[]),(0,a.useEffect)((function(){u.isToastActive=l,u.displayedToast=n.length,ye.emit(4,n.length,e.containerId)}),[n]),(0,a.useEffect)((function(){u.props=e})),{getToastToRender:function(t){var r=new Map,n=Array.from(s.values());return e.newestOnTop&&n.reverse(),n.forEach((function(e){var t=e.props.position;r.has(t)||r.set(t,[]),r.get(t).push(e)})),Array.from(r,(function(e){return t(e[0],e[1])}))},containerRef:i,isToastActive:l}}(e),r=t.getToastToRender,n=t.containerRef,o=t.isToastActive,i=e.className,s=e.style,l=e.rtl,u=e.containerId;function c(e){var t,r=ae("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return ce(i)?i({position:e,rtl:l,defaultClassName:r}):ae(r,de(i))}return(0,a.createElement)("div",{ref:n,className:"Toastify",id:u},r((function(e,t){var r=t.length?oe({},s):oe({},s,{pointerEvents:"none"});return(0,a.createElement)("div",{className:c(e),style:r,key:"container-"+e},t.map((function(e){var t=e.content,r=e.props;return(0,a.createElement)(Ce,Object.assign({},r,{isIn:o(r.toastId),key:"toast-"+r.key,closeButton:!0===r.closeButton?xe:r.closeButton}),t)})))})))};Pe.defaultProps={position:ge.TOP_RIGHT,transition:Ne,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:xe,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var De,Ae,_e,Le=new Map,Fe=[],je=!1;function Re(){return Math.random().toString(36).substring(2,9)}function Ie(e){return e&&(ue(e.toastId)||se(e.toastId))?e.toastId:Re()}function Me(e,t){return Le.size>0?ye.emit(0,e,t):(Fe.push({content:e,options:t}),je&&me&&(je=!1,Ae=document.createElement("div"),document.body.appendChild(Ae),(0,s.render)((0,a.createElement)(Pe,Object.assign({},_e)),Ae))),t.toastId}function Ve(e,t){return oe({},t,{type:t&&t.type||e,toastId:Ie(t)})}function Ue(e){return function(t,r){return Me(t,Ve(e,r))}}function Be(e,t){return Me(e,Ve(ve.DEFAULT,t))}Be.loading=function(e,t){return Me(e,Ve(ve.DEFAULT,oe({isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1},t)))},Be.promise=function(e,t,r){var n,a=t.pending,o=t.error,i=t.success;a&&(n=ue(a)?Be.loading(a,r):Be.loading(a.render,oe({},r,a)));var s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=function(e,t,a){if(null!=t){var o=oe({type:e},s,r,{data:a}),i=ue(t)?{render:t}:t;return n?Be.update(n,oe({},o,i)):Be(i.render,oe({},o,i)),a}Be.dismiss(n)},u=ce(e)?e():e;return u.then((function(e){return l("success",i,e)})).catch((function(e){return l("error",o,e)})),u},Be.success=Ue(ve.SUCCESS),Be.info=Ue(ve.INFO),Be.error=Ue(ve.ERROR),Be.warning=Ue(ve.WARNING),Be.warn=Be.warning,Be.dark=function(e,t){return Me(e,Ve(ve.DEFAULT,oe({theme:"dark"},t)))},Be.dismiss=function(e){return ye.emit(1,e)},Be.clearWaitingQueue=function(e){return void 0===e&&(e={}),ye.emit(5,e)},Be.isActive=function(e){var t=!1;return Le.forEach((function(r){r.isToastActive&&r.isToastActive(e)&&(t=!0)})),t},Be.update=function(e,t){void 0===t&&(t={}),setTimeout((function(){var r=function(e,t){var r=t.containerId,n=Le.get(r||De);return n?n.getToast(e):null}(e,t);if(r){var n=r.props,a=r.content,o=oe({},n,t,{toastId:t.toastId||e,updateId:Re()});o.toastId!==e&&(o.staleId=e);var i=o.render||a;delete o.render,Me(i,o)}}),0)},Be.done=function(e){Be.update(e,{progress:1})},Be.onChange=function(e){return ce(e)&&ye.on(4,e),function(){ce(e)&&ye.off(4,e)}},Be.configure=function(e){void 0===e&&(e={}),je=!0,_e=e},Be.POSITION=ge,Be.TYPE=ve,ye.on(2,(function(e){De=e.containerId||e,Le.set(De,e),Fe.forEach((function(e){ye.emit(0,e.content,e.options)})),Fe=[]})).on(3,(function(e){Le.delete(e.containerId||e),0===Le.size&&ye.off(0).off(1).off(5),me&&Ae&&document.body.removeChild(Ae)}));var He=window.wp.apiFetch,qe=r.n(He),We=window.wp.i18n;function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ze=function(){var e=$(),t=O(),r=re(t,2),o=(r[0].notificationMessage,r[1]),i=function(){var e=re((0,a.useState)(!1),2),t=e[0],r=e[1];return(0,a.useEffect)((function(){var e=document.documentElement.getAttribute("dir");r("rtl"===e)}),[]),t}();(0,a.useEffect)((function(){var t=new URLSearchParams(window.location.search),r=t.get("message-data")||"";r&&o({type:"set",saveNotification:!0,notificationMessage:r});var n=function(e,t){var r,n=[],a=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return $e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$e(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(a.s();!(r=a.n()).done;){var o=re(r.value,2),i=o[0],s=o[1];if("page"===i){var l="".concat(i,"=").concat(s);n.push(l)}}}catch(e){a.e(e)}finally{a.f()}return n.toString()}(0,t);e(window.location.pathname+"?"+n)}),[]);var s=sureTriggerData.siteContent,l=s.connectUrl,u=s.connectNonce,c=s.siteUrl,d=s.siteTitle,f=s.sourceType;return window.addEventListener("message",(function(e){var t,r,n,a,o,i,s;"changeAccount"===(null===(t=e.data)||void 0===t?void 0:t.playload)&&(!1,(o=new URLSearchParams).set("url",c),o.set("redirect",window.location.href),o.set("connectNonce",u),o.set("sc-authorize",!0),o.set("site-title",d),o.set("source_type",f),window.open("".concat(l,"?").concat(o.toString()),"_self")),"accountDisconnect"===(null===(r=e.data)||void 0===r?void 0:r.playload)&&(i=qe()({method:"POST",headers:{"ST-Authorization":"Bearer "+sureTriggerData.siteContent.accessKey},data:{testData:"TestData"},path:sureTriggerData.apiSlug+"/connection/disconnect"}).then((function(e){Be.dismiss(),e.success?(Be.success("Connection disconnected",{delay:650}),location.reload()):Be.error("Request was not success",{delay:650})})),Be.promise(i,{pending:(0,We.__)("Disconnecting","suretriggers"),error:(0,We.__)("Something went wrong! please try again later","suretriggers")})),"resetURL"===(null===(n=e.data)||void 0===n?void 0:n.playload)&&(window.location=null===(s=e.data)||void 0===s?void 0:s.resetURL),"windowReload"===(null===(a=e.data)||void 0===a?void 0:a.playload)&&location.reload()}),!1),(0,n.createElement)("div",null,(0,n.createElement)("iframe",{id:i?"st-iframe-rtl":"st-iframe",title:"SAAS Dashboard",name:"saas_dashboard",allow:"clipboard-write",frameborder:"0",src:"".concat(sureTriggerData.stSaasURL,"?path=dashboard&st-code=").concat(t[0].siteContentAccessKey,"&base_url=").concat(sureTriggerData.siteContent.siteUrl,"&reset_url=").concat(sureTriggerData.siteContent.resetUrl)}),(0,n.createElement)(Pe,{position:"bottom-right"}))},Ge=function(){var e=sureTriggerData.siteContent,t=e.connectUrl,r=e.connectNonce,n=e.siteUrl,a=e.siteTitle,o=e.sourceType,i=new URLSearchParams;i.set("url",n),i.set("redirect",window.location.href),i.set("connectNonce",r),i.set("sc-authorize",!0),i.set("site-title",a),i.set("source_type",o),window.open("".concat(t,"?").concat(i.toString()),"_self")},Ye=function(e){return new URL(window.location.href).searchParams.get(e)},Ke=r(293),Qe=function(){return(0,n.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/AutomateRepetiveTasks.svg"),alt:"SureTriggers"})},Je=function(){return(0,n.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/SaveTimeMoney.svg"),alt:"SureTriggers"})},Xe=function(){return(0,n.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/manage.svg"),alt:"SureTriggers"})},Ze=function(){return(0,n.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/drag.svg"),alt:"SureTriggers"})},et=function(){return(0,n.createElement)("img",{className:"block h-7 w-7 mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/increase.svg"),alt:"SureTriggers"})},tt=function(){return(0,n.createElement)("img",{className:"block h-7 w-auto mx-auto",src:"".concat(sureTriggerData.stPluginURL,"assets/images/smile.svg"),alt:"SureTriggers"})},rt=function(){var e=[{name:"Automate Repetitive Tasks",description:"Create workflows that connect different apps and perform actions based on specific triggers.",icon:Qe},{name:"Save Time & Money",description:"SureTriggers can help you save time and increase productivity by automating repetitive tasks.",icon:Je},{name:"Manage Data Effectively",description:"Use SureTriggers to organize and manage your data by consolidating it from multiple apps into one location",icon:Xe},{name:"Just Drag & Drop",description:"Integrate your apps and build workflows from drag and drop builder. No coding skills required.",icon:Ze},{name:"Increase Your Efficiency",description:"Automate workflows and reduce the need for manual data entry. Increasing your efficiency.",icon:et},{name:"Reduce Errors",description:"Automate your tasks easily and reduce the risk of human error. Improve accuracy and reliability.",icon:tt}];return(0,a.useEffect)((function(){var e=document.querySelector("#wpadminbar ");e&&(e.style.display="none");var t=document.querySelector("html.wp-toolbar");t&&(t.style.padding="0");var r=document.querySelector("#wpbody-content");r&&(r.style.paddingBottom="0");var n=document.querySelector("#wpcontent");n&&(n.style.marginLeft="0");var a=document.querySelector("#adminmenuwrap");a&&(a.style.display="none");var o=document.querySelector("#adminmenuback");o&&(o.style.display="none");var i=document.querySelector("#wpfooter");i&&(i.style.display="none",i.style.marginLeft="0")}),[]),(0,n.createElement)("div",{className:"w-full bg-[#F8FAFC] flex"},(0,n.createElement)("div",{className:"max-w-[856px] shadow-xl rounded mx-auto mt-16 mb-40 bg-white text-center py-12"},(0,n.createElement)("img",{className:"block h-12 w-auto mx-auto mb-8",src:"".concat(sureTriggerData.stPluginURL,"assets/images/STLogoFulBlueBlack.svg"),alt:"SureTriggers"}),(0,n.createElement)("div",{className:"max-w-[560px] m-auto mb-6"},sureTriggerData.reConnectSorryMsg&&(0,n.createElement)("div",{className:"bg-teal-100 rounded-b text-teal-900 px-4 py-3 shadow-md",role:"alert"},(0,n.createElement)("p",{className:"font-bold"}," ","We have recently updated our Authorization process."," "),(0,n.createElement)("p",{className:"text-sm"},(0,n.createElement)("p",null,"Your all previous work is safe with us."),(0,n.createElement)("p",null," You need to re-connect this site."))),(0,n.createElement)("div",{className:"flex flex-col m-auto mb-6"},(0,n.createElement)("h1",{className:"text-app-heading text-2xl leading-7 font-bold mb-4"},"Welcome to the SureTriggers Setup Wizard!"),(0,n.createElement)("p",{className:"text-sm text-app-text"},"SureTriggers is a powerful workflow platform that helps you connect your various plugins and apps together. It allows you to automate repetitive tasks, so you can focus on more important work."))),(0,n.createElement)("div",{className:"flex flex-col items-center justify-center"},(0,n.createElement)("button",{type:"button",className:"cursor-pointer inline-flex items-center px-4 py-3 mb-4 w-80 gap-3 rounded-[3px] justify-center border border-transparent text-sm font-medium rounded text-white bg-app-primary focus:outline-none",onClick:function(){Ge()}},(0,n.createElement)("span",{className:"text-base font-medium"},"Get Started Now"),(0,n.createElement)(Ke,{className:"h-5 w-5 text-white","aria-hidden":"true"})),(0,n.createElement)("a",{href:"".concat(window.origin,"/wp-admin"),className:"text-app-inactive-icon tex-[13px] underline leading-6"},"Go Back to the dashboard"),(0,n.createElement)("div",{className:"m-auto mt-8 mb-10 mx-12"},(0,n.createElement)("iframe",{width:"560",height:"315",src:"https://www.youtube-nocookie.com/embed/mSjEcwpOfIk?controls=0",title:"YouTube video player",frameborder:"0",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",allowfullscreen:!0}))),(0,n.createElement)("div",{className:"bg-app-secondary py-10 px-12 mb-10"},(0,n.createElement)("div",{className:"mx-auto max-w-7xl"},(0,n.createElement)("div",{className:"grid grid-cols-1 gap-x-5 gap-y-6 md:grid-cols-2 "},e.map((function(e){return(0,n.createElement)("div",{key:e.name,className:"relative flex flex-col gap-3 sm:flex-row"},(0,n.createElement)(e.icon,{className:"h-7 w-7 text-app-heading","aria-hidden":"true"}),(0,n.createElement)("div",{className:"sm:min-w-0 sm:flex-1 text-left space-y-2"},(0,n.createElement)("p",{className:"text-lg font-medium text-app-heading"},e.name),(0,n.createElement)("p",{className:"text-base leading-6 text-app-text"},e.description)))}))))),(0,n.createElement)("h2",{className:"text-app-heading text-2xl font-bold leading-6 mb-12"},"Trusted by Worlds Top Brands to Connect Their Apps"),(0,n.createElement)("img",{className:"w-auto mx-auto mb-12 max-w-[760px]",src:"".concat(sureTriggerData.stPluginURL,"assets/images/logogrids.png"),alt:"SureTriggers"}),(0,n.createElement)("div",{className:"flex flex-col items-center justify-center"},(0,n.createElement)("button",{type:"button",className:"cursor-pointer inline-flex items-center px-4 py-3 mb-4 w-80 gap-3 rounded-[3px] justify-center border border-transparent text-sm font-medium rounded text-white bg-app-primary focus:outline-none",onClick:function(){Ge()}},(0,n.createElement)("span",{className:"text-base font-medium"},"Get Started Now"),(0,n.createElement)(Ke,{className:"h-5 w-5 text-white","aria-hidden":"true"})),(0,n.createElement)("a",{href:"".concat(window.origin,"/wp-admin"),className:"text-app-inactive-icon tex-[13px] underline leading-6"},"Go Back to the dashboard"))))},nt=e=>"checkbox"===e.type,at=e=>e instanceof Date,ot=e=>null==e;const it=e=>"object"==typeof e;var st=e=>!ot(e)&&!Array.isArray(e)&&it(e)&&!at(e),lt=e=>{const t=e.constructor&&e.constructor.prototype;return st(t)&&t.hasOwnProperty("isPrototypeOf")},ut="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function ct(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(ut&&(e instanceof Blob||e instanceof FileList)||!r&&!st(e))return e;if(t=r?[]:{},Array.isArray(e)||lt(e))for(const r in e)t[r]=ct(e[r]);else t=e}return t}var dt=e=>Array.isArray(e)?e.filter(Boolean):[],ft=e=>void 0===e,mt=(e,t,r)=>{if(!t||!st(e))return r;const n=dt(t.split(/[,[\].]+?/)).reduce(((e,t)=>ot(e)?e:e[t]),e);return ft(n)||n===e?ft(e[t])?r:e[t]:n};const pt="blur",gt="focusout",vt="onBlur",ht="onChange",yt="onSubmit",bt="onTouched",wt="all",Et="pattern",xt="required",Ot=a.createContext(null),St=e=>{const{children:t,...r}=e;return a.createElement(Ot.Provider,{value:r},t)};var Tt=e=>st(e)&&!Object.keys(e).length,kt=e=>Array.isArray(e)?e:[e];var Ct=e=>"string"==typeof e,Nt=e=>/^\w*$/.test(e),Pt=e=>dt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function Dt(e,t,r){let n=-1;const a=Nt(t)?[t]:Pt(t),o=a.length,i=o-1;for(;++n<o;){const t=a[n];let o=r;if(n!==i){const r=e[t];o=st(r)||Array.isArray(r)?r:isNaN(+a[n+1])?{}:[]}e[t]=o,e=e[t]}return e}var At=(e,t,r,n,a)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:a||!0}}:{};const _t=(e,t,r)=>{for(const n of r||Object.keys(e)){const r=mt(e,n);if(r){const{_f:e,...n}=r;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else st(n)&&_t(n,t)}}};var Lt=e=>({isOnSubmit:!e||e===yt,isOnBlur:e===vt,isOnChange:e===ht,isOnAll:e===wt,isOnTouch:e===bt}),Ft=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),jt=(e,t,r)=>{const n=dt(mt(e,r));return Dt(n,"root",t[r]),Dt(e,r,n),e},Rt=e=>"boolean"==typeof e,It=e=>"file"===e.type,Mt=e=>"function"==typeof e,Vt=e=>{if(!ut)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ut=e=>Ct(e),Bt=e=>"radio"===e.type,Ht=e=>e instanceof RegExp;const qt={value:!1,isValid:!1},Wt={value:!0,isValid:!0};var $t=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ft(e[0].attributes.value)?ft(e[0].value)||""===e[0].value?Wt:{value:e[0].value,isValid:!0}:Wt:qt}return qt};const zt={isValid:!1,value:null};var Gt=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),zt):zt;function Yt(e,t,r="validate"){if(Ut(e)||Array.isArray(e)&&e.every(Ut)||Rt(e)&&!e)return{type:r,message:Ut(e)?e:"",ref:t}}var Kt=e=>st(e)&&!Ht(e)?e:{value:e,message:""},Qt=async(e,t,r,n,a)=>{const{ref:o,refs:i,required:s,maxLength:l,minLength:u,min:c,max:d,pattern:f,validate:m,name:p,valueAsNumber:g,mount:v,disabled:h}=e._f,y=mt(t,p);if(!v||h)return{};const b=i?i[0]:o,w=e=>{n&&b.reportValidity&&(b.setCustomValidity(Rt(e)?"":e||""),b.reportValidity())},E={},x=Bt(o),O=nt(o),S=x||O,T=(g||It(o))&&ft(o.value)&&ft(y)||Vt(o)&&""===o.value||""===y||Array.isArray(y)&&!y.length,k=At.bind(null,p,r,E),C=(e,t,r,n="maxLength",a="minLength")=>{const i=e?t:r;E[p]={type:e?n:a,message:i,ref:o,...k(e?n:a,i)}};if(a?!Array.isArray(y)||!y.length:s&&(!S&&(T||ot(y))||Rt(y)&&!y||O&&!$t(i).isValid||x&&!Gt(i).isValid)){const{value:e,message:t}=Ut(s)?{value:!!s,message:s}:Kt(s);if(e&&(E[p]={type:xt,message:t,ref:b,...k(xt,t)},!r))return w(t),E}if(!(T||ot(c)&&ot(d))){let e,t;const n=Kt(d),a=Kt(c);if(ot(y)||isNaN(y)){const r=o.valueAsDate||new Date(y),i=e=>new Date((new Date).toDateString()+" "+e),s="time"==o.type,l="week"==o.type;Ct(n.value)&&y&&(e=s?i(y)>i(n.value):l?y>n.value:r>new Date(n.value)),Ct(a.value)&&y&&(t=s?i(y)<i(a.value):l?y<a.value:r<new Date(a.value))}else{const r=o.valueAsNumber||(y?+y:y);ot(n.value)||(e=r>n.value),ot(a.value)||(t=r<a.value)}if((e||t)&&(C(!!e,n.message,a.message,"max","min"),!r))return w(E[p].message),E}if((l||u)&&!T&&(Ct(y)||a&&Array.isArray(y))){const e=Kt(l),t=Kt(u),n=!ot(e.value)&&y.length>+e.value,a=!ot(t.value)&&y.length<+t.value;if((n||a)&&(C(n,e.message,t.message),!r))return w(E[p].message),E}if(f&&!T&&Ct(y)){const{value:e,message:t}=Kt(f);if(Ht(e)&&!y.match(e)&&(E[p]={type:Et,message:t,ref:o,...k(Et,t)},!r))return w(t),E}if(m)if(Mt(m)){const e=Yt(await m(y,t),b);if(e&&(E[p]={...e,...k("validate",e.message)},!r))return w(e.message),E}else if(st(m)){let e={};for(const n in m){if(!Tt(e)&&!r)break;const a=Yt(await m[n](y,t),b,n);a&&(e={...a,...k(n,a.message)},w(a.message),r&&(E[p]=e))}if(!Tt(e)&&(E[p]={ref:b,...e},!r))return E}return w(!0),E};function Jt(e,t){const r=Array.isArray(t)?t:Nt(t)?[t]:Pt(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=ft(e)?n++:e[t[n++]];return e}(e,r),a=r.length-1,o=r[a];return n&&delete n[o],0!==a&&(st(n)&&Tt(n)||Array.isArray(n)&&function(e){for(const t in e)if(!ft(e[t]))return!1;return!0}(n))&&Jt(e,r.slice(0,-1)),e}function Xt(){let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var Zt=e=>ot(e)||!it(e);function er(e,t){if(Zt(e)||Zt(t))return e===t;if(at(e)&&at(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const a of r){const r=e[a];if(!n.includes(a))return!1;if("ref"!==a){const e=t[a];if(at(r)&&at(e)||st(r)&&st(e)||Array.isArray(r)&&Array.isArray(e)?!er(r,e):r!==e)return!1}}return!0}var tr=e=>"select-multiple"===e.type,rr=e=>Vt(e)&&e.isConnected,nr=e=>{for(const t in e)if(Mt(e[t]))return!0;return!1};function ar(e,t={}){const r=Array.isArray(e);if(st(e)||r)for(const r in e)Array.isArray(e[r])||st(e[r])&&!nr(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ar(e[r],t[r])):ot(e[r])||(t[r]=!0);return t}function or(e,t,r){const n=Array.isArray(e);if(st(e)||n)for(const n in e)Array.isArray(e[n])||st(e[n])&&!nr(e[n])?ft(t)||Zt(r[n])?r[n]=Array.isArray(e[n])?ar(e[n],[]):{...ar(e[n])}:or(e[n],ot(t)?{}:t[n],r[n]):r[n]=!er(e[n],t[n]);return r}var ir=(e,t)=>or(e,t,ar(t)),sr=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>ft(e)?e:t?""===e?NaN:e?+e:e:r&&Ct(e)?new Date(e):n?n(e):e;function lr(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return It(t)?t.files:Bt(t)?Gt(e.refs).value:tr(t)?[...t.selectedOptions].map((({value:e})=>e)):nt(t)?$t(e.refs).value:sr(ft(t.value)?e.ref.value:t.value,e)}var ur=e=>ft(e)?e:Ht(e)?e.source:st(e)?Ht(e.value)?e.value.source:e.value:e;function cr(e,t,r){const n=mt(e,r);if(n||Nt(r))return{error:n,name:r};const a=r.split(".");for(;a.length;){const n=a.join("."),o=mt(t,n),i=mt(e,n);if(o&&!Array.isArray(o)&&r!==n)return{name:r};if(i&&i.type)return{name:n,error:i};a.pop()}return{name:r}}const dr={mode:yt,reValidateMode:ht,shouldFocusError:!0};function fr(e={},t){let r,n={...dr,...e},a={submitCount:0,isDirty:!1,isLoading:Mt(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},o={},i=(st(n.defaultValues)||st(n.values))&&ct(n.defaultValues||n.values)||{},s=n.shouldUnregister?{}:ct(i),l={action:!1,mount:!1,watch:!1},u={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c=0;const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Xt(),array:Xt(),state:Xt()},m=e.resetOptions&&e.resetOptions.keepDirtyValues,p=Lt(n.mode),g=Lt(n.reValidateMode),v=n.criteriaMode===wt,h=async e=>{if(d.isValid||e){const e=n.resolver?Tt((await E()).errors):await x(o,!0);e!==a.isValid&&f.state.next({isValid:e})}},y=e=>d.isValidating&&f.state.next({isValidating:e}),b=(e,t,r,n)=>{const a=mt(o,e);if(a){const o=mt(s,e,ft(r)?mt(i,e):r);ft(o)||n&&n.defaultChecked||t?Dt(s,e,t?o:lr(a._f)):T(e,o),l.mount&&h()}},w=(e,t,r,n,o)=>{let s=!1,l=!1;const u={name:e};if(!r||n){d.isDirty&&(l=a.isDirty,a.isDirty=u.isDirty=O(),s=l!==u.isDirty);const r=er(mt(i,e),t);l=mt(a.dirtyFields,e),r?Jt(a.dirtyFields,e):Dt(a.dirtyFields,e,!0),u.dirtyFields=a.dirtyFields,s=s||d.dirtyFields&&l!==!r}if(r){const t=mt(a.touchedFields,e);t||(Dt(a.touchedFields,e,r),u.touchedFields=a.touchedFields,s=s||d.touchedFields&&t!==r)}return s&&o&&f.state.next(u),s?u:{}},E=async e=>n.resolver(s,n.context,((e,t,r,n)=>{const a={};for(const r of e){const e=mt(t,r);e&&Dt(a,r,e._f)}return{criteriaMode:r,names:[...e],fields:a,shouldUseNativeValidation:n}})(e||u.mount,o,n.criteriaMode,n.shouldUseNativeValidation)),x=async(e,t,r={valid:!0})=>{for(const o in e){const i=e[o];if(i){const{_f:e,...o}=i;if(e){const o=u.array.has(e.name),l=await Qt(i,s,v,n.shouldUseNativeValidation&&!t,o);if(l[e.name]&&(r.valid=!1,t))break;!t&&(mt(l,e.name)?o?jt(a.errors,l,e.name):Dt(a.errors,e.name,l[e.name]):Jt(a.errors,e.name))}o&&await x(o,t,r)}}return r.valid},O=(e,t)=>(e&&t&&Dt(s,e,t),!er(D(),i)),S=(e,t,r)=>((e,t,r,n,a)=>Ct(e)?(n&&t.watch.add(e),mt(r,e,a)):Array.isArray(e)?e.map((e=>(n&&t.watch.add(e),mt(r,e)))):(n&&(t.watchAll=!0),r))(e,u,{...l.mount?s:ft(t)?i:Ct(e)?{[e]:t}:t},r,t),T=(e,t,r={})=>{const n=mt(o,e);let a=t;if(n){const r=n._f;r&&(!r.disabled&&Dt(s,e,sr(t,r)),a=Vt(r.ref)&&ot(t)?"":t,tr(r.ref)?[...r.ref.options].forEach((e=>e.selected=a.includes(e.value))):r.refs?nt(r.ref)?r.refs.length>1?r.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(a)?!!a.find((t=>t===e.value)):a===e.value))):r.refs[0]&&(r.refs[0].checked=!!a):r.refs.forEach((e=>e.checked=e.value===a)):It(r.ref)?r.ref.value="":(r.ref.value=a,r.ref.type||f.values.next({name:e,values:{...s}})))}(r.shouldDirty||r.shouldTouch)&&w(e,a,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&P(e)},k=(e,t,r)=>{for(const n in t){const a=t[n],i=`${e}.${n}`,s=mt(o,i);!u.array.has(e)&&Zt(a)&&(!s||s._f)||at(a)?T(i,a,r):k(i,a,r)}},C=(e,r,n={})=>{const c=mt(o,e),m=u.array.has(e),p=ct(r);Dt(s,e,p),m?(f.array.next({name:e,values:{...s}}),(d.isDirty||d.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:ir(i,s),isDirty:O(e,p)})):!c||c._f||ot(p)?T(e,p,n):k(e,p,n),Ft(e,u)&&f.state.next({...a}),f.values.next({name:e,values:{...s}}),!l.mount&&t()},N=async t=>{const i=t.target;let l=i.name,m=!0;const b=mt(o,l);if(b){let S,T;const k=i.type?lr(b._f):(e=>st(e)&&e.target?nt(e.target)?e.target.checked:e.target.value:e)(t),C=t.type===pt||t.type===gt,N=!((O=b._f).mount&&(O.required||O.min||O.max||O.maxLength||O.minLength||O.pattern||O.validate)||n.resolver||mt(a.errors,l)||b._f.deps)||((e,t,r,n,a)=>!a.isOnAll&&(!r&&a.isOnTouch?!(t||e):(r?n.isOnBlur:a.isOnBlur)?!e:!(r?n.isOnChange:a.isOnChange)||e))(C,mt(a.touchedFields,l),a.isSubmitted,g,p),D=Ft(l,u,C);Dt(s,l,k),C?(b._f.onBlur&&b._f.onBlur(t),r&&r(0)):b._f.onChange&&b._f.onChange(t);const A=w(l,k,C,!1),_=!Tt(A)||D;if(!C&&f.values.next({name:l,type:t.type,values:{...s}}),N)return d.isValid&&h(),_&&f.state.next({name:l,...D?{}:A});if(!C&&D&&f.state.next({...a}),y(!0),n.resolver){const{errors:e}=await E([l]),t=cr(a.errors,o,l),r=cr(e,o,t.name||l);S=r.error,l=r.name,T=Tt(e)}else S=(await Qt(b,s,v,n.shouldUseNativeValidation))[l],m=isNaN(k)||k===mt(s,l,k),m&&(S?T=!1:d.isValid&&(T=await x(o,!0)));m&&(b._f.deps&&P(b._f.deps),((t,n,o,i)=>{const s=mt(a.errors,t),l=d.isValid&&Rt(n)&&a.isValid!==n;var u;if(e.delayError&&o?(u=()=>((e,t)=>{Dt(a.errors,e,t),f.state.next({errors:a.errors})})(t,o),r=e=>{clearTimeout(c),c=setTimeout(u,e)},r(e.delayError)):(clearTimeout(c),r=null,o?Dt(a.errors,t,o):Jt(a.errors,t)),(o?!er(s,o):s)||!Tt(i)||l){const e={...i,...l&&Rt(n)?{isValid:n}:{},errors:a.errors,name:t};a={...a,...e},f.state.next(e)}y(!1)})(l,T,S,A))}var O},P=async(e,t={})=>{let r,i;const s=kt(e);if(y(!0),n.resolver){const t=await(async e=>{const{errors:t}=await E();if(e)for(const r of e){const e=mt(t,r);e?Dt(a.errors,r,e):Jt(a.errors,r)}else a.errors=t;return t})(ft(e)?e:s);r=Tt(t),i=e?!s.some((e=>mt(t,e))):r}else e?(i=(await Promise.all(s.map((async e=>{const t=mt(o,e);return await x(t&&t._f?{[e]:t}:t)})))).every(Boolean),(i||a.isValid)&&h()):i=r=await x(o);return f.state.next({...!Ct(e)||d.isValid&&r!==a.isValid?{}:{name:e},...n.resolver||!e?{isValid:r}:{},errors:a.errors,isValidating:!1}),t.shouldFocus&&!i&&_t(o,(e=>e&&mt(a.errors,e)),e?s:u.mount),i},D=e=>{const t={...i,...l.mount?s:{}};return ft(e)?t:Ct(e)?mt(t,e):e.map((e=>mt(t,e)))},A=(e,t)=>({invalid:!!mt((t||a).errors,e),isDirty:!!mt((t||a).dirtyFields,e),isTouched:!!mt((t||a).touchedFields,e),error:mt((t||a).errors,e)}),_=(e,t={})=>{for(const r of e?kt(e):u.mount)u.mount.delete(r),u.array.delete(r),t.keepValue||(Jt(o,r),Jt(s,r)),!t.keepError&&Jt(a.errors,r),!t.keepDirty&&Jt(a.dirtyFields,r),!t.keepTouched&&Jt(a.touchedFields,r),!n.shouldUnregister&&!t.keepDefaultValue&&Jt(i,r);f.values.next({values:{...s}}),f.state.next({...a,...t.keepDirty?{isDirty:O()}:{}}),!t.keepIsValid&&h()},L=(e,t={})=>{let r=mt(o,e);const a=Rt(t.disabled);return Dt(o,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),u.mount.add(e),r?a&&Dt(s,e,t.disabled?void 0:mt(s,e,lr(r._f))):b(e,!0,t.value),{...a?{disabled:t.disabled}:{},...n.shouldUseNativeValidation?{required:!!t.required,min:ur(t.min),max:ur(t.max),minLength:ur(t.minLength),maxLength:ur(t.maxLength),pattern:ur(t.pattern)}:{},name:e,onChange:N,onBlur:N,ref:a=>{if(a){L(e,t),r=mt(o,e);const n=ft(a.value)&&a.querySelectorAll&&a.querySelectorAll("input,select,textarea")[0]||a,s=(e=>Bt(e)||nt(e))(n),l=r._f.refs||[];if(s?l.find((e=>e===n)):n===r._f.ref)return;Dt(o,e,{_f:{...r._f,...s?{refs:[...l.filter(rr),n,...Array.isArray(mt(i,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),b(e,!1,void 0,n)}else r=mt(o,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!((e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)))(u.array,e)||!l.action)&&u.unMount.add(e)}}},F=()=>n.shouldFocusError&&_t(o,(e=>e&&mt(a.errors,e)),u.mount),j=(r,n={})=>{const c=r||i,p=ct(c),g=r&&!Tt(r)?p:i;if(n.keepDefaultValues||(i=c),!n.keepValues){if(n.keepDirtyValues||m)for(const e of u.mount)mt(a.dirtyFields,e)?Dt(g,e,mt(s,e)):C(e,mt(g,e));else{if(ut&&ft(r))for(const e of u.mount){const t=mt(o,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(Vt(e)){const t=e.closest("form");if(t){t.reset();break}}}}o={}}s=e.shouldUnregister?n.keepDefaultValues?ct(i):{}:p,f.array.next({values:{...g}}),f.values.next({values:{...g}})}u={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!l.mount&&t(),l.mount=!d.isValid||!!n.keepIsValid,l.watch=!!e.shouldUnregister,f.state.next({submitCount:n.keepSubmitCount?a.submitCount:0,isDirty:n.keepDirty?a.isDirty:!(!n.keepDefaultValues||er(r,i)),isSubmitted:!!n.keepIsSubmitted&&a.isSubmitted,dirtyFields:n.keepDirtyValues?a.dirtyFields:n.keepDefaultValues&&r?ir(i,r):{},touchedFields:n.keepTouched?a.touchedFields:{},errors:n.keepErrors?a.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},R=(e,t)=>j(Mt(e)?e(s):e,t);return{control:{register:L,unregister:_,getFieldState:A,_executeSchema:E,_getWatch:S,_getDirty:O,_updateValid:h,_removeUnmounted:()=>{for(const e of u.unMount){const t=mt(o,e);t&&(t._f.refs?t._f.refs.every((e=>!rr(e))):!rr(t._f.ref))&&_(e)}u.unMount=new Set},_updateFieldArray:(e,t=[],r,n,u=!0,c=!0)=>{if(n&&r){if(l.action=!0,c&&Array.isArray(mt(o,e))){const t=r(mt(o,e),n.argA,n.argB);u&&Dt(o,e,t)}if(c&&Array.isArray(mt(a.errors,e))){const t=r(mt(a.errors,e),n.argA,n.argB);u&&Dt(a.errors,e,t),((e,t)=>{!dt(mt(e,t)).length&&Jt(e,t)})(a.errors,e)}if(d.touchedFields&&c&&Array.isArray(mt(a.touchedFields,e))){const t=r(mt(a.touchedFields,e),n.argA,n.argB);u&&Dt(a.touchedFields,e,t)}d.dirtyFields&&(a.dirtyFields=ir(i,s)),f.state.next({name:e,isDirty:O(e,t),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else Dt(s,e,t)},_getFieldArray:t=>dt(mt(l.mount?s:i,t,e.shouldUnregister?mt(i,t,[]):[])),_reset:j,_resetDefaultValues:()=>Mt(n.defaultValues)&&n.defaultValues().then((e=>{R(e,n.resetOptions),f.state.next({isLoading:!1})})),_updateFormState:e=>{a={...a,...e}},_subjects:f,_proxyFormState:d,get _fields(){return o},get _formValues(){return s},get _state(){return l},set _state(e){l=e},get _defaultValues(){return i},get _names(){return u},set _names(e){u=e},get _formState(){return a},set _formState(e){a=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:P,register:L,handleSubmit:(e,t)=>async r=>{r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist());let i=ct(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await E();a.errors=e,i=t}else await x(o);Jt(a.errors,"root"),Tt(a.errors)?(f.state.next({errors:{}}),await e(i,r)):(t&&await t({...a.errors},r),F(),setTimeout(F)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Tt(a.errors),submitCount:a.submitCount+1,errors:a.errors})},watch:(e,t)=>Mt(e)?f.values.subscribe({next:r=>e(S(void 0,t),r)}):S(e,t,!0),setValue:C,getValues:D,reset:R,resetField:(e,t={})=>{mt(o,e)&&(ft(t.defaultValue)?C(e,mt(i,e)):(C(e,t.defaultValue),Dt(i,e,t.defaultValue)),t.keepTouched||Jt(a.touchedFields,e),t.keepDirty||(Jt(a.dirtyFields,e),a.isDirty=t.defaultValue?O(e,mt(i,e)):O()),t.keepError||(Jt(a.errors,e),d.isValid&&h()),f.state.next({...a}))},clearErrors:e=>{e&&kt(e).forEach((e=>Jt(a.errors,e))),f.state.next({errors:e?a.errors:{}})},unregister:_,setError:(e,t,r)=>{const n=(mt(o,e,{_f:{}})._f||{}).ref;Dt(a.errors,e,{...t,ref:n}),f.state.next({name:e,errors:a.errors,isValid:!1}),r&&r.shouldFocus&&n&&n.focus&&n.focus()},setFocus:(e,t={})=>{const r=mt(o,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:A}}function mr(){return mr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mr.apply(this,arguments)}function pr(...e){return e.filter(Boolean).join(" ")}function gr(e,t,...r){if(e in t){let n=t[e];return"function"==typeof n?n(...r):n}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((e=>`"${e}"`)).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,gr),n}var vr,hr,yr=((hr=yr||{})[hr.None=0]="None",hr[hr.RenderStrategy=1]="RenderStrategy",hr[hr.Static=2]="Static",hr),br=((vr=br||{})[vr.Unmount=0]="Unmount",vr[vr.Hidden=1]="Hidden",vr);function wr({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:a,visible:o=!0,name:i}){let s=xr(t,e);if(o)return Er(s,r,n,i);let l=null!=a?a:0;if(2&l){let{static:e=!1,...t}=s;if(e)return Er(t,r,n,i)}if(1&l){let{unmount:e=!0,...t}=s;return gr(e?0:1,{0(){return null},1(){return Er({...t,hidden:!0,style:{display:"none"}},r,n,i)}})}return Er(s,r,n,i)}function Er(e,t={},r,n){let{as:o=r,children:i,refName:s="ref",...l}=Tr(e,["unmount","static"]),u=void 0!==e.ref?{[s]:e.ref}:{},c="function"==typeof i?i(t):i;"className"in l&&l.className&&"function"==typeof l.className&&(l.className=l.className(t));let d={};if(t){let e=!1,r=[];for(let[n,a]of Object.entries(t))"boolean"==typeof a&&(e=!0),!0===a&&r.push(n);e&&(d["data-headlessui-state"]=r.join(" "))}if(o===a.Fragment&&Object.keys(Sr(l)).length>0){if(!(0,a.isValidElement)(c)||Array.isArray(c)&&c.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(l).map((e=>` - ${e}`)).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((e=>` - ${e}`)).join("\n")].join("\n"));let e=c.props,t="function"==typeof(null==e?void 0:e.className)?(...t)=>pr(null==e?void 0:e.className(...t),l.className):pr(null==e?void 0:e.className,l.className),r=t?{className:t}:{};return(0,a.cloneElement)(c,Object.assign({},xr(c.props,Sr(Tr(l,["ref"]))),d,u,function(...e){return{ref:e.every((e=>null==e))?void 0:t=>{for(let r of e)null!=r&&("function"==typeof r?r(t):r.current=t)}}}(c.ref,u.ref),r))}return(0,a.createElement)(o,Object.assign({},Tr(l,["ref"]),o!==a.Fragment&&u,o!==a.Fragment&&d),c)}function xr(...e){if(0===e.length)return{};if(1===e.length)return e[0];let t={},r={};for(let n of e)for(let e in n)e.startsWith("on")&&"function"==typeof n[e]?(null!=r[e]||(r[e]=[]),r[e].push(n[e])):t[e]=n[e];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map((e=>[e,void 0]))));for(let e in r)Object.assign(t,{[e](t,...n){let a=r[e];for(let e of a){if((t instanceof Event||(null==t?void 0:t.nativeEvent)instanceof Event)&&t.defaultPrevented)return;e(t,...n)}}});return t}function Or(e){var t;return Object.assign((0,a.forwardRef)(e),{displayName:null!=(t=e.displayName)?t:e.name})}function Sr(e){let t=Object.assign({},e);for(let e in t)void 0===t[e]&&delete t[e];return t}function Tr(e,t=[]){let r=Object.assign({},e);for(let e of t)e in r&&delete r[e];return r}var kr=Object.defineProperty,Cr=(e,t,r)=>(((e,t,r)=>{t in e?kr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r})(e,"symbol"!=typeof t?t+"":t,r),r);let Nr=new class{constructor(){Cr(this,"current",this.detect()),Cr(this,"handoffState","pending"),Cr(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return"server"===this.current}get isClient(){return"client"===this.current}detect(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}handoff(){"pending"===this.handoffState&&(this.handoffState="complete")}get isHandoffComplete(){return"complete"===this.handoffState}},Pr=(e,t)=>{Nr.isServer?(0,a.useEffect)(e,t):(0,a.useLayoutEffect)(e,t)};function Dr(){let[e,t]=(0,a.useState)(Nr.isHandoffComplete);return e&&!1===Nr.isHandoffComplete&&t(!1),(0,a.useEffect)((()=>{!0!==e&&t(!0)}),[e]),(0,a.useEffect)((()=>Nr.handoff()),[]),e}var Ar;let _r=null!=(Ar=a.useId)?Ar:function(){let e=Dr(),[t,r]=a.useState(e?()=>Nr.nextId():null);return Pr((()=>{null===t&&r(Nr.nextId())}),[t]),null!=t?""+t:void 0};var Lr=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Lr||{});function Fr(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=""===(null==t?void 0:t.getAttribute("disabled"));return(!n||!function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(r))&&n}function jr(e){let t=(0,a.useRef)(e);return Pr((()=>{t.current=e}),[e]),t}let Rr=function(e){let t=jr(e);return a.useCallback(((...e)=>t.current(...e)),[t])},Ir=Symbol();function Mr(e,t=!0){return Object.assign(e,{[Ir]:t})}function Vr(...e){let t=(0,a.useRef)(e);(0,a.useEffect)((()=>{t.current=e}),[e]);let r=Rr((e=>{for(let r of t.current)null!=r&&("function"==typeof r?r(e):r.current=e)}));return e.every((e=>null==e||(null==e?void 0:e[Ir])))?void 0:r}let Ur=(0,a.createContext)(null);function Br(){let e=(0,a.useContext)(Ur);if(null===e){let e=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,Br),e}return e}let Hr=Or((function(e,t){let r=_r(),{id:n=`headlessui-label-${r}`,passive:a=!1,...o}=e,i=Br(),s=Vr(t);Pr((()=>i.register(n)),[n,i.register]);let l={ref:s,...i.props,id:n};return a&&("onClick"in l&&(delete l.htmlFor,delete l.onClick),"onClick"in o&&delete o.onClick),wr({ourProps:l,theirProps:o,slot:i.slot||{},defaultTag:"label",name:i.name||"Label"})})),qr=Object.assign(Hr,{}),Wr=(0,a.createContext)(null);function $r(){let e=(0,a.useContext)(Wr);if(null===e){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,$r),e}return e}function zr(){let[e,t]=(0,a.useState)([]);return[e.length>0?e.join(" "):void 0,(0,a.useMemo)((()=>function(e){let r=Rr((e=>(t((t=>[...t,e])),()=>t((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),n=(0,a.useMemo)((()=>({register:r,slot:e.slot,name:e.name,props:e.props})),[r,e.slot,e.name,e.props]);return a.createElement(Wr.Provider,{value:n},e.children)}),[t])]}let Gr=Or((function(e,t){let r=_r(),{id:n=`headlessui-description-${r}`,...a}=e,o=$r(),i=Vr(t);return Pr((()=>o.register(n)),[n,o.register]),wr({ourProps:{ref:i,...o.props,id:n},theirProps:a,slot:o.slot||{},defaultTag:"p",name:o.name||"Description"})})),Yr=Object.assign(Gr,{});function Kr(e){var t;if(e.type)return e.type;let r=null!=(t=e.as)?t:"button";return"string"==typeof r&&"button"===r.toLowerCase()?"button":void 0}function Qr(e,t){let[r,n]=(0,a.useState)((()=>Kr(e)));return Pr((()=>{n(Kr(e))}),[e.type,e.as]),Pr((()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")}),[r,t]),r}var Jr=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(Jr||{});let Xr=Or((function(e,t){let{features:r=1,...n}=e;return wr({ourProps:{ref:t,"aria-hidden":2==(2&r)||void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...4==(4&r)&&2!=(2&r)&&{display:"none"}}},theirProps:n,slot:{},defaultTag:"div",name:"Hidden"})}));function Zr(e){"function"==typeof queueMicrotask?queueMicrotask(e):Promise.resolve().then(e).catch((e=>setTimeout((()=>{throw e}))))}function en(){let e=[],t={addEventListener(e,r,n,a){return e.addEventListener(r,n,a),t.add((()=>e.removeEventListener(r,n,a)))},requestAnimationFrame(...e){let r=requestAnimationFrame(...e);return t.add((()=>cancelAnimationFrame(r)))},nextFrame(...e){return t.requestAnimationFrame((()=>t.requestAnimationFrame(...e)))},setTimeout(...e){let r=setTimeout(...e);return t.add((()=>clearTimeout(r)))},microTask(...e){let r={current:!0};return Zr((()=>{r.current&&e[0]()})),t.add((()=>{r.current=!1}))},style(e,t,r){let n=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:r}),this.add((()=>{Object.assign(e.style,{[t]:n})}))},group(e){let t=en();return e(t),this.add((()=>t.dispose()))},add(t){return e.push(t),()=>{let r=e.indexOf(t);if(r>=0)for(let t of e.splice(r,1))t()}},dispose(){for(let t of e.splice(0))t()}};return t}function tn(){let[e]=(0,a.useState)(en);return(0,a.useEffect)((()=>()=>e.dispose()),[e]),e}let rn=(0,a.createContext)(null);rn.displayName="GroupContext";let nn=a.Fragment,an=Or((function(e,t){let r=_r(),{id:n=`headlessui-switch-${r}`,checked:o,defaultChecked:i=!1,onChange:s,name:l,value:u,form:c,...d}=e,f=(0,a.useContext)(rn),m=(0,a.useRef)(null),p=Vr(m,t,null===f?null:f.setSwitch),[g,v]=function(e,t,r){let[n,o]=(0,a.useState)(r),i=void 0!==e,s=(0,a.useRef)(i),l=(0,a.useRef)(!1),u=(0,a.useRef)(!1);return!i||s.current||l.current?!i&&s.current&&!u.current&&(u.current=!0,s.current=i,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(l.current=!0,s.current=i,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[i?e:n,Rr((e=>(i||o(e),null==t?void 0:t(e))))]}(o,s,i),h=Rr((()=>null==v?void 0:v(!g))),y=Rr((e=>{if(Fr(e.currentTarget))return e.preventDefault();e.preventDefault(),h()})),b=Rr((e=>{e.key===Lr.Space?(e.preventDefault(),h()):e.key===Lr.Enter&&function(e){var t;let r=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(r)for(let e of r.elements)if("INPUT"===e.tagName&&"submit"===e.type||"BUTTON"===e.tagName&&"submit"===e.type||"INPUT"===e.nodeName&&"image"===e.type)return void e.click()}(e.currentTarget)})),w=Rr((e=>e.preventDefault())),E=(0,a.useMemo)((()=>({checked:g})),[g]),x={id:n,ref:p,role:"switch",type:Qr(e,m),tabIndex:0,"aria-checked":g,"aria-labelledby":null==f?void 0:f.labelledby,"aria-describedby":null==f?void 0:f.describedby,onClick:y,onKeyUp:b,onKeyPress:w},O=tn();return(0,a.useEffect)((()=>{var e;let t=null==(e=m.current)?void 0:e.closest("form");t&&void 0!==i&&O.addEventListener(t,"reset",(()=>{v(i)}))}),[m,v]),a.createElement(a.Fragment,null,null!=l&&g&&a.createElement(Xr,{features:Jr.Hidden,...Sr({as:"input",type:"checkbox",hidden:!0,readOnly:!0,form:c,checked:g,name:l,value:u})}),wr({ourProps:x,theirProps:d,slot:E,defaultTag:"button",name:"Switch"}))})),on=Object.assign(an,{Group:function(e){var t;let[r,n]=(0,a.useState)(null),[o,i]=function(){let[e,t]=(0,a.useState)([]);return[e.length>0?e.join(" "):void 0,(0,a.useMemo)((()=>function(e){let r=Rr((e=>(t((t=>[...t,e])),()=>t((t=>{let r=t.slice(),n=r.indexOf(e);return-1!==n&&r.splice(n,1),r}))))),n=(0,a.useMemo)((()=>({register:r,slot:e.slot,name:e.name,props:e.props})),[r,e.slot,e.name,e.props]);return a.createElement(Ur.Provider,{value:n},e.children)}),[t])]}(),[s,l]=zr(),u=(0,a.useMemo)((()=>({switch:r,setSwitch:n,labelledby:o,describedby:s})),[r,n,o,s]),c=e;return a.createElement(l,{name:"Switch.Description"},a.createElement(i,{name:"Switch.Label",props:{htmlFor:null==(t=u.switch)?void 0:t.id,onClick(e){r&&("LABEL"===e.currentTarget.tagName&&e.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},a.createElement(rn.Provider,{value:u},wr({ourProps:{},theirProps:c,defaultTag:nn,name:"Switch.Group"}))))},Label:qr,Description:Yr});var sn=function(e){var t=!!e.checked&&e.checked,r=re((0,a.useState)(t),2),o=r[0],i=r[1];function s(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(on,{checked:o,onChange:function(t){i(t),e.onChange&&e.onChange(t,i)},className:s(o?"bg-app-primary":"bg-app-inactive-icon","p-0 relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-app-primary")},(0,n.createElement)("span",{className:"sr-only"},"Use setting"),(0,n.createElement)("span",{"aria-hidden":"true",className:s(o?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200")})))},ln=function(e){var t,r,o=e.field,i=o.name,s=o.type,l=o.options,u=o.validationRules,c=a.useContext(Ot),d=c.register,f=c.getValues,m=c.setValue,p=c.formState.errors,g=function(){switch(s){case"text":case"password":case"email":case"url":case"date":case"time":case"number":return(0,n.createElement)("input",mr({className:"mt-1 focus:ring-app-primary focus:border-app-primary block w-full shadow-sm sm:text-sm border-app-border rounded-md",type:s},d(i,u)));case"textarea":return(0,n.createElement)("textarea",mr({className:"shadow-sm focus:ring-app-primary focus:border-app-primary block w-full sm:text-sm border border-app-border rounded-md"},d(i,u)));case"select":return(0,n.createElement)("select",mr({className:"mt-1 block w-full py-2 px-3 border border-app-border bg-white rounded-md shadow-sm focus:outline-none focus:ring-app-primary focus:border-app-primary sm:text-sm"},d(i,u)),(0,n.createElement)("option",null),Object.entries(l).map((function(e){return(0,n.createElement)("option",{key:e[0],value:e[0]},e[1])})));case"checkbox":return d(i),(0,n.createElement)("div",{className:"py-4 flex items-center justify-between"},(0,n.createElement)("div",{className:"flex flex-col"},(0,n.createElement)("p",{className:"text-sm font-medium text-app-heading"},o.label),o.description&&(0,n.createElement)("p",{className:"text-sm text-app-text"},o.description)),(0,n.createElement)(sn,{checked:f(i),onChange:function(e){m(i,e)}}));case"ajax-button":return(0,n.createElement)("button",{onClick:function(e){e.preventDefault(),o.onClickAjaxButton(o)},className:"inline-flex items-center justify-center px-4 py-2 border border-app-border text-sm leading-4 font-medium rounded-md text-app-primary bg-white hover:bg-app-secondary-hover focus:outline-none"}," ",o.label," ")}};if(["checkbox"].includes(s))return g();var v=!0;return["ajax-button"].includes(s)&&(v=!1),(0,n.createElement)(n.Fragment,null,v&&(0,n.createElement)("label",{htmlFor:o.name,className:"block text-sm font-medium text-app-text"},o.label),g(),(null===(t=p[o.name])||void 0===t?void 0:t.message)&&(0,n.createElement)("p",{className:"text-alert-error-text text-xs mt-2"},null===(r=p[o.name])||void 0===r?void 0:r.message),o.description&&(0,n.createElement)("p",{className:"mt-2 text-sm text-app-text"},o.description))};function un(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,a)}var cn=window.regeneratorRuntime,dn=r.n(cn);function fn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function mn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var pn=function(){var e,t=(e=dn().mark((function e(){var t,r,n,a,o=arguments;return dn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:"",r=o.length>1&&void 0!==o[1]?o[1]:{},n=o.length>2&&void 0!==o[2]?o[2]:{},e.next=5,fetch(t,{method:"POST",mode:"cors",cache:"no-cache",credentials:"same-origin",headers:mn({},n),redirect:"follow",referrerPolicy:"no-referrer",body:r});case 5:return a=e.sent,e.abrupt("return",a.json());case 7:case"end":return e.stop()}}),e)})),function(){var t=this,r=arguments;return new Promise((function(n,a){var o=e.apply(t,r);function i(e){un(o,n,a,i,s,"next",e)}function s(e){un(o,n,a,i,s,"throw",e)}i(void 0)}))});return function(){return t.apply(this,arguments)}}();let gn=(0,a.createContext)(null);gn.displayName="OpenClosedContext";var vn=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(vn||{});function hn(){return(0,a.useContext)(gn)}function yn({value:e,children:t}){return a.createElement(gn.Provider,{value:e},t)}function bn(){let e=(0,a.useRef)(!1);return Pr((()=>(e.current=!0,()=>{e.current=!1})),[]),e}function wn(e,...t){e&&t.length>0&&e.classList.add(...t)}function En(e,...t){e&&t.length>0&&e.classList.remove(...t)}function xn(e=""){return e.split(" ").filter((e=>e.trim().length>1))}let On=(0,a.createContext)(null);On.displayName="TransitionContext";var Sn=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Sn||{});let Tn=(0,a.createContext)(null);function kn(e){return"children"in e?kn(e.children):e.current.filter((({el:e})=>null!==e.current)).filter((({state:e})=>"visible"===e)).length>0}function Cn(e,t){let r=jr(e),n=(0,a.useRef)([]),o=bn(),i=tn(),s=Rr(((e,t=br.Hidden)=>{let a=n.current.findIndex((({el:t})=>t===e));-1!==a&&(gr(t,{[br.Unmount](){n.current.splice(a,1)},[br.Hidden](){n.current[a].state="hidden"}}),i.microTask((()=>{var e;!kn(n)&&o.current&&(null==(e=r.current)||e.call(r))})))})),l=Rr((e=>{let t=n.current.find((({el:t})=>t===e));return t?"visible"!==t.state&&(t.state="visible"):n.current.push({el:e,state:"visible"}),()=>s(e,br.Unmount)})),u=(0,a.useRef)([]),c=(0,a.useRef)(Promise.resolve()),d=(0,a.useRef)({enter:[],leave:[],idle:[]}),f=Rr(((e,r,n)=>{u.current.splice(0),t&&(t.chains.current[r]=t.chains.current[r].filter((([t])=>t!==e))),null==t||t.chains.current[r].push([e,new Promise((e=>{u.current.push(e)}))]),null==t||t.chains.current[r].push([e,new Promise((e=>{Promise.all(d.current[r].map((([e,t])=>t))).then((()=>e()))}))]),"enter"===r?c.current=c.current.then((()=>null==t?void 0:t.wait.current)).then((()=>n(r))):n(r)})),m=Rr(((e,t,r)=>{Promise.all(d.current[t].splice(0).map((([e,t])=>t))).then((()=>{var e;null==(e=u.current.shift())||e()})).then((()=>r(t)))}));return(0,a.useMemo)((()=>({children:n,register:l,unregister:s,onStart:f,onStop:m,wait:c,chains:d})),[l,s,n,f,m,d,c])}function Nn(){}Tn.displayName="NestingContext";let Pn=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Dn(e){var t;let r={};for(let n of Pn)r[n]=null!=(t=e[n])?t:Nn;return r}let An=yr.RenderStrategy,Ln=Or((function(e,t){let{show:r,appear:n=!1,unmount:o,...i}=e,s=(0,a.useRef)(null),l=Vr(s,t);Dr();let u=hn();if(void 0===r&&null!==u&&(r=(u&vn.Open)===vn.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[c,d]=(0,a.useState)(r?"visible":"hidden"),f=Cn((()=>{d("hidden")})),[m,p]=(0,a.useState)(!0),g=(0,a.useRef)([r]);Pr((()=>{!1!==m&&g.current[g.current.length-1]!==r&&(g.current.push(r),p(!1))}),[g,r]);let v=(0,a.useMemo)((()=>({show:r,appear:n,initial:m})),[r,n,m]);(0,a.useEffect)((()=>{if(r)d("visible");else if(kn(f)){let e=s.current;if(!e)return;let t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&d("hidden")}else d("hidden")}),[r,f]);let h={unmount:o};return a.createElement(Tn.Provider,{value:f},a.createElement(On.Provider,{value:v},wr({ourProps:{...h,as:a.Fragment,children:a.createElement(Fn,{ref:l,...h,...i})},theirProps:{},defaultTag:a.Fragment,features:An,visible:"visible"===c,name:"Transition"})))})),Fn=Or((function(e,t){let{beforeEnter:r,afterEnter:n,beforeLeave:o,afterLeave:i,enter:s,enterFrom:l,enterTo:u,entered:c,leave:d,leaveFrom:f,leaveTo:m,...p}=e,g=(0,a.useRef)(null),v=Vr(g,t),h=p.unmount?br.Unmount:br.Hidden,{show:y,appear:b,initial:w}=function(){let e=(0,a.useContext)(On);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),[E,x]=(0,a.useState)(y?"visible":"hidden"),O=function(){let e=(0,a.useContext)(Tn);if(null===e)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}(),{register:S,unregister:T}=O,k=(0,a.useRef)(null);(0,a.useEffect)((()=>S(g)),[S,g]),(0,a.useEffect)((()=>{if(h===br.Hidden&&g.current)return y&&"visible"!==E?void x("visible"):gr(E,{hidden:()=>T(g),visible:()=>S(g)})}),[E,g,S,T,y,h]);let C=jr({enter:xn(s),enterFrom:xn(l),enterTo:xn(u),entered:xn(c),leave:xn(d),leaveFrom:xn(f),leaveTo:xn(m)}),N=function(e){let t=(0,a.useRef)(Dn(e));return(0,a.useEffect)((()=>{t.current=Dn(e)}),[e]),t}({beforeEnter:r,afterEnter:n,beforeLeave:o,afterLeave:i}),P=Dr();(0,a.useEffect)((()=>{if(P&&"visible"===E&&null===g.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[g,E,P]);let D=w&&!b,A=!P||D||k.current===y?"idle":y?"enter":"leave",_=function(e=0){let[t,r]=(0,a.useState)(e),n=bn(),o=(0,a.useCallback)((e=>{n.current&&r((t=>t|e))}),[t,n]),i=(0,a.useCallback)((e=>Boolean(t&e)),[t]),s=(0,a.useCallback)((e=>{n.current&&r((t=>t&~e))}),[r,n]),l=(0,a.useCallback)((e=>{n.current&&r((t=>t^e))}),[r]);return{flags:t,addFlag:o,hasFlag:i,removeFlag:s,toggleFlag:l}}(0),L=Rr((e=>gr(e,{enter:()=>{_.addFlag(vn.Opening),N.current.beforeEnter()},leave:()=>{_.addFlag(vn.Closing),N.current.beforeLeave()},idle:()=>{}}))),F=Rr((e=>gr(e,{enter:()=>{_.removeFlag(vn.Opening),N.current.afterEnter()},leave:()=>{_.removeFlag(vn.Closing),N.current.afterLeave()},idle:()=>{}}))),j=Cn((()=>{x("hidden"),T(g)}),O);(function({container:e,direction:t,classes:r,onStart:n,onStop:a}){let o=bn(),i=tn(),s=jr(t);Pr((()=>{let t=en();i.add(t.dispose);let l=e.current;if(l&&"idle"!==s.current&&o.current)return t.dispose(),n.current(s.current),t.add(function(e,t,r,n){let a=r?"enter":"leave",o=en(),i=void 0!==n?function(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}(n):()=>{};"enter"===a&&(e.removeAttribute("hidden"),e.style.display="");let s=gr(a,{enter:()=>t.enter,leave:()=>t.leave}),l=gr(a,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),u=gr(a,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return En(e,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),wn(e,...s,...u),o.nextFrame((()=>{En(e,...u),wn(e,...l),function(e,t){let r=en();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:a}=getComputedStyle(e),[o,i]=[n,a].map((e=>{let[t=0]=e.split(",").filter(Boolean).map((e=>e.includes("ms")?parseFloat(e):1e3*parseFloat(e))).sort(((e,t)=>t-e));return t})),s=o+i;if(0!==s){r.group((r=>{r.setTimeout((()=>{t(),r.dispose()}),s),r.addEventListener(e,"transitionrun",(e=>{e.target===e.currentTarget&&r.dispose()}))}));let n=r.addEventListener(e,"transitionend",(e=>{e.target===e.currentTarget&&(t(),n())}))}else t();r.add((()=>t())),r.dispose}(e,(()=>(En(e,...s),wn(e,...t.entered),i())))})),o.dispose}(l,r.current,"enter"===s.current,(()=>{t.dispose(),a.current(s.current)}))),t.dispose}),[t])})({container:g,classes:C,direction:A,onStart:jr((e=>{j.onStart(g,e,L)})),onStop:jr((e=>{j.onStop(g,e,F),"leave"===e&&!kn(j)&&(x("hidden"),T(g))}))}),(0,a.useEffect)((()=>{D&&(h===br.Hidden?k.current=null:k.current=y)}),[y,D,E]);let R=p,I={ref:v};return b&&y&&(R={...R,className:pr(p.className,...C.current.enter,...C.current.enterFrom)}),a.createElement(Tn.Provider,{value:j},a.createElement(yn,{value:gr(E,{visible:vn.Open,hidden:vn.Closed})|_.flags},wr({ourProps:I,theirProps:R,defaultTag:"div",features:An,visible:"visible"===E,name:"Transition.Child"})))})),jn=Or((function(e,t){let r=null!==(0,a.useContext)(On),n=null!==hn();return a.createElement(a.Fragment,null,!r&&n?a.createElement(Ln,{ref:t,...e}):a.createElement(Fn,{ref:t,...e}))})),Rn=Object.assign(Ln,{Child:jn,Root:Ln});function In(e){return Nr.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let Mn=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((e=>`${e}:not([tabindex='-1'])`)).join(",");var Vn,Un,Bn=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Bn||{}),Hn=((Un=Hn||{})[Un.Error=0]="Error",Un[Un.Overflow=1]="Overflow",Un[Un.Success=2]="Success",Un[Un.Underflow=3]="Underflow",Un),qn=((Vn=qn||{})[Vn.Previous=-1]="Previous",Vn[Vn.Next=1]="Next",Vn);var Wn=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Wn||{});var $n=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))($n||{});function zn(e){null==e||e.focus({preventScroll:!0})}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("keydown",(e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")}),!0),document.addEventListener("click",(e=>{1===e.detail?delete document.documentElement.dataset.headlessuiFocusVisible:0===e.detail&&(document.documentElement.dataset.headlessuiFocusVisible="")}),!0));let Gn=["textarea","input"].join(",");function Yn(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:a=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,i=Array.isArray(e)?r?function(e,t=(e=>e)){return e.slice().sort(((e,r)=>{let n=t(e),a=t(r);if(null===n||null===a)return 0;let o=n.compareDocumentPosition(a);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}(e):e:function(e=document.body){return null==e?[]:Array.from(e.querySelectorAll(Mn)).sort(((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))))}(e);a.length>0&&i.length>1&&(i=i.filter((e=>!a.includes(e)))),n=null!=n?n:o.activeElement;let s,l=(()=>{if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(1&t)return 0;if(2&t)return Math.max(0,i.indexOf(n))-1;if(4&t)return Math.max(0,i.indexOf(n))+1;if(8&t)return i.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=32&t?{preventScroll:!0}:{},d=0,f=i.length;do{if(d>=f||d+f<=0)return 0;let e=u+d;if(16&t)e=(e+f)%f;else{if(e<0)return 3;if(e>=f)return 1}s=i[e],null==s||s.focus(c),d+=l}while(s!==o.activeElement);return 6&t&&function(e){var t,r;return null!=(r=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,Gn))&&r}(s)&&s.select(),2}var Kn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Kn||{});function Qn(...e){return(0,a.useMemo)((()=>In(...e)),[...e])}function Jn(e,t,r,n){let o=jr(r);(0,a.useEffect)((()=>{function r(e){o.current(e)}return(e=null!=e?e:window).addEventListener(t,r,n),()=>e.removeEventListener(t,r,n)}),[e,t,n])}function Xn(e,t){let r=(0,a.useRef)([]),n=Rr(e);(0,a.useEffect)((()=>{let e=[...r.current];for(let[a,o]of t.entries())if(r.current[a]!==o){let a=n(t,e);return r.current=t,a}}),[n,...t])}function Zn(e){if(!e)return new Set;if("function"==typeof e)return new Set(e());let t=new Set;for(let r of e.current)r.current instanceof HTMLElement&&t.add(r.current);return t}var ea=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(ea||{});let ta=Or((function(e,t){let r=(0,a.useRef)(null),n=Vr(r,t),{initialFocus:o,containers:i,features:s=30,...l}=e;Dr()||(s=1);let u=Qn(r);!function({ownerDocument:e},t){let r=function(e=!0){let t=(0,a.useRef)(na.slice());return Xn((([e],[r])=>{!0===r&&!1===e&&Zr((()=>{t.current.splice(0)})),!1===r&&!0===e&&(t.current=na.slice())}),[e,na,t]),Rr((()=>{var e;return null!=(e=t.current.find((e=>null!=e&&e.isConnected)))?e:null}))}(t);Xn((()=>{t||(null==e?void 0:e.activeElement)===(null==e?void 0:e.body)&&zn(r())}),[t]);let n=(0,a.useRef)(!1);(0,a.useEffect)((()=>(n.current=!1,()=>{n.current=!0,Zr((()=>{n.current&&zn(r())}))})),[])}({ownerDocument:u},Boolean(16&s));let c=function({ownerDocument:e,container:t,initialFocus:r},n){let o=(0,a.useRef)(null),i=bn();return Xn((()=>{if(!n)return;let a=t.current;a&&Zr((()=>{if(!i.current)return;let t=null==e?void 0:e.activeElement;if(null!=r&&r.current){if((null==r?void 0:r.current)===t)return void(o.current=t)}else if(a.contains(t))return void(o.current=t);null!=r&&r.current?zn(r.current):Yn(a,Bn.First)===Hn.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),o.current=null==e?void 0:e.activeElement}))}),[n]),o}({ownerDocument:u,container:r,initialFocus:o},Boolean(2&s));!function({ownerDocument:e,container:t,containers:r,previousActiveElement:n},a){let o=bn();Jn(null==e?void 0:e.defaultView,"focus",(e=>{if(!a||!o.current)return;let i=Zn(r);t.current instanceof HTMLElement&&i.add(t.current);let s=n.current;if(!s)return;let l=e.target;l&&l instanceof HTMLElement?aa(i,l)?(n.current=l,zn(l)):(e.preventDefault(),e.stopPropagation(),zn(s)):zn(n.current)}),!0)}({ownerDocument:u,container:r,containers:i,previousActiveElement:c},Boolean(8&s));let d=function(){let e=(0,a.useRef)(0);return function(e,t,r){let n=jr(t);(0,a.useEffect)((()=>{function t(e){n.current(e)}return window.addEventListener(e,t,r),()=>window.removeEventListener(e,t,r)}),[e,r])}("keydown",(t=>{"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),!0),e}(),f=Rr((e=>{let t=r.current;t&&gr(d.current,{[Kn.Forwards]:()=>{Yn(t,Bn.First,{skipElements:[e.relatedTarget]})},[Kn.Backwards]:()=>{Yn(t,Bn.Last,{skipElements:[e.relatedTarget]})}})})),m=tn(),p=(0,a.useRef)(!1),g={ref:n,onKeyDown(e){"Tab"==e.key&&(p.current=!0,m.requestAnimationFrame((()=>{p.current=!1})))},onBlur(e){let t=Zn(i);r.current instanceof HTMLElement&&t.add(r.current);let n=e.relatedTarget;n instanceof HTMLElement&&"true"!==n.dataset.headlessuiFocusGuard&&(aa(t,n)||(p.current?Yn(r.current,gr(d.current,{[Kn.Forwards]:()=>Bn.Next,[Kn.Backwards]:()=>Bn.Previous})|Bn.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&zn(e.target)))}};return a.createElement(a.Fragment,null,Boolean(4&s)&&a.createElement(Xr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:Jr.Focusable}),wr({ourProps:g,theirProps:l,defaultTag:"div",name:"FocusTrap"}),Boolean(4&s)&&a.createElement(Xr,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:f,features:Jr.Focusable}))})),ra=Object.assign(ta,{features:ea}),na=[];function aa(e,t){for(let r of e)if(r.contains(t))return!0;return!1}!function(e){function t(){"loading"!==document.readyState&&((()=>{function e(e){e.target instanceof HTMLElement&&e.target!==document.body&&na[0]!==e.target&&(na.unshift(e.target),na=na.filter((e=>null!=e&&e.isConnected)),na.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})})(),document.removeEventListener("DOMContentLoaded",t))}"undefined"!=typeof window&&"undefined"!=typeof document&&(document.addEventListener("DOMContentLoaded",t),t())}();let oa=(0,a.createContext)(!1);function ia(e){return a.createElement(oa.Provider,{value:e.force},e.children)}let sa=a.Fragment,la=a.Fragment,ua=(0,a.createContext)(null),ca=Or((function(e,t){let r=e,n=(0,a.useRef)(null),o=Vr(Mr((e=>{n.current=e})),t),i=Qn(n),l=function(e){let t=(0,a.useContext)(oa),r=(0,a.useContext)(ua),n=Qn(e),[o,i]=(0,a.useState)((()=>{if(!t&&null!==r||Nr.isServer)return null;let e=null==n?void 0:n.getElementById("headlessui-portal-root");if(e)return e;if(null===n)return null;let a=n.createElement("div");return a.setAttribute("id","headlessui-portal-root"),n.body.appendChild(a)}));return(0,a.useEffect)((()=>{null!==o&&(null!=n&&n.body.contains(o)||null==n||n.body.appendChild(o))}),[o,n]),(0,a.useEffect)((()=>{t||null!==r&&i(r.current)}),[r,i,t]),o}(n),[u]=(0,a.useState)((()=>{var e;return Nr.isServer?null:null!=(e=null==i?void 0:i.createElement("div"))?e:null})),c=Dr(),d=(0,a.useRef)(!1);return Pr((()=>{if(d.current=!1,l&&u)return l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u)),()=>{d.current=!0,Zr((()=>{var e;d.current&&(!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&(null==(e=l.parentElement)||e.removeChild(l))))}))}}),[l,u]),c&&l&&u?(0,s.createPortal)(wr({ourProps:{ref:o},theirProps:r,defaultTag:sa,name:"Portal"}),u):null})),da=Or((function(e,t){let{target:r,...n}=e,o={ref:Vr(t)};return a.createElement(ua.Provider,{value:r},wr({ourProps:o,theirProps:n,defaultTag:la,name:"Popover.Group"}))})),fa=Object.assign(ca,{Group:da}),ma=(0,a.createContext)((()=>{}));ma.displayName="StackContext";var pa=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(pa||{});function ga({children:e,onUpdate:t,type:r,element:n,enabled:o}){let i=(0,a.useContext)(ma),s=Rr(((...e)=>{null==t||t(...e),i(...e)}));return Pr((()=>{let e=void 0===o||!0===o;return e&&s(0,r,n),()=>{e&&s(1,r,n)}}),[s,r,n,o]),a.createElement(ma.Provider,{value:s},e)}function va(e,t,r){let n=jr(t);(0,a.useEffect)((()=>{function t(e){n.current(e)}return document.addEventListener(e,t,r),()=>document.removeEventListener(e,t,r)}),[e,r])}const ha="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},{useState:ya,useEffect:ba,useLayoutEffect:wa,useDebugValue:Ea}=o;function xa(e){const t=e.getSnapshot,r=e.value;try{const e=t();return!ha(r,e)}catch{return!0}}const Oa="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t,r){return t()}:function(e,t,r){const n=t(),[{inst:a},o]=ya({inst:{value:n,getSnapshot:t}});return wa((()=>{a.value=n,a.getSnapshot=t,xa(a)&&o({inst:a})}),[e,n,t]),ba((()=>(xa(a)&&o({inst:a}),e((()=>{xa(a)&&o({inst:a})})))),[e]),Ea(n),n},Sa="useSyncExternalStore"in o?(e=>e.useSyncExternalStore)(o):Oa;function Ta(){let e;return{before({doc:t}){var r;let n=t.documentElement;e=(null!=(r=t.defaultView)?r:window).innerWidth-n.clientWidth},after({doc:t,d:r}){let n=t.documentElement,a=n.clientWidth-n.offsetWidth,o=e-a;r.style(n,"paddingRight",`${o}px`)}}}function ka(){if(!(/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0))return{};let e;return{before(){e=window.pageYOffset},after({doc:t,d:r,meta:n}){function a(e){return n.containers.flatMap((e=>e())).some((t=>t.contains(e)))}r.style(t.body,"marginTop",`-${e}px`),window.scrollTo(0,0);let o=null;r.addEventListener(t,"click",(e=>{if(e.target instanceof HTMLElement)try{let r=e.target.closest("a");if(!r)return;let{hash:n}=new URL(r.href),i=t.querySelector(n);i&&!a(i)&&(o=i)}catch{}}),!0),r.addEventListener(t,"touchmove",(e=>{e.target instanceof HTMLElement&&!a(e.target)&&e.preventDefault()}),{passive:!1}),r.add((()=>{window.scrollTo(0,window.pageYOffset+e),o&&o.isConnected&&(o.scrollIntoView({block:"nearest"}),o=null)}))}}}function Ca(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Na=function(e,t){let r=new Map,n=new Set;return{getSnapshot(){return r},subscribe(e){return n.add(e),()=>n.delete(e)},dispatch(e,...a){let o=t[e].call(r,...a);o&&(r=o,n.forEach((e=>e())))}}}(0,{PUSH(e,t){var r;let n=null!=(r=this.get(e))?r:{doc:e,count:0,d:en(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:Ca(r)},a=[ka(),Ta(),{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}];a.forEach((({before:e})=>null==e?void 0:e(n))),a.forEach((({after:e})=>null==e?void 0:e(n)))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Na.subscribe((()=>{let e=Na.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let e="hidden"===t.get(r.doc),n=0!==r.count;(n&&!e||!n&&e)&&Na.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),0===r.count&&Na.dispatch("TEARDOWN",r)}}));let Pa=new Map,Da=new Map;function Aa(e,t=!0){Pr((()=>{var r;if(!t)return;let n="function"==typeof e?e():e.current;if(!n)return;let a=null!=(r=Da.get(n))?r:0;return Da.set(n,a+1),0!==a||(Pa.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),function(){var e;if(!n)return;let t=null!=(e=Da.get(n))?e:1;if(1===t?Da.delete(n):Da.set(n,t-1),1!==t)return;let r=Pa.get(n);r&&(null===r["aria-hidden"]?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",r["aria-hidden"]),n.inert=r.inert,Pa.delete(n))}}),[e,t])}var _a=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(_a||{}),La=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(La||{});let Fa={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},ja=(0,a.createContext)(null);function Ra(e){let t=(0,a.useContext)(ja);if(null===t){let t=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Ra),t}return t}function Ia(e,t){return gr(t.type,Fa,e,t)}ja.displayName="DialogContext";let Ma=yr.RenderStrategy|yr.Static,Va=Or((function(e,t){let r=_r(),{id:n=`headlessui-dialog-${r}`,open:o,onClose:i,initialFocus:s,__demoMode:l=!1,...u}=e,[c,d]=(0,a.useState)(0),f=hn();void 0===o&&null!==f&&(o=(f&vn.Open)===vn.Open);let m=(0,a.useRef)(null),p=Vr(m,t),g=(0,a.useRef)(null),v=Qn(m),h=e.hasOwnProperty("open")||null!==f,y=e.hasOwnProperty("onClose");if(!h&&!y)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!h)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!y)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof o)throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${o}`);if("function"!=typeof i)throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${i}`);let b=o?0:1,[w,E]=(0,a.useReducer)(Ia,{titleId:null,descriptionId:null,panelRef:(0,a.createRef)()}),x=Rr((()=>i(!1))),O=Rr((e=>E({type:0,id:e}))),S=!!Dr()&&!l&&0===b,T=c>1,k=null!==(0,a.useContext)(ja),C=T?"parent":"leaf",N=null!==f&&(f&vn.Closing)===vn.Closing,P=!k&&!N&&S,D=(0,a.useCallback)((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==v?void 0:v.querySelectorAll("body > *"))?e:[]).find((e=>"headlessui-portal-root"!==e.id&&e.contains(g.current)&&e instanceof HTMLElement)))?t:null}),[g]);Aa(D,P);let A=!!T||S,_=(0,a.useCallback)((()=>{var e,t;return null!=(t=Array.from(null!=(e=null==v?void 0:v.querySelectorAll("[data-headlessui-portal]"))?e:[]).find((e=>e.contains(g.current)&&e instanceof HTMLElement)))?t:null}),[g]);Aa(_,A);let L=Rr((()=>{var e,t;return[...Array.from(null!=(e=null==v?void 0:v.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))?e:[]).filter((e=>!(e===document.body||e===document.head||!(e instanceof HTMLElement)||e.contains(g.current)||w.panelRef.current&&e.contains(w.panelRef.current)))),null!=(t=w.panelRef.current)?t:m.current]}));!function(e,t,r=!0){let n=(0,a.useRef)(!1);function o(r,a){if(!n.current||r.defaultPrevented)return;let o=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),i=a(r);if(null!==i&&i.getRootNode().contains(i)){for(let e of o){if(null===e)continue;let t=e instanceof HTMLElement?e:e.current;if(null!=t&&t.contains(i)||r.composed&&r.composedPath().includes(t))return}return!function(e,t=0){var r;return e!==(null==(r=In(e))?void 0:r.body)&&gr(t,{0(){return e.matches(Mn)},1(){let t=e;for(;null!==t;){if(t.matches(Mn))return!0;t=t.parentElement}return!1}})}(i,Wn.Loose)&&-1!==i.tabIndex&&r.preventDefault(),t(r,i)}}(0,a.useEffect)((()=>{requestAnimationFrame((()=>{n.current=r}))}),[r]);let i=(0,a.useRef)(null);va("mousedown",(e=>{var t,r;n.current&&(i.current=(null==(r=null==(t=e.composedPath)?void 0:t.call(e))?void 0:r[0])||e.target)}),!0),va("click",(e=>{i.current&&(o(e,(()=>i.current)),i.current=null)}),!0),va("blur",(e=>o(e,(()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null))),!0)}((()=>L()),x,!(!S||T));let F=!(T||0!==b);Jn(null==v?void 0:v.defaultView,"keydown",(e=>{F&&(e.defaultPrevented||e.key===Lr.Escape&&(e.preventDefault(),e.stopPropagation(),x()))})),function(e,t,r=(()=>[document.body])){!function(e,t,r){let n=function(e){return Sa(e.subscribe,e.getSnapshot,e.getSnapshot)}(Na),a=e?n.get(e):void 0,o=!!a&&a.count>0;Pr((()=>{if(e&&t)return Na.dispatch("PUSH",e,r),()=>Na.dispatch("POP",e,r)}),[t,e])}(e,t,(e=>{var t;return{containers:[...null!=(t=e.containers)?t:[],r]}}))}(v,!(N||0!==b||k),L),(0,a.useEffect)((()=>{if(0!==b||!m.current)return;let e=new ResizeObserver((e=>{for(let t of e){let e=t.target.getBoundingClientRect();0===e.x&&0===e.y&&0===e.width&&0===e.height&&x()}}));return e.observe(m.current),()=>e.disconnect()}),[b,m,x]);let[j,R]=zr(),I=(0,a.useMemo)((()=>[{dialogState:b,close:x,setTitleId:O},w]),[b,w,x,O]),M=(0,a.useMemo)((()=>({open:0===b})),[b]),V={ref:p,id:n,role:"dialog","aria-modal":0===b||void 0,"aria-labelledby":w.titleId,"aria-describedby":j};return a.createElement(ga,{type:"Dialog",enabled:0===b,element:m,onUpdate:Rr(((e,t)=>{"Dialog"===t&&gr(e,{[pa.Add]:()=>d((e=>e+1)),[pa.Remove]:()=>d((e=>e-1))})}))},a.createElement(ia,{force:!0},a.createElement(fa,null,a.createElement(ja.Provider,{value:I},a.createElement(fa.Group,{target:m},a.createElement(ia,{force:!1},a.createElement(R,{slot:M,name:"Dialog.Description"},a.createElement(ra,{initialFocus:s,containers:L,features:S?gr(C,{parent:ra.features.RestoreFocus,leaf:ra.features.All&~ra.features.FocusLock}):ra.features.None},wr({ourProps:V,theirProps:u,slot:M,defaultTag:"div",features:Ma,visible:0===b,name:"Dialog"})))))))),a.createElement(Xr,{features:Jr.Hidden,ref:g}))})),Ua=Or((function(e,t){let r=_r(),{id:n=`headlessui-dialog-backdrop-${r}`,...o}=e,[{dialogState:i},s]=Ra("Dialog.Backdrop"),l=Vr(t);(0,a.useEffect)((()=>{if(null===s.panelRef.current)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")}),[s.panelRef]);let u=(0,a.useMemo)((()=>({open:0===i})),[i]);return a.createElement(ia,{force:!0},a.createElement(fa,null,wr({ourProps:{ref:l,id:n,"aria-hidden":!0},theirProps:o,slot:u,defaultTag:"div",name:"Dialog.Backdrop"})))})),Ba=Or((function(e,t){let r=_r(),{id:n=`headlessui-dialog-panel-${r}`,...o}=e,[{dialogState:i},s]=Ra("Dialog.Panel"),l=Vr(t,s.panelRef),u=(0,a.useMemo)((()=>({open:0===i})),[i]),c=Rr((e=>{e.stopPropagation()}));return wr({ourProps:{ref:l,id:n,onClick:c},theirProps:o,slot:u,defaultTag:"div",name:"Dialog.Panel"})})),Ha=Or((function(e,t){let r=_r(),{id:n=`headlessui-dialog-overlay-${r}`,...o}=e,[{dialogState:i,close:s}]=Ra("Dialog.Overlay"),l=Vr(t),u=Rr((e=>{if(e.target===e.currentTarget){if(Fr(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),s()}}));return wr({ourProps:{ref:l,id:n,"aria-hidden":!0,onClick:u},theirProps:o,slot:(0,a.useMemo)((()=>({open:0===i})),[i]),defaultTag:"div",name:"Dialog.Overlay"})})),qa=Or((function(e,t){let r=_r(),{id:n=`headlessui-dialog-title-${r}`,...o}=e,[{dialogState:i,setTitleId:s}]=Ra("Dialog.Title"),l=Vr(t);(0,a.useEffect)((()=>(s(n),()=>s(null))),[n,s]);let u=(0,a.useMemo)((()=>({open:0===i})),[i]);return wr({ourProps:{ref:l,id:n},theirProps:o,slot:u,defaultTag:"h2",name:"Dialog.Title"})})),Wa=Object.assign(Va,{Backdrop:Ua,Panel:Ba,Overlay:Ha,Title:qa,Description:Yr});var $a=r(664);function za(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ga(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?za(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):za(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ya=function(e){var t=re((0,a.useState)(!0),2),r=t[0],o=t[1],i=(0,a.useRef)(null),s=Ga(Ga({},{title:"",message:"",cancel_btn:!0,buttons:[{label:"Danger Action",is_primary:!0,onClick:function(){}},{label:"No, Go back!",onClick:function(){}}]}),null==e?void 0:e.config);return(0,a.useEffect)((function(){if(!r){var e=document.getElementById("ap-confirm-alert");e&&e.remove()}}),[r]),(0,n.createElement)(Rn.Root,{show:r,as:a.Fragment},(0,n.createElement)(Wa,{as:"div",className:"ap-alert-modal fixed inset-0 overflow-y-auto z-[99999]",initialFocus:i,onClose:o},(0,n.createElement)("div",{className:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},(0,n.createElement)(Rn.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0"},(0,n.createElement)(Wa.Overlay,{className:"fixed inset-0 bg-app-border bg-opacity-75 transition-opacity"})),(0,n.createElement)("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},""),(0,n.createElement)(Rn.Child,{as:a.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},(0,n.createElement)("div",{className:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"},(0,n.createElement)("div",{className:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},(0,n.createElement)("div",{className:"hidden sm:block absolute top-0 right-0 pt-4 pr-4"},(0,n.createElement)("button",{type:"button",className:"bg-white rounded-md text-app-text hover:text-app-text focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-app-primary",onClick:function(){return o(!1)}},(0,n.createElement)("span",{className:"sr-only"},"Close"),(0,n.createElement)($a.XIcon,{className:"h-6 w-6","aria-hidden":"true"}))),(0,n.createElement)("div",{className:"sm:flex sm:items-start"},(0,n.createElement)("div",{className:"mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-alert-error-bg sm:mx-0 sm:h-10 sm:w-10"},(0,n.createElement)($a.ExclamationIcon,{className:"h-6 w-6 text-alert-error-text","aria-hidden":"true"})),(0,n.createElement)("div",{className:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},(0,n.createElement)(Wa.Title,{as:"h3",className:"text-lg leading-6 font-medium text-app-heading"},s.title),(0,n.createElement)("div",{className:"mt-2"},(0,n.createElement)("p",{className:"text-sm text-app-text"},s.message))))),(0,n.createElement)("div",{className:"bg-app-background px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},s.buttons.map((function(e,t){return(0,n.createElement)("button",{key:t,type:"button",className:" ".concat(e.is_primary?"bg-alert-error-text hover:bg-alert-error focus:ring-alert-error border-transparent text-white":"bg-white hover:bg-app-secondary focus:ring-app-primary border-app-border text-app-text"," w-full inline-flex justify-center rounded-md border shadow-sm px-4 py-2 text-base font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 sm:ml-3 sm:w-auto sm:text-sm"),onClick:function(t){t.preventDefault(),e.onClick(),o(!1)}},e.label)})),!!s.cancel_btn&&(0,n.createElement)("button",{type:"button",className:"mt-3 w-full inline-flex justify-center rounded-md border border-app-border shadow-sm px-4 py-2 bg-white text-base font-medium text-app-text hover:bg-app-secondary focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-app-primary sm:mt-0 sm:w-auto sm:text-sm",onClick:function(){return o(!1)},ref:i},"Cancel")))))))};function Ka(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qa(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.filter(Boolean).join(" ")}var Ja=function(){var e=JSON.parse(sureTriggerData.settings),t=re((0,a.useState)(sureTriggerData.settingsForm),2),r=t[0],o=t[1],i=function(e={}){const t=a.useRef(),[r,n]=a.useState({isDirty:!1,isValidating:!1,isLoading:Mt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Mt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...fr(e,(()=>n((e=>({...e}))))),formState:r});const o=t.current.control;return o._options=e,function(e){const t=a.useRef(e);t.current=e,a.useEffect((()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}}),[e.disabled])}({subject:o._subjects.state,next:e=>{((e,t,r,n)=>{r(e);const{name:a,...o}=e;return Tt(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!n||wt)))})(e,o._proxyFormState,o._updateFormState,!0)&&n({...o._formState})}}),a.useEffect((()=>{e.values&&!er(e.values,o._defaultValues)?o._reset(e.values,o._options.resetOptions):o._resetDefaultValues()}),[e.values,o]),a.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),t.current.formState=((e,t,r,n=!0)=>{const a={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(a,o,{get:()=>{const a=o;return t._proxyFormState[a]!==wt&&(t._proxyFormState[a]=!n||wt),r&&(r[a]=!0),e[a]}});return a})(r,o),t.current}({defaultValues:e}),s=function(e){var t,r,a,o,i;null!==(t=e.confirmation)&&void 0!==t&&t.required?(o={title:null===(r=e.confirmation)||void 0===r?void 0:r.title,message:null===(a=e.confirmation)||void 0===a?void 0:a.message,cancel_btn:!0,buttons:[{label:e.label,is_primary:!0,onClick:function(){l(e)}}]},(i=document.createElement("div")).id="ap-confirm-alert",document.body.appendChild(i),ReactDOM.render((0,n.createElement)(Ya,{config:o}),document.getElementById("ap-confirm-alert"))):l(e)},l=function(e){var t=new FormData;t.append("action","st_settings_ajax_button"),t.append("button_name",e.name),t.append("button_value",e.value),t.append("nonce",sureTriggerData.nonce);var r=pn(sureTriggerData.ajaxurl,t).then((function(t){t.success&&e.redirect_after_click&&(location.href=e.redirect_url)})),n=(0,We.__)("Sending request…","suretriggers"),a=(0,We.__)("Request completed","suretriggers");e.message_pending&&(n=e.message_pending),e.message_done&&(a=e.message_done),Be.promise(r,{pending:n,success:a,error:(0,We.__)("Something went wrong! please try again later","suretriggers")})},u=Ye("settingsTab")||Object.keys(r).find((function(e){return r[e].current})),d=r[u].sections,f=function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:12;return t.map((function(t,a){return t.constructor===Array?e(t,12/t.length):void 0!==t.type?("ajax-button"===t.type&&(t.onClickAjaxButton=s),(0,n.createElement)("div",{key:a,className:"col-span-12 sm:col-span-".concat(r)},(0,n.createElement)(ln,{field:t}))):void 0}))};return(0,n.createElement)("div",{className:"bg-white rounded-lg shadow overflow-hidden"},(0,n.createElement)("div",{className:"divide-y divide-app-border lg:grid lg:grid-cols-12 lg:divide-y-0 lg:divide-x"},(0,n.createElement)("aside",{className:"py-6 lg:col-span-3"},(0,n.createElement)("nav",{className:"space-y-1"},Object.keys(r).map((function(e){var t=r[e],a=u===e;return(0,n.createElement)("a",{key:e,href:"#",className:Qa(a?"bg-alert-info-bg text-app-heading":"text-app-text hover:bg-alert-info-bg","no-underline group px-3 py-2 flex items-center text-sm font-medium"),"aria-current":a?"page":void 0,onClick:function(t){return function(e,t){e.preventDefault(),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(history.pushState){var r=new URLSearchParams(window.location.search);r.set(e,t);var n=window.location.protocol+"//"+window.location.host+window.location.pathname+"?"+r.toString();window.history.pushState({path:n},"",n)}}("settingsTab",t);var n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ka(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ka(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},r);Object.keys(n).map((function(e){n[e].current=!1,t===e&&(n[e].current=!0)})),o(n)}(t,e)}},(0,n.createElement)("i",{className:Qa(a?"text-app-primary":"text-app-inactive-icon group-hover:text-app-primary","flex-shrink-0 -ml-1 mr-3 h-6 w-6","dashicons dashicons-admin-generic"),"aria-hidden":"true"}),(0,n.createElement)("span",{className:"truncate"},t.title))})))),(0,n.createElement)(St,i,(0,n.createElement)("form",{className:"divide-y divide-app-border lg:col-span-9",onSubmit:i.handleSubmit((function(e){var t=new FormData;t.append("action","st_save_settings"),t.append("settings",JSON.stringify(e)),t.append("nonce",sureTriggerData.nonce);var r=pn(sureTriggerData.ajaxurl,t);Be.promise(r,{pending:(0,We.__)("Saving settings…","suretriggers"),success:(0,We.__)("Settings has been saved","suretriggers"),error:(0,We.__)("Something went wrong! please try again later","suretriggers")})}))},(0,n.createElement)("div",{className:"lg:col-span-9"},(0,n.createElement)("div",{className:"st-settings-section-wrap divide-y divide-app-border"},d.map((function(e,t){return(0,n.createElement)("div",{key:"".concat(u,"-").concat(t),className:"py-6 px-4 sm:p-6 lg:pb-8"},(0,n.createElement)("div",null,(0,n.createElement)("h2",{className:"text-lg leading-6 font-medium text-app-heading"},e.title),(0,n.createElement)("p",{className:"mt-1 text-sm text-app-text"}," ",e.subtitle," ")),(0,n.createElement)("div",{className:"mt-6 grid grid-cols-12 gap-6"},f(e.fields)))}))),(0,n.createElement)("div",{className:"border-t"},(0,n.createElement)("div",{className:"py-4 px-4 flex justify-end sm:px-6"},(0,n.createElement)("button",{type:"submit",className:"ml-5 hover:bg-app-primary-hover focus:outline-none bg-app-primary inline-flex items-center px-3 py-2 border border-transparent text-sm font-medium rounded-md text-white"},"Save Settings"))))))),(0,n.createElement)(Pe,{position:"top-right"}))},Xa=Ye("page");l().render((0,n.createElement)((function(e){var t=e.reducer,r=e.initialState,o=e.children;return(0,n.createElement)(x.Provider,{value:(0,a.useReducer)(t,r)},o)}),{reducer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:E,t=arguments.length>1?arguments[1]:void 0,r=t.type,n=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(t,v);return"set"===r?y(y({},e),n):e},initialState:E},(0,n.createElement)((function(){var e,t;return"suretriggers"===Xa?e=""!==(t=re(O(),1)[0].siteContentAccessKey)&&null!==t&&!1!==t&&"connection-denied"!==t?(0,n.createElement)("div",{className:"dashboard-container"},(0,n.createElement)(ze,null)):(0,n.createElement)(rt,null):"st-settings"===Xa&&(e=(0,n.createElement)(Ja,null)),(0,n.createElement)(ee,null,e)}),null)),document.getElementById("sure-triggger-entry"))},196:function(e){"use strict";e.exports=window.React}},a={};function o(e){var t=a[e];if(void 0!==t)return t.exports;var r=a[e]={exports:{}};return n[e](r,r.exports,o),r.exports}o.m=n,e=[],o.O=function(t,r,n,a){if(!r){var i=1/0;for(c=0;c<e.length;c++){r=e[c][0],n=e[c][1],a=e[c][2];for(var s=!0,l=0;l<r.length;l++)(!1&a||i>=a)&&Object.keys(o.O).every((function(e){return o.O[e](r[l])}))?r.splice(l--,1):(s=!1,a<i&&(i=a));if(s){e.splice(c--,1);var u=n();void 0!==u&&(t=u)}}return t}a=a||0;for(var c=e.length;c>0&&e[c-1][2]>a;c--)e[c]=e[c-1];e[c]=[r,n,a]},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},r=Object.getPrototypeOf?function(e){return Object.getPrototypeOf(e)}:function(e){return e.__proto__},o.t=function(e,n){if(1&n&&(e=this(e)),8&n)return e;if("object"==typeof e&&e){if(4&n&&e.__esModule)return e;if(16&n&&"function"==typeof e.then)return e}var a=Object.create(null);o.r(a);var i={};t=t||[null,r({}),r([]),r(r)];for(var s=2&n&&e;"object"==typeof s&&!~t.indexOf(s);s=r(s))Object.getOwnPropertyNames(s).forEach((function(t){i[t]=function(){return e[t]}}));return i.default=function(){return e},o.d(a,i),a},o.d=function(e,t){for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},function(){var e={179:0,278:0};o.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,a,i=r[0],s=r[1],l=r[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(n in s)o.o(s,n)&&(o.m[n]=s[n]);if(l)var c=l(o)}for(t&&t(r);u<i.length;u++)a=i[u],o.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return o.O(c)},r=self.webpackChunksuretriggers=self.webpackChunksuretriggers||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}();var i=o.O(void 0,[278],(function(){return o(341)}));i=o.O(i)}();