@inploi/plugin-chatbot 3.23.1 → 3.23.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cdn/index.js CHANGED
@@ -1,4 +1,4 @@
1
- var vm=Object.defineProperty;var mm=(Je,ge,Ve)=>ge in Je?vm(Je,ge,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Je[ge]=Ve;var js=(Je,ge,Ve)=>(mm(Je,typeof ge!="symbol"?ge+"":ge,Ve),Ve);(function(){"use strict";var Je=e=>e,ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ve(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rs=Array.isArray,qr=Rs,Vs=typeof ge=="object"&&ge&&ge.Object===Object&&ge,Bs=Vs,zs=Bs,Us=typeof self=="object"&&self&&self.Object===Object&&self,Hs=zs||Us||Function("return this")(),Kr=Hs,qs=Kr,Ks=qs.Symbol,Wr=Ks,mi=Wr,bi=Object.prototype,Ws=bi.hasOwnProperty,Gs=bi.toString,Tt=mi?mi.toStringTag:void 0;function Ys(e){var t=Ws.call(e,Tt),r=e[Tt];try{e[Tt]=void 0;var n=!0}catch{}var o=Gs.call(e);return n&&(t?e[Tt]=r:delete e[Tt]),o}var Zs=Ys,Xs=Object.prototype,Qs=Xs.toString;function Js(e){return Qs.call(e)}var el=Js,gi=Wr,tl=Zs,rl=el,nl="[object Null]",il="[object Undefined]",yi=gi?gi.toStringTag:void 0;function ol(e){return e==null?e===void 0?il:nl:yi&&yi in Object(e)?tl(e):rl(e)}var _i=ol;function al(e){return e!=null&&typeof e=="object"}var sl=al,ll=_i,cl=sl,ul="[object Symbol]";function dl(e){return typeof e=="symbol"||cl(e)&&ll(e)==ul}var Gr=dl,fl=qr,pl=Gr,hl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vl=/^\w*$/;function ml(e,t){if(fl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||pl(e)?!0:vl.test(e)||!hl.test(e)||t!=null&&e in Object(t)}var bl=ml;function gl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var wi=gl,yl=_i,_l=wi,wl="[object AsyncFunction]",xl="[object Function]",kl="[object GeneratorFunction]",$l="[object Proxy]";function Sl(e){if(!_l(e))return!1;var t=yl(e);return t==xl||t==kl||t==wl||t==$l}var Cl=Sl,El=Kr,Ol=El["__core-js_shared__"],Il=Ol,Yr=Il,xi=function(){var e=/[^.]+$/.exec(Yr&&Yr.keys&&Yr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pl(e){return!!xi&&xi in e}var Al=Pl,Tl=Function.prototype,Dl=Tl.toString;function Nl(e){if(e!=null){try{return Dl.call(e)}catch{}try{return e+""}catch{}}return""}var Ml=Nl,Fl=Cl,Ll=Al,jl=wi,Rl=Ml,Vl=/[\\^$.*+?()[\]{}|]/g,Bl=/^\[object .+?Constructor\]$/,zl=Function.prototype,Ul=Object.prototype,Hl=zl.toString,ql=Ul.hasOwnProperty,Kl=RegExp("^"+Hl.call(ql).replace(Vl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wl(e){if(!jl(e)||Ll(e))return!1;var t=Fl(e)?Kl:Bl;return t.test(Rl(e))}var Gl=Wl;function Yl(e,t){return e==null?void 0:e[t]}var Zl=Yl,Xl=Gl,Ql=Zl;function Jl(e,t){var r=Ql(e,t);return Xl(r)?r:void 0}var ki=Jl,ec=ki,tc=ec(Object,"create"),er=tc,$i=er;function rc(){this.__data__=$i?$i(null):{},this.size=0}var nc=rc;function ic(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oc=ic,ac=er,sc="__lodash_hash_undefined__",lc=Object.prototype,cc=lc.hasOwnProperty;function uc(e){var t=this.__data__;if(ac){var r=t[e];return r===sc?void 0:r}return cc.call(t,e)?t[e]:void 0}var dc=uc,fc=er,pc=Object.prototype,hc=pc.hasOwnProperty;function vc(e){var t=this.__data__;return fc?t[e]!==void 0:hc.call(t,e)}var mc=vc,bc=er,gc="__lodash_hash_undefined__";function yc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bc&&t===void 0?gc:t,this}var _c=yc,wc=nc,xc=oc,kc=dc,$c=mc,Sc=_c;function ut(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ut.prototype.clear=wc,ut.prototype.delete=xc,ut.prototype.get=kc,ut.prototype.has=$c,ut.prototype.set=Sc;var Cc=ut;function Ec(){this.__data__=[],this.size=0}var Oc=Ec;function Ic(e,t){return e===t||e!==e&&t!==t}var Pc=Ic,Ac=Pc;function Tc(e,t){for(var r=e.length;r--;)if(Ac(e[r][0],t))return r;return-1}var tr=Tc,Dc=tr,Nc=Array.prototype,Mc=Nc.splice;function Fc(e){var t=this.__data__,r=Dc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Mc.call(t,r,1),--this.size,!0}var Lc=Fc,jc=tr;function Rc(e){var t=this.__data__,r=jc(t,e);return r<0?void 0:t[r][1]}var Vc=Rc,Bc=tr;function zc(e){return Bc(this.__data__,e)>-1}var Uc=zc,Hc=tr;function qc(e,t){var r=this.__data__,n=Hc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Kc=qc,Wc=Oc,Gc=Lc,Yc=Vc,Zc=Uc,Xc=Kc;function dt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}dt.prototype.clear=Wc,dt.prototype.delete=Gc,dt.prototype.get=Yc,dt.prototype.has=Zc,dt.prototype.set=Xc;var Qc=dt,Jc=ki,eu=Kr,tu=Jc(eu,"Map"),ru=tu,Si=Cc,nu=Qc,iu=ru;function ou(){this.size=0,this.__data__={hash:new Si,map:new(iu||nu),string:new Si}}var au=ou;function su(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var lu=su,cu=lu;function uu(e,t){var r=e.__data__;return cu(t)?r[typeof t=="string"?"string":"hash"]:r.map}var rr=uu,du=rr;function fu(e){var t=du(this,e).delete(e);return this.size-=t?1:0,t}var pu=fu,hu=rr;function vu(e){return hu(this,e).get(e)}var mu=vu,bu=rr;function gu(e){return bu(this,e).has(e)}var yu=gu,_u=rr;function wu(e,t){var r=_u(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var xu=wu,ku=au,$u=pu,Su=mu,Cu=yu,Eu=xu;function ft(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ft.prototype.clear=ku,ft.prototype.delete=$u,ft.prototype.get=Su,ft.prototype.has=Cu,ft.prototype.set=Eu;var Ou=ft,Ci=Ou,Iu="Expected a function";function Zr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Iu);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Zr.Cache||Ci),r}Zr.Cache=Ci;var Pu=Zr,Au=Pu,Tu=500;function Du(e){var t=Au(e,function(n){return r.size===Tu&&r.clear(),n}),r=t.cache;return t}var Nu=Du,Mu=Nu,Fu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lu=/\\(\\)?/g,ju=Mu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Fu,function(r,n,o,i){t.push(o?i.replace(Lu,"$1"):n||r)}),t}),Ru=ju;function Vu(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Bu=Vu,Ei=Wr,zu=Bu,Uu=qr,Hu=Gr,qu=1/0,Oi=Ei?Ei.prototype:void 0,Ii=Oi?Oi.toString:void 0;function Pi(e){if(typeof e=="string")return e;if(Uu(e))return zu(e,Pi)+"";if(Hu(e))return Ii?Ii.call(e):"";var t=e+"";return t=="0"&&1/e==-qu?"-0":t}var Ku=Pi,Wu=Ku;function Gu(e){return e==null?"":Wu(e)}var Yu=Gu,Zu=qr,Xu=bl,Qu=Ru,Ju=Yu;function ed(e,t){return Zu(e)?e:Xu(e,t)?[e]:Qu(Ju(e))}var td=ed,rd=Gr,nd=1/0;function id(e){if(typeof e=="string"||rd(e))return e;var t=e+"";return t=="0"&&1/e==-nd?"-0":t}var od=id,ad=td,sd=od;function ld(e,t){t=ad(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[sd(t[r++])];return r&&r==n?e:void 0}var cd=ld,ud=cd;function dd(e,t,r){var n=e==null?void 0:ud(e,t);return n===void 0?r:n}var fd=dd;const Dt=Ve(fd);var Nt,S,Ai,Ti,et,Di,Ni,Xr,Mi,pt={},Fi=[],pd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nr=Array.isArray;function Ae(e,t){for(var r in t)e[r]=t[r];return e}function Li(e){var t=e.parentNode;t&&t.removeChild(e)}function D(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Nt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Mt(e,a,n,o,null)}function Mt(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Ai};return o==null&&S.vnode!=null&&S.vnode(i),i}function ji(){return{current:null}}function W(e){return e.children}function ye(e,t){this.props=e,this.context=t}function ir(e,t){if(t==null)return e.__?ir(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ir(e):null}function Ri(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Ri(e)}}function Qr(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!or.__r++||Di!==S.debounceRendering)&&((Di=S.debounceRendering)||Ni)(or)}function or(){var e,t,r,n,o,i,a,s,l;for(et.sort(Xr);e=et.shift();)e.__d&&(t=et.length,n=void 0,o=void 0,i=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],o=[],(i=Ae({},a)).__v=a.__v+1,Jr(l,a,i,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??ir(a),a.__h,o),Ki(n,a,o),a.__e!=s&&Ri(a)),et.length>t&&et.sort(Xr));or.__r=0}function Vi(e,t,r,n,o,i,a,s,l,u,p){var c,h,g,m,v,_,x,w,O,P,I=0,U=n&&n.__k||Fi,q=U.length,N=q,M=t.length;for(r.__k=[],c=0;c<M;c++)(m=r.__k[c]=(m=t[c])==null||typeof m=="boolean"||typeof m=="function"?null:typeof m=="string"||typeof m=="number"||typeof m=="bigint"?Mt(null,m,null,null,m):nr(m)?Mt(W,{children:m},null,null,null):m.__b>0?Mt(m.type,m.props,m.key,m.ref?m.ref:null,m.__v):m)!=null&&(m.__=r,m.__b=r.__b+1,(w=hd(m,U,x=c+I,N))===-1?g=pt:(g=U[w]||pt,U[w]=void 0,N--),Jr(e,m,g,o,i,a,s,l,u,p),v=m.__e,(h=m.ref)&&g.ref!=h&&(g.ref&&en(g.ref,null,m),p.push(h,m.__c||v,m)),v!=null&&(_==null&&(_=v),P=!(O=g===pt||g.__v===null)&&w===x,O?w==-1&&I--:w!==x&&(w===x+1?(I++,P=!0):w>x?N>M-x?(I+=w-x,P=!0):I--:I=w<x&&w==x-1?w-x:0),x=c+I,P=P||w==c&&!O,typeof m.type!="function"||w===x&&g.__k!==m.__k?typeof m.type=="function"||P?m.__d!==void 0?(l=m.__d,m.__d=void 0):l=v.nextSibling:l=zi(e,v,l):l=Bi(m,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,c=q;c--;)U[c]!=null&&(typeof r.type=="function"&&U[c].__e!=null&&U[c].__e==r.__d&&(r.__d=U[c].__e.nextSibling),Wi(U[c],U[c]))}function Bi(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?Bi(n,t,r):zi(r,n.__e,t));return t}function Te(e,t){return t=t||[],e==null||typeof e=="boolean"||(nr(e)?e.some(function(r){Te(r,t)}):t.push(e)),t}function zi(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function hd(e,t,r,n){var o=e.key,i=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&o==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&o==l.key&&i===l.type)return s;s++}}return-1}function vd(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||ar(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||ar(e,i,t[i],r[i],n)}function Ui(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||pd.test(t)?r:r+"px"}function ar(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ui(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Ui(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?qi:Hi,i):e.removeEventListener(t,i?qi:Hi,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Hi(e){return this.l[e.type+!1](S.event?S.event(e):e)}function qi(e){return this.l[e.type+!0](S.event?S.event(e):e)}function Jr(e,t,r,n,o,i,a,s,l,u){var p,c,h,g,m,v,_,x,w,O,P,I,U,q,N,M=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(p=S.__b)&&p(t);try{e:if(typeof M=="function"){if(x=t.props,w=(p=M.contextType)&&n[p.__c],O=p?w?w.props.value:p.__:n,r.__c?_=(c=t.__c=r.__c).__=c.__E:("prototype"in M&&M.prototype.render?t.__c=c=new M(x,O):(t.__c=c=new ye(x,O),c.constructor=M,c.render=bd),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=O,c.__n=n,h=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ae({},c.__s)),Ae(c.__s,M.getDerivedStateFromProps(x,c.__s))),g=c.props,m=c.state,c.__v=t,h)M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(M.getDerivedStateFromProps==null&&x!==g&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,O),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),P=0;P<c._sb.length;P++)c.__h.push(c._sb[P]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,O),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(g,m,v)})}if(c.context=O,c.props=x,c.__P=e,c.__e=!1,I=S.__r,U=0,"prototype"in M&&M.prototype.render){for(c.state=c.__s,c.__d=!1,I&&I(t),p=c.render(c.props,c.state,c.context),q=0;q<c._sb.length;q++)c.__h.push(c._sb[q]);c._sb=[]}else do c.__d=!1,I&&I(t),p=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++U<25);c.state=c.__s,c.getChildContext!=null&&(n=Ae(Ae({},n),c.getChildContext())),h||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(g,m)),Vi(e,nr(N=p!=null&&p.type===W&&p.key==null?p.props.children:p)?N:[N],t,r,n,o,i,a,s,l,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),_&&(c.__E=c.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=md(r.__e,t,r,n,o,i,a,l,u);(p=S.diffed)&&p(t)}catch(se){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),S.__e(se,t,r)}}function Ki(e,t,r){for(var n=0;n<r.length;n++)en(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function md(e,t,r,n,o,i,a,s,l){var u,p,c,h=r.props,g=t.props,m=t.type,v=0;if(m==="svg"&&(o=!0),i!=null){for(;v<i.length;v++)if((u=i[v])&&"setAttribute"in u==!!m&&(m?u.localName===m:u.nodeType===3)){e=u,i[v]=null;break}}if(e==null){if(m===null)return document.createTextNode(g);e=o?document.createElementNS("http://www.w3.org/2000/svg",m):document.createElement(m,g.is&&g),i=null,s=!1}if(m===null)h===g||s&&e.data===g||(e.data=g);else{if(i=i&&Nt.call(e.childNodes),p=(h=r.props||pt).dangerouslySetInnerHTML,c=g.dangerouslySetInnerHTML,!s){if(i!=null)for(h={},v=0;v<e.attributes.length;v++)h[e.attributes[v].name]=e.attributes[v].value;(c||p)&&(c&&(p&&c.__html==p.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(vd(e,g,h,o,s),c)t.__k=[];else if(Vi(e,nr(v=t.props.children)?v:[v],t,r,n,o&&m!=="foreignObject",i,a,i?i[0]:r.__k&&ir(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&Li(i[v]);s||("value"in g&&(v=g.value)!==void 0&&(v!==e.value||m==="progress"&&!v||m==="option"&&v!==h.value)&&ar(e,"value",v,h.value,!1),"checked"in g&&(v=g.checked)!==void 0&&v!==e.checked&&ar(e,"checked",v,h.checked,!1))}return e}function en(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Wi(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||en(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Wi(n[o],t,r||typeof e.type!="function");r||e.__e==null||Li(e.__e),e.__=e.__e=e.__d=void 0}function bd(e,t,r){return this.constructor(e,r)}function ht(e,t,r){var n,o,i,a;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],Jr(t,e=(!n&&r||t).__k=D(W,null,[e]),o||pt,pt,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?Nt.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),Ki(i,e,a)}function Gi(e,t){ht(e,t,Gi)}function gd(e,t,r){var n,o,i,a,s=Ae({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&a!==void 0?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Nt.call(arguments,2):r),Mt(e.type,s,n||e.key,o||e.ref,null)}function Ft(e,t){var r={__c:t="__cC"+Mi++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(s){s.__e=!0,Qr(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Nt=Fi.slice,S={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},Ai=0,Ti=function(e){return e!=null&&e.constructor===void 0},ye.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ae({},this.state),typeof e=="function"&&(e=e(Ae({},r),this.props)),e&&Ae(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Qr(this))},ye.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Qr(this))},ye.prototype.render=W,et=[],Ni=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xr=function(e,t){return e.__v.__b-t.__v.__b},or.__r=0,Mi=0;var tn=class extends Error{constructor(t){super(t[0].message);js(this,"issues");this.name="ValiError",this.issues=t}};function Yi(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Lt(e){return{issues:e}}function ce(e){return{output:e}}function yd(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,path:t.path,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function _d(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Be(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ce(e);let o,i,a=e;for(const s of t){const l=s._parse(a);if(l.issues){o=o||_d(r,n);for(const u of l.issues){const p=yd(o,u);i?i.push(p):i=[p]}if(o.abortEarly||o.abortPipeEarly)break}else a=l.output}return i?Lt(i):ce(a)}function ze(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function Zi(e){return typeof e=="function"?e():e}function Ue(e,t,r,n){return Lt([{validation:e,message:Zi(t),input:r,requirement:n}])}function wd(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,a]=ze(t,r);return[e,i,a]}const[n,o]=ze(e,t);return[void 0,n,o]}function De(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:Zi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Xi(e){return typeof e.default=="function"?e.default():e.default}function xd(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Be(t,this.pipe,r,"any")}}}function kd(e,t,r){const[n="Invalid type",o]=ze(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,a){if(!Array.isArray(i))return De(a,"type","array",this.message,i);let s;const l=[];for(let u=0;u<i.length;u++){const p=i[u],c=this.item._parse(p,a);if(c.issues){const h={type:"array",input:i,key:u,value:p};for(const g of c.issues)g.path?g.path.unshift(h):g.path=[h],s==null||s.push(g);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Lt(s):Be(l,this.pipe,a,"array")}}}function Qi(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?De(i,"type","boolean",this.message,o):Be(o,this.pipe,i,"boolean")}}}function Ji(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?De(n,"type","literal",this.message,r):ce(r)}}}function $d(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const o=Xi(this);if(o===void 0)return ce(r);r=o}return this.wrapped._parse(r,n)}}}function rn(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?De(i,"type","number",this.message,o):Be(o,this.pipe,i,"number")}}}function Ne(e,t,r,n){const[o,i="Invalid type",a]=wd(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:a,_parse(l,u){if(!l||typeof l!="object")return De(u,"type","object",this.message,l);s=s||Object.entries(this.entries);let p;const c={};for(const[h,g]of s){const m=l[h],v=g._parse(m,u);if(v.issues){const _={type:"object",input:l,key:h,value:m};for(const x of v.issues)x.path?x.path.unshift(_):x.path=[_],p==null||p.push(x);if(p||(p=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||h in l)&&(c[h]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&p)){for(const h in l)if(!(h in this.entries)){const g=l[h],m=this.rest._parse(g,u);if(m.issues){const v={type:"object",input:l,key:h,value:g};for(const _ of m.issues)_.path?_.path.unshift(v):_.path=[v],p==null||p.push(_);if(p||(p=m.issues),u!=null&&u.abortEarly)break}else c[h]=m.output}}return p?Lt(p):Be(c,this.pipe,u,"object")}}}function Sd(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const o=Xi(this);if(o===void 0)return ce(r);r=o}return this.wrapped._parse(r,n)}}}function Cd(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ce(r):De(n,"type","picklist",this.message,r)}}}function Se(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?De(i,"type","string",this.message,o):Be(o,this.pipe,i,"string")}}}function Ed(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=ze(r,n);return[e,t,a,s]}const[o,i]=ze(t,r);return[Se(),e,o,i]}var Od=["__proto__","prototype","constructor"];function eo(e,t,r,n){const[o,i,a="Invalid type",s]=Ed(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:a,pipe:s,_parse(l,u){if(!l||typeof l!="object")return De(u,"type","record",this.message,l);let p;const c={};for(const[h,g]of Object.entries(l))if(!Od.includes(h)){let m;const v=this.key._parse(h,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(v.issues){m={type:"record",input:l,key:h,value:g};for(const x of v.issues)x.path=[m],p==null||p.push(x);if(p||(p=v.issues),u!=null&&u.abortEarly)break}const _=this.value._parse(g,u);if(_.issues){m=m||{type:"record",input:l,key:h,value:g};for(const x of _.issues)x.path?x.path.unshift(m):x.path=[m],p==null||p.push(x);if(p||(p=_.issues),u!=null&&u.abortEarly)break}!v.issues&&!_.issues&&(c[v.output]=_.output)}return p?Lt(p):Be(c,this.pipe,u,"record")}}}function Id(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let o,i;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(o)for(const l of s.issues)o.push(l);else o=s.issues;else{i=[s.output];break}}return i?ce(i[0]):De(n,"type","union",this.message,r,o)}}}function sr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new tn(n.issues);return n.output}async function Pd(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new tn(n.issues);return n.output}function to(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const a=t(i.output);return r&&!Array.isArray(r)?r._parse(a,o):Be(a,r,o,typeof a)}}}var Ad=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Td(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Dd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Ad,_parse(t){return this.requirement.test(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function jt(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Nd(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function ro(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Md(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Fd(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Ld(e="Invalid URL"){return{type:"url",async:!1,message:e,requirement(t){try{return new URL(t),!0}catch{return!1}},_parse(t){return this.requirement(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function fe(){return fe=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},fe.apply(this,arguments)}var Me,B,nn,no,vt=0,io=[],lr=[],oo=S.__b,ao=S.__r,so=S.diffed,lo=S.__c,co=S.unmount;function tt(e,t){S.__h&&S.__h(B,e,vt||t),vt=0;var r=B.__H||(B.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:lr}),r.__[e]}function G(e){return vt=1,cr(vo,e)}function cr(e,t,r){var n=tt(Me++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):vo(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,s);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=B,!B.u)){var o=function(s,l,u){if(!n.__c.__H)return!0;var p=n.__c.__H.__.filter(function(h){return h.__c});if(p.every(function(h){return!h.__N}))return!i||i.call(this,s,l,u);var c=!1;return p.forEach(function(h){if(h.__N){var g=h.__[0];h.__=h.__N,h.__N=void 0,g!==h.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!i||i.call(this,s,l,u))};B.u=!0;var i=B.shouldComponentUpdate,a=B.componentWillUpdate;B.componentWillUpdate=function(s,l,u){if(this.__e){var p=i;i=void 0,o(s,l,u),i=p}a&&a.call(this,s,l,u)},B.shouldComponentUpdate=o}return n.__N||n.__}function R(e,t){var r=tt(Me++,3);!S.__s&&an(r.__H,t)&&(r.__=e,r.i=t,B.__H.__h.push(r))}function ve(e,t){var r=tt(Me++,4);!S.__s&&an(r.__H,t)&&(r.__=e,r.i=t,B.__h.push(r))}function L(e){return vt=5,ue(function(){return{current:e}},[])}function uo(e,t,r){vt=6,ve(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function ue(e,t){var r=tt(Me++,7);return an(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function me(e,t){return vt=8,ue(function(){return e},t)}function ur(e){var t=B.context[e.__c],r=tt(Me++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(B)),t.props.value):e.__}function fo(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function jd(e){var t=tt(Me++,10),r=G();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function po(){var e=tt(Me++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Rd(){for(var e;e=io.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(dr),e.__H.__h.forEach(on),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){B=null,oo&&oo(e)},S.__r=function(e){ao&&ao(e),Me=0;var t=(B=e.__c).__H;t&&(nn===B?(t.__h=[],B.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=lr,r.__N=r.i=void 0})):(t.__h.forEach(dr),t.__h.forEach(on),t.__h=[],Me=0)),nn=B},S.diffed=function(e){so&&so(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(io.push(t)!==1&&no===S.requestAnimationFrame||((no=S.requestAnimationFrame)||Vd)(Rd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==lr&&(r.__=r.__V),r.i=void 0,r.__V=lr})),nn=B=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(dr),r.__h=r.__h.filter(function(n){return!n.__||on(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),lo&&lo(e,t)},S.unmount=function(e){co&&co(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{dr(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var ho=typeof requestAnimationFrame=="function";function Vd(e){var t,r=function(){clearTimeout(n),ho&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ho&&(t=requestAnimationFrame(r))}function dr(e){var t=B,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),B=t}function on(e){var t=B;e.__c=e.__(),B=t}function an(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function vo(e,t){return typeof t=="function"?t(e):t}function mo(e,t){for(var r in t)e[r]=t[r];return e}function sn(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ln(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function fr(e){this.props=e}function bo(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:sn(this.props,o)}function n(o){return this.shouldComponentUpdate=r,D(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(fr.prototype=new ye).isPureReactComponent=!0,fr.prototype.shouldComponentUpdate=function(e,t){return sn(this.props,e)||sn(this.state,t)};var go=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),go&&go(e)};var Bd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function re(e){function t(r){var n=mo({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Bd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var yo=function(e,t){return e==null?null:Te(Te(e).map(t))},Fe={map:yo,forEach:yo,count:function(e){return e?Te(e).length:0},only:function(e){var t=Te(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Te},zd=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}zd(e,t,r,n)};var _o=S.unmount;function wo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=mo({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return wo(n,t,r)})),e}function xo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return xo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function mt(){this.__u=0,this.t=null,this.__b=null}function ko(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function cn(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return D(r,i)}return o.displayName="Lazy",o.__f=!0,o}function bt(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),_o&&_o(e)},(mt.prototype=new ye).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=ko(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=xo(u,u.__c.__P,u.__c.__O)}var p;for(n.setState({__a:n.__b=null});p=n.t.pop();)p.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},mt.prototype.componentWillUnmount=function(){this.t=[]},mt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=wo(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&D(W,null,e.fallback);return o&&(o.__h=null),[D(W,null,t.__a?null:e.children),o]};var $o=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Ud(e){return this.getChildContext=function(){return e.context},e.children}function Hd(e){var t=this,r=e.i;t.componentWillUnmount=function(){ht(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),ht(D(Ud,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function So(e,t){var r=D(Hd,{__v:e,i:t});return r.containerInfo=t,r}(bt.prototype=new ye).__a=function(e){var t=this,r=ko(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),$o(t,e,n)):o()};r?r(i):i()}},bt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Te(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},bt.prototype.componentDidUpdate=bt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){$o(e,r,t)})};var Co=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,qd=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Kd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Wd=/[A-Z0-9]/g,Gd=typeof document<"u",Yd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Eo(e,t,r){return t.__k==null&&(t.textContent=""),ht(e,t),typeof r=="function"&&r(),e?e.__c:null}function Oo(e,t,r){return Gi(e,t),typeof r=="function"&&r(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Io=S.event;function Zd(){}function Xd(){return this.cancelBubble}function Qd(){return this.defaultPrevented}S.event=function(e){return Io&&(e=Io(e)),e.persist=Zd,e.isPropagationStopped=Xd,e.isDefaultPrevented=Qd,e.nativeEvent=e};var un,Jd={enumerable:!1,configurable:!0,get:function(){return this.class}},Po=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||Gd&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Yd(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Kd.test(i)?i=s:n.indexOf("-")===-1&&qd.test(i)?i=i.replace(Wd,"-$&").toLowerCase():a===null&&(a=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Te(r.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Te(r.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Jd)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Co,Po&&Po(e)};var Ao=S.__r;S.__r=function(e){Ao&&Ao(e),un=e.__c};var To=S.diffed;S.diffed=function(e){To&&To(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),un=null};var Do={ReactCurrentDispatcher:{current:{readContext:function(e){return un.__n[e.__c].props.value}}}},ef="17.0.2";function No(e){return D.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Co}function gt(e){return rt(e)?gd.apply(null,arguments):e}function Mo(e){return!!e.__k&&(ht(null,e),!0)}function Fo(e){return e&&(e.base||e.nodeType===1&&e)||null}var Lo=function(e,t){return e(t)},pr=function(e,t){return e(t)},jo=W;function dn(e){e()}function Ro(e){return e}function Vo(){return[!1,dn]}var Bo=ve;function zo(e,t){var r=t(),n=G({h:{__:r,v:t}}),o=n[0].h,i=n[1];return ve(function(){o.__=r,o.v=t,ln(o.__,t())||i({h:o})},[e,r,t]),R(function(){return ln(o.__,o.v())||i({h:o}),e(function(){ln(o.__,o.v())||i({h:o})})},[e]),r}var xe={useState:G,useId:po,useReducer:cr,useEffect:R,useLayoutEffect:ve,useInsertionEffect:Bo,useTransition:Vo,useDeferredValue:Ro,useSyncExternalStore:zo,startTransition:dn,useRef:L,useImperativeHandle:uo,useMemo:ue,useCallback:me,useContext:ur,useDebugValue:fo,version:"17.0.2",Children:Fe,render:Eo,hydrate:Oo,unmountComponentAtNode:Mo,createPortal:So,createElement:D,createContext:Ft,createFactory:No,cloneElement:gt,createRef:ji,Fragment:W,isValidElement:rt,findDOMNode:Fo,Component:ye,PureComponent:fr,memo:bo,forwardRef:re,flushSync:pr,unstable_batchedUpdates:Lo,StrictMode:jo,Suspense:mt,SuspenseList:bt,lazy:cn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do};const tf=Object.freeze(Object.defineProperty({__proto__:null,Children:Fe,Component:ye,Fragment:W,PureComponent:fr,StrictMode:jo,Suspense:mt,SuspenseList:bt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do,cloneElement:gt,createContext:Ft,createElement:D,createFactory:No,createPortal:So,createRef:ji,default:xe,findDOMNode:Fo,flushSync:pr,forwardRef:re,hydrate:Oo,isValidElement:rt,lazy:cn,memo:bo,render:Eo,startTransition:dn,unmountComponentAtNode:Mo,unstable_batchedUpdates:Lo,useCallback:me,useContext:ur,useDebugValue:fo,useDeferredValue:Ro,useEffect:R,useErrorBoundary:jd,useId:po,useImperativeHandle:uo,useInsertionEffect:Bo,useLayoutEffect:ve,useMemo:ue,useReducer:cr,useRef:L,useState:G,useSyncExternalStore:zo,useTransition:Vo,version:ef},Symbol.toStringTag,{value:"Module"}));function yt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function rf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Uo(...e){return t=>e.forEach(r=>rf(r,t))}function Rt(...e){return me(Uo(...e),e)}function nf(e,t=[]){let r=[];function n(i,a){const s=Ft(a),l=r.length;r=[...r,a];function u(c){const{scope:h,children:g,...m}=c,v=(h==null?void 0:h[e][l])||s,_=ue(()=>m,Object.values(m));return D(v.Provider,{value:_},g)}function p(c,h){const g=(h==null?void 0:h[e][l])||s,m=ur(g);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,p]}const o=()=>{const i=r.map(a=>Ft(a));return function(s){const l=(s==null?void 0:s[e])||i;return ue(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,of(o,...t)]}function of(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...s,...c}},{});return ue(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const fn=globalThis!=null&&globalThis.document?ve:()=>{},af=tf["useId".toString()]||(()=>{});let sf=0;function pn(e){const[t,r]=G(af());return fn(()=>{e||r(n=>n??String(sf++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=L(e);return R(()=>{t.current=e}),ue(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function lf({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=cf({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=nt(r),l=me(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else o(u)},[i,e,o,s]);return[a,l]}function cf({defaultProp:e,onChange:t}){const r=G(e),[n]=r,o=L(n),i=nt(t);return R(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const hn=re((e,t)=>{const{children:r,...n}=e,o=Fe.toArray(r),i=o.find(df);if(i){const a=i.props.children,s=o.map(l=>l===i?Fe.count(a)>1?Fe.only(null):rt(a)?a.props.children:null:l);return D(vn,fe({},n,{ref:t}),rt(a)?gt(a,void 0,s):null)}return D(vn,fe({},n,{ref:t}),r)});hn.displayName="Slot";const vn=re((e,t)=>{const{children:r,...n}=e;return rt(r)?gt(r,{...ff(n,r.props),ref:t?Uo(t,r.ref):r.ref}):Fe.count(r)>1?Fe.only(null):null});vn.displayName="SlotClone";const uf=({children:e})=>D(W,null,e);function df(e){return rt(e)&&e.type===uf}function ff(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const mn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=re((n,o)=>{const{asChild:i,...a}=n,s=i?hn:t;return R(()=>{window[Symbol.for("radix-ui")]=!0},[]),D(s,fe({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pf(e,t){e&&pr(()=>e.dispatchEvent(t))}function hf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);R(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const bn="dismissableLayer.update",vf="dismissableLayer.pointerDownOutside",mf="dismissableLayer.focusOutside";let Ho;const bf=Ft({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gf=re((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,p=ur(bf),[c,h]=G(null),g=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,m]=G({}),v=Rt(t,N=>h(N)),_=Array.from(p.layers),[x]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(x),O=c?_.indexOf(c):-1,P=p.layersWithOutsidePointerEventsDisabled.size>0,I=O>=w,U=yf(N=>{const M=N.target,se=[...p.branches].some(te=>te.contains(M));!I||se||(i==null||i(N),s==null||s(N),N.defaultPrevented||l==null||l())},g),q=_f(N=>{const M=N.target;[...p.branches].some(te=>te.contains(M))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},g);return hf(N=>{O===p.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},g),R(()=>{if(c)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Ho=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(c)),p.layers.add(c),qo(),()=>{n&&p.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ho)}},[c,g,n,p]),R(()=>()=>{c&&(p.layers.delete(c),p.layersWithOutsidePointerEventsDisabled.delete(c),qo())},[c,p]),R(()=>{const N=()=>m({});return document.addEventListener(bn,N),()=>document.removeEventListener(bn,N)},[]),D(mn.div,fe({},u,{ref:v,style:{pointerEvents:P?I?"auto":"none":void 0,...e.style},onFocusCapture:yt(e.onFocusCapture,q.onFocusCapture),onBlurCapture:yt(e.onBlurCapture,q.onBlurCapture),onPointerDownCapture:yt(e.onPointerDownCapture,U.onPointerDownCapture)}))});function yf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1),o=L(()=>{});return R(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Ko(vf,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function _f(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1);return R(()=>{const o=i=>{i.target&&!n.current&&Ko(mf,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function qo(){const e=new CustomEvent(bn);document.dispatchEvent(e)}function Ko(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?pf(o,i):o.dispatchEvent(i)}const gn="focusScope.autoFocusOnMount",yn="focusScope.autoFocusOnUnmount",Wo={bubbles:!1,cancelable:!0},wf=re((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=G(null),u=nt(o),p=nt(i),c=L(null),h=Rt(t,v=>l(v)),g=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R(()=>{if(n){let v=function(O){if(g.paused||!s)return;const P=O.target;s.contains(P)?c.current=P:He(c.current,{select:!0})},_=function(O){if(g.paused||!s)return;const P=O.relatedTarget;P!==null&&(s.contains(P)||He(c.current,{select:!0}))},x=function(O){if(document.activeElement===document.body)for(const I of O)I.removedNodes.length>0&&He(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),w.disconnect()}}},[n,s,g.paused]),R(()=>{if(s){Zo.add(g);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(gn,Wo);s.addEventListener(gn,u),s.dispatchEvent(x),x.defaultPrevented||(xf(Ef(Go(s)),{select:!0}),document.activeElement===v&&He(s))}return()=>{s.removeEventListener(gn,u),setTimeout(()=>{const x=new CustomEvent(yn,Wo);s.addEventListener(yn,p),s.dispatchEvent(x),x.defaultPrevented||He(v??document.body,{select:!0}),s.removeEventListener(yn,p),Zo.remove(g)},0)}}},[s,u,p,g]);const m=me(v=>{if(!r&&!n||g.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(_&&x){const w=v.currentTarget,[O,P]=kf(w);O&&P?!v.shiftKey&&x===P?(v.preventDefault(),r&&He(O,{select:!0})):v.shiftKey&&x===O&&(v.preventDefault(),r&&He(P,{select:!0})):x===w&&v.preventDefault()}},[r,n,g.paused]);return D(mn.div,fe({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function xf(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(He(n,{select:t}),document.activeElement!==r)return}function kf(e){const t=Go(e),r=Yo(t,e),n=Yo(t.reverse(),e);return[r,n]}function Go(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Yo(e,t){for(const r of e)if(!$f(r,{upTo:t}))return r}function $f(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sf(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Sf(e)&&t&&e.select()}}const Zo=Cf();function Cf(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Xo(e,t),e.unshift(t)},remove(t){var r;e=Xo(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Xo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ef(e){return e.filter(t=>t.tagName!=="A")}function Of(e,t){return cr((r,n)=>{const o=t[r][n];return o??r},e)}const _n=e=>{const{present:t,children:r}=e,n=If(t),o=typeof r=="function"?r({present:n.isPresent}):Fe.only(r),i=Rt(n.ref,o.ref);return typeof r=="function"||n.isPresent?gt(o,{ref:i}):null};_n.displayName="Presence";function If(e){const[t,r]=G(),n=L({}),o=L(e),i=L("none"),a=e?"mounted":"unmounted",[s,l]=Of(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R(()=>{const u=hr(n.current);i.current=s==="mounted"?u:"none"},[s]),fn(()=>{const u=n.current,p=o.current;if(p!==e){const h=i.current,g=hr(u);e?l("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(p&&h!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),fn(()=>{if(t){const u=c=>{const g=hr(n.current).includes(c.animationName);c.target===t&&g&&pr(()=>l("ANIMATION_END"))},p=c=>{c.target===t&&(i.current=hr(n.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:me(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function hr(e){return(e==null?void 0:e.animationName)||"none"}let wn=0;function Pf(){R(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Qo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Qo()),wn++,()=>{wn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),wn--}},[])}function Qo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ce=function(){return Ce=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ce.apply(this,arguments)};function Jo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Af(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var vr="right-scroll-bar-position",mr="width-before-scroll-bar",Tf="with-scroll-bars-hidden",Df="--removed-body-scroll-bar-size";function Nf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Mf(e,t){var r=G(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Ff(e,t){return Mf(t||null,function(r){return e.forEach(function(n){return Nf(n,r)})})}function Lf(e){return e}function jf(e,t){t===void 0&&(t=Lf);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var p=a;a=[],p.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(p){a.push(p),u()},filter:function(p){return a=a.filter(p),r}}}};return o}function Rf(e){e===void 0&&(e={});var t=jf(null);return t.options=Ce({async:!0,ssr:!1},e),t}var ea=function(e){var t=e.sideCar,r=Jo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return D(n,Ce({},r))};ea.isSideCarExport=!0;function Vf(e,t){return e.useMedium(t),ea}var ta=Rf(),xn=function(){},br=re(function(e,t){var r=L(null),n=G({onScrollCapture:xn,onWheelCapture:xn,onTouchMoveCapture:xn}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,p=e.enabled,c=e.shards,h=e.sideCar,g=e.noIsolation,m=e.inert,v=e.allowPinchZoom,_=e.as,x=_===void 0?"div":_,w=Jo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=h,P=Ff([r,t]),I=Ce(Ce({},w),o);return D(W,null,p&&D(O,{sideCar:ta,removeScrollBar:u,shards:c,noIsolation:g,inert:m,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?gt(Fe.only(s),Ce(Ce({},I),{ref:P})):D(x,Ce({},I,{className:l,ref:P}),s))});br.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},br.classNames={fullWidth:mr,zeroRight:vr};var ra,Bf=function(){if(ra)return ra;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bf();return t&&e.setAttribute("nonce",t),e}function Uf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var qf=function(){var e=0,t=null;return{add:function(r){e==0&&(t=zf())&&(Uf(t,r),Hf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kf=function(){var e=qf();return function(t,r){R(function(){return e.add(t),function(){e.remove()}},[t&&r])}},na=function(){var e=Kf(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Wf={left:0,top:0,right:0,gap:0},kn=function(e){return parseInt(e||"",10)||0},Gf=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[kn(r),kn(n),kn(o)]},Yf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wf;var t=Gf(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Zf=na(),Xf=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
1
+ var vm=Object.defineProperty;var mm=(Je,ge,Ve)=>ge in Je?vm(Je,ge,{enumerable:!0,configurable:!0,writable:!0,value:Ve}):Je[ge]=Ve;var js=(Je,ge,Ve)=>(mm(Je,typeof ge!="symbol"?ge+"":ge,Ve),Ve);(function(){"use strict";var Je=e=>e,ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ve(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Rs=Array.isArray,qr=Rs,Vs=typeof ge=="object"&&ge&&ge.Object===Object&&ge,Bs=Vs,zs=Bs,Us=typeof self=="object"&&self&&self.Object===Object&&self,Hs=zs||Us||Function("return this")(),Kr=Hs,qs=Kr,Ks=qs.Symbol,Wr=Ks,mi=Wr,bi=Object.prototype,Ws=bi.hasOwnProperty,Gs=bi.toString,Tt=mi?mi.toStringTag:void 0;function Ys(e){var t=Ws.call(e,Tt),r=e[Tt];try{e[Tt]=void 0;var n=!0}catch{}var o=Gs.call(e);return n&&(t?e[Tt]=r:delete e[Tt]),o}var Zs=Ys,Xs=Object.prototype,Qs=Xs.toString;function Js(e){return Qs.call(e)}var el=Js,gi=Wr,tl=Zs,rl=el,nl="[object Null]",il="[object Undefined]",yi=gi?gi.toStringTag:void 0;function ol(e){return e==null?e===void 0?il:nl:yi&&yi in Object(e)?tl(e):rl(e)}var _i=ol;function al(e){return e!=null&&typeof e=="object"}var sl=al,ll=_i,cl=sl,ul="[object Symbol]";function dl(e){return typeof e=="symbol"||cl(e)&&ll(e)==ul}var Gr=dl,fl=qr,pl=Gr,hl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vl=/^\w*$/;function ml(e,t){if(fl(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||pl(e)?!0:vl.test(e)||!hl.test(e)||t!=null&&e in Object(t)}var bl=ml;function gl(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var wi=gl,yl=_i,_l=wi,wl="[object AsyncFunction]",xl="[object Function]",kl="[object GeneratorFunction]",$l="[object Proxy]";function Sl(e){if(!_l(e))return!1;var t=yl(e);return t==xl||t==kl||t==wl||t==$l}var Cl=Sl,El=Kr,Ol=El["__core-js_shared__"],Il=Ol,Yr=Il,xi=function(){var e=/[^.]+$/.exec(Yr&&Yr.keys&&Yr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Pl(e){return!!xi&&xi in e}var Al=Pl,Tl=Function.prototype,Dl=Tl.toString;function Nl(e){if(e!=null){try{return Dl.call(e)}catch{}try{return e+""}catch{}}return""}var Ml=Nl,Fl=Cl,Ll=Al,jl=wi,Rl=Ml,Vl=/[\\^$.*+?()[\]{}|]/g,Bl=/^\[object .+?Constructor\]$/,zl=Function.prototype,Ul=Object.prototype,Hl=zl.toString,ql=Ul.hasOwnProperty,Kl=RegExp("^"+Hl.call(ql).replace(Vl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Wl(e){if(!jl(e)||Ll(e))return!1;var t=Fl(e)?Kl:Bl;return t.test(Rl(e))}var Gl=Wl;function Yl(e,t){return e==null?void 0:e[t]}var Zl=Yl,Xl=Gl,Ql=Zl;function Jl(e,t){var r=Ql(e,t);return Xl(r)?r:void 0}var ki=Jl,ec=ki,tc=ec(Object,"create"),er=tc,$i=er;function rc(){this.__data__=$i?$i(null):{},this.size=0}var nc=rc;function ic(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var oc=ic,ac=er,sc="__lodash_hash_undefined__",lc=Object.prototype,cc=lc.hasOwnProperty;function uc(e){var t=this.__data__;if(ac){var r=t[e];return r===sc?void 0:r}return cc.call(t,e)?t[e]:void 0}var dc=uc,fc=er,pc=Object.prototype,hc=pc.hasOwnProperty;function vc(e){var t=this.__data__;return fc?t[e]!==void 0:hc.call(t,e)}var mc=vc,bc=er,gc="__lodash_hash_undefined__";function yc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bc&&t===void 0?gc:t,this}var _c=yc,wc=nc,xc=oc,kc=dc,$c=mc,Sc=_c;function ut(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ut.prototype.clear=wc,ut.prototype.delete=xc,ut.prototype.get=kc,ut.prototype.has=$c,ut.prototype.set=Sc;var Cc=ut;function Ec(){this.__data__=[],this.size=0}var Oc=Ec;function Ic(e,t){return e===t||e!==e&&t!==t}var Pc=Ic,Ac=Pc;function Tc(e,t){for(var r=e.length;r--;)if(Ac(e[r][0],t))return r;return-1}var tr=Tc,Dc=tr,Nc=Array.prototype,Mc=Nc.splice;function Fc(e){var t=this.__data__,r=Dc(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Mc.call(t,r,1),--this.size,!0}var Lc=Fc,jc=tr;function Rc(e){var t=this.__data__,r=jc(t,e);return r<0?void 0:t[r][1]}var Vc=Rc,Bc=tr;function zc(e){return Bc(this.__data__,e)>-1}var Uc=zc,Hc=tr;function qc(e,t){var r=this.__data__,n=Hc(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Kc=qc,Wc=Oc,Gc=Lc,Yc=Vc,Zc=Uc,Xc=Kc;function dt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}dt.prototype.clear=Wc,dt.prototype.delete=Gc,dt.prototype.get=Yc,dt.prototype.has=Zc,dt.prototype.set=Xc;var Qc=dt,Jc=ki,eu=Kr,tu=Jc(eu,"Map"),ru=tu,Si=Cc,nu=Qc,iu=ru;function ou(){this.size=0,this.__data__={hash:new Si,map:new(iu||nu),string:new Si}}var au=ou;function su(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var lu=su,cu=lu;function uu(e,t){var r=e.__data__;return cu(t)?r[typeof t=="string"?"string":"hash"]:r.map}var rr=uu,du=rr;function fu(e){var t=du(this,e).delete(e);return this.size-=t?1:0,t}var pu=fu,hu=rr;function vu(e){return hu(this,e).get(e)}var mu=vu,bu=rr;function gu(e){return bu(this,e).has(e)}var yu=gu,_u=rr;function wu(e,t){var r=_u(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var xu=wu,ku=au,$u=pu,Su=mu,Cu=yu,Eu=xu;function ft(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ft.prototype.clear=ku,ft.prototype.delete=$u,ft.prototype.get=Su,ft.prototype.has=Cu,ft.prototype.set=Eu;var Ou=ft,Ci=Ou,Iu="Expected a function";function Zr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Iu);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Zr.Cache||Ci),r}Zr.Cache=Ci;var Pu=Zr,Au=Pu,Tu=500;function Du(e){var t=Au(e,function(n){return r.size===Tu&&r.clear(),n}),r=t.cache;return t}var Nu=Du,Mu=Nu,Fu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Lu=/\\(\\)?/g,ju=Mu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Fu,function(r,n,o,i){t.push(o?i.replace(Lu,"$1"):n||r)}),t}),Ru=ju;function Vu(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Bu=Vu,Ei=Wr,zu=Bu,Uu=qr,Hu=Gr,qu=1/0,Oi=Ei?Ei.prototype:void 0,Ii=Oi?Oi.toString:void 0;function Pi(e){if(typeof e=="string")return e;if(Uu(e))return zu(e,Pi)+"";if(Hu(e))return Ii?Ii.call(e):"";var t=e+"";return t=="0"&&1/e==-qu?"-0":t}var Ku=Pi,Wu=Ku;function Gu(e){return e==null?"":Wu(e)}var Yu=Gu,Zu=qr,Xu=bl,Qu=Ru,Ju=Yu;function ed(e,t){return Zu(e)?e:Xu(e,t)?[e]:Qu(Ju(e))}var td=ed,rd=Gr,nd=1/0;function id(e){if(typeof e=="string"||rd(e))return e;var t=e+"";return t=="0"&&1/e==-nd?"-0":t}var od=id,ad=td,sd=od;function ld(e,t){t=ad(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[sd(t[r++])];return r&&r==n?e:void 0}var cd=ld,ud=cd;function dd(e,t,r){var n=e==null?void 0:ud(e,t);return n===void 0?r:n}var fd=dd;const Dt=Ve(fd);var Nt,S,Ai,Ti,et,Di,Ni,Xr,Mi,pt={},Fi=[],pd=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,nr=Array.isArray;function Ae(e,t){for(var r in t)e[r]=t[r];return e}function Li(e){var t=e.parentNode;t&&t.removeChild(e)}function D(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Nt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Mt(e,a,n,o,null)}function Mt(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++Ai};return o==null&&S.vnode!=null&&S.vnode(i),i}function ji(){return{current:null}}function W(e){return e.children}function ye(e,t){this.props=e,this.context=t}function ir(e,t){if(t==null)return e.__?ir(e.__,e.__.__k.indexOf(e)+1):null;for(var r;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null)return r.__e;return typeof e.type=="function"?ir(e):null}function Ri(e){var t,r;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((r=e.__k[t])!=null&&r.__e!=null){e.__e=e.__c.base=r.__e;break}return Ri(e)}}function Qr(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!or.__r++||Di!==S.debounceRendering)&&((Di=S.debounceRendering)||Ni)(or)}function or(){var e,t,r,n,o,i,a,s,l;for(et.sort(Xr);e=et.shift();)e.__d&&(t=et.length,n=void 0,o=void 0,i=void 0,s=(a=(r=e).__v).__e,(l=r.__P)&&(n=[],o=[],(i=Ae({},a)).__v=a.__v+1,Jr(l,a,i,r.__n,l.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??ir(a),a.__h,o),Ki(n,a,o),a.__e!=s&&Ri(a)),et.length>t&&et.sort(Xr));or.__r=0}function Vi(e,t,r,n,o,i,a,s,l,u,f){var c,h,m,b,v,_,x,w,O,P,I=0,U=n&&n.__k||Fi,q=U.length,N=q,M=t.length;for(r.__k=[],c=0;c<M;c++)(b=r.__k[c]=(b=t[c])==null||typeof b=="boolean"||typeof b=="function"?null:typeof b=="string"||typeof b=="number"||typeof b=="bigint"?Mt(null,b,null,null,b):nr(b)?Mt(W,{children:b},null,null,null):b.__b>0?Mt(b.type,b.props,b.key,b.ref?b.ref:null,b.__v):b)!=null&&(b.__=r,b.__b=r.__b+1,(w=hd(b,U,x=c+I,N))===-1?m=pt:(m=U[w]||pt,U[w]=void 0,N--),Jr(e,b,m,o,i,a,s,l,u,f),v=b.__e,(h=b.ref)&&m.ref!=h&&(m.ref&&en(m.ref,null,b),f.push(h,b.__c||v,b)),v!=null&&(_==null&&(_=v),P=!(O=m===pt||m.__v===null)&&w===x,O?w==-1&&I--:w!==x&&(w===x+1?(I++,P=!0):w>x?N>M-x?(I+=w-x,P=!0):I--:I=w<x&&w==x-1?w-x:0),x=c+I,P=P||w==c&&!O,typeof b.type!="function"||w===x&&m.__k!==b.__k?typeof b.type=="function"||P?b.__d!==void 0?(l=b.__d,b.__d=void 0):l=v.nextSibling:l=zi(e,v,l):l=Bi(b,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=_,c=q;c--;)U[c]!=null&&(typeof r.type=="function"&&U[c].__e!=null&&U[c].__e==r.__d&&(r.__d=U[c].__e.nextSibling),Wi(U[c],U[c]))}function Bi(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?Bi(n,t,r):zi(r,n.__e,t));return t}function Te(e,t){return t=t||[],e==null||typeof e=="boolean"||(nr(e)?e.some(function(r){Te(r,t)}):t.push(e)),t}function zi(e,t,r){return r==null||r.parentNode!==e?e.insertBefore(t,null):t==r&&t.parentNode!=null||e.insertBefore(t,r),t.nextSibling}function hd(e,t,r,n){var o=e.key,i=e.type,a=r-1,s=r+1,l=t[r];if(l===null||l&&o==l.key&&i===l.type)return r;if(n>(l!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((l=t[a])&&o==l.key&&i===l.type)return a;a--}if(s<t.length){if((l=t[s])&&o==l.key&&i===l.type)return s;s++}}return-1}function vd(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||ar(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||ar(e,i,t[i],r[i],n)}function Ui(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||pd.test(t)?r:r+"px"}function ar(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Ui(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Ui(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?qi:Hi,i):e.removeEventListener(t,i?qi:Hi,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Hi(e){return this.l[e.type+!1](S.event?S.event(e):e)}function qi(e){return this.l[e.type+!0](S.event?S.event(e):e)}function Jr(e,t,r,n,o,i,a,s,l,u){var f,c,h,m,b,v,_,x,w,O,P,I,U,q,N,M=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=S.__b)&&f(t);try{e:if(typeof M=="function"){if(x=t.props,w=(f=M.contextType)&&n[f.__c],O=f?w?w.props.value:f.__:n,r.__c?_=(c=t.__c=r.__c).__=c.__E:("prototype"in M&&M.prototype.render?t.__c=c=new M(x,O):(t.__c=c=new ye(x,O),c.constructor=M,c.render=bd),w&&w.sub(c),c.props=x,c.state||(c.state={}),c.context=O,c.__n=n,h=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),M.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Ae({},c.__s)),Ae(c.__s,M.getDerivedStateFromProps(x,c.__s))),m=c.props,b=c.state,c.__v=t,h)M.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(M.getDerivedStateFromProps==null&&x!==m&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(x,O),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(x,c.__s,O)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=x,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),P=0;P<c._sb.length;P++)c.__h.push(c._sb[P]);c._sb=[],c.__h.length&&a.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(x,c.__s,O),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(m,b,v)})}if(c.context=O,c.props=x,c.__P=e,c.__e=!1,I=S.__r,U=0,"prototype"in M&&M.prototype.render){for(c.state=c.__s,c.__d=!1,I&&I(t),f=c.render(c.props,c.state,c.context),q=0;q<c._sb.length;q++)c.__h.push(c._sb[q]);c._sb=[]}else do c.__d=!1,I&&I(t),f=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++U<25);c.state=c.__s,c.getChildContext!=null&&(n=Ae(Ae({},n),c.getChildContext())),h||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(m,b)),Vi(e,nr(N=f!=null&&f.type===W&&f.key==null?f.props.children:f)?N:[N],t,r,n,o,i,a,s,l,u),c.base=t.__e,t.__h=null,c.__h.length&&a.push(c),_&&(c.__E=c.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=md(r.__e,t,r,n,o,i,a,l,u);(f=S.diffed)&&f(t)}catch(se){t.__v=null,(l||i!=null)&&(t.__e=s,t.__h=!!l,i[i.indexOf(s)]=null),S.__e(se,t,r)}}function Ki(e,t,r){for(var n=0;n<r.length;n++)en(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function md(e,t,r,n,o,i,a,s,l){var u,f,c,h=r.props,m=t.props,b=t.type,v=0;if(b==="svg"&&(o=!0),i!=null){for(;v<i.length;v++)if((u=i[v])&&"setAttribute"in u==!!b&&(b?u.localName===b:u.nodeType===3)){e=u,i[v]=null;break}}if(e==null){if(b===null)return document.createTextNode(m);e=o?document.createElementNS("http://www.w3.org/2000/svg",b):document.createElement(b,m.is&&m),i=null,s=!1}if(b===null)h===m||s&&e.data===m||(e.data=m);else{if(i=i&&Nt.call(e.childNodes),f=(h=r.props||pt).dangerouslySetInnerHTML,c=m.dangerouslySetInnerHTML,!s){if(i!=null)for(h={},v=0;v<e.attributes.length;v++)h[e.attributes[v].name]=e.attributes[v].value;(c||f)&&(c&&(f&&c.__html==f.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(vd(e,m,h,o,s),c)t.__k=[];else if(Vi(e,nr(v=t.props.children)?v:[v],t,r,n,o&&b!=="foreignObject",i,a,i?i[0]:r.__k&&ir(r,0),s,l),i!=null)for(v=i.length;v--;)i[v]!=null&&Li(i[v]);s||("value"in m&&(v=m.value)!==void 0&&(v!==e.value||b==="progress"&&!v||b==="option"&&v!==h.value)&&ar(e,"value",v,h.value,!1),"checked"in m&&(v=m.checked)!==void 0&&v!==e.checked&&ar(e,"checked",v,h.checked,!1))}return e}function en(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function Wi(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||en(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&Wi(n[o],t,r||typeof e.type!="function");r||e.__e==null||Li(e.__e),e.__=e.__e=e.__d=void 0}function bd(e,t,r){return this.constructor(e,r)}function ht(e,t,r){var n,o,i,a;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],Jr(t,e=(!n&&r||t).__k=D(W,null,[e]),o||pt,pt,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?Nt.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),Ki(i,e,a)}function Gi(e,t){ht(e,t,Gi)}function gd(e,t,r){var n,o,i,a,s=Ae({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&a!==void 0?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Nt.call(arguments,2):r),Mt(e.type,s,n||e.key,o||e.ref,null)}function Ft(e,t){var r={__c:t="__cC"+Mi++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(s){s.__e=!0,Qr(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Nt=Fi.slice,S={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},Ai=0,Ti=function(e){return e!=null&&e.constructor===void 0},ye.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ae({},this.state),typeof e=="function"&&(e=e(Ae({},r),this.props)),e&&Ae(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Qr(this))},ye.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Qr(this))},ye.prototype.render=W,et=[],Ni=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xr=function(e,t){return e.__v.__b-t.__v.__b},or.__r=0,Mi=0;var tn=class extends Error{constructor(t){super(t[0].message);js(this,"issues");this.name="ValiError",this.issues=t}};function Yi(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Lt(e){return{issues:e}}function ce(e){return{output:e}}function yd(e,t){return{reason:e==null?void 0:e.reason,validation:t.validation,origin:(e==null?void 0:e.origin)||"value",message:t.message,input:t.input,path:t.path,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function _d(e,t){return{reason:t,origin:e==null?void 0:e.origin,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}}function Be(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ce(e);let o,i,a=e;for(const s of t){const l=s._parse(a);if(l.issues){o=o||_d(r,n);for(const u of l.issues){const f=yd(o,u);i?i.push(f):i=[f]}if(o.abortEarly||o.abortPipeEarly)break}else a=l.output}return i?Lt(i):ce(a)}function ze(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function Zi(e){return typeof e=="function"?e():e}function Ue(e,t,r,n){return Lt([{validation:e,message:Zi(t),input:r,requirement:n}])}function wd(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,a]=ze(t,r);return[e,i,a]}const[n,o]=ze(e,t);return[void 0,n,o]}function De(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:Zi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Xi(e){return typeof e.default=="function"?e.default():e.default}function xd(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return Be(t,this.pipe,r,"any")}}}function kd(e,t,r){const[n="Invalid type",o]=ze(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,a){if(!Array.isArray(i))return De(a,"type","array",this.message,i);let s;const l=[];for(let u=0;u<i.length;u++){const f=i[u],c=this.item._parse(f,a);if(c.issues){const h={type:"array",input:i,key:u,value:f};for(const m of c.issues)m.path?m.path.unshift(h):m.path=[h],s==null||s.push(m);if(s||(s=c.issues),a!=null&&a.abortEarly)break}else l.push(c.output)}return s?Lt(s):Be(l,this.pipe,a,"array")}}}function Qi(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?De(i,"type","boolean",this.message,o):Be(o,this.pipe,i,"boolean")}}}function Ji(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?De(n,"type","literal",this.message,r):ce(r)}}}function $d(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const o=Xi(this);if(o===void 0)return ce(r);r=o}return this.wrapped._parse(r,n)}}}function rn(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?De(i,"type","number",this.message,o):Be(o,this.pipe,i,"number")}}}function Ne(e,t,r,n){const[o,i="Invalid type",a]=wd(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:a,_parse(l,u){if(!l||typeof l!="object")return De(u,"type","object",this.message,l);s=s||Object.entries(this.entries);let f;const c={};for(const[h,m]of s){const b=l[h],v=m._parse(b,u);if(v.issues){const _={type:"object",input:l,key:h,value:b};for(const x of v.issues)x.path?x.path.unshift(_):x.path=[_],f==null||f.push(x);if(f||(f=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||h in l)&&(c[h]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&f)){for(const h in l)if(!(h in this.entries)){const m=l[h],b=this.rest._parse(m,u);if(b.issues){const v={type:"object",input:l,key:h,value:m};for(const _ of b.issues)_.path?_.path.unshift(v):_.path=[v],f==null||f.push(_);if(f||(f=b.issues),u!=null&&u.abortEarly)break}else c[h]=b.output}}return f?Lt(f):Be(c,this.pipe,u,"object")}}}function Sd(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const o=Xi(this);if(o===void 0)return ce(r);r=o}return this.wrapped._parse(r,n)}}}function Cd(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ce(r):De(n,"type","picklist",this.message,r)}}}function Se(e,t){const[r="Invalid type",n]=ze(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?De(i,"type","string",this.message,o):Be(o,this.pipe,i,"string")}}}function Ed(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=ze(r,n);return[e,t,a,s]}const[o,i]=ze(t,r);return[Se(),e,o,i]}var Od=["__proto__","prototype","constructor"];function eo(e,t,r,n){const[o,i,a="Invalid type",s]=Ed(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:a,pipe:s,_parse(l,u){if(!l||typeof l!="object")return De(u,"type","record",this.message,l);let f;const c={};for(const[h,m]of Object.entries(l))if(!Od.includes(h)){let b;const v=this.key._parse(h,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(v.issues){b={type:"record",input:l,key:h,value:m};for(const x of v.issues)x.path=[b],f==null||f.push(x);if(f||(f=v.issues),u!=null&&u.abortEarly)break}const _=this.value._parse(m,u);if(_.issues){b=b||{type:"record",input:l,key:h,value:m};for(const x of _.issues)x.path?x.path.unshift(b):x.path=[b],f==null||f.push(x);if(f||(f=_.issues),u!=null&&u.abortEarly)break}!v.issues&&!_.issues&&(c[v.output]=_.output)}return f?Lt(f):Be(c,this.pipe,u,"record")}}}function Id(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let o,i;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(o)for(const l of s.issues)o.push(l);else o=s.issues;else{i=[s.output];break}}return i?ce(i[0]):De(n,"type","union",this.message,r,o)}}}function sr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new tn(n.issues);return n.output}async function Pd(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new tn(n.issues);return n.output}function to(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const a=t(i.output);return r&&!Array.isArray(r)?r._parse(a,o):Be(a,r,o,typeof a)}}}var Ad=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Td(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Dd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Ad,_parse(t){return this.requirement.test(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function jt(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Nd(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function ro(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Md(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?Ue(this.type,this.message,r,this.requirement):ce(r)}}}function Fd(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ce(r):Ue(this.type,this.message,r,this.requirement)}}}function Ld(e="Invalid URL"){return{type:"url",async:!1,message:e,requirement(t){try{return new URL(t),!0}catch{return!1}},_parse(t){return this.requirement(t)?ce(t):Ue(this.type,this.message,t,this.requirement)}}}function fe(){return fe=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},fe.apply(this,arguments)}var Me,B,nn,no,vt=0,io=[],lr=[],oo=S.__b,ao=S.__r,so=S.diffed,lo=S.__c,co=S.unmount;function tt(e,t){S.__h&&S.__h(B,e,vt||t),vt=0;var r=B.__H||(B.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:lr}),r.__[e]}function G(e){return vt=1,cr(vo,e)}function cr(e,t,r){var n=tt(Me++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):vo(void 0,t),function(s){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,s);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=B,!B.u)){var o=function(s,l,u){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(h){return h.__c});if(f.every(function(h){return!h.__N}))return!i||i.call(this,s,l,u);var c=!1;return f.forEach(function(h){if(h.__N){var m=h.__[0];h.__=h.__N,h.__N=void 0,m!==h.__[0]&&(c=!0)}}),!(!c&&n.__c.props===s)&&(!i||i.call(this,s,l,u))};B.u=!0;var i=B.shouldComponentUpdate,a=B.componentWillUpdate;B.componentWillUpdate=function(s,l,u){if(this.__e){var f=i;i=void 0,o(s,l,u),i=f}a&&a.call(this,s,l,u)},B.shouldComponentUpdate=o}return n.__N||n.__}function R(e,t){var r=tt(Me++,3);!S.__s&&an(r.__H,t)&&(r.__=e,r.i=t,B.__H.__h.push(r))}function ve(e,t){var r=tt(Me++,4);!S.__s&&an(r.__H,t)&&(r.__=e,r.i=t,B.__h.push(r))}function L(e){return vt=5,ue(function(){return{current:e}},[])}function uo(e,t,r){vt=6,ve(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},r==null?r:r.concat(e))}function ue(e,t){var r=tt(Me++,7);return an(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function me(e,t){return vt=8,ue(function(){return e},t)}function ur(e){var t=B.context[e.__c],r=tt(Me++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(B)),t.props.value):e.__}function fo(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function jd(e){var t=tt(Me++,10),r=G();return t.__=e,B.componentDidCatch||(B.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function po(){var e=tt(Me++,11);if(!e.__){for(var t=B.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function Rd(){for(var e;e=io.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(dr),e.__H.__h.forEach(on),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){B=null,oo&&oo(e)},S.__r=function(e){ao&&ao(e),Me=0;var t=(B=e.__c).__H;t&&(nn===B?(t.__h=[],B.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=lr,r.__N=r.i=void 0})):(t.__h.forEach(dr),t.__h.forEach(on),t.__h=[],Me=0)),nn=B},S.diffed=function(e){so&&so(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(io.push(t)!==1&&no===S.requestAnimationFrame||((no=S.requestAnimationFrame)||Vd)(Rd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==lr&&(r.__=r.__V),r.i=void 0,r.__V=lr})),nn=B=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(dr),r.__h=r.__h.filter(function(n){return!n.__||on(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),lo&&lo(e,t)},S.unmount=function(e){co&&co(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{dr(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var ho=typeof requestAnimationFrame=="function";function Vd(e){var t,r=function(){clearTimeout(n),ho&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ho&&(t=requestAnimationFrame(r))}function dr(e){var t=B,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),B=t}function on(e){var t=B;e.__c=e.__(),B=t}function an(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function vo(e,t){return typeof t=="function"?t(e):t}function mo(e,t){for(var r in t)e[r]=t[r];return e}function sn(e,t){for(var r in e)if(r!=="__source"&&!(r in t))return!0;for(var n in t)if(n!=="__source"&&e[n]!==t[n])return!0;return!1}function ln(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function fr(e){this.props=e}function bo(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:sn(this.props,o)}function n(o){return this.shouldComponentUpdate=r,D(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(fr.prototype=new ye).isPureReactComponent=!0,fr.prototype.shouldComponentUpdate=function(e,t){return sn(this.props,e)||sn(this.state,t)};var go=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),go&&go(e)};var Bd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function re(e){function t(r){var n=mo({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Bd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var yo=function(e,t){return e==null?null:Te(Te(e).map(t))},Fe={map:yo,forEach:yo,count:function(e){return e?Te(e).length:0},only:function(e){var t=Te(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Te},zd=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}zd(e,t,r,n)};var _o=S.unmount;function wo(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(n){typeof n.__c=="function"&&n.__c()}),e.__c.__H=null),(e=mo({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return wo(n,t,r)})),e}function xo(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return xo(n,t,r)}),e.__c&&e.__c.__P===t&&(e.__e&&r.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=r)),e}function mt(){this.__u=0,this.t=null,this.__b=null}function ko(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function cn(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return D(r,i)}return o.displayName="Lazy",o.__f=!0,o}function bt(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),_o&&_o(e)},(mt.prototype=new ye).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=ko(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=xo(u,u.__c.__P,u.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},mt.prototype.componentWillUnmount=function(){this.t=[]},mt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=wo(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&D(W,null,e.fallback);return o&&(o.__h=null),[D(W,null,t.__a?null:e.children),o]};var $o=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;e.u=r=r[2]}};function Ud(e){return this.getChildContext=function(){return e.context},e.children}function Hd(e){var t=this,r=e.i;t.componentWillUnmount=function(){ht(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),ht(D(Ud,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function So(e,t){var r=D(Hd,{__v:e,i:t});return r.containerInfo=t,r}(bt.prototype=new ye).__a=function(e){var t=this,r=ko(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),$o(t,e,n)):o()};r?r(i):i()}},bt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Te(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},bt.prototype.componentDidUpdate=bt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){$o(e,r,t)})};var Co=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,qd=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Kd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Wd=/[A-Z0-9]/g,Gd=typeof document<"u",Yd=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Eo(e,t,r){return t.__k==null&&(t.textContent=""),ht(e,t),typeof r=="function"&&r(),e?e.__c:null}function Oo(e,t,r){return Gi(e,t),typeof r=="function"&&r(),e?e.__c:null}ye.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ye.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Io=S.event;function Zd(){}function Xd(){return this.cancelBubble}function Qd(){return this.defaultPrevented}S.event=function(e){return Io&&(e=Io(e)),e.persist=Zd,e.isPropagationStopped=Xd,e.isDefaultPrevented=Qd,e.nativeEvent=e};var un,Jd={enumerable:!1,configurable:!0,get:function(){return this.class}},Po=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||Gd&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||Yd(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":Kd.test(i)?i=s:n.indexOf("-")===-1&&qd.test(i)?i=i.replace(Wd,"-$&").toLowerCase():a===null&&(a=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=Te(r.children).forEach(function(l){l.props.selected=o.value.indexOf(l.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=Te(r.children).forEach(function(l){l.props.selected=o.multiple?o.defaultValue.indexOf(l.props.value)!=-1:o.defaultValue==l.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",Jd)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Co,Po&&Po(e)};var Ao=S.__r;S.__r=function(e){Ao&&Ao(e),un=e.__c};var To=S.diffed;S.diffed=function(e){To&&To(e);var t=e.props,r=e.__e;r!=null&&e.type==="textarea"&&"value"in t&&t.value!==r.value&&(r.value=t.value==null?"":t.value),un=null};var Do={ReactCurrentDispatcher:{current:{readContext:function(e){return un.__n[e.__c].props.value}}}},ef="17.0.2";function No(e){return D.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Co}function gt(e){return rt(e)?gd.apply(null,arguments):e}function Mo(e){return!!e.__k&&(ht(null,e),!0)}function Fo(e){return e&&(e.base||e.nodeType===1&&e)||null}var Lo=function(e,t){return e(t)},pr=function(e,t){return e(t)},jo=W;function dn(e){e()}function Ro(e){return e}function Vo(){return[!1,dn]}var Bo=ve;function zo(e,t){var r=t(),n=G({h:{__:r,v:t}}),o=n[0].h,i=n[1];return ve(function(){o.__=r,o.v=t,ln(o.__,t())||i({h:o})},[e,r,t]),R(function(){return ln(o.__,o.v())||i({h:o}),e(function(){ln(o.__,o.v())||i({h:o})})},[e]),r}var xe={useState:G,useId:po,useReducer:cr,useEffect:R,useLayoutEffect:ve,useInsertionEffect:Bo,useTransition:Vo,useDeferredValue:Ro,useSyncExternalStore:zo,startTransition:dn,useRef:L,useImperativeHandle:uo,useMemo:ue,useCallback:me,useContext:ur,useDebugValue:fo,version:"17.0.2",Children:Fe,render:Eo,hydrate:Oo,unmountComponentAtNode:Mo,createPortal:So,createElement:D,createContext:Ft,createFactory:No,cloneElement:gt,createRef:ji,Fragment:W,isValidElement:rt,findDOMNode:Fo,Component:ye,PureComponent:fr,memo:bo,forwardRef:re,flushSync:pr,unstable_batchedUpdates:Lo,StrictMode:jo,Suspense:mt,SuspenseList:bt,lazy:cn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do};const tf=Object.freeze(Object.defineProperty({__proto__:null,Children:Fe,Component:ye,Fragment:W,PureComponent:fr,StrictMode:jo,Suspense:mt,SuspenseList:bt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Do,cloneElement:gt,createContext:Ft,createElement:D,createFactory:No,createPortal:So,createRef:ji,default:xe,findDOMNode:Fo,flushSync:pr,forwardRef:re,hydrate:Oo,isValidElement:rt,lazy:cn,memo:bo,render:Eo,startTransition:dn,unmountComponentAtNode:Mo,unstable_batchedUpdates:Lo,useCallback:me,useContext:ur,useDebugValue:fo,useDeferredValue:Ro,useEffect:R,useErrorBoundary:jd,useId:po,useImperativeHandle:uo,useInsertionEffect:Bo,useLayoutEffect:ve,useMemo:ue,useReducer:cr,useRef:L,useState:G,useSyncExternalStore:zo,useTransition:Vo,version:ef},Symbol.toStringTag,{value:"Module"}));function yt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function rf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Uo(...e){return t=>e.forEach(r=>rf(r,t))}function Rt(...e){return me(Uo(...e),e)}function nf(e,t=[]){let r=[];function n(i,a){const s=Ft(a),l=r.length;r=[...r,a];function u(c){const{scope:h,children:m,...b}=c,v=(h==null?void 0:h[e][l])||s,_=ue(()=>b,Object.values(b));return D(v.Provider,{value:_},m)}function f(c,h){const m=(h==null?void 0:h[e][l])||s,b=ur(m);if(b)return b;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>Ft(a));return function(s){const l=(s==null?void 0:s[e])||i;return ue(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,of(o,...t)]}function of(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const c=l(i)[`__scope${u}`];return{...s,...c}},{});return ue(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const fn=globalThis!=null&&globalThis.document?ve:()=>{},af=tf["useId".toString()]||(()=>{});let sf=0;function pn(e){const[t,r]=G(af());return fn(()=>{e||r(n=>n??String(sf++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=L(e);return R(()=>{t.current=e}),ue(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function lf({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=cf({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=nt(r),l=me(u=>{if(i){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else o(u)},[i,e,o,s]);return[a,l]}function cf({defaultProp:e,onChange:t}){const r=G(e),[n]=r,o=L(n),i=nt(t);return R(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const hn=re((e,t)=>{const{children:r,...n}=e,o=Fe.toArray(r),i=o.find(df);if(i){const a=i.props.children,s=o.map(l=>l===i?Fe.count(a)>1?Fe.only(null):rt(a)?a.props.children:null:l);return D(vn,fe({},n,{ref:t}),rt(a)?gt(a,void 0,s):null)}return D(vn,fe({},n,{ref:t}),r)});hn.displayName="Slot";const vn=re((e,t)=>{const{children:r,...n}=e;return rt(r)?gt(r,{...ff(n,r.props),ref:t?Uo(t,r.ref):r.ref}):Fe.count(r)>1?Fe.only(null):null});vn.displayName="SlotClone";const uf=({children:e})=>D(W,null,e);function df(e){return rt(e)&&e.type===uf}function ff(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const mn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=re((n,o)=>{const{asChild:i,...a}=n,s=i?hn:t;return R(()=>{window[Symbol.for("radix-ui")]=!0},[]),D(s,fe({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function pf(e,t){e&&pr(()=>e.dispatchEvent(t))}function hf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);R(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const bn="dismissableLayer.update",vf="dismissableLayer.pointerDownOutside",mf="dismissableLayer.focusOutside";let Ho;const bf=Ft({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gf=re((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=ur(bf),[c,h]=G(null),m=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,b]=G({}),v=Rt(t,N=>h(N)),_=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=_.indexOf(x),O=c?_.indexOf(c):-1,P=f.layersWithOutsidePointerEventsDisabled.size>0,I=O>=w,U=yf(N=>{const M=N.target,se=[...f.branches].some(te=>te.contains(M));!I||se||(i==null||i(N),s==null||s(N),N.defaultPrevented||l==null||l())},m),q=_f(N=>{const M=N.target;[...f.branches].some(te=>te.contains(M))||(a==null||a(N),s==null||s(N),N.defaultPrevented||l==null||l())},m);return hf(N=>{O===f.layers.size-1&&(o==null||o(N),!N.defaultPrevented&&l&&(N.preventDefault(),l()))},m),R(()=>{if(c)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Ho=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(c)),f.layers.add(c),qo(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ho)}},[c,m,n,f]),R(()=>()=>{c&&(f.layers.delete(c),f.layersWithOutsidePointerEventsDisabled.delete(c),qo())},[c,f]),R(()=>{const N=()=>b({});return document.addEventListener(bn,N),()=>document.removeEventListener(bn,N)},[]),D(mn.div,fe({},u,{ref:v,style:{pointerEvents:P?I?"auto":"none":void 0,...e.style},onFocusCapture:yt(e.onFocusCapture,q.onFocusCapture),onBlurCapture:yt(e.onBlurCapture,q.onBlurCapture),onPointerDownCapture:yt(e.onPointerDownCapture,U.onPointerDownCapture)}))});function yf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1),o=L(()=>{});return R(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Ko(vf,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function _f(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1);return R(()=>{const o=i=>{i.target&&!n.current&&Ko(mf,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function qo(){const e=new CustomEvent(bn);document.dispatchEvent(e)}function Ko(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?pf(o,i):o.dispatchEvent(i)}const gn="focusScope.autoFocusOnMount",yn="focusScope.autoFocusOnUnmount",Wo={bubbles:!1,cancelable:!0},wf=re((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=G(null),u=nt(o),f=nt(i),c=L(null),h=Rt(t,v=>l(v)),m=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;R(()=>{if(n){let v=function(O){if(m.paused||!s)return;const P=O.target;s.contains(P)?c.current=P:He(c.current,{select:!0})},_=function(O){if(m.paused||!s)return;const P=O.relatedTarget;P!==null&&(s.contains(P)||He(c.current,{select:!0}))},x=function(O){if(document.activeElement===document.body)for(const I of O)I.removedNodes.length>0&&He(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),w.disconnect()}}},[n,s,m.paused]),R(()=>{if(s){Zo.add(m);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(gn,Wo);s.addEventListener(gn,u),s.dispatchEvent(x),x.defaultPrevented||(xf(Ef(Go(s)),{select:!0}),document.activeElement===v&&He(s))}return()=>{s.removeEventListener(gn,u),setTimeout(()=>{const x=new CustomEvent(yn,Wo);s.addEventListener(yn,f),s.dispatchEvent(x),x.defaultPrevented||He(v??document.body,{select:!0}),s.removeEventListener(yn,f),Zo.remove(m)},0)}}},[s,u,f,m]);const b=me(v=>{if(!r&&!n||m.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(_&&x){const w=v.currentTarget,[O,P]=kf(w);O&&P?!v.shiftKey&&x===P?(v.preventDefault(),r&&He(O,{select:!0})):v.shiftKey&&x===O&&(v.preventDefault(),r&&He(P,{select:!0})):x===w&&v.preventDefault()}},[r,n,m.paused]);return D(mn.div,fe({tabIndex:-1},a,{ref:h,onKeyDown:b}))});function xf(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(He(n,{select:t}),document.activeElement!==r)return}function kf(e){const t=Go(e),r=Yo(t,e),n=Yo(t.reverse(),e);return[r,n]}function Go(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Yo(e,t){for(const r of e)if(!$f(r,{upTo:t}))return r}function $f(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Sf(e){return e instanceof HTMLInputElement&&"select"in e}function He(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Sf(e)&&t&&e.select()}}const Zo=Cf();function Cf(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Xo(e,t),e.unshift(t)},remove(t){var r;e=Xo(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Xo(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Ef(e){return e.filter(t=>t.tagName!=="A")}function Of(e,t){return cr((r,n)=>{const o=t[r][n];return o??r},e)}const _n=e=>{const{present:t,children:r}=e,n=If(t),o=typeof r=="function"?r({present:n.isPresent}):Fe.only(r),i=Rt(n.ref,o.ref);return typeof r=="function"||n.isPresent?gt(o,{ref:i}):null};_n.displayName="Presence";function If(e){const[t,r]=G(),n=L({}),o=L(e),i=L("none"),a=e?"mounted":"unmounted",[s,l]=Of(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return R(()=>{const u=hr(n.current);i.current=s==="mounted"?u:"none"},[s]),fn(()=>{const u=n.current,f=o.current;if(f!==e){const h=i.current,m=hr(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),fn(()=>{if(t){const u=c=>{const m=hr(n.current).includes(c.animationName);c.target===t&&m&&pr(()=>l("ANIMATION_END"))},f=c=>{c.target===t&&(i.current=hr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:me(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function hr(e){return(e==null?void 0:e.animationName)||"none"}let wn=0;function Pf(){R(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Qo()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Qo()),wn++,()=>{wn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),wn--}},[])}function Qo(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ce=function(){return Ce=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ce.apply(this,arguments)};function Jo(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Af(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var vr="right-scroll-bar-position",mr="width-before-scroll-bar",Tf="with-scroll-bars-hidden",Df="--removed-body-scroll-bar-size";function Nf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Mf(e,t){var r=G(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Ff(e,t){return Mf(t||null,function(r){return e.forEach(function(n){return Nf(n,r)})})}function Lf(e){return e}function jf(e,t){t===void 0&&(t=Lf);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function Rf(e){e===void 0&&(e={});var t=jf(null);return t.options=Ce({async:!0,ssr:!1},e),t}var ea=function(e){var t=e.sideCar,r=Jo(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return D(n,Ce({},r))};ea.isSideCarExport=!0;function Vf(e,t){return e.useMedium(t),ea}var ta=Rf(),xn=function(){},br=re(function(e,t){var r=L(null),n=G({onScrollCapture:xn,onWheelCapture:xn,onTouchMoveCapture:xn}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,c=e.shards,h=e.sideCar,m=e.noIsolation,b=e.inert,v=e.allowPinchZoom,_=e.as,x=_===void 0?"div":_,w=Jo(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),O=h,P=Ff([r,t]),I=Ce(Ce({},w),o);return D(W,null,f&&D(O,{sideCar:ta,removeScrollBar:u,shards:c,noIsolation:m,inert:b,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?gt(Fe.only(s),Ce(Ce({},I),{ref:P})):D(x,Ce({},I,{className:l,ref:P}),s))});br.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},br.classNames={fullWidth:mr,zeroRight:vr};var ra,Bf=function(){if(ra)return ra;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function zf(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Bf();return t&&e.setAttribute("nonce",t),e}function Uf(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Hf(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var qf=function(){var e=0,t=null;return{add:function(r){e==0&&(t=zf())&&(Uf(t,r),Hf(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Kf=function(){var e=qf();return function(t,r){R(function(){return e.add(t),function(){e.remove()}},[t&&r])}},na=function(){var e=Kf(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Wf={left:0,top:0,right:0,gap:0},kn=function(e){return parseInt(e||"",10)||0},Gf=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[kn(r),kn(n),kn(o)]},Yf=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wf;var t=Gf(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},Zf=na(),Xf=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
2
2
  .`.concat(Tf,` {
3
3
  overflow: hidden `).concat(n,`;
4
4
  padding-right: `).concat(s,"px ").concat(n,`;
@@ -35,11 +35,11 @@ var vm=Object.defineProperty;var mm=(Je,ge,Ve)=>ge in Je?vm(Je,ge,{enumerable:!0
35
35
  body {
36
36
  `).concat(Df,": ").concat(s,`px;
37
37
  }
38
- `)},Qf=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=ue(function(){return Yf(o)},[o]);return D(Zf,{styles:Xf(i,!t,o,r?"":"!important")})},$n=!1;if(typeof window<"u")try{var gr=Object.defineProperty({},"passive",{get:function(){return $n=!0,!0}});window.addEventListener("test",gr,gr),window.removeEventListener("test",gr,gr)}catch{$n=!1}var _t=$n?{passive:!1}:!1,Jf=function(e){return e.tagName==="TEXTAREA"},ia=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Jf(e)&&r[t]==="visible")},ep=function(e){return ia(e,"overflowY")},tp=function(e){return ia(e,"overflowX")},oa=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=aa(e,r);if(n){var o=sa(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},rp=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},np=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},aa=function(e,t){return e==="v"?ep(t):tp(t)},sa=function(e,t){return e==="v"?rp(t):np(t)},ip=function(e,t){return e==="h"&&t==="rtl"?-1:1},op=function(e,t,r,n,o){var i=ip(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),u=!1,p=a>0,c=0,h=0;do{var g=sa(e,s),m=g[0],v=g[1],_=g[2],x=v-_-i*m;(m||x)&&aa(e,s)&&(c+=x,h+=m),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(p&&(o&&c===0||!o&&a>c)||!p&&(o&&h===0||!o&&-a>h))&&(u=!0),u},yr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},la=function(e){return[e.deltaX,e.deltaY]},ca=function(e){return e&&"current"in e?e.current:e},ap=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sp=function(e){return`
38
+ `)},Qf=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=ue(function(){return Yf(o)},[o]);return D(Zf,{styles:Xf(i,!t,o,r?"":"!important")})},$n=!1;if(typeof window<"u")try{var gr=Object.defineProperty({},"passive",{get:function(){return $n=!0,!0}});window.addEventListener("test",gr,gr),window.removeEventListener("test",gr,gr)}catch{$n=!1}var _t=$n?{passive:!1}:!1,Jf=function(e){return e.tagName==="TEXTAREA"},ia=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Jf(e)&&r[t]==="visible")},ep=function(e){return ia(e,"overflowY")},tp=function(e){return ia(e,"overflowX")},oa=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=aa(e,r);if(n){var o=sa(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},rp=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},np=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},aa=function(e,t){return e==="v"?ep(t):tp(t)},sa=function(e,t){return e==="v"?rp(t):np(t)},ip=function(e,t){return e==="h"&&t==="rtl"?-1:1},op=function(e,t,r,n,o){var i=ip(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),u=!1,f=a>0,c=0,h=0;do{var m=sa(e,s),b=m[0],v=m[1],_=m[2],x=v-_-i*b;(b||x)&&aa(e,s)&&(c+=x,h+=b),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(o&&c===0||!o&&a>c)||!f&&(o&&h===0||!o&&-a>h))&&(u=!0),u},yr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},la=function(e){return[e.deltaX,e.deltaY]},ca=function(e){return e&&"current"in e?e.current:e},ap=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sp=function(e){return`
39
39
  .block-interactivity-`.concat(e,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
41
- `)},lp=0,wt=[];function cp(e){var t=L([]),r=L([0,0]),n=L(),o=G(lp++)[0],i=G(function(){return na()})[0],a=L(e);R(function(){a.current=e},[e]),R(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Af([e.lockRef.current],(e.shards||[]).map(ca),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me(function(v,_){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=yr(v),w=r.current,O="deltaX"in v?v.deltaX:w[0]-x[0],P="deltaY"in v?v.deltaY:w[1]-x[1],I,U=v.target,q=Math.abs(O)>Math.abs(P)?"h":"v";if("touches"in v&&q==="h"&&U.type==="range")return!1;var N=oa(q,U);if(!N)return!0;if(N?I=q:(I=q==="v"?"h":"v",N=oa(q,U)),!N)return!1;if(!n.current&&"changedTouches"in v&&(O||P)&&(n.current=I),!I)return!0;var M=n.current||I;return op(M,_,v,M==="h"?O:P,!0)},[]),l=me(function(v){var _=v;if(!(!wt.length||wt[wt.length-1]!==i)){var x="deltaY"in _?la(_):yr(_),w=t.current.filter(function(I){return I.name===_.type&&I.target===_.target&&ap(I.delta,x)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var O=(a.current.shards||[]).map(ca).filter(Boolean).filter(function(I){return I.contains(_.target)}),P=O.length>0?s(_,O[0]):!a.current.noIsolation;P&&_.cancelable&&_.preventDefault()}}},[]),u=me(function(v,_,x,w){var O={name:v,delta:_,target:x,should:w};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(P){return P!==O})},1)},[]),p=me(function(v){r.current=yr(v),n.current=void 0},[]),c=me(function(v){u(v.type,la(v),v.target,s(v,e.lockRef.current))},[]),h=me(function(v){u(v.type,yr(v),v.target,s(v,e.lockRef.current))},[]);R(function(){return wt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,_t),document.addEventListener("touchmove",l,_t),document.addEventListener("touchstart",p,_t),function(){wt=wt.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,_t),document.removeEventListener("touchmove",l,_t),document.removeEventListener("touchstart",p,_t)}},[]);var g=e.removeScrollBar,m=e.inert;return D(W,null,m?D(i,{styles:sp(o)}):null,g?D(Qf,{gapMode:"margin"}):null)}const up=Vf(ta,cp);var ua=re(function(e,t){return D(br,Ce({},e,{ref:t,sideCar:up}))});ua.classNames=br.classNames;const dp=ua;var fp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xt=new WeakMap,_r=new WeakMap,wr={},Sn=0,da=function(e){return e&&(e.host||da(e.parentNode))},pp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=da(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},hp=function(e,t,r,n){var o=pp(t,Array.isArray(e)?e:[e]);wr[r]||(wr[r]=new WeakMap);var i=wr[r],a=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var p=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(s.has(h))p(h);else{var g=h.getAttribute(n),m=g!==null&&g!=="false",v=(xt.get(h)||0)+1,_=(i.get(h)||0)+1;xt.set(h,v),i.set(h,_),a.push(h),v===1&&m&&_r.set(h,!0),_===1&&h.setAttribute(r,"true"),m||h.setAttribute(n,"true")}})};return p(t),s.clear(),Sn++,function(){a.forEach(function(c){var h=xt.get(c)-1,g=i.get(c)-1;xt.set(c,h),i.set(c,g),h||(_r.has(c)||c.removeAttribute(n),_r.delete(c)),g||c.removeAttribute(r)}),Sn--,Sn||(xt=new WeakMap,xt=new WeakMap,_r=new WeakMap,wr={})}},vp=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||fp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),hp(n,o,r,"aria-hidden")):function(){return null}};const fa="Dialog",[pa,gm]=nf(fa),[mp,kt]=pa(fa),bp=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=L(null),l=L(null),[u=!1,p]=lf({prop:n,defaultProp:o,onChange:i});return D(mp,{scope:t,triggerRef:s,contentRef:l,contentId:pn(),titleId:pn(),descriptionId:pn(),open:u,onOpenChange:p,onOpenToggle:me(()=>p(c=>!c),[p]),modal:a},r)},gp="DialogPortal",[ym,ha]=pa(gp,{forceMount:void 0}),Cn="DialogOverlay",yp=re((e,t)=>{const r=ha(Cn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=kt(Cn,e.__scopeDialog);return i.modal?D(_n,{present:n||i.open},D(_p,fe({},o,{ref:t}))):null}),_p=re((e,t)=>{const{__scopeDialog:r,...n}=e,o=kt(Cn,r);return D(dp,{as:hn,allowPinchZoom:!0,shards:[o.contentRef]},D(mn.div,fe({"data-state":ma(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Vt="DialogContent",wp=re((e,t)=>{const r=ha(Vt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=kt(Vt,e.__scopeDialog);return D(_n,{present:n||i.open},i.modal?D(xp,fe({},o,{ref:t})):D(kp,fe({},o,{ref:t})))}),xp=re((e,t)=>{const r=kt(Vt,e.__scopeDialog),n=L(null),o=Rt(t,r.contentRef,n);return R(()=>{const i=n.current;if(i)return vp(i)},[]),D(va,fe({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:yt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:yt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:yt(e.onFocusOutside,i=>i.preventDefault())}))}),kp=re((e,t)=>{const r=kt(Vt,e.__scopeDialog),n=L(!1),o=L(!1);return D(va,fe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),va=re((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=kt(Vt,r),l=L(null),u=Rt(t,l);return Pf(),D(W,null,D(wf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},D(gf,fe({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ma(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function ma(e){return e?"open":"closed"}const $p=bp,Sp=yp,Cp=wp;function ba(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ba(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function it(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ba(e))&&(n&&(n+=" "),n+=t);return n}const ga=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,ya=it,xr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ya(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const p=r==null?void 0:r[u],c=i==null?void 0:i[u];if(p===null)return null;const h=ga(p)||ga(c);return o[u][h]}),s=r&&Object.entries(r).reduce((u,p)=>{let[c,h]=p;return h===void 0||(u[c]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,p)=>{let{class:c,className:h,...g}=p;return Object.entries(g).every(m=>{let[v,_]=m;return Array.isArray(_)?_.includes({...i,...s}[v]):{...i,...s}[v]===_})?[...u,c,h]:u},[]);return ya(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},pe=Symbol.for("@ts-pattern/matcher"),_a=Symbol.for("@ts-pattern/isVariadic"),kr="@ts-pattern/anonymous-select-key",En=e=>!!(e&&typeof e=="object"),$r=e=>e&&!!e[pe],ne=(e,t,r)=>{if($r(e)){const n=e[pe](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(En(e)){if(!En(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const a of e.keys()){const s=e[a];$r(s)&&s[_a]?i.push(s):i.length?o.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+o.length)return!1;const a=t.slice(0,n.length),s=o.length===0?[]:t.slice(-o.length),l=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,p)=>ne(u,a[p],r))&&o.every((u,p)=>ne(u,s[p],r))&&(i.length===0||ne(i[0],l,r))}return e.length===t.length&&e.every((a,s)=>ne(a,t[s],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||$r(i=o)&&i[pe]().matcherType==="optional")&&ne(o,t[n],r);var i})}return Object.is(t,e)},be=e=>{var t,r,n;return En(e)?$r(e)?(t=(r=(n=e[pe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Bt(e,be):Bt(Object.values(e),be):[]},Bt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Ep(...e){if(e.length===1){const[t]=e;return r=>ne(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ne(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function le(e){return Object.assign(e,{optional:()=>In(e),and:t=>K(e,t),or:t=>wa(e,t),select:t=>t===void 0?zt(e):zt(t,e)})}function On(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[_a]:!0})}}))(e),{optional:()=>On(In(e)),select:t=>On(t===void 0?zt(e):zt(t,e))})}function In(e){return le({[pe]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(be(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:ne(e,t,n),selections:r}},getSelectionKeys:()=>be(e),matcherType:"optional"})})}const Op=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Ip=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function K(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>ne(o,t,n)),selections:r}},getSelectionKeys:()=>Bt(e,be),matcherType:"and"})})}function wa(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Bt(e,be).forEach(o=>n(o,void 0)),{matched:e.some(o=>ne(o,t,n)),selections:r}},getSelectionKeys:()=>Bt(e,be),matcherType:"or"})})}function j(e){return{[pe]:()=>({match:t=>({matched:!!e(t)})})}}function zt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return le({[pe]:()=>({match:n=>{let o={[t??kr]:n};return{matched:r===void 0||ne(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[t??kr].concat(r===void 0?[]:be(r))})})}function Ee(e){return typeof e=="number"}function ot(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}const xa=le(j(function(e){return!0})),Pp=xa,at=e=>Object.assign(le(e),{startsWith:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.endsWith(r)))));var r},minLength:t=>at(K(e,(r=>j(n=>ot(n)&&n.length>=r))(t))),maxLength:t=>at(K(e,(r=>j(n=>ot(n)&&n.length<=r))(t))),includes:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.includes(r)))));var r},regex:t=>{return at(K(e,(r=t,j(n=>ot(n)&&!!n.match(r)))));var r}}),Ap=at(j(ot)),Oe=e=>Object.assign(le(e),{between:(t,r)=>Oe(K(e,((n,o)=>j(i=>Ee(i)&&n<=i&&o>=i))(t,r))),lt:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n<r))(t))),gt:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n>r))(t))),lte:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n<=r))(t))),gte:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n>=r))(t))),int:()=>Oe(K(e,j(t=>Ee(t)&&Number.isInteger(t)))),finite:()=>Oe(K(e,j(t=>Ee(t)&&Number.isFinite(t)))),positive:()=>Oe(K(e,j(t=>Ee(t)&&t>0))),negative:()=>Oe(K(e,j(t=>Ee(t)&&t<0)))}),Tp=Oe(j(Ee)),Ke=e=>Object.assign(le(e),{between:(t,r)=>Ke(K(e,((n,o)=>j(i=>qe(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ke(K(e,(r=>j(n=>qe(n)&&n<r))(t))),gt:t=>Ke(K(e,(r=>j(n=>qe(n)&&n>r))(t))),lte:t=>Ke(K(e,(r=>j(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(K(e,(r=>j(n=>qe(n)&&n>=r))(t))),positive:()=>Ke(K(e,j(t=>qe(t)&&t>0))),negative:()=>Ke(K(e,j(t=>qe(t)&&t<0)))}),Dp=Ke(j(qe)),Np=le(j(function(e){return typeof e=="boolean"})),Mp=le(j(function(e){return typeof e=="symbol"})),Fp=le(j(function(e){return e==null}));var ie={__proto__:null,matcher:pe,optional:In,array:function(...e){return On({[pe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return be(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:t.every(i=>ne(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:be(e[0])})})},set:function(...e){return le({[pe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=e[0];return{matched:Op(t,i=>ne(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:be(e[0])})})},map:function(...e){return le({[pe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,a]=e;return{matched:Ip(t,(s,l)=>{const u=ne(i,l,n),p=ne(a,s,n);return u&&p}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...be(e[0]),...be(e[1])]})})},intersection:K,union:wa,not:function(e){return le({[pe]:()=>({match:t=>({matched:!ne(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:j,select:zt,any:xa,_:Pp,string:Ap,number:Tp,bigint:Dp,boolean:Np,symbol:Mp,nullish:Fp,instanceOf:function(e){return le(j(function(t){return r=>r instanceof t}(e)))},shape:function(e){return le(j(Ep(e)))}};const Pn={matched:!1,value:void 0};function Le(e){return new Sr(e,Pn)}class Sr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,a={};const s=(u,p)=>{i=!0,a[u]=p},l=!n.some(u=>ne(u,this.input,s))||o&&!o(this.input)?Pn:{matched:!0,value:r(i?kr in a?a[kr]:a:this.input,this.input)};return new Sr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Sr(this.input,n?{matched:!0,value:r(this.input,this.input)}:Pn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}}const _m="";function ke(e,t){if(!e)throw new Error(t)}function Cr(){throw new Error("Cycle detected")}var Lp=Symbol.for("preact-signals");function An(){if($t>1)$t--;else{for(var e,t=!1;Ut!==void 0;){var r=Ut;for(Ut=void 0,Tn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&$a(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(Tn=0,$t--,t)throw e}}var Y=void 0,Ut=void 0,$t=0,Tn=0,Er=0;function ka(e){if(Y!==void 0){var t=e.n;if(t===void 0||t.t!==Y)return t={i:0,S:e,p:Y.s,n:void 0,t:Y,e:void 0,x:void 0,r:t},Y.s!==void 0&&(Y.s.n=t),Y.s=t,e.n=t,32&Y.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Y.s,t.n=void 0,Y.s.n=t,Y.s=t),t}}function oe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}oe.prototype.brand=Lp,oe.prototype.h=function(){return!0},oe.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},oe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},oe.prototype.subscribe=function(e){var t=this;return Nn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},oe.prototype.valueOf=function(){return this.value},oe.prototype.toString=function(){return this.value+""},oe.prototype.toJSON=function(){return this.value},oe.prototype.peek=function(){return this.v},Object.defineProperty(oe.prototype,"value",{get:function(){var e=ka(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(Y instanceof Ge&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Tn>100&&Cr(),this.v=e,this.i++,Er++,$t++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{An()}}}});function We(e){return new oe(e)}function $a(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Sa(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ca(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Ge(e){oe.call(this,void 0),this.x=e,this.s=void 0,this.g=Er-1,this.f=4}(Ge.prototype=new oe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Er))return!0;if(this.g=Er,this.f|=1,this.i>0&&!$a(this))return this.f&=-2,!0;var e=Y;try{Sa(this),Y=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Y=e,Ca(this),this.f&=-2,!0},Ge.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}oe.prototype.S.call(this,e)},Ge.prototype.U=function(e){if(this.t!==void 0&&(oe.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ge.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ge.prototype.peek=function(){if(this.h()||Cr(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ge.prototype,"value",{get:function(){1&this.f&&Cr();var e=ka(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function jp(e){return new Ge(e)}function Ea(e){var t=e.u;if(e.u=void 0,typeof t=="function"){$t++;var r=Y;Y=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Dn(e),n}finally{Y=r,An()}}}function Dn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ea(e)}function Rp(e){if(Y!==this)throw new Error("Out-of-order effect");Ca(this),Y=e,this.f&=-2,8&this.f&&Dn(this),An()}function Ht(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ht.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},Ht.prototype.S=function(){1&this.f&&Cr(),this.f|=1,this.f&=-9,Ea(this),Sa(this),$t++;var e=Y;return Y=this,Rp.bind(this,e)},Ht.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ut,Ut=this)},Ht.prototype.d=function(){this.f|=8,1&this.f||Dn(this)};function Nn(e){var t=new Ht(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Mn;function St(e,t){S[e]=t.bind(null,S[e]||function(){})}function Or(e){Mn&&Mn(),Mn=e&&e.S()}function Oa(e){var t=this,r=e.data,n=Bp(r);n.value=r;var o=ue(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Ti(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},jp(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}Oa.displayName="_st",Object.defineProperties(oe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Oa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),St("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof oe&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),St("__r",function(e,t){Or();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Nn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Or(r),e(t)}),St("__e",function(e,t,r,n){Or(),e(t,r,n)}),St("diffed",function(e,t){Or();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else r.U=i={};for(var l in n){var u=i[l],p=n[l];u===void 0?(u=Vp(r,l,p,o),i[l]=u):u.o(p,o)}}}e(t)});function Vp(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=We(r);return{o:function(a,s){i.value=a,n=s},d:Nn(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}St("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),St("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ye.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Bp(e){return ue(function(){return We(e)},[])}const Fn=(e,t)=>t.some(r=>e instanceof r);let Ia,Pa;function zp(){return Ia||(Ia=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Up(){return Pa||(Pa=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Ln=new WeakMap,jn=new WeakMap,Ir=new WeakMap;function Hp(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{r(st(e.result)),o()},a=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",a)});return Ir.set(t,e),t}function qp(e){if(Ln.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{r(),o()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});Ln.set(e,t)}let Rn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return Ln.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return st(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Aa(e){Rn=e(Rn)}function Kp(e){return Up().includes(e)?function(...t){return e.apply(Vn(this),t),st(this.request)}:function(...t){return st(e.apply(Vn(this),t))}}function Wp(e){return typeof e=="function"?Kp(e):(e instanceof IDBTransaction&&qp(e),Fn(e,zp())?new Proxy(e,Rn):e)}function st(e){if(e instanceof IDBRequest)return Hp(e);if(jn.has(e))return jn.get(e);const t=Wp(e);return t!==e&&(jn.set(e,t),Ir.set(t,e)),t}const Vn=e=>Ir.get(e);function Gp(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=st(a);return n&&a.addEventListener("upgradeneeded",l=>{n(st(a.result),l.oldVersion,l.newVersion,st(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Yp=["get","getKey","getAll","getAllKeys","count"],Zp=["put","add","delete","clear"],Bn=new Map;function Ta(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Bn.get(t))return Bn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=Zp.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||Yp.includes(r)))return;const i=async function(a,...s){const l=this.transaction(a,o?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),o&&l.done]))[0]};return Bn.set(t,i),i}Aa(e=>({...e,get:(t,r,n)=>Ta(t,r)||e.get(t,r,n),has:(t,r)=>!!Ta(t,r)||e.has(t,r)}));const Xp=["continue","continuePrimaryKey","advance"],Da={},zn=new WeakMap,Na=new WeakMap,Qp={get(e,t){if(!Xp.includes(t))return e[t];let r=Da[t];return r||(r=Da[t]=function(...n){zn.set(this,Na.get(this)[t](...n))}),r}};async function*Jp(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Qp);for(Na.set(r,t),Ir.set(r,Vn(t));t;)yield r,t=await(zn.get(r)||t.continue()),zn.delete(r)}function Ma(e,t){return t===Symbol.asyncIterator&&Fn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Fn(e,[IDBIndex,IDBObjectStore])}Aa(e=>({...e,get(t,r,n){return Ma(t,r)?Jp:e.get(t,r,n)},has(t,r){return Ma(t,r)||e.has(t,r)}}));const qt=e=>Le(e).with(ie.number.lte(1e3),()=>`${Math.round(e)}KB`).with(ie.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Fa=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},eh=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),Pr=e=>t=>t?t.type===e:!1;class Kt extends Error{constructor(){super("Aborted")}}function La(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const ja=e=>typeof e=="string",th=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ra=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:th()}),rh=e=>Le(e).with({nativeEvent:{submitter:ie.select(ie.union(ie.instanceOf(HTMLButtonElement),ie.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Va=typeof window>"u"?void 0:Gp("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Wt={getStateData:async(e,t)=>{var n;const r=Ba({...e,flowKeys:t});return(n=await Va)==null?void 0:n.get("state",r)},setStateData:La(async e=>{var r;const t=Ba(e);return(r=await Va)==null?void 0:r.put("state",e.data,t)},1e3)},Ar=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(u=>u.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,a=e.find(u=>u.id===i),s=t.type.includes("question")?1:0;if(a){const u=s+Math.max(Ar(e,o,r,n+s).remainingSteps,Ar(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=s+Ar(e,o,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},nh=e=>{const t={},r=e.find(n=>n.isHead);return r&&Ar(e,r,(n,o)=>{t[n]=o}),t},Ba=e=>[...e.flowKeys,e.id,e.version].join("/"),Ye=We({state:"idle"}),Gt=e=>{const{state:t,flow:r}=Ye.value;if(t!=="loaded")return;ke(r,"No flow to update");const n=e(r.data);r.data=n,Ye.value={state:t,flow:r},Wt.setStateData(r)},T={current$:Ye,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:o,job:i})=>{const s={data:await Wt.getStateData(e,r)??Ra(),startedAt:new Date,nodeIdToProgress:nh(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:o,job:i};Ye.value={state:"loaded",flow:s},Wt.setStateData(s)},cancelCurrentFlow:()=>{Ye.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>Gt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Gt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Ye.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ra();Ye.value={state:e,flow:{...t,data:r,startedAt:new Date}},Wt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Gt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ye.value;ke(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Wt.setStateData(r)},setSubmission:(e,t)=>Gt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Gt(t=>({...t,currentInput:e??null}))};var ih=0;function d(e,t,r,n,o,i){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var u={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ih,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(u),u}const oh=({message:e})=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:[d("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&d("p",{class:"text-neutral-9 text-sm",children:e})]})]}),ah=e=>d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:"Loading"}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),za=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(ah,{class:"text-neutral-6 h-8 w-8"})}),sh=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Tr=({class:e,children:t,...r})=>d("button",{class:it("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),lh=()=>{if(T.current$.value.state!=="loaded")return null;const e=T.current$.value.flow.nodeIdToProgress,t=T.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:sh(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},ch=({children:e})=>{const t=T.viewState$;return d(W,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"flex h-[var(--header-height)] gap-2",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?d(W,{children:[d(Tr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:d("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),d(Tr,{"aria-label":"Close application",onClick:T.cancelCurrentFlow,children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):d(W,{children:[T.current$.value.state==="loaded"&&d(Tr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(Tr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),d(lh,{})]})})},uh=cn(()=>Promise.resolve().then(()=>sm).then(e=>e.ChatbotBody)),dh=xr("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),fh=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=T.current$.value,a=T.viewState$.value,s=n!=="idle"&&a==="maximised",l=L(null);return d($p,{open:s,modal:s,children:[d(Sp,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),d(Cp,{forceMount:!0,asChild:!0,children:d("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:dh({view:a}),children:d("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[d(ch,{children:o==null?void 0:o.title}),Le({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>d(za,{},"loading")).with({state:"loaded"},()=>d(mt,{fallback:d(za,{},"loading"),children:d(uh,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>d(oh,{message:i})).exhaustive()]})})})]})},Ua=Ne({id:Yi(Se(),String),version:rn(),build:rn(),nodes:kd(xd()),context_schema:Sd($d(eo(Se(),Ne({required:Qi(),type:Id([Ji("string"),Ji("number")])}))))}),ph=Ne({flow:Ua}),hh=Ne({company:Ne({name:Se()}),flow:Ua,job:Ne({id:Yi(Se(),String),title:Se()})}),vh=`#isdk{position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){#isdk{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}#isdk{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#isdk .pointer-events-none{pointer-events:none}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .right-3{right:.75rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%);height:var(--header-height)}to{transform:translateY(0);height:var(--content-height)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.16,1,.3,1)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-neutral-3{background-color:var(--i-color-n-3)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .bg-none{background-image:none}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-2{padding-top:.5rem}#isdk .pt-2\\.5{padding-top:.625rem}#isdk .pt-3{padding-top:.75rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-right{text-align:right}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .font-medium{font-weight:500}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#isdk .leading-3{line-height:.75rem}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline-none{outline:2px solid transparent;outline-offset:2px}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#isdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .will-change-\\[height\\]{will-change:height}#isdk .text-wrap-balance{text-wrap:balance}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}#isdk .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}#isdk .\\[text-wrap\\:pretty\\]{text-wrap:pretty}#isdk .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}#isdk .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}#isdk .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}#isdk .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#isdk .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}#isdk .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}#isdk .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#isdk .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#isdk .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}#isdk .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}#isdk .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}#isdk .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}#isdk .active\\:text-accent-10:active{color:var(--i-color-a-10)}#isdk .active\\:text-accent-11:active{color:var(--i-color-a-11)}#isdk .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}#isdk .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}#isdk .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}#isdk .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}@media (pointer: coarse){#isdk .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}
42
- `,Ha="isdk",mh={not_in_local_storage:"Application not found in local storage",invalid_end_node:"Unexpected node type to finish flow",no_submissions:"Application ended without any fields submitted",invalid_state:"Invalid state"},bh=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Ha);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Ha,t}});var gh=["1","2","3","4","5","6","7","8","9","10","11","12"],yh={light:{1:[98.8,.015],2:[97.8,.018],3:[95.8,.025],4:[92,.04],5:[89,.05],6:[85,.07],7:[80.5,.08],8:[74,.11],9:[60,.22],10:[56,.23],11:[50,.19],12:[25,.18]},dark:{1:[19,.015],2:[21,.018],3:[25.5,.055],4:[29.3,.084],5:[33.5,.098],6:[39.05,.107],7:[45,.11],8:[55,.13],9:[60,.22],10:[67,.18],11:[79.3,.12],12:[95,.04]}},_h=(e,t=1,r)=>n=>{const[o,i]=yh[r][n];return"oklch("+o+"% "+i*t+" "+e+")"},Un=e=>{const t=_h(e.hue,e.chroma,e.mode);return Object.fromEntries(gh.map(r=>[e.prefix+r,e.transform(t(r))]))},Hn=e=>e,wh=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(o=>{const i=n[o];return[`${String(r)}.${o}`,i]}):[[r,n]]});return Object.fromEntries(t)},Dr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),qn=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Dr(e)&&Dr(r))for(const n in r){const o=r[n];if(Dr(o)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];Dr(i)&&qn(i,o)}else Object.assign(e,{[n]:r[n]})}return qn(e,...t)},xh=e=>{function t(r,n){const o=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${o}`:`var(--${o})`}return t},kh=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:o,getToken:i}=n,a=h=>i("reference",h.toString()),s=e({theme:o}),l=t({theme:o,core:a,raw:{core:s}}),u=r({theme:o,core:a,semantic:a,raw:{core:s,semantic:l}}),p=wh(qn(s,l,u)),c=([h,g],m)=>{const v=[m,h].filter(Boolean).join(".");return typeof g=="object"?Object.entries(g).flatMap(_=>c(_,v)):[[n.getToken("declaration",v),g]]};return{values:p,declarations:Object.fromEntries(Object.entries(p).flatMap(h=>c(h))),ref:h=>i("reference",h.toString())}}})})})});const[Kn,Wn,qa]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],$h=kh().core(({theme:e})=>({color:{black:Kn,white:Wn,lowest:e.mode==="light"?Wn:Kn,highest:e.mode==="light"?Kn:Wn,...Un({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Hn}),...Un({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Hn}),...Un({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Hn})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(o,i)=>t.core.color[o].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:qa,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const o=(i,a)=>e.core.color[i].replace(")",` / ${a})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:o("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":o("a-9",.05)},"status-bar":{bg:o("n-2",.8),"bg-button":qa,"bg-button-hover":o("n-10",.4),"bg-button-active":o("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Sh=xh({prefix:"i-"}),Ch=e=>{const t=$h.from({theme:e,getToken:Sh}),r=Object.entries(t.declarations).map(([n,o])=>`${n}: ${o};`);return`#isdk {
41
+ `)},lp=0,wt=[];function cp(e){var t=L([]),r=L([0,0]),n=L(),o=G(lp++)[0],i=G(function(){return na()})[0],a=L(e);R(function(){a.current=e},[e]),R(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Af([e.lockRef.current],(e.shards||[]).map(ca),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=me(function(v,_){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=yr(v),w=r.current,O="deltaX"in v?v.deltaX:w[0]-x[0],P="deltaY"in v?v.deltaY:w[1]-x[1],I,U=v.target,q=Math.abs(O)>Math.abs(P)?"h":"v";if("touches"in v&&q==="h"&&U.type==="range")return!1;var N=oa(q,U);if(!N)return!0;if(N?I=q:(I=q==="v"?"h":"v",N=oa(q,U)),!N)return!1;if(!n.current&&"changedTouches"in v&&(O||P)&&(n.current=I),!I)return!0;var M=n.current||I;return op(M,_,v,M==="h"?O:P,!0)},[]),l=me(function(v){var _=v;if(!(!wt.length||wt[wt.length-1]!==i)){var x="deltaY"in _?la(_):yr(_),w=t.current.filter(function(I){return I.name===_.type&&I.target===_.target&&ap(I.delta,x)})[0];if(w&&w.should){_.cancelable&&_.preventDefault();return}if(!w){var O=(a.current.shards||[]).map(ca).filter(Boolean).filter(function(I){return I.contains(_.target)}),P=O.length>0?s(_,O[0]):!a.current.noIsolation;P&&_.cancelable&&_.preventDefault()}}},[]),u=me(function(v,_,x,w){var O={name:v,delta:_,target:x,should:w};t.current.push(O),setTimeout(function(){t.current=t.current.filter(function(P){return P!==O})},1)},[]),f=me(function(v){r.current=yr(v),n.current=void 0},[]),c=me(function(v){u(v.type,la(v),v.target,s(v,e.lockRef.current))},[]),h=me(function(v){u(v.type,yr(v),v.target,s(v,e.lockRef.current))},[]);R(function(){return wt.push(i),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:h}),document.addEventListener("wheel",l,_t),document.addEventListener("touchmove",l,_t),document.addEventListener("touchstart",f,_t),function(){wt=wt.filter(function(v){return v!==i}),document.removeEventListener("wheel",l,_t),document.removeEventListener("touchmove",l,_t),document.removeEventListener("touchstart",f,_t)}},[]);var m=e.removeScrollBar,b=e.inert;return D(W,null,b?D(i,{styles:sp(o)}):null,m?D(Qf,{gapMode:"margin"}):null)}const up=Vf(ta,cp);var ua=re(function(e,t){return D(br,Ce({},e,{ref:t,sideCar:up}))});ua.classNames=br.classNames;const dp=ua;var fp=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xt=new WeakMap,_r=new WeakMap,wr={},Sn=0,da=function(e){return e&&(e.host||da(e.parentNode))},pp=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=da(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},hp=function(e,t,r,n){var o=pp(t,Array.isArray(e)?e:[e]);wr[r]||(wr[r]=new WeakMap);var i=wr[r],a=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(h){if(s.has(h))f(h);else{var m=h.getAttribute(n),b=m!==null&&m!=="false",v=(xt.get(h)||0)+1,_=(i.get(h)||0)+1;xt.set(h,v),i.set(h,_),a.push(h),v===1&&b&&_r.set(h,!0),_===1&&h.setAttribute(r,"true"),b||h.setAttribute(n,"true")}})};return f(t),s.clear(),Sn++,function(){a.forEach(function(c){var h=xt.get(c)-1,m=i.get(c)-1;xt.set(c,h),i.set(c,m),h||(_r.has(c)||c.removeAttribute(n),_r.delete(c)),m||c.removeAttribute(r)}),Sn--,Sn||(xt=new WeakMap,xt=new WeakMap,_r=new WeakMap,wr={})}},vp=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||fp(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),hp(n,o,r,"aria-hidden")):function(){return null}};const fa="Dialog",[pa,gm]=nf(fa),[mp,kt]=pa(fa),bp=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=L(null),l=L(null),[u=!1,f]=lf({prop:n,defaultProp:o,onChange:i});return D(mp,{scope:t,triggerRef:s,contentRef:l,contentId:pn(),titleId:pn(),descriptionId:pn(),open:u,onOpenChange:f,onOpenToggle:me(()=>f(c=>!c),[f]),modal:a},r)},gp="DialogPortal",[ym,ha]=pa(gp,{forceMount:void 0}),Cn="DialogOverlay",yp=re((e,t)=>{const r=ha(Cn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=kt(Cn,e.__scopeDialog);return i.modal?D(_n,{present:n||i.open},D(_p,fe({},o,{ref:t}))):null}),_p=re((e,t)=>{const{__scopeDialog:r,...n}=e,o=kt(Cn,r);return D(dp,{as:hn,allowPinchZoom:!0,shards:[o.contentRef]},D(mn.div,fe({"data-state":ma(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Vt="DialogContent",wp=re((e,t)=>{const r=ha(Vt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=kt(Vt,e.__scopeDialog);return D(_n,{present:n||i.open},i.modal?D(xp,fe({},o,{ref:t})):D(kp,fe({},o,{ref:t})))}),xp=re((e,t)=>{const r=kt(Vt,e.__scopeDialog),n=L(null),o=Rt(t,r.contentRef,n);return R(()=>{const i=n.current;if(i)return vp(i)},[]),D(va,fe({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:yt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:yt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:yt(e.onFocusOutside,i=>i.preventDefault())}))}),kp=re((e,t)=>{const r=kt(Vt,e.__scopeDialog),n=L(!1),o=L(!1);return D(va,fe({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),va=re((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=kt(Vt,r),l=L(null),u=Rt(t,l);return Pf(),D(W,null,D(wf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},D(gf,fe({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ma(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function ma(e){return e?"open":"closed"}const $p=bp,Sp=yp,Cp=wp;function ba(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(r=ba(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function it(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=ba(e))&&(n&&(n+=" "),n+=t);return n}const ga=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,ya=it,xr=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return ya(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],c=i==null?void 0:i[u];if(f===null)return null;const h=ga(f)||ga(c);return o[u][h]}),s=r&&Object.entries(r).reduce((u,f)=>{let[c,h]=f;return h===void 0||(u[c]=h),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:c,className:h,...m}=f;return Object.entries(m).every(b=>{let[v,_]=b;return Array.isArray(_)?_.includes({...i,...s}[v]):{...i,...s}[v]===_})?[...u,c,h]:u},[]);return ya(e,a,l,r==null?void 0:r.class,r==null?void 0:r.className)},pe=Symbol.for("@ts-pattern/matcher"),_a=Symbol.for("@ts-pattern/isVariadic"),kr="@ts-pattern/anonymous-select-key",En=e=>!!(e&&typeof e=="object"),$r=e=>e&&!!e[pe],ne=(e,t,r)=>{if($r(e)){const n=e[pe](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(En(e)){if(!En(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const a of e.keys()){const s=e[a];$r(s)&&s[_a]?i.push(s):i.length?o.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+o.length)return!1;const a=t.slice(0,n.length),s=o.length===0?[]:t.slice(-o.length),l=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,f)=>ne(u,a[f],r))&&o.every((u,f)=>ne(u,s[f],r))&&(i.length===0||ne(i[0],l,r))}return e.length===t.length&&e.every((a,s)=>ne(a,t[s],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||$r(i=o)&&i[pe]().matcherType==="optional")&&ne(o,t[n],r);var i})}return Object.is(t,e)},be=e=>{var t,r,n;return En(e)?$r(e)?(t=(r=(n=e[pe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Bt(e,be):Bt(Object.values(e),be):[]},Bt=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function Ep(...e){if(e.length===1){const[t]=e;return r=>ne(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ne(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function le(e){return Object.assign(e,{optional:()=>In(e),and:t=>K(e,t),or:t=>wa(e,t),select:t=>t===void 0?zt(e):zt(t,e)})}function On(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[_a]:!0})}}))(e),{optional:()=>On(In(e)),select:t=>On(t===void 0?zt(e):zt(t,e))})}function In(e){return le({[pe]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(be(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:ne(e,t,n),selections:r}},getSelectionKeys:()=>be(e),matcherType:"optional"})})}const Op=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Ip=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function K(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>ne(o,t,n)),selections:r}},getSelectionKeys:()=>Bt(e,be),matcherType:"and"})})}function wa(...e){return le({[pe]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Bt(e,be).forEach(o=>n(o,void 0)),{matched:e.some(o=>ne(o,t,n)),selections:r}},getSelectionKeys:()=>Bt(e,be),matcherType:"or"})})}function j(e){return{[pe]:()=>({match:t=>({matched:!!e(t)})})}}function zt(...e){const t=typeof e[0]=="string"?e[0]:void 0,r=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return le({[pe]:()=>({match:n=>{let o={[t??kr]:n};return{matched:r===void 0||ne(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[t??kr].concat(r===void 0?[]:be(r))})})}function Ee(e){return typeof e=="number"}function ot(e){return typeof e=="string"}function qe(e){return typeof e=="bigint"}const xa=le(j(function(e){return!0})),Pp=xa,at=e=>Object.assign(le(e),{startsWith:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.endsWith(r)))));var r},minLength:t=>at(K(e,(r=>j(n=>ot(n)&&n.length>=r))(t))),maxLength:t=>at(K(e,(r=>j(n=>ot(n)&&n.length<=r))(t))),includes:t=>{return at(K(e,(r=t,j(n=>ot(n)&&n.includes(r)))));var r},regex:t=>{return at(K(e,(r=t,j(n=>ot(n)&&!!n.match(r)))));var r}}),Ap=at(j(ot)),Oe=e=>Object.assign(le(e),{between:(t,r)=>Oe(K(e,((n,o)=>j(i=>Ee(i)&&n<=i&&o>=i))(t,r))),lt:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n<r))(t))),gt:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n>r))(t))),lte:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n<=r))(t))),gte:t=>Oe(K(e,(r=>j(n=>Ee(n)&&n>=r))(t))),int:()=>Oe(K(e,j(t=>Ee(t)&&Number.isInteger(t)))),finite:()=>Oe(K(e,j(t=>Ee(t)&&Number.isFinite(t)))),positive:()=>Oe(K(e,j(t=>Ee(t)&&t>0))),negative:()=>Oe(K(e,j(t=>Ee(t)&&t<0)))}),Tp=Oe(j(Ee)),Ke=e=>Object.assign(le(e),{between:(t,r)=>Ke(K(e,((n,o)=>j(i=>qe(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ke(K(e,(r=>j(n=>qe(n)&&n<r))(t))),gt:t=>Ke(K(e,(r=>j(n=>qe(n)&&n>r))(t))),lte:t=>Ke(K(e,(r=>j(n=>qe(n)&&n<=r))(t))),gte:t=>Ke(K(e,(r=>j(n=>qe(n)&&n>=r))(t))),positive:()=>Ke(K(e,j(t=>qe(t)&&t>0))),negative:()=>Ke(K(e,j(t=>qe(t)&&t<0)))}),Dp=Ke(j(qe)),Np=le(j(function(e){return typeof e=="boolean"})),Mp=le(j(function(e){return typeof e=="symbol"})),Fp=le(j(function(e){return e==null}));var ie={__proto__:null,matcher:pe,optional:In,array:function(...e){return On({[pe]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const r=e[0];let n={};if(t.length===0)return be(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:t.every(i=>ne(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:be(e[0])})})},set:function(...e){return le({[pe]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=e[0];return{matched:Op(t,i=>ne(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:be(e[0])})})},map:function(...e){return le({[pe]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,a]=e;return{matched:Ip(t,(s,l)=>{const u=ne(i,l,n),f=ne(a,s,n);return u&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...be(e[0]),...be(e[1])]})})},intersection:K,union:wa,not:function(e){return le({[pe]:()=>({match:t=>({matched:!ne(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:j,select:zt,any:xa,_:Pp,string:Ap,number:Tp,bigint:Dp,boolean:Np,symbol:Mp,nullish:Fp,instanceOf:function(e){return le(j(function(t){return r=>r instanceof t}(e)))},shape:function(e){return le(j(Ep(e)))}};const Pn={matched:!1,value:void 0};function Le(e){return new Sr(e,Pn)}class Sr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,a={};const s=(u,f)=>{i=!0,a[u]=f},l=!n.some(u=>ne(u,this.input,s))||o&&!o(this.input)?Pn:{matched:!0,value:r(i?kr in a?a[kr]:a:this.input,this.input)};return new Sr(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Sr(this.input,n?{matched:!0,value:r(this.input,this.input)}:Pn)}otherwise(t){return this.state.matched?this.state.value:t(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let t;try{t=JSON.stringify(this.input)}catch{t=this.input}throw new Error(`Pattern matching error: no pattern matches value ${t}`)}run(){return this.exhaustive()}returnType(){return this}}const _m="";function ke(e,t){if(!e)throw new Error(t)}function Cr(){throw new Error("Cycle detected")}var Lp=Symbol.for("preact-signals");function An(){if($t>1)$t--;else{for(var e,t=!1;Ut!==void 0;){var r=Ut;for(Ut=void 0,Tn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&$a(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(Tn=0,$t--,t)throw e}}var Y=void 0,Ut=void 0,$t=0,Tn=0,Er=0;function ka(e){if(Y!==void 0){var t=e.n;if(t===void 0||t.t!==Y)return t={i:0,S:e,p:Y.s,n:void 0,t:Y,e:void 0,x:void 0,r:t},Y.s!==void 0&&(Y.s.n=t),Y.s=t,e.n=t,32&Y.f&&e.S(t),t;if(t.i===-1)return t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Y.s,t.n=void 0,Y.s.n=t,Y.s=t),t}}function oe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}oe.prototype.brand=Lp,oe.prototype.h=function(){return!0},oe.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},oe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},oe.prototype.subscribe=function(e){var t=this;return Nn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},oe.prototype.valueOf=function(){return this.value},oe.prototype.toString=function(){return this.value+""},oe.prototype.toJSON=function(){return this.value},oe.prototype.peek=function(){return this.v},Object.defineProperty(oe.prototype,"value",{get:function(){var e=ka(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(Y instanceof Ge&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Tn>100&&Cr(),this.v=e,this.i++,Er++,$t++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{An()}}}});function We(e){return new oe(e)}function $a(e){for(var t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Sa(e){for(var t=e.s;t!==void 0;t=t.n){var r=t.S.n;if(r!==void 0&&(t.r=r),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Ca(e){for(var t=e.s,r=void 0;t!==void 0;){var n=t.p;t.i===-1?(t.S.U(t),n!==void 0&&(n.n=t.n),t.n!==void 0&&(t.n.p=n)):r=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=n}e.s=r}function Ge(e){oe.call(this,void 0),this.x=e,this.s=void 0,this.g=Er-1,this.f=4}(Ge.prototype=new oe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Er))return!0;if(this.g=Er,this.f|=1,this.i>0&&!$a(this))return this.f&=-2,!0;var e=Y;try{Sa(this),Y=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return Y=e,Ca(this),this.f&=-2,!0},Ge.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}oe.prototype.S.call(this,e)},Ge.prototype.U=function(e){if(this.t!==void 0&&(oe.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ge.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ge.prototype.peek=function(){if(this.h()||Cr(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ge.prototype,"value",{get:function(){1&this.f&&Cr();var e=ka(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function jp(e){return new Ge(e)}function Ea(e){var t=e.u;if(e.u=void 0,typeof t=="function"){$t++;var r=Y;Y=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Dn(e),n}finally{Y=r,An()}}}function Dn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ea(e)}function Rp(e){if(Y!==this)throw new Error("Out-of-order effect");Ca(this),Y=e,this.f&=-2,8&this.f&&Dn(this),An()}function Ht(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Ht.prototype.c=function(){var e=this.S();try{if(8&this.f||this.x===void 0)return;var t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},Ht.prototype.S=function(){1&this.f&&Cr(),this.f|=1,this.f&=-9,Ea(this),Sa(this),$t++;var e=Y;return Y=this,Rp.bind(this,e)},Ht.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ut,Ut=this)},Ht.prototype.d=function(){this.f|=8,1&this.f||Dn(this)};function Nn(e){var t=new Ht(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Mn;function St(e,t){S[e]=t.bind(null,S[e]||function(){})}function Or(e){Mn&&Mn(),Mn=e&&e.S()}function Oa(e){var t=this,r=e.data,n=Bp(r);n.value=r;var o=ue(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Ti(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},jp(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}Oa.displayName="_st",Object.defineProperties(oe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:Oa},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),St("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof oe&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),St("__r",function(e,t){Or();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return Nn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Or(r),e(t)}),St("__e",function(e,t,r,n){Or(),e(t,r,n)}),St("diffed",function(e,t){Or();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else r.U=i={};for(var l in n){var u=i[l],f=n[l];u===void 0?(u=Vp(r,l,f,o),i[l]=u):u.o(f,o)}}}e(t)});function Vp(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=We(r);return{o:function(a,s){i.value=a,n=s},d:Nn(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}St("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),St("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),ye.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Bp(e){return ue(function(){return We(e)},[])}const Fn=(e,t)=>t.some(r=>e instanceof r);let Ia,Pa;function zp(){return Ia||(Ia=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Up(){return Pa||(Pa=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Ln=new WeakMap,jn=new WeakMap,Ir=new WeakMap;function Hp(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{r(st(e.result)),o()},a=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",a)});return Ir.set(t,e),t}function qp(e){if(Ln.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{r(),o()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});Ln.set(e,t)}let Rn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return Ln.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return st(e[t])},set(e,t,r){return e[t]=r,!0},has(e,t){return e instanceof IDBTransaction&&(t==="done"||t==="store")?!0:t in e}};function Aa(e){Rn=e(Rn)}function Kp(e){return Up().includes(e)?function(...t){return e.apply(Vn(this),t),st(this.request)}:function(...t){return st(e.apply(Vn(this),t))}}function Wp(e){return typeof e=="function"?Kp(e):(e instanceof IDBTransaction&&qp(e),Fn(e,zp())?new Proxy(e,Rn):e)}function st(e){if(e instanceof IDBRequest)return Hp(e);if(jn.has(e))return jn.get(e);const t=Wp(e);return t!==e&&(jn.set(e,t),Ir.set(t,e)),t}const Vn=e=>Ir.get(e);function Gp(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=st(a);return n&&a.addEventListener("upgradeneeded",l=>{n(st(a.result),l.oldVersion,l.newVersion,st(a.transaction),l)}),r&&a.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{i&&l.addEventListener("close",()=>i()),o&&l.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Yp=["get","getKey","getAll","getAllKeys","count"],Zp=["put","add","delete","clear"],Bn=new Map;function Ta(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Bn.get(t))return Bn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=Zp.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||Yp.includes(r)))return;const i=async function(a,...s){const l=this.transaction(a,o?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),o&&l.done]))[0]};return Bn.set(t,i),i}Aa(e=>({...e,get:(t,r,n)=>Ta(t,r)||e.get(t,r,n),has:(t,r)=>!!Ta(t,r)||e.has(t,r)}));const Xp=["continue","continuePrimaryKey","advance"],Da={},zn=new WeakMap,Na=new WeakMap,Qp={get(e,t){if(!Xp.includes(t))return e[t];let r=Da[t];return r||(r=Da[t]=function(...n){zn.set(this,Na.get(this)[t](...n))}),r}};async function*Jp(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Qp);for(Na.set(r,t),Ir.set(r,Vn(t));t;)yield r,t=await(zn.get(r)||t.continue()),zn.delete(r)}function Ma(e,t){return t===Symbol.asyncIterator&&Fn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Fn(e,[IDBIndex,IDBObjectStore])}Aa(e=>({...e,get(t,r,n){return Ma(t,r)?Jp:e.get(t,r,n)},has(t,r){return Ma(t,r)||e.has(t,r)}}));const qt=e=>Le(e).with(ie.number.lte(1e3),()=>`${Math.round(e)}KB`).with(ie.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Fa=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},eh=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),Pr=e=>t=>t?t.type===e:!1;class Kt extends Error{constructor(){super("Aborted")}}function La(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const ja=e=>typeof e=="string",th=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ra=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:th()}),rh=e=>Le(e).with({nativeEvent:{submitter:ie.select(ie.union(ie.instanceOf(HTMLButtonElement),ie.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Va=typeof window>"u"?void 0:Gp("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Wt={getStateData:async(e,t)=>{var n;const r=Ba({...e,flowKeys:t});return(n=await Va)==null?void 0:n.get("state",r)},setStateData:La(async e=>{var r;const t=Ba(e);return(r=await Va)==null?void 0:r.put("state",e.data,t)},1e3)},Ar=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(u=>u.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,a=e.find(u=>u.id===i),s=t.type.includes("question")?1:0;if(a){const u=s+Math.max(Ar(e,o,r,n+s).remainingSteps,Ar(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=s+Ar(e,o,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},nh=e=>{const t={},r=e.find(n=>n.isHead);return r&&Ar(e,r,(n,o)=>{t[n]=o}),t},Ba=e=>[...e.flowKeys,e.id,e.version].join("/"),Ye=We({state:"idle"}),Gt=e=>{const{state:t,flow:r}=Ye.value;if(t!=="loaded")return;ke(r,"No flow to update");const n=e(r.data);r.data=n,Ye.value={state:t,flow:r},Wt.setStateData(r)},T={current$:Ye,viewState$:We("closed"),inputHeight$:We(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:o,job:i})=>{const s={data:await Wt.getStateData(e,r)??Ra(),startedAt:new Date,nodeIdToProgress:nh(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:o,job:i};Ye.value={state:"loaded",flow:s},Wt.setStateData(s)},cancelCurrentFlow:()=>{Ye.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>Gt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Gt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Ye.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ra();Ye.value={state:e,flow:{...t,data:r,startedAt:new Date}},Wt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Gt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Ye.value;ke(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Wt.setStateData(r)},setSubmission:(e,t)=>Gt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Gt(t=>({...t,currentInput:e??null}))};var ih=0;function d(e,t,r,n,o,i){var a,s,l={};for(s in t)s=="ref"?a=t[s]:l[s]=t[s];var u={type:e,props:l,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--ih,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)l[s]===void 0&&(l[s]=a[s]);return S.vnode&&S.vnode(u),u}const oh=({message:e})=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:[d("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&d("p",{class:"text-neutral-9 text-sm",children:e})]})]}),ah=e=>d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:"Loading"}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),za=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(ah,{class:"text-neutral-6 h-8 w-8"})}),sh=e=>{const r=e/100,n=1.3;return e<0?"0%":e>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,n))*100)}%`},Tr=({class:e,children:t,...r})=>d("button",{class:it("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),lh=()=>{if(T.current$.value.state!=="loaded")return null;const e=T.current$.value.flow.nodeIdToProgress,t=T.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:sh(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},ch=({children:e})=>{const t=T.viewState$;return d(W,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"flex h-[var(--header-height)] gap-2",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?d(W,{children:[d(Tr,{"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:d("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),d(Tr,{"aria-label":"Close application",onClick:T.cancelCurrentFlow,children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):d(W,{children:[T.current$.value.state==="loaded"&&d(Tr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(Tr,{"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),d(lh,{})]})})},uh=cn(()=>Promise.resolve().then(()=>sm).then(e=>e.ChatbotBody)),dh=xr("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),fh=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=T.current$.value,a=T.viewState$.value,s=n!=="idle"&&a==="maximised",l=L(null);return d($p,{open:s,modal:s,children:[d(Sp,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),d(Cp,{forceMount:!0,asChild:!0,children:d("div",{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:dh({view:a}),children:d("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[d(ch,{children:o==null?void 0:o.title}),Le({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>d(za,{},"loading")).with({state:"loaded"},()=>d(mt,{fallback:d(za,{},"loading"),children:d(uh,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>d(oh,{message:i})).exhaustive()]})})})]})},Ua=Ne({id:Yi(Se(),String),version:rn(),build:rn(),nodes:kd(xd()),context_schema:Sd($d(eo(Se(),Ne({required:Qi(),type:Id([Ji("string"),Ji("number")])}))))}),ph=Ne({flow:Ua}),hh=Ne({company:Ne({name:Se()}),flow:Ua,job:Ne({id:Yi(Se(),String),title:Se()})}),vh=`#isdk{position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--header-height: 44px;--content-height:calc(100vh - 64px);--content-height:calc(100svh - 64px)}@media screen and (min-width: 768px){#isdk{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}#isdk{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#isdk .pointer-events-none{pointer-events:none}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .right-3{right:.75rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%);height:var(--header-height)}to{transform:translateY(0);height:var(--content-height)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.16,1,.3,1)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .items-stretch{align-items:stretch}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-b{border-bottom-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-solid{border-style:solid}#isdk .border-dashed{border-style:dashed}#isdk .border-accent-9{border-color:var(--i-color-a-9)}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-5{border-color:var(--i-color-n-5)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#isdk .border-transparent{border-color:transparent}#isdk .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}#isdk .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}#isdk .border-b-transparent{border-bottom-color:transparent}#isdk .bg-accent-1{background-color:var(--i-color-a-1)}#isdk .bg-accent-3{background-color:var(--i-color-a-3)}#isdk .bg-accent-9{background-color:var(--i-color-a-9)}#isdk .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}#isdk .bg-lowest{background-color:var(--i-color-lowest)}#isdk .bg-neutral-1{background-color:var(--i-color-n-1)}#isdk .bg-neutral-2{background-color:var(--i-color-n-2)}#isdk .bg-neutral-3{background-color:var(--i-color-n-3)}#isdk .bg-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .bg-none{background-image:none}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-2{padding-top:.5rem}#isdk .pt-2\\.5{padding-top:.625rem}#isdk .pt-3{padding-top:.75rem}#isdk .pt-5{padding-top:1.25rem}#isdk .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}#isdk .text-center{text-align:center}#isdk .text-right{text-align:right}#isdk .text-justify{text-align:justify}#isdk .text-\\[10px\\]{font-size:10px}#isdk .text-\\[11px\\]{font-size:11px}#isdk .text-base{font-size:1rem;line-height:1.5rem}#isdk .text-sm{font-size:.875rem;line-height:1.25rem}#isdk .text-xs{font-size:.75rem;line-height:1rem}#isdk .font-bold{font-weight:700}#isdk .font-medium{font-weight:500}#isdk .uppercase{text-transform:uppercase}#isdk .lowercase{text-transform:lowercase}#isdk .capitalize{text-transform:capitalize}#isdk .italic{font-style:italic}#isdk .ordinal{--tw-ordinal: ordinal;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}#isdk .leading-3{line-height:.75rem}#isdk .leading-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-md{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 6px 4px 0px oklch(0% 0 0 / .01);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-surface-sm{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 4px 4px 0px oklch(0% 0 0 / .02);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 4px 4px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}#isdk .outline-none{outline:2px solid transparent;outline-offset:2px}#isdk .outline{outline-style:solid}#isdk .outline-1{outline-width:1px}#isdk .outline-2{outline-width:2px}#isdk .outline-accent-4{outline-color:var(--i-color-a-4)}#isdk .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}#isdk .outline-divider{outline-color:var(--i-color-divider)}#isdk .outline-neutral-3{outline-color:var(--i-color-n-3)}#isdk .outline-neutral-6{outline-color:var(--i-color-n-6)}#isdk .ring-0{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}#isdk .ring-divider{--tw-ring-color: var(--i-color-divider)}#isdk .ring-lowest{--tw-ring-color: var(--i-color-lowest)}#isdk .ring-transparent{--tw-ring-color: transparent}#isdk .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}#isdk .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}#isdk .blur{--tw-blur: blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .drop-shadow-\\[0_1\\.5px_var\\(--i-color-n-1\\)\\]{--tw-drop-shadow: drop-shadow(0 1.5px var(--i-color-n-1));filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .grayscale{--tw-grayscale: grayscale(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .sepia{--tw-sepia: sepia(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#isdk .backdrop-blur-md{--tw-backdrop-blur: blur(12px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-blur-xl{--tw-backdrop-blur: blur(24px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-saturate-150{--tw-backdrop-saturate: saturate(1.5);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}#isdk .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}#isdk .duration-100{transition-duration:.1s}#isdk .duration-1000{transition-duration:1s}#isdk .duration-300{transition-duration:.3s}#isdk .duration-700{transition-duration:.7s}#isdk .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}#isdk .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}#isdk .will-change-\\[height\\]{will-change:height}#isdk .text-wrap-balance{text-wrap:balance}#isdk .fr{outline:none}#isdk .fr:focus{outline:none}#isdk .fr:focus-visible{outline:none;--tw-ring-offset-width: 1px;--tw-ring-offset-color: var(--i-color-lowest);--tw-ring-opacity: 1;--tw-ring-color: var(--i-color-a-9);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .gutter-stable{scrollbar-gutter:stable}#isdk .hide-scrollbars::-webkit-scrollbar{display:none}#isdk .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}#isdk .touch-hitbox:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}#isdk .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}#isdk .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#isdk .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}#isdk .\\[text-wrap\\:pretty\\]{text-wrap:pretty}#isdk .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent *::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent *::selection{background-color:transparent}#isdk .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}#isdk .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}#isdk .selection\\:bg-transparent::-moz-selection{background-color:transparent}#isdk .selection\\:bg-transparent::selection{background-color:transparent}#isdk .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}#isdk .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}#isdk .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}#isdk .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}#isdk .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .autofill\\:shadow-\\[inset_0_0_0_1000px_hsl\\(210_16\\.7\\%_97\\.6\\%\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px hsl(210 16.7% 97.6%);--tw-shadow-colored: inset 0 0 0 1000px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}#isdk .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}#isdk .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}#isdk .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}#isdk .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}#isdk .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}#isdk .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}#isdk .focus-visible\\:outline-2:focus-visible{outline-width:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#isdk .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}#isdk .focus-visible\\:ring-4:focus-visible{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}#isdk .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}#isdk .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}#isdk .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}#isdk .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}#isdk .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}#isdk .active\\:text-accent-10:active{color:var(--i-color-a-10)}#isdk .active\\:text-accent-11:active{color:var(--i-color-a-11)}#isdk .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}#isdk .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}#isdk .active\\:ring-2:active{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#isdk .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}#isdk .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}#isdk .disabled\\:opacity-50:disabled{opacity:.5}#isdk .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}#isdk .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}#isdk .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-4{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(4px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}@media (pointer: coarse){#isdk .pointer-coarse\\:touch-hitbox\\:\\:before:before{content:"";position:absolute;display:block;top:50%;left:50%;transform:translate(-50%,-50%);width:100%;height:100%;min-height:44px;min-width:44px;z-index:9999}}#isdk .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}
42
+ `,Ha="isdk",mh={not_in_local_storage:"Application not found in local storage",invalid_end_node:"Unexpected node type to finish flow",no_submissions:"Application ended without any fields submitted",invalid_state:"Invalid state"},bh=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Ha);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Ha,t}});var gh=["1","2","3","4","5","6","7","8","9","10","11","12"],yh={light:{1:[98.8,.015],2:[97.8,.018],3:[95.8,.025],4:[92,.04],5:[89,.05],6:[85,.07],7:[80.5,.08],8:[74,.11],9:[60,.22],10:[56,.23],11:[50,.19],12:[25,.18]},dark:{1:[19,.015],2:[21,.018],3:[25.5,.055],4:[29.3,.084],5:[33.5,.098],6:[39.05,.107],7:[45,.11],8:[55,.13],9:[60,.22],10:[67,.18],11:[79.3,.12],12:[95,.04]}},_h=(e,t=1,r)=>n=>{const[o,i]=yh[r][n];return"oklch("+o+"% "+i*t+" "+e+")"},Un=e=>{const t=_h(e.hue,e.chroma,e.mode);return Object.fromEntries(gh.map(r=>[e.prefix+r,e.transform(t(r))]))},Hn=e=>e,wh=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(o=>{const i=n[o];return[`${String(r)}.${o}`,i]}):[[r,n]]});return Object.fromEntries(t)},Dr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),qn=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(Dr(e)&&Dr(r))for(const n in r){const o=r[n];if(Dr(o)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];Dr(i)&&qn(i,o)}else Object.assign(e,{[n]:r[n]})}return qn(e,...t)},xh=e=>{function t(r,n){const o=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${o}`:`var(--${o})`}return t},kh=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:o,getToken:i}=n,a=h=>i("reference",h.toString()),s=e({theme:o}),l=t({theme:o,core:a,raw:{core:s}}),u=r({theme:o,core:a,semantic:a,raw:{core:s,semantic:l}}),f=wh(qn(s,l,u)),c=([h,m],b)=>{const v=[b,h].filter(Boolean).join(".");return typeof m=="object"?Object.entries(m).flatMap(_=>c(_,v)):[[n.getToken("declaration",v),m]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(h=>c(h))),ref:h=>i("reference",h.toString())}}})})})});const[Kn,Wn,qa]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],$h=kh().core(({theme:e})=>({color:{black:Kn,white:Wn,lowest:e.mode==="light"?Wn:Kn,highest:e.mode==="light"?Kn:Wn,...Un({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Hn}),...Un({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Hn}),...Un({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Hn})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(o,i)=>t.core.color[o].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:qa,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const o=(i,a)=>e.core.color[i].replace(")",` / ${a})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:o("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":o("a-9",.05)},"status-bar":{bg:o("n-2",.8),"bg-button":qa,"bg-button-hover":o("n-10",.4),"bg-button-active":o("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Sh=xh({prefix:"i-"}),Ch=e=>{const t=$h.from({theme:e,getToken:Sh}),r=Object.entries(t.declarations).map(([n,o])=>`${n}: ${o};`);return`#isdk {
43
43
  ${r.concat(r).join(`
44
44
  `)}
45
- }`},Ka=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const o=t[n];if(!o)continue;const i=Dt(e,n,null);if(o.required&&i===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(o.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:o.type}}},Eh=({_internal_domManager:e=bh(),theme:t})=>Je(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const a=()=>{if(typeof window>"u")return;const s=[D("style",{id:"inploi-chatbot-styles"},vh),D("style",{id:"inploi-chatbot-theme"},Ch(t))],l=e.getOrCreateChatbotElement();ht(D(W,{},[s,D(fh,{apiClient:r,logger:n,analytics:o})]),l),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,l)=>r.fetch(`/flow/job/${s}`).then(u=>{const p=sr(hh,u);return{flow:p.flow,title:`Applying for “${p.job.title}”`,flowKeys:[p.job.id,...(l==null?void 0:l.flowKeys)??[]],job:{id:p.job.id,id_type:"external"},...l}}),fetchFlowById:async(s,l)=>r.fetch(`/flow/id/${s}`).then(u=>{var c;const p=sr(ph,u);return{flow:p.flow,title:"Chatbot",flowKeys:(l==null?void 0:l.flowKeys)??[],...l,analytics:{customProperties:{flow_id:p.flow.id,flow_version:p.flow.version,...(c=l==null?void 0:l.analytics)==null?void 0:c.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",i||a(),s instanceof Promise?(T.current$.value={state:"loading"},s.then(async l=>{Ka({context:l.context||{},schema:l.flow.context_schema,logger:n}),T.startFlow(l)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";T.current$.value={state:"error",error:u}})):(Ka({context:s.context||{},schema:s.flow.context_schema,logger:n}),T.startFlow(s))}catch(l){n.error("Error starting flow",l)}},close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Eh;const Yt=(e,{context:t,submissions:r})=>{const[n,...o]=e.data.compareKey.split(".");if(!n)return!1;const i=Ga({context:t,key:n,path:o,submissions:r});if(!i)return!1;switch(i.type){case"address":{const a=Dt(i.value,o.join("."));switch(e.data.compare){case"equals":return a===e.data.compareValue;case"contains":return a?a.includes(e.data.compareValue):!1;case"notEquals":return a!==e.data.compareValue;case"notContains":return a?!a.includes(e.data.compareValue):!0}break}case"integration":{if(typeof i.value!="object"||Array.isArray(i.value))return!1;const a=Dt(i.value,o.join(".")),s={...e,data:{...e.data,compareKey:"_temp"}};switch(typeof a){case"boolean":return Yt(s,{submissions:{_temp:{value:a,type:"boolean"}},context:t});case"string":return Yt(s,{submissions:{_temp:{value:a,type:"string"}},context:t});case"number":return Yt(s,{submissions:{_temp:{value:a,type:"number"}},context:t});case"object":return Array.isArray(a)&&a.every(ja)?Yt(s,{submissions:{_temp:{value:a,type:"enum"}},context:t}):!1}break}case"boolean":{const a=e.data.compareValue==="true";switch(e.data.compare){case"equals":return i.value===a;case"notEquals":return i.value!==a}break}case"string":switch(e.data.compare){case"equals":return i.value===e.data.compareValue;case"contains":return i.value?i.value.includes(e.data.compareValue):!1;case"notEquals":return i.value!==e.data.compareValue;case"notContains":return i.value?!i.value.includes(e.data.compareValue):!0}break;case"number":{try{const a=Number(e.data.compareValue);switch(e.data.compare){case"equals":return i.value===a;case"notEquals":return i.value!==a;case"greaterThan":return i.value>a;case"greaterThanOrEqualTo":return i.value>=a;case"lessThan":return i.value<a;case"lessThanOrEqualTo":return i.value<=a}}catch{return console.error(`Failed to parse number in if-block ${e.id}`,i.value),!1}break}case"enum":switch(e.data.compare){case"equals":return i.value.length===1&&i.value[0]===e.data.compareValue;case"notEquals":return i.value.length===1&&i.value[0]!==e.data.compareValue;case"contains":return i.value.includes(e.data.compareValue);case"notContains":return!i.value.includes(e.data.compareValue)}break}return!1},Oh=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Ze=(e,{context:t,submissions:r})=>e.replace(Oh,(n,o,i="")=>{const[a,...s]=o.trim().split("."),l=Ga({key:a,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${qt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const u=Dt(l.value,s.join("."));switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(ja))return u.join(", ")}break}}return i}),Wa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return Wa({node:n,nodes:t,stopWhen:r})},Ih=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(s=>s.id===o.branchId);if(!i)return!1;const a=Wa({node:i,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},Ph=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:a,onFlowEnd:s,onInterpret:l})=>{let u=new AbortController;const p={...t.service,log:h=>t.service.log({...h,customProperties:{...h.customProperties,...t.customProperties}})},c=async(h,g)=>{const m=i();l==null||l(h,g);try{await Ah({flow:e,analytics:p,logger:r,apiClient:o,context:n,node:h,submissions:m,chat:{sendMessage:async v=>a.send({groupId:h.id,message:v,signal:u.signal}),userInput:async v=>a.input({input:v,signal:u.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const _=v?e.nodes.find(x=>x.id===v):Ih({childNode:h,nodes:e.nodes});return _?c(_,h):s==null?void 0:s(h)},end:()=>s==null?void 0:s(h)})}catch(v){if(v instanceof Kt)return;throw v}};return{interpret:async h=>{const g=e.nodes.find(m=>m.id===h)??Fa(e.nodes);return c(g)},undo:h=>{let g=1;const m=e.nodes.find(_=>_.id===h[h.length-1]);for(let _=h.length-2;_>0;_--){const x=h[_],w=e.nodes.find(O=>O.id===x);if(!w||(g++,w.type.startsWith("question-")))break}u.abort(),u=new AbortController;const v=e.nodes.find(_=>_.id===h[h.length-g]);return ke(v,"Undo failed: new start node not found"),c(v,m),{removed:g}},abort:()=>{u.abort()}}};async function Ah(e){return await Le(e).with({node:{type:"text"}},Mh).with({node:{type:"image"}},Fh).with({node:{type:"question-text"}},Lh).with({node:{type:"question-enum"}},Rh).with({node:{type:"question-number"}},jh).with({node:{type:"question-boolean"}},Vh).with({node:{type:"question-file"}},zh).with({node:{type:"question-address"}},Bh).with({node:{type:"end-flow"}},Uh).with({node:{type:"if-block"}},Nh).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},Dh).with({node:{type:"integration-application-submit"}},Th).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function Th({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,context:a,analytics:s,flow:l}){const u=async p=>{p!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"system",variant:"info",text:"Submitting…"});const{anonymous_id:c,session_id:h}=s.getSessionInfo(),g=await o.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:c,session_id:h,...a,submissions:eh(i||{})})}).catch(m=>m);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:g}),Le(g).with({integration_response:ie.select(ie.union({status:ie.number,data:ie.any},{status:ie.number,error:{message:ie.string,data:ie.any}}))},m=>{s.log({event:"FLOW_SUBMIT",properties:{flow_id:l.id,flow_version:l.version,flow_session_id:l.data.flowSessionId,flow_build:l.build,response:{status:m.status,payload:"data"in m?m.data:m.error.data??null},job:l.job}})}).otherwise(()=>{}),await Le(g).with({ats_data:{redirect_url:ie.string}},async m=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const v=new URL(m.ats_data.redirect_url);c&&!v.searchParams.has("anonymous_id")&&v.searchParams.set("anonymous_id",c),await e.sendMessage({type:"link",href:v.toString(),text:"Complete submission",onClick:()=>{if(!h)return n.error("session_id not set, cannot log FLOW_REDIRECT event");s.log({event:"FLOW_REDIRECT",properties:{flow_build:l.build,flow_id:l.id,flow_session_id:h,flow_version:l.version,href:v.toString(),job:l.job}})}}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with({sucess:!1,ats_data:{message:ie.string}},async m=>{n.error(m.ats_data),await e.sendMessage({type:"system",variant:"error",text:m.ats_data.message}),await u(!1)}).otherwise(async m=>{n.error(m),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await u(!1)})};await u(r.data.skipConfirmation)}async function Dh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({type:"link",href:Ze(r.data.href,{submissions:n,context:o}),text:Ze(r.data.cta,{submissions:n,context:o})}),t(r.nextId)}async function Nh({submissions:e,next:t,node:r,context:n}){t(Yt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Mh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.text,{submissions:n,context:o})}),t(r.nextId)}async function Fh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Lh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(r.nextId)}async function jh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value.toString()}),t(r.nextId)}async function Rh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(a=>i.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function Vh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Bh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function zh({node:e,chat:t,next:r,submissions:n,context:o}){await t.sendMessage({author:"bot",type:"text",text:Ze(e.data.question,{submissions:n,context:o})});const i=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(i===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const a of i.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function Uh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Ga=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const o=Dt(n,t.join("."));switch(typeof o){case"string":return{type:"string",value:o};case"number":return{type:"number",value:o};case"boolean":return{type:"boolean",value:o};default:console.warn(`Unexpected type for $context.${t.join(".")}`,o);return}}return r==null?void 0:r[e]};function Gn(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var p=Date.now()-a;p<t&&p>=0?n=setTimeout(l,t-p):(n=null,r||(s=e.apply(i,o),i=o=null))}var u=function(){i=this,o=arguments,a=Date.now();var p=r&&!n;return n||(n=setTimeout(l,t)),p&&(s=e.apply(i,o),i=o=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},u}Gn.debounce=Gn;var Hh=Gn;const Ya=Ve(Hh);function qh(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=G({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,p=t?typeof t=="number"?t:t.resize:null,c=L(!1);R(()=>(c.current=!0,()=>void(c.current=!1)));const[h,g,m]=ue(()=>{const w=()=>{if(!l.current.element)return;const{left:O,top:P,width:I,height:U,bottom:q,right:N,x:M,y:se}=l.current.element.getBoundingClientRect(),te={left:O,top:P,width:I,height:U,bottom:q,right:N,x:M,y:se};l.current.element instanceof HTMLElement&&o&&(te.height=l.current.element.offsetHeight,te.width=l.current.element.offsetWidth),Object.freeze(te),c.current&&!Yh(l.current.lastBounds,te)&&s(l.current.lastBounds=te)};return[w,p?Ya(w,p):w,u?Ya(w,u):w]},[s,o,u,p]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",m,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new i(m),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",m,{capture:!0,passive:!0})))}const x=w=>{!w||w===l.current.element||(v(),l.current.element=w,l.current.scrollContainers=Za(w),_())};return Wh(m,!!r),Kh(g),R(()=>{v(),_()},[r,m,g]),R(()=>v,[]),[x,a,h]}function Kh(e){R(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Wh(e,t){R(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Za(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Za(e.parentElement)]}const Gh=["x","y","top","bottom","left","right","width","height"],Yh=(e,t)=>Gh.every(r=>e[r]===t[r]),Ct=({class:e,...t})=>d("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:"Send"}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})}),Zh=25,Yn=We({instant:()=>{},smooth:()=>{}}),Z={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>Yn.value.instant(),smooth:()=>Yn.value.smooth()}},Xh=()=>{const e=L(null);ve(()=>{Yn.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=ue(()=>({addToSubmissions:(n,o)=>T.setSubmission(n,o),send:async({message:n,signal:o,groupId:i})=>{if(await Le(n).with({author:"bot",type:"text"},async a=>{if(o!=null&&o.aborted)throw new Kt;Z.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*Zh;await new Promise(l=>setTimeout(l,s,{signal:o})),Z.isBotTyping$.value=!1}).otherwise(async()=>{}),o!=null&&o.aborted)throw new Kt;T.addMessage(n,i)},input:({input:n,signal:o})=>{if(o!=null&&o.aborted)throw new Kt;return T.setInput(n),new Promise(i=>{const a=s=>{if(o!=null&&o.aborted)throw new Kt;T.setInput(void 0),n.key&&T.setSubmission(n.key,s),i(s)};Z.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},Et=({class:e,...t})=>d("button",{type:"button",class:it("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:"Skip"}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Xa=["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Caribbean Netherlands","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Cook Islands","Costa Rica","Croatia","Cuba","Curaçao","Cyprus","Czechia","Côte d'Ivoire","Democratic Republic of the Congo","Denmark","Djibouti","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands (Islas Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern and Antarctic Lands","Gabon","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar (Burma)","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Rwanda","Réunion","Saint Barthélemy","Saint Helena, Ascension and Tristan da Cunha","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Sweden","Switzerland","Syria","São Tomé and Príncipe","Taiwan","Tajikistan","Tanzania","Thailand","The Bahamas","The Gambia","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkmenistan","Turks and Caicos Islands","Tuvalu","Türkiye","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Åland Islands"],Qa={line1:["street_number","floor","room","premise"],line2:["subpremise","street_address","route"],line3:["sublocality","neighborhood"],city:["locality","postal_town"],state:["administrative_area_level_1"],postcode:["postal_code"],country:["country"]},Nr=Object.keys(Qa),Qh=e=>Nr.reduce((t,r)=>{const n=Qa[r],o=e.filter(i=>i.types.some(a=>n.includes(a))).map(i=>i.long_name).join(", ");return o&&(t[r]=o),t},{}),Jh=document.createElement("div"),ev=()=>ue(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(Jh);return{enabled:!0,getPredictions:async n=>{const{predictions:o}=await t.getPlacePredictions({input:n,language:"en"});return o.map(i=>({label:i.description,value:i.place_id}))},getPlaceDetails:async n=>await new Promise((i,a)=>r.getDetails({placeId:n,fields:["address_components"],language:"en"},(s,l)=>l!==e.maps.places.PlacesServiceStatus.OK?a(l):s===null?a("ZERO_RESULTS"):i({ok:!0,place:s}))).catch(async i=>(console.error("Failed to get address details",i),{ok:!1}))}},[]),Zn=e=>d("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:"Back"})]}),Xn={label:"Fill in manually",value:""},tv=({input:e,onSubmitSuccess:t})=>{const[r,n]=G(""),[o,i]=G(),[a,s]=G([]),[l,u]=G(),{enabled:p,getPredictions:c,getPlaceDetails:h}=ev(),[g,m]=G(p?"query":"manual"),v=ue(()=>La(_=>{ke(p,"Query state should not be enabled if Google Places isn't available"),n(_),_===""&&s([]),!(_.length<3)&&c(_).then(x=>{s(x)})},500),[p,c]);switch(R(()=>{if(p&&!(l===void 0||l===""))return h(l).then(_=>{if(!_.ok||!_.place.address_components){i({});return}const x=Qh(_.place.address_components);i(x),m("details")}),()=>{i(void 0)}},[l,h,p]),g){case"query":return ke(p,"Query state should not be enabled if Google Places isn't available"),d(rv,{input:e,onSkip:()=>t(null),onAddressSelect:_=>{u(_),m("loading")},onInputChange:v,suggestions:a,query:r});case"loading":return d(Qn,{input:e,onSubmitSuccess:t,addressFields:{},actions:d(Zn,{onClick:()=>{u(void 0),m("query")}})});case"details":return ke(o!==void 0),d(Qn,{input:e,onSubmitSuccess:t,addressFields:o,actions:d(Zn,{onClick:()=>{u(void 0),m("query")}})});case"manual":return d(Qn,{input:e,onSubmitSuccess:t,addressFields:{},actions:p?d(Zn,{onClick:()=>{u(void 0),m("query")}}):void 0})}},rv=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onInputChange:i})=>{const a=L(null);return ve(()=>{a.current&&(a.current.focus(),a.current.select())},[]),d(W,{children:[d("form",{noValidate:!0,onSubmit:s=>{s.preventDefault()},class:"flex flex-col justify-end gap-1 p-2.5",children:[d("input",{onChange:s=>{i(s.currentTarget.value)},ref:a,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder||"Search an address",defaultValue:o}),e.config.optional&&d(Et,{class:"absolute right-3",onClick:t})]}),d("ul",{children:[r.map(s=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(s.value)},children:[d("span",{class:"flex-grow",children:s.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(Xn.value)},children:d("span",{class:"flex-grow",children:Xn.label})})},Xn.label)]})]})},nv={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Qn=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=L(null);return ve(()=>{if(o.current){const i=o.current.querySelector("input");i&&(i.focus(),i.select())}},[]),d("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:i=>{const a=new FormData(i.currentTarget),s=Object.fromEntries(a.entries());t({type:"address",value:s})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:o,children:Nr.map((i,a)=>{const s=`isdk_${i}`,l=n.config.keys[i];return l?d(W,{children:[d("label",{for:s,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:nv[i]}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[i==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:l,id:s,defaultValue:e[i],required:!0,children:[e.country&&!Xa.includes(e.country)?d("option",{value:e[i],children:e[i]}):d("option",{value:"",children:"Select a country"}),Xa.map(u=>d("option",{value:u,children:u},u))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:a===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:l,id:s,defaultValue:e[i],required:!0}),a!==Nr.length-1&&d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),a===Nr.length-1&&d("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),d("div",{class:"flex w-full flex-1 ",children:[d("div",{class:"flex-grow",children:r}),d(Ct,{class:"flex items-center justify-center"})]})]})},Jn=()=>{const e=L(null);return R(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Ja=["true","false"],iv=Cd(Ja),ov="answer",es="flex items-center gap-2 p-2.5",ts=re(({label:e,...t},r)=>d("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:d("p",{class:"truncate text-center text-base",children:e})})),av=({input:e,onSubmitSuccess:t})=>{const r=Jn();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=rh(n).value,i=sr(iv,o);t({type:"boolean",value:i==="true"})},children:[d("ul",{class:es,children:Ja.map((n,o)=>d("li",{class:"flex-1",children:d(ts,{ref:o===0?r:null,type:"submit",name:ov,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(Et,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Mr=({error:e})=>e?d("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[d("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null,sv=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),lv=e=>e.reduce((t,r)=>t+r.sizeKb,0),cv=Pr("file"),rs=3,uv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return d("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"block truncate",children:o}),d("span",{children:[".",n]})]}),d("p",{"aria-label":"File size",class:"text-accent-11",children:qt(e.sizeKb)})]})},ns=({class:e,...t})=>d("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),is=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},dv=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(is(n.name).toLowerCase()))},fv=(e,t)=>{const r=is(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},pv=({input:e,onSubmitSuccess:t})=>{var p;const r=(p=T.current$.value.flow)==null?void 0:p.data.submissions[e.key],[n,o]=G(cv(r)?r.value:[]),[i,a]=G(),s=n.length-rs,l=lv(n),u=Jn();return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!dv({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${qt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:u,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?d(W,{children:[d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,rs).map(c=>{const h=c.name.split(".").pop(),g=c.name.replace(new RegExp(`.${h}$`),"");return d(ns,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:g}),d("span",{children:[".",h]})]})}),s>0?d(ns,{children:["+",s," file",s!==1?"s":""]}):null]}),d("p",{class:"text-neutral-11 text-xs",children:[qt(l)," ",n.length>1?"total":""]})]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-10 text-xs",children:["(max ",qt(e.config.fileSizeLimitKib),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:c.replace(".","")}))})]})]}),d("input",{id:"dropzone-file",onInput:async c=>{ke(c.target instanceof HTMLInputElement);const h=c.target.files?Array.from(c.target.files):[],g=await Promise.allSettled(h.map(async v=>{const _=await sv(v);return{name:fv(v.name,42),data:_,sizeKb:v.size/1e3}}));if(g.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const m=g.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);o(m)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(Ct,{disabled:n.length===0}),e.config.optional&&d(Et,{onClick:()=>t(null)})]})]}),d(Mr,{error:i})]})};var Zt=e=>e.type==="checkbox",Ot=e=>e instanceof Date,de=e=>e==null;const os=e=>typeof e=="object";var ee=e=>!de(e)&&!Array.isArray(e)&&os(e)&&!Ot(e),hv=e=>ee(e)&&e.target?Zt(e.target)?e.target.checked:e.target.value:e,vv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,mv=(e,t)=>e.has(vv(t)),bv=e=>{const t=e.constructor&&e.constructor.prototype;return ee(t)&&t.hasOwnProperty("isPrototypeOf")},ei=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(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(!(ei&&(e instanceof Blob||e instanceof FileList))&&(r||ee(e)))if(t=r?[]:{},!r&&!bv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=je(e[n]));else return e;return t}var Xt=e=>Array.isArray(e)?e.filter(Boolean):[],X=e=>e===void 0,C=(e,t,r)=>{if(!t||!ee(e))return r;const n=Xt(t.split(/[,[\].]+?/)).reduce((o,i)=>de(o)?o:o[i],e);return X(n)||n===e?X(e[t])?r:e[t]:n},Xe=e=>typeof e=="boolean";const as={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Re={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var gv=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==$e.all&&(t._proxyFormState[a]=!n||$e.all),r&&(r[a]=!0),e[a]}});return o},_e=e=>ee(e)&&!Object.keys(e).length,yv=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return _e(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||$e.all))},ti=e=>Array.isArray(e)?e:[e];function _v(e){const t=xe.useRef(e);t.current=e,xe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ie=e=>typeof e=="string",wv=(e,t,r,n,o)=>Ie(e)?(n&&t.watch.add(e),C(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),C(r,i))):(n&&(t.watchAll=!0),r),ri=e=>/^\w*$/.test(e),ss=e=>Xt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function z(e,t,r){let n=-1;const o=ri(t)?[t]:ss(t),i=o.length,a=i-1;for(;++n<i;){const s=o[n];let l=r;if(n!==a){const u=e[s];l=ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var ls=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},cs=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched}),us=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Fr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=C(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else ee(s)&&Fr(s,t)}}};var xv=(e,t,r)=>{const n=Xt(C(e,r));return z(n,"root",t[r]),z(e,r,n),e},ni=e=>e.type==="file",Qe=e=>typeof e=="function",Lr=e=>{if(!ei)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},jr=e=>Ie(e),ii=e=>e.type==="radio",Rr=e=>e instanceof RegExp;const ds={value:!1,isValid:!1},fs={value:!0,isValid:!0};var ps=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!X(e[0].attributes.value)?X(e[0].value)||e[0].value===""?fs:{value:e[0].value,isValid:!0}:fs:ds}return ds};const hs={isValid:!1,value:null};var vs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,hs):hs;function ms(e,t,r="validate"){if(jr(e)||Array.isArray(e)&&e.every(jr)||Xe(e)&&!e)return{type:r,message:jr(e)?e:"",ref:t}}var It=e=>ee(e)&&!Rr(e)?e:{value:e,message:""},bs=async(e,t,r,n,o)=>{const{ref:i,refs:a,required:s,maxLength:l,minLength:u,min:p,max:c,pattern:h,validate:g,name:m,valueAsNumber:v,mount:_,disabled:x}=e._f,w=C(t,m);if(!_||x)return{};const O=a?a[0]:i,P=V=>{n&&O.reportValidity&&(O.setCustomValidity(Xe(V)?"":V||""),O.reportValidity())},I={},U=ii(i),q=Zt(i),N=U||q,M=(v||ni(i))&&X(i.value)&&X(w)||Lr(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,se=ls.bind(null,m,r,I),te=(V,F,Q,he=Re.maxLength,we=Re.minLength)=>{const Pe=V?F:Q;I[m]={type:V?he:we,message:Pe,ref:i,...se(V?he:we,Pe)}};if(o?!Array.isArray(w)||!w.length:s&&(!N&&(M||de(w))||Xe(w)&&!w||q&&!ps(a).isValid||U&&!vs(a).isValid)){const{value:V,message:F}=jr(s)?{value:!!s,message:s}:It(s);if(V&&(I[m]={type:Re.required,message:F,ref:O,...se(Re.required,F)},!r))return P(F),I}if(!M&&(!de(p)||!de(c))){let V,F;const Q=It(c),he=It(p);if(!de(w)&&!isNaN(w)){const we=i.valueAsNumber||w&&+w;de(Q.value)||(V=we>Q.value),de(he.value)||(F=we<he.value)}else{const we=i.valueAsDate||new Date(w),Pe=Ur=>new Date(new Date().toDateString()+" "+Ur),ct=i.type=="time",Jt=i.type=="week";Ie(Q.value)&&w&&(V=ct?Pe(w)>Pe(Q.value):Jt?w>Q.value:we>new Date(Q.value)),Ie(he.value)&&w&&(F=ct?Pe(w)<Pe(he.value):Jt?w<he.value:we<new Date(he.value))}if((V||F)&&(te(!!V,Q.message,he.message,Re.max,Re.min),!r))return P(I[m].message),I}if((l||u)&&!M&&(Ie(w)||o&&Array.isArray(w))){const V=It(l),F=It(u),Q=!de(V.value)&&w.length>+V.value,he=!de(F.value)&&w.length<+F.value;if((Q||he)&&(te(Q,V.message,F.message),!r))return P(I[m].message),I}if(h&&!M&&Ie(w)){const{value:V,message:F}=It(h);if(Rr(V)&&!w.match(V)&&(I[m]={type:Re.pattern,message:F,ref:i,...se(Re.pattern,F)},!r))return P(F),I}if(g){if(Qe(g)){const V=await g(w,t),F=ms(V,O);if(F&&(I[m]={...F,...se(Re.validate,F.message)},!r))return P(F.message),I}else if(ee(g)){let V={};for(const F in g){if(!_e(V)&&!r)break;const Q=ms(await g[F](w,t),O,F);Q&&(V={...Q,...se(F,Q.message)},P(Q.message),r&&(I[m]=V))}if(!_e(V)&&(I[m]={ref:O,...V},!r))return I}}return P(!0),I};function kv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=X(e)?n++:e[t[n++]];return e}function $v(e){for(const t in e)if(e.hasOwnProperty(t)&&!X(e[t]))return!1;return!0}function ae(e,t){const r=Array.isArray(t)?t:ri(t)?[t]:ss(t),n=r.length===1?e:kv(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(ee(n)&&_e(n)||Array.isArray(n)&&$v(n))&&ae(e,r.slice(0,-1)),e}function oi(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Vr=e=>de(e)||!os(e);function lt(e,t){if(Vr(e)||Vr(t))return e===t;if(Ot(e)&&Ot(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Ot(i)&&Ot(a)||ee(i)&&ee(a)||Array.isArray(i)&&Array.isArray(a)?!lt(i,a):i!==a)return!1}}return!0}var gs=e=>e.type==="select-multiple",Sv=e=>ii(e)||Zt(e),ai=e=>Lr(e)&&e.isConnected,ys=e=>{for(const t in e)if(Qe(e[t]))return!0;return!1};function Br(e,t={}){const r=Array.isArray(e);if(ee(e)||r)for(const n in e)Array.isArray(e[n])||ee(e[n])&&!ys(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Br(e[n],t[n])):de(e[n])||(t[n]=!0);return t}function _s(e,t,r){const n=Array.isArray(e);if(ee(e)||n)for(const o in e)Array.isArray(e[o])||ee(e[o])&&!ys(e[o])?X(t)||Vr(r[o])?r[o]=Array.isArray(e[o])?Br(e[o],[]):{...Br(e[o])}:_s(e[o],de(t)?{}:t[o],r[o]):r[o]=!lt(e[o],t[o]);return r}var si=(e,t)=>_s(e,t,Br(t)),ws=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>X(e)?e:t?e===""?NaN:e&&+e:r&&Ie(e)?new Date(e):n?n(e):e;function li(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return ni(t)?t.files:ii(t)?vs(e.refs).value:gs(t)?[...t.selectedOptions].map(({value:r})=>r):Zt(t)?ps(e.refs).value:ws(X(t.value)?e.ref.value:t.value,e)}var Cv=(e,t,r,n)=>{const o={};for(const i of e){const a=C(t,i);a&&z(o,i,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Qt=e=>X(e)?e:Rr(e)?e.source:ee(e)?Rr(e.value)?e.value.source:e.value:e,Ev=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function xs(e,t,r){const n=C(e,r);if(n||ri(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),a=C(t,i),s=C(e,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:r}}var Ov=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Iv=(e,t)=>!Xt(C(e,t)).length&&ae(e,t);const Pv={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function Av(e={},t){let r={...Pv,...e},n={submitCount:0,isDirty:!1,isLoading:Qe(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=ee(r.defaultValues)||ee(r.values)?je(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:je(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,p=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:oi(),array:oi(),state:oi()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,m=cs(r.mode),v=cs(r.reValidateMode),_=r.criteriaMode===$e.all,x=f=>b=>{clearTimeout(p),p=setTimeout(f,b)},w=async f=>{if(c.isValid||f){const b=r.resolver?_e((await M()).errors):await te(o,!0);b!==n.isValid&&h.state.next({isValid:b})}},O=f=>c.isValidating&&h.state.next({isValidating:f}),P=(f,b=[],y,E,$=!0,k=!0)=>{if(E&&y){if(s.action=!0,k&&Array.isArray(C(o,f))){const A=y(C(o,f),E.argA,E.argB);$&&z(o,f,A)}if(k&&Array.isArray(C(n.errors,f))){const A=y(C(n.errors,f),E.argA,E.argB);$&&z(n.errors,f,A),Iv(n.errors,f)}if(c.touchedFields&&k&&Array.isArray(C(n.touchedFields,f))){const A=y(C(n.touchedFields,f),E.argA,E.argB);$&&z(n.touchedFields,f,A)}c.dirtyFields&&(n.dirtyFields=si(i,a)),h.state.next({name:f,isDirty:F(f,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else z(a,f,b)},I=(f,b)=>{z(n.errors,f,b),h.state.next({errors:n.errors})},U=(f,b,y,E)=>{const $=C(o,f);if($){const k=C(a,f,X(y)?C(i,f):y);X(k)||E&&E.defaultChecked||b?z(a,f,b?k:li($._f)):we(f,k),s.mount&&w()}},q=(f,b,y,E,$)=>{let k=!1,A=!1;const H={name:f};if(!y||E){c.isDirty&&(A=n.isDirty,n.isDirty=H.isDirty=F(),k=A!==H.isDirty);const J=lt(C(i,f),b);A=C(n.dirtyFields,f),J?ae(n.dirtyFields,f):z(n.dirtyFields,f,!0),H.dirtyFields=n.dirtyFields,k=k||c.dirtyFields&&A!==!J}if(y){const J=C(n.touchedFields,f);J||(z(n.touchedFields,f,y),H.touchedFields=n.touchedFields,k=k||c.touchedFields&&J!==y)}return k&&$&&h.state.next(H),k?H:{}},N=(f,b,y,E)=>{const $=C(n.errors,f),k=c.isValid&&Xe(b)&&n.isValid!==b;if(e.delayError&&y?(u=x(()=>I(f,y)),u(e.delayError)):(clearTimeout(p),u=null,y?z(n.errors,f,y):ae(n.errors,f)),(y?!lt($,y):$)||!_e(E)||k){const A={...E,...k&&Xe(b)?{isValid:b}:{},errors:n.errors,name:f};n={...n,...A},h.state.next(A)}O(!1)},M=async f=>r.resolver(a,r.context,Cv(f||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),se=async f=>{const{errors:b}=await M(f);if(f)for(const y of f){const E=C(b,y);E?z(n.errors,y,E):ae(n.errors,y)}else n.errors=b;return b},te=async(f,b,y={valid:!0})=>{for(const E in f){const $=f[E];if($){const{_f:k,...A}=$;if(k){const H=l.array.has(k.name),J=await bs($,a,_,r.shouldUseNativeValidation&&!b,H);if(J[k.name]&&(y.valid=!1,b))break;!b&&(C(J,k.name)?H?xv(n.errors,J,k.name):z(n.errors,k.name,J[k.name]):ae(n.errors,k.name))}A&&await te(A,b,y)}}return y.valid},V=()=>{for(const f of l.unMount){const b=C(o,f);b&&(b._f.refs?b._f.refs.every(y=>!ai(y)):!ai(b._f.ref))&&fi(f)}l.unMount=new Set},F=(f,b)=>(f&&b&&z(a,f,b),!lt(Os(),i)),Q=(f,b,y)=>wv(f,l,{...s.mount?a:X(b)?i:Ie(f)?{[f]:b}:b},y,b),he=f=>Xt(C(s.mount?a:i,f,e.shouldUnregister?C(i,f,[]):[])),we=(f,b,y={})=>{const E=C(o,f);let $=b;if(E){const k=E._f;k&&(!k.disabled&&z(a,f,ws(b,k)),$=Lr(k.ref)&&de(b)?"":b,gs(k.ref)?[...k.ref.options].forEach(A=>A.selected=$.includes(A.value)):k.refs?Zt(k.ref)?k.refs.length>1?k.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(H=>H===A.value):$===A.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(A=>A.checked=A.value===$):ni(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||h.values.next({name:f,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&q(f,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&di(f)},Pe=(f,b,y)=>{for(const E in b){const $=b[E],k=`${f}.${E}`,A=C(o,k);(l.array.has(f)||!Vr($)||A&&!A._f)&&!Ot($)?Pe(k,$,y):we(k,$,y)}},ct=(f,b,y={})=>{const E=C(o,f),$=l.array.has(f),k=je(b);z(a,f,k),$?(h.array.next({name:f,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&h.state.next({name:f,dirtyFields:si(i,a),isDirty:F(f,k)})):E&&!E._f&&!de(k)?Pe(f,k,y):we(f,k,y),us(f,l)&&h.state.next({...n}),h.values.next({name:f,values:{...a}}),!s.mount&&t()},Jt=async f=>{const b=f.target;let y=b.name,E=!0;const $=C(o,y),k=()=>b.type?li($._f):hv(f),A=H=>{E=Number.isNaN(H)||H===C(a,y,H)};if($){let H,J;const Hr=k(),At=f.type===as.BLUR||f.type===as.FOCUS_OUT,fm=!Ev($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||Ov(At,C(n.touchedFields,y),n.isSubmitted,v,m),hi=us(y,l,At);z(a,y,Hr),At?($._f.onBlur&&$._f.onBlur(f),u&&u(0)):$._f.onChange&&$._f.onChange(f);const vi=q(y,Hr,At,!1),pm=!_e(vi)||hi;if(!At&&h.values.next({name:y,type:f.type,values:{...a}}),fm)return c.isValid&&w(),pm&&h.state.next({name:y,...hi?{}:vi});if(!At&&hi&&h.state.next({...n}),O(!0),r.resolver){const{errors:Fs}=await M([y]);if(A(Hr),E){const hm=xs(n.errors,o,y),Ls=xs(Fs,o,hm.name||y);H=Ls.error,y=Ls.name,J=_e(Fs)}}else H=(await bs($,a,_,r.shouldUseNativeValidation))[y],A(Hr),E&&(H?J=!1:c.isValid&&(J=await te(o,!0)));E&&($._f.deps&&di($._f.deps),N(y,J,H,vi))}},Ur=(f,b)=>{if(C(n.errors,b)&&f.focus)return f.focus(),1},di=async(f,b={})=>{let y,E;const $=ti(f);if(O(!0),r.resolver){const k=await se(X(f)?f:$);y=_e(k),E=f?!$.some(A=>C(k,A)):y}else f?(E=(await Promise.all($.map(async k=>{const A=C(o,k);return await te(A&&A._f?{[k]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&w()):E=y=await te(o);return h.state.next({...!Ie(f)||c.isValid&&y!==n.isValid?{}:{name:f},...r.resolver||!f?{isValid:y}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&Fr(o,Ur,f?$:l.mount),E},Os=f=>{const b={...i,...s.mount?a:{}};return X(f)?b:Ie(f)?C(b,f):f.map(y=>C(b,y))},Is=(f,b)=>({invalid:!!C((b||n).errors,f),isDirty:!!C((b||n).dirtyFields,f),isTouched:!!C((b||n).touchedFields,f),error:C((b||n).errors,f)}),lm=f=>{f&&ti(f).forEach(b=>ae(n.errors,b)),h.state.next({errors:f?n.errors:{}})},Ps=(f,b,y)=>{const E=(C(o,f,{_f:{}})._f||{}).ref;z(n.errors,f,{...b,ref:E}),h.state.next({name:f,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},cm=(f,b)=>Qe(f)?h.values.subscribe({next:y=>f(Q(void 0,b),y)}):Q(f,b,!0),fi=(f,b={})=>{for(const y of f?ti(f):l.mount)l.mount.delete(y),l.array.delete(y),b.keepValue||(ae(o,y),ae(a,y)),!b.keepError&&ae(n.errors,y),!b.keepDirty&&ae(n.dirtyFields,y),!b.keepTouched&&ae(n.touchedFields,y),!r.shouldUnregister&&!b.keepDefaultValue&&ae(i,y);h.values.next({values:{...a}}),h.state.next({...n,...b.keepDirty?{isDirty:F()}:{}}),!b.keepIsValid&&w()},As=({disabled:f,name:b,field:y,fields:E,value:$})=>{if(Xe(f)){const k=f?void 0:X($)?li(y?y._f:C(E,b)._f):$;z(a,b,k),q(b,k,!1,!1,!0)}},pi=(f,b={})=>{let y=C(o,f);const E=Xe(b.disabled);return z(o,f,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:f}},name:f,mount:!0,...b}}),l.mount.add(f),y?As({field:y,disabled:b.disabled,name:f}):U(f,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Qt(b.min),max:Qt(b.max),minLength:Qt(b.minLength),maxLength:Qt(b.maxLength),pattern:Qt(b.pattern)}:{},name:f,onChange:Jt,onBlur:Jt,ref:$=>{if($){pi(f,b),y=C(o,f);const k=X($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=Sv(k),H=y._f.refs||[];if(A?H.find(J=>J===k):k===y._f.ref)return;z(o,f,{_f:{...y._f,...A?{refs:[...H.filter(ai),k,...Array.isArray(C(i,f))?[{}]:[]],ref:{type:k.type,name:f}}:{ref:k}}}),U(f,!1,void 0,k)}else y=C(o,f,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(mv(l.array,f)&&s.action)&&l.unMount.add(f)}}},Ts=()=>r.shouldFocusError&&Fr(o,Ur,l.mount),um=f=>{Xe(f)&&(h.state.next({disabled:f}),Fr(o,b=>{b.disabled=f},0,!1))},Ds=(f,b)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=je(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await M();n.errors=$,E=k}else await te(o);ae(n.errors,"root"),_e(n.errors)?(h.state.next({errors:{}}),await f(E,y)):(b&&await b({...n.errors},y),Ts(),setTimeout(Ts)),h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_e(n.errors),submitCount:n.submitCount+1,errors:n.errors})},dm=(f,b={})=>{C(o,f)&&(X(b.defaultValue)?ct(f,C(i,f)):(ct(f,b.defaultValue),z(i,f,b.defaultValue)),b.keepTouched||ae(n.touchedFields,f),b.keepDirty||(ae(n.dirtyFields,f),n.isDirty=b.defaultValue?F(f,C(i,f)):F()),b.keepError||(ae(n.errors,f),c.isValid&&w()),h.state.next({...n}))},Ns=(f,b={})=>{const y=f?je(f):i,E=je(y),$=f&&!_e(f)?E:i;if(b.keepDefaultValues||(i=y),!b.keepValues){if(b.keepDirtyValues||g)for(const k of l.mount)C(n.dirtyFields,k)?z($,k,C(a,k)):ct(k,C($,k));else{if(ei&&X(f))for(const k of l.mount){const A=C(o,k);if(A&&A._f){const H=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Lr(H)){const J=H.closest("form");if(J){J.reset();break}}}}o={}}a=e.shouldUnregister?b.keepDefaultValues?je(i):{}:je($),h.array.next({values:{...$}}),h.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!c.isValid||!!b.keepIsValid,s.watch=!!e.shouldUnregister,h.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!lt(f,i)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&f?si(i,f):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ms=(f,b)=>Ns(Qe(f)?f(a):f,b);return{control:{register:pi,unregister:fi,getFieldState:Is,handleSubmit:Ds,setError:Ps,_executeSchema:M,_getWatch:Q,_getDirty:F,_updateValid:w,_removeUnmounted:V,_updateFieldArray:P,_updateDisabledField:As,_getFieldArray:he,_reset:Ns,_resetDefaultValues:()=>Qe(r.defaultValues)&&r.defaultValues().then(f=>{Ms(f,r.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:f=>{n={...n,...f}},_disableForm:um,_subjects:h,_proxyFormState:c,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(f){s=f},get _defaultValues(){return i},get _names(){return l},set _names(f){l=f},get _formState(){return n},set _formState(f){n=f},get _options(){return r},set _options(f){r={...r,...f}}},trigger:di,register:pi,handleSubmit:Ds,watch:cm,setValue:ct,getValues:Os,reset:Ms,resetField:dm,clearErrors:lm,unregister:fi,setError:Ps,setFocus:(f,b={})=>{const y=C(o,f),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:Is}}function ci(e={}){const t=xe.useRef(),r=xe.useRef(),[n,o]=xe.useState({isDirty:!1,isValidating:!1,isLoading:Qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Qe(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Av(e,()=>o(a=>({...a}))),formState:n});const i=t.current.control;return i._options=e,_v({subject:i._subjects.state,next:a=>{yv(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),xe.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),xe.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),xe.useEffect(()=>{e.values&&!lt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),xe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=gv(n,i),t.current}var ks=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Tv=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?ks(i.ref,o,e):i.refs&&i.refs.forEach(function(a){return ks(a,o,e)})};for(var n in t.fields)r(n)},Dv=function(e,t){t.shouldUseNativeValidation&&Tv(e,t);var r={};for(var n in e){var o=C(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(Mv(t.names||Object.keys(e),n)){var a=Object.assign({},Nv(C(r,n)));z(a,"root",i),z(r,n,a)}else z(r,n,i)}return r},Nv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Mv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Fv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(s){return s.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,a=i&&i[n.validation];r[o]=ls(o,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},ui=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(a,s){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var p=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(sr(e,n,p)):Promise.resolve(Pd(e,n,p)).then(u)}()}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof tn)return{values:{},errors:Dv(Fv(a,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};const $s=27,Ss=12,Cs=10,Lv=Pr("enum"),jv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return ui(Ne({checked:to(eo(Qi()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[jt(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),ro(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Rv=re(({option:e,...t},r)=>d(W,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Es=xr("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:es}}}),Vv=({input:e,onSubmitSuccess:t})=>{var u,p;const r=e.key?(u=T.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,o=n&&e.config.options.length===2,{register:i,handleSubmit:a,formState:{errors:s}}=ci({defaultValues:{checked:n?{}:Lv(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:jv(e.config)}),l=Jn();return o?d("ul",{style:{maxHeight:6.5*$s+5*Ss+2*Cs},class:Es({variant:"booleanLike"}),children:e.config.options.map((c,h)=>d("li",{class:"flex-1",children:d(ts,{type:"submit",ref:g=>{g&&h===0&&(l.current=g)},label:c.label,value:"true",onClick:()=>t({type:"enum",value:[c.value]})})},c.value))}):d("form",{noValidate:!0,onSubmit:c=>a(h=>{const g=h.checked;t({type:"enum",value:g})})(c),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*$s+5*Ss+2*Cs},class:Es({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((c,h)=>{const g=`checked.${c.value}`,{ref:m,...v}=i(g);return d("li",{class:"relative",children:d(Rv,{option:c,autoFocus:h===0,ref:_=>{_&&h===0&&(l.current=_),m(_)},id:g,...v,onClick:n?()=>t({type:"enum",value:[c.value]}):void 0})},c.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(Ct,{}),e.config.minSelected===0&&d(Et,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(Mr,{error:(p=s.checked)==null?void 0:p.root})})]})},Bv=Pr("number"),zr={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},zv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return ui(Ne({number:rn(zr.number(),[Md(t,zr.min(t)),Nd(r,zr.max(r)),Td(o=>o===Number(o.toFixed(n)),zr.decimalCases(n))])}))},Uv=({input:e,onSubmitSuccess:t})=>{var p;const r=e.config.defaultValue,n=e.key?(p=T.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{number:r?Number(r):Bv(n)?n.value:void 0},resolver:zv(e.config)}),{ref:s,...l}=o("number",{required:!e.config.optional,valueAsNumber:!0}),u=L();return ve(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},type:"text",min:e.config.min,max:e.config.max,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest [type=number:-webkit-inner-spin-button] w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all [-webkit-outer-spin-button:none]",placeholder:e.config.placeholder}),e.config.optional&&d(Et,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(Ct,{})]}),d(Mr,{error:a.number})]})},Hv=({input:e,onSubmitSuccess:t})=>d("div",{class:"flex flex-col items-center py-3",children:d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})})}),Pt={empty:"Please enter some text",email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number",url:"That doesn’t look like a valid URL"},qv=Se(Pt.phone,[Fd(/^\+?[0-9 -]+$/,Pt.phone)]),Kv={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Wv=Pr("string"),Gv=e=>{const t=`Please enter no more than ${e.maxChars} characters`;return ui(Ne({text:{email:Se(Pt.email,[Dd(Pt.email),jt(e.maxChars??1/0,t)]),phone:to(qv,r=>r.replace(/[^0-9]/g,""),[jt(e.maxChars??1/0,t)]),text:Se([ro(1,Pt.empty),jt(e.maxChars??1/0,t)]),url:Se([Ld(Pt.url),jt(e.maxChars??1/0,t)])}[e.format]}))},Yv=({input:e,onSubmitSuccess:t})=>{var p;const r=e.key?(p=T.current$.value.flow)==null?void 0:p.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{text:n||(Wv(r)?r.value:"")},resolver:Gv(e.config)}),{ref:s,...l}=o("text",{required:!e.config.optional}),u=L();return ve(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{t({type:"string",value:c.text})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{id:"chat-input",...l,...Kv[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&d(Et,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(Ct,{})]}),d(Mr,{error:a.text})]})},Zv=()=>{var o;const e=(o=T.current$.value.flow)==null?void 0:o.data.currentInput,[t,r]=qh(),n=L(null);return T.inputHeight$.value=r.height,R(()=>{const i=n.current;if(i)return i.addEventListener("transitionstart",Z.scrollToEnd.smooth),i.addEventListener("transitioncancel",Z.scrollToEnd.smooth),i.addEventListener("transitionend",Z.scrollToEnd.smooth),()=>{i.removeEventListener("transitionstart",Z.scrollToEnd.smooth),i.removeEventListener("transitioncancel",Z.scrollToEnd.smooth),i.removeEventListener("transitionend",Z.scrollToEnd.smooth)}},[]),d("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:d("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:Le({input:e}).with({input:ie.nullish},()=>d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),d(Ct,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},i=>d(Yv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"multiple-choice"}},i=>d(Vv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"boolean"}},i=>d(av,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"file"}},i=>d(pv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"submit"}},i=>d(Hv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"address"}},i=>d(tv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"number"}},i=>d(Uv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).exhaustive()})})},Xv=xr("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Qv=({children:e,className:t,animate:r,side:n,...o})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Xv({className:t,side:n,animate:r}),...o,children:e}),Jv=({message:e})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),em=({className:e,...t})=>(R(()=>{Z.scrollToEnd.smooth()}),d("div",{"aria-hidden":!0,children:Z.isBotTyping$.value===!0?d("div",{"aria-label":"Typing…",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),tm={bot:"left",user:"right"},rm=xr("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),nm=({lastSentMessageFooter:e})=>{var r;const t=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return R(()=>{Z.scrollToEnd.smooth()},[t.length]),d("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>d(W,{children:d("li",{class:"flex",children:Le(n).with({type:"system"},i=>d("p",{class:rm({variant:i.variant}),children:i.text})).with({type:"text",author:ie.union("bot","user")},i=>{const a=i.author==="user"&&!t.slice(o+1).some(l=>l.type==="text"&&l.author==="user"),s=o===t.length-1;return d(Qv,{animate:s,side:tm[i.author],children:[i.text,a?e:null]},o)}).with({type:"link"},i=>d(Jv,{message:i})).with({type:"image"},i=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>d(uv,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()})},o)),d(em,{},"typing")]})},im=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=T.current$.value;ke(n,"Flow is required to exist to show chatbot body");const o=T.viewState$.value,{chatRef:i,chatService:a}=Xh(),[s,l]=G();return ve(()=>{o==="maximised"&&Z.scrollToEnd.instant()},[o]),ve(()=>{var v,_;const{state:u,flow:p}=T.current$.peek();if(u!=="loaded")throw new Error(mh.invalid_state);let c=p.data.nodeHistory.at(-1);if(Z.scrollToEnd.instant(),T.setInput(void 0),p.data.isFinished)return;c===void 0?(c=Fa(n.nodes).id,T.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:p.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):T.removeMessagesSentByNodeIds([c]);const{interpret:h,abort:g,undo:m}=Ph({context:n.context,analytics:{service:r,customProperties:(_=n.analytics)==null?void 0:_.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=T.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,w)=>{var P;const O=T.current$.peek().flow;ke(O),w&&(O.data.sequence=O.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:w.id,flow_build:n.build,to_node_id:x.id,sequence:O.data.sequence,flow_session_id:O.data.flowSessionId,job:n.job},customProperties:(P=n.analytics)==null?void 0:P.customProperties})),T.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var w;T.markAsFinished();const x=T.current$.peek().flow;ke(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(w=n.analytics)==null?void 0:w.customProperties})}});return l(()=>m),h(c),g},[r,t,a,e,n]),d(W,{children:[d("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:d(nm,{lastSentMessageFooter:n.data.isFinished||!s?null:d(am,{undoFn:s})})}),d(Zv,{})]})},om=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],am=({undoFn:e})=>d("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:d("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=T.current$.peek();ke(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(T.removeMessagesSentByNodeIds(n),T.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(om).forEach(o=>delete t.data.submissions[o]),T.current$.value={...T.current$.value})},children:"Undo"})}),sm=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:im},Symbol.toStringTag,{value:"Module"}))})();
45
+ }`},Ka=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const o=t[n];if(!o)continue;const i=Dt(e,n,null);if(o.required&&i===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(o.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:o.type}}},Eh=({_internal_domManager:e=bh(),theme:t})=>Je(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const a=()=>{if(typeof window>"u")return;const s=[D("style",{id:"inploi-chatbot-styles"},vh),D("style",{id:"inploi-chatbot-theme"},Ch(t))],l=e.getOrCreateChatbotElement();ht(D(W,{},[s,D(fh,{apiClient:r,logger:n,analytics:o})]),l),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,l)=>r.fetch(`/flow/job/${s}`).then(u=>{const f=sr(hh,u);return{flow:f.flow,title:`Applying for “${f.job.title}”`,flowKeys:[f.job.id,...(l==null?void 0:l.flowKeys)??[]],job:{id:f.job.id,id_type:"external"},...l}}),fetchFlowById:async(s,l)=>r.fetch(`/flow/id/${s}`).then(u=>{var c;const f=sr(ph,u);return{flow:f.flow,title:"Chatbot",flowKeys:(l==null?void 0:l.flowKeys)??[],...l,analytics:{customProperties:{flow_id:f.flow.id,flow_version:f.flow.version,...(c=l==null?void 0:l.analytics)==null?void 0:c.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",i||a(),s instanceof Promise?(T.current$.value={state:"loading"},s.then(async l=>{Ka({context:l.context||{},schema:l.flow.context_schema,logger:n}),T.startFlow(l)}).catch(l=>{const u=l instanceof Error?l.message:"An error occurred";T.current$.value={state:"error",error:u}})):(Ka({context:s.context||{},schema:s.flow.context_schema,logger:n}),T.startFlow(s))}catch(l){n.error("Error starting flow",l)}},close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),n.info("Closed flow from an external source"))}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=Eh;const Yt=(e,{context:t,submissions:r})=>{const[n,...o]=e.data.compareKey.split(".");if(!n)return!1;const i=Ga({context:t,key:n,path:o,submissions:r});if(!i)return!1;switch(i.type){case"address":{const a=Dt(i.value,o.join("."));switch(e.data.compare){case"equals":return a===e.data.compareValue;case"contains":return a?a.includes(e.data.compareValue):!1;case"notEquals":return a!==e.data.compareValue;case"notContains":return a?!a.includes(e.data.compareValue):!0}break}case"integration":{if(typeof i.value!="object"||Array.isArray(i.value))return!1;const a=Dt(i.value,o.join(".")),s={...e,data:{...e.data,compareKey:"_temp"}};switch(typeof a){case"boolean":return Yt(s,{submissions:{_temp:{value:a,type:"boolean"}},context:t});case"string":return Yt(s,{submissions:{_temp:{value:a,type:"string"}},context:t});case"number":return Yt(s,{submissions:{_temp:{value:a,type:"number"}},context:t});case"object":return Array.isArray(a)&&a.every(ja)?Yt(s,{submissions:{_temp:{value:a,type:"enum"}},context:t}):!1}break}case"boolean":{const a=e.data.compareValue==="true";switch(e.data.compare){case"equals":return i.value===a;case"notEquals":return i.value!==a}break}case"string":switch(e.data.compare){case"equals":return i.value===e.data.compareValue;case"contains":return i.value?i.value.includes(e.data.compareValue):!1;case"notEquals":return i.value!==e.data.compareValue;case"notContains":return i.value?!i.value.includes(e.data.compareValue):!0}break;case"number":{try{const a=Number(e.data.compareValue);switch(e.data.compare){case"equals":return i.value===a;case"notEquals":return i.value!==a;case"greaterThan":return i.value>a;case"greaterThanOrEqualTo":return i.value>=a;case"lessThan":return i.value<a;case"lessThanOrEqualTo":return i.value<=a}}catch{return console.error(`Failed to parse number in if-block ${e.id}`,i.value),!1}break}case"enum":switch(e.data.compare){case"equals":return i.value.length===1&&i.value[0]===e.data.compareValue;case"notEquals":return i.value.length===1&&i.value[0]!==e.data.compareValue;case"contains":return i.value.includes(e.data.compareValue);case"notContains":return!i.value.includes(e.data.compareValue)}break}return!1},Oh=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Ze=(e,{context:t,submissions:r})=>e.replace(Oh,(n,o,i="")=>{const[a,...s]=o.trim().split("."),l=Ga({key:a,path:s,submissions:r,context:t});if(!l)return i;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${qt(u.sizeKb)})`).join(", ");case"enum":return l.value.join(", ");case"address":return Object.values(l.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return l.value?l.value.toString():i;case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const u=Dt(l.value,s.join("."));switch(typeof u){case"boolean":return u===!0?"true":"false";case"string":return u;case"number":return u.toString();case"object":if(Array.isArray(u)&&u.every(ja))return u.join(", ")}break}}return i}),Wa=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return Wa({node:n,nodes:t,stopWhen:r})},Ih=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(s=>s.id===o.branchId);if(!i)return!1;const a=Wa({node:i,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},Ph=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:a,onFlowEnd:s,onInterpret:l})=>{let u=new AbortController;const f={...t.service,log:h=>t.service.log({...h,customProperties:{...h.customProperties,...t.customProperties}})},c=async(h,m)=>{const b=i();l==null||l(h,m);try{await Ah({flow:e,analytics:f,logger:r,apiClient:o,context:n,node:h,submissions:b,chat:{sendMessage:async v=>a.send({groupId:h.id,message:v,signal:u.signal}),userInput:async v=>a.input({input:v,signal:u.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const _=v?e.nodes.find(x=>x.id===v):Ih({childNode:h,nodes:e.nodes});return _?c(_,h):s==null?void 0:s(h)},end:()=>s==null?void 0:s(h)})}catch(v){if(v instanceof Kt)return;throw v}};return{interpret:async h=>{const m=e.nodes.find(b=>b.id===h)??Fa(e.nodes);return c(m)},undo:h=>{let m=1;const b=e.nodes.find(_=>_.id===h[h.length-1]);for(let _=h.length-2;_>0;_--){const x=h[_],w=e.nodes.find(O=>O.id===x);if(!w||(m++,w.type.startsWith("question-")))break}u.abort(),u=new AbortController;const v=e.nodes.find(_=>_.id===h[h.length-m]);return ke(v,"Undo failed: new start node not found"),c(v,b),{removed:m}},abort:()=>{u.abort()}}};async function Ah(e){return await Le(e).with({node:{type:"text"}},Mh).with({node:{type:"image"}},Fh).with({node:{type:"question-text"}},Lh).with({node:{type:"question-enum"}},Rh).with({node:{type:"question-number"}},jh).with({node:{type:"question-boolean"}},Vh).with({node:{type:"question-file"}},zh).with({node:{type:"question-address"}},Bh).with({node:{type:"end-flow"}},Uh).with({node:{type:"if-block"}},Nh).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},Dh).with({node:{type:"integration-application-submit"}},Th).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function Th({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,analytics:a,flow:s}){const l=async u=>{u!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"system",variant:"info",text:"Submitting…"});const{anonymous_id:f,session_id:c}=a.getSessionInfo(),h=await o.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:f,session_id:c,job:s.job,submissions:eh(i||{})})}).catch(m=>m);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:h}),Le(h).with({integration_response:ie.select(ie.union({status:ie.number,data:ie.any},{status:ie.number,error:{message:ie.string,data:ie.any}}))},m=>{a.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,response:{status:m.status,payload:"data"in m?m.data:m.error.data??null},job:s.job}})}).otherwise(()=>{}),await Le(h).with({ats_data:{redirect_url:ie.string}},async m=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please complete your submission here:"});const b=new URL(m.ats_data.redirect_url);f&&!b.searchParams.has("anonymous_id")&&b.searchParams.set("anonymous_id",f),await e.sendMessage({type:"link",href:b.toString(),text:"Complete submission",onClick:()=>{if(!c)return n.error("session_id not set, cannot log FLOW_REDIRECT event");a.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:c,flow_version:s.version,href:b.toString(),job:s.job}})}}),t(r.nextId)}).with({success:!0},async()=>{await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with({sucess:!1,ats_data:{message:ie.string}},async m=>{n.error(m.ats_data),await e.sendMessage({type:"system",variant:"error",text:m.ats_data.message}),await l(!1)}).otherwise(async m=>{n.error(m),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await l(!1)})};await l(r.data.skipConfirmation)}async function Dh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({type:"link",href:Ze(r.data.href,{submissions:n,context:o}),text:Ze(r.data.cta,{submissions:n,context:o})}),t(r.nextId)}async function Nh({submissions:e,next:t,node:r,context:n}){t(Yt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Mh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.text,{submissions:n,context:o})}),t(r.nextId)}async function Fh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),t(r.nextId)}async function Lh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(r.nextId)}async function jh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value.toString()}),t(r.nextId)}async function Rh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(a=>i.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function Vh({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Ze(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Bh({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function zh({node:e,chat:t,next:r,submissions:n,context:o}){await t.sendMessage({author:"bot",type:"text",text:Ze(e.data.question,{submissions:n,context:o})});const i=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(i===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const a of i.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function Uh({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Ga=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const o=Dt(n,t.join("."));switch(typeof o){case"string":return{type:"string",value:o};case"number":return{type:"number",value:o};case"boolean":return{type:"boolean",value:o};default:console.warn(`Unexpected type for $context.${t.join(".")}`,o);return}}return r==null?void 0:r[e]};function Gn(e,t,r){var n,o,i,a,s;t==null&&(t=100);function l(){var f=Date.now()-a;f<t&&f>=0?n=setTimeout(l,t-f):(n=null,r||(s=e.apply(i,o),i=o=null))}var u=function(){i=this,o=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(l,t)),f&&(s=e.apply(i,o),i=o=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},u}Gn.debounce=Gn;var Hh=Gn;const Ya=Ve(Hh);function qh(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=G({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,c=L(!1);R(()=>(c.current=!0,()=>void(c.current=!1)));const[h,m,b]=ue(()=>{const w=()=>{if(!l.current.element)return;const{left:O,top:P,width:I,height:U,bottom:q,right:N,x:M,y:se}=l.current.element.getBoundingClientRect(),te={left:O,top:P,width:I,height:U,bottom:q,right:N,x:M,y:se};l.current.element instanceof HTMLElement&&o&&(te.height=l.current.element.offsetHeight,te.width=l.current.element.offsetWidth),Object.freeze(te),c.current&&!Yh(l.current.lastBounds,te)&&s(l.current.lastBounds=te)};return[w,f?Ya(w,f):w,u?Ya(w,u):w]},[s,o,u,f]);function v(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",b,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function _(){l.current.element&&(l.current.resizeObserver=new i(b),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(w=>w.addEventListener("scroll",b,{capture:!0,passive:!0})))}const x=w=>{!w||w===l.current.element||(v(),l.current.element=w,l.current.scrollContainers=Za(w),_())};return Wh(b,!!r),Kh(m),R(()=>{v(),_()},[r,b,m]),R(()=>v,[]),[x,a,h]}function Kh(e){R(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Wh(e,t){R(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Za(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...Za(e.parentElement)]}const Gh=["x","y","top","bottom","left","right","width","height"],Yh=(e,t)=>Gh.every(r=>e[r]===t[r]),Ct=({class:e,...t})=>d("button",{class:it("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:"Send"}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})}),Zh=25,Yn=We({instant:()=>{},smooth:()=>{}}),Z={onSubmitSuccessFn$:We(()=>{}),isBotTyping$:We(!1),scrollToEnd:{instant:()=>Yn.value.instant(),smooth:()=>Yn.value.smooth()}},Xh=()=>{const e=L(null);ve(()=>{Yn.value={instant:()=>{var r;return(r=e.current)==null?void 0:r.scrollTo({top:e.current.scrollHeight,behavior:"instant"})},smooth:()=>{e.current&&e.current.scrollHeight-e.current.scrollTop<=e.current.clientHeight*2&&e.current.scrollTo({top:e.current.scrollHeight,behavior:"smooth"})}}},[e]);const t=ue(()=>({addToSubmissions:(n,o)=>T.setSubmission(n,o),send:async({message:n,signal:o,groupId:i})=>{if(await Le(n).with({author:"bot",type:"text"},async a=>{if(o!=null&&o.aborted)throw new Kt;Z.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*Zh;await new Promise(l=>setTimeout(l,s,{signal:o})),Z.isBotTyping$.value=!1}).otherwise(async()=>{}),o!=null&&o.aborted)throw new Kt;T.addMessage(n,i)},input:({input:n,signal:o})=>{if(o!=null&&o.aborted)throw new Kt;return T.setInput(n),new Promise(i=>{const a=s=>{if(o!=null&&o.aborted)throw new Kt;T.setInput(void 0),n.key&&T.setSubmission(n.key,s),i(s)};Z.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},Et=({class:e,...t})=>d("button",{type:"button",class:it("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:"Skip"}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),Xa=["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cabo Verde","Cambodia","Cameroon","Canada","Caribbean Netherlands","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Cook Islands","Costa Rica","Croatia","Cuba","Curaçao","Cyprus","Czechia","Côte d'Ivoire","Democratic Republic of the Congo","Denmark","Djibouti","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Eswatini","Ethiopia","Falkland Islands (Islas Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern and Antarctic Lands","Gabon","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Heard Island and McDonald Islands","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macao","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar (Burma)","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","North Macedonia","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Rwanda","Réunion","Saint Barthélemy","Saint Helena, Ascension and Tristan da Cunha","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and the Grenadines","Samoa","San Marino","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and the South Sandwich Islands","South Korea","South Sudan","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Sweden","Switzerland","Syria","São Tomé and Príncipe","Taiwan","Tajikistan","Tanzania","Thailand","The Bahamas","The Gambia","Timor-Leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkmenistan","Turks and Caicos Islands","Tuvalu","Türkiye","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe","Åland Islands"],Qa={line1:["street_number","floor","room","premise"],line2:["subpremise","street_address","route"],line3:["sublocality","neighborhood"],city:["locality","postal_town"],state:["administrative_area_level_1"],postcode:["postal_code"],country:["country"]},Nr=Object.keys(Qa),Qh=e=>Nr.reduce((t,r)=>{const n=Qa[r],o=e.filter(i=>i.types.some(a=>n.includes(a))).map(i=>i.long_name).join(", ");return o&&(t[r]=o),t},{}),Jh=document.createElement("div"),ev=()=>ue(()=>{const{google:e}=window;if(!("google"in window)||!("maps"in e)||!("places"in e.maps))return{enabled:!1};const t=new e.maps.places.AutocompleteService,r=new e.maps.places.PlacesService(Jh);return{enabled:!0,getPredictions:async n=>{const{predictions:o}=await t.getPlacePredictions({input:n,language:"en"});return o.map(i=>({label:i.description,value:i.place_id}))},getPlaceDetails:async n=>await new Promise((i,a)=>r.getDetails({placeId:n,fields:["address_components"],language:"en"},(s,l)=>l!==e.maps.places.PlacesServiceStatus.OK?a(l):s===null?a("ZERO_RESULTS"):i({ok:!0,place:s}))).catch(async i=>(console.error("Failed to get address details",i),{ok:!1}))}},[]),Zn=e=>d("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:"Back"})]}),Xn={label:"Fill in manually",value:""},tv=({input:e,onSubmitSuccess:t})=>{const[r,n]=G(""),[o,i]=G(),[a,s]=G([]),[l,u]=G(),{enabled:f,getPredictions:c,getPlaceDetails:h}=ev(),[m,b]=G(f?"query":"manual"),v=ue(()=>La(_=>{ke(f,"Query state should not be enabled if Google Places isn't available"),n(_),_===""&&s([]),!(_.length<3)&&c(_).then(x=>{s(x)})},500),[f,c]);switch(R(()=>{if(f&&!(l===void 0||l===""))return h(l).then(_=>{if(!_.ok||!_.place.address_components){i({});return}const x=Qh(_.place.address_components);i(x),b("details")}),()=>{i(void 0)}},[l,h,f]),m){case"query":return ke(f,"Query state should not be enabled if Google Places isn't available"),d(rv,{input:e,onSkip:()=>t(null),onAddressSelect:_=>{u(_),b("loading")},onInputChange:v,suggestions:a,query:r});case"loading":return d(Qn,{input:e,onSubmitSuccess:t,addressFields:{},actions:d(Zn,{onClick:()=>{u(void 0),b("query")}})});case"details":return ke(o!==void 0),d(Qn,{input:e,onSubmitSuccess:t,addressFields:o,actions:d(Zn,{onClick:()=>{u(void 0),b("query")}})});case"manual":return d(Qn,{input:e,onSubmitSuccess:t,addressFields:{},actions:f?d(Zn,{onClick:()=>{u(void 0),b("query")}}):void 0})}},rv=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onInputChange:i})=>{const a=L(null);return ve(()=>{a.current&&(a.current.focus(),a.current.select())},[]),d(W,{children:[d("form",{noValidate:!0,onSubmit:s=>{s.preventDefault()},class:"flex flex-col justify-end gap-1 p-2.5",children:[d("input",{onChange:s=>{i(s.currentTarget.value)},ref:a,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder||"Search an address",defaultValue:o}),e.config.optional&&d(Et,{class:"absolute right-3",onClick:t})]}),d("ul",{children:[r.map(s=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(s.value)},children:[d("span",{class:"flex-grow",children:s.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},s.label)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(Xn.value)},children:d("span",{class:"flex-grow",children:Xn.label})})},Xn.label)]})]})},nv={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Qn=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=L(null);return ve(()=>{if(o.current){const i=o.current.querySelector("input");i&&(i.focus(),i.select())}},[]),d("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:i=>{const a=new FormData(i.currentTarget),s=Object.fromEntries(a.entries());t({type:"address",value:s})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:o,children:Nr.map((i,a)=>{const s=`isdk_${i}`,l=n.config.keys[i];return l?d(W,{children:[d("label",{for:s,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:nv[i]}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[i==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:l,id:s,defaultValue:e[i],required:!0,children:[e.country&&!Xa.includes(e.country)?d("option",{value:e[i],children:e[i]}):d("option",{value:"",children:"Select a country"}),Xa.map(u=>d("option",{value:u,children:u},u))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus:a===0?!0:void 0,class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 flex-1 rounded-lg border-solid bg-transparent px-3 py-1.5 text-base transition-colors autofill:shadow-[inset_0_0_0_1000px_hsl(210_16.7%_97.6%)] focus:outline-none",name:l,id:s,defaultValue:e[i],required:!0}),a!==Nr.length-1&&d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"}),a===Nr.length-1&&d("hr",{class:"m-0 w-full border-b border-b-transparent"})]})]}):null})}),d("div",{class:"flex w-full flex-1 ",children:[d("div",{class:"flex-grow",children:r}),d(Ct,{class:"flex items-center justify-center"})]})]})},Jn=()=>{const e=L(null);return R(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Ja=["true","false"],iv=Cd(Ja),ov="answer",es="flex items-center gap-2 p-2.5",ts=re(({label:e,...t},r)=>d("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:d("p",{class:"truncate text-center text-base",children:e})})),av=({input:e,onSubmitSuccess:t})=>{const r=Jn();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=rh(n).value,i=sr(iv,o);t({type:"boolean",value:i==="true"})},children:[d("ul",{class:es,children:Ja.map((n,o)=>d("li",{class:"flex-1",children:d(ts,{ref:o===0?r:null,type:"submit",name:ov,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(Et,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Mr=({error:e})=>e?d("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[d("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null,sv=e=>new Promise((t,r)=>{const n=new FileReader;n.readAsDataURL(e),n.onload=()=>n.result?t(n.result.toString()):r("No result from reader"),n.onerror=r}),lv=e=>e.reduce((t,r)=>t+r.sizeKb,0),cv=Pr("file"),rs=3,uv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return d("div",{class:it("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"block truncate",children:o}),d("span",{children:[".",n]})]}),d("p",{"aria-label":"File size",class:"text-accent-11",children:qt(e.sizeKb)})]})},ns=({class:e,...t})=>d("li",{class:it("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),is=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},dv=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(is(n.name).toLowerCase()))},fv=(e,t)=>{const r=is(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},pv=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,o]=G(cv(r)?r.value:[]),[i,a]=G(),s=n.length-rs,l=lv(n),u=Jn();return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:c=>(c.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!dv({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${qt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:u,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?d(W,{children:[d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,rs).map(c=>{const h=c.name.split(".").pop(),m=c.name.replace(new RegExp(`.${h}$`),"");return d(ns,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:m}),d("span",{children:[".",h]})]})}),s>0?d(ns,{children:["+",s," file",s!==1?"s":""]}):null]}),d("p",{class:"text-neutral-11 text-xs",children:[qt(l)," ",n.length>1?"total":""]})]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-10 text-xs",children:["(max ",qt(e.config.fileSizeLimitKib),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(c=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:c.replace(".","")}))})]})]}),d("input",{id:"dropzone-file",onInput:async c=>{ke(c.target instanceof HTMLInputElement);const h=c.target.files?Array.from(c.target.files):[],m=await Promise.allSettled(h.map(async v=>{const _=await sv(v);return{name:fv(v.name,42),data:_,sizeKb:v.size/1e3}}));if(m.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const b=m.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);o(b)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(Ct,{disabled:n.length===0}),e.config.optional&&d(Et,{onClick:()=>t(null)})]})]}),d(Mr,{error:i})]})};var Zt=e=>e.type==="checkbox",Ot=e=>e instanceof Date,de=e=>e==null;const os=e=>typeof e=="object";var ee=e=>!de(e)&&!Array.isArray(e)&&os(e)&&!Ot(e),hv=e=>ee(e)&&e.target?Zt(e.target)?e.target.checked:e.target.value:e,vv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,mv=(e,t)=>e.has(vv(t)),bv=e=>{const t=e.constructor&&e.constructor.prototype;return ee(t)&&t.hasOwnProperty("isPrototypeOf")},ei=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function je(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(!(ei&&(e instanceof Blob||e instanceof FileList))&&(r||ee(e)))if(t=r?[]:{},!r&&!bv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=je(e[n]));else return e;return t}var Xt=e=>Array.isArray(e)?e.filter(Boolean):[],X=e=>e===void 0,C=(e,t,r)=>{if(!t||!ee(e))return r;const n=Xt(t.split(/[,[\].]+?/)).reduce((o,i)=>de(o)?o:o[i],e);return X(n)||n===e?X(e[t])?r:e[t]:n},Xe=e=>typeof e=="boolean";const as={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},$e={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Re={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};xe.createContext(null);var gv=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==$e.all&&(t._proxyFormState[a]=!n||$e.all),r&&(r[a]=!0),e[a]}});return o},_e=e=>ee(e)&&!Object.keys(e).length,yv=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return _e(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||$e.all))},ti=e=>Array.isArray(e)?e:[e];function _v(e){const t=xe.useRef(e);t.current=e,xe.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ie=e=>typeof e=="string",wv=(e,t,r,n,o)=>Ie(e)?(n&&t.watch.add(e),C(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),C(r,i))):(n&&(t.watchAll=!0),r),ri=e=>/^\w*$/.test(e),ss=e=>Xt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function z(e,t,r){let n=-1;const o=ri(t)?[t]:ss(t),i=o.length,a=i-1;for(;++n<i;){const s=o[n];let l=r;if(n!==a){const u=e[s];l=ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var ls=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},cs=e=>({isOnSubmit:!e||e===$e.onSubmit,isOnBlur:e===$e.onBlur,isOnChange:e===$e.onChange,isOnAll:e===$e.all,isOnTouch:e===$e.onTouched}),us=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Fr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=C(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else ee(s)&&Fr(s,t)}}};var xv=(e,t,r)=>{const n=Xt(C(e,r));return z(n,"root",t[r]),z(e,r,n),e},ni=e=>e.type==="file",Qe=e=>typeof e=="function",Lr=e=>{if(!ei)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},jr=e=>Ie(e),ii=e=>e.type==="radio",Rr=e=>e instanceof RegExp;const ds={value:!1,isValid:!1},fs={value:!0,isValid:!0};var ps=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!X(e[0].attributes.value)?X(e[0].value)||e[0].value===""?fs:{value:e[0].value,isValid:!0}:fs:ds}return ds};const hs={isValid:!1,value:null};var vs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,hs):hs;function ms(e,t,r="validate"){if(jr(e)||Array.isArray(e)&&e.every(jr)||Xe(e)&&!e)return{type:r,message:jr(e)?e:"",ref:t}}var It=e=>ee(e)&&!Rr(e)?e:{value:e,message:""},bs=async(e,t,r,n,o)=>{const{ref:i,refs:a,required:s,maxLength:l,minLength:u,min:f,max:c,pattern:h,validate:m,name:b,valueAsNumber:v,mount:_,disabled:x}=e._f,w=C(t,b);if(!_||x)return{};const O=a?a[0]:i,P=V=>{n&&O.reportValidity&&(O.setCustomValidity(Xe(V)?"":V||""),O.reportValidity())},I={},U=ii(i),q=Zt(i),N=U||q,M=(v||ni(i))&&X(i.value)&&X(w)||Lr(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,se=ls.bind(null,b,r,I),te=(V,F,Q,he=Re.maxLength,we=Re.minLength)=>{const Pe=V?F:Q;I[b]={type:V?he:we,message:Pe,ref:i,...se(V?he:we,Pe)}};if(o?!Array.isArray(w)||!w.length:s&&(!N&&(M||de(w))||Xe(w)&&!w||q&&!ps(a).isValid||U&&!vs(a).isValid)){const{value:V,message:F}=jr(s)?{value:!!s,message:s}:It(s);if(V&&(I[b]={type:Re.required,message:F,ref:O,...se(Re.required,F)},!r))return P(F),I}if(!M&&(!de(f)||!de(c))){let V,F;const Q=It(c),he=It(f);if(!de(w)&&!isNaN(w)){const we=i.valueAsNumber||w&&+w;de(Q.value)||(V=we>Q.value),de(he.value)||(F=we<he.value)}else{const we=i.valueAsDate||new Date(w),Pe=Ur=>new Date(new Date().toDateString()+" "+Ur),ct=i.type=="time",Jt=i.type=="week";Ie(Q.value)&&w&&(V=ct?Pe(w)>Pe(Q.value):Jt?w>Q.value:we>new Date(Q.value)),Ie(he.value)&&w&&(F=ct?Pe(w)<Pe(he.value):Jt?w<he.value:we<new Date(he.value))}if((V||F)&&(te(!!V,Q.message,he.message,Re.max,Re.min),!r))return P(I[b].message),I}if((l||u)&&!M&&(Ie(w)||o&&Array.isArray(w))){const V=It(l),F=It(u),Q=!de(V.value)&&w.length>+V.value,he=!de(F.value)&&w.length<+F.value;if((Q||he)&&(te(Q,V.message,F.message),!r))return P(I[b].message),I}if(h&&!M&&Ie(w)){const{value:V,message:F}=It(h);if(Rr(V)&&!w.match(V)&&(I[b]={type:Re.pattern,message:F,ref:i,...se(Re.pattern,F)},!r))return P(F),I}if(m){if(Qe(m)){const V=await m(w,t),F=ms(V,O);if(F&&(I[b]={...F,...se(Re.validate,F.message)},!r))return P(F.message),I}else if(ee(m)){let V={};for(const F in m){if(!_e(V)&&!r)break;const Q=ms(await m[F](w,t),O,F);Q&&(V={...Q,...se(F,Q.message)},P(Q.message),r&&(I[b]=V))}if(!_e(V)&&(I[b]={ref:O,...V},!r))return I}}return P(!0),I};function kv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=X(e)?n++:e[t[n++]];return e}function $v(e){for(const t in e)if(e.hasOwnProperty(t)&&!X(e[t]))return!1;return!0}function ae(e,t){const r=Array.isArray(t)?t:ri(t)?[t]:ss(t),n=r.length===1?e:kv(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(ee(n)&&_e(n)||Array.isArray(n)&&$v(n))&&ae(e,r.slice(0,-1)),e}function oi(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Vr=e=>de(e)||!os(e);function lt(e,t){if(Vr(e)||Vr(t))return e===t;if(Ot(e)&&Ot(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const a=t[o];if(Ot(i)&&Ot(a)||ee(i)&&ee(a)||Array.isArray(i)&&Array.isArray(a)?!lt(i,a):i!==a)return!1}}return!0}var gs=e=>e.type==="select-multiple",Sv=e=>ii(e)||Zt(e),ai=e=>Lr(e)&&e.isConnected,ys=e=>{for(const t in e)if(Qe(e[t]))return!0;return!1};function Br(e,t={}){const r=Array.isArray(e);if(ee(e)||r)for(const n in e)Array.isArray(e[n])||ee(e[n])&&!ys(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Br(e[n],t[n])):de(e[n])||(t[n]=!0);return t}function _s(e,t,r){const n=Array.isArray(e);if(ee(e)||n)for(const o in e)Array.isArray(e[o])||ee(e[o])&&!ys(e[o])?X(t)||Vr(r[o])?r[o]=Array.isArray(e[o])?Br(e[o],[]):{...Br(e[o])}:_s(e[o],de(t)?{}:t[o],r[o]):r[o]=!lt(e[o],t[o]);return r}var si=(e,t)=>_s(e,t,Br(t)),ws=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>X(e)?e:t?e===""?NaN:e&&+e:r&&Ie(e)?new Date(e):n?n(e):e;function li(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return ni(t)?t.files:ii(t)?vs(e.refs).value:gs(t)?[...t.selectedOptions].map(({value:r})=>r):Zt(t)?ps(e.refs).value:ws(X(t.value)?e.ref.value:t.value,e)}var Cv=(e,t,r,n)=>{const o={};for(const i of e){const a=C(t,i);a&&z(o,i,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},Qt=e=>X(e)?e:Rr(e)?e.source:ee(e)?Rr(e.value)?e.value.source:e.value:e,Ev=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function xs(e,t,r){const n=C(e,r);if(n||ri(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),a=C(t,i),s=C(e,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:r}}var Ov=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Iv=(e,t)=>!Xt(C(e,t)).length&&ae(e,t);const Pv={mode:$e.onSubmit,reValidateMode:$e.onChange,shouldFocusError:!0};function Av(e={},t){let r={...Pv,...e},n={submitCount:0,isDirty:!1,isLoading:Qe(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=ee(r.defaultValues)||ee(r.values)?je(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:je(i),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,f=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:oi(),array:oi(),state:oi()},m=e.resetOptions&&e.resetOptions.keepDirtyValues,b=cs(r.mode),v=cs(r.reValidateMode),_=r.criteriaMode===$e.all,x=p=>g=>{clearTimeout(f),f=setTimeout(p,g)},w=async p=>{if(c.isValid||p){const g=r.resolver?_e((await M()).errors):await te(o,!0);g!==n.isValid&&h.state.next({isValid:g})}},O=p=>c.isValidating&&h.state.next({isValidating:p}),P=(p,g=[],y,E,$=!0,k=!0)=>{if(E&&y){if(s.action=!0,k&&Array.isArray(C(o,p))){const A=y(C(o,p),E.argA,E.argB);$&&z(o,p,A)}if(k&&Array.isArray(C(n.errors,p))){const A=y(C(n.errors,p),E.argA,E.argB);$&&z(n.errors,p,A),Iv(n.errors,p)}if(c.touchedFields&&k&&Array.isArray(C(n.touchedFields,p))){const A=y(C(n.touchedFields,p),E.argA,E.argB);$&&z(n.touchedFields,p,A)}c.dirtyFields&&(n.dirtyFields=si(i,a)),h.state.next({name:p,isDirty:F(p,g),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else z(a,p,g)},I=(p,g)=>{z(n.errors,p,g),h.state.next({errors:n.errors})},U=(p,g,y,E)=>{const $=C(o,p);if($){const k=C(a,p,X(y)?C(i,p):y);X(k)||E&&E.defaultChecked||g?z(a,p,g?k:li($._f)):we(p,k),s.mount&&w()}},q=(p,g,y,E,$)=>{let k=!1,A=!1;const H={name:p};if(!y||E){c.isDirty&&(A=n.isDirty,n.isDirty=H.isDirty=F(),k=A!==H.isDirty);const J=lt(C(i,p),g);A=C(n.dirtyFields,p),J?ae(n.dirtyFields,p):z(n.dirtyFields,p,!0),H.dirtyFields=n.dirtyFields,k=k||c.dirtyFields&&A!==!J}if(y){const J=C(n.touchedFields,p);J||(z(n.touchedFields,p,y),H.touchedFields=n.touchedFields,k=k||c.touchedFields&&J!==y)}return k&&$&&h.state.next(H),k?H:{}},N=(p,g,y,E)=>{const $=C(n.errors,p),k=c.isValid&&Xe(g)&&n.isValid!==g;if(e.delayError&&y?(u=x(()=>I(p,y)),u(e.delayError)):(clearTimeout(f),u=null,y?z(n.errors,p,y):ae(n.errors,p)),(y?!lt($,y):$)||!_e(E)||k){const A={...E,...k&&Xe(g)?{isValid:g}:{},errors:n.errors,name:p};n={...n,...A},h.state.next(A)}O(!1)},M=async p=>r.resolver(a,r.context,Cv(p||l.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),se=async p=>{const{errors:g}=await M(p);if(p)for(const y of p){const E=C(g,y);E?z(n.errors,y,E):ae(n.errors,y)}else n.errors=g;return g},te=async(p,g,y={valid:!0})=>{for(const E in p){const $=p[E];if($){const{_f:k,...A}=$;if(k){const H=l.array.has(k.name),J=await bs($,a,_,r.shouldUseNativeValidation&&!g,H);if(J[k.name]&&(y.valid=!1,g))break;!g&&(C(J,k.name)?H?xv(n.errors,J,k.name):z(n.errors,k.name,J[k.name]):ae(n.errors,k.name))}A&&await te(A,g,y)}}return y.valid},V=()=>{for(const p of l.unMount){const g=C(o,p);g&&(g._f.refs?g._f.refs.every(y=>!ai(y)):!ai(g._f.ref))&&fi(p)}l.unMount=new Set},F=(p,g)=>(p&&g&&z(a,p,g),!lt(Os(),i)),Q=(p,g,y)=>wv(p,l,{...s.mount?a:X(g)?i:Ie(p)?{[p]:g}:g},y,g),he=p=>Xt(C(s.mount?a:i,p,e.shouldUnregister?C(i,p,[]):[])),we=(p,g,y={})=>{const E=C(o,p);let $=g;if(E){const k=E._f;k&&(!k.disabled&&z(a,p,ws(g,k)),$=Lr(k.ref)&&de(g)?"":g,gs(k.ref)?[...k.ref.options].forEach(A=>A.selected=$.includes(A.value)):k.refs?Zt(k.ref)?k.refs.length>1?k.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(H=>H===A.value):$===A.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(A=>A.checked=A.value===$):ni(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||h.values.next({name:p,values:{...a}})))}(y.shouldDirty||y.shouldTouch)&&q(p,$,y.shouldTouch,y.shouldDirty,!0),y.shouldValidate&&di(p)},Pe=(p,g,y)=>{for(const E in g){const $=g[E],k=`${p}.${E}`,A=C(o,k);(l.array.has(p)||!Vr($)||A&&!A._f)&&!Ot($)?Pe(k,$,y):we(k,$,y)}},ct=(p,g,y={})=>{const E=C(o,p),$=l.array.has(p),k=je(g);z(a,p,k),$?(h.array.next({name:p,values:{...a}}),(c.isDirty||c.dirtyFields)&&y.shouldDirty&&h.state.next({name:p,dirtyFields:si(i,a),isDirty:F(p,k)})):E&&!E._f&&!de(k)?Pe(p,k,y):we(p,k,y),us(p,l)&&h.state.next({...n}),h.values.next({name:p,values:{...a}}),!s.mount&&t()},Jt=async p=>{const g=p.target;let y=g.name,E=!0;const $=C(o,y),k=()=>g.type?li($._f):hv(p),A=H=>{E=Number.isNaN(H)||H===C(a,y,H)};if($){let H,J;const Hr=k(),At=p.type===as.BLUR||p.type===as.FOCUS_OUT,fm=!Ev($._f)&&!r.resolver&&!C(n.errors,y)&&!$._f.deps||Ov(At,C(n.touchedFields,y),n.isSubmitted,v,b),hi=us(y,l,At);z(a,y,Hr),At?($._f.onBlur&&$._f.onBlur(p),u&&u(0)):$._f.onChange&&$._f.onChange(p);const vi=q(y,Hr,At,!1),pm=!_e(vi)||hi;if(!At&&h.values.next({name:y,type:p.type,values:{...a}}),fm)return c.isValid&&w(),pm&&h.state.next({name:y,...hi?{}:vi});if(!At&&hi&&h.state.next({...n}),O(!0),r.resolver){const{errors:Fs}=await M([y]);if(A(Hr),E){const hm=xs(n.errors,o,y),Ls=xs(Fs,o,hm.name||y);H=Ls.error,y=Ls.name,J=_e(Fs)}}else H=(await bs($,a,_,r.shouldUseNativeValidation))[y],A(Hr),E&&(H?J=!1:c.isValid&&(J=await te(o,!0)));E&&($._f.deps&&di($._f.deps),N(y,J,H,vi))}},Ur=(p,g)=>{if(C(n.errors,g)&&p.focus)return p.focus(),1},di=async(p,g={})=>{let y,E;const $=ti(p);if(O(!0),r.resolver){const k=await se(X(p)?p:$);y=_e(k),E=p?!$.some(A=>C(k,A)):y}else p?(E=(await Promise.all($.map(async k=>{const A=C(o,k);return await te(A&&A._f?{[k]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&w()):E=y=await te(o);return h.state.next({...!Ie(p)||c.isValid&&y!==n.isValid?{}:{name:p},...r.resolver||!p?{isValid:y}:{},errors:n.errors,isValidating:!1}),g.shouldFocus&&!E&&Fr(o,Ur,p?$:l.mount),E},Os=p=>{const g={...i,...s.mount?a:{}};return X(p)?g:Ie(p)?C(g,p):p.map(y=>C(g,y))},Is=(p,g)=>({invalid:!!C((g||n).errors,p),isDirty:!!C((g||n).dirtyFields,p),isTouched:!!C((g||n).touchedFields,p),error:C((g||n).errors,p)}),lm=p=>{p&&ti(p).forEach(g=>ae(n.errors,g)),h.state.next({errors:p?n.errors:{}})},Ps=(p,g,y)=>{const E=(C(o,p,{_f:{}})._f||{}).ref;z(n.errors,p,{...g,ref:E}),h.state.next({name:p,errors:n.errors,isValid:!1}),y&&y.shouldFocus&&E&&E.focus&&E.focus()},cm=(p,g)=>Qe(p)?h.values.subscribe({next:y=>p(Q(void 0,g),y)}):Q(p,g,!0),fi=(p,g={})=>{for(const y of p?ti(p):l.mount)l.mount.delete(y),l.array.delete(y),g.keepValue||(ae(o,y),ae(a,y)),!g.keepError&&ae(n.errors,y),!g.keepDirty&&ae(n.dirtyFields,y),!g.keepTouched&&ae(n.touchedFields,y),!r.shouldUnregister&&!g.keepDefaultValue&&ae(i,y);h.values.next({values:{...a}}),h.state.next({...n,...g.keepDirty?{isDirty:F()}:{}}),!g.keepIsValid&&w()},As=({disabled:p,name:g,field:y,fields:E,value:$})=>{if(Xe(p)){const k=p?void 0:X($)?li(y?y._f:C(E,g)._f):$;z(a,g,k),q(g,k,!1,!1,!0)}},pi=(p,g={})=>{let y=C(o,p);const E=Xe(g.disabled);return z(o,p,{...y||{},_f:{...y&&y._f?y._f:{ref:{name:p}},name:p,mount:!0,...g}}),l.mount.add(p),y?As({field:y,disabled:g.disabled,name:p}):U(p,!0,g.value),{...E?{disabled:g.disabled}:{},...r.progressive?{required:!!g.required,min:Qt(g.min),max:Qt(g.max),minLength:Qt(g.minLength),maxLength:Qt(g.maxLength),pattern:Qt(g.pattern)}:{},name:p,onChange:Jt,onBlur:Jt,ref:$=>{if($){pi(p,g),y=C(o,p);const k=X($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=Sv(k),H=y._f.refs||[];if(A?H.find(J=>J===k):k===y._f.ref)return;z(o,p,{_f:{...y._f,...A?{refs:[...H.filter(ai),k,...Array.isArray(C(i,p))?[{}]:[]],ref:{type:k.type,name:p}}:{ref:k}}}),U(p,!1,void 0,k)}else y=C(o,p,{}),y._f&&(y._f.mount=!1),(r.shouldUnregister||g.shouldUnregister)&&!(mv(l.array,p)&&s.action)&&l.unMount.add(p)}}},Ts=()=>r.shouldFocusError&&Fr(o,Ur,l.mount),um=p=>{Xe(p)&&(h.state.next({disabled:p}),Fr(o,g=>{g.disabled=p},0,!1))},Ds=(p,g)=>async y=>{y&&(y.preventDefault&&y.preventDefault(),y.persist&&y.persist());let E=je(a);if(h.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await M();n.errors=$,E=k}else await te(o);ae(n.errors,"root"),_e(n.errors)?(h.state.next({errors:{}}),await p(E,y)):(g&&await g({...n.errors},y),Ts(),setTimeout(Ts)),h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:_e(n.errors),submitCount:n.submitCount+1,errors:n.errors})},dm=(p,g={})=>{C(o,p)&&(X(g.defaultValue)?ct(p,C(i,p)):(ct(p,g.defaultValue),z(i,p,g.defaultValue)),g.keepTouched||ae(n.touchedFields,p),g.keepDirty||(ae(n.dirtyFields,p),n.isDirty=g.defaultValue?F(p,C(i,p)):F()),g.keepError||(ae(n.errors,p),c.isValid&&w()),h.state.next({...n}))},Ns=(p,g={})=>{const y=p?je(p):i,E=je(y),$=p&&!_e(p)?E:i;if(g.keepDefaultValues||(i=y),!g.keepValues){if(g.keepDirtyValues||m)for(const k of l.mount)C(n.dirtyFields,k)?z($,k,C(a,k)):ct(k,C($,k));else{if(ei&&X(p))for(const k of l.mount){const A=C(o,k);if(A&&A._f){const H=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Lr(H)){const J=H.closest("form");if(J){J.reset();break}}}}o={}}a=e.shouldUnregister?g.keepDefaultValues?je(i):{}:je($),h.array.next({values:{...$}}),h.values.next({values:{...$}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!c.isValid||!!g.keepIsValid,s.watch=!!e.shouldUnregister,h.state.next({submitCount:g.keepSubmitCount?n.submitCount:0,isDirty:g.keepDirty?n.isDirty:!!(g.keepDefaultValues&&!lt(p,i)),isSubmitted:g.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:g.keepDirtyValues?n.dirtyFields:g.keepDefaultValues&&p?si(i,p):{},touchedFields:g.keepTouched?n.touchedFields:{},errors:g.keepErrors?n.errors:{},isSubmitSuccessful:g.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ms=(p,g)=>Ns(Qe(p)?p(a):p,g);return{control:{register:pi,unregister:fi,getFieldState:Is,handleSubmit:Ds,setError:Ps,_executeSchema:M,_getWatch:Q,_getDirty:F,_updateValid:w,_removeUnmounted:V,_updateFieldArray:P,_updateDisabledField:As,_getFieldArray:he,_reset:Ns,_resetDefaultValues:()=>Qe(r.defaultValues)&&r.defaultValues().then(p=>{Ms(p,r.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:p=>{n={...n,...p}},_disableForm:um,_subjects:h,_proxyFormState:c,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(p){s=p},get _defaultValues(){return i},get _names(){return l},set _names(p){l=p},get _formState(){return n},set _formState(p){n=p},get _options(){return r},set _options(p){r={...r,...p}}},trigger:di,register:pi,handleSubmit:Ds,watch:cm,setValue:ct,getValues:Os,reset:Ms,resetField:dm,clearErrors:lm,unregister:fi,setError:Ps,setFocus:(p,g={})=>{const y=C(o,p),E=y&&y._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),g.shouldSelect&&$.select())}},getFieldState:Is}}function ci(e={}){const t=xe.useRef(),r=xe.useRef(),[n,o]=xe.useState({isDirty:!1,isValidating:!1,isLoading:Qe(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Qe(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Av(e,()=>o(a=>({...a}))),formState:n});const i=t.current.control;return i._options=e,_v({subject:i._subjects.state,next:a=>{yv(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),xe.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),xe.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),xe.useEffect(()=>{e.values&&!lt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),xe.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=gv(n,i),t.current}var ks=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Tv=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?ks(i.ref,o,e):i.refs&&i.refs.forEach(function(a){return ks(a,o,e)})};for(var n in t.fields)r(n)},Dv=function(e,t){t.shouldUseNativeValidation&&Tv(e,t);var r={};for(var n in e){var o=C(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(Mv(t.names||Object.keys(e),n)){var a=Object.assign({},Nv(C(r,n)));z(a,"root",i),z(r,n,a)}else z(r,n,i)}return r},Nv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},Mv=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Fv=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(s){return s.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,a=i&&i[n.validation];r[o]=ls(o,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},ui=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(a,s){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(sr(e,n,f)):Promise.resolve(Pd(e,n,f)).then(u)}()}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(a){if(a instanceof tn)return{values:{},errors:Dv(Fv(a,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};const $s=27,Ss=12,Cs=10,Lv=Pr("enum"),jv=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return ui(Ne({checked:to(eo(Qi()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[jt(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),ro(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Rv=re(({option:e,...t},r)=>d(W,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Es=xr("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{variants:{variant:{singleOption:"justify-center",booleanLike:es}}}),Vv=({input:e,onSubmitSuccess:t})=>{var u,f;const r=e.key?(u=T.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,o=n&&e.config.options.length===2,{register:i,handleSubmit:a,formState:{errors:s}}=ci({defaultValues:{checked:n?{}:Lv(r)?Object.fromEntries(r.value.map(c=>[c,!0])):{}},resolver:jv(e.config)}),l=Jn();return o?d("ul",{style:{maxHeight:6.5*$s+5*Ss+2*Cs},class:Es({variant:"booleanLike"}),children:e.config.options.map((c,h)=>d("li",{class:"flex-1",children:d(ts,{type:"submit",ref:m=>{m&&h===0&&(l.current=m)},label:c.label,value:"true",onClick:()=>t({type:"enum",value:[c.value]})})},c.value))}):d("form",{noValidate:!0,onSubmit:c=>a(h=>{const m=h.checked;t({type:"enum",value:m})})(c),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*$s+5*Ss+2*Cs},class:Es({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((c,h)=>{const m=`checked.${c.value}`,{ref:b,...v}=i(m);return d("li",{class:"relative",children:d(Rv,{option:c,autoFocus:h===0,ref:_=>{_&&h===0&&(l.current=_),b(_)},id:m,...v,onClick:n?()=>t({type:"enum",value:[c.value]}):void 0})},c.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(Ct,{}),e.config.minSelected===0&&d(Et,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(Mr,{error:(f=s.checked)==null?void 0:f.root})})]})},Bv=Pr("number"),zr={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},zv=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return ui(Ne({number:rn(zr.number(),[Md(t,zr.min(t)),Nd(r,zr.max(r)),Td(o=>o===Number(o.toFixed(n)),zr.decimalCases(n))])}))},Uv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{number:r?Number(r):Bv(n)?n.value:void 0},resolver:zv(e.config)}),{ref:s,...l}=o("number",{required:!e.config.optional,valueAsNumber:!0}),u=L();return ve(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{c.number!==void 0&&t({type:"number",value:c.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...l,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},type:"text",min:e.config.min,max:e.config.max,class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest [type=number:-webkit-inner-spin-button] w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all [-webkit-outer-spin-button:none]",placeholder:e.config.placeholder}),e.config.optional&&d(Et,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(Ct,{})]}),d(Mr,{error:a.number})]})},Hv=({input:e,onSubmitSuccess:t})=>d("div",{class:"flex flex-col items-center py-3",children:d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})})}),Pt={empty:"Please enter some text",email:"That doesn’t look like a valid email address",phone:"That doesn’t look like a valid phone number",url:"That doesn’t look like a valid URL"},qv=Se(Pt.phone,[Fd(/^\+?[0-9 -]+$/,Pt.phone)]),Kv={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Wv=Pr("string"),Gv=e=>{const t=`Please enter no more than ${e.maxChars} characters`;return ui(Ne({text:{email:Se(Pt.email,[Dd(Pt.email),jt(e.maxChars??1/0,t)]),phone:to(qv,r=>r.replace(/[^0-9]/g,""),[jt(e.maxChars??1/0,t)]),text:Se([ro(1,Pt.empty),jt(e.maxChars??1/0,t)]),url:Se([Ld(Pt.url),jt(e.maxChars??1/0,t)])}[e.format]}))},Yv=({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=T.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:a}}=ci({defaultValues:{text:n||(Wv(r)?r.value:"")},resolver:Gv(e.config)}),{ref:s,...l}=o("text",{required:!e.config.optional}),u=L();return ve(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(c=>{t({type:"string",value:c.text})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{id:"chat-input",...l,...Kv[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),s(c)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&d(Et,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(Ct,{})]}),d(Mr,{error:a.text})]})},Zv=()=>{var o;const e=(o=T.current$.value.flow)==null?void 0:o.data.currentInput,[t,r]=qh(),n=L(null);return T.inputHeight$.value=r.height,R(()=>{const i=n.current;if(i)return i.addEventListener("transitionstart",Z.scrollToEnd.smooth),i.addEventListener("transitioncancel",Z.scrollToEnd.smooth),i.addEventListener("transitionend",Z.scrollToEnd.smooth),()=>{i.removeEventListener("transitionstart",Z.scrollToEnd.smooth),i.removeEventListener("transitioncancel",Z.scrollToEnd.smooth),i.removeEventListener("transitionend",Z.scrollToEnd.smooth)}},[]),d("div",{ref:n,class:"ease-expo-out absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-xl transition-all duration-700 will-change-[height]",style:{height:r.height},children:d("div",{ref:t,class:"border-divider flex flex-col justify-end border-t",children:Le({input:e}).with({input:ie.nullish},()=>d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),d(Ct,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},i=>d(Yv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"multiple-choice"}},i=>d(Vv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"boolean"}},i=>d(av,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"file"}},i=>d(pv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"submit"}},i=>d(Hv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"address"}},i=>d(tv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).with({input:{type:"number"}},i=>d(Uv,{onSubmitSuccess:Z.onSubmitSuccessFn$.value,...i})).exhaustive()})})},Xv=xr("max-w-[min(100%,24rem)] [text-wrap:pretty] leading-snug flex-shrink min-w-[2rem] py-2 px-3 rounded-[18px] min-h-[36px] break-words relative",{variants:{side:{left:"bg-bubble-weak-bg text-neutral-12 shadow-surface-sm outline outline-1 outline-bubble-weak rounded-bl-md",right:"ml-auto bg-accent-9 text-white rounded-br-md shadow-surface-sm shadow-bubble-strong-shadow"},animate:{true:"animate-bubble-in",false:""}},defaultVariants:{side:"left"}}),Qv=({children:e,className:t,animate:r,side:n,...o})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Xv({className:t,side:n,animate:r}),...o,children:e}),Jv=({message:e})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),em=({className:e,...t})=>(R(()=>{Z.scrollToEnd.smooth()}),d("div",{"aria-hidden":!0,children:Z.isBotTyping$.value===!0?d("div",{"aria-label":"Typing…",class:it("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),tm={bot:"left",user:"right"},rm=xr("w-full select-none py-2 text-wrap-balance text-center text-[10px] uppercase tracking-widest drop-shadow-[0_1.5px_var(--i-color-n-1)]",{variants:{variant:{info:"text-neutral-8",warning:"text-[#FFC107]",error:"text-error-9",success:"text-[#4CAF50]"}}}),nm=({lastSentMessageFooter:e})=>{var r;const t=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return R(()=>{Z.scrollToEnd.smooth()},[t.length]),d("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>d(W,{children:d("li",{class:"flex",children:Le(n).with({type:"system"},i=>d("p",{class:rm({variant:i.variant}),children:i.text})).with({type:"text",author:ie.union("bot","user")},i=>{const a=i.author==="user"&&!t.slice(o+1).some(l=>l.type==="text"&&l.author==="user"),s=o===t.length-1;return d(Qv,{animate:s,side:tm[i.author],children:[i.text,a?e:null]},o)}).with({type:"link"},i=>d(Jv,{message:i})).with({type:"image"},i=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>d(uv,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()})},o)),d(em,{},"typing")]})},im=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=T.current$.value;ke(n,"Flow is required to exist to show chatbot body");const o=T.viewState$.value,{chatRef:i,chatService:a}=Xh(),[s,l]=G();return ve(()=>{o==="maximised"&&Z.scrollToEnd.instant()},[o]),ve(()=>{var v,_;const{state:u,flow:f}=T.current$.peek();if(u!=="loaded")throw new Error(mh.invalid_state);let c=f.data.nodeHistory.at(-1);if(Z.scrollToEnd.instant(),T.setInput(void 0),f.data.isFinished)return;c===void 0?(c=Fa(n.nodes).id,T.setCurrentNodeId(c),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:f.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):T.removeMessagesSentByNodeIds([c]);const{interpret:h,abort:m,undo:b}=Ph({context:n.context,analytics:{service:r,customProperties:(_=n.analytics)==null?void 0:_.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=T.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,w)=>{var P;const O=T.current$.peek().flow;ke(O),w&&(O.data.sequence=O.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:w.id,flow_build:n.build,to_node_id:x.id,sequence:O.data.sequence,flow_session_id:O.data.flowSessionId,job:n.job},customProperties:(P=n.analytics)==null?void 0:P.customProperties})),T.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var w;T.markAsFinished();const x=T.current$.peek().flow;ke(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(w=n.analytics)==null?void 0:w.customProperties})}});return l(()=>b),h(c),m},[r,t,a,e,n]),d(W,{children:[d("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:T.inputHeight$.value},children:d(nm,{lastSentMessageFooter:n.data.isFinished||!s?null:d(am,{undoFn:s})})}),d(Zv,{})]})},om=e=>"key"in e.data&&e.data.key?[e.data.key]:"keys"in e.data?Object.values(e.data.keys).filter(t=>typeof t=="string"):[],am=({undoFn:e})=>d("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:d("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=T.current$.peek();ke(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(T.removeMessagesSentByNodeIds(n),T.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(om).forEach(o=>delete t.data.submissions[o]),T.current$.value={...T.current$.value})},children:"Undo"})}),sm=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:im},Symbol.toStringTag,{value:"Module"}))})();
@@ -1,4 +1,4 @@
1
- import { g as get$1, i as isString$1, k as kbToReadableSize, a as getHeadOrThrow, b as invariant, A as AbortedError, N, c as getFlowSubmissionsPayload, _, d as getDefaultExportFromCjs, h, e as _$1, p, F, o as o$1, f as clsx, y, s as store, j as a$2, l as debounce$1, m as k, n as k$1, q as getFormSubmitter, r as parse, t as picklist, u as isSubmissionOfType, C as Cn, v as parseAsync, V as ValiError, w as object, x as transform, z as cva, B as maxLength, D as minLength, E as record, G as boolean, H as number, I as minValue, J as maxValue, K as custom, L as string, M as email, O as url, P as regex, Q as ERROR_MESSAGES } from "./index-5b559a08.js";
1
+ import { g as get$1, i as isString$1, k as kbToReadableSize, a as getHeadOrThrow, b as invariant, A as AbortedError, N, c as getFlowSubmissionsPayload, _, d as getDefaultExportFromCjs, h, e as _$1, p, F, o as o$1, f as clsx, y, s as store, j as a$2, l as debounce$1, m as k, n as k$1, q as getFormSubmitter, r as parse, t as picklist, u as isSubmissionOfType, C as Cn, v as parseAsync, V as ValiError, w as object, x as transform, z as cva, B as maxLength, D as minLength, E as record, G as boolean, H as number, I as minValue, J as maxValue, K as custom, L as string, M as email, O as url, P as regex, Q as ERROR_MESSAGES } from "./index-b086bc88.js";
2
2
  import "@inploi/sdk";
3
3
  const isIfBlockConditionMet = (ifBlock, {
4
4
  context,
@@ -414,7 +414,6 @@ async function interpretSubmitNode({
414
414
  logger,
415
415
  apiClient,
416
416
  submissions,
417
- context,
418
417
  analytics,
419
418
  flow
420
419
  }) {
@@ -444,7 +443,7 @@ async function interpretSubmitNode({
444
443
  integration_id: node.data.integrationId,
445
444
  anonymous_id,
446
445
  session_id,
447
- ...context,
446
+ job: flow.job,
448
447
  submissions: getFlowSubmissionsPayload(submissions || {})
449
448
  })
450
449
  }).catch((e) => e);
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-fa87308a.cjs");
3
+ const index = require("./index-2748d0ca.cjs");
4
4
  require("@inploi/sdk");
5
5
  const isIfBlockConditionMet = (ifBlock, {
6
6
  context,
@@ -416,7 +416,6 @@ async function interpretSubmitNode({
416
416
  logger,
417
417
  apiClient,
418
418
  submissions,
419
- context,
420
419
  analytics,
421
420
  flow
422
421
  }) {
@@ -446,7 +445,7 @@ async function interpretSubmitNode({
446
445
  integration_id: node.data.integrationId,
447
446
  anonymous_id,
448
447
  session_id,
449
- ...context,
448
+ job: flow.job,
450
449
  submissions: index.getFlowSubmissionsPayload(submissions || {})
451
450
  })
452
451
  }).catch((e) => e);
package/dist/chatbot.d.ts CHANGED
@@ -40,7 +40,8 @@ export declare const chatbotPlugin: ({ _internal_domManager: dom, theme, }: {
40
40
  /** @deprecated For internal usage only */
41
41
  _internal_domManager?: ChatbotDomManager;
42
42
  }) => ({ apiClient, logger, analytics }: {
43
- apiClient: import("@inploi/sdk").ApiClient; /** Optionally eagerly renders the interface ahead of needing the chatbot. */
43
+ /** Optionally eagerly renders the interface ahead of needing the chatbot. */
44
+ apiClient: import("@inploi/sdk").ApiClient;
44
45
  logger: Logger;
45
46
  analytics: import("@inploi/sdk").AnalyticsService;
46
47
  }) => {
@@ -5315,7 +5315,7 @@ const StatusBar = ({
5315
5315
  })
5316
5316
  });
5317
5317
  };
5318
- const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-36cdbd00.cjs")).then((module2) => module2.ChatbotBody));
5318
+ const ChatbotBody = M(() => Promise.resolve().then(() => require("./chatbot-body-f736e128.cjs")).then((module2) => module2.ChatbotBody));
5319
5319
  const chatbotContentClass = cva("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none", {
5320
5320
  variants: {
5321
5321
  view: {
@@ -5314,7 +5314,7 @@ const StatusBar = ({
5314
5314
  })
5315
5315
  });
5316
5316
  };
5317
- const ChatbotBody = M(() => import("./chatbot-body-91e04292.js").then((module) => module.ChatbotBody));
5317
+ const ChatbotBody = M(() => import("./chatbot-body-234455b9.js").then((module) => module.ChatbotBody));
5318
5318
  const chatbotContentClass = cva("selection:bg-accent-4 selection:text-accent-12 fixed bottom-2 left-2 right-2 isolate mx-auto max-h-full max-w-[450px] focus:outline-none", {
5319
5319
  variants: {
5320
5320
  view: {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./index-fa87308a.cjs");
3
+ const index = require("./index-2748d0ca.cjs");
4
4
  require("@inploi/sdk");
5
5
  exports.chatbotPlugin = index.chatbotPlugin;
@@ -1,4 +1,4 @@
1
- import { R } from "./index-5b559a08.js";
1
+ import { R } from "./index-b086bc88.js";
2
2
  import "@inploi/sdk";
3
3
  export {
4
4
  R as chatbotPlugin
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inploi/plugin-chatbot",
3
- "version": "3.23.1",
3
+ "version": "3.23.2",
4
4
  "type": "module",
5
5
  "main": "dist/plugin-chatbot.js",
6
6
  "types": "dist/index.d.ts",
@@ -68,7 +68,7 @@
68
68
  "vite-tsconfig-paths": "^4.2.1",
69
69
  "@inploi/core": "1.14.2",
70
70
  "@inploi/design-tokens": "0.2.1",
71
- "@inploi/sdk": "1.14.3",
71
+ "@inploi/sdk": "1.14.4",
72
72
  "eslint-config-custom": "0.1.0",
73
73
  "tsconfig": "0.1.0"
74
74
  },