@inploi/plugin-chatbot 3.31.0 → 4.0.1
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 +3 -3
- package/cdn/style.css +1 -1
- package/dist/{chatbot-body-868d9eb5.cjs → chatbot-body-1f8351bb.cjs} +1 -1
- package/dist/{chatbot-body-4ab97abe.js → chatbot-body-5aef126c.js} +1 -1
- package/dist/chatbot.api.d.ts +2 -2
- package/dist/chatbot.constants.d.ts +2 -1
- package/dist/chatbot.d.ts +22 -14
- package/dist/chatbot.dom.d.ts +1 -1
- package/dist/chatbot.utils.d.ts +1 -1
- package/dist/components/chatbot.d.ts +3 -3
- package/dist/components/status-bar.d.ts +3 -1
- package/dist/i18n.d.ts +271 -0
- package/dist/index-4d7a0e94.cjs +5 -0
- package/dist/index-b245b94e.js +3514 -0
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +8 -6
- package/dist/index-6e255b16.js +0 -3492
- package/dist/index-c8cb326f.cjs +0 -5
package/cdn/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var _p=Object.defineProperty;var yp=(We,ve,Te)=>ve in We?_p(We,ve,{enumerable:!0,configurable:!0,writable:!0,value:Te}):We[ve]=Te;var ko=(We,ve,Te)=>(yp(We,typeof ve!="symbol"?ve+"":ve,Te),Te);(function(){"use strict";var We=e=>e,ve=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Te(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var So=Array.isArray,Sr=So,Co=typeof ve=="object"&&ve&&ve.Object===Object&&ve,$o=Co,Eo=$o,Io=typeof self=="object"&&self&&self.Object===Object&&self,To=Eo||Io||Function("return this")(),Cr=To,Ao=Cr,Mo=Ao.Symbol,$r=Mo,Mn=$r,Nn=Object.prototype,No=Nn.hasOwnProperty,Po=Nn.toString,_t=Mn?Mn.toStringTag:void 0;function Oo(e){var t=No.call(e,_t),r=e[_t];try{e[_t]=void 0;var n=!0}catch{}var i=Po.call(e);return n&&(t?e[_t]=r:delete e[_t]),i}var Fo=Oo,Lo=Object.prototype,Do=Lo.toString;function Vo(e){return Do.call(e)}var jo=Vo,Pn=$r,zo=Fo,Ro=jo,Bo="[object Null]",Uo="[object Undefined]",On=Pn?Pn.toStringTag:void 0;function Ho(e){return e==null?e===void 0?Uo:Bo:On&&On in Object(e)?zo(e):Ro(e)}var Fn=Ho;function qo(e){return e!=null&&typeof e=="object"}var Ko=qo,Go=Fn,Wo=Ko,Yo="[object Symbol]";function Jo(e){return typeof e=="symbol"||Wo(e)&&Go(e)==Yo}var Er=Jo,Zo=Sr,Xo=Er,Qo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,es=/^\w*$/;function ts(e,t){if(Zo(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Xo(e)?!0:es.test(e)||!Qo.test(e)||t!=null&&e in Object(t)}var rs=ts;function ns(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ln=ns,is=Fn,as=Ln,os="[object AsyncFunction]",ss="[object Function]",ls="[object GeneratorFunction]",cs="[object Proxy]";function us(e){if(!as(e))return!1;var t=is(e);return t==ss||t==ls||t==os||t==cs}var ds=us,fs=Cr,hs=fs["__core-js_shared__"],ps=hs,Ir=ps,Dn=function(){var e=/[^.]+$/.exec(Ir&&Ir.keys&&Ir.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function vs(e){return!!Dn&&Dn in e}var ms=vs,gs=Function.prototype,bs=gs.toString;function _s(e){if(e!=null){try{return bs.call(e)}catch{}try{return e+""}catch{}}return""}var ys=_s,ws=ds,xs=ms,ks=Ln,Ss=ys,Cs=/[\\^$.*+?()[\]{}|]/g,$s=/^\[object .+?Constructor\]$/,Es=Function.prototype,Is=Object.prototype,Ts=Es.toString,As=Is.hasOwnProperty,Ms=RegExp("^"+Ts.call(As).replace(Cs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ns(e){if(!ks(e)||xs(e))return!1;var t=ws(e)?Ms:$s;return t.test(Ss(e))}var Ps=Ns;function Os(e,t){return e==null?void 0:e[t]}var Fs=Os,Ls=Ps,Ds=Fs;function Vs(e,t){var r=Ds(e,t);return Ls(r)?r:void 0}var Vn=Vs,js=Vn,zs=js(Object,"create"),Ut=zs,jn=Ut;function Rs(){this.__data__=jn?jn(null):{},this.size=0}var Bs=Rs;function Us(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Hs=Us,qs=Ut,Ks="__lodash_hash_undefined__",Gs=Object.prototype,Ws=Gs.hasOwnProperty;function Ys(e){var t=this.__data__;if(qs){var r=t[e];return r===Ks?void 0:r}return Ws.call(t,e)?t[e]:void 0}var Js=Ys,Zs=Ut,Xs=Object.prototype,Qs=Xs.hasOwnProperty;function el(e){var t=this.__data__;return Zs?t[e]!==void 0:Qs.call(t,e)}var tl=el,rl=Ut,nl="__lodash_hash_undefined__";function il(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=rl&&t===void 0?nl:t,this}var al=il,ol=Bs,sl=Hs,ll=Js,cl=tl,ul=al;function at(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])}}at.prototype.clear=ol,at.prototype.delete=sl,at.prototype.get=ll,at.prototype.has=cl,at.prototype.set=ul;var dl=at;function fl(){this.__data__=[],this.size=0}var hl=fl;function pl(e,t){return e===t||e!==e&&t!==t}var vl=pl,ml=vl;function gl(e,t){for(var r=e.length;r--;)if(ml(e[r][0],t))return r;return-1}var Ht=gl,bl=Ht,_l=Array.prototype,yl=_l.splice;function wl(e){var t=this.__data__,r=bl(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():yl.call(t,r,1),--this.size,!0}var xl=wl,kl=Ht;function Sl(e){var t=this.__data__,r=kl(t,e);return r<0?void 0:t[r][1]}var Cl=Sl,$l=Ht;function El(e){return $l(this.__data__,e)>-1}var Il=El,Tl=Ht;function Al(e,t){var r=this.__data__,n=Tl(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Ml=Al,Nl=hl,Pl=xl,Ol=Cl,Fl=Il,Ll=Ml;function ot(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])}}ot.prototype.clear=Nl,ot.prototype.delete=Pl,ot.prototype.get=Ol,ot.prototype.has=Fl,ot.prototype.set=Ll;var Dl=ot,Vl=Vn,jl=Cr,zl=Vl(jl,"Map"),Rl=zl,zn=dl,Bl=Dl,Ul=Rl;function Hl(){this.size=0,this.__data__={hash:new zn,map:new(Ul||Bl),string:new zn}}var ql=Hl;function Kl(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Gl=Kl,Wl=Gl;function Yl(e,t){var r=e.__data__;return Wl(t)?r[typeof t=="string"?"string":"hash"]:r.map}var qt=Yl,Jl=qt;function Zl(e){var t=Jl(this,e).delete(e);return this.size-=t?1:0,t}var Xl=Zl,Ql=qt;function ec(e){return Ql(this,e).get(e)}var tc=ec,rc=qt;function nc(e){return rc(this,e).has(e)}var ic=nc,ac=qt;function oc(e,t){var r=ac(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var sc=oc,lc=ql,cc=Xl,uc=tc,dc=ic,fc=sc;function st(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])}}st.prototype.clear=lc,st.prototype.delete=cc,st.prototype.get=uc,st.prototype.has=dc,st.prototype.set=fc;var hc=st,Rn=hc,pc="Expected a function";function Tr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(pc);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(Tr.Cache||Rn),r}Tr.Cache=Rn;var vc=Tr,mc=vc,gc=500;function bc(e){var t=mc(e,function(n){return r.size===gc&&r.clear(),n}),r=t.cache;return t}var _c=bc,yc=_c,wc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,xc=/\\(\\)?/g,kc=yc(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(wc,function(r,n,i,a){t.push(i?a.replace(xc,"$1"):n||r)}),t}),Sc=kc;function Cc(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var $c=Cc,Bn=$r,Ec=$c,Ic=Sr,Tc=Er,Ac=1/0,Un=Bn?Bn.prototype:void 0,Hn=Un?Un.toString:void 0;function qn(e){if(typeof e=="string")return e;if(Ic(e))return Ec(e,qn)+"";if(Tc(e))return Hn?Hn.call(e):"";var t=e+"";return t=="0"&&1/e==-Ac?"-0":t}var Mc=qn,Nc=Mc;function Pc(e){return e==null?"":Nc(e)}var Oc=Pc,Fc=Sr,Lc=rs,Dc=Sc,Vc=Oc;function jc(e,t){return Fc(e)?e:Lc(e,t)?[e]:Dc(Vc(e))}var zc=jc,Rc=Er,Bc=1/0;function Uc(e){if(typeof e=="string"||Rc(e))return e;var t=e+"";return t=="0"&&1/e==-Bc?"-0":t}var Hc=Uc,qc=zc,Kc=Hc;function Gc(e,t){t=qc(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Kc(t[r++])];return r&&r==n?e:void 0}var Wc=Gc,Yc=Wc;function Jc(e,t,r){var n=e==null?void 0:Yc(e,t);return n===void 0?r:n}var Zc=Jc;const yt=Te(Zc);var wt,C,Kn,Gn,Ye,Wn,Yn,Ar,Jn,lt={},Zn=[],Xc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Kt=Array.isArray;function Ae(e,t){for(var r in t)e[r]=t[r];return e}function Xn(e){var t=e.parentNode;t&&t.removeChild(e)}function ce(e,t,r){var n,i,a,o={};for(a in t)a=="key"?n=t[a]:a=="ref"?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?wt.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return xt(e,o,n,i,null)}function xt(e,t,r,n,i){var a={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:i??++Kn};return i==null&&C.vnode!=null&&C.vnode(a),a}function Qc(){return{current:null}}function W(e){return e.children}function _e(e,t){this.props=e,this.context=t}function Gt(e,t){if(t==null)return e.__?Gt(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"?Gt(e):null}function Qn(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 Qn(e)}}function Mr(e){(!e.__d&&(e.__d=!0)&&Ye.push(e)&&!Wt.__r++||Wn!==C.debounceRendering)&&((Wn=C.debounceRendering)||Yn)(Wt)}function Wt(){var e,t,r,n,i,a,o,s,l;for(Ye.sort(Ar);e=Ye.shift();)e.__d&&(t=Ye.length,n=void 0,i=void 0,a=void 0,s=(o=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(a=Ae({},o)).__v=o.__v+1,Nr(l,o,a,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,n,s??Gt(o),o.__h,i),oi(n,o,i),o.__e!=s&&Qn(o)),Ye.length>t&&Ye.sort(Ar));Wt.__r=0}function ei(e,t,r,n,i,a,o,s,l,u,h){var d,p,g,v,y,k,x,_,M,F,N=0,H=n&&n.__k||Zn,te=H.length,pe=te,D=t.length;for(r.__k=[],d=0;d<D;d++)(v=r.__k[d]=(v=t[d])==null||typeof v=="boolean"||typeof v=="function"?null:typeof v=="string"||typeof v=="number"||typeof v=="bigint"?xt(null,v,null,null,v):Kt(v)?xt(W,{children:v},null,null,null):v.__b>0?xt(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):v)!=null&&(v.__=r,v.__b=r.__b+1,(_=eu(v,H,x=d+N,pe))===-1?g=lt:(g=H[_]||lt,H[_]=void 0,pe--),Nr(e,v,g,i,a,o,s,l,u,h),y=v.__e,(p=v.ref)&&g.ref!=p&&(g.ref&&Pr(g.ref,null,v),h.push(p,v.__c||y,v)),y!=null&&(k==null&&(k=y),F=!(M=g===lt||g.__v===null)&&_===x,M?_==-1&&N--:_!==x&&(_===x+1?(N++,F=!0):_>x?pe>D-x?(N+=_-x,F=!0):N--:N=_<x&&_==x-1?_-x:0),x=d+N,F=F||_==d&&!M,typeof v.type!="function"||_===x&&g.__k!==v.__k?typeof v.type=="function"||F?v.__d!==void 0?(l=v.__d,v.__d=void 0):l=y.nextSibling:l=ri(e,y,l):l=ti(v,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=k,d=te;d--;)H[d]!=null&&(typeof r.type=="function"&&H[d].__e!=null&&H[d].__e==r.__d&&(r.__d=H[d].__e.nextSibling),si(H[d],H[d]))}function ti(e,t,r){for(var n,i=e.__k,a=0;i&&a<i.length;a++)(n=i[a])&&(n.__=e,t=typeof n.type=="function"?ti(n,t,r):ri(r,n.__e,t));return t}function Me(e,t){return t=t||[],e==null||typeof e=="boolean"||(Kt(e)?e.some(function(r){Me(r,t)}):t.push(e)),t}function ri(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 eu(e,t,r,n){var i=e.key,a=e.type,o=r-1,s=r+1,l=t[r];if(l===null||l&&i==l.key&&a===l.type)return r;if(n>(l!=null?1:0))for(;o>=0||s<t.length;){if(o>=0){if((l=t[o])&&i==l.key&&a===l.type)return o;o--}if(s<t.length){if((l=t[s])&&i==l.key&&a===l.type)return s;s++}}return-1}function tu(e,t,r,n,i){var a;for(a in r)a==="children"||a==="key"||a in t||Yt(e,a,null,r[a],n);for(a in t)i&&typeof t[a]!="function"||a==="children"||a==="key"||a==="value"||a==="checked"||r[a]===t[a]||Yt(e,a,t[a],r[a],n)}function ni(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Xc.test(t)?r:r+"px"}function Yt(e,t,r,n,i){var a;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||ni(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||ni(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")a=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+a]=r,r?n||e.addEventListener(t,a?ai:ii,a):e.removeEventListener(t,a?ai:ii,a);else if(t!=="dangerouslySetInnerHTML"){if(i)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 ii(e){return this.l[e.type+!1](C.event?C.event(e):e)}function ai(e){return this.l[e.type+!0](C.event?C.event(e):e)}function Nr(e,t,r,n,i,a,o,s,l,u){var h,d,p,g,v,y,k,x,_,M,F,N,H,te,pe,D=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=t.__e=r.__e,t.__h=null,a=[s]),(h=C.__b)&&h(t);try{e:if(typeof D=="function"){if(x=t.props,_=(h=D.contextType)&&n[h.__c],M=h?_?_.props.value:h.__:n,r.__c?k=(d=t.__c=r.__c).__=d.__E:("prototype"in D&&D.prototype.render?t.__c=d=new D(x,M):(t.__c=d=new _e(x,M),d.constructor=D,d.render=nu),_&&_.sub(d),d.props=x,d.state||(d.state={}),d.context=M,d.__n=n,p=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),D.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=Ae({},d.__s)),Ae(d.__s,D.getDerivedStateFromProps(x,d.__s))),g=d.props,v=d.state,d.__v=t,p)D.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(D.getDerivedStateFromProps==null&&x!==g&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(x,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(x,d.__s,M)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(d.props=x,d.state=d.__s,d.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(se){se&&(se.__=t)}),F=0;F<d._sb.length;F++)d.__h.push(d._sb[F]);d._sb=[],d.__h.length&&o.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(x,d.__s,M),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(g,v,y)})}if(d.context=M,d.props=x,d.__P=e,d.__e=!1,N=C.__r,H=0,"prototype"in D&&D.prototype.render){for(d.state=d.__s,d.__d=!1,N&&N(t),h=d.render(d.props,d.state,d.context),te=0;te<d._sb.length;te++)d.__h.push(d._sb[te]);d._sb=[]}else do d.__d=!1,N&&N(t),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++H<25);d.state=d.__s,d.getChildContext!=null&&(n=Ae(Ae({},n),d.getChildContext())),p||d.getSnapshotBeforeUpdate==null||(y=d.getSnapshotBeforeUpdate(g,v)),ei(e,Kt(pe=h!=null&&h.type===W&&h.key==null?h.props.children:h)?pe:[pe],t,r,n,i,a,o,s,l,u),d.base=t.__e,t.__h=null,d.__h.length&&o.push(d),k&&(d.__E=d.__=null)}else a==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=ru(r.__e,t,r,n,i,a,o,l,u);(h=C.diffed)&&h(t)}catch(se){t.__v=null,(l||a!=null)&&(t.__e=s,t.__h=!!l,a[a.indexOf(s)]=null),C.__e(se,t,r)}}function oi(e,t,r){for(var n=0;n<r.length;n++)Pr(r[n],r[++n],r[++n]);C.__c&&C.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(a){a.call(i)})}catch(a){C.__e(a,i.__v)}})}function ru(e,t,r,n,i,a,o,s,l){var u,h,d,p=r.props,g=t.props,v=t.type,y=0;if(v==="svg"&&(i=!0),a!=null){for(;y<a.length;y++)if((u=a[y])&&"setAttribute"in u==!!v&&(v?u.localName===v:u.nodeType===3)){e=u,a[y]=null;break}}if(e==null){if(v===null)return document.createTextNode(g);e=i?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,g.is&&g),a=null,s=!1}if(v===null)p===g||s&&e.data===g||(e.data=g);else{if(a=a&&wt.call(e.childNodes),h=(p=r.props||lt).dangerouslySetInnerHTML,d=g.dangerouslySetInnerHTML,!s){if(a!=null)for(p={},y=0;y<e.attributes.length;y++)p[e.attributes[y].name]=e.attributes[y].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(tu(e,g,p,i,s),d)t.__k=[];else if(ei(e,Kt(y=t.props.children)?y:[y],t,r,n,i&&v!=="foreignObject",a,o,a?a[0]:r.__k&&Gt(r,0),s,l),a!=null)for(y=a.length;y--;)a[y]!=null&&Xn(a[y]);s||("value"in g&&(y=g.value)!==void 0&&(y!==e.value||v==="progress"&&!y||v==="option"&&y!==p.value)&&Yt(e,"value",y,p.value,!1),"checked"in g&&(y=g.checked)!==void 0&&y!==e.checked&&Yt(e,"checked",y,p.checked,!1))}return e}function Pr(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){C.__e(n,r)}}function si(e,t,r){var n,i;if(C.unmount&&C.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Pr(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(a){C.__e(a,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&si(n[i],t,r||typeof e.type!="function");r||e.__e==null||Xn(e.__e),e.__=e.__e=e.__d=void 0}function nu(e,t,r){return this.constructor(e,r)}function ct(e,t,r){var n,i,a,o;C.__&&C.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,a=[],o=[],Nr(t,e=(!n&&r||t).__k=ce(W,null,[e]),i||lt,lt,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?wt.call(t.childNodes):null,a,!n&&r?r:i?i.__e:t.firstChild,n,o),oi(a,e,o)}function li(e,t){ct(e,t,li)}function iu(e,t,r){var n,i,a,o,s=Ae({},e.props);for(a in e.type&&e.type.defaultProps&&(o=e.type.defaultProps),t)a=="key"?n=t[a]:a=="ref"?i=t[a]:s[a]=t[a]===void 0&&o!==void 0?o[a]:t[a];return arguments.length>2&&(s.children=arguments.length>3?wt.call(arguments,2):r),xt(e.type,s,n||e.key,i||e.ref,null)}function ci(e,t){var r={__c:t="__cC"+Jn++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,a;return this.getChildContext||(i=[],(a={})[t]=this,this.getChildContext=function(){return a},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Mr(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}wt=Zn.slice,C={__e:function(e,t,r,n){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),o=i.__d),o)return i.__E=i}catch(s){e=s}throw e}},Kn=0,Gn=function(e){return e!=null&&e.constructor===void 0},_e.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),Mr(this))},_e.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Mr(this))},_e.prototype.render=W,Ye=[],Yn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(e,t){return e.__v.__b-t.__v.__b},Wt.__r=0,Jn=0;var Jt=class extends Error{constructor(t){super(t[0].message);ko(this,"issues");this.name="ValiError",this.issues=t}};function ui(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function kt(e){return{issues:e}}function re(e){return{output:e}}function au(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 ou(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 De(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return re(e);let i,a,o=e;for(const s of t){const l=s._parse(o);if(l.issues){i=i||ou(r,n);for(const u of l.issues){const h=au(i,u);a?a.push(h):a=[h]}if(i.abortEarly||i.abortPipeEarly)break}else o=l.output}return a?kt(a):re(o)}function Ve(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function di(e){return typeof e=="function"?e():e}function je(e,t,r,n){return kt([{validation:e,message:di(t),input:r,requirement:n}])}function fi(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[a,o]=Ve(t,r);return[e,a,o]}const[n,i]=Ve(e,t);return[void 0,n,i]}function Ne(e,t,r,n,i,a){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:di(n),input:i,issues:a,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function hi(e){return typeof e.default=="function"?e.default():e.default}function su(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return De(t,this.pipe,r,"any")}}}function pi(e,t,r){const[n="Invalid type",i]=Ve(t,r);return{type:"array",async:!1,item:e,message:n,pipe:i,_parse(a,o){if(!Array.isArray(a))return Ne(o,"type","array",this.message,a);let s;const l=[];for(let u=0;u<a.length;u++){const h=a[u],d=this.item._parse(h,o);if(d.issues){const p={type:"array",input:a,key:u,value:h};for(const g of d.issues)g.path?g.path.unshift(p):g.path=[p],s==null||s.push(g);if(s||(s=d.issues),o!=null&&o.abortEarly)break}else l.push(d.output)}return s?kt(s):De(l,this.pipe,o,"array")}}}function vi(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(i,a){return typeof i!="boolean"?Ne(a,"type","boolean",this.message,i):De(i,this.pipe,a,"boolean")}}}function mi(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?Ne(n,"type","literal",this.message,r):re(r)}}}function lu(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const i=hi(this);if(i===void 0)return re(r);r=i}return this.wrapped._parse(r,n)}}}function Or(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(i,a){return typeof i!="number"||isNaN(i)?Ne(a,"type","number",this.message,i):De(i,this.pipe,a,"number")}}}function ne(e,t,r,n){const[i,a="Invalid type",o]=fi(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:i,message:a,pipe:o,_parse(l,u){if(!l||typeof l!="object")return Ne(u,"type","object",this.message,l);s=s||Object.entries(this.entries);let h;const d={};for(const[p,g]of s){const v=l[p],y=g._parse(v,u);if(y.issues){const k={type:"object",input:l,key:p,value:v};for(const x of y.issues)x.path?x.path.unshift(k):x.path=[k],h==null||h.push(x);if(h||(h=y.issues),u!=null&&u.abortEarly)break}else(y.output!==void 0||p in l)&&(d[p]=y.output)}if(this.rest&&!(u!=null&&u.abortEarly&&h)){for(const p in l)if(!(p in this.entries)){const g=l[p],v=this.rest._parse(g,u);if(v.issues){const y={type:"object",input:l,key:p,value:g};for(const k of v.issues)k.path?k.path.unshift(y):k.path=[y],h==null||h.push(k);if(h||(h=v.issues),u!=null&&u.abortEarly)break}else d[p]=v.output}}return h?kt(h):De(d,this.pipe,u,"object")}}}function St(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const i=hi(this);if(i===void 0)return re(r);r=i}return this.wrapped._parse(r,n)}}}function cu(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?re(r):Ne(n,"type","picklist",this.message,r)}}}function X(e,t){const[r="Invalid type",n]=Ve(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(i,a){return typeof i!="string"?Ne(a,"type","string",this.message,i):De(i,this.pipe,a,"string")}}}function uu(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[o,s]=Ve(r,n);return[e,t,o,s]}const[i,a]=Ve(t,r);return[X(),e,i,a]}var du=["__proto__","prototype","constructor"];function gi(e,t,r,n){const[i,a,o="Invalid type",s]=uu(e,t,r,n);return{type:"record",async:!1,key:i,value:a,message:o,pipe:s,_parse(l,u){if(!l||typeof l!="object")return Ne(u,"type","record",this.message,l);let h;const d={};for(const[p,g]of Object.entries(l))if(!du.includes(p)){let v;const y=this.key._parse(p,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(y.issues){v={type:"record",input:l,key:p,value:g};for(const x of y.issues)x.path=[v],h==null||h.push(x);if(h||(h=y.issues),u!=null&&u.abortEarly)break}const k=this.value._parse(g,u);if(k.issues){v=v||{type:"record",input:l,key:p,value:g};for(const x of k.issues)x.path?x.path.unshift(v):x.path=[v],h==null||h.push(x);if(h||(h=k.issues),u!=null&&u.abortEarly)break}!y.issues&&!k.issues&&(d[y.output]=k.output)}return h?kt(h):De(d,this.pipe,u,"record")}}}function fu(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let i,a;for(const o of this.options){const s=o._parse(r,n);if(s.issues)if(i)for(const l of s.issues)i.push(l);else i=s.issues;else{a=[s.output];break}}return a?re(a[0]):Ne(n,"type","union",this.message,r,i)}}}function Zt(e,t,r){const n=e._parse(t,r);if(n.issues)throw new Jt(n.issues);return n.output}async function hu(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new Jt(n.issues);return n.output}function pu(e,t,r,n){const[i,a,o]=fi(t,r,n);return ne(Object.entries(e.entries).reduce((s,[l,u])=>({...s,[l]:St(u)}),{}),i,a,o)}function vu(e,t,r){const n=e._parse(t,r);return n.issues?{success:!1,error:new Jt(n.issues),issues:n.issues}:{success:!0,data:n.output,output:n.output}}function bi(e,t,r){return{...e,_parse(n,i){const a=e._parse(n,i);if(a.issues)return a;const o=t(a.output);return r&&!Array.isArray(r)?r._parse(o,i):De(o,r,i,typeof o)}}}var mu=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function gu(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?re(r):je(this.type,this.message,r,this.requirement)}}}function bu(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:mu,_parse(t){return this.requirement.test(t)?re(t):je(this.type,this.message,t,this.requirement)}}}function Xt(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?je(this.type,this.message,r,this.requirement):re(r)}}}function _u(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?je(this.type,this.message,r,this.requirement):re(r)}}}function Qt(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?je(this.type,this.message,r,this.requirement):re(r)}}}function yu(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?je(this.type,this.message,r,this.requirement):re(r)}}}function _i(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?re(r):je(this.type,this.message,r,this.requirement)}}}function wu(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)?re(t):je(this.type,this.message,t,this.requirement)}}}function yi(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=yi(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function Je(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=yi(e))&&(n&&(n+=" "),n+=t);return n}const wi=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,xi=Je,Ct=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return xi(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:a}=t,o=Object.keys(i).map(u=>{const h=r==null?void 0:r[u],d=a==null?void 0:a[u];if(h===null)return null;const p=wi(h)||wi(d);return i[u][p]}),s=r&&Object.entries(r).reduce((u,h)=>{let[d,p]=h;return p===void 0||(u[d]=p),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,h)=>{let{class:d,className:p,...g}=h;return Object.entries(g).every(v=>{let[y,k]=v;return Array.isArray(k)?k.includes({...a,...s}[y]):{...a,...s}[y]===k})?[...u,d,p]:u},[]);return xi(e,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var ze,z,Fr,ki,ut=0,Si=[],er=[],Ci=C.__b,$i=C.__r,Ei=C.diffed,Ii=C.__c,Ti=C.unmount;function dt(e,t){C.__h&&C.__h(z,e,ut||t),ut=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:er}),r.__[e]}function me(e){return ut=1,Ai(Pi,e)}function Ai(e,t,r){var n=dt(ze++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):Pi(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=z,!z.u)){var i=function(s,l,u){if(!n.__c.__H)return!0;var h=n.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!a||a.call(this,s,l,u);var d=!1;return h.forEach(function(p){if(p.__N){var g=p.__[0];p.__=p.__N,p.__N=void 0,g!==p.__[0]&&(d=!0)}}),!(!d&&n.__c.props===s)&&(!a||a.call(this,s,l,u))};z.u=!0;var a=z.shouldComponentUpdate,o=z.componentWillUpdate;z.componentWillUpdate=function(s,l,u){if(this.__e){var h=a;a=void 0,i(s,l,u),a=h}o&&o.call(this,s,l,u)},z.shouldComponentUpdate=i}return n.__N||n.__}function ye(e,t){var r=dt(ze++,3);!C.__s&&Dr(r.__H,t)&&(r.__=e,r.i=t,z.__H.__h.push(r))}function ue(e,t){var r=dt(ze++,4);!C.__s&&Dr(r.__H,t)&&(r.__=e,r.i=t,z.__h.push(r))}function de(e){return ut=5,Pe(function(){return{current:e}},[])}function xu(e,t,r){ut=6,ue(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 Pe(e,t){var r=dt(ze++,7);return Dr(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ku(e,t){return ut=8,Pe(function(){return e},t)}function Mi(e){var t=z.context[e.__c],r=dt(ze++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(z)),t.props.value):e.__}function Su(e,t){C.useDebugValue&&C.useDebugValue(t?t(e):e)}function Cu(){var e=dt(ze++,11);if(!e.__){for(var t=z.__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 $u(){for(var e;e=Si.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(tr),e.__H.__h.forEach(Lr),e.__H.__h=[]}catch(t){e.__H.__h=[],C.__e(t,e.__v)}}C.__b=function(e){z=null,Ci&&Ci(e)},C.__r=function(e){$i&&$i(e),ze=0;var t=(z=e.__c).__H;t&&(Fr===z?(t.__h=[],z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=er,r.__N=r.i=void 0})):(t.__h.forEach(tr),t.__h.forEach(Lr),t.__h=[],ze=0)),Fr=z},C.diffed=function(e){Ei&&Ei(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Si.push(t)!==1&&ki===C.requestAnimationFrame||((ki=C.requestAnimationFrame)||Eu)($u)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==er&&(r.__=r.__V),r.i=void 0,r.__V=er})),Fr=z=null},C.__c=function(e,t){t.some(function(r){try{r.__h.forEach(tr),r.__h=r.__h.filter(function(n){return!n.__||Lr(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],C.__e(n,r.__v)}}),Ii&&Ii(e,t)},C.unmount=function(e){Ti&&Ti(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{tr(n)}catch(i){t=i}}),r.__H=void 0,t&&C.__e(t,r.__v))};var Ni=typeof requestAnimationFrame=="function";function Eu(e){var t,r=function(){clearTimeout(n),Ni&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);Ni&&(t=requestAnimationFrame(r))}function tr(e){var t=z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),z=t}function Lr(e){var t=z;e.__c=e.__(),z=t}function Dr(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function Pi(e,t){return typeof t=="function"?t(e):t}function Oi(e,t){for(var r in t)e[r]=t[r];return e}function Vr(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 jr(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function zr(e){this.props=e}function Iu(e,t){function r(i){var a=this.props.ref,o=a==i.ref;return!o&&a&&(a.call?a(null):a.current=null),t?!t(this.props,i)||!o:Vr(this.props,i)}function n(i){return this.shouldComponentUpdate=r,ce(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(zr.prototype=new _e).isPureReactComponent=!0,zr.prototype.shouldComponentUpdate=function(e,t){return Vr(this.props,e)||Vr(this.state,t)};var Fi=C.__b;C.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Fi&&Fi(e)};var Tu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(e){function t(r){var n=Oi({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Tu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Li=function(e,t){return e==null?null:Me(Me(e).map(t))},Au={map:Li,forEach:Li,count:function(e){return e?Me(e).length:0},only:function(e){var t=Me(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Me},Mu=C.__e;C.__e=function(e,t,r,n){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}Mu(e,t,r,n)};var Di=C.unmount;function Vi(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=Oi({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Vi(n,t,r)})),e}function ji(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return ji(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 $t(){this.__u=0,this.t=null,this.__b=null}function zi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Ri(e){var t,r,n;function i(a){if(t||(t=e()).then(function(o){r=o.default||o},function(o){n=o}),n)throw n;if(!r)throw t;return ce(r,a)}return i.displayName="Lazy",i.__f=!0,i}function Et(){this.u=null,this.o=null}C.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Di&&Di(e)},($t.prototype=new _e).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=zi(n.__v),a=!1,o=function(){a||(a=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=ji(u,u.__c.__P,u.__c.__O)}var h;for(n.setState({__a:n.__b=null});h=n.t.pop();)h.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(o,o)},$t.prototype.componentWillUnmount=function(){this.t=[]},$t.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]=Vi(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&ce(W,null,e.fallback);return i&&(i.__h=null),[ce(W,null,t.__a?null:e.children),i]};var Bi=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 Nu(e){return this.getChildContext=function(){return e.context},e.children}function Pu(e){var t=this,r=e.i;t.componentWillUnmount=function(){ct(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,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),ct(ce(Nu,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ou(e,t){var r=ce(Pu,{__v:e,i:t});return r.containerInfo=t,r}(Et.prototype=new _e).__a=function(e){var t=this,r=zi(t.__v),n=t.o.get(e);return n[0]++,function(i){var a=function(){t.props.revealOrder?(n.push(i),Bi(t,e,n)):i()};r?r(a):a()}},Et.prototype.render=function(e){this.u=null,this.o=new Map;var t=Me(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},Et.prototype.componentDidUpdate=Et.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Bi(e,r,t)})};var Ui=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Fu=/^(?: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]/,Lu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Du=/[A-Z0-9]/g,Vu=typeof document<"u",ju=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function zu(e,t,r){return t.__k==null&&(t.textContent=""),ct(e,t),typeof r=="function"&&r(),e?e.__c:null}function Ru(e,t,r){return li(e,t),typeof r=="function"&&r(),e?e.__c:null}_e.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(_e.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Hi=C.event;function Bu(){}function Uu(){return this.cancelBubble}function Hu(){return this.defaultPrevented}C.event=function(e){return Hi&&(e=Hi(e)),e.persist=Bu,e.isPropagationStopped=Uu,e.isDefaultPrevented=Hu,e.nativeEvent=e};var Br,qu={enumerable:!1,configurable:!0,get:function(){return this.class}},qi=C.vnode;C.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var a in r){var o=r[a];if(!(a==="value"&&"defaultValue"in r&&o==null||Vu&&a==="children"&&n==="noscript"||a==="class"||a==="className")){var s=a.toLowerCase();a==="defaultValue"&&"value"in r&&r.value==null?a="value":a==="download"&&o===!0?o="":s==="ondoubleclick"?a="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||ju(r.type)?s==="onfocus"?a="onfocusin":s==="onblur"?a="onfocusout":Lu.test(a)?a=s:n.indexOf("-")===-1&&Fu.test(a)?a=a.replace(Du,"-$&").toLowerCase():o===null&&(o=void 0):s=a="oninput",s==="oninput"&&i[a=s]&&(a="oninputCapture"),i[a]=o}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Me(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Me(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",qu)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=Ui,qi&&qi(e)};var Ki=C.__r;C.__r=function(e){Ki&&Ki(e),Br=e.__c};var Gi=C.diffed;C.diffed=function(e){Gi&&Gi(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),Br=null};var Ku={ReactCurrentDispatcher:{current:{readContext:function(e){return Br.__n[e.__c].props.value}}}};function Gu(e){return ce.bind(null,e)}function Wi(e){return!!e&&e.$$typeof===Ui}function Wu(e){return Wi(e)?iu.apply(null,arguments):e}function Yu(e){return!!e.__k&&(ct(null,e),!0)}function Ju(e){return e&&(e.base||e.nodeType===1&&e)||null}var Zu=function(e,t){return e(t)},Xu=function(e,t){return e(t)},Qu=W;function Yi(e){e()}function ed(e){return e}function td(){return[!1,Yi]}var rd=ue;function nd(e,t){var r=t(),n=me({h:{__:r,v:t}}),i=n[0].h,a=n[1];return ue(function(){i.__=r,i.v=t,jr(i.__,t())||a({h:i})},[e,r,t]),ye(function(){return jr(i.__,i.v())||a({h:i}),e(function(){jr(i.__,i.v())||a({h:i})})},[e]),r}var ke={useState:me,useId:Cu,useReducer:Ai,useEffect:ye,useLayoutEffect:ue,useInsertionEffect:rd,useTransition:td,useDeferredValue:ed,useSyncExternalStore:nd,startTransition:Yi,useRef:de,useImperativeHandle:xu,useMemo:Pe,useCallback:ku,useContext:Mi,useDebugValue:Su,version:"17.0.2",Children:Au,render:zu,hydrate:Ru,unmountComponentAtNode:Yu,createPortal:Ou,createElement:ce,createContext:ci,createFactory:Gu,cloneElement:Wu,createRef:Qc,Fragment:W,isValidElement:Wi,findDOMNode:Ju,Component:_e,PureComponent:zr,memo:Iu,forwardRef:Rr,flushSync:Xu,unstable_batchedUpdates:Zu,StrictMode:Qu,Suspense:$t,SuspenseList:Et,lazy:Ri,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ku};const oe=Symbol.for("@ts-pattern/matcher"),Ji=Symbol.for("@ts-pattern/isVariadic"),rr="@ts-pattern/anonymous-select-key",Ur=e=>!!(e&&typeof e=="object"),nr=e=>e&&!!e[oe],Y=(e,t,r)=>{if(nr(e)){const n=e[oe](),{matched:i,selections:a}=n.match(t);return i&&a&&Object.keys(a).forEach(o=>r(o,a[o])),i}if(Ur(e)){if(!Ur(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],a=[];for(const o of e.keys()){const s=e[o];nr(s)&&s[Ji]?a.push(s):a.length?i.push(s):n.push(s)}if(a.length){if(a.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const o=t.slice(0,n.length),s=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,h)=>Y(u,o[h],r))&&i.every((u,h)=>Y(u,s[h],r))&&(a.length===0||Y(a[0],l,r))}return e.length===t.length&&e.every((o,s)=>Y(o,t[s],r))}return Object.keys(e).every(n=>{const i=e[n];return(n in t||nr(a=i)&&a[oe]().matcherType==="optional")&&Y(i,t[n],r);var a})}return Object.is(t,e)},fe=e=>{var t,r,n;return Ur(e)?nr(e)?(t=(r=(n=e[oe]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?It(e,fe):It(Object.values(e),fe):[]},It=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function id(...e){if(e.length===1){const[t]=e;return r=>Y(t,r,()=>{})}if(e.length===2){const[t,r]=e;return Y(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function Q(e){return Object.assign(e,{optional:()=>qr(e),and:t=>R(e,t),or:t=>Zi(e,t),select:t=>t===void 0?Tt(e):Tt(t,e)})}function Hr(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Ji]:!0})}}))(e),{optional:()=>Hr(qr(e)),select:t=>Hr(t===void 0?Tt(e):Tt(t,e))})}function qr(e){return Q({[oe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return t===void 0?(fe(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:Y(e,t,n),selections:r}},getSelectionKeys:()=>fe(e),matcherType:"optional"})})}const ad=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},od=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function R(...e){return Q({[oe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return{matched:e.every(i=>Y(i,t,n)),selections:r}},getSelectionKeys:()=>It(e,fe),matcherType:"and"})})}function Zi(...e){return Q({[oe]:()=>({match:t=>{let r={};const n=(i,a)=>{r[i]=a};return It(e,fe).forEach(i=>n(i,void 0)),{matched:e.some(i=>Y(i,t,n)),selections:r}},getSelectionKeys:()=>It(e,fe),matcherType:"or"})})}function O(e){return{[oe]:()=>({match:t=>({matched:!!e(t)})})}}function Tt(...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 Q({[oe]:()=>({match:n=>{let i={[t??rr]:n};return{matched:r===void 0||Y(r,n,(a,o)=>{i[a]=o}),selections:i}},getSelectionKeys:()=>[t??rr].concat(r===void 0?[]:fe(r))})})}function Se(e){return typeof e=="number"}function Ze(e){return typeof e=="string"}function Re(e){return typeof e=="bigint"}const Xi=Q(O(function(e){return!0})),sd=Xi,Xe=e=>Object.assign(Q(e),{startsWith:t=>{return Xe(R(e,(r=t,O(n=>Ze(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Xe(R(e,(r=t,O(n=>Ze(n)&&n.endsWith(r)))));var r},minLength:t=>Xe(R(e,(r=>O(n=>Ze(n)&&n.length>=r))(t))),maxLength:t=>Xe(R(e,(r=>O(n=>Ze(n)&&n.length<=r))(t))),includes:t=>{return Xe(R(e,(r=t,O(n=>Ze(n)&&n.includes(r)))));var r},regex:t=>{return Xe(R(e,(r=t,O(n=>Ze(n)&&!!n.match(r)))));var r}}),ld=Xe(O(Ze)),Ce=e=>Object.assign(Q(e),{between:(t,r)=>Ce(R(e,((n,i)=>O(a=>Se(a)&&n<=a&&i>=a))(t,r))),lt:t=>Ce(R(e,(r=>O(n=>Se(n)&&n<r))(t))),gt:t=>Ce(R(e,(r=>O(n=>Se(n)&&n>r))(t))),lte:t=>Ce(R(e,(r=>O(n=>Se(n)&&n<=r))(t))),gte:t=>Ce(R(e,(r=>O(n=>Se(n)&&n>=r))(t))),int:()=>Ce(R(e,O(t=>Se(t)&&Number.isInteger(t)))),finite:()=>Ce(R(e,O(t=>Se(t)&&Number.isFinite(t)))),positive:()=>Ce(R(e,O(t=>Se(t)&&t>0))),negative:()=>Ce(R(e,O(t=>Se(t)&&t<0)))}),cd=Ce(O(Se)),Be=e=>Object.assign(Q(e),{between:(t,r)=>Be(R(e,((n,i)=>O(a=>Re(a)&&n<=a&&i>=a))(t,r))),lt:t=>Be(R(e,(r=>O(n=>Re(n)&&n<r))(t))),gt:t=>Be(R(e,(r=>O(n=>Re(n)&&n>r))(t))),lte:t=>Be(R(e,(r=>O(n=>Re(n)&&n<=r))(t))),gte:t=>Be(R(e,(r=>O(n=>Re(n)&&n>=r))(t))),positive:()=>Be(R(e,O(t=>Re(t)&&t>0))),negative:()=>Be(R(e,O(t=>Re(t)&&t<0)))}),ud=Be(O(Re)),dd=Q(O(function(e){return typeof e=="boolean"})),fd=Q(O(function(e){return typeof e=="symbol"})),hd=Q(O(function(e){return e==null}));var A={__proto__:null,matcher:oe,optional:qr,array:function(...e){return Hr({[oe]:()=>({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 fe(r).forEach(a=>{n[a]=[]}),{matched:!0,selections:n};const i=(a,o)=>{n[a]=(n[a]||[]).concat([o])};return{matched:t.every(a=>Y(r,a,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:fe(e[0])})})},set:function(...e){return Q({[oe]:()=>({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=(a,o)=>{r[a]=(r[a]||[]).concat([o])},i=e[0];return{matched:ad(t,a=>Y(i,a,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:fe(e[0])})})},map:function(...e){return Q({[oe]:()=>({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 i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[a,o]=e;return{matched:od(t,(s,l)=>{const u=Y(a,l,n),h=Y(o,s,n);return u&&h}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...fe(e[0]),...fe(e[1])]})})},intersection:R,union:Zi,not:function(e){return Q({[oe]:()=>({match:t=>({matched:!Y(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:O,select:Tt,any:Xi,_:sd,string:ld,number:cd,bigint:ud,boolean:dd,symbol:fd,nullish:hd,instanceOf:function(e){return Q(O(function(t){return r=>r instanceof t}(e)))},shape:function(e){return Q(O(id(e)))}};const Kr={matched:!1,value:void 0};function Qe(e){return new ir(e,Kr)}class ir{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 i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let a=!1,o={};const s=(u,h)=>{a=!0,o[u]=h},l=!n.some(u=>Y(u,this.input,s))||i&&!i(this.input)?Kr:{matched:!0,value:r(a?rr in o?o[rr]:o:this.input,this.input)};return new ir(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new ir(this.input,n?{matched:!0,value:r(this.input,this.input)}:Kr)}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 pd=["other","few","many","two","one","zero"],Qi=({terms:e,overrides:t,locale:r})=>{const n=new Intl.PluralRules(r);function i(a,o){const s=(t==null?void 0:t[a])??e[a];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,u)=>{var h;return((h=o==null?void 0:o[u])==null?void 0:h.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${a.toString()}”`);let l=n.select(o.count);if(!(l in s)){const u=pd.find(h=>h in s);if(!u)throw new Error(`Missing plural rule for translation key “${a.toString()}”`);l=u}return s[l].replace(/{{(\w+)}}/g,(u,h)=>{var d;return((d=o==null?void 0:o[h])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${a.toString()}”.`)}}return i};var vd=0;function c(e,t,r,n,i,a){var o,s,l={};for(s in t)s=="ref"?o=t[s]:l[s]=t[s];var u={type:e,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--vd,__source:i,__self:a};if(typeof e=="function"&&(o=e.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return C.vnode&&C.vnode(u),u}const ea=ci(null),md=e=>({TranslationProvider:({terms:t,children:r,locale:n})=>{const i=Pe(()=>(console.log("instantiating"),Qi({locale:n,terms:e,overrides:t})),[t,n]);return c(ea.Provider,{value:{t:i,locale:n},children:r})},useTranslation:()=>{const t=Mi(ea);if(t===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:t.t,locale:t.locale}},createTFunction:({overrides:t,locale:r})=>Qi({terms:e,overrides:t,locale:r})}),{TranslationProvider:gd,useTranslation:he,createTFunction:bd}=md({error_heading:"Something unexpected happened",undo:"Undo",send:"Send",skip:"Skip",skipped:"Skipped",submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",maximize:"Maximise",minimize:"Minimise",close_application:"Close application",applying_for:"Applying for “{{title}}”",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"}}),wp="";function we(e,t){if(!e)throw new Error(t)}function ar(){throw new Error("Cycle detected")}var _d=Symbol.for("preact-signals");function Gr(){if(ft>1)ft--;else{for(var e,t=!1;At!==void 0;){var r=At;for(At=void 0,Wr++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ra(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Wr=0,ft--,t)throw e}}var B=void 0,At=void 0,ft=0,Wr=0,or=0;function ta(e){if(B!==void 0){var t=e.n;if(t===void 0||t.t!==B)return t={i:0,S:e,p:B.s,n:void 0,t:B,e:void 0,x:void 0,r:t},B.s!==void 0&&(B.s.n=t),B.s=t,e.n=t,32&B.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=B.s,t.n=void 0,B.s.n=t,B.s=t),t}}function J(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}J.prototype.brand=_d,J.prototype.h=function(){return!0},J.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)},J.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)}},J.prototype.subscribe=function(e){var t=this;return Jr(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},J.prototype.valueOf=function(){return this.value},J.prototype.toString=function(){return this.value+""},J.prototype.toJSON=function(){return this.value},J.prototype.peek=function(){return this.v},Object.defineProperty(J.prototype,"value",{get:function(){var e=ta(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(B instanceof He&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Wr>100&&ar(),this.v=e,this.i++,or++,ft++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Gr()}}}});function Ue(e){return new J(e)}function ra(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 na(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 ia(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 He(e){J.call(this,void 0),this.x=e,this.s=void 0,this.g=or-1,this.f=4}(He.prototype=new J).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===or))return!0;if(this.g=or,this.f|=1,this.i>0&&!ra(this))return this.f&=-2,!0;var e=B;try{na(this),B=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 B=e,ia(this),this.f&=-2,!0},He.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)}J.prototype.S.call(this,e)},He.prototype.U=function(e){if(this.t!==void 0&&(J.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)}},He.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},He.prototype.peek=function(){if(this.h()||ar(),16&this.f)throw this.v;return this.v},Object.defineProperty(He.prototype,"value",{get:function(){1&this.f&&ar();var e=ta(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function yd(e){return new He(e)}function aa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){ft++;var r=B;B=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Yr(e),n}finally{B=r,Gr()}}}function Yr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,aa(e)}function wd(e){if(B!==this)throw new Error("Out-of-order effect");ia(this),B=e,this.f&=-2,8&this.f&&Yr(this),Gr()}function Mt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Mt.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()}},Mt.prototype.S=function(){1&this.f&&ar(),this.f|=1,this.f&=-9,aa(this),na(this),ft++;var e=B;return B=this,wd.bind(this,e)},Mt.prototype.N=function(){2&this.f||(this.f|=2,this.o=At,At=this)},Mt.prototype.d=function(){this.f|=8,1&this.f||Yr(this)};function Jr(e){var t=new Mt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Zr;function ht(e,t){C[e]=t.bind(null,C[e]||function(){})}function sr(e){Zr&&Zr(),Zr=e&&e.S()}function oa(e){var t=this,r=e.data,n=kd(r);n.value=r;var i=Pe(function(){for(var a=t.__v;a=a.__;)if(a.__c){a.__c.__$f|=4;break}return t.__$u.c=function(){var o;!Gn(i.peek())&&((o=t.base)==null?void 0:o.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},yd(function(){var o=n.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}oa.displayName="_st",Object.defineProperties(J.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}}),ht("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var a=n[i];a instanceof J&&(r||(t.__np=r={}),r[i]=a,n[i]=a.peek())}}e(t)}),ht("__r",function(e,t){sr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var a;return Jr(function(){a=this}),a.c=function(){n.__$f|=1,n.setState({})},a}())),sr(r),e(t)}),ht("__e",function(e,t,r,n){sr(),e(t,r,n)}),ht("diffed",function(e,t){sr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var a=r.U;if(a)for(var o in a){var s=a[o];s!==void 0&&!(o in n)&&(s.d(),a[o]=void 0)}else r.U=a={};for(var l in n){var u=a[l],h=n[l];u===void 0?(u=xd(r,l,h,i),a[l]=u):u.o(h,i)}}}e(t)});function xd(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,a=Ue(r);return{o:function(o,s){a.value=o,n=s},d:Jr(function(){var o=a.value.value;n[t]!==o&&(n[t]=o,i?e[t]=o:o?e.setAttribute(t,o):e.removeAttribute(t))})}}ht("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 i in n){var a=n[i];a&&a.d()}}}}else{var o=t.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}e(t)}),ht("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),_e.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 i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var a in this.props)if(!(a in e))return!0;return!1};function kd(e){return Pe(function(){return Ue(e)},[])}const Xr=(e,t)=>t.some(r=>e instanceof r);let sa,la;function Sd(){return sa||(sa=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function Cd(){return la||(la=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Qr=new WeakMap,en=new WeakMap,lr=new WeakMap;function $d(e){const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("success",a),e.removeEventListener("error",o)},a=()=>{r(et(e.result)),i()},o=()=>{n(e.error),i()};e.addEventListener("success",a),e.addEventListener("error",o)});return lr.set(t,e),t}function Ed(e){if(Qr.has(e))return;const t=new Promise((r,n)=>{const i=()=>{e.removeEventListener("complete",a),e.removeEventListener("error",o),e.removeEventListener("abort",o)},a=()=>{r(),i()},o=()=>{n(e.error||new DOMException("AbortError","AbortError")),i()};e.addEventListener("complete",a),e.addEventListener("error",o),e.addEventListener("abort",o)});Qr.set(e,t)}let tn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return Qr.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return et(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 ca(e){tn=e(tn)}function Id(e){return Cd().includes(e)?function(...t){return e.apply(rn(this),t),et(this.request)}:function(...t){return et(e.apply(rn(this),t))}}function Td(e){return typeof e=="function"?Id(e):(e instanceof IDBTransaction&&Ed(e),Xr(e,Sd())?new Proxy(e,tn):e)}function et(e){if(e instanceof IDBRequest)return $d(e);if(en.has(e))return en.get(e);const t=Td(e);return t!==e&&(en.set(e,t),lr.set(t,e)),t}const rn=e=>lr.get(e);function Ad(e,t,{blocked:r,upgrade:n,blocking:i,terminated:a}={}){const o=indexedDB.open(e,t),s=et(o);return n&&o.addEventListener("upgradeneeded",l=>{n(et(o.result),l.oldVersion,l.newVersion,et(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{a&&l.addEventListener("close",()=>a()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Md=["get","getKey","getAll","getAllKeys","count"],Nd=["put","add","delete","clear"],nn=new Map;function ua(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(nn.get(t))return nn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,i=Nd.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(i||Md.includes(r)))return;const a=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let u=l.store;return n&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),i&&l.done]))[0]};return nn.set(t,a),a}ca(e=>({...e,get:(t,r,n)=>ua(t,r)||e.get(t,r,n),has:(t,r)=>!!ua(t,r)||e.has(t,r)}));const Pd=["continue","continuePrimaryKey","advance"],da={},an=new WeakMap,fa=new WeakMap,Od={get(e,t){if(!Pd.includes(t))return e[t];let r=da[t];return r||(r=da[t]=function(...n){an.set(this,fa.get(this)[t](...n))}),r}};async function*Fd(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,Od);for(fa.set(r,t),lr.set(r,rn(t));t;)yield r,t=await(an.get(r)||t.continue()),an.delete(r)}function ha(e,t){return t===Symbol.asyncIterator&&Xr(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Xr(e,[IDBIndex,IDBObjectStore])}ca(e=>({...e,get(t,r,n){return ha(t,r)?Fd:e.get(t,r,n)},has(t,r){return ha(t,r)||e.has(t,r)}}));const Nt=e=>Qe(e).with(A.number.lte(1e3),()=>`${Math.round(e)}KB`).with(A.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),pa=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},Ld=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),pt=e=>t=>t?t.type===e:!1;class Pt extends Error{constructor(){super("Aborted")}}function Dd(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const va=e=>typeof e=="string",Vd=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),ma=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:Vd()}),jd=e=>Qe(e).with({nativeEvent:{submitter:A.select(A.union(A.instanceOf(HTMLButtonElement),A.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),ga=typeof window>"u"?void 0:Ad("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Ot={getStateData:async(e,t)=>{var n;const r=ba({...e,flowKeys:t});return(n=await ga)==null?void 0:n.get("state",r)},setStateData:Dd(async e=>{var r;const t=ba(e);return(r=await ga)==null?void 0:r.put("state",e.data,t)},1e3)},cr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const i=e.find(u=>u.id===t.nextId);if(i===void 0)return{stepsMade:n,remainingSteps:0};const a=t.type==="if-block"?t.branchId:void 0,o=e.find(u=>u.id===a),s=t.type.includes("question")?1:0;if(o){const u=s+Math.max(cr(e,i,r,n+s).remainingSteps,cr(e,o,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const l=s+cr(e,i,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:l}),{stepsMade:n,remainingSteps:l}},zd=e=>{const t={},r=e.find(n=>n.isHead);return r&&cr(e,r,(n,i)=>{t[n]=i}),t},ba=e=>[...e.flowKeys,e.id,e.version].join("/"),qe=Ue({state:"idle"}),Ft=e=>{const{state:t,flow:r}=qe.value;if(t!=="loaded")return;we(r,"No flow to update");const n=e(r.data);r.data=n,qe.value={state:t,flow:r},Ot.setStateData(r)},T={current$:qe,viewState$:Ue("closed"),inputHeight$:Ue(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:i,job:a})=>{const s={data:await Ot.getStateData(e,r)??ma(),startedAt:new Date,nodeIdToProgress:zd(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:i,job:a};qe.value={state:"loaded",flow:s},Ot.setStateData(s)},cancelCurrentFlow:()=>{qe.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>Ft(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Ft(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=qe.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=ma();qe.value={state:e,flow:{...t,data:r,startedAt:new Date}},Ot.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Ft(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=qe.value;we(t==="loaded","Application not loaded");const n=r.data.messages.filter(i=>!i.groupId||!e.includes(i.groupId));r.data.messages=n,Ot.setStateData(r)},setSubmission:(e,t)=>Ft(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Ft(t=>({...t,currentInput:e??null}))},Rd=({message:e})=>{const{t}=he();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("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:[c("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"}),c("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"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:t("error_heading")}),e&&c("p",{class:"text-neutral-9 text-sm",children:e})]})]})},_a=e=>c("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[c("title",{children:"Loading"}),c("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)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("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"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("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"})})})]}),ya=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(_a,{class:"text-neutral-6 h-8 w-8"})}),Bd=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)}%`},ur=({class:e,children:t,...r})=>c("button",{class:Je("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:c("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})}),Ud=()=>{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 c("div",{class:"bg-accent-3",children:c("div",{style:{width:Bd(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},Hd=({children:e})=>{const{t}=he(),r=T.viewState$;return c(W,{children:c("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:[c("div",{class:"flex h-[var(--header-height)] gap-2",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),c("button",{tabIndex:-1,onClick:()=>{r.value==="minimised"?r.value="maximised":r.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1",onTouchStart:on,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:r.value==="minimised"?c(W,{children:[c(ur,{class:"view-switch",onTouchStart:on,"aria-label":t("maximize"),onClick:()=>r.value="maximised",children:c("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),c(ur,{"aria-label":t("close_application"),onClick:T.cancelCurrentFlow,children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):c(W,{children:[T.current$.value.state==="loaded"&&c(ur,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[c("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"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(ur,{class:"view-switch",onTouchStart:on,"aria-label":t("minimize"),onClick:()=>r.value="minimised",children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),c(Ud,{})]})})};function on(){}const qd=Ri(()=>Promise.resolve().then(()=>dp).then(e=>e.ChatbotBody)),wa=Ct("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 [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),xa="outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",Kd=({open:e,...t})=>{const r=de(null);return ue(()=>{const n=r.current;n&&(e?n.showModal():n.close())},[e]),c("dialog",{ref:r,...t})},Gd=({logger:e,apiClient:t,analytics:r,terms:n})=>{const{state:i,flow:a,error:o}=T.current$.value,s=T.viewState$.value,l=i!=="idle"&&s==="maximised",u=de(null),h=c(Hd,{children:a==null?void 0:a.title});return c(gd,{terms:n,locale:void 0,children:[c(Kd,{open:l,onClose:()=>T.viewState$.value="minimised",children:c("div",{ref:u,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:wa({view:"maximised"}),children:c("div",{class:xa,children:[h,Qe({state:i,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(ya,{},"loading")).with({state:"loaded"},()=>c($t,{fallback:c(ya,{},"loading"),children:c(qd,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>c(Rd,{message:o})).exhaustive()]})})}),s==="minimised"?c("div",{class:wa({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:xa,children:h})}):null]})},ka=ne({id:ui(X(),String),version:Or(),build:Or(),nodes:pi(su()),context_schema:St(lu(gi(X(),ne({required:vi(),type:fu([mi("string"),mi("number")])}))))}),Wd=ne({flow:ka}),Yd=ne({company:ne({name:X()}),flow:ka,job:ne({id:ui(X(),String),title:X()})}),Jd=`#isdk{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;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 em{font-style:italic}#isdk strong{font-weight:700}#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 .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 .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 maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}#isdk .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(.82)}to{transform:translateY(0)}}#isdk .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .select-text{-webkit-user-select:text;-moz-user-select:text;user-select:text}#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 .text-ellipsis{text-overflow:ellipsis}#isdk .whitespace-nowrap{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-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}#isdk .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}#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-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-3{padding-left:.75rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-16{padding-right:4rem}#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-10{color:var(--i-color-a-10)}#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 .opacity-0{opacity:0}#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 .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}#isdk .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}#isdk .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}#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\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}#isdk .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}#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\\:underline:hover{text-decoration-line:underline}#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)}#isdk .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;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 fade-in{0%{opacity:0}to{opacity:1}}#isdk dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}#isdk dialog::backdrop{background-color:var(--i-overlay-bg)}
|
|
2
|
-
`,
|
|
1
|
+
var _p=Object.defineProperty;var yp=(Wt,gt,Tt)=>gt in Wt?_p(Wt,gt,{enumerable:!0,configurable:!0,writable:!0,value:Tt}):Wt[gt]=Tt;var So=(Wt,gt,Tt)=>(yp(Wt,typeof gt!="symbol"?gt+"":gt,Tt),Tt);(function(){"use strict";var Wt=t=>t,gt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Co=Array.isArray,Sr=Co,$o=typeof gt=="object"&>&>.Object===Object&>,Eo=$o,Io=Eo,To=typeof self=="object"&&self&&self.Object===Object&&self,Ao=Io||To||Function("return this")(),Cr=Ao,Mo=Cr,No=Mo.Symbol,$r=No,Aa=$r,Ma=Object.prototype,Po=Ma.hasOwnProperty,Oo=Ma.toString,me=Aa?Aa.toStringTag:void 0;function Fo(t){var e=Po.call(t,me),r=t[me];try{t[me]=void 0;var a=!0}catch{}var i=Oo.call(t);return a&&(e?t[me]=r:delete t[me]),i}var Lo=Fo,Do=Object.prototype,Vo=Do.toString;function jo(t){return Vo.call(t)}var zo=jo,Na=$r,Ro=Lo,Bo=zo,Uo="[object Null]",Ho="[object Undefined]",Pa=Na?Na.toStringTag:void 0;function qo(t){return t==null?t===void 0?Ho:Uo:Pa&&Pa in Object(t)?Ro(t):Bo(t)}var Oa=qo;function Ko(t){return t!=null&&typeof t=="object"}var Go=Ko,Wo=Oa,Yo=Go,Jo="[object Symbol]";function Xo(t){return typeof t=="symbol"||Yo(t)&&Wo(t)==Jo}var Er=Xo,Zo=Sr,Qo=Er,ts=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,es=/^\w*$/;function rs(t,e){if(Zo(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Qo(t)?!0:es.test(t)||!ts.test(t)||e!=null&&t in Object(e)}var as=rs;function ns(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Fa=ns,is=Oa,os=Fa,ss="[object AsyncFunction]",ls="[object Function]",cs="[object GeneratorFunction]",ds="[object Proxy]";function us(t){if(!os(t))return!1;var e=is(t);return e==ls||e==cs||e==ss||e==ds}var fs=us,hs=Cr,ps=hs["__core-js_shared__"],gs=ps,Ir=gs,La=function(){var t=/[^.]+$/.exec(Ir&&Ir.keys&&Ir.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function bs(t){return!!La&&La in t}var vs=bs,ws=Function.prototype,ms=ws.toString;function _s(t){if(t!=null){try{return ms.call(t)}catch{}try{return t+""}catch{}}return""}var ys=_s,xs=fs,ks=vs,Ss=Fa,Cs=ys,$s=/[\\^$.*+?()[\]{}|]/g,Es=/^\[object .+?Constructor\]$/,Is=Function.prototype,Ts=Object.prototype,As=Is.toString,Ms=Ts.hasOwnProperty,Ns=RegExp("^"+As.call(Ms).replace($s,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ps(t){if(!Ss(t)||ks(t))return!1;var e=xs(t)?Ns:Es;return e.test(Cs(t))}var Os=Ps;function Fs(t,e){return t==null?void 0:t[e]}var Ls=Fs,Ds=Os,Vs=Ls;function js(t,e){var r=Vs(t,e);return Ds(r)?r:void 0}var Da=js,zs=Da,Rs=zs(Object,"create"),Ue=Rs,Va=Ue;function Bs(){this.__data__=Va?Va(null):{},this.size=0}var Us=Bs;function Hs(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var qs=Hs,Ks=Ue,Gs="__lodash_hash_undefined__",Ws=Object.prototype,Ys=Ws.hasOwnProperty;function Js(t){var e=this.__data__;if(Ks){var r=e[t];return r===Gs?void 0:r}return Ys.call(e,t)?e[t]:void 0}var Xs=Js,Zs=Ue,Qs=Object.prototype,tl=Qs.hasOwnProperty;function el(t){var e=this.__data__;return Zs?e[t]!==void 0:tl.call(e,t)}var rl=el,al=Ue,nl="__lodash_hash_undefined__";function il(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=al&&e===void 0?nl:e,this}var ol=il,sl=Us,ll=qs,cl=Xs,dl=rl,ul=ol;function ie(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}ie.prototype.clear=sl,ie.prototype.delete=ll,ie.prototype.get=cl,ie.prototype.has=dl,ie.prototype.set=ul;var fl=ie;function hl(){this.__data__=[],this.size=0}var pl=hl;function gl(t,e){return t===e||t!==t&&e!==e}var bl=gl,vl=bl;function wl(t,e){for(var r=t.length;r--;)if(vl(t[r][0],e))return r;return-1}var He=wl,ml=He,_l=Array.prototype,yl=_l.splice;function xl(t){var e=this.__data__,r=ml(e,t);if(r<0)return!1;var a=e.length-1;return r==a?e.pop():yl.call(e,r,1),--this.size,!0}var kl=xl,Sl=He;function Cl(t){var e=this.__data__,r=Sl(e,t);return r<0?void 0:e[r][1]}var $l=Cl,El=He;function Il(t){return El(this.__data__,t)>-1}var Tl=Il,Al=He;function Ml(t,e){var r=this.__data__,a=Al(r,t);return a<0?(++this.size,r.push([t,e])):r[a][1]=e,this}var Nl=Ml,Pl=pl,Ol=kl,Fl=$l,Ll=Tl,Dl=Nl;function oe(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}oe.prototype.clear=Pl,oe.prototype.delete=Ol,oe.prototype.get=Fl,oe.prototype.has=Ll,oe.prototype.set=Dl;var Vl=oe,jl=Da,zl=Cr,Rl=jl(zl,"Map"),Bl=Rl,ja=fl,Ul=Vl,Hl=Bl;function ql(){this.size=0,this.__data__={hash:new ja,map:new(Hl||Ul),string:new ja}}var Kl=ql;function Gl(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var Wl=Gl,Yl=Wl;function Jl(t,e){var r=t.__data__;return Yl(e)?r[typeof e=="string"?"string":"hash"]:r.map}var qe=Jl,Xl=qe;function Zl(t){var e=Xl(this,t).delete(t);return this.size-=e?1:0,e}var Ql=Zl,tc=qe;function ec(t){return tc(this,t).get(t)}var rc=ec,ac=qe;function nc(t){return ac(this,t).has(t)}var ic=nc,oc=qe;function sc(t,e){var r=oc(this,t),a=r.size;return r.set(t,e),this.size+=r.size==a?0:1,this}var lc=sc,cc=Kl,dc=Ql,uc=rc,fc=ic,hc=lc;function se(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var a=t[e];this.set(a[0],a[1])}}se.prototype.clear=cc,se.prototype.delete=dc,se.prototype.get=uc,se.prototype.has=fc,se.prototype.set=hc;var pc=se,za=pc,gc="Expected a function";function Tr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(gc);var r=function(){var a=arguments,i=e?e.apply(this,a):a[0],n=r.cache;if(n.has(i))return n.get(i);var o=t.apply(this,a);return r.cache=n.set(i,o)||n,o};return r.cache=new(Tr.Cache||za),r}Tr.Cache=za;var bc=Tr,vc=bc,wc=500;function mc(t){var e=vc(t,function(a){return r.size===wc&&r.clear(),a}),r=e.cache;return e}var _c=mc,yc=_c,xc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kc=/\\(\\)?/g,Sc=yc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(xc,function(r,a,i,n){e.push(i?n.replace(kc,"$1"):a||r)}),e}),Cc=Sc;function $c(t,e){for(var r=-1,a=t==null?0:t.length,i=Array(a);++r<a;)i[r]=e(t[r],r,t);return i}var Ec=$c,Ra=$r,Ic=Ec,Tc=Sr,Ac=Er,Mc=1/0,Ba=Ra?Ra.prototype:void 0,Ua=Ba?Ba.toString:void 0;function Ha(t){if(typeof t=="string")return t;if(Tc(t))return Ic(t,Ha)+"";if(Ac(t))return Ua?Ua.call(t):"";var e=t+"";return e=="0"&&1/t==-Mc?"-0":e}var Nc=Ha,Pc=Nc;function Oc(t){return t==null?"":Pc(t)}var Fc=Oc,Lc=Sr,Dc=as,Vc=Cc,jc=Fc;function zc(t,e){return Lc(t)?t:Dc(t,e)?[t]:Vc(jc(t))}var Rc=zc,Bc=Er,Uc=1/0;function Hc(t){if(typeof t=="string"||Bc(t))return t;var e=t+"";return e=="0"&&1/t==-Uc?"-0":e}var qc=Hc,Kc=Rc,Gc=qc;function Wc(t,e){e=Kc(e,t);for(var r=0,a=e.length;t!=null&&r<a;)t=t[Gc(e[r++])];return r&&r==a?t:void 0}var Yc=Wc,Jc=Yc;function Xc(t,e,r){var a=t==null?void 0:Jc(t,e);return a===void 0?r:a}var Zc=Xc;const _e=Tt(Zc);var ye,C,qa,Ka,Yt,Ga,Wa,Ar,Ya,le={},Ja=[],Qc=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Ke=Array.isArray;function At(t,e){for(var r in e)t[r]=e[r];return t}function Xa(t){var e=t.parentNode;e&&e.removeChild(t)}function ct(t,e,r){var a,i,n,o={};for(n in e)n=="key"?a=e[n]:n=="ref"?i=e[n]:o[n]=e[n];if(arguments.length>2&&(o.children=arguments.length>3?ye.call(arguments,2):r),typeof t=="function"&&t.defaultProps!=null)for(n in t.defaultProps)o[n]===void 0&&(o[n]=t.defaultProps[n]);return xe(t,o,a,i,null)}function xe(t,e,r,a,i){var n={type:t,props:e,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++qa};return i==null&&C.vnode!=null&&C.vnode(n),n}function td(){return{current:null}}function W(t){return t.children}function mt(t,e){this.props=t,this.context=e}function Ge(t,e){if(e==null)return t.__?Ge(t.__,t.__.__k.indexOf(t)+1):null;for(var r;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null)return r.__e;return typeof t.type=="function"?Ge(t):null}function Za(t){var e,r;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((r=t.__k[e])!=null&&r.__e!=null){t.__e=t.__c.base=r.__e;break}return Za(t)}}function Mr(t){(!t.__d&&(t.__d=!0)&&Yt.push(t)&&!We.__r++||Ga!==C.debounceRendering)&&((Ga=C.debounceRendering)||Wa)(We)}function We(){var t,e,r,a,i,n,o,s,l;for(Yt.sort(Ar);t=Yt.shift();)t.__d&&(e=Yt.length,a=void 0,i=void 0,n=void 0,s=(o=(r=t).__v).__e,(l=r.__P)&&(a=[],i=[],(n=At({},o)).__v=o.__v+1,Nr(l,o,n,r.__n,l.ownerSVGElement!==void 0,o.__h!=null?[s]:null,a,s??Ge(o),o.__h,i),on(a,o,i),o.__e!=s&&Za(o)),Yt.length>e&&Yt.sort(Ar));We.__r=0}function Qa(t,e,r,a,i,n,o,s,l,u,h){var d,p,v,g,_,k,x,m,M,F,N=0,H=a&&a.__k||Ja,et=H.length,pt=et,D=e.length;for(r.__k=[],d=0;d<D;d++)(g=r.__k[d]=(g=e[d])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?xe(null,g,null,null,g):Ke(g)?xe(W,{children:g},null,null,null):g.__b>0?xe(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(m=ed(g,H,x=d+N,pt))===-1?v=le:(v=H[m]||le,H[m]=void 0,pt--),Nr(t,g,v,i,n,o,s,l,u,h),_=g.__e,(p=g.ref)&&v.ref!=p&&(v.ref&&Pr(v.ref,null,g),h.push(p,g.__c||_,g)),_!=null&&(k==null&&(k=_),F=!(M=v===le||v.__v===null)&&m===x,M?m==-1&&N--:m!==x&&(m===x+1?(N++,F=!0):m>x?pt>D-x?(N+=m-x,F=!0):N--:N=m<x&&m==x-1?m-x:0),x=d+N,F=F||m==d&&!M,typeof g.type!="function"||m===x&&v.__k!==g.__k?typeof g.type=="function"||F?g.__d!==void 0?(l=g.__d,g.__d=void 0):l=_.nextSibling:l=en(t,_,l):l=tn(g,l,t),typeof r.type=="function"&&(r.__d=l)));for(r.__e=k,d=et;d--;)H[d]!=null&&(typeof r.type=="function"&&H[d].__e!=null&&H[d].__e==r.__d&&(r.__d=H[d].__e.nextSibling),sn(H[d],H[d]))}function tn(t,e,r){for(var a,i=t.__k,n=0;i&&n<i.length;n++)(a=i[n])&&(a.__=t,e=typeof a.type=="function"?tn(a,e,r):en(r,a.__e,e));return e}function Mt(t,e){return e=e||[],t==null||typeof t=="boolean"||(Ke(t)?t.some(function(r){Mt(r,e)}):e.push(t)),e}function en(t,e,r){return r==null||r.parentNode!==t?t.insertBefore(e,null):e==r&&e.parentNode!=null||t.insertBefore(e,r),e.nextSibling}function ed(t,e,r,a){var i=t.key,n=t.type,o=r-1,s=r+1,l=e[r];if(l===null||l&&i==l.key&&n===l.type)return r;if(a>(l!=null?1:0))for(;o>=0||s<e.length;){if(o>=0){if((l=e[o])&&i==l.key&&n===l.type)return o;o--}if(s<e.length){if((l=e[s])&&i==l.key&&n===l.type)return s;s++}}return-1}function rd(t,e,r,a,i){var n;for(n in r)n==="children"||n==="key"||n in e||Ye(t,n,null,r[n],a);for(n in e)i&&typeof e[n]!="function"||n==="children"||n==="key"||n==="value"||n==="checked"||r[n]===e[n]||Ye(t,n,e[n],r[n],a)}function rn(t,e,r){e[0]==="-"?t.setProperty(e,r??""):t[e]=r==null?"":typeof r!="number"||Qc.test(e)?r:r+"px"}function Ye(t,e,r,a,i){var n;t:if(e==="style")if(typeof r=="string")t.style.cssText=r;else{if(typeof a=="string"&&(t.style.cssText=a=""),a)for(e in a)r&&e in r||rn(t.style,e,"");if(r)for(e in r)a&&r[e]===a[e]||rn(t.style,e,r[e])}else if(e[0]==="o"&&e[1]==="n")n=e!==(e=e.replace(/Capture$/,"")),e=e.toLowerCase()in t?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+n]=r,r?a||t.addEventListener(e,n?nn:an,n):t.removeEventListener(e,n?nn:an,n);else if(e!=="dangerouslySetInnerHTML"){if(i)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e in t)try{t[e]=r??"";break t}catch{}typeof r=="function"||(r==null||r===!1&&e[4]!=="-"?t.removeAttribute(e):t.setAttribute(e,r))}}function an(t){return this.l[t.type+!1](C.event?C.event(t):t)}function nn(t){return this.l[t.type+!0](C.event?C.event(t):t)}function Nr(t,e,r,a,i,n,o,s,l,u){var h,d,p,v,g,_,k,x,m,M,F,N,H,et,pt,D=e.type;if(e.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,s=e.__e=r.__e,e.__h=null,n=[s]),(h=C.__b)&&h(e);try{t:if(typeof D=="function"){if(x=e.props,m=(h=D.contextType)&&a[h.__c],M=h?m?m.props.value:h.__:a,r.__c?k=(d=e.__c=r.__c).__=d.__E:("prototype"in D&&D.prototype.render?e.__c=d=new D(x,M):(e.__c=d=new mt(x,M),d.constructor=D,d.render=nd),m&&m.sub(d),d.props=x,d.state||(d.state={}),d.context=M,d.__n=a,p=d.__d=!0,d.__h=[],d._sb=[]),d.__s==null&&(d.__s=d.state),D.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=At({},d.__s)),At(d.__s,D.getDerivedStateFromProps(x,d.__s))),v=d.props,g=d.state,d.__v=e,p)D.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(D.getDerivedStateFromProps==null&&x!==v&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(x,M),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(x,d.__s,M)===!1||e.__v===r.__v)){for(e.__v!==r.__v&&(d.props=x,d.state=d.__s,d.__d=!1),e.__e=r.__e,e.__k=r.__k,e.__k.forEach(function(st){st&&(st.__=e)}),F=0;F<d._sb.length;F++)d.__h.push(d._sb[F]);d._sb=[],d.__h.length&&o.push(d);break t}d.componentWillUpdate!=null&&d.componentWillUpdate(x,d.__s,M),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(v,g,_)})}if(d.context=M,d.props=x,d.__P=t,d.__e=!1,N=C.__r,H=0,"prototype"in D&&D.prototype.render){for(d.state=d.__s,d.__d=!1,N&&N(e),h=d.render(d.props,d.state,d.context),et=0;et<d._sb.length;et++)d.__h.push(d._sb[et]);d._sb=[]}else do d.__d=!1,N&&N(e),h=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++H<25);d.state=d.__s,d.getChildContext!=null&&(a=At(At({},a),d.getChildContext())),p||d.getSnapshotBeforeUpdate==null||(_=d.getSnapshotBeforeUpdate(v,g)),Qa(t,Ke(pt=h!=null&&h.type===W&&h.key==null?h.props.children:h)?pt:[pt],e,r,a,i,n,o,s,l,u),d.base=e.__e,e.__h=null,d.__h.length&&o.push(d),k&&(d.__E=d.__=null)}else n==null&&e.__v===r.__v?(e.__k=r.__k,e.__e=r.__e):e.__e=ad(r.__e,e,r,a,i,n,o,l,u);(h=C.diffed)&&h(e)}catch(st){e.__v=null,(l||n!=null)&&(e.__e=s,e.__h=!!l,n[n.indexOf(s)]=null),C.__e(st,e,r)}}function on(t,e,r){for(var a=0;a<r.length;a++)Pr(r[a],r[++a],r[++a]);C.__c&&C.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(n){n.call(i)})}catch(n){C.__e(n,i.__v)}})}function ad(t,e,r,a,i,n,o,s,l){var u,h,d,p=r.props,v=e.props,g=e.type,_=0;if(g==="svg"&&(i=!0),n!=null){for(;_<n.length;_++)if((u=n[_])&&"setAttribute"in u==!!g&&(g?u.localName===g:u.nodeType===3)){t=u,n[_]=null;break}}if(t==null){if(g===null)return document.createTextNode(v);t=i?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,v.is&&v),n=null,s=!1}if(g===null)p===v||s&&t.data===v||(t.data=v);else{if(n=n&&ye.call(t.childNodes),h=(p=r.props||le).dangerouslySetInnerHTML,d=v.dangerouslySetInnerHTML,!s){if(n!=null)for(p={},_=0;_<t.attributes.length;_++)p[t.attributes[_].name]=t.attributes[_].value;(d||h)&&(d&&(h&&d.__html==h.__html||d.__html===t.innerHTML)||(t.innerHTML=d&&d.__html||""))}if(rd(t,v,p,i,s),d)e.__k=[];else if(Qa(t,Ke(_=e.props.children)?_:[_],e,r,a,i&&g!=="foreignObject",n,o,n?n[0]:r.__k&&Ge(r,0),s,l),n!=null)for(_=n.length;_--;)n[_]!=null&&Xa(n[_]);s||("value"in v&&(_=v.value)!==void 0&&(_!==t.value||g==="progress"&&!_||g==="option"&&_!==p.value)&&Ye(t,"value",_,p.value,!1),"checked"in v&&(_=v.checked)!==void 0&&_!==t.checked&&Ye(t,"checked",_,p.checked,!1))}return t}function Pr(t,e,r){try{typeof t=="function"?t(e):t.current=e}catch(a){C.__e(a,r)}}function sn(t,e,r){var a,i;if(C.unmount&&C.unmount(t),(a=t.ref)&&(a.current&&a.current!==t.__e||Pr(a,null,e)),(a=t.__c)!=null){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(n){C.__e(n,e)}a.base=a.__P=null,t.__c=void 0}if(a=t.__k)for(i=0;i<a.length;i++)a[i]&&sn(a[i],e,r||typeof t.type!="function");r||t.__e==null||Xa(t.__e),t.__=t.__e=t.__d=void 0}function nd(t,e,r){return this.constructor(t,r)}function ce(t,e,r){var a,i,n,o;C.__&&C.__(t,e),i=(a=typeof r=="function")?null:r&&r.__k||e.__k,n=[],o=[],Nr(e,t=(!a&&r||e).__k=ct(W,null,[t]),i||le,le,e.ownerSVGElement!==void 0,!a&&r?[r]:i?null:e.firstChild?ye.call(e.childNodes):null,n,!a&&r?r:i?i.__e:e.firstChild,a,o),on(n,t,o)}function ln(t,e){ce(t,e,ln)}function id(t,e,r){var a,i,n,o,s=At({},t.props);for(n in t.type&&t.type.defaultProps&&(o=t.type.defaultProps),e)n=="key"?a=e[n]:n=="ref"?i=e[n]:s[n]=e[n]===void 0&&o!==void 0?o[n]:e[n];return arguments.length>2&&(s.children=arguments.length>3?ye.call(arguments,2):r),xe(t.type,s,a||t.key,i||t.ref,null)}function cn(t,e){var r={__c:e="__cC"+Ya++,__:t,Consumer:function(a,i){return a.children(i)},Provider:function(a){var i,n;return this.getChildContext||(i=[],(n={})[e]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(o){this.props.value!==o.value&&i.some(function(s){s.__e=!0,Mr(s)})},this.sub=function(o){i.push(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){i.splice(i.indexOf(o),1),s&&s.call(o)}}),a.children}};return r.Provider.__=r.Consumer.contextType=r}ye=Ja.slice,C={__e:function(t,e,r,a){for(var i,n,o;e=e.__;)if((i=e.__c)&&!i.__)try{if((n=i.constructor)&&n.getDerivedStateFromError!=null&&(i.setState(n.getDerivedStateFromError(t)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,a||{}),o=i.__d),o)return i.__E=i}catch(s){t=s}throw t}},qa=0,Ka=function(t){return t!=null&&t.constructor===void 0},mt.prototype.setState=function(t,e){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=At({},this.state),typeof t=="function"&&(t=t(At({},r),this.props)),t&&At(r,t),t!=null&&this.__v&&(e&&this._sb.push(e),Mr(this))},mt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),Mr(this))},mt.prototype.render=W,Yt=[],Wa=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ar=function(t,e){return t.__v.__b-e.__v.__b},We.__r=0,Ya=0;var Je=class extends Error{constructor(e){super(e[0].message);So(this,"issues");this.name="ValiError",this.issues=e}};function dn(t,e){return{...t,_parse(r,a){return t._parse(e(r),a)}}}function ke(t){return{issues:t}}function rt(t){return{output:t}}function od(t,e){return{reason:t==null?void 0:t.reason,validation:e.validation,origin:(t==null?void 0:t.origin)||"value",message:e.message,input:e.input,path:e.path,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}}function sd(t,e){return{reason:e,origin:t==null?void 0:t.origin,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}}function Dt(t,e,r,a){if(!e||!e.length||r!=null&&r.skipPipe)return rt(t);let i,n,o=t;for(const s of e){const l=s._parse(o);if(l.issues){i=i||sd(r,a);for(const u of l.issues){const h=od(i,u);n?n.push(h):n=[h]}if(i.abortEarly||i.abortPipeEarly)break}else o=l.output}return n?ke(n):rt(o)}function Vt(t,e){return Array.isArray(t)?[void 0,t]:[t,e]}function un(t){return typeof t=="function"?t():t}function jt(t,e,r,a){return ke([{validation:t,message:un(e),input:r,requirement:a}])}function fn(t,e,r){if(!t||typeof t=="object"&&!Array.isArray(t)){const[n,o]=Vt(e,r);return[t,n,o]}const[a,i]=Vt(t,e);return[void 0,a,i]}function Nt(t,e,r,a,i,n){return{issues:[{reason:e,validation:r,origin:(t==null?void 0:t.origin)||"value",message:un(a),input:i,issues:n,abortEarly:t==null?void 0:t.abortEarly,abortPipeEarly:t==null?void 0:t.abortPipeEarly,skipPipe:t==null?void 0:t.skipPipe}]}}function hn(t){return typeof t.default=="function"?t.default():t.default}function ld(t){return{type:"any",async:!1,pipe:t,_parse(e,r){return Dt(e,this.pipe,r,"any")}}}function pn(t,e,r){const[a="Invalid type",i]=Vt(e,r);return{type:"array",async:!1,item:t,message:a,pipe:i,_parse(n,o){if(!Array.isArray(n))return Nt(o,"type","array",this.message,n);let s;const l=[];for(let u=0;u<n.length;u++){const h=n[u],d=this.item._parse(h,o);if(d.issues){const p={type:"array",input:n,key:u,value:h};for(const v of d.issues)v.path?v.path.unshift(p):v.path=[p],s==null||s.push(v);if(s||(s=d.issues),o!=null&&o.abortEarly)break}else l.push(d.output)}return s?ke(s):Dt(l,this.pipe,o,"array")}}}function gn(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"boolean",async:!1,message:r,pipe:a,_parse(i,n){return typeof i!="boolean"?Nt(n,"type","boolean",this.message,i):Dt(i,this.pipe,n,"boolean")}}}function bn(t,e="Invalid type"){return{type:"literal",async:!1,literal:t,message:e,_parse(r,a){return r!==this.literal?Nt(a,"type","literal",this.message,r):rt(r)}}}function cd(t,e){return{type:"nullable",async:!1,wrapped:t,default:e,_parse(r,a){if(r===null){const i=hn(this);if(i===void 0)return rt(r);r=i}return this.wrapped._parse(r,a)}}}function Or(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"number",async:!1,message:r,pipe:a,_parse(i,n){return typeof i!="number"||isNaN(i)?Nt(n,"type","number",this.message,i):Dt(i,this.pipe,n,"number")}}}function at(t,e,r,a){const[i,n="Invalid type",o]=fn(e,r,a);let s;return{type:"object",async:!1,entries:t,rest:i,message:n,pipe:o,_parse(l,u){if(!l||typeof l!="object")return Nt(u,"type","object",this.message,l);s=s||Object.entries(this.entries);let h;const d={};for(const[p,v]of s){const g=l[p],_=v._parse(g,u);if(_.issues){const k={type:"object",input:l,key:p,value:g};for(const x of _.issues)x.path?x.path.unshift(k):x.path=[k],h==null||h.push(x);if(h||(h=_.issues),u!=null&&u.abortEarly)break}else(_.output!==void 0||p in l)&&(d[p]=_.output)}if(this.rest&&!(u!=null&&u.abortEarly&&h)){for(const p in l)if(!(p in this.entries)){const v=l[p],g=this.rest._parse(v,u);if(g.issues){const _={type:"object",input:l,key:p,value:v};for(const k of g.issues)k.path?k.path.unshift(_):k.path=[_],h==null||h.push(k);if(h||(h=g.issues),u!=null&&u.abortEarly)break}else d[p]=g.output}}return h?ke(h):Dt(d,this.pipe,u,"object")}}}function Se(t,e){return{type:"optional",async:!1,wrapped:t,default:e,_parse(r,a){if(r===void 0){const i=hn(this);if(i===void 0)return rt(r);r=i}return this.wrapped._parse(r,a)}}}function dd(t,e="Invalid type"){return{type:"picklist",async:!1,options:t,message:e,_parse(r,a){return this.options.includes(r)?rt(r):Nt(a,"type","picklist",this.message,r)}}}function Z(t,e){const[r="Invalid type",a]=Vt(t,e);return{type:"string",async:!1,message:r,pipe:a,_parse(i,n){return typeof i!="string"?Nt(n,"type","string",this.message,i):Dt(i,this.pipe,n,"string")}}}function ud(t,e,r,a){if(typeof e=="object"&&!Array.isArray(e)){const[o,s]=Vt(r,a);return[t,e,o,s]}const[i,n]=Vt(e,r);return[Z(),t,i,n]}var fd=["__proto__","prototype","constructor"];function vn(t,e,r,a){const[i,n,o="Invalid type",s]=ud(t,e,r,a);return{type:"record",async:!1,key:i,value:n,message:o,pipe:s,_parse(l,u){if(!l||typeof l!="object")return Nt(u,"type","record",this.message,l);let h;const d={};for(const[p,v]of Object.entries(l))if(!fd.includes(p)){let g;const _=this.key._parse(p,{origin:"key",abortEarly:u==null?void 0:u.abortEarly,abortPipeEarly:u==null?void 0:u.abortPipeEarly,skipPipe:u==null?void 0:u.skipPipe});if(_.issues){g={type:"record",input:l,key:p,value:v};for(const x of _.issues)x.path=[g],h==null||h.push(x);if(h||(h=_.issues),u!=null&&u.abortEarly)break}const k=this.value._parse(v,u);if(k.issues){g=g||{type:"record",input:l,key:p,value:v};for(const x of k.issues)x.path?x.path.unshift(g):x.path=[g],h==null||h.push(x);if(h||(h=k.issues),u!=null&&u.abortEarly)break}!_.issues&&!k.issues&&(d[_.output]=k.output)}return h?ke(h):Dt(d,this.pipe,u,"record")}}}function hd(t,e="Invalid type"){return{type:"union",async:!1,options:t,message:e,_parse(r,a){let i,n;for(const o of this.options){const s=o._parse(r,a);if(s.issues)if(i)for(const l of s.issues)i.push(l);else i=s.issues;else{n=[s.output];break}}return n?rt(n[0]):Nt(a,"type","union",this.message,r,i)}}}function Xe(t,e,r){const a=t._parse(e,r);if(a.issues)throw new Je(a.issues);return a.output}async function pd(t,e,r){const a=await t._parse(e,r);if(a.issues)throw new Je(a.issues);return a.output}function gd(t,e,r,a){const[i,n,o]=fn(e,r,a);return at(Object.entries(t.entries).reduce((s,[l,u])=>({...s,[l]:Se(u)}),{}),i,n,o)}function bd(t,e,r){const a=t._parse(e,r);return a.issues?{success:!1,error:new Je(a.issues),issues:a.issues}:{success:!0,data:a.output,output:a.output}}function wn(t,e,r){return{...t,_parse(a,i){const n=t._parse(a,i);if(n.issues)return n;const o=e(n.output);return r&&!Array.isArray(r)?r._parse(o,i):Dt(o,r,i,typeof o)}}}var vd=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function wd(t,e="Invalid input"){return{type:"custom",async:!1,message:e,requirement:t,_parse(r){return this.requirement(r)?rt(r):jt(this.type,this.message,r,this.requirement)}}}function md(t="Invalid email"){return{type:"email",async:!1,message:t,requirement:vd,_parse(e){return this.requirement.test(e)?rt(e):jt(this.type,this.message,e,this.requirement)}}}function Ze(t,e="Invalid length"){return{type:"max_length",async:!1,message:e,requirement:t,_parse(r){return r.length>this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function _d(t,e="Invalid value"){return{type:"max_value",async:!1,message:e,requirement:t,_parse(r){return r>this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function Qe(t,e="Invalid length"){return{type:"min_length",async:!1,message:e,requirement:t,_parse(r){return r.length<this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function yd(t,e="Invalid value"){return{type:"min_value",async:!1,message:e,requirement:t,_parse(r){return r<this.requirement?jt(this.type,this.message,r,this.requirement):rt(r)}}}function mn(t,e="Invalid regex"){return{type:"regex",async:!1,message:e,requirement:t,_parse(r){return this.requirement.test(r)?rt(r):jt(this.type,this.message,r,this.requirement)}}}function xd(t="Invalid URL"){return{type:"url",async:!1,message:t,requirement(e){try{return new URL(e),!0}catch{return!1}},_parse(e){return this.requirement(e)?rt(e):jt(this.type,this.message,e,this.requirement)}}}function _n(t){var e,r,a="";if(typeof t=="string"||typeof t=="number")a+=t;else if(typeof t=="object")if(Array.isArray(t))for(e=0;e<t.length;e++)t[e]&&(r=_n(t[e]))&&(a&&(a+=" "),a+=r);else for(e in t)t[e]&&(a&&(a+=" "),a+=e);return a}function Jt(){for(var t,e,r=0,a="";r<arguments.length;)(t=arguments[r++])&&(e=_n(t))&&(a&&(a+=" "),a+=e);return a}const yn=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,xn=Jt,Ce=(t,e)=>r=>{var a;if((e==null?void 0:e.variants)==null)return xn(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:n}=e,o=Object.keys(i).map(u=>{const h=r==null?void 0:r[u],d=n==null?void 0:n[u];if(h===null)return null;const p=yn(h)||yn(d);return i[u][p]}),s=r&&Object.entries(r).reduce((u,h)=>{let[d,p]=h;return p===void 0||(u[d]=p),u},{}),l=e==null||(a=e.compoundVariants)===null||a===void 0?void 0:a.reduce((u,h)=>{let{class:d,className:p,...v}=h;return Object.entries(v).every(g=>{let[_,k]=g;return Array.isArray(k)?k.includes({...n,...s}[_]):{...n,...s}[_]===k})?[...u,d,p]:u},[]);return xn(t,o,l,r==null?void 0:r.class,r==null?void 0:r.className)};var zt,z,Fr,kn,de=0,Sn=[],tr=[],Cn=C.__b,$n=C.__r,En=C.diffed,In=C.__c,Tn=C.unmount;function ue(t,e){C.__h&&C.__h(z,t,de||e),de=0;var r=z.__H||(z.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({__V:tr}),r.__[t]}function bt(t){return de=1,An(Pn,t)}function An(t,e,r){var a=ue(zt++,2);if(a.t=t,!a.__c&&(a.__=[r?r(e):Pn(void 0,e),function(s){var l=a.__N?a.__N[0]:a.__[0],u=a.t(l,s);l!==u&&(a.__N=[u,a.__[1]],a.__c.setState({}))}],a.__c=z,!z.u)){var i=function(s,l,u){if(!a.__c.__H)return!0;var h=a.__c.__H.__.filter(function(p){return p.__c});if(h.every(function(p){return!p.__N}))return!n||n.call(this,s,l,u);var d=!1;return h.forEach(function(p){if(p.__N){var v=p.__[0];p.__=p.__N,p.__N=void 0,v!==p.__[0]&&(d=!0)}}),!(!d&&a.__c.props===s)&&(!n||n.call(this,s,l,u))};z.u=!0;var n=z.shouldComponentUpdate,o=z.componentWillUpdate;z.componentWillUpdate=function(s,l,u){if(this.__e){var h=n;n=void 0,i(s,l,u),n=h}o&&o.call(this,s,l,u)},z.shouldComponentUpdate=i}return a.__N||a.__}function _t(t,e){var r=ue(zt++,3);!C.__s&&Dr(r.__H,e)&&(r.__=t,r.i=e,z.__H.__h.push(r))}function dt(t,e){var r=ue(zt++,4);!C.__s&&Dr(r.__H,e)&&(r.__=t,r.i=e,z.__h.push(r))}function ut(t){return de=5,Pt(function(){return{current:t}},[])}function kd(t,e,r){de=6,dt(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},r==null?r:r.concat(t))}function Pt(t,e){var r=ue(zt++,7);return Dr(r.__H,e)?(r.__V=t(),r.i=e,r.__h=t,r.__V):r.__}function Sd(t,e){return de=8,Pt(function(){return t},e)}function Mn(t){var e=z.context[t.__c],r=ue(zt++,9);return r.c=t,e?(r.__==null&&(r.__=!0,e.sub(z)),e.props.value):t.__}function Cd(t,e){C.useDebugValue&&C.useDebugValue(e?e(t):t)}function $d(){var t=ue(zt++,11);if(!t.__){for(var e=z.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var r=e.__m||(e.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function Ed(){for(var t;t=Sn.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(er),t.__H.__h.forEach(Lr),t.__H.__h=[]}catch(e){t.__H.__h=[],C.__e(e,t.__v)}}C.__b=function(t){z=null,Cn&&Cn(t)},C.__r=function(t){$n&&$n(t),zt=0;var e=(z=t.__c).__H;e&&(Fr===z?(e.__h=[],z.__h=[],e.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=tr,r.__N=r.i=void 0})):(e.__h.forEach(er),e.__h.forEach(Lr),e.__h=[],zt=0)),Fr=z},C.diffed=function(t){En&&En(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Sn.push(e)!==1&&kn===C.requestAnimationFrame||((kn=C.requestAnimationFrame)||Id)(Ed)),e.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==tr&&(r.__=r.__V),r.i=void 0,r.__V=tr})),Fr=z=null},C.__c=function(t,e){e.some(function(r){try{r.__h.forEach(er),r.__h=r.__h.filter(function(a){return!a.__||Lr(a)})}catch(a){e.some(function(i){i.__h&&(i.__h=[])}),e=[],C.__e(a,r.__v)}}),In&&In(t,e)},C.unmount=function(t){Tn&&Tn(t);var e,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(a){try{er(a)}catch(i){e=i}}),r.__H=void 0,e&&C.__e(e,r.__v))};var Nn=typeof requestAnimationFrame=="function";function Id(t){var e,r=function(){clearTimeout(a),Nn&&cancelAnimationFrame(e),setTimeout(t)},a=setTimeout(r,100);Nn&&(e=requestAnimationFrame(r))}function er(t){var e=z,r=t.__c;typeof r=="function"&&(t.__c=void 0,r()),z=e}function Lr(t){var e=z;t.__c=t.__(),z=e}function Dr(t,e){return!t||t.length!==e.length||e.some(function(r,a){return r!==t[a]})}function Pn(t,e){return typeof e=="function"?e(t):e}function On(t,e){for(var r in e)t[r]=e[r];return t}function Vr(t,e){for(var r in t)if(r!=="__source"&&!(r in e))return!0;for(var a in e)if(a!=="__source"&&t[a]!==e[a])return!0;return!1}function jr(t,e){return t===e&&(t!==0||1/t==1/e)||t!=t&&e!=e}function zr(t){this.props=t}function Td(t,e){function r(i){var n=this.props.ref,o=n==i.ref;return!o&&n&&(n.call?n(null):n.current=null),e?!e(this.props,i)||!o:Vr(this.props,i)}function a(i){return this.shouldComponentUpdate=r,ct(t,i)}return a.displayName="Memo("+(t.displayName||t.name)+")",a.prototype.isReactComponent=!0,a.__f=!0,a}(zr.prototype=new mt).isPureReactComponent=!0,zr.prototype.shouldComponentUpdate=function(t,e){return Vr(this.props,t)||Vr(this.state,e)};var Fn=C.__b;C.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Fn&&Fn(t)};var Ad=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Rr(t){function e(r){var a=On({},r);return delete a.ref,t(a,r.ref||null)}return e.$$typeof=Ad,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Ln=function(t,e){return t==null?null:Mt(Mt(t).map(e))},Md={map:Ln,forEach:Ln,count:function(t){return t?Mt(t).length:0},only:function(t){var e=Mt(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Mt},Nd=C.__e;C.__e=function(t,e,r,a){if(t.then){for(var i,n=e;n=n.__;)if((i=n.__c)&&i.__c)return e.__e==null&&(e.__e=r.__e,e.__k=r.__k),i.__c(t,e)}Nd(t,e,r,a)};var Dn=C.unmount;function Vn(t,e,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(a){typeof a.__c=="function"&&a.__c()}),t.__c.__H=null),(t=On({},t)).__c!=null&&(t.__c.__P===r&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(a){return Vn(a,e,r)})),t}function jn(t,e,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(a){return jn(a,e,r)}),t.__c&&t.__c.__P===e&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}function $e(){this.__u=0,this.t=null,this.__b=null}function zn(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Rn(t){var e,r,a;function i(n){if(e||(e=t()).then(function(o){r=o.default||o},function(o){a=o}),a)throw a;if(!r)throw e;return ct(r,n)}return i.displayName="Lazy",i.__f=!0,i}function Ee(){this.u=null,this.o=null}C.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&t.__h===!0&&(t.type=null),Dn&&Dn(t)},($e.prototype=new mt).__c=function(t,e){var r=e.__c,a=this;a.t==null&&(a.t=[]),a.t.push(r);var i=zn(a.__v),n=!1,o=function(){n||(n=!0,r.__R=null,i?i(s):s())};r.__R=o;var s=function(){if(!--a.__u){if(a.state.__a){var u=a.state.__a;a.__v.__k[0]=jn(u,u.__c.__P,u.__c.__O)}var h;for(a.setState({__a:a.__b=null});h=a.t.pop();)h.forceUpdate()}},l=e.__h===!0;a.__u++||l||a.setState({__a:a.__b=a.__v.__k[0]}),t.then(o,o)},$e.prototype.componentWillUnmount=function(){this.t=[]},$e.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),a=this.__v.__k[0].__c;this.__v.__k[0]=Vn(this.__b,r,a.__O=a.__P)}this.__b=null}var i=e.__a&&ct(W,null,t.fallback);return i&&(i.__h=null),[ct(W,null,e.__a?null:t.children),i]};var Bn=function(t,e,r){if(++r[1]===r[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(r=t.u;r;){for(;r.length>3;)r.pop()();if(r[1]<r[0])break;t.u=r=r[2]}};function Pd(t){return this.getChildContext=function(){return t.context},t.children}function Od(t){var e=this,r=t.i;e.componentWillUnmount=function(){ce(null,e.l),e.l=null,e.i=null},e.i&&e.i!==r&&e.componentWillUnmount(),t.__v?(e.l||(e.i=r,e.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(a){this.childNodes.push(a),e.i.appendChild(a)},insertBefore:function(a,i){this.childNodes.push(a),e.i.appendChild(a)},removeChild:function(a){this.childNodes.splice(this.childNodes.indexOf(a)>>>1,1),e.i.removeChild(a)}}),ce(ct(Pd,{context:e.context},t.__v),e.l)):e.l&&e.componentWillUnmount()}function Fd(t,e){var r=ct(Od,{__v:t,i:e});return r.containerInfo=e,r}(Ee.prototype=new mt).__a=function(t){var e=this,r=zn(e.__v),a=e.o.get(t);return a[0]++,function(i){var n=function(){e.props.revealOrder?(a.push(i),Bn(e,t,a)):i()};r?r(n):n()}},Ee.prototype.render=function(t){this.u=null,this.o=new Map;var e=Mt(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var r=e.length;r--;)this.o.set(e[r],this.u=[1,0,this.u]);return t.children},Ee.prototype.componentDidUpdate=Ee.prototype.componentDidMount=function(){var t=this;this.o.forEach(function(e,r){Bn(t,r,e)})};var Un=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Ld=/^(?: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]/,Dd=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Vd=/[A-Z0-9]/g,jd=typeof document<"u",zd=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function Rd(t,e,r){return e.__k==null&&(e.textContent=""),ce(t,e),typeof r=="function"&&r(),t?t.__c:null}function Bd(t,e,r){return ln(t,e),typeof r=="function"&&r(),t?t.__c:null}mt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(mt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Hn=C.event;function Ud(){}function Hd(){return this.cancelBubble}function qd(){return this.defaultPrevented}C.event=function(t){return Hn&&(t=Hn(t)),t.persist=Ud,t.isPropagationStopped=Hd,t.isDefaultPrevented=qd,t.nativeEvent=t};var Br,Kd={enumerable:!1,configurable:!0,get:function(){return this.class}},qn=C.vnode;C.vnode=function(t){typeof t.type=="string"&&function(e){var r=e.props,a=e.type,i={};for(var n in r){var o=r[n];if(!(n==="value"&&"defaultValue"in r&&o==null||jd&&n==="children"&&a==="noscript"||n==="class"||n==="className")){var s=n.toLowerCase();n==="defaultValue"&&"value"in r&&r.value==null?n="value":n==="download"&&o===!0?o="":s==="ondoubleclick"?n="ondblclick":s!=="onchange"||a!=="input"&&a!=="textarea"||zd(r.type)?s==="onfocus"?n="onfocusin":s==="onblur"?n="onfocusout":Dd.test(n)?n=s:a.indexOf("-")===-1&&Ld.test(n)?n=n.replace(Vd,"-$&").toLowerCase():o===null&&(o=void 0):s=n="oninput",s==="oninput"&&i[n=s]&&(n="oninputCapture"),i[n]=o}}a=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Mt(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),a=="select"&&i.defaultValue!=null&&(i.value=Mt(r.children).forEach(function(l){l.props.selected=i.multiple?i.defaultValue.indexOf(l.props.value)!=-1:i.defaultValue==l.props.value})),r.class&&!r.className?(i.class=r.class,Object.defineProperty(i,"className",Kd)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),e.props=i}(t),t.$$typeof=Un,qn&&qn(t)};var Kn=C.__r;C.__r=function(t){Kn&&Kn(t),Br=t.__c};var Gn=C.diffed;C.diffed=function(t){Gn&&Gn(t);var e=t.props,r=t.__e;r!=null&&t.type==="textarea"&&"value"in e&&e.value!==r.value&&(r.value=e.value==null?"":e.value),Br=null};var Gd={ReactCurrentDispatcher:{current:{readContext:function(t){return Br.__n[t.__c].props.value}}}};function Wd(t){return ct.bind(null,t)}function Wn(t){return!!t&&t.$$typeof===Un}function Yd(t){return Wn(t)?id.apply(null,arguments):t}function Jd(t){return!!t.__k&&(ce(null,t),!0)}function Xd(t){return t&&(t.base||t.nodeType===1&&t)||null}var Zd=function(t,e){return t(e)},Qd=function(t,e){return t(e)},tu=W;function Yn(t){t()}function eu(t){return t}function ru(){return[!1,Yn]}var au=dt;function nu(t,e){var r=e(),a=bt({h:{__:r,v:e}}),i=a[0].h,n=a[1];return dt(function(){i.__=r,i.v=e,jr(i.__,e())||n({h:i})},[t,r,e]),_t(function(){return jr(i.__,i.v())||n({h:i}),t(function(){jr(i.__,i.v())||n({h:i})})},[t]),r}var kt={useState:bt,useId:$d,useReducer:An,useEffect:_t,useLayoutEffect:dt,useInsertionEffect:au,useTransition:ru,useDeferredValue:eu,useSyncExternalStore:nu,startTransition:Yn,useRef:ut,useImperativeHandle:kd,useMemo:Pt,useCallback:Sd,useContext:Mn,useDebugValue:Cd,version:"17.0.2",Children:Md,render:Rd,hydrate:Bd,unmountComponentAtNode:Jd,createPortal:Fd,createElement:ct,createContext:cn,createFactory:Wd,cloneElement:Yd,createRef:td,Fragment:W,isValidElement:Wn,findDOMNode:Xd,Component:mt,PureComponent:zr,memo:Td,forwardRef:Rr,flushSync:Qd,unstable_batchedUpdates:Zd,StrictMode:tu,Suspense:$e,SuspenseList:Ee,lazy:Rn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Gd};const ot=Symbol.for("@ts-pattern/matcher"),Jn=Symbol.for("@ts-pattern/isVariadic"),rr="@ts-pattern/anonymous-select-key",Ur=t=>!!(t&&typeof t=="object"),ar=t=>t&&!!t[ot],Y=(t,e,r)=>{if(ar(t)){const a=t[ot](),{matched:i,selections:n}=a.match(e);return i&&n&&Object.keys(n).forEach(o=>r(o,n[o])),i}if(Ur(t)){if(!Ur(e))return!1;if(Array.isArray(t)){if(!Array.isArray(e))return!1;let a=[],i=[],n=[];for(const o of t.keys()){const s=t[o];ar(s)&&s[Jn]?n.push(s):n.length?i.push(s):a.push(s)}if(n.length){if(n.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(e.length<a.length+i.length)return!1;const o=e.slice(0,a.length),s=i.length===0?[]:e.slice(-i.length),l=e.slice(a.length,i.length===0?1/0:-i.length);return a.every((u,h)=>Y(u,o[h],r))&&i.every((u,h)=>Y(u,s[h],r))&&(n.length===0||Y(n[0],l,r))}return t.length===e.length&&t.every((o,s)=>Y(o,e[s],r))}return Object.keys(t).every(a=>{const i=t[a];return(a in e||ar(n=i)&&n[ot]().matcherType==="optional")&&Y(i,e[a],r);var n})}return Object.is(e,t)},ft=t=>{var e,r,a;return Ur(t)?ar(t)?(e=(r=(a=t[ot]()).getSelectionKeys)==null?void 0:r.call(a))!=null?e:[]:Array.isArray(t)?Ie(t,ft):Ie(Object.values(t),ft):[]},Ie=(t,e)=>t.reduce((r,a)=>r.concat(e(a)),[]);function iu(...t){if(t.length===1){const[e]=t;return r=>Y(e,r,()=>{})}if(t.length===2){const[e,r]=t;return Y(e,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${t.length}.`)}function Q(t){return Object.assign(t,{optional:()=>qr(t),and:e=>R(t,e),or:e=>Xn(t,e),select:e=>e===void 0?Te(t):Te(e,t)})}function Hr(t){return Object.assign((e=>Object.assign(e,{*[Symbol.iterator](){yield Object.assign(e,{[Jn]:!0})}}))(t),{optional:()=>Hr(qr(t)),select:e=>Hr(e===void 0?Te(t):Te(e,t))})}function qr(t){return Q({[ot]:()=>({match:e=>{let r={};const a=(i,n)=>{r[i]=n};return e===void 0?(ft(t).forEach(i=>a(i,void 0)),{matched:!0,selections:r}):{matched:Y(t,e,a),selections:r}},getSelectionKeys:()=>ft(t),matcherType:"optional"})})}const ou=(t,e)=>{for(const r of t)if(!e(r))return!1;return!0},su=(t,e)=>{for(const[r,a]of t.entries())if(!e(a,r))return!1;return!0};function R(...t){return Q({[ot]:()=>({match:e=>{let r={};const a=(i,n)=>{r[i]=n};return{matched:t.every(i=>Y(i,e,a)),selections:r}},getSelectionKeys:()=>Ie(t,ft),matcherType:"and"})})}function Xn(...t){return Q({[ot]:()=>({match:e=>{let r={};const a=(i,n)=>{r[i]=n};return Ie(t,ft).forEach(i=>a(i,void 0)),{matched:t.some(i=>Y(i,e,a)),selections:r}},getSelectionKeys:()=>Ie(t,ft),matcherType:"or"})})}function O(t){return{[ot]:()=>({match:e=>({matched:!!t(e)})})}}function Te(...t){const e=typeof t[0]=="string"?t[0]:void 0,r=t.length===2?t[1]:typeof t[0]=="string"?void 0:t[0];return Q({[ot]:()=>({match:a=>{let i={[e??rr]:a};return{matched:r===void 0||Y(r,a,(n,o)=>{i[n]=o}),selections:i}},getSelectionKeys:()=>[e??rr].concat(r===void 0?[]:ft(r))})})}function St(t){return typeof t=="number"}function Xt(t){return typeof t=="string"}function Rt(t){return typeof t=="bigint"}const Zn=Q(O(function(t){return!0})),lu=Zn,Zt=t=>Object.assign(Q(t),{startsWith:e=>{return Zt(R(t,(r=e,O(a=>Xt(a)&&a.startsWith(r)))));var r},endsWith:e=>{return Zt(R(t,(r=e,O(a=>Xt(a)&&a.endsWith(r)))));var r},minLength:e=>Zt(R(t,(r=>O(a=>Xt(a)&&a.length>=r))(e))),maxLength:e=>Zt(R(t,(r=>O(a=>Xt(a)&&a.length<=r))(e))),includes:e=>{return Zt(R(t,(r=e,O(a=>Xt(a)&&a.includes(r)))));var r},regex:e=>{return Zt(R(t,(r=e,O(a=>Xt(a)&&!!a.match(r)))));var r}}),cu=Zt(O(Xt)),Ct=t=>Object.assign(Q(t),{between:(e,r)=>Ct(R(t,((a,i)=>O(n=>St(n)&&a<=n&&i>=n))(e,r))),lt:e=>Ct(R(t,(r=>O(a=>St(a)&&a<r))(e))),gt:e=>Ct(R(t,(r=>O(a=>St(a)&&a>r))(e))),lte:e=>Ct(R(t,(r=>O(a=>St(a)&&a<=r))(e))),gte:e=>Ct(R(t,(r=>O(a=>St(a)&&a>=r))(e))),int:()=>Ct(R(t,O(e=>St(e)&&Number.isInteger(e)))),finite:()=>Ct(R(t,O(e=>St(e)&&Number.isFinite(e)))),positive:()=>Ct(R(t,O(e=>St(e)&&e>0))),negative:()=>Ct(R(t,O(e=>St(e)&&e<0)))}),du=Ct(O(St)),Bt=t=>Object.assign(Q(t),{between:(e,r)=>Bt(R(t,((a,i)=>O(n=>Rt(n)&&a<=n&&i>=n))(e,r))),lt:e=>Bt(R(t,(r=>O(a=>Rt(a)&&a<r))(e))),gt:e=>Bt(R(t,(r=>O(a=>Rt(a)&&a>r))(e))),lte:e=>Bt(R(t,(r=>O(a=>Rt(a)&&a<=r))(e))),gte:e=>Bt(R(t,(r=>O(a=>Rt(a)&&a>=r))(e))),positive:()=>Bt(R(t,O(e=>Rt(e)&&e>0))),negative:()=>Bt(R(t,O(e=>Rt(e)&&e<0)))}),uu=Bt(O(Rt)),fu=Q(O(function(t){return typeof t=="boolean"})),hu=Q(O(function(t){return typeof t=="symbol"})),pu=Q(O(function(t){return t==null}));var A={__proto__:null,matcher:ot,optional:qr,array:function(...t){return Hr({[ot]:()=>({match:e=>{if(!Array.isArray(e))return{matched:!1};if(t.length===0)return{matched:!0};const r=t[0];let a={};if(e.length===0)return ft(r).forEach(n=>{a[n]=[]}),{matched:!0,selections:a};const i=(n,o)=>{a[n]=(a[n]||[]).concat([o])};return{matched:e.every(n=>Y(r,n,i)),selections:a}},getSelectionKeys:()=>t.length===0?[]:ft(t[0])})})},set:function(...t){return Q({[ot]:()=>({match:e=>{if(!(e instanceof Set))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};if(t.length===0)return{matched:!0};const a=(n,o)=>{r[n]=(r[n]||[]).concat([o])},i=t[0];return{matched:ou(e,n=>Y(i,n,a)),selections:r}},getSelectionKeys:()=>t.length===0?[]:ft(t[0])})})},map:function(...t){return Q({[ot]:()=>({match:e=>{if(!(e instanceof Map))return{matched:!1};let r={};if(e.size===0)return{matched:!0,selections:r};const a=(s,l)=>{r[s]=(r[s]||[]).concat([l])};if(t.length===0)return{matched:!0};var i;if(t.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=t[0])==null?void 0:i.toString()}`);const[n,o]=t;return{matched:su(e,(s,l)=>{const u=Y(n,l,a),h=Y(o,s,a);return u&&h}),selections:r}},getSelectionKeys:()=>t.length===0?[]:[...ft(t[0]),...ft(t[1])]})})},intersection:R,union:Xn,not:function(t){return Q({[ot]:()=>({match:e=>({matched:!Y(t,e,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:O,select:Te,any:Zn,_:lu,string:cu,number:du,bigint:uu,boolean:fu,symbol:hu,nullish:pu,instanceOf:function(t){return Q(O(function(e){return r=>r instanceof e}(t)))},shape:function(t){return Q(O(iu(t)))}};const Kr={matched:!1,value:void 0};function Qt(t){return new nr(t,Kr)}class nr{constructor(e,r){this.input=void 0,this.state=void 0,this.input=e,this.state=r}with(...e){if(this.state.matched)return this;const r=e[e.length-1],a=[e[0]];let i;e.length===3&&typeof e[1]=="function"?i=e[1]:e.length>2&&a.push(...e.slice(1,e.length-1));let n=!1,o={};const s=(u,h)=>{n=!0,o[u]=h},l=!a.some(u=>Y(u,this.input,s))||i&&!i(this.input)?Kr:{matched:!0,value:r(n?rr in o?o[rr]:o:this.input,this.input)};return new nr(this.input,l)}when(e,r){if(this.state.matched)return this;const a=!!e(this.input);return new nr(this.input,a?{matched:!0,value:r(this.input,this.input)}:Kr)}otherwise(e){return this.state.matched?this.state.value:e(this.input)}exhaustive(){if(this.state.matched)return this.state.value;let e;try{e=JSON.stringify(this.input)}catch{e=this.input}throw new Error(`Pattern matching error: no pattern matches value ${e}`)}run(){return this.exhaustive()}returnType(){return this}}var gu=["other","few","many","two","one","zero"],Qn=({terms:t,overrides:e,locale:r})=>{const a=new Intl.PluralRules(r);function i(n,o){const s=(e==null?void 0:e[n])??t[n];switch(typeof s){case"string":return s.replace(/{{(\w+)}}/g,(l,u)=>{var h;return((h=o==null?void 0:o[u])==null?void 0:h.toString())??""});case"object":{if(typeof(o==null?void 0:o.count)!="number")throw new Error(`Missing count for translation key “${n.toString()}”`);let l=a.select(o.count);if(!(l in s)){const u=gu.find(h=>h in s);if(!u)throw new Error(`Missing plural rule for translation key “${n.toString()}”`);l=u}return s[l].replace(/{{(\w+)}}/g,(u,h)=>{var d;return((d=o==null?void 0:o[h])==null?void 0:d.toString())??""})}default:throw new Error(`Invalid translation value in dictionary for key “${n.toString()}”.`)}}return i},bu=0;function c(t,e,r,a,i,n){var o,s,l={};for(s in e)s=="ref"?o=e[s]:l[s]=e[s];var u={type:t,props:l,key:r,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--bu,__source:i,__self:n};if(typeof t=="function"&&(o=t.defaultProps))for(s in o)l[s]===void 0&&(l[s]=o[s]);return C.vnode&&C.vnode(u),u}var ti=cn(null),vu=t=>({TranslationProvider:({terms:e,children:r,locale:a})=>{const i=Pt(()=>(console.log("instantiating"),Qn({locale:a,terms:t,overrides:e})),[e,a]);return c(ti.Provider,{value:{t:i,locale:a},children:r})},useTranslation:()=>{const e=Mn(ti);if(e===null)throw new Error("Please wrap useTranslation in a TranslationProvider");return{t:e.t,locale:e.locale}},createTFunction:({overrides:e,locale:r})=>Qn({terms:t,overrides:e,locale:r})});const{TranslationProvider:wu,useTranslation:ht,createTFunction:mu}=vu({error_heading:"Something unexpected happened",undo:"Undo",send:"Send",skip:"Skip",skipped:"Skipped",submission_redirect_message:"Almost there! Please complete your submission here:",complete_submission:"Complete submission",submission_completed:"Submission completed!",submission_failed:"Failed to submit",maximize:"Maximise",minimize:"Minimise",close_application:"Close application",applying_for:"Applying for “{{title}}”",invalid_state:"Invalid application state",redirect_url_error:"Couldn’t get the redirect URL.",upload_file:{one:"Select file to upload",other:"Select files to upload"},file_max_size:"max {{size}}",file_extensions:"Accepted file extensions",address_error:"Something went wrong! Plase continue manually",address_search:"Type and search for places…",address_manual:"Fill in manually",back:"Back",search:"Search",unknown_error:"An error occurred",validation_max_chars:"Please enter no more than {{count}} characters",validation_min_chars:"Please enter {{count}} or more characters",validation_phone:"Please enter a valid phone number",validation_country_code:"Please select a country code",validation_number:"Please enter a valid number",validation_number_min:"Please enter a number greater than or equal to {{min}}",validation_number_max:"Please enter a number less than or equal to {{max}}",validation_number_decimal_cases:"Please enter a number with at most {{count}} decimal cases",validation_file:"Please select a file",validation_file_ext:"Please only upload {{ext}} files",validation_file_max:{one:"Please only upload one file",other:"Please only upload up to {{count}} files"}}),xp="";function yt(t,e){if(!t)throw new Error(e)}function ir(){throw new Error("Cycle detected")}var _u=Symbol.for("preact-signals");function Gr(){if(fe>1)fe--;else{for(var t,e=!1;Ae!==void 0;){var r=Ae;for(Ae=void 0,Wr++;r!==void 0;){var a=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&ri(r))try{r.c()}catch(i){e||(t=i,e=!0)}r=a}}if(Wr=0,fe--,e)throw t}}var B=void 0,Ae=void 0,fe=0,Wr=0,or=0;function ei(t){if(B!==void 0){var e=t.n;if(e===void 0||e.t!==B)return e={i:0,S:t,p:B.s,n:void 0,t:B,e:void 0,x:void 0,r:e},B.s!==void 0&&(B.s.n=e),B.s=e,t.n=e,32&B.f&&t.S(e),e;if(e.i===-1)return e.i=0,e.n!==void 0&&(e.n.p=e.p,e.p!==void 0&&(e.p.n=e.n),e.p=B.s,e.n=void 0,B.s.n=e,B.s=e),e}}function J(t){this.v=t,this.i=0,this.n=void 0,this.t=void 0}J.prototype.brand=_u,J.prototype.h=function(){return!0},J.prototype.S=function(t){this.t!==t&&t.e===void 0&&(t.x=this.t,this.t!==void 0&&(this.t.e=t),this.t=t)},J.prototype.U=function(t){if(this.t!==void 0){var e=t.e,r=t.x;e!==void 0&&(e.x=r,t.e=void 0),r!==void 0&&(r.e=e,t.x=void 0),t===this.t&&(this.t=r)}},J.prototype.subscribe=function(t){var e=this;return Jr(function(){var r=e.value,a=32&this.f;this.f&=-33;try{t(r)}finally{this.f|=a}})},J.prototype.valueOf=function(){return this.value},J.prototype.toString=function(){return this.value+""},J.prototype.toJSON=function(){return this.value},J.prototype.peek=function(){return this.v},Object.defineProperty(J.prototype,"value",{get:function(){var t=ei(this);return t!==void 0&&(t.i=this.i),this.v},set:function(t){if(B instanceof Ht&&function(){throw new Error("Computed cannot have side-effects")}(),t!==this.v){Wr>100&&ir(),this.v=t,this.i++,or++,fe++;try{for(var e=this.t;e!==void 0;e=e.x)e.t.N()}finally{Gr()}}}});function Ut(t){return new J(t)}function ri(t){for(var e=t.s;e!==void 0;e=e.n)if(e.S.i!==e.i||!e.S.h()||e.S.i!==e.i)return!0;return!1}function ai(t){for(var e=t.s;e!==void 0;e=e.n){var r=e.S.n;if(r!==void 0&&(e.r=r),e.S.n=e,e.i=-1,e.n===void 0){t.s=e;break}}}function ni(t){for(var e=t.s,r=void 0;e!==void 0;){var a=e.p;e.i===-1?(e.S.U(e),a!==void 0&&(a.n=e.n),e.n!==void 0&&(e.n.p=a)):r=e,e.S.n=e.r,e.r!==void 0&&(e.r=void 0),e=a}t.s=r}function Ht(t){J.call(this,void 0),this.x=t,this.s=void 0,this.g=or-1,this.f=4}(Ht.prototype=new J).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===or))return!0;if(this.g=or,this.f|=1,this.i>0&&!ri(this))return this.f&=-2,!0;var t=B;try{ai(this),B=this;var e=this.x();(16&this.f||this.v!==e||this.i===0)&&(this.v=e,this.f&=-17,this.i++)}catch(r){this.v=r,this.f|=16,this.i++}return B=t,ni(this),this.f&=-2,!0},Ht.prototype.S=function(t){if(this.t===void 0){this.f|=36;for(var e=this.s;e!==void 0;e=e.n)e.S.S(e)}J.prototype.S.call(this,t)},Ht.prototype.U=function(t){if(this.t!==void 0&&(J.prototype.U.call(this,t),this.t===void 0)){this.f&=-33;for(var e=this.s;e!==void 0;e=e.n)e.S.U(e)}},Ht.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var t=this.t;t!==void 0;t=t.x)t.t.N()}},Ht.prototype.peek=function(){if(this.h()||ir(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ht.prototype,"value",{get:function(){1&this.f&&ir();var t=ei(this);if(this.h(),t!==void 0&&(t.i=this.i),16&this.f)throw this.v;return this.v}});function yu(t){return new Ht(t)}function ii(t){var e=t.u;if(t.u=void 0,typeof e=="function"){fe++;var r=B;B=void 0;try{e()}catch(a){throw t.f&=-2,t.f|=8,Yr(t),a}finally{B=r,Gr()}}}function Yr(t){for(var e=t.s;e!==void 0;e=e.n)e.S.U(e);t.x=void 0,t.s=void 0,ii(t)}function xu(t){if(B!==this)throw new Error("Out-of-order effect");ni(this),B=t,this.f&=-2,8&this.f&&Yr(this),Gr()}function Me(t){this.x=t,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Me.prototype.c=function(){var t=this.S();try{if(8&this.f||this.x===void 0)return;var e=this.x();typeof e=="function"&&(this.u=e)}finally{t()}},Me.prototype.S=function(){1&this.f&&ir(),this.f|=1,this.f&=-9,ii(this),ai(this),fe++;var t=B;return B=this,xu.bind(this,t)},Me.prototype.N=function(){2&this.f||(this.f|=2,this.o=Ae,Ae=this)},Me.prototype.d=function(){this.f|=8,1&this.f||Yr(this)};function Jr(t){var e=new Me(t);try{e.c()}catch(r){throw e.d(),r}return e.d.bind(e)}var Xr;function he(t,e){C[t]=e.bind(null,C[t]||function(){})}function sr(t){Xr&&Xr(),Xr=t&&t.S()}function oi(t){var e=this,r=t.data,a=Su(r);a.value=r;var i=Pt(function(){for(var n=e.__v;n=n.__;)if(n.__c){n.__c.__$f|=4;break}return e.__$u.c=function(){var o;!Ka(i.peek())&&((o=e.base)==null?void 0:o.nodeType)===3?e.base.data=i.peek():(e.__$f|=1,e.setState({}))},yu(function(){var o=a.value.value;return o===0?0:o===!0?"":o||""})},[]);return i.value}oi.displayName="_st",Object.defineProperties(J.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:oi},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),he("__b",function(t,e){if(typeof e.type=="string"){var r,a=e.props;for(var i in a)if(i!=="children"){var n=a[i];n instanceof J&&(r||(e.__np=r={}),r[i]=n,a[i]=n.peek())}}t(e)}),he("__r",function(t,e){sr();var r,a=e.__c;a&&(a.__$f&=-2,(r=a.__$u)===void 0&&(a.__$u=r=function(i){var n;return Jr(function(){n=this}),n.c=function(){a.__$f|=1,a.setState({})},n}())),sr(r),t(e)}),he("__e",function(t,e,r,a){sr(),t(e,r,a)}),he("diffed",function(t,e){sr();var r;if(typeof e.type=="string"&&(r=e.__e)){var a=e.__np,i=e.props;if(a){var n=r.U;if(n)for(var o in n){var s=n[o];s!==void 0&&!(o in a)&&(s.d(),n[o]=void 0)}else r.U=n={};for(var l in a){var u=n[l],h=a[l];u===void 0?(u=ku(r,l,h,i),n[l]=u):u.o(h,i)}}}t(e)});function ku(t,e,r,a){var i=e in t&&t.ownerSVGElement===void 0,n=Ut(r);return{o:function(o,s){n.value=o,a=s},d:Jr(function(){var o=n.value.value;a[e]!==o&&(a[e]=o,i?t[e]=o:o?t.setAttribute(e,o):t.removeAttribute(e))})}}he("unmount",function(t,e){if(typeof e.type=="string"){var r=e.__e;if(r){var a=r.U;if(a){r.U=void 0;for(var i in a){var n=a[i];n&&n.d()}}}}else{var o=e.__c;if(o){var s=o.__$u;s&&(o.__$u=void 0,s.d())}}t(e)}),he("__h",function(t,e,r,a){(a<3||a===9)&&(e.__$f|=2),t(e,r,a)}),mt.prototype.shouldComponentUpdate=function(t,e){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var a in e)return!0;for(var i in t)if(i!=="__source"&&t[i]!==this.props[i])return!0;for(var n in this.props)if(!(n in t))return!0;return!1};function Su(t){return Pt(function(){return Ut(t)},[])}const Zr=(t,e)=>e.some(r=>t instanceof r);let si,li;function Cu(){return si||(si=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function $u(){return li||(li=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const Qr=new WeakMap,ta=new WeakMap,lr=new WeakMap;function Eu(t){const e=new Promise((r,a)=>{const i=()=>{t.removeEventListener("success",n),t.removeEventListener("error",o)},n=()=>{r(te(t.result)),i()},o=()=>{a(t.error),i()};t.addEventListener("success",n),t.addEventListener("error",o)});return lr.set(e,t),e}function Iu(t){if(Qr.has(t))return;const e=new Promise((r,a)=>{const i=()=>{t.removeEventListener("complete",n),t.removeEventListener("error",o),t.removeEventListener("abort",o)},n=()=>{r(),i()},o=()=>{a(t.error||new DOMException("AbortError","AbortError")),i()};t.addEventListener("complete",n),t.addEventListener("error",o),t.addEventListener("abort",o)});Qr.set(t,e)}let ea={get(t,e,r){if(t instanceof IDBTransaction){if(e==="done")return Qr.get(t);if(e==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return te(t[e])},set(t,e,r){return t[e]=r,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function ci(t){ea=t(ea)}function Tu(t){return $u().includes(t)?function(...e){return t.apply(ra(this),e),te(this.request)}:function(...e){return te(t.apply(ra(this),e))}}function Au(t){return typeof t=="function"?Tu(t):(t instanceof IDBTransaction&&Iu(t),Zr(t,Cu())?new Proxy(t,ea):t)}function te(t){if(t instanceof IDBRequest)return Eu(t);if(ta.has(t))return ta.get(t);const e=Au(t);return e!==t&&(ta.set(t,e),lr.set(e,t)),e}const ra=t=>lr.get(t);function Mu(t,e,{blocked:r,upgrade:a,blocking:i,terminated:n}={}){const o=indexedDB.open(t,e),s=te(o);return a&&o.addEventListener("upgradeneeded",l=>{a(te(o.result),l.oldVersion,l.newVersion,te(o.transaction),l)}),r&&o.addEventListener("blocked",l=>r(l.oldVersion,l.newVersion,l)),s.then(l=>{n&&l.addEventListener("close",()=>n()),i&&l.addEventListener("versionchange",u=>i(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const Nu=["get","getKey","getAll","getAllKeys","count"],Pu=["put","add","delete","clear"],aa=new Map;function di(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(aa.get(e))return aa.get(e);const r=e.replace(/FromIndex$/,""),a=e!==r,i=Pu.includes(r);if(!(r in(a?IDBIndex:IDBObjectStore).prototype)||!(i||Nu.includes(r)))return;const n=async function(o,...s){const l=this.transaction(o,i?"readwrite":"readonly");let u=l.store;return a&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),i&&l.done]))[0]};return aa.set(e,n),n}ci(t=>({...t,get:(e,r,a)=>di(e,r)||t.get(e,r,a),has:(e,r)=>!!di(e,r)||t.has(e,r)}));const Ou=["continue","continuePrimaryKey","advance"],ui={},na=new WeakMap,fi=new WeakMap,Fu={get(t,e){if(!Ou.includes(e))return t[e];let r=ui[e];return r||(r=ui[e]=function(...a){na.set(this,fi.get(this)[e](...a))}),r}};async function*Lu(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const r=new Proxy(e,Fu);for(fi.set(r,e),lr.set(r,ra(e));e;)yield r,e=await(na.get(r)||e.continue()),na.delete(r)}function hi(t,e){return e===Symbol.asyncIterator&&Zr(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&Zr(t,[IDBIndex,IDBObjectStore])}ci(t=>({...t,get(e,r,a){return hi(e,r)?Lu:t.get(e,r,a)},has(e,r){return hi(e,r)||t.has(e,r)}}));const Ne=t=>Qt(t).with(A.number.lte(1e3),()=>`${Math.round(t)}KB`).with(A.number.lt(1e3*10),()=>`${(t/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(t/1e3)}MB`),pi=t=>{const e=t.find(r=>r.isHead);if(!e)throw new Error("No head node found");return e},Du=t=>Object.entries(t).reduce((r,[a,i])=>(r[a]=i.value,r),{}),pe=t=>e=>e?e.type===t:!1;class Pe extends Error{constructor(){super("Aborted")}}function Vu(t,e=300){let r;return(...a)=>{clearTimeout(r),r=setTimeout(()=>{t.apply(this,a)},e)}}const gi=t=>typeof t=="string",ju=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),bi=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:ju()}),zu=t=>Qt(t).with({nativeEvent:{submitter:A.select(A.union(A.instanceOf(HTMLButtonElement),A.instanceOf(HTMLInputElement)))}},e=>e).otherwise(()=>{throw new Error("invalid submitter")}),vi=typeof window>"u"?void 0:Mu("inploi-chatbot",3,{upgrade(t){try{t.deleteObjectStore("state")}catch{}t.createObjectStore("state")}}),Oe={getStateData:async(t,e)=>{var a;const r=wi({...t,flowKeys:e});return(a=await vi)==null?void 0:a.get("state",r)},setStateData:Vu(async t=>{var r;const e=wi(t);return(r=await vi)==null?void 0:r.put("state",t.data,e)},1e3)},cr=(t,e,r,a=0)=>{if(!e.nextId)return r(e.id,{stepsMade:a,remainingSteps:0}),{stepsMade:a,remainingSteps:0};const i=t.find(u=>u.id===e.nextId);if(i===void 0)return{stepsMade:a,remainingSteps:0};const n=e.type==="if-block"?e.branchId:void 0,o=t.find(u=>u.id===n),s=e.type.includes("question")?1:0;if(o){const u=s+Math.max(cr(t,i,r,a+s).remainingSteps,cr(t,o,r,a+s).remainingSteps);return r(e.id,{stepsMade:a,remainingSteps:u}),{stepsMade:a,remainingSteps:u}}const l=s+cr(t,i,r,a+s).remainingSteps;return r(e.id,{stepsMade:a,remainingSteps:l}),{stepsMade:a,remainingSteps:l}},Ru=t=>{const e={},r=t.find(a=>a.isHead);return r&&cr(t,r,(a,i)=>{e[a]=i}),e},wi=t=>[...t.flowKeys,t.id,t.version].join("/"),qt=Ut({state:"idle"}),Fe=t=>{const{state:e,flow:r}=qt.value;if(e!=="loaded")return;yt(r,"No flow to update");const a=t(r.data);r.data=a,qt.value={state:e,flow:r},Oe.setStateData(r)},T={current$:qt,viewState$:Ut("closed"),inputHeight$:Ut(53),startFlow:async({flow:t,context:e={},flowKeys:r,title:a,analytics:i,job:n})=>{const s={data:await Oe.getStateData(t,r)??bi(),startedAt:new Date,nodeIdToProgress:Ru(t.nodes),flowKeys:r,id:t.id,version:t.version,nodes:t.nodes,build:t.build,context:e,title:a,analytics:i,job:n};qt.value={state:"loaded",flow:s},Oe.setStateData(s)},cancelCurrentFlow:()=>{qt.value={state:"idle"},T.viewState$.value="closed"},markAsFinished:()=>Fe(t=>({...t,isFinished:!0})),setCurrentNodeId:t=>Fe(e=>(e.nodeHistory.push(t),e)),restart:()=>{const{state:t,flow:e}=qt.value;if(t!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=bi();qt.value={state:t,flow:{...e,data:r,startedAt:new Date}},Oe.setStateData(e)},addMessage:(t,e)=>{const r={...t,groupId:e};return Fe(a=>(a.messages.push(r),a))},removeMessagesSentByNodeIds:t=>{const{state:e,flow:r}=qt.value;yt(e==="loaded","Application not loaded");const a=r.data.messages.filter(i=>!i.groupId||!t.includes(i.groupId));r.data.messages=a,Oe.setStateData(r)},setSubmission:(t,e)=>Fe(r=>(e===null?delete r.submissions[t]:r.submissions[t]=e,r)),setInput:t=>Fe(e=>({...e,currentInput:t??null}))},Bu=({message:t})=>{const{t:e}=ht();return c("div",{class:"flex flex-grow flex-col items-center justify-center",children:[c("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:[c("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"}),c("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"}),c("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),c("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),c("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),c("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),c("path",{d:"M38 56h19"})]}),c("div",{class:"flex flex-col gap-2 text-center",children:[c("p",{class:"text-error-11 font-bold",children:e("error_heading")}),t&&c("p",{class:"text-neutral-9 text-sm",children:t})]})]})},mi=t=>c("svg",{role:"img",viewBox:"0 0 24 24",...t,children:[c("title",{children:"Loading"}),c("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)}}"}),c("g",{id:"s1",transform:"translate(12,0)",children:c("g",{id:"s2",transform:"scale(0,0)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s3",transform:"translate(12,12)",children:c("g",{id:"s4",transform:"scale(1,1)",children:c("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),c("g",{id:"s5",transform:"translate(12,0)",children:c("g",{id:"s6",transform:"scale(0,0)",children:c("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"})})}),c("g",{id:"s7",transform:"translate(12,0)",children:c("g",{id:"s8",transform:"scale(0,0)",children:c("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"})})})]}),_i=()=>c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(mi,{class:"text-neutral-6 h-8 w-8"})}),Uu=t=>{const r=t/100,a=1.3;return t<0?"0%":t>100?"100%":`${Math.round((1-(1-.1)*Math.pow(1-r,a))*100)}%`},dr=({class:t,children:e,...r})=>c("button",{class:Jt("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",t),...r,children:c("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:e})}),Hu=()=>{if(T.current$.value.state!=="loaded")return null;const t=T.current$.value.flow.nodeIdToProgress,e=T.current$.value.flow.data.nodeHistory.at(-1);if(e===void 0)return null;const r=t[e];if(r===void 0)return null;const a=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return c("div",{class:"bg-accent-3",children:c("div",{style:{width:Uu(a)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},qu=({children:t,params:e})=>{const{t:r}=ht(),a=T.viewState$;return c(W,{children:c("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:[c("div",{class:"flex h-[var(--header-height)] gap-2",children:[c("p",{id:"chatbot-status-bar",class:"sr-only",children:t}),c("button",{tabIndex:-1,onClick:()=>{a.value==="minimised"?a.value="maximised":a.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1",onTouchStart:ia,children:c("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:t})}),c("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:[e.feedback?c("div",{"data-widget":"inploi-feedback","data-key":"chatbot-header"}):null,a.value==="minimised"?c(W,{children:[c(dr,{class:"view-switch",onTouchStart:ia,"aria-label":r("maximize"),onClick:()=>a.value="maximised",children:c("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),c(dr,{"aria-label":r("close_application"),onClick:T.cancelCurrentFlow,children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):c(W,{children:[T.current$.value.state==="loaded"&&c(dr,{"aria-label":"Restart",onClick:()=>{T.restart()},children:[c("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"}),c("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),c(dr,{class:"view-switch",onTouchStart:ia,"aria-label":r("minimize"),onClick:()=>a.value="minimised",children:c("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})]})]}),c(Hu,{})]})})};function ia(){}const Ku=Rn(()=>Promise.resolve().then(()=>fp).then(t=>t.ChatbotBody)),yi=Ce("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 [&:has(.view-switch:active)]:scale-[0.98] transition-all duration-1000 ease-expo-out",{variants:{view:{closed:"hidden",minimised:"h-[var(--header-height)] animate-slide-in-bottom",maximised:"h-[var(--content-height)] animate-maximise"}}}),xi="outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",Gu=({open:t,...e})=>{const r=ut(null);return dt(()=>{const a=r.current;a&&(t?a.showModal():a.close())},[t]),c("dialog",{ref:r,...e})},Wu=({logger:t,apiClient:e,analytics:r,params:a})=>{const{state:i,flow:n,error:o}=T.current$.value,s=T.viewState$.value,l=i!=="idle"&&s==="maximised",u=ut(null),h=c(qu,{params:a,children:n==null?void 0:n.title});return c(wu,{terms:a.terms,locale:void 0,children:[c(Gu,{open:l,onClose:()=>T.viewState$.value="minimised",children:c("div",{ref:u,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:yi({view:"maximised"}),children:c("div",{class:xi,children:[h,Qt({state:i,view:s}).with({state:"idle"},()=>null).with({state:"loading"},()=>c(_i,{},"loading")).with({state:"loaded"},()=>c($e,{fallback:c(_i,{},"loading"),children:c(Ku,{analytics:r,apiClient:e,logger:t})})).with({state:"error"},()=>c(Bu,{message:o})).exhaustive()]})})}),s==="minimised"?c("div",{class:yi({view:"minimised",class:"z-100 isolate"}),children:c("div",{class:xi,children:h})}):null]})},ki=at({id:dn(Z(),String),version:Or(),build:Or(),nodes:pn(ld()),context_schema:Se(cd(vn(Z(),at({required:gn(),type:hd([bn("string"),bn("number")])}))))}),Yu=at({flow:ki}),Ju=at({company:at({name:Z()}),flow:ki,job:at({id:dn(Z(),String),title:Z()})}),Xu=`[data-widget=inploi-chatbot]{-webkit-touch-callout:none;-moz-user-select:none;-webkit-user-select:none;user-select:none;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){[data-widget=inploi-chatbot]{--content-height: min(640px, calc(100vh - 16px));--content-height: min(640px, calc(100svh - 16px)) }}[data-widget=inploi-chatbot]{--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}[data-widget=inploi-chatbot] em{font-style:italic}[data-widget=inploi-chatbot] strong{font-weight:700}[data-widget=inploi-chatbot] *{font-weight:inherit;font-style:inherit;box-sizing:border-box;font-family:inherit;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :after{box-sizing:border-box}[data-widget=inploi-chatbot] :is(ul,ol){list-style:none;padding:0;margin:0}[data-widget=inploi-chatbot] :is(p){margin:0;padding:0}[data-widget=inploi-chatbot] :is(li){margin:0;padding:0;list-style:none}[data-widget=inploi-chatbot] :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}[data-widget=inploi-chatbot] *,[data-widget=inploi-chatbot] :before,[data-widget=inploi-chatbot] :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: }[data-widget=inploi-chatbot] ::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: }[data-widget=inploi-chatbot] .container{width:100%}@media (min-width: 640px){[data-widget=inploi-chatbot] .container{max-width:640px}}@media (min-width: 768px){[data-widget=inploi-chatbot] .container{max-width:768px}}@media (min-width: 1024px){[data-widget=inploi-chatbot] .container{max-width:1024px}}@media (min-width: 1280px){[data-widget=inploi-chatbot] .container{max-width:1280px}}@media (min-width: 1536px){[data-widget=inploi-chatbot] .container{max-width:1536px}}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .visible{visibility:visible}[data-widget=inploi-chatbot] .invisible{visibility:hidden}[data-widget=inploi-chatbot] .collapse{visibility:collapse}[data-widget=inploi-chatbot] .static{position:static}[data-widget=inploi-chatbot] .fixed{position:fixed}[data-widget=inploi-chatbot] .absolute{position:absolute}[data-widget=inploi-chatbot] .relative{position:relative}[data-widget=inploi-chatbot] .sticky{position:sticky}[data-widget=inploi-chatbot] .inset-0{top:0;right:0;bottom:0;left:0}[data-widget=inploi-chatbot] .bottom-0{bottom:0}[data-widget=inploi-chatbot] .bottom-2{bottom:.5rem}[data-widget=inploi-chatbot] .bottom-2\\.5{bottom:.625rem}[data-widget=inploi-chatbot] .left-0{left:0}[data-widget=inploi-chatbot] .left-2{left:.5rem}[data-widget=inploi-chatbot] .right-0{right:0}[data-widget=inploi-chatbot] .right-2{right:.5rem}[data-widget=inploi-chatbot] .top-0{top:0}[data-widget=inploi-chatbot] .isolate{isolation:isolate}[data-widget=inploi-chatbot] .z-20{z-index:20}[data-widget=inploi-chatbot] .z-50{z-index:50}[data-widget=inploi-chatbot] .m-0{margin:0}[data-widget=inploi-chatbot] .mx-auto{margin-left:auto;margin-right:auto}[data-widget=inploi-chatbot] .mb-1{margin-bottom:.25rem}[data-widget=inploi-chatbot] .ml-auto{margin-left:auto}[data-widget=inploi-chatbot] .mt-auto{margin-top:auto}[data-widget=inploi-chatbot] .block{display:block}[data-widget=inploi-chatbot] .inline-block{display:inline-block}[data-widget=inploi-chatbot] .inline{display:inline}[data-widget=inploi-chatbot] .flex{display:flex}[data-widget=inploi-chatbot] .inline-flex{display:inline-flex}[data-widget=inploi-chatbot] .table{display:table}[data-widget=inploi-chatbot] .table-row{display:table-row}[data-widget=inploi-chatbot] .flow-root{display:flow-root}[data-widget=inploi-chatbot] .grid{display:grid}[data-widget=inploi-chatbot] .inline-grid{display:inline-grid}[data-widget=inploi-chatbot] .contents{display:contents}[data-widget=inploi-chatbot] .list-item{display:list-item}[data-widget=inploi-chatbot] .\\!hidden{display:none!important}[data-widget=inploi-chatbot] .hidden{display:none}[data-widget=inploi-chatbot] .h-1{height:.25rem}[data-widget=inploi-chatbot] .h-1\\.5{height:.375rem}[data-widget=inploi-chatbot] .h-16{height:4rem}[data-widget=inploi-chatbot] .h-4{height:1rem}[data-widget=inploi-chatbot] .h-48{height:12rem}[data-widget=inploi-chatbot] .h-8{height:2rem}[data-widget=inploi-chatbot] .h-\\[3px\\]{height:3px}[data-widget=inploi-chatbot] .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}[data-widget=inploi-chatbot] .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}[data-widget=inploi-chatbot] .h-full{height:100%}[data-widget=inploi-chatbot] .max-h-\\[calc\\(8lh\\+1rem\\)\\]{max-height:calc(8lh + 1rem)}[data-widget=inploi-chatbot] .max-h-full{max-height:100%}[data-widget=inploi-chatbot] .min-h-\\[36px\\]{min-height:36px}[data-widget=inploi-chatbot] .min-h-\\[calc\\(1lh\\+1rem\\)\\]{min-height:calc(1lh + 1rem)}[data-widget=inploi-chatbot] .w-1{width:.25rem}[data-widget=inploi-chatbot] .w-1\\.5{width:.375rem}[data-widget=inploi-chatbot] .w-16{width:4rem}[data-widget=inploi-chatbot] .w-24{width:6rem}[data-widget=inploi-chatbot] .w-4{width:1rem}[data-widget=inploi-chatbot] .w-64{width:16rem}[data-widget=inploi-chatbot] .w-8{width:2rem}[data-widget=inploi-chatbot] .w-full{width:100%}[data-widget=inploi-chatbot] .min-w-0{min-width:0px}[data-widget=inploi-chatbot] .min-w-\\[2rem\\]{min-width:2rem}[data-widget=inploi-chatbot] .max-w-\\[450px\\]{max-width:450px}[data-widget=inploi-chatbot] .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}[data-widget=inploi-chatbot] .max-w-\\[var\\(--radix-popover-content-available-width\\)\\]{max-width:var(--radix-popover-content-available-width)}[data-widget=inploi-chatbot] .max-w-full{max-width:100%}[data-widget=inploi-chatbot] .flex-1{flex:1 1 0%}[data-widget=inploi-chatbot] .flex-none{flex:none}[data-widget=inploi-chatbot] .flex-shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-shrink-0{flex-shrink:0}[data-widget=inploi-chatbot] .shrink{flex-shrink:1}[data-widget=inploi-chatbot] .flex-grow,[data-widget=inploi-chatbot] .grow{flex-grow:1}[data-widget=inploi-chatbot] .border-collapse{border-collapse:collapse}[data-widget=inploi-chatbot] .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))}[data-widget=inploi-chatbot] .scale-75{--tw-scale-x: .75;--tw-scale-y: .75;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))}[data-widget=inploi-chatbot] .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)}}[data-widget=inploi-chatbot] .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}}[data-widget=inploi-chatbot] .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes maximise{0%{transform:translateY(50%) scaleX(.7)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-maximise{animation:maximise .4s cubic-bezier(.16,1,.3,1)}@keyframes slide-in-bottom{0%{transform:translateY(-100%) scaleX(.82)}to{transform:translateY(0)}}[data-widget=inploi-chatbot] .animate-slide-in-bottom{animation:slide-in-bottom .3s cubic-bezier(.175,.885,.32,1.275)}[data-widget=inploi-chatbot] .cursor-pointer{cursor:pointer}[data-widget=inploi-chatbot] .select-none{-moz-user-select:none;-webkit-user-select:none;user-select:none}[data-widget=inploi-chatbot] .select-text{-moz-user-select:text;-webkit-user-select:text;user-select:text}[data-widget=inploi-chatbot] .resize-y{resize:vertical}[data-widget=inploi-chatbot] .resize{resize:both}[data-widget=inploi-chatbot] .appearance-none{-moz-appearance:none;-webkit-appearance:none;appearance:none}[data-widget=inploi-chatbot] .flex-col{flex-direction:column}[data-widget=inploi-chatbot] .flex-wrap{flex-wrap:wrap}[data-widget=inploi-chatbot] .items-center{align-items:center}[data-widget=inploi-chatbot] .items-stretch{align-items:stretch}[data-widget=inploi-chatbot] .justify-end{justify-content:flex-end}[data-widget=inploi-chatbot] .justify-center{justify-content:center}[data-widget=inploi-chatbot] .gap-0{gap:0px}[data-widget=inploi-chatbot] .gap-1{gap:.25rem}[data-widget=inploi-chatbot] .gap-1\\.5{gap:.375rem}[data-widget=inploi-chatbot] .gap-2{gap:.5rem}[data-widget=inploi-chatbot] .gap-2\\.5{gap:.625rem}[data-widget=inploi-chatbot] .gap-3{gap:.75rem}[data-widget=inploi-chatbot] .gap-4{gap:1rem}[data-widget=inploi-chatbot] .gap-px{gap:1px}[data-widget=inploi-chatbot] .overflow-hidden{overflow:hidden}[data-widget=inploi-chatbot] .overflow-y-auto{overflow-y:auto}[data-widget=inploi-chatbot] .overflow-y-scroll{overflow-y:scroll}[data-widget=inploi-chatbot] .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[data-widget=inploi-chatbot] .text-ellipsis{text-overflow:ellipsis}[data-widget=inploi-chatbot] .whitespace-nowrap{white-space:nowrap}[data-widget=inploi-chatbot] .break-words{overflow-wrap:break-word}[data-widget=inploi-chatbot] .rounded{border-radius:.25rem}[data-widget=inploi-chatbot] .rounded-2xl{border-radius:1rem}[data-widget=inploi-chatbot] .rounded-3xl{border-radius:1.5rem}[data-widget=inploi-chatbot] .rounded-\\[18px\\]{border-radius:18px}[data-widget=inploi-chatbot] .rounded-full{border-radius:9999px}[data-widget=inploi-chatbot] .rounded-lg{border-radius:.5rem}[data-widget=inploi-chatbot] .rounded-md{border-radius:.375rem}[data-widget=inploi-chatbot] .rounded-xl{border-radius:.75rem}[data-widget=inploi-chatbot] .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}[data-widget=inploi-chatbot] .rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}[data-widget=inploi-chatbot] .rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}[data-widget=inploi-chatbot] .rounded-bl-md{border-bottom-left-radius:.375rem}[data-widget=inploi-chatbot] .rounded-br-md{border-bottom-right-radius:.375rem}[data-widget=inploi-chatbot] .border{border-width:1px}[data-widget=inploi-chatbot] .border-b{border-bottom-width:1px}[data-widget=inploi-chatbot] .border-t{border-top-width:1px}[data-widget=inploi-chatbot] .border-solid{border-style:solid}[data-widget=inploi-chatbot] .border-dashed{border-style:dashed}[data-widget=inploi-chatbot] .border-accent-9{border-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .border-divider{border-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .border-neutral-5{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-neutral-8{border-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .border-transparent{border-color:transparent}[data-widget=inploi-chatbot] .border-b-neutral-3{border-bottom-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .border-b-neutral-5{border-bottom-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .border-b-transparent{border-bottom-color:transparent}[data-widget=inploi-chatbot] .bg-accent-1{background-color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .bg-accent-3{background-color:var(--i-color-a-3)}[data-widget=inploi-chatbot] .bg-accent-9{background-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .bg-bubble-weak-bg{background-color:var(--i-bubble-weak-bg)}[data-widget=inploi-chatbot] .bg-lowest{background-color:var(--i-color-lowest)}[data-widget=inploi-chatbot] .bg-neutral-1{background-color:var(--i-color-n-1)}[data-widget=inploi-chatbot] .bg-neutral-2{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .bg-neutral-3{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .bg-statusbar{background-color:var(--i-status-bar-bg)}[data-widget=inploi-chatbot] .bg-transparent{background-color:transparent}[data-widget=inploi-chatbot] .bg-none{background-image:none}[data-widget=inploi-chatbot] .p-1{padding:.25rem}[data-widget=inploi-chatbot] .p-1\\.5{padding:.375rem}[data-widget=inploi-chatbot] .p-10{padding:2.5rem}[data-widget=inploi-chatbot] .p-11{padding:2.75rem}[data-widget=inploi-chatbot] .p-12{padding:3rem}[data-widget=inploi-chatbot] .p-2{padding:.5rem}[data-widget=inploi-chatbot] .p-2\\.5{padding:.625rem}[data-widget=inploi-chatbot] .p-3{padding:.75rem}[data-widget=inploi-chatbot] .p-4{padding:1rem}[data-widget=inploi-chatbot] .p-5{padding:1.25rem}[data-widget=inploi-chatbot] .p-6{padding:1.5rem}[data-widget=inploi-chatbot] .p-7{padding:1.75rem}[data-widget=inploi-chatbot] .p-8{padding:2rem}[data-widget=inploi-chatbot] .p-9{padding:2.25rem}[data-widget=inploi-chatbot] .px-1{padding-left:.25rem;padding-right:.25rem}[data-widget=inploi-chatbot] .px-1\\.5{padding-left:.375rem;padding-right:.375rem}[data-widget=inploi-chatbot] .px-2{padding-left:.5rem;padding-right:.5rem}[data-widget=inploi-chatbot] .px-2\\.5{padding-left:.625rem;padding-right:.625rem}[data-widget=inploi-chatbot] .px-3{padding-left:.75rem;padding-right:.75rem}[data-widget=inploi-chatbot] .px-4{padding-left:1rem;padding-right:1rem}[data-widget=inploi-chatbot] .px-5{padding-left:1.25rem;padding-right:1.25rem}[data-widget=inploi-chatbot] .py-0{padding-top:0;padding-bottom:0}[data-widget=inploi-chatbot] .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}[data-widget=inploi-chatbot] .py-1{padding-top:.25rem;padding-bottom:.25rem}[data-widget=inploi-chatbot] .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}[data-widget=inploi-chatbot] .py-2{padding-top:.5rem;padding-bottom:.5rem}[data-widget=inploi-chatbot] .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}[data-widget=inploi-chatbot] .py-3{padding-top:.75rem;padding-bottom:.75rem}[data-widget=inploi-chatbot] .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}[data-widget=inploi-chatbot] .pb-2{padding-bottom:.5rem}[data-widget=inploi-chatbot] .pb-6{padding-bottom:1.5rem}[data-widget=inploi-chatbot] .pl-1{padding-left:.25rem}[data-widget=inploi-chatbot] .pl-1\\.5{padding-left:.375rem}[data-widget=inploi-chatbot] .pl-2{padding-left:.5rem}[data-widget=inploi-chatbot] .pl-2\\.5{padding-left:.625rem}[data-widget=inploi-chatbot] .pl-3{padding-left:.75rem}[data-widget=inploi-chatbot] .pl-4{padding-left:1rem}[data-widget=inploi-chatbot] .pr-1{padding-right:.25rem}[data-widget=inploi-chatbot] .pr-16{padding-right:4rem}[data-widget=inploi-chatbot] .pr-2{padding-right:.5rem}[data-widget=inploi-chatbot] .pr-2\\.5{padding-right:.625rem}[data-widget=inploi-chatbot] .pr-3{padding-right:.75rem}[data-widget=inploi-chatbot] .pr-4{padding-right:1rem}[data-widget=inploi-chatbot] .pt-2{padding-top:.5rem}[data-widget=inploi-chatbot] .pt-2\\.5{padding-top:.625rem}[data-widget=inploi-chatbot] .pt-3{padding-top:.75rem}[data-widget=inploi-chatbot] .pt-5{padding-top:1.25rem}[data-widget=inploi-chatbot] .pt-\\[calc\\(var\\(--header-height\\)\\+1rem\\)\\]{padding-top:calc(var(--header-height) + 1rem)}[data-widget=inploi-chatbot] .text-center{text-align:center}[data-widget=inploi-chatbot] .text-right{text-align:right}[data-widget=inploi-chatbot] .text-justify{text-align:justify}[data-widget=inploi-chatbot] .text-\\[10px\\]{font-size:10px}[data-widget=inploi-chatbot] .text-\\[11px\\]{font-size:11px}[data-widget=inploi-chatbot] .text-base{font-size:1rem;line-height:1.5rem}[data-widget=inploi-chatbot] .text-sm{font-size:.875rem;line-height:1.25rem}[data-widget=inploi-chatbot] .text-xs{font-size:.75rem;line-height:1rem}[data-widget=inploi-chatbot] .font-bold{font-weight:700}[data-widget=inploi-chatbot] .font-medium{font-weight:500}[data-widget=inploi-chatbot] .font-semibold{font-weight:600}[data-widget=inploi-chatbot] .uppercase{text-transform:uppercase}[data-widget=inploi-chatbot] .lowercase{text-transform:lowercase}[data-widget=inploi-chatbot] .capitalize{text-transform:capitalize}[data-widget=inploi-chatbot] .italic{font-style:italic}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .leading-3{line-height:.75rem}[data-widget=inploi-chatbot] .leading-snug{line-height:1.375}[data-widget=inploi-chatbot] .leading-tight{line-height:1.25}[data-widget=inploi-chatbot] .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}[data-widget=inploi-chatbot] .tracking-tight{letter-spacing:-.025em}[data-widget=inploi-chatbot] .tracking-wide{letter-spacing:.025em}[data-widget=inploi-chatbot] .tracking-widest{letter-spacing:.1em}[data-widget=inploi-chatbot] .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .text-accent-1{color:var(--i-color-a-1)}[data-widget=inploi-chatbot] .text-accent-10{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .text-accent-11{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .text-accent-12{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .text-error-11{color:var(--i-color-e-11)}[data-widget=inploi-chatbot] .text-error-9{color:var(--i-color-e-9)}[data-widget=inploi-chatbot] .text-interactive-copy{color:var(--i-interactive-copy)}[data-widget=inploi-chatbot] .text-neutral-10{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .text-neutral-11{color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .text-neutral-12{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .text-neutral-6{color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .text-neutral-8{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .text-neutral-9{color:var(--i-color-n-9)}[data-widget=inploi-chatbot] .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}[data-widget=inploi-chatbot] .underline{text-decoration-line:underline}[data-widget=inploi-chatbot] .no-underline{text-decoration-line:none}[data-widget=inploi-chatbot] .underline-offset-2{text-underline-offset:2px}[data-widget=inploi-chatbot] .underline-offset-4{text-underline-offset:4px}[data-widget=inploi-chatbot] .caret-accent-9{caret-color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .opacity-0{opacity:0}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .shadow-\\[0_0_0_1px\\]{--tw-shadow: 0 0 0 1px;--tw-shadow-colored: 0 0 0 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)}[data-widget=inploi-chatbot] .shadow-surface-lg{--tw-shadow: 0px 3px 3px 0px oklch(0% 0 0 / .03), 0px 6px 4px 0px oklch(0% 0 0 / .02), 0px 11px 4px 0px oklch(0% 0 0 / .01), 0px 32px 24px -12px oklch(0% 0 0 / .06);--tw-shadow-colored: 0px 3px 3px 0px var(--tw-shadow-color), 0px 6px 4px 0px var(--tw-shadow-color), 0px 11px 4px 0px var(--tw-shadow-color), 0px 32px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .shadow-bubble-strong-shadow{--tw-shadow-color: var(--i-bubble-strong-shadow);--tw-shadow: var(--tw-shadow-colored)}[data-widget=inploi-chatbot] .outline-none{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .outline{outline-style:solid}[data-widget=inploi-chatbot] .outline-1{outline-width:1px}[data-widget=inploi-chatbot] .outline-2{outline-width:2px}[data-widget=inploi-chatbot] .outline-accent-4{outline-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .outline-bubble-weak{outline-color:var(--i-bubble-weak-outline)}[data-widget=inploi-chatbot] .outline-divider{outline-color:var(--i-color-divider)}[data-widget=inploi-chatbot] .outline-neutral-3{outline-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .outline-neutral-6{outline-color:var(--i-color-n-6)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .ring-accent-6{--tw-ring-color: var(--i-color-a-6)}[data-widget=inploi-chatbot] .ring-divider{--tw-ring-color: var(--i-color-divider)}[data-widget=inploi-chatbot] .ring-lowest{--tw-ring-color: var(--i-color-lowest)}[data-widget=inploi-chatbot] .ring-neutral-4{--tw-ring-color: var(--i-color-n-4)}[data-widget=inploi-chatbot] .ring-neutral-5{--tw-ring-color: var(--i-color-n-5)}[data-widget=inploi-chatbot] .ring-transparent{--tw-ring-color: transparent}[data-widget=inploi-chatbot] .ring-offset-\\[1\\.5px\\]{--tw-ring-offset-width: 1.5px}[data-widget=inploi-chatbot] .ring-offset-neutral-1{--tw-ring-offset-color: var(--i-color-n-1)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-\\[background\\,color\\,border-color\\,box-shadow\\]{transition-property:background,color,border-color,box-shadow;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}[data-widget=inploi-chatbot] .duration-100{transition-duration:.1s}[data-widget=inploi-chatbot] .duration-1000{transition-duration:1s}[data-widget=inploi-chatbot] .duration-300{transition-duration:.3s}[data-widget=inploi-chatbot] .duration-700{transition-duration:.7s}[data-widget=inploi-chatbot] .ease-expo-out{transition-timing-function:cubic-bezier(.16,1,.3,1)}[data-widget=inploi-chatbot] .ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}[data-widget=inploi-chatbot] .will-change-\\[height\\]{will-change:height}[data-widget=inploi-chatbot] .will-change-\\[transform\\,opacity\\]{will-change:transform,opacity}[data-widget=inploi-chatbot] .text-wrap-balance{text-wrap:balance}[data-widget=inploi-chatbot] .fr{outline:none}[data-widget=inploi-chatbot] .fr:focus{outline:none}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .gutter-stable{scrollbar-gutter:stable}[data-widget=inploi-chatbot] .hide-scrollbars::-webkit-scrollbar{display:none}[data-widget=inploi-chatbot] .hide-scrollbars{scrollbar-width:none;-ms-overflow-style:none}[data-widget=inploi-chatbot] .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}[data-widget=inploi-chatbot] .\\[-webkit-outer-spin-button\\:none\\]{-webkit-outer-spin-button:none}[data-widget=inploi-chatbot] .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}[data-widget=inploi-chatbot] .\\[grid-template-columns\\:min-content_1fr\\]{grid-template-columns:min-content 1fr}[data-widget=inploi-chatbot] .\\[text-wrap\\:pretty\\]{text-wrap:pretty}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4 *::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent *::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12 *::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::-moz-selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-accent-4::selection{background-color:var(--i-color-a-4)}[data-widget=inploi-chatbot] .selection\\:bg-transparent::-moz-selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:bg-transparent::selection{background-color:transparent}[data-widget=inploi-chatbot] .selection\\:text-accent-12::-moz-selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .selection\\:text-accent-12::selection{color:var(--i-color-a-12)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::-moz-placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-10::placeholder{color:var(--i-color-n-10)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::-moz-placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .placeholder\\:text-neutral-8::placeholder{color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .first-of-type\\:rounded-l-lg:first-of-type{border-top-left-radius:.5rem;border-bottom-left-radius:.5rem}[data-widget=inploi-chatbot] .last-of-type\\:rounded-r-lg:last-of-type{border-top-right-radius:.5rem;border-bottom-right-radius:.5rem}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--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)}[data-widget=inploi-chatbot] .autofill\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-2\\)\\]:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-2);--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)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:-webkit-autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .autofill\\:\\[-webkit-text-fill-color\\:var\\(--i-color-a-11\\)\\]:autofill{-webkit-text-fill-color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .focus-within\\:bg-neutral-5:focus-within{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus-within\\:outline-none:focus-within{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .focus-within\\:outline-accent-7:focus-within{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .hover\\:z-10:hover{z-index:10}[data-widget=inploi-chatbot] .hover\\:scale-\\[1\\.02\\]:hover{--tw-scale-x: 1.02;--tw-scale-y: 1.02;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))}[data-widget=inploi-chatbot] .hover\\:border-accent-10:hover{border-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:border-neutral-5:hover{border-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:bg-accent-10:hover{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-2:hover{background-color:var(--i-color-n-2)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-3:hover{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-4:hover{background-color:var(--i-color-n-4)}[data-widget=inploi-chatbot] .hover\\:bg-neutral-5:hover{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .hover\\:text-accent-11:hover{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}[data-widget=inploi-chatbot] .hover\\:text-neutral-12:hover{color:var(--i-color-n-12)}[data-widget=inploi-chatbot] .hover\\:underline:hover{text-decoration-line:underline}[data-widget=inploi-chatbot] .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}[data-widget=inploi-chatbot] .focus\\:z-20:focus{z-index:20}[data-widget=inploi-chatbot] .focus\\:bg-neutral-5:focus{background-color:var(--i-color-n-5)}[data-widget=inploi-chatbot] .focus\\:shadow-\\[0_0_0_2px\\]:focus{--tw-shadow: 0 0 0 2px;--tw-shadow-colored: 0 0 0 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}[data-widget=inploi-chatbot] .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:-webkit-autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--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)}[data-widget=inploi-chatbot] .autofill\\:focus\\:shadow-\\[inset_0_0_0_1000px_var\\(--i-color-a-1\\)\\]:focus:autofill{--tw-shadow: inset 0 0 0 1000px var(--i-color-a-1);--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)}[data-widget=inploi-chatbot] .focus-visible\\:bg-neutral-3:focus-visible{background-color:var(--i-color-n-3)}[data-widget=inploi-chatbot] .focus-visible\\:outline-2:focus-visible{outline-width:2px}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .focus-visible\\:outline-accent-8:focus-visible{outline-color:var(--i-color-a-8)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .active\\:scale-\\[\\.97\\]:active{--tw-scale-x: .97;--tw-scale-y: .97;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))}[data-widget=inploi-chatbot] .active\\:border-submit-bg-active:active{border-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-accent-10:active{background-color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:bg-accent-2:active{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .active\\:bg-interactive-bg-active:active{background-color:var(--i-interactive-bg-active)}[data-widget=inploi-chatbot] .active\\:bg-submit-bg-active:active{background-color:var(--i-submit-button-bg-active)}[data-widget=inploi-chatbot] .active\\:text-accent-10:active{color:var(--i-color-a-10)}[data-widget=inploi-chatbot] .active\\:text-accent-11:active{color:var(--i-color-a-11)}[data-widget=inploi-chatbot] .active\\:text-interactive-copy-active:active{color:var(--i-interactive-copy-active)}[data-widget=inploi-chatbot] .active\\:outline-neutral-8:active{outline-color:var(--i-color-n-8)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .active\\:ring-offset-2:active{--tw-ring-offset-width: 2px}[data-widget=inploi-chatbot] .disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}[data-widget=inploi-chatbot] .disabled\\:opacity-50:disabled{opacity:.5}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:bg-accent-2{background-color:var(--i-color-a-2)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:text-accent-9{color:var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:checked~.peer-checked\\:outline-accent-7{outline-color:var(--i-color-a-7)}[data-widget=inploi-chatbot] .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)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-accent-9{--tw-ring-color: var(--i-color-a-9)}[data-widget=inploi-chatbot] .peer:focus-visible~.peer-focus-visible\\:ring-offset-accent-7{--tw-ring-offset-color: var(--i-color-a-7)}[data-widget=inploi-chatbot] .group[aria-pressed=true] .group-aria-\\[pressed\\=true\\]\\:scale-100{--tw-scale-x: 1;--tw-scale-y: 1;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))}@media (pointer: coarse){[data-widget=inploi-chatbot] .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}}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\+\\*\\>input\\:focus\\)\\]\\:text-neutral-11:has(+*>input:focus){color:var(--i-color-n-11)}[data-widget=inploi-chatbot] .\\[\\&\\:has\\(\\.view-switch\\:active\\)\\]\\:scale-\\[0\\.98\\]:has(.view-switch:active){--tw-scale-x: .98;--tw-scale-y: .98;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 fade-in{0%{opacity:0}to{opacity:1}}[data-widget=inploi-chatbot] dialog::backdrop{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}[data-widget=inploi-chatbot] dialog::backdrop{background-color:var(--i-overlay-bg)}
|
|
2
|
+
`,Si="inploi-chatbot",Ci=`[data-widget='${Si}']`,Zu=()=>({getOrCreateChatbotElement:()=>{const t=document.querySelector(Ci);if(t)return document.body.appendChild(t),t;const e=document.createElement("div");return document.body.appendChild(e),e.dataset.widget=Si,e}});var Qu=["1","2","3","4","5","6","7","8","9","10","11","12"],tf={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]}},ef=(t,e=1,r)=>a=>{const[i,n]=tf[r][a];return"oklch("+i+"% "+n*e+" "+t+")"},oa=t=>{const e=ef(t.hue,t.chroma,t.mode);return Object.fromEntries(Qu.map(r=>[t.prefix+r,t.transform(e(r))]))},sa=t=>t,rf=t=>{const e=Object.keys(t).flatMap(r=>{const a=t[r];return typeof a=="object"&&a!==null?Object.keys(a).map(i=>{const n=a[i];return[`${String(r)}.${i}`,n]}):[[r,a]]});return Object.fromEntries(e)},ur=t=>!!t&&typeof t=="object"&&!Array.isArray(t),la=(t,...e)=>{if(!e.length)return t;const r=e.shift();if(ur(t)&&ur(r))for(const a in r){const i=r[a];if(ur(i)){t[a]||Object.assign(t,{[a]:{}});const n=t[a];ur(n)&&la(n,i)}else Object.assign(t,{[a]:r[a]})}return la(t,...e)},af=t=>{function e(r,a){const i=[t.prefix,a.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${i}`:`var(--${i})`}return e},nf=()=>({core:t=>({semantic:e=>({component:r=>({from:a=>{const{theme:i,getToken:n}=a,o=p=>n("reference",p.toString()),s=t({theme:i}),l=e({theme:i,core:o,raw:{core:s}}),u=r({theme:i,core:o,semantic:o,raw:{core:s,semantic:l}}),h=rf(la(s,l,u)),d=([p,v],g)=>{const _=[g,p].filter(Boolean).join(".");return typeof v=="object"?Object.entries(v).flatMap(k=>d(k,_)):[[a.getToken("declaration",_),v]]};return{values:h,declarations:Object.fromEntries(Object.entries(h).flatMap(p=>d(p))),ref:p=>n("reference",p.toString())}}})})})});const[ca,da,$i]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],of=nf().core(({theme:t})=>({color:{black:ca,white:da,lowest:t.mode==="light"?da:ca,highest:t.mode==="light"?ca:da,...oa({prefix:"a-",hue:t.hue,chroma:t.chroma,mode:t.mode,transform:sa}),...oa({prefix:"n-",hue:t.hue,chroma:.05,mode:t.mode,transform:sa}),...oa({prefix:"e-",hue:20,chroma:t.chroma,mode:t.mode,transform:sa})},typography:{}})).semantic(({core:t,raw:e,theme:r})=>{const a=(i,n)=>e.core.color[i].replace(")",` / ${n})`);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:a("n-8",r.mode==="dark"?.4:.2)},"copy-body":t("color.n-12"),"copy-headings":t("color.n-12"),interactive:{copy:t("color.n-11"),"copy-hover":t("color.n-12"),"copy-active":t("color.n-12"),bg:$i,"bg-hover":a("n-10",.4),"bg-active":a("n-10",.5)}}}).component(({raw:t,theme:e,semantic:r,core:a})=>{const i=(n,o)=>t.core.color[n].replace(")",` / ${o})`);return{app:{bg:a(e.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":a(e.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":$i,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)},"submit-button":{"bg-active":a(e.mode==="dark"?"color.a-8":"color.a-11")}}}),sf=af({prefix:"i-"}),lf=t=>{const e=of.from({theme:t,getToken:sf}),r=Object.entries(e.declarations).map(([a,i])=>`${a}: ${i};`);return`${Ci} {
|
|
3
3
|
${r.concat(r).join(`
|
|
4
4
|
`)}
|
|
5
|
-
}`},$a=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const i=t[n];if(!i)continue;const a=yt(e,n,null);if(i.required&&a===null){const o=`Configuration error in context: ${n} is required`;throw r.error(o),new Error(o)}switch(i.type){case"number":if(typeof a!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof a!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:i.type}}},lf=({_internal_domManager:e=Zd(),theme:t,terms:r})=>We(({apiClient:n,logger:i,analytics:a})=>{let o=!1;const s=bd({locale:void 0,overrides:r??{}}),l=()=>{if(typeof window>"u")return;const u=[ce("style",{id:"inploi-chatbot-styles"},Jd),ce("style",{id:"inploi-chatbot-theme"},sf(t))],h=e.getOrCreateChatbotElement();ct(ce(W,{},[u,ce(Gd,{apiClient:n,logger:i,analytics:a,terms:r})]),h),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;l(),i.info("Chatbot plugin prepared")}catch(u){i.error("Error preparing chatbot plugin",u)}},fetchFlowByJobId:async(u,h)=>{const d=new URLSearchParams({id_type:(h==null?void 0:h.idType)==="inploi"?"internal":"external"});return n.fetch([`/flow/job/${u}`,d.toString()].filter(Boolean).join("?")).then(p=>{const g=Zt(Yd,p);return{flow:g.flow,title:s("applying_for",{title:g.job.title}),flowKeys:[g.job.id,...(h==null?void 0:h.flowKeys)??[]],job:{id:g.job.id,id_type:"external"},...h}})},fetchFlowById:async(u,h)=>n.fetch(`/flow/id/${u}`).then(d=>{var g;const p=Zt(Wd,d);return{flow:p.flow,title:"Chatbot",flowKeys:(h==null?void 0:h.flowKeys)??[],...h,analytics:{customProperties:{flow_id:p.flow.id,flow_version:p.flow.version,...(g=h==null?void 0:h.analytics)==null?void 0:g.customProperties}}}}),open:async u=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",o||l(),u instanceof Promise?(T.current$.value={state:"loading"},u.then(async h=>{$a({context:h.context||{},schema:h.flow.context_schema,logger:i}),T.startFlow(h)}).catch(h=>{const d=h instanceof Error?h.message:s("unknown_error");T.current$.value={state:"error",error:d}})):($a({context:u.context||{},schema:u.flow.context_schema,logger:i}),T.startFlow(u))}catch(h){i.error("Error starting flow",h)}},close:async()=>{typeof window>"u"||(T.cancelCurrentFlow(),i.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=lf;const Ea=({condition:e,context:t,submissions:r,ifBlock:n})=>{const[i,...a]=e.compareKey.split(".");if(!i)return!1;const o=Ta({context:t,key:i,path:a,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=yt(o.value,a.join("."));switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const s=yt(o.value,a.join(".")),l={...n,data:{...n.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Lt(l,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Lt(l,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Lt(l,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(va)?Lt(l,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{const s=e.compareValue==="true";switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{const s=o.type==="phone"?fr(o.value):o.value;switch(e.compare){case"equals":return s===e.compareValue;case"contains":return s?s.includes(e.compareValue):!1;case"notEquals":return s!==e.compareValue;case"notContains":return s?!s.includes(e.compareValue):!0}break}case"number":{try{const s=Number(e.compareValue);switch(e.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,o.value),!1}break}case"enum":switch(e.compare){case"equals":return o.value.length===1&&o.value[0]===e.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==e.compareValue;case"contains":return o.value.includes(e.compareValue);case"notContains":return!o.value.includes(e.compareValue)}break}},Lt=(e,{context:t,submissions:r})=>{const n="combinator"in e.data?e.data.conditions:[e.data];if(("combinator"in e.data?e.data.combinator:"and")==="or"){for(const a of n)if(Ea({condition:a,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(const a of n)if(!Ea({condition:a,context:t,submissions:r,ifBlock:e}))return!1;return!0}},cf=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,$e=(e,{context:t,submissions:r})=>e.replace(cf,(n,i,a="")=>{const[o,...s]=i.trim().split("."),l=Ta({key:o,path:s,submissions:r,context:t});if(!l)return a;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${Nt(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():a;case"phone":return fr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const u=yt(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(va))return u.join(", ")}break}}return a}),Ia=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return Ia({node:n,nodes:t,stopWhen:r})},uf=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const a=t.find(s=>s.id===i.branchId);if(!a)return!1;const o=Ia({node:a,nodes:t,stopWhen:s=>s.id===e.id});return!(!o||o.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},df=({flow:e,analytics:t,logger:r,context:n,apiClient:i,getSubmissions:a,chatService:o,onFlowEnd:s,onInterpret:l,t:u})=>{let h=new AbortController;const d={...t.service,log:g=>t.service.log({...g,customProperties:{...g.customProperties,...t.customProperties}})},p=async(g,v)=>{const y=a();l==null||l(g,v);try{await ff({flow:e,analytics:d,logger:r,apiClient:i,context:n,node:g,submissions:y,t:u,chat:{sendMessage:async k=>o.send({groupId:g.id,message:k,signal:h.signal}),userInput:async k=>o.input({input:k,signal:h.signal}),addToSubmissions:o.addToSubmissions},next:k=>{const x=k?e.nodes.find(_=>_.id===k):uf({childNode:g,nodes:e.nodes});return x?p(x,g):s==null?void 0:s(g)},end:()=>s==null?void 0:s(g)})}catch(k){if(k instanceof Pt)return;throw k}};return{interpret:async g=>{const v=e.nodes.find(y=>y.id===g)??pa(e.nodes);return p(v)},undo:g=>{let v=1;const y=e.nodes.find(x=>x.id===g[g.length-1]);for(let x=g.length-2;x>0;x--){const _=g[x],M=e.nodes.find(F=>F.id===_);if(!M||(v++,M.type.startsWith("question-")))break}h.abort(),h=new AbortController;const k=e.nodes.find(x=>x.id===g[g.length-v]);return we(k,"Undo failed: new start node not found"),p(k,y),{removed:v}},abort:()=>{h.abort()}}},fr=e=>`+${e.countryCode} ${e.phoneNumber}`;async function ff(e){const t=e.node;switch(t.type){case"text":return yf({...e,node:t});case"image":return wf({...e,node:t});case"question-text":return xf({...e,node:t});case"question-enum":return Cf({...e,node:t});case"question-number":return kf({...e,node:t});case"question-phone":return Sf({...e,node:t});case"question-boolean":return $f({...e,node:t});case"question-file":return If({...e,node:t});case"question-address":return Ef({...e,node:t});case"end-flow":return Tf({...e,node:t});case"if-block":return _f({...e,node:t});case"jump":return vf({...e,node:t});case"link":return bf({...e,node:t});case"integration-application-submit":return gf({...e,node:t});case"add-submission":return mf({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return pf({...e,node:t});case"feedback":return hf({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}const Dt=(e,t)=>{var n;const r=(n=e[t])==null?void 0:n.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${t}” is not a string or number`);return r};async function hf({next:e,node:t}){e(t.nextId)}async function pf({next:e,node:t,analytics:r,submissions:n,logger:i}){if(!n)return e(t.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:Dt(n,t.data.key).toString(),first_name:t.data.firstName?Dt(n,t.data.firstName).toString():void 0,last_name:t.data.lastName?Dt(n,t.data.lastName).toString():void 0,email:t.data.email?Dt(n,t.data.email).toString():void 0,phone_number:t.data.phoneNumber?Dt(n,t.data.phoneNumber).toString():void 0,custom_traits:t.data.customTraits?Object.fromEntries(t.data.customTraits.map(({key:a,value:o})=>{var s;return[a,(s=n[o])==null?void 0:s.value]})):void 0}})}catch(a){i.error(a)}finally{e(t.nextId)}}async function vf({next:e,node:t}){e(t.data.targetId)}async function mf({next:e,node:t,logger:r,submissions:n,context:i}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:$e(t.data.value,{submissions:n,context:i})},e(t.nextId)}async function gf({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:a,analytics:o,flow:s,t:l}){const u=async h=>{h!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:d,session_id:p}=o.getSessionInfo(),g=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:d,session_id:p,job:s.job,submissions:Ld(a||{})})}).catch(v=>v);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:g}),Qe(g).with({integration_response:A.select(A.union({service:A.optional(A.string),status:A.number,data:A.any},{service:A.optional(A.string),status:A.number,error:{message:A.string,data:A.any}}))},v=>{o.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:v.service??"INVALID_SERVICE",response:{status:v.status,payload:"data"in v?v.data:v.error.data??null},job:s.job}})}).otherwise(()=>{}),await Qe(g).with(A.union({ats_data:A.select("redirect",{redirect_url:A.string,message:A.optional(A.union(A.string,A.nullish)),button_text:A.optional(A.union(A.string,A.nullish))})},{integration_response:{data:A.select("redirect",{redirect_url:A.string,message:A.optional(A.union(A.string,A.nullish)),button_text:A.optional(A.union(A.string,A.nullish))})}}),async v=>{if(v.redirect!==void 0){await e.sendMessage({type:"text",author:"bot",text:v.redirect.message??l("submission_redirect_message")});try{const y=new URL(v.redirect.redirect_url);d&&!y.searchParams.has("anonymous_id")&&y.searchParams.set("anonymous_id",d),await e.sendMessage({type:"link",href:y.toString(),text:v.redirect.button_text??l("complete_submission"),onClick:()=>{if(!p){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:p,flow_version:s.version,href:y.toString(),job:s.job}})}})}catch(y){n.error(`Invalid redirect URL: ${v.redirect.redirect_url}`,y),e.sendMessage({type:"system",variant:"error",text:l("redirect_url_error")})}t(r.nextId)}}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:l("submission_completed")}),t(r.nextId)}).with(A.union({success:!1,ats_data:A.select("error",{message:A.string})},{integration_response:{error:A.select("error",{message:A.string})}}),async v=>{var y;n.error(v.error),await e.sendMessage({type:"system",variant:"error",text:((y=v.error)==null?void 0:y.message)||l("submission_failed")}),await u(!1)}).otherwise(async v=>{n.error(v),await e.sendMessage({type:"system",variant:"error",text:l("submission_failed")}),await u(!1)})};await u(r.data.skipConfirmation)}async function bf({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({type:"link",href:$e(r.data.href,{submissions:n,context:i}),text:$e(r.data.cta,{submissions:n,context:i})}),t(r.nextId)}async function _f({submissions:e,next:t,node:r,context:n}){t(Lt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function yf({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:$e(r.data.text,{submissions:n,context:i})}),t(r.nextId)}async function wf({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 xf({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:$e(r.data.question,{submissions:n,context:i})});const o=r.data.format==="phone"?await e.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,maxChars:r.data.maxChars,minChars:r.data.minChars,submissionFormat:"text",defaultValue:{}}}):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,minChars:r.data.minChars}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.type==="phone"?fr(o.value):o.value}),t(r.nextId)}async function kf({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:$e(r.data.question,{submissions:n,context:i})});const o=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}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value.toString()}),t(r.nextId)}async function Sf({chat:e,next:t,node:r,submissions:n,context:i}){await e.sendMessage({author:"bot",type:"text",text:$e(r.data.question,{submissions:n,context:i})});const a=await e.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,maxChars:r.data.maxChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});a===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:a.type==="phone"?fr(a.value):a.value}),t(r.nextId)}async function Cf({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:$e(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),t(r.nextId)}async function $f({chat:e,next:t,node:r,submissions:n,context:i,t:a}){await e.sendMessage({author:"bot",type:"text",text:$e(r.data.question,{submissions:n,context:i})});const o=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await e.sendMessage({type:"system",variant:"info",text:a("skipped")}):await e.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function Ef({chat:e,next:t,node:r,t:n}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const i=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(i===null)await e.sendMessage({type:"system",variant:"info",text:n("skipped")});else{const a=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:a})}return t(r.nextId)}async function If({node:e,chat:t,next:r,submissions:n,context:i,t:a}){await t.sendMessage({author:"bot",type:"text",text:$e(e.data.question,{submissions:n,context:i})});const o=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(o===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else for(const s of o.value)await t.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(e.nextId)}async function Tf({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const Ta=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const i=yt(n,t.join("."));switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${t.join(".")}`,i);return}}return r==null?void 0:r[e]};function fn(e,t,r){var n,i,a,o,s;t==null&&(t=100);function l(){var h=Date.now()-o;h<t&&h>=0?n=setTimeout(l,t-h):(n=null,r||(s=e.apply(a,i),a=i=null))}var u=function(){a=this,i=arguments,o=Date.now();var h=r&&!n;return n||(n=setTimeout(l,t)),h&&(s=e.apply(a,i),a=i=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=e.apply(a,i),a=i=null,clearTimeout(n),n=null)},u}fn.debounce=fn;var Af=fn;const Aa=Te(Af);function Mf(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:i}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const a=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!a)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[o,s]=me({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=de({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),u=t?typeof t=="number"?t:t.scroll:null,h=t?typeof t=="number"?t:t.resize:null,d=de(!1);ye(()=>(d.current=!0,()=>void(d.current=!1)));const[p,g,v]=Pe(()=>{const _=()=>{if(!l.current.element)return;const{left:M,top:F,width:N,height:H,bottom:te,right:pe,x:D,y:se}=l.current.element.getBoundingClientRect(),ae={left:M,top:F,width:N,height:H,bottom:te,right:pe,x:D,y:se};l.current.element instanceof HTMLElement&&i&&(ae.height=l.current.element.offsetHeight,ae.width=l.current.element.offsetWidth),Object.freeze(ae),d.current&&!Ff(l.current.lastBounds,ae)&&s(l.current.lastBounds=ae)};return[_,h?Aa(_,h):_,u?Aa(_,u):_]},[s,i,u,h]);function y(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(_=>_.removeEventListener("scroll",v,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function k(){l.current.element&&(l.current.resizeObserver=new a(v),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(_=>_.addEventListener("scroll",v,{capture:!0,passive:!0})))}const x=_=>{!_||_===l.current.element||(y(),l.current.element=_,l.current.scrollContainers=Ma(_),k())};return Pf(v,!!r),Nf(g),ye(()=>{y(),k()},[r,v,g]),ye(()=>y,[]),[x,o,p]}function Nf(e){ye(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function Pf(e,t){ye(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function Ma(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:i}=window.getComputedStyle(e);return[r,n,i].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...Ma(e.parentElement)]}const Of=["x","y","top","bottom","left","right","width","height"],Ff=(e,t)=>Of.every(r=>e[r]===t[r]),tt=({class:e,...t})=>{const{t:r}=he();return c("button",{class:Je("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:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})},Lf=25,hn=Ue({instant:()=>{},smooth:()=>{}}),ee={onSubmitSuccessFn$:Ue(()=>{}),isBotTyping$:Ue(!1),scrollToEnd:{instant:()=>hn.value.instant(),smooth:()=>hn.value.smooth()}},Df=()=>{const e=de(null);ue(()=>{hn.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=Pe(()=>({addToSubmissions:(n,i)=>T.setSubmission(n,i),send:async({message:n,signal:i,groupId:a})=>{if(await Qe(n).with({author:"bot",type:"text"},async o=>{if(i!=null&&i.aborted)throw new Pt;ee.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Lf;await new Promise(l=>setTimeout(l,s,{signal:i})),ee.isBotTyping$.value=!1}).otherwise(async()=>{}),i!=null&&i.aborted)throw new Pt;T.addMessage(n,a)},input:({input:n,signal:i})=>{if(i!=null&&i.aborted)throw new Pt;return T.setInput(n),new Promise(a=>{const o=s=>{if(i!=null&&i.aborted)throw new Pt;T.setInput(void 0),n.key&&T.setSubmission(n.key,s),a(s)};ee.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:e,chatService:t}},vt=({error:e})=>!e||!e.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[c("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"truncate pr-1 text-sm",children:e.message})]}),rt=({class:e,...t})=>{const{t:r}=he();return c("button",{type:"button",class:Je("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:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},pn={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},Vt=Ct("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),Vf="https://api.mapbox.com/search/searchbox/v1/suggest",jf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",zf=e=>atob(e).split("").reverse().join(""),Oe=ne({name:X()}),Rf=ne({suggestions:pi(ne({full_address:St(X()),place_formatted:St(X()),name:St(X()),mapbox_id:X(),context:pu(ne({address:Oe,street:Oe,neighborhood:Oe,locality:Oe,district:Oe,place:Oe,region:Oe,postcode:Oe,country:Oe}))}))}),Bf=({logger:e,t})=>Pe(()=>{var n;const r=(n=T.current$.peek().flow)==null?void 0:n.data.flowSessionId;return r?{enabled:!0,getPredictions:async i=>{const a=new URL(Vf);a.searchParams.set("q",i),a.searchParams.set("session_token",r),a.searchParams.set("access_token",zf(jf));const o=await fetch(a);if(!o.ok)return e.error("Failed to get address details",o),{ok:!1,error:t("address_error")};const s=vu(Rf,await o.json());if(s.success===!1)return e.error("Failed to parse address details",s.issues),{ok:!1,error:t("address_error")};const{suggestions:l}=s.output;return{ok:!0,data:l.map(u=>{var h,d,p,g,v,y,k,x,_;return{label:u.full_address??u.place_formatted??u.name??u.mapbox_id,id:u.mapbox_id,address:{line1:((h=u.context.address)==null?void 0:h.name)??((d=u.context.street)==null?void 0:d.name),line2:void 0,line3:((p=u.context.neighborhood)==null?void 0:p.name)??((g=u.context.locality)==null?void 0:g.name),city:((v=u.context.place)==null?void 0:v.name)??((y=u.context.district)==null?void 0:y.name),state:(k=u.context.region)==null?void 0:k.name,postcode:(x=u.context.postcode)==null?void 0:x.name,country:(_=u.context.country)==null?void 0:_.name}}})}}}:{enabled:!1}},[e,t]),Na=e=>{const{t}=he();return c("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:[c("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:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:t("back")})]})},Uf=({input:e,onSubmitSuccess:t,logger:r})=>{const{t:n}=he(),[i,a]=me(),[o,s]=me([]),{enabled:l,getPredictions:u}=Bf({logger:r,t:n}),[h,d]=me(l?"query":"manual"),[p,g]=me(""),[v,y]=me(),k=x=>{we(l,"Query state should not be enabled"),x=x.trim(),x!==(p==null?void 0:p.trim())&&(g(x),x===""&&s([]),y(void 0),u(x).then(_=>{if(_.ok===!1){s([]),y(_.error);return}s(_.data)}))};switch(h){case"query":return we(l,"Query state should not be enabled"),c(Hf,{input:e,onSkip:()=>t(null),onAddressSelect:x=>{if(x===""){a(void 0),d("manual");return}const _=o.find(M=>M.id===x);_&&(a(_.address),d("details"))},onAddressSearch:x=>{k(x)},suggestions:o,query:p,error:v});case"details":return we(i!==void 0),c(Oa,{input:e,logger:r,onSubmitSuccess:t,addressFields:i,actions:c(Na,{onClick:()=>{d("query")}})});case"manual":return c(Oa,{logger:r,input:e,onSubmitSuccess:t,addressFields:{},actions:l?c(Na,{onClick:()=>{d("query")}}):void 0})}},Hf=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:i,onAddressSearch:a,error:o})=>{const{t:s}=he(),l=de(null);return ue(()=>{l.current&&(l.current.focus(),l.current.select())},[]),c(W,{children:[c("form",{noValidate:!0,onSubmit:u=>{u.preventDefault();const d=new FormData(u.currentTarget).get("address");typeof d=="string"&&a(d)},class:"flex gap-1 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||s("address_search"),defaultValue:i,class:Vt({optional:!!e.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]}),c("span",{class:"sr-only",children:s("search")})]})})]}),e.config.optional&&c(rt,{class:"",onClick:t})]}),o?c(vt,{error:{message:o}}):null,c("ul",{children:[r.map(u=>c("li",{children:c("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(u.id)},children:[c("span",{class:"flex-grow",children:u.label}),c("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:c("path",{d:"M6 3L11 8L6 13"})})]})},u.id)),c("li",{children:c("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("")},children:c("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},qf={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Pa=["line1","line2","line3","city","state","postcode","country"],Oa=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const i=de(null);ue(()=>{if(i.current){const o=i.current.querySelector("input");o&&(o.focus(),o.select())}},[]);const a=Object.keys(pn);return c("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:o=>{const s=new FormData(o.currentTarget),l=Object.fromEntries(s.entries());t({type:"address",value:l})},children:[c("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:i,children:Pa.map((o,s)=>{const l=`isdk_${o}`,u=n.config.keys[o];return u?c(W,{children:[c("label",{for:l,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:qf[o]}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[o==="country"?c("div",{class:"relative",children:[c("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:u,id:l,defaultValue:e[o],required:!0,children:[e.country&&!a.includes(e.country)?c("option",{value:e[o],children:e[o]}):c("option",{value:"",children:"Select a country"}),a.map(h=>c("option",{value:h,children:h},h))]}),c("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:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:s===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:u,id:l,defaultValue:e[o],required:!0}),s===Pa.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"flex w-full flex-1 ",children:[c("div",{class:"flex-grow",children:r}),c(tt,{class:"flex items-center justify-center"})]})]})},vn=()=>{const e=de(null);return ye(()=>{var t;(t=e.current)==null||t.focus()},[]),e},Fa=["true","false"],Kf=cu(Fa),Gf="answer",La="flex items-center gap-2 p-2.5",Da=Rr(({label:e,...t},r)=>c("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:c("p",{class:"truncate text-center text-base",children:e})})),Wf=({input:e,onSubmitSuccess:t})=>{const r=vn();return c("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const i=jd(n).value,a=Zt(Kf,i);t({type:"boolean",value:a==="true"})},children:[c("ul",{class:La,children:Fa.map((n,i)=>c("li",{class:"flex-1",children:c(Da,{ref:i===0?r:null,type:"submit",name:Gf,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&c("div",{class:"px-2 pb-2",children:c(rt,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Yf=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}),Jf=e=>e.reduce((t,r)=>t+r.sizeKb,0),Zf=pt("file"),Va=3,Xf=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return c("div",{class:Je("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:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:i}),c("span",{children:[".",n]})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Nt(e.sizeKb)})]})},ja=({class:e,...t})=>c("li",{class:Je("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),za=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Qf=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(za(n.name).toLowerCase()))},eh=(e,t)=>{const r=za(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},th=({input:e,onSubmitSuccess:t})=>{var d;const r=(d=T.current$.value.flow)==null?void 0:d.data.submissions[e.key],[n,i]=me(Zf(r)?r.value:[]),[a,o]=me(),s=n.length-Va,l=Jf(n),u=vn(),{t:h}=he();return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:p=>(p.preventDefault(),o(void 0),n.length===0?o({type:"required",message:h("validation_file")}):e.config.extensions.length>0&&!Qf({allowedExtensions:e.config.extensions,files:n})?o({type:"validate",message:`${h("validation_file_ext",{ext:e.config.extensions.join(", ")})}`}):e.config.fileSizeLimitKib&&l>e.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Nt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?o({type:"invalid",message:h("validation_file_max",{count:1})}):t({type:"file",value:n})),children:[c("div",{class:"flex items-center gap-2",children:[c("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?c(W,{children:[c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,Va).map(p=>{const g=p.name.split(".").pop(),v=p.name.replace(new RegExp(`.${g}$`),"");return c(ja,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:v}),c("span",{children:[".",g]})]})}),s>0?c(ja,{children:["+",s," file",s!==1?"s":""]}):null]}),c("p",{class:"text-neutral-11 text-xs",children:[Nt(l)," ",n.length>1?"total":""]})]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("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:c("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"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:h("upload_file",{count:e.config.allowMultiple?2:1})}),e.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",h("file_max_size",{size:Nt(e.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:h("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(p=>c("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:p.replace(".","")}))})]})]}),c("input",{id:"dropzone-file",onInput:async p=>{we(p.target instanceof HTMLInputElement);const g=p.target.files?Array.from(p.target.files):[],v=await Promise.allSettled(g.map(async k=>{const x=await Yf(k);return{name:eh(k.name,42),data:x,sizeKb:k.size/1e3}}));if(v.some(({status:k})=>k==="rejected"))return o({type:"invalid",message:"Invalid file"});const y=v.map(k=>k.status==="fulfilled"?k.value:null).filter(Boolean);i(y)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(tt,{disabled:n.length===0}),e.config.optional&&c(rt,{onClick:()=>t(null)})]})]}),c(vt,{error:a})]})};var jt=e=>e.type==="checkbox",mt=e=>e instanceof Date,ie=e=>e==null;const Ra=e=>typeof e=="object";var G=e=>!ie(e)&&!Array.isArray(e)&&Ra(e)&&!mt(e),rh=e=>G(e)&&e.target?jt(e.target)?e.target.checked:e.target.value:e,nh=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,ih=(e,t)=>e.has(nh(t)),ah=e=>{const t=e.constructor&&e.constructor.prototype;return G(t)&&t.hasOwnProperty("isPrototypeOf")},mn=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Fe(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(!(mn&&(e instanceof Blob||e instanceof FileList))&&(r||G(e)))if(t=r?[]:{},!r&&!ah(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Fe(e[n]));else return e;return t}var zt=e=>Array.isArray(e)?e.filter(Boolean):[],U=e=>e===void 0,$=(e,t,r)=>{if(!t||!G(e))return r;const n=zt(t.split(/[,[\].]+?/)).reduce((i,a)=>ie(i)?i:i[a],e);return U(n)||n===e?U(e[t])?r:e[t]:n},Ke=e=>typeof e=="boolean";const Ba={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xe={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Le={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};ke.createContext(null);var oh=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(i,a,{get:()=>{const o=a;return t._proxyFormState[o]!==xe.all&&(t._proxyFormState[o]=!n||xe.all),r&&(r[o]=!0),e[o]}});return i},ge=e=>G(e)&&!Object.keys(e).length,sh=(e,t,r,n)=>{r(e);const{name:i,...a}=e;return ge(a)||Object.keys(a).length>=Object.keys(t).length||Object.keys(a).find(o=>t[o]===(!n||xe.all))},gn=e=>Array.isArray(e)?e:[e];function lh(e){const t=ke.useRef(e);t.current=e,ke.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ee=e=>typeof e=="string",ch=(e,t,r,n,i)=>Ee(e)?(n&&t.watch.add(e),$(r,e,i)):Array.isArray(e)?e.map(a=>(n&&t.watch.add(a),$(r,a))):(n&&(t.watchAll=!0),r),bn=e=>/^\w*$/.test(e),Ua=e=>zt(e.replace(/["|']|\]/g,"").split(/\.|\[/));function V(e,t,r){let n=-1;const i=bn(t)?[t]:Ua(t),a=i.length,o=a-1;for(;++n<a;){const s=i[n];let l=r;if(n!==o){const u=e[s];l=G(u)||Array.isArray(u)?u:isNaN(+i[n+1])?{}:[]}e[s]=l,e=e[s]}return e}var Ha=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},qa=e=>({isOnSubmit:!e||e===xe.onSubmit,isOnBlur:e===xe.onBlur,isOnChange:e===xe.onChange,isOnAll:e===xe.all,isOnTouch:e===xe.onTouched}),Ka=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const hr=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const a=$(e,i);if(a){const{_f:o,...s}=a;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!n)break;if(o.ref&&t(o.ref,o.name)&&!n)break}else G(s)&&hr(s,t)}}};var uh=(e,t,r)=>{const n=zt($(e,r));return V(n,"root",t[r]),V(e,r,n),e},_n=e=>e.type==="file",Ge=e=>typeof e=="function",pr=e=>{if(!mn)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},vr=e=>Ee(e),yn=e=>e.type==="radio",mr=e=>e instanceof RegExp;const Ga={value:!1,isValid:!1},Wa={value:!0,isValid:!0};var Ya=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&&!U(e[0].attributes.value)?U(e[0].value)||e[0].value===""?Wa:{value:e[0].value,isValid:!0}:Wa:Ga}return Ga};const Ja={isValid:!1,value:null};var Za=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Ja):Ja;function Xa(e,t,r="validate"){if(vr(e)||Array.isArray(e)&&e.every(vr)||Ke(e)&&!e)return{type:r,message:vr(e)?e:"",ref:t}}var gt=e=>G(e)&&!mr(e)?e:{value:e,message:""},Qa=async(e,t,r,n,i)=>{const{ref:a,refs:o,required:s,maxLength:l,minLength:u,min:h,max:d,pattern:p,validate:g,name:v,valueAsNumber:y,mount:k,disabled:x}=e._f,_=$(t,v);if(!k||x)return{};const M=o?o[0]:a,F=L=>{n&&M.reportValidity&&(M.setCustomValidity(Ke(L)?"":L||""),M.reportValidity())},N={},H=yn(a),te=jt(a),pe=H||te,D=(y||_n(a))&&U(a.value)&&U(_)||pr(a)&&a.value===""||_===""||Array.isArray(_)&&!_.length,se=Ha.bind(null,v,r,N),ae=(L,P,q,le=Le.maxLength,be=Le.minLength)=>{const Ie=L?P:q;N[v]={type:L?le:be,message:Ie,ref:a,...se(L?le:be,Ie)}};if(i?!Array.isArray(_)||!_.length:s&&(!pe&&(D||ie(_))||Ke(_)&&!_||te&&!Ya(o).isValid||H&&!Za(o).isValid)){const{value:L,message:P}=vr(s)?{value:!!s,message:s}:gt(s);if(L&&(N[v]={type:Le.required,message:P,ref:M,...se(Le.required,P)},!r))return F(P),N}if(!D&&(!ie(h)||!ie(d))){let L,P;const q=gt(d),le=gt(h);if(!ie(_)&&!isNaN(_)){const be=a.valueAsNumber||_&&+_;ie(q.value)||(L=be>q.value),ie(le.value)||(P=be<le.value)}else{const be=a.valueAsDate||new Date(_),Ie=xr=>new Date(new Date().toDateString()+" "+xr),it=a.type=="time",Bt=a.type=="week";Ee(q.value)&&_&&(L=it?Ie(_)>Ie(q.value):Bt?_>q.value:be>new Date(q.value)),Ee(le.value)&&_&&(P=it?Ie(_)<Ie(le.value):Bt?_<le.value:be<new Date(le.value))}if((L||P)&&(ae(!!L,q.message,le.message,Le.max,Le.min),!r))return F(N[v].message),N}if((l||u)&&!D&&(Ee(_)||i&&Array.isArray(_))){const L=gt(l),P=gt(u),q=!ie(L.value)&&_.length>+L.value,le=!ie(P.value)&&_.length<+P.value;if((q||le)&&(ae(q,L.message,P.message),!r))return F(N[v].message),N}if(p&&!D&&Ee(_)){const{value:L,message:P}=gt(p);if(mr(L)&&!_.match(L)&&(N[v]={type:Le.pattern,message:P,ref:a,...se(Le.pattern,P)},!r))return F(P),N}if(g){if(Ge(g)){const L=await g(_,t),P=Xa(L,M);if(P&&(N[v]={...P,...se(Le.validate,P.message)},!r))return F(P.message),N}else if(G(g)){let L={};for(const P in g){if(!ge(L)&&!r)break;const q=Xa(await g[P](_,t),M,P);q&&(L={...q,...se(P,q.message)},F(q.message),r&&(N[v]=L))}if(!ge(L)&&(N[v]={ref:M,...L},!r))return N}}return F(!0),N};function dh(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=U(e)?n++:e[t[n++]];return e}function fh(e){for(const t in e)if(e.hasOwnProperty(t)&&!U(e[t]))return!1;return!0}function Z(e,t){const r=Array.isArray(t)?t:bn(t)?[t]:Ua(t),n=r.length===1?e:dh(e,r),i=r.length-1,a=r[i];return n&&delete n[a],i!==0&&(G(n)&&ge(n)||Array.isArray(n)&&fh(n))&&Z(e,r.slice(0,-1)),e}function wn(){let e=[];return{get observers(){return e},next:i=>{for(const a of e)a.next&&a.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(a=>a!==i)}}),unsubscribe:()=>{e=[]}}}var gr=e=>ie(e)||!Ra(e);function nt(e,t){if(gr(e)||gr(t))return e===t;if(mt(e)&&mt(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const a=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const o=t[i];if(mt(a)&&mt(o)||G(a)&&G(o)||Array.isArray(a)&&Array.isArray(o)?!nt(a,o):a!==o)return!1}}return!0}var eo=e=>e.type==="select-multiple",hh=e=>yn(e)||jt(e),xn=e=>pr(e)&&e.isConnected,to=e=>{for(const t in e)if(Ge(e[t]))return!0;return!1};function br(e,t={}){const r=Array.isArray(e);if(G(e)||r)for(const n in e)Array.isArray(e[n])||G(e[n])&&!to(e[n])?(t[n]=Array.isArray(e[n])?[]:{},br(e[n],t[n])):ie(e[n])||(t[n]=!0);return t}function ro(e,t,r){const n=Array.isArray(e);if(G(e)||n)for(const i in e)Array.isArray(e[i])||G(e[i])&&!to(e[i])?U(t)||gr(r[i])?r[i]=Array.isArray(e[i])?br(e[i],[]):{...br(e[i])}:ro(e[i],ie(t)?{}:t[i],r[i]):r[i]=!nt(e[i],t[i]);return r}var kn=(e,t)=>ro(e,t,br(t)),no=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>U(e)?e:t?e===""?NaN:e&&+e:r&&Ee(e)?new Date(e):n?n(e):e;function Sn(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return _n(t)?t.files:yn(t)?Za(e.refs).value:eo(t)?[...t.selectedOptions].map(({value:r})=>r):jt(t)?Ya(e.refs).value:no(U(t.value)?e.ref.value:t.value,e)}var ph=(e,t,r,n)=>{const i={};for(const a of e){const o=$(t,a);o&&V(i,a,o._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Rt=e=>U(e)?e:mr(e)?e.source:G(e)?mr(e.value)?e.value.source:e.value:e,vh=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function io(e,t,r){const n=$(e,r);if(n||bn(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const a=i.join("."),o=$(t,a),s=$(e,a);if(o&&!Array.isArray(o)&&r!==a)return{name:r};if(s&&s.type)return{name:a,error:s};i.pop()}return{name:r}}var mh=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,gh=(e,t)=>!zt($(e,t)).length&&Z(e,t);const bh={mode:xe.onSubmit,reValidateMode:xe.onChange,shouldFocusError:!0};function _h(e={},t){let r={...bh,...e},n={submitCount:0,isDirty:!1,isLoading:Ge(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},a=G(r.defaultValues)||G(r.values)?Fe(r.defaultValues||r.values)||{}:{},o=r.shouldUnregister?{}:Fe(a),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,h=0;const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:wn(),array:wn(),state:wn()},g=e.resetOptions&&e.resetOptions.keepDirtyValues,v=qa(r.mode),y=qa(r.reValidateMode),k=r.criteriaMode===xe.all,x=f=>m=>{clearTimeout(h),h=setTimeout(f,m)},_=async f=>{if(d.isValid||f){const m=r.resolver?ge((await D()).errors):await ae(i,!0);m!==n.isValid&&p.state.next({isValid:m})}},M=f=>d.isValidating&&p.state.next({isValidating:f}),F=(f,m=[],b,E,S=!0,w=!0)=>{if(E&&b){if(s.action=!0,w&&Array.isArray($(i,f))){const I=b($(i,f),E.argA,E.argB);S&&V(i,f,I)}if(w&&Array.isArray($(n.errors,f))){const I=b($(n.errors,f),E.argA,E.argB);S&&V(n.errors,f,I),gh(n.errors,f)}if(d.touchedFields&&w&&Array.isArray($(n.touchedFields,f))){const I=b($(n.touchedFields,f),E.argA,E.argB);S&&V(n.touchedFields,f,I)}d.dirtyFields&&(n.dirtyFields=kn(a,o)),p.state.next({name:f,isDirty:P(f,m),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else V(o,f,m)},N=(f,m)=>{V(n.errors,f,m),p.state.next({errors:n.errors})},H=(f,m,b,E)=>{const S=$(i,f);if(S){const w=$(o,f,U(b)?$(a,f):b);U(w)||E&&E.defaultChecked||m?V(o,f,m?w:Sn(S._f)):be(f,w),s.mount&&_()}},te=(f,m,b,E,S)=>{let w=!1,I=!1;const j={name:f};if(!b||E){d.isDirty&&(I=n.isDirty,n.isDirty=j.isDirty=P(),w=I!==j.isDirty);const K=nt($(a,f),m);I=$(n.dirtyFields,f),K?Z(n.dirtyFields,f):V(n.dirtyFields,f,!0),j.dirtyFields=n.dirtyFields,w=w||d.dirtyFields&&I!==!K}if(b){const K=$(n.touchedFields,f);K||(V(n.touchedFields,f,b),j.touchedFields=n.touchedFields,w=w||d.touchedFields&&K!==b)}return w&&S&&p.state.next(j),w?j:{}},pe=(f,m,b,E)=>{const S=$(n.errors,f),w=d.isValid&&Ke(m)&&n.isValid!==m;if(e.delayError&&b?(u=x(()=>N(f,b)),u(e.delayError)):(clearTimeout(h),u=null,b?V(n.errors,f,b):Z(n.errors,f)),(b?!nt(S,b):S)||!ge(E)||w){const I={...E,...w&&Ke(m)?{isValid:m}:{},errors:n.errors,name:f};n={...n,...I},p.state.next(I)}M(!1)},D=async f=>r.resolver(o,r.context,ph(f||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),se=async f=>{const{errors:m}=await D(f);if(f)for(const b of f){const E=$(m,b);E?V(n.errors,b,E):Z(n.errors,b)}else n.errors=m;return m},ae=async(f,m,b={valid:!0})=>{for(const E in f){const S=f[E];if(S){const{_f:w,...I}=S;if(w){const j=l.array.has(w.name),K=await Qa(S,o,k,r.shouldUseNativeValidation&&!m,j);if(K[w.name]&&(b.valid=!1,m))break;!m&&($(K,w.name)?j?uh(n.errors,K,w.name):V(n.errors,w.name,K[w.name]):Z(n.errors,w.name))}I&&await ae(I,m,b)}}return b.valid},L=()=>{for(const f of l.unMount){const m=$(i,f);m&&(m._f.refs?m._f.refs.every(b=>!xn(b)):!xn(m._f.ref))&&En(f)}l.unMount=new Set},P=(f,m)=>(f&&m&&V(o,f,m),!nt(ho(),a)),q=(f,m,b)=>ch(f,l,{...s.mount?o:U(m)?a:Ee(f)?{[f]:m}:m},b,m),le=f=>zt($(s.mount?o:a,f,e.shouldUnregister?$(a,f,[]):[])),be=(f,m,b={})=>{const E=$(i,f);let S=m;if(E){const w=E._f;w&&(!w.disabled&&V(o,f,no(m,w)),S=pr(w.ref)&&ie(m)?"":m,eo(w.ref)?[...w.ref.options].forEach(I=>I.selected=S.includes(I.value)):w.refs?jt(w.ref)?w.refs.length>1?w.refs.forEach(I=>(!I.defaultChecked||!I.disabled)&&(I.checked=Array.isArray(S)?!!S.find(j=>j===I.value):S===I.value)):w.refs[0]&&(w.refs[0].checked=!!S):w.refs.forEach(I=>I.checked=I.value===S):_n(w.ref)?w.ref.value="":(w.ref.value=S,w.ref.type||p.values.next({name:f,values:{...o}})))}(b.shouldDirty||b.shouldTouch)&&te(f,S,b.shouldTouch,b.shouldDirty,!0),b.shouldValidate&&$n(f)},Ie=(f,m,b)=>{for(const E in m){const S=m[E],w=`${f}.${E}`,I=$(i,w);(l.array.has(f)||!gr(S)||I&&!I._f)&&!mt(S)?Ie(w,S,b):be(w,S,b)}},it=(f,m,b={})=>{const E=$(i,f),S=l.array.has(f),w=Fe(m);V(o,f,w),S?(p.array.next({name:f,values:{...o}}),(d.isDirty||d.dirtyFields)&&b.shouldDirty&&p.state.next({name:f,dirtyFields:kn(a,o),isDirty:P(f,w)})):E&&!E._f&&!ie(w)?Ie(f,w,b):be(f,w,b),Ka(f,l)&&p.state.next({...n}),p.values.next({name:f,values:{...o}}),!s.mount&&t()},Bt=async f=>{const m=f.target;let b=m.name,E=!0;const S=$(i,b),w=()=>m.type?Sn(S._f):rh(f),I=j=>{E=Number.isNaN(j)||j===$(o,b,j)};if(S){let j,K;const kr=w(),bt=f.type===Ba.BLUR||f.type===Ba.FOCUS_OUT,mp=!vh(S._f)&&!r.resolver&&!$(n.errors,b)&&!S._f.deps||mh(bt,$(n.touchedFields,b),n.isSubmitted,y,v),Tn=Ka(b,l,bt);V(o,b,kr),bt?(S._f.onBlur&&S._f.onBlur(f),u&&u(0)):S._f.onChange&&S._f.onChange(f);const An=te(b,kr,bt,!1),gp=!ge(An)||Tn;if(!bt&&p.values.next({name:b,type:f.type,values:{...o}}),mp)return d.isValid&&_(),gp&&p.state.next({name:b,...Tn?{}:An});if(!bt&&Tn&&p.state.next({...n}),M(!0),r.resolver){const{errors:wo}=await D([b]);if(I(kr),E){const bp=io(n.errors,i,b),xo=io(wo,i,bp.name||b);j=xo.error,b=xo.name,K=ge(wo)}}else j=(await Qa(S,o,k,r.shouldUseNativeValidation))[b],I(kr),E&&(j?K=!1:d.isValid&&(K=await ae(i,!0)));E&&(S._f.deps&&$n(S._f.deps),pe(b,K,j,An))}},xr=(f,m)=>{if($(n.errors,m)&&f.focus)return f.focus(),1},$n=async(f,m={})=>{let b,E;const S=gn(f);if(M(!0),r.resolver){const w=await se(U(f)?f:S);b=ge(w),E=f?!S.some(I=>$(w,I)):b}else f?(E=(await Promise.all(S.map(async w=>{const I=$(i,w);return await ae(I&&I._f?{[w]:I}:I)}))).every(Boolean),!(!E&&!n.isValid)&&_()):E=b=await ae(i);return p.state.next({...!Ee(f)||d.isValid&&b!==n.isValid?{}:{name:f},...r.resolver||!f?{isValid:b}:{},errors:n.errors,isValidating:!1}),m.shouldFocus&&!E&&hr(i,xr,f?S:l.mount),E},ho=f=>{const m={...a,...s.mount?o:{}};return U(f)?m:Ee(f)?$(m,f):f.map(b=>$(m,b))},po=(f,m)=>({invalid:!!$((m||n).errors,f),isDirty:!!$((m||n).dirtyFields,f),isTouched:!!$((m||n).touchedFields,f),error:$((m||n).errors,f)}),fp=f=>{f&&gn(f).forEach(m=>Z(n.errors,m)),p.state.next({errors:f?n.errors:{}})},vo=(f,m,b)=>{const E=($(i,f,{_f:{}})._f||{}).ref;V(n.errors,f,{...m,ref:E}),p.state.next({name:f,errors:n.errors,isValid:!1}),b&&b.shouldFocus&&E&&E.focus&&E.focus()},hp=(f,m)=>Ge(f)?p.values.subscribe({next:b=>f(q(void 0,m),b)}):q(f,m,!0),En=(f,m={})=>{for(const b of f?gn(f):l.mount)l.mount.delete(b),l.array.delete(b),m.keepValue||(Z(i,b),Z(o,b)),!m.keepError&&Z(n.errors,b),!m.keepDirty&&Z(n.dirtyFields,b),!m.keepTouched&&Z(n.touchedFields,b),!r.shouldUnregister&&!m.keepDefaultValue&&Z(a,b);p.values.next({values:{...o}}),p.state.next({...n,...m.keepDirty?{isDirty:P()}:{}}),!m.keepIsValid&&_()},mo=({disabled:f,name:m,field:b,fields:E,value:S})=>{if(Ke(f)){const w=f?void 0:U(S)?Sn(b?b._f:$(E,m)._f):S;V(o,m,w),te(m,w,!1,!1,!0)}},In=(f,m={})=>{let b=$(i,f);const E=Ke(m.disabled);return V(i,f,{...b||{},_f:{...b&&b._f?b._f:{ref:{name:f}},name:f,mount:!0,...m}}),l.mount.add(f),b?mo({field:b,disabled:m.disabled,name:f}):H(f,!0,m.value),{...E?{disabled:m.disabled}:{},...r.progressive?{required:!!m.required,min:Rt(m.min),max:Rt(m.max),minLength:Rt(m.minLength),maxLength:Rt(m.maxLength),pattern:Rt(m.pattern)}:{},name:f,onChange:Bt,onBlur:Bt,ref:S=>{if(S){In(f,m),b=$(i,f);const w=U(S.value)&&S.querySelectorAll&&S.querySelectorAll("input,select,textarea")[0]||S,I=hh(w),j=b._f.refs||[];if(I?j.find(K=>K===w):w===b._f.ref)return;V(i,f,{_f:{...b._f,...I?{refs:[...j.filter(xn),w,...Array.isArray($(a,f))?[{}]:[]],ref:{type:w.type,name:f}}:{ref:w}}}),H(f,!1,void 0,w)}else b=$(i,f,{}),b._f&&(b._f.mount=!1),(r.shouldUnregister||m.shouldUnregister)&&!(ih(l.array,f)&&s.action)&&l.unMount.add(f)}}},go=()=>r.shouldFocusError&&hr(i,xr,l.mount),pp=f=>{Ke(f)&&(p.state.next({disabled:f}),hr(i,m=>{m.disabled=f},0,!1))},bo=(f,m)=>async b=>{b&&(b.preventDefault&&b.preventDefault(),b.persist&&b.persist());let E=Fe(o);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:S,values:w}=await D();n.errors=S,E=w}else await ae(i);Z(n.errors,"root"),ge(n.errors)?(p.state.next({errors:{}}),await f(E,b)):(m&&await m({...n.errors},b),go(),setTimeout(go)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:ge(n.errors),submitCount:n.submitCount+1,errors:n.errors})},vp=(f,m={})=>{$(i,f)&&(U(m.defaultValue)?it(f,$(a,f)):(it(f,m.defaultValue),V(a,f,m.defaultValue)),m.keepTouched||Z(n.touchedFields,f),m.keepDirty||(Z(n.dirtyFields,f),n.isDirty=m.defaultValue?P(f,$(a,f)):P()),m.keepError||(Z(n.errors,f),d.isValid&&_()),p.state.next({...n}))},_o=(f,m={})=>{const b=f?Fe(f):a,E=Fe(b),S=f&&!ge(f)?E:a;if(m.keepDefaultValues||(a=b),!m.keepValues){if(m.keepDirtyValues||g)for(const w of l.mount)$(n.dirtyFields,w)?V(S,w,$(o,w)):it(w,$(S,w));else{if(mn&&U(f))for(const w of l.mount){const I=$(i,w);if(I&&I._f){const j=Array.isArray(I._f.refs)?I._f.refs[0]:I._f.ref;if(pr(j)){const K=j.closest("form");if(K){K.reset();break}}}}i={}}o=e.shouldUnregister?m.keepDefaultValues?Fe(a):{}:Fe(S),p.array.next({values:{...S}}),p.values.next({values:{...S}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!d.isValid||!!m.keepIsValid,s.watch=!!e.shouldUnregister,p.state.next({submitCount:m.keepSubmitCount?n.submitCount:0,isDirty:m.keepDirty?n.isDirty:!!(m.keepDefaultValues&&!nt(f,a)),isSubmitted:m.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:m.keepDirtyValues?n.dirtyFields:m.keepDefaultValues&&f?kn(a,f):{},touchedFields:m.keepTouched?n.touchedFields:{},errors:m.keepErrors?n.errors:{},isSubmitSuccessful:m.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},yo=(f,m)=>_o(Ge(f)?f(o):f,m);return{control:{register:In,unregister:En,getFieldState:po,handleSubmit:bo,setError:vo,_executeSchema:D,_getWatch:q,_getDirty:P,_updateValid:_,_removeUnmounted:L,_updateFieldArray:F,_updateDisabledField:mo,_getFieldArray:le,_reset:_o,_resetDefaultValues:()=>Ge(r.defaultValues)&&r.defaultValues().then(f=>{yo(f,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:f=>{n={...n,...f}},_disableForm:pp,_subjects:p,_proxyFormState:d,get _fields(){return i},get _formValues(){return o},get _state(){return s},set _state(f){s=f},get _defaultValues(){return a},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:$n,register:In,handleSubmit:bo,watch:hp,setValue:it,getValues:ho,reset:yo,resetField:vp,clearErrors:fp,unregister:En,setError:vo,setFocus:(f,m={})=>{const b=$(i,f),E=b&&b._f;if(E){const S=E.refs?E.refs[0]:E.ref;S.focus&&(S.focus(),m.shouldSelect&&S.select())}},getFieldState:po}}function _r(e={}){const t=ke.useRef(),r=ke.useRef(),[n,i]=ke.useState({isDirty:!1,isValidating:!1,isLoading:Ge(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Ge(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={..._h(e,()=>i(o=>({...o}))),formState:n});const a=t.current.control;return a._options=e,lh({subject:a._subjects.state,next:o=>{sh(o,a._proxyFormState,a._updateFormState,!0)&&i({...a._formState})}}),ke.useEffect(()=>a._disableForm(e.disabled),[a,e.disabled]),ke.useEffect(()=>{if(a._proxyFormState.isDirty){const o=a._getDirty();o!==n.isDirty&&a._subjects.state.next({isDirty:o})}},[a,n.isDirty]),ke.useEffect(()=>{e.values&&!nt(e.values,r.current)?(a._reset(e.values,a._options.resetOptions),r.current=e.values):a._resetDefaultValues()},[e.values,a]),ke.useEffect(()=>{a._state.mount||(a._updateValid(),a._state.mount=!0),a._state.watch&&(a._state.watch=!1,a._subjects.state.next({...a._formState})),a._removeUnmounted()}),t.current.formState=oh(n,a),t.current}var ao=function(e,t,r){if(e&&"reportValidity"in e){var n=$(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},yh=function(e,t){var r=function(i){var a=t.fields[i];a&&a.ref&&"reportValidity"in a.ref?ao(a.ref,i,e):a.refs&&a.refs.forEach(function(o){return ao(o,i,e)})};for(var n in t.fields)r(n)},wh=function(e,t){t.shouldUseNativeValidation&&yh(e,t);var r={};for(var n in e){var i=$(t.fields,n),a=Object.assign(e[n]||{},{ref:i&&i.ref});if(kh(t.names||Object.keys(e),n)){var o=Object.assign({},xh($(r,n)));V(o,"root",a),V(r,n,o)}else V(r,n,a)}return r},xh=function(e){return Array.isArray(e)?e.filter(Boolean):[]},kh=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},Sh=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var i=n.path.map(function(s){return s.key}).join(".");if(r[i]||(r[i]={message:n.message,type:n.validation}),t){var a=r[i].types,o=a&&a[n.validation];r[i]=Ha(i,t,r,n.validation,o?[].concat(o,n.message):n.message)}e.issues.shift()}}return r},yr=function(e,t,r){return r===void 0&&(r={}),function(n,i,a){try{return Promise.resolve(function(o,s){try{var l=function(){function u(d){return{values:r.raw?n:d,errors:{}}}var h=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(Zt(e,n,h)):Promise.resolve(hu(e,n,h)).then(u)}()}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(o instanceof Jt)return{values:{},errors:wh(Sh(o,!a.shouldUseNativeValidation&&a.criteriaMode==="all"),a)};throw o}))}catch(o){return Promise.reject(o)}}};const oo=27,so=12,lo=10,Ch=pt("enum"),$h=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return yr(ne({checked:bi(gi(vi()),r=>Object.entries(r).filter(([n,i])=>i).map(([n,i])=>n),[Xt(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),Qt(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},Eh=Rr(({option:e,...t},r)=>c(W,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),c("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})]})),co=Ct("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:La}}}),Ih=({input:e,onSubmitSuccess:t})=>{var u,h;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,i=n&&e.config.options.length===2,{register:a,handleSubmit:o,formState:{errors:s}}=_r({defaultValues:{checked:n?{}:Ch(r)?Object.fromEntries(r.value.map(d=>[d,!0])):{}},resolver:$h(e.config)}),l=vn();return i?c("ul",{style:{maxHeight:6.5*oo+5*so+2*lo},class:co({variant:"booleanLike"}),children:e.config.options.map((d,p)=>c("li",{class:"flex-1",children:c(Da,{type:"submit",ref:g=>{g&&p===0&&(l.current=g)},label:d.label,value:"true",onClick:()=>t({type:"enum",value:[d.value]})})},d.value))}):c("form",{noValidate:!0,onSubmit:d=>o(p=>{const g=p.checked;t({type:"enum",value:g})})(d),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*oo+5*so+2*lo},class:co({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((d,p)=>{const g=`checked.${d.value}`,{ref:v,...y}=a(g);return c("li",{class:"relative",children:c(Eh,{option:d,autoFocus:p===0,ref:k=>{k&&p===0&&(l.current=k),v(k)},id:g,...y,onClick:n?()=>t({type:"enum",value:[d.value]}):void 0})},d.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:c(tt,{}),e.config.minSelected===0&&c(rt,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(vt,{error:(h=s.checked)==null?void 0:h.root})})]})},Th=pt("number"),Ah=(e,t)=>{const r=e.min??Number.MIN_SAFE_INTEGER,n=e.max??Number.MAX_SAFE_INTEGER,i=e.decimalCases??0;return yr(ne({number:Or(t("validation_number"),[yu(r,t("validation_number_min",{min:r})),_u(n,t("validation_number_max",{max:n})),gu(a=>a===Number(a.toFixed(i)),t("validation_number_decimal_cases",{count:i}))])}))},Mh=({input:e,onSubmitSuccess:t})=>{var d;const r=e.config.defaultValue,n=e.key?(d=T.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,{t:i}=he(),{register:a,handleSubmit:o,formState:{errors:s}}=_r({defaultValues:{number:r?Number(r):Th(n)?n.value:void 0},resolver:Ah(e.config,i)}),{ref:l,...u}=a("number",{required:!e.config.optional,valueAsNumber:!0}),h=de();return ue(()=>{h.current&&(h.current.focus(),h.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{p.number!==void 0&&t({type:"number",value:p.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...u,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),l(p)},type:"text",min:e.config.min,max:e.config.max,class:Vt({optional:e.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:e.config.placeholder}),e.config.optional&&c(rt,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),c(tt,{})]}),c(vt,{error:s.number})]})},Nh=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(pn).find(i=>e.startsWith(i[1])),r=t?t[1]:"",n=e.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},Ph="44",Oh=pt("string"),Fh=pt("phone"),Lh=e=>{const t=X(e("validation_country_code"),[_i(/^\+?[0-9 -]+$/,e("validation_country_code"))]);return yr(ne({countryCode:t,phoneNumber:bi(X(e("validation_phone"),[_i(/^\+?[0-9 -]+$/,e("validation_phone"))]),r=>r.replace(/[^0-9]/g,""),[])}))},Dh=({input:e,onSubmitSuccess:t})=>{var y;const r=e.key?(y=T.current$.value.flow)==null?void 0:y.data.submissions[e.key]:void 0,{t:n}=he(),[i,a]=me(),o=Oh(r)?Nh(r.value):Fh(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:u},watch:h}=_r({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??e.config.defaultValue.countryCode??Ph,phoneNumber:(o==null?void 0:o.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:Lh(n)}),{ref:d,...p}=s("phoneNumber",{required:!e.config.optional}),g=de(),v=h("countryCode");return ue(()=>{g.current&&(g.current.focus(),g.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(k=>{const x=k.phoneNumber.replace(/[^0-9]/g,""),_=k.countryCode.replace(/[^0-9]/g,"");if(a(void 0),x.length+_.length>(e.config.maxChars||Number.POSITIVE_INFINITY))return a(n("validation_max_chars",{count:e.config.maxChars??999}));if(x.length+_.length<(e.config.minChars||0))return a(n("validation_min_chars",{count:e.config.minChars??1}));e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:_,phoneNumber:x}}):t({type:"string",value:v+k.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${e.key}`,children:[c("span",{children:["+",v]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(pn).map(([k,x])=>c("option",{value:x,children:[k," (+",x,")"]},k))})]}),c("input",{...p,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(g.current=k),d(k)},class:Vt({optional:e.config.optional,className:"flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&c(rt,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),c(tt,{})]}),c(vt,{error:u.countryCode||u.phoneNumber||{message:i}})]})},Vh=({input:e,onSubmitSuccess:t})=>c("div",{class:"flex flex-col items-center py-3",children:c("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:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),c("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:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),Cn={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"},jh={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},zh=pt("string"),Rh=(e,t)=>{const r={maxLength:t("validation_max_chars",{count:e.maxChars??999}),minLength:t("validation_min_chars",{count:e.minChars??1})};return yr(ne({text:{email:X(Cn.email,[bu(Cn.email),Qt(e.minChars??1,r.minLength),Xt(e.maxChars??1/0,r.maxLength)]),text:X([Qt(e.minChars??1,r.minLength),Xt(e.maxChars??1/0,r.maxLength)]),url:X([wu(Cn.url),Qt(e.minChars??1,r.minLength),Xt(e.maxChars??1/0,r.maxLength)])}[e.format]}))},Bh={text:({input:e,onSubmitSuccess:t})=>{var d;const{t:r}=he(),n=e.key?(d=T.current$.value.flow)==null?void 0:d.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:a,handleSubmit:o,formState:{errors:s}}=_r({defaultValues:{text:i||(zh(n)?n.value:"")},resolver:Rh(e.config,r)}),{ref:l,...u}=a("text",{required:!e.config.optional}),h=de();return ue(()=>{h.current&&(h.current.focus(),h.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{t({type:"string",value:p.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...u,...jh[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),l(p)},placeholder:e.config.placeholder,class:Vt({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&c(rt,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),c(tt,{})]}),c(vt,{error:s.text})]})},phone:Dh,"multiple-choice":Ih,boolean:Wf,file:th,submit:Vh,address:Uf,number:Mh},Uh=({logger:e})=>{var a;const t=(a=T.current$.value.flow)==null?void 0:a.data.currentInput,[r,n]=Mf(),i=de(null);return T.inputHeight$.value=n.height,ye(()=>{const o=i.current;if(o)return o.addEventListener("transitionstart",ee.scrollToEnd.smooth),o.addEventListener("transitioncancel",ee.scrollToEnd.smooth),o.addEventListener("transitionend",ee.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",ee.scrollToEnd.smooth),o.removeEventListener("transitioncancel",ee.scrollToEnd.smooth),o.removeEventListener("transitionend",ee.scrollToEnd.smooth)}},[]),c("div",{ref:i,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:n.height},children:c("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:t?(()=>{const o=Bh[t.type];return c(o,{logger:e,onSubmitSuccess:ee.onSubmitSuccessFn$.value,input:t})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Vt({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(tt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var Hh=function(e){return e instanceof RegExp},qh=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},uo=function(e){return typeof e=="string"},Kh=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Gh(e,t,r){var n=0,i=0;if(e==="")return e;if(!e||!uo(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var a=t;Hh(a)||(a=new RegExp("("+qh(a)+")","gi"));for(var o=e.split(a),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[s].length,n+=o[s-1].length,o[s]=r(o[s],s,n),n+=i}return o}var Wh=function(t,r,n){return Array.isArray(t)||(t=[t]),Kh(t.map(function(i){return uo(i)?Gh(i,r,n):i}))};const wr=Te(Wh),Yh=/(\[[^\]]+\]\([^)]+\))/g,Jh=/\[([^\]]+)\]\(([^)]+)\)/,Zh=/(https?:\/\/[^\s]+)/g,Xh=/_(.*?)_/g,Qh=/\*\*(.*?)\*\*/g,fo="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",ep=e=>{const t=wr(e,Yh,(a,o)=>{const[,s,l]=a.match(Jh)??[];return l?c("a",{class:fo,href:l,children:s??l},l+o):c("span",{children:"INVALID LINK"})}),r=wr(t,Zh,(a,o)=>c("a",{class:fo,href:a,children:a},a+o)),n=wr(r,Xh,(a,o)=>c("em",{children:a},a+o));return wr(n,Qh,(a,o)=>c("strong",{children:a},a+o))},tp=Ct("select-text 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"}}),rp=({children:e,className:t,animate:r,side:n,...i})=>c("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:tp({className:t,side:n,animate:r}),...i,children:e}),np=({message:e})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("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,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("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"})})]})}),ip=({className:e,...t})=>(ye(()=>{ee.scrollToEnd.smooth()}),c("div",{"aria-hidden":!0,children:ee.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Je("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),ap={bot:"left",user:"right"},op=Ct("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]"}}}),sp=({lastSentMessageFooter:e})=>{var r;const t=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return ye(()=>{ee.scrollToEnd.smooth()},[t.length]),c("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,i)=>c(W,{children:c("li",{class:"flex",children:Qe(n).with({type:"system"},a=>c("p",{class:op({variant:a.variant}),children:a.text})).with({type:"text",author:A.union("bot","user")},a=>{const o=a.author==="user"&&!t.slice(i+1).some(u=>u.type==="text"&&u.author==="user"),s=i===t.length-1,l=a.author==="bot"?ep(a.text):a.text;return c(rp,{animate:s,side:ap[a.author],children:[l,o?e:null]},i)}).with({type:"link"},a=>c(np,{message:a})).with({type:"image"},a=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:a.url,style:{aspectRatio:a.width/a.height}})).with({type:"file"},a=>c(Xf,{class:a.author==="bot"?void 0:"ml-auto",file:{name:a.fileName,sizeKb:a.fileSizeKb}})).with({type:"loading"},a=>{const o=t[t.length-1];return!(a===o)||ee.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(_a,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),c(ip,{},"typing")]})},lp=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=T.current$.value;we(n,"Flow is required to exist to show chatbot body");const i=T.viewState$.value,{chatRef:a,chatService:o}=Df(),{t:s}=he(),[l,u]=me();return ue(()=>{i==="maximised"&&ee.scrollToEnd.instant()},[i]),ue(()=>{var k,x;const{state:h,flow:d}=T.current$.peek();if(h!=="loaded")throw new Error(s("invalid_state"));let p=d.data.nodeHistory.at(-1);if(ee.scrollToEnd.instant(),T.setInput(void 0),d.data.isFinished)return;p===void 0?(p=pa(n.nodes).id,T.setCurrentNodeId(p),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:d.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(k=n.analytics)==null?void 0:k.customProperties})):T.removeMessagesSentByNodeIds([p]);const{interpret:g,abort:v,undo:y}=df({context:n.context,analytics:{service:r,customProperties:(x=n.analytics)==null?void 0:x.customProperties},apiClient:t,logger:e,flow:n,chatService:o,t:s,getSubmissions:()=>{var _;return(_=T.current$.peek().flow)==null?void 0:_.data.submissions},onInterpret:(_,M)=>{var N;const F=T.current$.peek().flow;we(F),M&&(F.data.sequence=F.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:M.id,flow_build:n.build,to_node_id:_.id,sequence:F.data.sequence,flow_session_id:F.data.flowSessionId,job:n.job},customProperties:(N=n.analytics)==null?void 0:N.customProperties})),T.setCurrentNodeId(_.id)},onFlowEnd:async()=>{var M;T.markAsFinished();const _=T.current$.peek().flow;we(_),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:_.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(M=n.analytics)==null?void 0:M.customProperties})}});return u(()=>y),g(p),v},[r,t,o,e,n,s]),c(W,{children:[c("div",{ref:a,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:c(sp,{lastSentMessageFooter:n.data.isFinished||!l?null:c(up,{undoFn:l})})}),c(Uh,{logger:e})]})},cp=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"):[],up=({undoFn:e})=>{const{t}=he();return c("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:c("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:r}=T.current$.peek();we(r);const{removed:n}=e(r.data.nodeHistory),i=r.data.nodeHistory.splice(-n);i.length!==0&&(T.removeMessagesSentByNodeIds(i),T.setInput(void 0),i.pop(),i.map(a=>r.nodes.find(o=>o.id===a)).filter(Boolean).flatMap(cp).forEach(a=>delete r.data.submissions[a]),T.current$.value={...T.current$.value})},children:t("undo")})})},dp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:lp},Symbol.toStringTag,{value:"Module"}))})();
|
|
5
|
+
}`},Ei=({context:t,schema:e,logger:r})=>{if(e)for(const a in e){const i=e[a];if(!i)continue;const n=_e(t,a,null);if(i.required&&n===null){const o=`Configuration error in context: ${a} is required`;throw r.error(o),new Error(o)}switch(i.type){case"number":if(typeof n!="number")throw new Error(`Configuration error in context: ${a} is not a number`);break;case"string":if(typeof n!="string")throw new Error(`Configuration error in context: ${a} is not a string`);break;default:i.type}}},cf=({_internal_domManager:t=Zu(),theme:e,terms:r,feedback:a})=>Wt(({apiClient:i,logger:n,analytics:o})=>{let s=!1;const l=mu({locale:void 0,overrides:r??{}}),u=()=>{var p;if(typeof window>"u")return;const h=[ct("style",{id:"inploi-chatbot-styles"},Xu),ct("style",{id:"inploi-chatbot-theme"},lf(e))],d=t.getOrCreateChatbotElement();if(ce(ct(W,{},[h,ct(Wu,{apiClient:i,logger:n,analytics:o,params:{theme:e,terms:r,feedback:a}})]),d),a){const v=a.plugin({apiClient:i,logger:n,analytics:o}),g=d.querySelector("dialog");if(!g)throw new Error("Couldn't find feedback host");v.render({key:"chatbot-header",size:"sm",theme:{accent:{chroma:e.chroma??1,hue:e.hue},positive:{hue:180,chroma:1},negative:{hue:33,chroma:1},mode:"light",corners:"rounded",highlights:"stroke"},terms:((p=a.params)==null?void 0:p.terms)??{},host:g})}s=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(s)return;u(),n.info("Chatbot plugin prepared")}catch(h){n.error("Error preparing chatbot plugin",h)}},fetchFlowByJobId:async(h,d)=>{const p=new URLSearchParams({id_type:(d==null?void 0:d.idType)==="inploi"?"internal":"external"});return i.fetch([`/flow/job/${h}`,p.toString()].filter(Boolean).join("?")).then(v=>{const g=Xe(Ju,v);return{flow:g.flow,title:l("applying_for",{title:g.job.title}),flowKeys:[g.job.id,...(d==null?void 0:d.flowKeys)??[]],job:{id:g.job.id,id_type:"external"},...d}})},fetchFlowById:async(h,d)=>i.fetch(`/flow/id/${h}`).then(p=>{var g;const v=Xe(Yu,p);return{flow:v.flow,title:"Chatbot",flowKeys:(d==null?void 0:d.flowKeys)??[],...d,analytics:{customProperties:{flow_id:v.flow.id,flow_version:v.flow.version,...(g=d==null?void 0:d.analytics)==null?void 0:g.customProperties}}}}),open:async h=>{if(!(typeof window>"u"))try{T.cancelCurrentFlow(),T.viewState$.value="maximised",s||u(),h instanceof Promise?(T.current$.value={state:"loading"},h.then(async d=>{Ei({context:d.context||{},schema:d.flow.context_schema,logger:n}),T.startFlow(d)}).catch(d=>{const p=d instanceof Error?d.message:l("unknown_error");T.current$.value={state:"error",error:p}})):(Ei({context:h.context||{},schema:h.flow.context_schema,logger:n}),T.startFlow(h))}catch(d){n.error("Error starting flow",d)}},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=cf;const Ii=({condition:t,context:e,submissions:r,ifBlock:a})=>{const[i,...n]=t.compareKey.split(".");if(!i)return!1;const o=Ai({context:e,key:i,path:n,submissions:r});if(!o)return!1;switch(o.type){case"address":{const s=_e(o.value,n.join("."));switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"integration":{if(typeof o.value!="object"||Array.isArray(o.value))return!1;const s=_e(o.value,n.join(".")),l={...a,data:{...a.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Le(l,{submissions:{_temp:{value:s,type:"boolean"}},context:e});case"string":return Le(l,{submissions:{_temp:{value:s,type:"string"}},context:e});case"number":return Le(l,{submissions:{_temp:{value:s,type:"number"}},context:e});case"object":return Array.isArray(s)&&s.every(gi)?Le(l,{submissions:{_temp:{value:s,type:"enum"}},context:e}):!1}break}case"boolean":{const s=t.compareValue==="true";switch(t.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s}break}case"phone":case"string":{const s=o.type==="phone"?fr(o.value):o.value;switch(t.compare){case"equals":return s===t.compareValue;case"contains":return s?s.includes(t.compareValue):!1;case"notEquals":return s!==t.compareValue;case"notContains":return s?!s.includes(t.compareValue):!0}break}case"number":{try{const s=Number(t.compareValue);switch(t.compare){case"equals":return o.value===s;case"notEquals":return o.value!==s;case"greaterThan":return o.value>s;case"greaterThanOrEqualTo":return o.value>=s;case"lessThan":return o.value<s;case"lessThanOrEqualTo":return o.value<=s}}catch{return console.error(`Failed to parse number in if-block ${a.id}`,o.value),!1}break}case"enum":switch(t.compare){case"equals":return o.value.length===1&&o.value[0]===t.compareValue;case"notEquals":return o.value.length===1&&o.value[0]!==t.compareValue;case"contains":return o.value.includes(t.compareValue);case"notContains":return!o.value.includes(t.compareValue)}break}},Le=(t,{context:e,submissions:r})=>{const a="combinator"in t.data?t.data.conditions:[t.data];if(("combinator"in t.data?t.data.combinator:"and")==="or"){for(const n of a)if(Ii({condition:n,context:e,submissions:r,ifBlock:t}))return!0;return!1}else{for(const n of a)if(!Ii({condition:n,context:e,submissions:r,ifBlock:t}))return!1;return!0}},df=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,$t=(t,{context:e,submissions:r})=>t.replace(df,(a,i,n="")=>{const[o,...s]=i.trim().split("."),l=Ai({key:o,path:s,submissions:r,context:e});if(!l)return n;switch(l.type){case"boolean":return l.value===!0?"true":"false";case"file":return l.value.map(u=>`${u.name} (${Ne(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():n;case"phone":return fr(l.value);case"integration":{if(typeof l.value!="object"||Array.isArray(l.value))break;const u=_e(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(gi))return u.join(", ")}break}}return n}),Ti=({node:t,nodes:e,stopWhen:r})=>{if((r==null?void 0:r(t))===!0)return t;const a=t.nextId?e.find(i=>i.id===t.nextId):void 0;if(a)return Ti({node:a,nodes:e,stopWhen:r})},uf=({childNode:t,nodes:e})=>{const a=e.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const n=e.find(s=>s.id===i.branchId);if(!n)return!1;const o=Ti({node:n,nodes:e,stopWhen:s=>s.id===t.id});return!(!o||o.id!==t.id)});if(a!=null&&a.nextId)return e.find(i=>i.id===a.nextId)},ff=({flow:t,analytics:e,logger:r,context:a,apiClient:i,getSubmissions:n,chatService:o,onFlowEnd:s,onInterpret:l,t:u})=>{let h=new AbortController;const d={...e.service,log:v=>e.service.log({...v,customProperties:{...v.customProperties,...e.customProperties}})},p=async(v,g)=>{const _=n();l==null||l(v,g);try{await hf({flow:t,analytics:d,logger:r,apiClient:i,context:a,node:v,submissions:_,t:u,chat:{sendMessage:async k=>o.send({groupId:v.id,message:k,signal:h.signal}),userInput:async k=>o.input({input:k,signal:h.signal}),addToSubmissions:o.addToSubmissions},next:k=>{const x=k?t.nodes.find(m=>m.id===k):uf({childNode:v,nodes:t.nodes});return x?p(x,v):s==null?void 0:s(v)},end:()=>s==null?void 0:s(v)})}catch(k){if(k instanceof Pe)return;throw k}};return{interpret:async v=>{const g=t.nodes.find(_=>_.id===v)??pi(t.nodes);return p(g)},undo:v=>{let g=1;const _=t.nodes.find(x=>x.id===v[v.length-1]);for(let x=v.length-2;x>0;x--){const m=v[x],M=t.nodes.find(F=>F.id===m);if(!M||(g++,M.type.startsWith("question-")))break}h.abort(),h=new AbortController;const k=t.nodes.find(x=>x.id===v[v.length-g]);return yt(k,"Undo failed: new start node not found"),p(k,_),{removed:g}},abort:()=>{h.abort()}}},fr=t=>`+${t.countryCode} ${t.phoneNumber}`;async function hf(t){const e=t.node;switch(e.type){case"text":return yf({...t,node:e});case"image":return xf({...t,node:e});case"question-text":return kf({...t,node:e});case"question-enum":return $f({...t,node:e});case"question-number":return Sf({...t,node:e});case"question-phone":return Cf({...t,node:e});case"question-boolean":return Ef({...t,node:e});case"question-file":return Tf({...t,node:e});case"question-address":return If({...t,node:e});case"end-flow":return Af({...t,node:e});case"if-block":return _f({...t,node:e});case"jump":return bf({...t,node:e});case"link":return mf({...t,node:e});case"integration-application-submit":return wf({...t,node:e});case"add-submission":return vf({...t,node:e});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return gf({...t,node:e});case"feedback":return pf({...t,node:e});default:throw new Error(`Unknown node: ${JSON.stringify(e)}`)}}const De=(t,e)=>{var a;const r=(a=t[e])==null?void 0:a.value;if(typeof r!="string"&&typeof r!="number")throw new Error(`Submission at “${e}” is not a string or number`);return r};async function pf({next:t,node:e}){t(e.nextId)}async function gf({next:t,node:e,analytics:r,submissions:a,logger:i}){if(!a)return t(e.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:De(a,e.data.key).toString(),first_name:e.data.firstName?De(a,e.data.firstName).toString():void 0,last_name:e.data.lastName?De(a,e.data.lastName).toString():void 0,email:e.data.email?De(a,e.data.email).toString():void 0,phone_number:e.data.phoneNumber?De(a,e.data.phoneNumber).toString():void 0,custom_traits:e.data.customTraits?Object.fromEntries(e.data.customTraits.map(({key:n,value:o})=>{var s;return[n,(s=a[o])==null?void 0:s.value]})):void 0}})}catch(n){i.error(n)}finally{t(e.nextId)}}async function bf({next:t,node:e}){t(e.data.targetId)}async function vf({next:t,node:e,logger:r,submissions:a,context:i}){if(!a){r.error("Submissions not found");return}a[e.data.key]={type:"string",value:$t(e.data.value,{submissions:a,context:i})},t(e.nextId)}async function wf({chat:t,next:e,node:r,logger:a,apiClient:i,submissions:n,analytics:o,flow:s,t:l}){const u=async h=>{h!==!0&&await t.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await t.sendMessage({type:"loading"});const{anonymous_id:d,session_id:p}=o.getSessionInfo(),v=await i.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:d,session_id:p,job:s.job,submissions:Du(n||{})})}).catch(g=>g);r.data.key&&t.addToSubmissions(r.data.key,{type:"integration",value:v}),Qt(v).with({integration_response:A.select(A.union({service:A.optional(A.string),status:A.number,data:A.any},{service:A.optional(A.string),status:A.number,error:{message:A.string,data:A.any}}))},g=>{o.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:g.service??"INVALID_SERVICE",response:{status:g.status,payload:"data"in g?g.data:g.error.data??null},job:s.job}})}).otherwise(()=>{}),await Qt(v).with(A.union({ats_data:A.select("redirect",{redirect_url:A.string,message:A.optional(A.union(A.string,A.nullish)),button_text:A.optional(A.union(A.string,A.nullish))})},{integration_response:{data:A.select("redirect",{redirect_url:A.string,message:A.optional(A.union(A.string,A.nullish)),button_text:A.optional(A.union(A.string,A.nullish))})}}),async g=>{if(g.redirect!==void 0){await t.sendMessage({type:"text",author:"bot",text:g.redirect.message??l("submission_redirect_message")});try{const _=new URL(g.redirect.redirect_url);d&&!_.searchParams.has("anonymous_id")&&_.searchParams.set("anonymous_id",d),await t.sendMessage({type:"link",href:_.toString(),text:g.redirect.button_text??l("complete_submission"),onClick:()=>{if(!p){a.error("session_id not set, cannot log FLOW_REDIRECT event");return}o.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:p,flow_version:s.version,href:_.toString(),job:s.job}})}})}catch(_){a.error(`Invalid redirect URL: ${g.redirect.redirect_url}`,_),t.sendMessage({type:"system",variant:"error",text:l("redirect_url_error")})}e(r.nextId)}}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await t.sendMessage({type:"system",variant:"success",text:l("submission_completed")}),e(r.nextId)}).with(A.union({success:!1,ats_data:A.select("error",{message:A.string})},{integration_response:{error:A.select("error",{message:A.string})}}),async g=>{var _;a.error(g.error),await t.sendMessage({type:"system",variant:"error",text:((_=g.error)==null?void 0:_.message)||l("submission_failed")}),await u(!1)}).otherwise(async g=>{a.error(g),await t.sendMessage({type:"system",variant:"error",text:l("submission_failed")}),await u(!1)})};await u(r.data.skipConfirmation)}async function mf({chat:t,next:e,node:r,submissions:a,context:i}){await t.sendMessage({type:"link",href:$t(r.data.href,{submissions:a,context:i}),text:$t(r.data.cta,{submissions:a,context:i})}),e(r.nextId)}async function _f({submissions:t,next:e,node:r,context:a}){e(Le(r,{submissions:t,context:a})?r.branchId:r.nextId)}async function yf({chat:t,next:e,node:r,submissions:a,context:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.text,{submissions:a,context:i})}),e(r.nextId)}async function xf({chat:t,next:e,node:r}){await t.sendMessage({author:"bot",type:"image",url:r.data.url,height:r.data.height,width:r.data.width}),e(r.nextId)}async function kf({chat:t,next:e,node:r,submissions:a,context:i,t:n}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:i})});const o=r.data.format==="phone"?await t.userInput({key:r.data.key,type:"phone",config:{optional:r.data.optional,placeholder:r.data.placeholder,maxChars:r.data.maxChars,minChars:r.data.minChars,submissionFormat:"text",defaultValue:{}}}):await t.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format,maxChars:r.data.maxChars,minChars:r.data.minChars}});o===null?await t.sendMessage({type:"system",variant:"info",text:n("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.type==="phone"?fr(o.value):o.value}),e(r.nextId)}async function Sf({chat:t,next:e,node:r,submissions:a,context:i,t:n}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:i})});const o=await t.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}});o===null?await t.sendMessage({type:"system",variant:"info",text:n("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value.toString()}),e(r.nextId)}async function Cf({chat:t,next:e,node:r,submissions:a,context:i}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:i})});const n=await t.userInput({key:r.data.key,type:"phone",config:{minChars:r.data.minChars,maxChars:r.data.maxChars,defaultValue:{countryCode:r.data.defaultCountryCode},placeholder:r.data.placeholder,submissionFormat:"phone",optional:r.data.optional}});n===null?await t.sendMessage({type:"system",variant:"info",text:"Skipped"}):await t.sendMessage({author:"user",type:"text",text:n.type==="phone"?fr(n.value):n.value}),e(r.nextId)}async function $f({chat:t,next:e,node:r,submissions:a,context:i,t:n}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:i})});const o=await t.userInput({key:r.data.key,type:"multiple-choice",config:r.data});o.value.length===0?await t.sendMessage({type:"system",variant:"info",text:n("skipped")}):await t.sendMessage({author:"user",type:"text",text:r.data.options.filter(s=>o.value.includes(s.value)).map(s=>s.label).join(", ")}),e(r.nextId)}async function Ef({chat:t,next:e,node:r,submissions:a,context:i,t:n}){await t.sendMessage({author:"bot",type:"text",text:$t(r.data.question,{submissions:a,context:i})});const o=await t.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});o===null?await t.sendMessage({type:"system",variant:"info",text:n("skipped")}):await t.sendMessage({author:"user",type:"text",text:o.value===!0?r.data.trueLabel:r.data.falseLabel}),e(r.nextId)}async function If({chat:t,next:e,node:r,t:a}){await t.sendMessage({author:"bot",type:"text",text:r.data.question});const i=await t.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(i===null)await t.sendMessage({type:"system",variant:"info",text:a("skipped")});else{const n=Object.values(i.value).filter(o=>o&&o.trim().length>0).join(", ");await t.sendMessage({author:"user",type:"text",text:n})}return e(r.nextId)}async function Tf({node:t,chat:e,next:r,submissions:a,context:i,t:n}){await e.sendMessage({author:"bot",type:"text",text:$t(t.data.question,{submissions:a,context:i})});const o=await e.userInput({key:t.data.key,type:"file",config:{optional:t.data.optional,extensions:t.data.extensions,fileSizeLimitKib:t.data.maxSizeKb??10*1024,allowMultiple:t.data.multiple===!0}});if(o===null)await e.sendMessage({type:"system",variant:"info",text:n("skipped")});else for(const s of o.value)await e.sendMessage({author:"user",type:"file",fileName:s.name,fileSizeKb:s.sizeKb});r(t.nextId)}async function Af({chat:t,end:e,node:r}){await t.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),e()}const Ai=({key:t,path:e,submissions:r,context:a})=>{if(t==="$context"){if(!e)return;const i=_e(a,e.join("."));switch(typeof i){case"string":return{type:"string",value:i};case"number":return{type:"number",value:i};case"boolean":return{type:"boolean",value:i};default:console.warn(`Unexpected type for $context.${e.join(".")}`,i);return}}return r==null?void 0:r[t]};function ua(t,e,r){var a,i,n,o,s;e==null&&(e=100);function l(){var h=Date.now()-o;h<e&&h>=0?a=setTimeout(l,e-h):(a=null,r||(s=t.apply(n,i),n=i=null))}var u=function(){n=this,i=arguments,o=Date.now();var h=r&&!a;return a||(a=setTimeout(l,e)),h&&(s=t.apply(n,i),n=i=null),s};return u.clear=function(){a&&(clearTimeout(a),a=null)},u.flush=function(){a&&(s=t.apply(n,i),n=i=null,clearTimeout(a),a=null)},u}ua.debounce=ua;var Mf=ua;const Mi=Tt(Mf);function Nf(t){let{debounce:e,scroll:r,polyfill:a,offsetSize:i}=t===void 0?{debounce:0,scroll:!1,offsetSize:!1}:t;const n=a||(typeof window>"u"?class{}:window.ResizeObserver);if(!n)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[o,s]=bt({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=ut({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),u=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=ut(!1);_t(()=>(d.current=!0,()=>void(d.current=!1)));const[p,v,g]=Pt(()=>{const m=()=>{if(!l.current.element)return;const{left:M,top:F,width:N,height:H,bottom:et,right:pt,x:D,y:st}=l.current.element.getBoundingClientRect(),it={left:M,top:F,width:N,height:H,bottom:et,right:pt,x:D,y:st};l.current.element instanceof HTMLElement&&i&&(it.height=l.current.element.offsetHeight,it.width=l.current.element.offsetWidth),Object.freeze(it),d.current&&!Lf(l.current.lastBounds,it)&&s(l.current.lastBounds=it)};return[m,h?Mi(m,h):m,u?Mi(m,u):m]},[s,i,u,h]);function _(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(m=>m.removeEventListener("scroll",g,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function k(){l.current.element&&(l.current.resizeObserver=new n(g),l.current.resizeObserver.observe(l.current.element),r&&l.current.scrollContainers&&l.current.scrollContainers.forEach(m=>m.addEventListener("scroll",g,{capture:!0,passive:!0})))}const x=m=>{!m||m===l.current.element||(_(),l.current.element=m,l.current.scrollContainers=Ni(m),k())};return Of(g,!!r),Pf(v),_t(()=>{_(),k()},[r,g,v]),_t(()=>_,[]),[x,o,p]}function Pf(t){_t(()=>{const e=t;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[t])}function Of(t,e){_t(()=>{if(e){const r=t;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[t,e])}function Ni(t){const e=[];if(!t||t===document.body)return e;const{overflow:r,overflowX:a,overflowY:i}=window.getComputedStyle(t);return[r,a,i].some(n=>n==="auto"||n==="scroll")&&e.push(t),[...e,...Ni(t.parentElement)]}const Ff=["x","y","top","bottom","left","right","width","height"],Lf=(t,e)=>Ff.every(r=>t[r]===e[r]),ee=({class:t,...e})=>{const{t:r}=ht();return c("button",{class:Jt("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",t),type:"submit",...e,children:c("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[c("title",{children:r("send")}),c("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),c("path",{d:"M8 4V13"})]})})},Df=25,fa=Ut({instant:()=>{},smooth:()=>{}}),tt={onSubmitSuccessFn$:Ut(()=>{}),isBotTyping$:Ut(!1),scrollToEnd:{instant:()=>fa.value.instant(),smooth:()=>fa.value.smooth()}},Vf=()=>{const t=ut(null);dt(()=>{fa.value={instant:()=>{var r;return(r=t.current)==null?void 0:r.scrollTo({top:t.current.scrollHeight,behavior:"instant"})},smooth:()=>{t.current&&t.current.scrollHeight-t.current.scrollTop<=t.current.clientHeight*2&&t.current.scrollTo({top:t.current.scrollHeight,behavior:"smooth"})}}},[t]);const e=Pt(()=>({addToSubmissions:(a,i)=>T.setSubmission(a,i),send:async({message:a,signal:i,groupId:n})=>{if(await Qt(a).with({author:"bot",type:"text"},async o=>{if(i!=null&&i.aborted)throw new Pe;tt.isBotTyping$.value=!0;const s=Math.min(Math.max(20,o.text.length),100)*Df;await new Promise(l=>setTimeout(l,s,{signal:i})),tt.isBotTyping$.value=!1}).otherwise(async()=>{}),i!=null&&i.aborted)throw new Pe;T.addMessage(a,n)},input:({input:a,signal:i})=>{if(i!=null&&i.aborted)throw new Pe;return T.setInput(a),new Promise(n=>{const o=s=>{if(i!=null&&i.aborted)throw new Pe;T.setInput(void 0),a.key&&T.setSubmission(a.key,s),n(s)};tt.onSubmitSuccessFn$.value=o})}}),[]);return{chatRef:t,chatService:e}},ge=({error:t})=>!t||!t.message?null:c("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[c("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),c("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),c("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),c("p",{class:"truncate pr-1 text-sm",children:t.message})]}),re=({class:t,...e})=>{const{t:r}=ht();return c("button",{type:"button",class:Jt("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",t),...e,children:[c("svg",{"aria-hidden":!0,class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[c("title",{children:r("skip")}),c("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),c("path",{d:"M13.25 4.5V8.25H9.5"})]}),r("skip")]})},ha={Afghanistan:"93",Albania:"355",Algeria:"213","American Samoa":"1 684",Andorra:"376",Angola:"244",Anguilla:"1 264",Antarctica:"672","Antigua and Barbuda":"1 268",Argentina:"54",Armenia:"374",Aruba:"297",Australia:"61",Austria:"43",Azerbaijan:"994",Bahrain:"973",Bangladesh:"880",Barbados:"1 246",Belarus:"375",Belgium:"32",Belize:"501",Benin:"229",Bermuda:"1 441",Bhutan:"975",Bolivia:"591","Bosnia and Herzegovina":"387",Botswana:"267","Bouvet Island":"47",Brazil:"55","British Indian Ocean Territory":"246","British Virgin Islands":"1 284",Brunei:"673",Bulgaria:"359","Burkina Faso":"226",Burundi:"257","Cabo Verde":"238",Cambodia:"855",Cameroon:"237",Canada:"1","Caribbean Netherlands":"599","Cayman Islands":"1 345","Central African Republic":"236",Chad:"235",Chile:"56",China:"86","Christmas Island":"61","Cocos (Keeling) Islands":"61",Colombia:"57",Comoros:"269","Cook Islands":"682","Costa Rica":"506",Croatia:"385",Cuba:"53",Curaçao:"599",Cyprus:"357",Czechia:"420","Côte d'Ivoire":"225","Democratic Republic of the Congo":"243",Denmark:"45",Djibouti:"253","Dominican Republic":"1 809",Ecuador:"593",Egypt:"20","El Salvador":"503","Equatorial Guinea":"240",Eritrea:"291",Estonia:"372",Eswatini:"268",Ethiopia:"251","Falkland Islands (Islas Malvinas)":"500","Faroe Islands":"298",Fiji:"679",Finland:"358",France:"33","French Guiana":"594","French Polynesia":"689","French Southern and Antarctic Lands":"262",Gabon:"241",Georgia:"995",Germany:"49",Ghana:"233",Gibraltar:"350",Greece:"30",Greenland:"299",Grenada:"1 473",Guadeloupe:"590",Guam:"1 671",Guatemala:"502",Guernsey:"44",Guinea:"224","Guinea-Bissau":"245",Guyana:"592",Haiti:"509",Honduras:"504","Hong Kong":"852",Hungary:"36",Iceland:"354",India:"91",Indonesia:"62",Iran:"98",Iraq:"964",Ireland:"353","Isle of Man":"44",Israel:"972",Italy:"39",Jamaica:"1 876",Japan:"81",Jersey:"44",Jordan:"962",Kazakhstan:"7",Kenya:"254",Kiribati:"686",Kosovo:"383",Kuwait:"965",Kyrgyzstan:"996",Laos:"856",Latvia:"371",Lebanon:"961",Lesotho:"266",Liberia:"231",Libya:"218",Liechtenstein:"423",Lithuania:"370",Luxembourg:"352",Macao:"853",Madagascar:"261",Malawi:"265",Malaysia:"60",Maldives:"960",Mali:"223",Malta:"356","Marshall Islands":"692",Martinique:"596",Mauritania:"222",Mauritius:"230",Mayotte:"262",Mexico:"52",Micronesia:"691",Moldova:"373",Monaco:"377",Mongolia:"976",Montenegro:"382",Montserrat:"1 664",Morocco:"212",Mozambique:"258","Myanmar (Burma)":"95",Namibia:"264",Nauru:"674",Nepal:"977",Netherlands:"31","New Caledonia":"687","New Zealand":"64",Nicaragua:"505",Niger:"227",Nigeria:"234",Niue:"683","Norfolk Island":"672","North Korea":"850","North Macedonia":"389","Northern Mariana Islands":"1 670",Norway:"47",Oman:"968",Pakistan:"92",Palau:"680",Palestine:"970",Panama:"507","Papua New Guinea":"675",Paraguay:"595",Peru:"51",Philippines:"63","Pitcairn Islands":"64",Poland:"48",Portugal:"351","Puerto Rico":"1 787",Qatar:"974",Romania:"40",Russia:"7",Rwanda:"250",Réunion:"262","Saint Barthélemy":"590","Saint Helena, Ascension and Tristan da Cunha":"290","Saint Kitts and Nevis":"1 869","Saint Lucia":"1 758","Saint Martin":"590","Saint Pierre and Miquelon":"508","Saint Vincent and the Grenadines":"1 784",Samoa:"685","San Marino":"378","Saudi Arabia":"966",Senegal:"221",Serbia:"381",Seychelles:"248","Sierra Leone":"232",Singapore:"65","Sint Maarten":"1 721",Slovakia:"421",Slovenia:"386","Solomon Islands":"677",Somalia:"252","South Africa":"27","South Georgia and the South Sandwich Islands":"500","South Korea":"82","South Sudan":"211",Spain:"34","Sri Lanka":"94",Sudan:"249",Suriname:"597","Svalbard and Jan Mayen":"47",Sweden:"46",Switzerland:"41",Syria:"963","São Tomé and Príncipe":"239",Taiwan:"886",Tajikistan:"992",Tanzania:"255",Thailand:"66","The Bahamas":"1 242","The Gambia":"220","Timor-Leste":"670",Togo:"228",Tokelau:"690",Tonga:"676","Trinidad and Tobago":"1 868",Tunisia:"216",Turkmenistan:"993","Turks and Caicos Islands":"1 649",Tuvalu:"688",Türkiye:"90","U.S. Virgin Islands":"1 340",Uganda:"256",Ukraine:"380","United Arab Emirates":"971","United Kingdom":"44","United States":"1","United States Minor Outlying Islands":"1",Uruguay:"598",Uzbekistan:"998",Vanuatu:"678","Vatican City":"379",Venezuela:"58",Vietnam:"84","Wallis and Futuna":"681","Western Sahara":"212",Yemen:"967",Zambia:"260",Zimbabwe:"263","Åland Islands":"358"},Ve=Ce("outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest py-1 text-base outline outline-2 transition-all",{variants:{optional:{true:"pr-16 pl-3",false:"pl-3 pr-3"}},defaultVariants:{optional:!1}}),jf="https://api.mapbox.com/search/searchbox/v1/suggest",zf="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",Rf=t=>atob(t).split("").reverse().join(""),Ot=at({name:Z()}),Bf=at({suggestions:pn(at({full_address:Se(Z()),place_formatted:Se(Z()),name:Se(Z()),mapbox_id:Z(),context:gd(at({address:Ot,street:Ot,neighborhood:Ot,locality:Ot,district:Ot,place:Ot,region:Ot,postcode:Ot,country:Ot}))}))}),Uf=({logger:t,t:e})=>Pt(()=>{var a;const r=(a=T.current$.peek().flow)==null?void 0:a.data.flowSessionId;return r?{enabled:!0,getPredictions:async i=>{const n=new URL(jf);n.searchParams.set("q",i),n.searchParams.set("session_token",r),n.searchParams.set("access_token",Rf(zf));const o=await fetch(n);if(!o.ok)return t.error("Failed to get address details",o),{ok:!1,error:e("address_error")};const s=bd(Bf,await o.json());if(s.success===!1)return t.error("Failed to parse address details",s.issues),{ok:!1,error:e("address_error")};const{suggestions:l}=s.output;return{ok:!0,data:l.map(u=>{var h,d,p,v,g,_,k,x,m;return{label:u.full_address??u.place_formatted??u.name??u.mapbox_id,id:u.mapbox_id,address:{line1:((h=u.context.address)==null?void 0:h.name)??((d=u.context.street)==null?void 0:d.name),line2:void 0,line3:((p=u.context.neighborhood)==null?void 0:p.name)??((v=u.context.locality)==null?void 0:v.name),city:((g=u.context.place)==null?void 0:g.name)??((_=u.context.district)==null?void 0:_.name),state:(k=u.context.region)==null?void 0:k.name,postcode:(x=u.context.postcode)==null?void 0:x.name,country:(m=u.context.country)==null?void 0:m.name}}})}}}:{enabled:!1}},[t,e]),Pi=t=>{const{t:e}=ht();return c("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",...t,children:[c("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:c("path",{d:"M10 3L5 8L10 13"})}),c("span",{children:e("back")})]})},Hf=({input:t,onSubmitSuccess:e,logger:r})=>{const{t:a}=ht(),[i,n]=bt(),[o,s]=bt([]),{enabled:l,getPredictions:u}=Uf({logger:r,t:a}),[h,d]=bt(l?"query":"manual"),[p,v]=bt(""),[g,_]=bt(),k=x=>{yt(l,"Query state should not be enabled"),x=x.trim(),x!==(p==null?void 0:p.trim())&&(v(x),x===""&&s([]),_(void 0),u(x).then(m=>{if(m.ok===!1){s([]),_(m.error);return}s(m.data)}))};switch(h){case"query":return yt(l,"Query state should not be enabled"),c(qf,{input:t,onSkip:()=>e(null),onAddressSelect:x=>{if(x===""){n(void 0),d("manual");return}const m=o.find(M=>M.id===x);m&&(n(m.address),d("details"))},onAddressSearch:x=>{k(x)},suggestions:o,query:p,error:g});case"details":return yt(i!==void 0),c(Fi,{input:t,logger:r,onSubmitSuccess:e,addressFields:i,actions:c(Pi,{onClick:()=>{d("query")}})});case"manual":return c(Fi,{logger:r,input:t,onSubmitSuccess:e,addressFields:{},actions:l?c(Pi,{onClick:()=>{d("query")}}):void 0})}},qf=({input:t,onSkip:e,suggestions:r,onAddressSelect:a,query:i,onAddressSearch:n,error:o})=>{const{t:s}=ht(),l=ut(null);return dt(()=>{l.current&&(l.current.focus(),l.current.select())},[]),c(W,{children:[c("form",{noValidate:!0,onSubmit:u=>{u.preventDefault();const d=new FormData(u.currentTarget).get("address");typeof d=="string"&&n(d)},class:"flex gap-1 p-2.5",children:[c("div",{class:"group relative flex-1",children:[c("input",{ref:l,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:t.config.placeholder||s("address_search"),defaultValue:i,class:Ve({optional:!!t.config.optional,className:"w-full rounded-full"})}),c("button",{type:"submit",class:"touch-hitbox text-neutral-12 hover:bg-neutral-3 fr absolute bottom-0 right-0 top-0 flex cursor-pointer items-center gap-1 rounded-full px-3 transition-all",children:c("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[c("circle",{cx:"7",cy:"7",r:"4"}),c("path",{d:"M10 10L13 13"})]}),c("span",{class:"sr-only",children:s("search")})]})})]}),t.config.optional&&c(re,{class:"",onClick:e})]}),o?c(ge,{error:{message:o}}):null,c("ul",{children:[r.map(u=>c("li",{children:c("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:()=>{a(u.id)},children:[c("span",{class:"flex-grow",children:u.label}),c("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:c("path",{d:"M6 3L11 8L6 13"})})]})},u.id)),c("li",{children:c("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:()=>{a("")},children:c("span",{class:"flex-grow",children:s("address_manual")})})},"")]})]})},Kf={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},Oi=["line1","line2","line3","city","state","postcode","country"],Fi=({addressFields:t,onSubmitSuccess:e,actions:r,input:a})=>{const i=ut(null);dt(()=>{if(i.current){const o=i.current.querySelector("input");o&&(o.focus(),o.select())}},[]);const n=Object.keys(ha);return c("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:o=>{const s=new FormData(o.currentTarget),l=Object.fromEntries(s.entries());e({type:"address",value:l})},children:[c("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:i,children:Oi.map((o,s)=>{const l=`isdk_${o}`,u=a.config.keys[o];return u?c(W,{children:[c("label",{for:l,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:Kf[o]}),c("div",{class:"flex flex-col items-stretch gap-1.5",children:[o==="country"?c("div",{class:"relative",children:[c("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:u,id:l,defaultValue:t[o],required:!0,children:[t.country&&!n.includes(t.country)?c("option",{value:t[o],children:t[o]}):c("option",{value:"",children:"Select a country"}),n.map(h=>c("option",{value:h,children:h},h))]}),c("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:c("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):c("input",{autoFocus:s===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:u,id:l,defaultValue:t[o],required:!0}),s===Oi.length-1?c("hr",{class:"m-0 w-full border-b border-b-transparent"}):c("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),c("div",{class:"flex w-full flex-1 ",children:[c("div",{class:"flex-grow",children:r}),c(ee,{class:"flex items-center justify-center"})]})]})},pa=()=>{const t=ut(null);return _t(()=>{var e;(e=t.current)==null||e.focus()},[]),t},Li=["true","false"],Gf=dd(Li),Wf="answer",Di="flex items-center gap-2 p-2.5",Vi=Rr(({label:t,...e},r)=>c("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",...e,ref:r,children:c("p",{class:"truncate text-center text-base",children:t})})),Yf=({input:t,onSubmitSuccess:e})=>{const r=pa();return c("form",{noValidate:!0,class:"",onSubmit:a=>{a.preventDefault();const i=zu(a).value,n=Xe(Gf,i);e({type:"boolean",value:n==="true"})},children:[c("ul",{class:Di,children:Li.map((a,i)=>c("li",{class:"flex-1",children:c(Vi,{ref:i===0?r:null,type:"submit",name:Wf,value:a,label:t.config.labels[a]},a)}))}),t.config.optional&&c("div",{class:"px-2 pb-2",children:c(re,{class:"w-full",type:"button",onClick:()=>e(null)})})]})},Jf=t=>new Promise((e,r)=>{const a=new FileReader;a.readAsDataURL(t),a.onload=()=>a.result?e(a.result.toString()):r("No result from reader"),a.onerror=r}),Xf=t=>t.reduce((e,r)=>e+r.sizeKb,0),Zf=pe("file"),ji=3,Qf=({file:t,class:e,...r})=>{const a=t.name.split(".").pop(),i=t.name.replace(new RegExp(`.${a}$`),"");return c("div",{class:Jt("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",e),...r,children:[c("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[c("span",{class:"block truncate",children:i}),c("span",{children:[".",a]})]}),c("p",{"aria-label":"File size",class:"text-accent-11",children:Ne(t.sizeKb)})]})},zi=({class:t,...e})=>c("li",{class:Jt("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",t),...e}),Ri=t=>{const e=t.split(".").pop();if(!e)throw new Error("No file extension found");return e?"."+e:""},th=({allowedExtensions:t,files:e})=>{const r=t.map(a=>a.toLowerCase());return e.every(a=>r.includes(Ri(a.name).toLowerCase()))},eh=(t,e)=>{const r=Ri(t);return`${t.replace(new RegExp(`${r}$`),"").slice(0,e)}${r}`},rh=({input:t,onSubmitSuccess:e})=>{var d;const r=(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key],[a,i]=bt(Zf(r)?r.value:[]),[n,o]=bt(),s=a.length-ji,l=Xf(a),u=pa(),{t:h}=ht();return c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:p=>(p.preventDefault(),o(void 0),a.length===0?o({type:"required",message:h("validation_file")}):t.config.extensions.length>0&&!th({allowedExtensions:t.config.extensions,files:a})?o({type:"validate",message:`${h("validation_file_ext",{ext:t.config.extensions.join(", ")})}`}):t.config.fileSizeLimitKib&&l>t.config.fileSizeLimitKib?o({type:"max",message:`File size exceeds limit of ${Ne(t.config.fileSizeLimitKib)}`}):t.config.allowMultiple===!1&&a.length>1?o({type:"invalid",message:h("validation_file_max",{count:1})}):e({type:"file",value:a})),children:[c("div",{class:"flex items-center gap-2",children:[c("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:[a.length>0?c(W,{children:[c("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[a.slice(0,ji).map(p=>{const v=p.name.split(".").pop(),g=p.name.replace(new RegExp(`.${v}$`),"");return c(zi,{class:"flex overflow-hidden",children:[c("span",{class:"block truncate",children:g}),c("span",{children:[".",v]})]})}),s>0?c(zi,{children:["+",s," file",s!==1?"s":""]}):null]}),c("p",{class:"text-neutral-11 text-xs",children:[Ne(l)," ",a.length>1?"total":""]})]}):c("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[c("header",{class:"flex flex-col items-center gap-0",children:[c("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:c("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"})}),c("p",{class:"text-neutral-12 tracking-[-0.01em]",children:h("upload_file",{count:t.config.allowMultiple?2:1})}),t.config.fileSizeLimitKib?c("p",{class:"text-neutral-10 text-xs",children:["(",h("file_max_size",{size:Ne(t.config.fileSizeLimitKib)}),")"]}):null]}),c("aside",{class:"flex flex-col items-center gap-2",children:[c("p",{id:"accepted-filetypes",class:"sr-only",children:h("file_extensions")}),c("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:t.config.extensions.map(p=>c("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:p.replace(".","")}))})]})]}),c("input",{id:"dropzone-file",onInput:async p=>{yt(p.target instanceof HTMLInputElement);const v=p.target.files?Array.from(p.target.files):[],g=await Promise.allSettled(v.map(async k=>{const x=await Jf(k);return{name:eh(k.name,42),data:x,sizeKb:k.size/1e3}}));if(g.some(({status:k})=>k==="rejected"))return o({type:"invalid",message:"Invalid file"});const _=g.map(k=>k.status==="fulfilled"?k.value:null).filter(Boolean);i(_)},multiple:t.config.allowMultiple,type:"file",class:"sr-only"})]}),c("div",{class:"flex h-full flex-col items-center gap-2",children:[c(ee,{disabled:a.length===0}),t.config.optional&&c(re,{onClick:()=>e(null)})]})]}),c(ge,{error:n})]})};var je=t=>t.type==="checkbox",be=t=>t instanceof Date,nt=t=>t==null;const Bi=t=>typeof t=="object";var G=t=>!nt(t)&&!Array.isArray(t)&&Bi(t)&&!be(t),ah=t=>G(t)&&t.target?je(t.target)?t.target.checked:t.target.value:t,nh=t=>t.substring(0,t.search(/\.\d+(\.|$)/))||t,ih=(t,e)=>t.has(nh(e)),oh=t=>{const e=t.constructor&&t.constructor.prototype;return G(e)&&e.hasOwnProperty("isPrototypeOf")},ga=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ft(t){let e;const r=Array.isArray(t);if(t instanceof Date)e=new Date(t);else if(t instanceof Set)e=new Set(t);else if(!(ga&&(t instanceof Blob||t instanceof FileList))&&(r||G(t)))if(e=r?[]:{},!r&&!oh(t))e=t;else for(const a in t)t.hasOwnProperty(a)&&(e[a]=Ft(t[a]));else return t;return e}var ze=t=>Array.isArray(t)?t.filter(Boolean):[],U=t=>t===void 0,$=(t,e,r)=>{if(!e||!G(t))return r;const a=ze(e.split(/[,[\].]+?/)).reduce((i,n)=>nt(i)?i:i[n],t);return U(a)||a===t?U(t[e])?r:t[e]:a},Kt=t=>typeof t=="boolean";const Ui={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},xt={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Lt={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};kt.createContext(null);var sh=(t,e,r,a=!0)=>{const i={defaultValues:e._defaultValues};for(const n in t)Object.defineProperty(i,n,{get:()=>{const o=n;return e._proxyFormState[o]!==xt.all&&(e._proxyFormState[o]=!a||xt.all),r&&(r[o]=!0),t[o]}});return i},vt=t=>G(t)&&!Object.keys(t).length,lh=(t,e,r,a)=>{r(t);const{name:i,...n}=t;return vt(n)||Object.keys(n).length>=Object.keys(e).length||Object.keys(n).find(o=>e[o]===(!a||xt.all))},ba=t=>Array.isArray(t)?t:[t];function ch(t){const e=kt.useRef(t);e.current=t,kt.useEffect(()=>{const r=!t.disabled&&e.current.subject&&e.current.subject.subscribe({next:e.current.next});return()=>{r&&r.unsubscribe()}},[t.disabled])}var Et=t=>typeof t=="string",dh=(t,e,r,a,i)=>Et(t)?(a&&e.watch.add(t),$(r,t,i)):Array.isArray(t)?t.map(n=>(a&&e.watch.add(n),$(r,n))):(a&&(e.watchAll=!0),r),va=t=>/^\w*$/.test(t),Hi=t=>ze(t.replace(/["|']|\]/g,"").split(/\.|\[/));function V(t,e,r){let a=-1;const i=va(e)?[e]:Hi(e),n=i.length,o=n-1;for(;++a<n;){const s=i[a];let l=r;if(a!==o){const u=t[s];l=G(u)||Array.isArray(u)?u:isNaN(+i[a+1])?{}:[]}t[s]=l,t=t[s]}return t}var qi=(t,e,r,a,i)=>e?{...r[t],types:{...r[t]&&r[t].types?r[t].types:{},[a]:i||!0}}:{},Ki=t=>({isOnSubmit:!t||t===xt.onSubmit,isOnBlur:t===xt.onBlur,isOnChange:t===xt.onChange,isOnAll:t===xt.all,isOnTouch:t===xt.onTouched}),Gi=(t,e,r)=>!r&&(e.watchAll||e.watch.has(t)||[...e.watch].some(a=>t.startsWith(a)&&/^\.\w+/.test(t.slice(a.length))));const hr=(t,e,r,a)=>{for(const i of r||Object.keys(t)){const n=$(t,i);if(n){const{_f:o,...s}=n;if(o){if(o.refs&&o.refs[0]&&e(o.refs[0],i)&&!a)break;if(o.ref&&e(o.ref,o.name)&&!a)break}else G(s)&&hr(s,e)}}};var uh=(t,e,r)=>{const a=ze($(t,r));return V(a,"root",e[r]),V(t,r,a),t},wa=t=>t.type==="file",Gt=t=>typeof t=="function",pr=t=>{if(!ga)return!1;const e=t?t.ownerDocument:0;return t instanceof(e&&e.defaultView?e.defaultView.HTMLElement:HTMLElement)},gr=t=>Et(t),ma=t=>t.type==="radio",br=t=>t instanceof RegExp;const Wi={value:!1,isValid:!1},Yi={value:!0,isValid:!0};var Ji=t=>{if(Array.isArray(t)){if(t.length>1){const e=t.filter(r=>r&&r.checked&&!r.disabled).map(r=>r.value);return{value:e,isValid:!!e.length}}return t[0].checked&&!t[0].disabled?t[0].attributes&&!U(t[0].attributes.value)?U(t[0].value)||t[0].value===""?Yi:{value:t[0].value,isValid:!0}:Yi:Wi}return Wi};const Xi={isValid:!1,value:null};var Zi=t=>Array.isArray(t)?t.reduce((e,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:e,Xi):Xi;function Qi(t,e,r="validate"){if(gr(t)||Array.isArray(t)&&t.every(gr)||Kt(t)&&!t)return{type:r,message:gr(t)?t:"",ref:e}}var ve=t=>G(t)&&!br(t)?t:{value:t,message:""},to=async(t,e,r,a,i)=>{const{ref:n,refs:o,required:s,maxLength:l,minLength:u,min:h,max:d,pattern:p,validate:v,name:g,valueAsNumber:_,mount:k,disabled:x}=t._f,m=$(e,g);if(!k||x)return{};const M=o?o[0]:n,F=L=>{a&&M.reportValidity&&(M.setCustomValidity(Kt(L)?"":L||""),M.reportValidity())},N={},H=ma(n),et=je(n),pt=H||et,D=(_||wa(n))&&U(n.value)&&U(m)||pr(n)&&n.value===""||m===""||Array.isArray(m)&&!m.length,st=qi.bind(null,g,r,N),it=(L,P,q,lt=Lt.maxLength,wt=Lt.minLength)=>{const It=L?P:q;N[g]={type:L?lt:wt,message:It,ref:n,...st(L?lt:wt,It)}};if(i?!Array.isArray(m)||!m.length:s&&(!pt&&(D||nt(m))||Kt(m)&&!m||et&&!Ji(o).isValid||H&&!Zi(o).isValid)){const{value:L,message:P}=gr(s)?{value:!!s,message:s}:ve(s);if(L&&(N[g]={type:Lt.required,message:P,ref:M,...st(Lt.required,P)},!r))return F(P),N}if(!D&&(!nt(h)||!nt(d))){let L,P;const q=ve(d),lt=ve(h);if(!nt(m)&&!isNaN(m)){const wt=n.valueAsNumber||m&&+m;nt(q.value)||(L=wt>q.value),nt(lt.value)||(P=wt<lt.value)}else{const wt=n.valueAsDate||new Date(m),It=xr=>new Date(new Date().toDateString()+" "+xr),ne=n.type=="time",Be=n.type=="week";Et(q.value)&&m&&(L=ne?It(m)>It(q.value):Be?m>q.value:wt>new Date(q.value)),Et(lt.value)&&m&&(P=ne?It(m)<It(lt.value):Be?m<lt.value:wt<new Date(lt.value))}if((L||P)&&(it(!!L,q.message,lt.message,Lt.max,Lt.min),!r))return F(N[g].message),N}if((l||u)&&!D&&(Et(m)||i&&Array.isArray(m))){const L=ve(l),P=ve(u),q=!nt(L.value)&&m.length>+L.value,lt=!nt(P.value)&&m.length<+P.value;if((q||lt)&&(it(q,L.message,P.message),!r))return F(N[g].message),N}if(p&&!D&&Et(m)){const{value:L,message:P}=ve(p);if(br(L)&&!m.match(L)&&(N[g]={type:Lt.pattern,message:P,ref:n,...st(Lt.pattern,P)},!r))return F(P),N}if(v){if(Gt(v)){const L=await v(m,e),P=Qi(L,M);if(P&&(N[g]={...P,...st(Lt.validate,P.message)},!r))return F(P.message),N}else if(G(v)){let L={};for(const P in v){if(!vt(L)&&!r)break;const q=Qi(await v[P](m,e),M,P);q&&(L={...q,...st(P,q.message)},F(q.message),r&&(N[g]=L))}if(!vt(L)&&(N[g]={ref:M,...L},!r))return N}}return F(!0),N};function fh(t,e){const r=e.slice(0,-1).length;let a=0;for(;a<r;)t=U(t)?a++:t[e[a++]];return t}function hh(t){for(const e in t)if(t.hasOwnProperty(e)&&!U(t[e]))return!1;return!0}function X(t,e){const r=Array.isArray(e)?e:va(e)?[e]:Hi(e),a=r.length===1?t:fh(t,r),i=r.length-1,n=r[i];return a&&delete a[n],i!==0&&(G(a)&&vt(a)||Array.isArray(a)&&hh(a))&&X(t,r.slice(0,-1)),t}function _a(){let t=[];return{get observers(){return t},next:i=>{for(const n of t)n.next&&n.next(i)},subscribe:i=>(t.push(i),{unsubscribe:()=>{t=t.filter(n=>n!==i)}}),unsubscribe:()=>{t=[]}}}var vr=t=>nt(t)||!Bi(t);function ae(t,e){if(vr(t)||vr(e))return t===e;if(be(t)&&be(e))return t.getTime()===e.getTime();const r=Object.keys(t),a=Object.keys(e);if(r.length!==a.length)return!1;for(const i of r){const n=t[i];if(!a.includes(i))return!1;if(i!=="ref"){const o=e[i];if(be(n)&&be(o)||G(n)&&G(o)||Array.isArray(n)&&Array.isArray(o)?!ae(n,o):n!==o)return!1}}return!0}var eo=t=>t.type==="select-multiple",ph=t=>ma(t)||je(t),ya=t=>pr(t)&&t.isConnected,ro=t=>{for(const e in t)if(Gt(t[e]))return!0;return!1};function wr(t,e={}){const r=Array.isArray(t);if(G(t)||r)for(const a in t)Array.isArray(t[a])||G(t[a])&&!ro(t[a])?(e[a]=Array.isArray(t[a])?[]:{},wr(t[a],e[a])):nt(t[a])||(e[a]=!0);return e}function ao(t,e,r){const a=Array.isArray(t);if(G(t)||a)for(const i in t)Array.isArray(t[i])||G(t[i])&&!ro(t[i])?U(e)||vr(r[i])?r[i]=Array.isArray(t[i])?wr(t[i],[]):{...wr(t[i])}:ao(t[i],nt(e)?{}:e[i],r[i]):r[i]=!ae(t[i],e[i]);return r}var xa=(t,e)=>ao(t,e,wr(e)),no=(t,{valueAsNumber:e,valueAsDate:r,setValueAs:a})=>U(t)?t:e?t===""?NaN:t&&+t:r&&Et(t)?new Date(t):a?a(t):t;function ka(t){const e=t.ref;if(!(t.refs?t.refs.every(r=>r.disabled):e.disabled))return wa(e)?e.files:ma(e)?Zi(t.refs).value:eo(e)?[...e.selectedOptions].map(({value:r})=>r):je(e)?Ji(t.refs).value:no(U(e.value)?t.ref.value:e.value,t)}var gh=(t,e,r,a)=>{const i={};for(const n of t){const o=$(e,n);o&&V(i,n,o._f)}return{criteriaMode:r,names:[...t],fields:i,shouldUseNativeValidation:a}},Re=t=>U(t)?t:br(t)?t.source:G(t)?br(t.value)?t.value.source:t.value:t,bh=t=>t.mount&&(t.required||t.min||t.max||t.maxLength||t.minLength||t.pattern||t.validate);function io(t,e,r){const a=$(t,r);if(a||va(r))return{error:a,name:r};const i=r.split(".");for(;i.length;){const n=i.join("."),o=$(e,n),s=$(t,n);if(o&&!Array.isArray(o)&&r!==n)return{name:r};if(s&&s.type)return{name:n,error:s};i.pop()}return{name:r}}var vh=(t,e,r,a,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(e||t):(r?a.isOnBlur:i.isOnBlur)?!t:(r?a.isOnChange:i.isOnChange)?t:!0,wh=(t,e)=>!ze($(t,e)).length&&X(t,e);const mh={mode:xt.onSubmit,reValidateMode:xt.onChange,shouldFocusError:!0};function _h(t={},e){let r={...mh,...t},a={submitCount:0,isDirty:!1,isLoading:Gt(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},n=G(r.defaultValues)||G(r.values)?Ft(r.defaultValues||r.values)||{}:{},o=r.shouldUnregister?{}:Ft(n),s={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,h=0;const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:_a(),array:_a(),state:_a()},v=t.resetOptions&&t.resetOptions.keepDirtyValues,g=Ki(r.mode),_=Ki(r.reValidateMode),k=r.criteriaMode===xt.all,x=f=>b=>{clearTimeout(h),h=setTimeout(f,b)},m=async f=>{if(d.isValid||f){const b=r.resolver?vt((await D()).errors):await it(i,!0);b!==a.isValid&&p.state.next({isValid:b})}},M=f=>d.isValidating&&p.state.next({isValidating:f}),F=(f,b=[],w,E,S=!0,y=!0)=>{if(E&&w){if(s.action=!0,y&&Array.isArray($(i,f))){const I=w($(i,f),E.argA,E.argB);S&&V(i,f,I)}if(y&&Array.isArray($(a.errors,f))){const I=w($(a.errors,f),E.argA,E.argB);S&&V(a.errors,f,I),wh(a.errors,f)}if(d.touchedFields&&y&&Array.isArray($(a.touchedFields,f))){const I=w($(a.touchedFields,f),E.argA,E.argB);S&&V(a.touchedFields,f,I)}d.dirtyFields&&(a.dirtyFields=xa(n,o)),p.state.next({name:f,isDirty:P(f,b),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else V(o,f,b)},N=(f,b)=>{V(a.errors,f,b),p.state.next({errors:a.errors})},H=(f,b,w,E)=>{const S=$(i,f);if(S){const y=$(o,f,U(w)?$(n,f):w);U(y)||E&&E.defaultChecked||b?V(o,f,b?y:ka(S._f)):wt(f,y),s.mount&&m()}},et=(f,b,w,E,S)=>{let y=!1,I=!1;const j={name:f};if(!w||E){d.isDirty&&(I=a.isDirty,a.isDirty=j.isDirty=P(),y=I!==j.isDirty);const K=ae($(n,f),b);I=$(a.dirtyFields,f),K?X(a.dirtyFields,f):V(a.dirtyFields,f,!0),j.dirtyFields=a.dirtyFields,y=y||d.dirtyFields&&I!==!K}if(w){const K=$(a.touchedFields,f);K||(V(a.touchedFields,f,w),j.touchedFields=a.touchedFields,y=y||d.touchedFields&&K!==w)}return y&&S&&p.state.next(j),y?j:{}},pt=(f,b,w,E)=>{const S=$(a.errors,f),y=d.isValid&&Kt(b)&&a.isValid!==b;if(t.delayError&&w?(u=x(()=>N(f,w)),u(t.delayError)):(clearTimeout(h),u=null,w?V(a.errors,f,w):X(a.errors,f)),(w?!ae(S,w):S)||!vt(E)||y){const I={...E,...y&&Kt(b)?{isValid:b}:{},errors:a.errors,name:f};a={...a,...I},p.state.next(I)}M(!1)},D=async f=>r.resolver(o,r.context,gh(f||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),st=async f=>{const{errors:b}=await D(f);if(f)for(const w of f){const E=$(b,w);E?V(a.errors,w,E):X(a.errors,w)}else a.errors=b;return b},it=async(f,b,w={valid:!0})=>{for(const E in f){const S=f[E];if(S){const{_f:y,...I}=S;if(y){const j=l.array.has(y.name),K=await to(S,o,k,r.shouldUseNativeValidation&&!b,j);if(K[y.name]&&(w.valid=!1,b))break;!b&&($(K,y.name)?j?uh(a.errors,K,y.name):V(a.errors,y.name,K[y.name]):X(a.errors,y.name))}I&&await it(I,b,w)}}return w.valid},L=()=>{for(const f of l.unMount){const b=$(i,f);b&&(b._f.refs?b._f.refs.every(w=>!ya(w)):!ya(b._f.ref))&&$a(f)}l.unMount=new Set},P=(f,b)=>(f&&b&&V(o,f,b),!ae(po(),n)),q=(f,b,w)=>dh(f,l,{...s.mount?o:U(b)?n:Et(f)?{[f]:b}:b},w,b),lt=f=>ze($(s.mount?o:n,f,t.shouldUnregister?$(n,f,[]):[])),wt=(f,b,w={})=>{const E=$(i,f);let S=b;if(E){const y=E._f;y&&(!y.disabled&&V(o,f,no(b,y)),S=pr(y.ref)&&nt(b)?"":b,eo(y.ref)?[...y.ref.options].forEach(I=>I.selected=S.includes(I.value)):y.refs?je(y.ref)?y.refs.length>1?y.refs.forEach(I=>(!I.defaultChecked||!I.disabled)&&(I.checked=Array.isArray(S)?!!S.find(j=>j===I.value):S===I.value)):y.refs[0]&&(y.refs[0].checked=!!S):y.refs.forEach(I=>I.checked=I.value===S):wa(y.ref)?y.ref.value="":(y.ref.value=S,y.ref.type||p.values.next({name:f,values:{...o}})))}(w.shouldDirty||w.shouldTouch)&&et(f,S,w.shouldTouch,w.shouldDirty,!0),w.shouldValidate&&Ca(f)},It=(f,b,w)=>{for(const E in b){const S=b[E],y=`${f}.${E}`,I=$(i,y);(l.array.has(f)||!vr(S)||I&&!I._f)&&!be(S)?It(y,S,w):wt(y,S,w)}},ne=(f,b,w={})=>{const E=$(i,f),S=l.array.has(f),y=Ft(b);V(o,f,y),S?(p.array.next({name:f,values:{...o}}),(d.isDirty||d.dirtyFields)&&w.shouldDirty&&p.state.next({name:f,dirtyFields:xa(n,o),isDirty:P(f,y)})):E&&!E._f&&!nt(y)?It(f,y,w):wt(f,y,w),Gi(f,l)&&p.state.next({...a}),p.values.next({name:f,values:{...o}}),!s.mount&&e()},Be=async f=>{const b=f.target;let w=b.name,E=!0;const S=$(i,w),y=()=>b.type?ka(S._f):ah(f),I=j=>{E=Number.isNaN(j)||j===$(o,w,j)};if(S){let j,K;const kr=y(),we=f.type===Ui.BLUR||f.type===Ui.FOCUS_OUT,vp=!bh(S._f)&&!r.resolver&&!$(a.errors,w)&&!S._f.deps||vh(we,$(a.touchedFields,w),a.isSubmitted,_,g),Ia=Gi(w,l,we);V(o,w,kr),we?(S._f.onBlur&&S._f.onBlur(f),u&&u(0)):S._f.onChange&&S._f.onChange(f);const Ta=et(w,kr,we,!1),wp=!vt(Ta)||Ia;if(!we&&p.values.next({name:w,type:f.type,values:{...o}}),vp)return d.isValid&&m(),wp&&p.state.next({name:w,...Ia?{}:Ta});if(!we&&Ia&&p.state.next({...a}),M(!0),r.resolver){const{errors:xo}=await D([w]);if(I(kr),E){const mp=io(a.errors,i,w),ko=io(xo,i,mp.name||w);j=ko.error,w=ko.name,K=vt(xo)}}else j=(await to(S,o,k,r.shouldUseNativeValidation))[w],I(kr),E&&(j?K=!1:d.isValid&&(K=await it(i,!0)));E&&(S._f.deps&&Ca(S._f.deps),pt(w,K,j,Ta))}},xr=(f,b)=>{if($(a.errors,b)&&f.focus)return f.focus(),1},Ca=async(f,b={})=>{let w,E;const S=ba(f);if(M(!0),r.resolver){const y=await st(U(f)?f:S);w=vt(y),E=f?!S.some(I=>$(y,I)):w}else f?(E=(await Promise.all(S.map(async y=>{const I=$(i,y);return await it(I&&I._f?{[y]:I}:I)}))).every(Boolean),!(!E&&!a.isValid)&&m()):E=w=await it(i);return p.state.next({...!Et(f)||d.isValid&&w!==a.isValid?{}:{name:f},...r.resolver||!f?{isValid:w}:{},errors:a.errors,isValidating:!1}),b.shouldFocus&&!E&&hr(i,xr,f?S:l.mount),E},po=f=>{const b={...n,...s.mount?o:{}};return U(f)?b:Et(f)?$(b,f):f.map(w=>$(b,w))},go=(f,b)=>({invalid:!!$((b||a).errors,f),isDirty:!!$((b||a).dirtyFields,f),isTouched:!!$((b||a).touchedFields,f),error:$((b||a).errors,f)}),hp=f=>{f&&ba(f).forEach(b=>X(a.errors,b)),p.state.next({errors:f?a.errors:{}})},bo=(f,b,w)=>{const E=($(i,f,{_f:{}})._f||{}).ref;V(a.errors,f,{...b,ref:E}),p.state.next({name:f,errors:a.errors,isValid:!1}),w&&w.shouldFocus&&E&&E.focus&&E.focus()},pp=(f,b)=>Gt(f)?p.values.subscribe({next:w=>f(q(void 0,b),w)}):q(f,b,!0),$a=(f,b={})=>{for(const w of f?ba(f):l.mount)l.mount.delete(w),l.array.delete(w),b.keepValue||(X(i,w),X(o,w)),!b.keepError&&X(a.errors,w),!b.keepDirty&&X(a.dirtyFields,w),!b.keepTouched&&X(a.touchedFields,w),!r.shouldUnregister&&!b.keepDefaultValue&&X(n,w);p.values.next({values:{...o}}),p.state.next({...a,...b.keepDirty?{isDirty:P()}:{}}),!b.keepIsValid&&m()},vo=({disabled:f,name:b,field:w,fields:E,value:S})=>{if(Kt(f)){const y=f?void 0:U(S)?ka(w?w._f:$(E,b)._f):S;V(o,b,y),et(b,y,!1,!1,!0)}},Ea=(f,b={})=>{let w=$(i,f);const E=Kt(b.disabled);return V(i,f,{...w||{},_f:{...w&&w._f?w._f:{ref:{name:f}},name:f,mount:!0,...b}}),l.mount.add(f),w?vo({field:w,disabled:b.disabled,name:f}):H(f,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Re(b.min),max:Re(b.max),minLength:Re(b.minLength),maxLength:Re(b.maxLength),pattern:Re(b.pattern)}:{},name:f,onChange:Be,onBlur:Be,ref:S=>{if(S){Ea(f,b),w=$(i,f);const y=U(S.value)&&S.querySelectorAll&&S.querySelectorAll("input,select,textarea")[0]||S,I=ph(y),j=w._f.refs||[];if(I?j.find(K=>K===y):y===w._f.ref)return;V(i,f,{_f:{...w._f,...I?{refs:[...j.filter(ya),y,...Array.isArray($(n,f))?[{}]:[]],ref:{type:y.type,name:f}}:{ref:y}}}),H(f,!1,void 0,y)}else w=$(i,f,{}),w._f&&(w._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(ih(l.array,f)&&s.action)&&l.unMount.add(f)}}},wo=()=>r.shouldFocusError&&hr(i,xr,l.mount),gp=f=>{Kt(f)&&(p.state.next({disabled:f}),hr(i,b=>{b.disabled=f},0,!1))},mo=(f,b)=>async w=>{w&&(w.preventDefault&&w.preventDefault(),w.persist&&w.persist());let E=Ft(o);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:S,values:y}=await D();a.errors=S,E=y}else await it(i);X(a.errors,"root"),vt(a.errors)?(p.state.next({errors:{}}),await f(E,w)):(b&&await b({...a.errors},w),wo(),setTimeout(wo)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:vt(a.errors),submitCount:a.submitCount+1,errors:a.errors})},bp=(f,b={})=>{$(i,f)&&(U(b.defaultValue)?ne(f,$(n,f)):(ne(f,b.defaultValue),V(n,f,b.defaultValue)),b.keepTouched||X(a.touchedFields,f),b.keepDirty||(X(a.dirtyFields,f),a.isDirty=b.defaultValue?P(f,$(n,f)):P()),b.keepError||(X(a.errors,f),d.isValid&&m()),p.state.next({...a}))},_o=(f,b={})=>{const w=f?Ft(f):n,E=Ft(w),S=f&&!vt(f)?E:n;if(b.keepDefaultValues||(n=w),!b.keepValues){if(b.keepDirtyValues||v)for(const y of l.mount)$(a.dirtyFields,y)?V(S,y,$(o,y)):ne(y,$(S,y));else{if(ga&&U(f))for(const y of l.mount){const I=$(i,y);if(I&&I._f){const j=Array.isArray(I._f.refs)?I._f.refs[0]:I._f.ref;if(pr(j)){const K=j.closest("form");if(K){K.reset();break}}}}i={}}o=t.shouldUnregister?b.keepDefaultValues?Ft(n):{}:Ft(S),p.array.next({values:{...S}}),p.values.next({values:{...S}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&e(),s.mount=!d.isValid||!!b.keepIsValid,s.watch=!!t.shouldUnregister,p.state.next({submitCount:b.keepSubmitCount?a.submitCount:0,isDirty:b.keepDirty?a.isDirty:!!(b.keepDefaultValues&&!ae(f,n)),isSubmitted:b.keepIsSubmitted?a.isSubmitted:!1,dirtyFields:b.keepDirtyValues?a.dirtyFields:b.keepDefaultValues&&f?xa(n,f):{},touchedFields:b.keepTouched?a.touchedFields:{},errors:b.keepErrors?a.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?a.isSubmitSuccessful:!1,isSubmitting:!1})},yo=(f,b)=>_o(Gt(f)?f(o):f,b);return{control:{register:Ea,unregister:$a,getFieldState:go,handleSubmit:mo,setError:bo,_executeSchema:D,_getWatch:q,_getDirty:P,_updateValid:m,_removeUnmounted:L,_updateFieldArray:F,_updateDisabledField:vo,_getFieldArray:lt,_reset:_o,_resetDefaultValues:()=>Gt(r.defaultValues)&&r.defaultValues().then(f=>{yo(f,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:f=>{a={...a,...f}},_disableForm:gp,_subjects:p,_proxyFormState:d,get _fields(){return i},get _formValues(){return o},get _state(){return s},set _state(f){s=f},get _defaultValues(){return n},get _names(){return l},set _names(f){l=f},get _formState(){return a},set _formState(f){a=f},get _options(){return r},set _options(f){r={...r,...f}}},trigger:Ca,register:Ea,handleSubmit:mo,watch:pp,setValue:ne,getValues:po,reset:yo,resetField:bp,clearErrors:hp,unregister:$a,setError:bo,setFocus:(f,b={})=>{const w=$(i,f),E=w&&w._f;if(E){const S=E.refs?E.refs[0]:E.ref;S.focus&&(S.focus(),b.shouldSelect&&S.select())}},getFieldState:go}}function mr(t={}){const e=kt.useRef(),r=kt.useRef(),[a,i]=kt.useState({isDirty:!1,isValidating:!1,isLoading:Gt(t.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Gt(t.defaultValues)?void 0:t.defaultValues});e.current||(e.current={..._h(t,()=>i(o=>({...o}))),formState:a});const n=e.current.control;return n._options=t,ch({subject:n._subjects.state,next:o=>{lh(o,n._proxyFormState,n._updateFormState,!0)&&i({...n._formState})}}),kt.useEffect(()=>n._disableForm(t.disabled),[n,t.disabled]),kt.useEffect(()=>{if(n._proxyFormState.isDirty){const o=n._getDirty();o!==a.isDirty&&n._subjects.state.next({isDirty:o})}},[n,a.isDirty]),kt.useEffect(()=>{t.values&&!ae(t.values,r.current)?(n._reset(t.values,n._options.resetOptions),r.current=t.values):n._resetDefaultValues()},[t.values,n]),kt.useEffect(()=>{n._state.mount||(n._updateValid(),n._state.mount=!0),n._state.watch&&(n._state.watch=!1,n._subjects.state.next({...n._formState})),n._removeUnmounted()}),e.current.formState=sh(a,n),e.current}var oo=function(t,e,r){if(t&&"reportValidity"in t){var a=$(r,e);t.setCustomValidity(a&&a.message||""),t.reportValidity()}},yh=function(t,e){var r=function(i){var n=e.fields[i];n&&n.ref&&"reportValidity"in n.ref?oo(n.ref,i,t):n.refs&&n.refs.forEach(function(o){return oo(o,i,t)})};for(var a in e.fields)r(a)},xh=function(t,e){e.shouldUseNativeValidation&&yh(t,e);var r={};for(var a in t){var i=$(e.fields,a),n=Object.assign(t[a]||{},{ref:i&&i.ref});if(Sh(e.names||Object.keys(t),a)){var o=Object.assign({},kh($(r,a)));V(o,"root",n),V(r,a,o)}else V(r,a,n)}return r},kh=function(t){return Array.isArray(t)?t.filter(Boolean):[]},Sh=function(t,e){return t.some(function(r){return r.startsWith(e+".")})},Ch=function(t,e){for(var r={};t.issues.length;){var a=t.issues[0];if(a.path){var i=a.path.map(function(s){return s.key}).join(".");if(r[i]||(r[i]={message:a.message,type:a.validation}),e){var n=r[i].types,o=n&&n[a.validation];r[i]=qi(i,e,r,a.validation,o?[].concat(o,a.message):a.message)}t.issues.shift()}}return r},_r=function(t,e,r){return r===void 0&&(r={}),function(a,i,n){try{return Promise.resolve(function(o,s){try{var l=function(){function u(d){return{values:r.raw?a:d,errors:{}}}var h=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},e);return r.mode==="sync"?u(Xe(t,a,h)):Promise.resolve(pd(t,a,h)).then(u)}()}catch(u){return s(u)}return l&&l.then?l.then(void 0,s):l}(0,function(o){if(o instanceof Je)return{values:{},errors:xh(Ch(o,!n.shouldUseNativeValidation&&n.criteriaMode==="all"),n)};throw o}))}catch(o){return Promise.reject(o)}}};const so=27,lo=12,co=10,$h=pe("enum"),Eh=t=>{const e={min:t.minSelected??0,max:t.maxSelected??t.options.length};return _r(at({checked:wn(vn(gn()),r=>Object.entries(r).filter(([a,i])=>i).map(([a,i])=>a),[Ze(e.max,`Please select at most ${e.max} option${e.max!==1?"s":""}`),Qe(e.min,`Please select at least ${e.min} option${e.min!==1?"s":""}`)])}))},Ih=Rr(({option:t,...e},r)=>c(W,{children:[c("input",{class:"peer sr-only h-full",type:"checkbox",...e,ref:r}),c("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:e.id,children:t.label})]})),uo=Ce("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:Di}}}),Th=({input:t,onSubmitSuccess:e})=>{var u,h;const r=t.key?(u=T.current$.value.flow)==null?void 0:u.data.submissions[t.key]:void 0,a=(t.config.minSelected===1||t.config.minSelected===void 0)&&t.config.maxSelected===1,i=a&&t.config.options.length===2,{register:n,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{checked:a?{}:$h(r)?Object.fromEntries(r.value.map(d=>[d,!0])):{}},resolver:Eh(t.config)}),l=pa();return i?c("ul",{style:{maxHeight:6.5*so+5*lo+2*co},class:uo({variant:"booleanLike"}),children:t.config.options.map((d,p)=>c("li",{class:"flex-1",children:c(Vi,{type:"submit",ref:v=>{v&&p===0&&(l.current=v)},label:d.label,value:"true",onClick:()=>e({type:"enum",value:[d.value]})})},d.value))}):c("form",{noValidate:!0,onSubmit:d=>o(p=>{const v=p.checked;e({type:"enum",value:v})})(d),children:[c("div",{class:"flex items-center gap-1",children:[c("ul",{style:{maxHeight:6.5*so+5*lo+2*co},class:uo({variant:t.config.options.length===1?"singleOption":void 0}),children:t.config.options.map((d,p)=>{const v=`checked.${d.value}`,{ref:g,..._}=n(v);return c("li",{class:"relative",children:c(Ih,{option:d,autoFocus:p===0,ref:k=>{k&&p===0&&(l.current=k),g(k)},id:v,..._,onClick:a?()=>e({type:"enum",value:[d.value]}):void 0})},d.value)})}),c("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[a?null:c(ee,{}),t.config.minSelected===0&&c(re,{type:"button",onClick:()=>e({type:"enum",value:[]})})]})]}),c("div",{class:"px-1",children:c(ge,{error:(h=s.checked)==null?void 0:h.root})})]})},Ah=pe("number"),Mh=(t,e)=>{const r=t.min??Number.MIN_SAFE_INTEGER,a=t.max??Number.MAX_SAFE_INTEGER,i=t.decimalCases??0;return _r(at({number:Or(e("validation_number"),[yd(r,e("validation_number_min",{min:r})),_d(a,e("validation_number_max",{max:a})),wd(n=>n===Number(n.toFixed(i)),e("validation_number_decimal_cases",{count:i}))])}))},Nh=({input:t,onSubmitSuccess:e})=>{var d;const r=t.config.defaultValue,a=t.key?(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key]:void 0,{t:i}=ht(),{register:n,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{number:r?Number(r):Ah(a)?a.value:void 0},resolver:Mh(t.config,i)}),{ref:l,...u}=n("number",{required:!t.config.optional,valueAsNumber:!0}),h=ut();return dt(()=>{h.current&&(h.current.focus(),h.current.select())},[]),c("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{p.number!==void 0&&e({type:"number",value:p.number})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-grow",children:[c("input",{...u,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),l(p)},type:"text",min:t.config.min,max:t.config.max,class:Ve({optional:t.config.optional,className:"[type=number:-webkit-inner-spin-button] w-full rounded-full [-webkit-outer-spin-button:none]"}),placeholder:t.config.placeholder}),t.config.optional&&c(re,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),c(ee,{})]}),c(ge,{error:s.number})]})},Ph=t=>{if(t==="")return{countryCode:"",phoneNumber:""};const e=Object.entries(ha).find(i=>t.startsWith(i[1])),r=e?e[1]:"",a=t.replace(r,"");return/^\d+$/.test(a)?{countryCode:r,phoneNumber:a}:{countryCode:"",phoneNumber:""}},Oh="44",Fh=pe("string"),Lh=pe("phone"),Dh=t=>{const e=Z(t("validation_country_code"),[mn(/^\+?[0-9 -]+$/,t("validation_country_code"))]);return _r(at({countryCode:e,phoneNumber:wn(Z(t("validation_phone"),[mn(/^\+?[0-9 -]+$/,t("validation_phone"))]),r=>r.replace(/[^0-9]/g,""),[])}))},Vh=({input:t,onSubmitSuccess:e})=>{var _;const r=t.key?(_=T.current$.value.flow)==null?void 0:_.data.submissions[t.key]:void 0,{t:a}=ht(),[i,n]=bt(),o=Fh(r)?Ph(r.value):Lh(r)?r.value:void 0,{register:s,handleSubmit:l,formState:{errors:u},watch:h}=mr({defaultValues:{countryCode:(o==null?void 0:o.countryCode)??t.config.defaultValue.countryCode??Oh,phoneNumber:(o==null?void 0:o.phoneNumber)??t.config.defaultValue.phoneNumber??""},resolver:Dh(a)}),{ref:d,...p}=s("phoneNumber",{required:!t.config.optional}),v=ut(),g=h("countryCode");return dt(()=>{v.current&&(v.current.focus(),v.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:l(k=>{const x=k.phoneNumber.replace(/[^0-9]/g,""),m=k.countryCode.replace(/[^0-9]/g,"");if(n(void 0),x.length+m.length>(t.config.maxChars||Number.POSITIVE_INFINITY))return n(a("validation_max_chars",{count:t.config.maxChars??999}));if(x.length+m.length<(t.config.minChars||0))return n(a("validation_min_chars",{count:t.config.minChars??1}));t.config.submissionFormat==="phone"?e({type:"phone",value:{countryCode:m,phoneNumber:x}}):e({type:"string",value:g+k.phoneNumber})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[c("label",{class:"text-neutral-12 bg-lowest hover:bg-neutral-5 placeholder:text-neutral-8 focus-visible:outline-accent-7 focus-within:bg-neutral-5 focus-within:outline-accent-7 outline-divider relative flex h-full cursor-pointer appearance-none items-center justify-center overflow-hidden text-ellipsis whitespace-nowrap rounded-l-full border-solid px-3 py-1.5 text-center text-base outline outline-2 transition-all focus-within:outline-none",htmlFor:`isdk_phone_${t.key}`,children:[c("span",{children:["+",g]}),c("select",{...s("countryCode",{}),id:`isdk_phone_${t.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(ha).map(([k,x])=>c("option",{value:x,children:[k," (+",x,")"]},k))})]}),c("input",{...p,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:k=>{k&&(v.current=k),d(k)},class:Ve({optional:t.config.optional,className:"flex-1 rounded-r-full"}),placeholder:t.config.placeholder}),t.config.optional&&c(re,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),c(ee,{})]}),c(ge,{error:u.countryCode||u.phoneNumber||{message:i}})]})},jh=({input:t,onSubmitSuccess:e})=>c("div",{class:"flex flex-col items-center py-3",children:c("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:t.key,onClick:()=>{e(null)},children:c("span",{class:"flex items-center gap-1.5",children:[c("span",{class:"inline-flex items-center text-sm font-medium",children:t.config.label||"Submit"}),c("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:[c("path",{d:"M4 8L8 4L12 8"}),c("path",{d:"M8 4V13"})]})]})})}),Sa={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"},zh={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},Rh=pe("string"),Bh=(t,e)=>{const r={maxLength:e("validation_max_chars",{count:t.maxChars??999}),minLength:e("validation_min_chars",{count:t.minChars??1})};return _r(at({text:{email:Z(Sa.email,[md(Sa.email),Qe(t.minChars??1,r.minLength),Ze(t.maxChars??1/0,r.maxLength)]),text:Z([Qe(t.minChars??1,r.minLength),Ze(t.maxChars??1/0,r.maxLength)]),url:Z([xd(Sa.url),Qe(t.minChars??1,r.minLength),Ze(t.maxChars??1/0,r.maxLength)])}[t.format]}))},Uh={text:({input:t,onSubmitSuccess:e})=>{var d;const{t:r}=ht(),a=t.key?(d=T.current$.value.flow)==null?void 0:d.data.submissions[t.key]:void 0,i=t.config.defaultValue,{register:n,handleSubmit:o,formState:{errors:s}}=mr({defaultValues:{text:i||(Rh(a)?a.value:"")},resolver:Bh(t.config,r)}),{ref:l,...u}=n("text",{required:!t.config.optional}),h=ut();return dt(()=>{h.current&&(h.current.focus(),h.current.select())},[]),c("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(p=>{e({type:"string",value:p.text})}),children:[c("div",{class:"flex items-center gap-2",children:[c("div",{class:"relative min-w-0 flex-1",children:[c("input",{id:"chat-input",...u,...zh[t.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:p=>{p&&(h.current=p),l(p)},placeholder:t.config.placeholder,class:Ve({optional:!!t.config.optional,className:"w-full rounded-full"})}),t.config.optional&&c(re,{class:"absolute right-0 top-0",onClick:()=>e(null)})]}),c(ee,{})]}),c(ge,{error:s.text})]})},phone:Vh,"multiple-choice":Th,boolean:Yf,file:rh,submit:jh,address:Hf,number:Nh},Hh=({logger:t})=>{var n;const e=(n=T.current$.value.flow)==null?void 0:n.data.currentInput,[r,a]=Nf(),i=ut(null);return T.inputHeight$.value=a.height,_t(()=>{const o=i.current;if(o)return o.addEventListener("transitionstart",tt.scrollToEnd.smooth),o.addEventListener("transitioncancel",tt.scrollToEnd.smooth),o.addEventListener("transitionend",tt.scrollToEnd.smooth),()=>{o.removeEventListener("transitionstart",tt.scrollToEnd.smooth),o.removeEventListener("transitioncancel",tt.scrollToEnd.smooth),o.removeEventListener("transitionend",tt.scrollToEnd.smooth)}},[]),c("div",{ref:i,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:a.height},children:c("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:e?(()=>{const o=Uh[e.type];return c(o,{logger:t,onSubmitSuccess:tt.onSubmitSuccessFn$.value,input:e})})():c("div",{class:"flex items-center gap-2 p-2.5",children:[c("input",{"aria-hidden":"true",id:"chat-input",class:Ve({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),c(ee,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var qh=function(t){return t instanceof RegExp},Kh=function(e){var r=/[\\^$.*+?()[\]{}|]/g,a=RegExp(r.source);return e&&a.test(e)?e.replace(r,"\\$&"):e},fo=function(t){return typeof t=="string"},Gh=function(t){var e=[];return t.forEach(function(r){Array.isArray(r)?e=e.concat(r):e.push(r)}),e};function Wh(t,e,r){var a=0,i=0;if(t==="")return t;if(!t||!fo(t))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var n=e;qh(n)||(n=new RegExp("("+Kh(n)+")","gi"));for(var o=t.split(n),s=1,l=o.length;s<l;s+=2){if(o[s]===void 0||o[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}i=o[s].length,a+=o[s-1].length,o[s]=r(o[s],s,a),a+=i}return o}var Yh=function(e,r,a){return Array.isArray(e)||(e=[e]),Gh(e.map(function(i){return fo(i)?Wh(i,r,a):i}))};const yr=Tt(Yh),Jh=/(\[[^\]]+\]\([^)]+\))/g,Xh=/\[([^\]]+)\]\(([^)]+)\)/,Zh=/(https?:\/\/[^\s]+)/g,Qh=/_(.*?)_/g,tp=/\*\*(.*?)\*\*/g,ho="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",ep=t=>{const e=yr(t,Jh,(n,o)=>{const[,s,l]=n.match(Xh)??[];return l?c("a",{class:ho,href:l,children:s??l},l+o):c("span",{children:"INVALID LINK"})}),r=yr(e,Zh,(n,o)=>c("a",{class:ho,href:n,children:n},n+o)),a=yr(r,Qh,(n,o)=>c("em",{children:n},n+o));return yr(a,tp,(n,o)=>c("strong",{children:n},n+o))},rp=Ce("select-text 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"}}),ap=({children:t,className:e,animate:r,side:a,...i})=>c("p",{style:{transformOrigin:a==="left"?"0% 50%":"100% 50%"},class:rp({className:e,side:a,animate:r}),...i,children:t}),np=({message:t})=>c("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:c("a",{onClick:t.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:t.href,children:[t.text,c("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("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"})})]})}),ip=({className:t,...e})=>(_t(()=>{tt.scrollToEnd.smooth()}),c("div",{"aria-hidden":!0,children:tt.isBotTyping$.value===!0?c("div",{"aria-label":"Typing…",class:Jt("flex gap-1 p-4",t),...e,children:Array.from({length:3},(r,a)=>c("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-a*200}ms`}}))}):void 0})),op={bot:"left",user:"right"},sp=Ce("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]"}}}),lp=({lastSentMessageFooter:t})=>{var r;const e=((r=T.current$.value.flow)==null?void 0:r.data.messages)??[];return _t(()=>{tt.scrollToEnd.smooth()},[e.length]),c("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[e.map((a,i)=>c(W,{children:c("li",{class:"flex",children:Qt(a).with({type:"system"},n=>c("p",{class:sp({variant:n.variant}),children:n.text})).with({type:"text",author:A.union("bot","user")},n=>{const o=n.author==="user"&&!e.slice(i+1).some(u=>u.type==="text"&&u.author==="user"),s=i===e.length-1,l=n.author==="bot"?ep(n.text):n.text;return c(ap,{animate:s,side:op[n.author],children:[l,o?t:null]},i)}).with({type:"link"},n=>c(np,{message:n})).with({type:"image"},n=>c("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:n.url,style:{aspectRatio:n.width/n.height}})).with({type:"file"},n=>c(Qf,{class:n.author==="bot"?void 0:"ml-auto",file:{name:n.fileName,sizeKb:n.fileSizeKb}})).with({type:"loading"},n=>{const o=e[e.length-1];return!(n===o)||tt.isBotTyping$.value?null:c("div",{class:"flex flex-grow flex-col items-center justify-center",children:c(mi,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},i)),c(ip,{},"typing")]})},cp=({logger:t,apiClient:e,analytics:r})=>{const{flow:a}=T.current$.value;yt(a,"Flow is required to exist to show chatbot body");const i=T.viewState$.value,{chatRef:n,chatService:o}=Vf(),{t:s}=ht(),[l,u]=bt();return dt(()=>{i==="maximised"&&tt.scrollToEnd.instant()},[i]),dt(()=>{var k,x;const{state:h,flow:d}=T.current$.peek();if(h!=="loaded")throw new Error(s("invalid_state"));let p=d.data.nodeHistory.at(-1);if(tt.scrollToEnd.instant(),T.setInput(void 0),d.data.isFinished)return;p===void 0?(p=pi(a.nodes).id,T.setCurrentNodeId(p),r.log({event:"FLOW_START",properties:{flow_id:a.id,flow_version:a.version,flow_session_id:d.data.flowSessionId,flow_build:a.build,job:a.job},customProperties:(k=a.analytics)==null?void 0:k.customProperties})):T.removeMessagesSentByNodeIds([p]);const{interpret:v,abort:g,undo:_}=ff({context:a.context,analytics:{service:r,customProperties:(x=a.analytics)==null?void 0:x.customProperties},apiClient:e,logger:t,flow:a,chatService:o,t:s,getSubmissions:()=>{var m;return(m=T.current$.peek().flow)==null?void 0:m.data.submissions},onInterpret:(m,M)=>{var N;const F=T.current$.peek().flow;yt(F),M&&(F.data.sequence=F.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:a.id,flow_version:a.version,from_node_id:M.id,flow_build:a.build,to_node_id:m.id,sequence:F.data.sequence,flow_session_id:F.data.flowSessionId,job:a.job},customProperties:(N=a.analytics)==null?void 0:N.customProperties})),T.setCurrentNodeId(m.id)},onFlowEnd:async()=>{var M;T.markAsFinished();const m=T.current$.peek().flow;yt(m),r.log({event:"FLOW_END",properties:{flow_id:a.id,flow_version:a.version,flow_session_id:m.data.flowSessionId,flow_build:a.build,job:a.job},customProperties:(M=a.analytics)==null?void 0:M.customProperties})}});return u(()=>_),v(p),g},[r,e,o,t,a,s]),c(W,{children:[c("div",{ref:n,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:c(lp,{lastSentMessageFooter:a.data.isFinished||!l?null:c(up,{undoFn:l})})}),c(Hh,{logger:t})]})},dp=t=>"key"in t.data&&t.data.key?[t.data.key]:"keys"in t.data?Object.values(t.data.keys).filter(e=>typeof e=="string"):[],up=({undoFn:t})=>{const{t:e}=ht();return c("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:c("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:r}=T.current$.peek();yt(r);const{removed:a}=t(r.data.nodeHistory),i=r.data.nodeHistory.splice(-a);i.length!==0&&(T.removeMessagesSentByNodeIds(i),T.setInput(void 0),i.pop(),i.map(n=>r.nodes.find(o=>o.id===n)).filter(Boolean).flatMap(dp).forEach(n=>delete r.data.submissions[n]),T.current$.value={...T.current$.value})},children:e("undo")})})},fp=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:cp},Symbol.toStringTag,{value:"Module"}))})();
|