@inploi/plugin-chatbot 3.30.0 → 4.0.0
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 -43
- package/cdn/style.css +1 -1
- package/dist/chatbot-body-2c87c7e2.cjs +1 -0
- package/dist/chatbot-body-c80bdc34.js +4012 -0
- package/dist/chatbot.api.d.ts +2 -2
- package/dist/chatbot.constants.d.ts +2 -7
- package/dist/chatbot.d.ts +23 -13
- package/dist/chatbot.dom.d.ts +1 -1
- package/dist/chatbot.utils.d.ts +1 -1
- package/dist/components/chatbot.d.ts +3 -1
- package/dist/components/status-bar.d.ts +3 -1
- package/dist/i18n.d.ts +271 -0
- package/dist/index-a2c09edd.js +3535 -0
- package/dist/index-dc676e56.cjs +5 -0
- package/dist/interpreter.d.ts +3 -1
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +9 -10
- package/dist/chatbot-body-59b9e18a.js +0 -3951
- package/dist/chatbot-body-7ee64297.cjs +0 -1
- package/dist/index-13d4c822.js +0 -4682
- package/dist/index-d064cfc7.cjs +0 -45
package/cdn/index.js
CHANGED
|
@@ -1,45 +1,5 @@
|
|
|
1
|
-
var Jm=Object.defineProperty;var Qm=(Qe,_e,Ne)=>_e in Qe?Jm(Qe,_e,{enumerable:!0,configurable:!0,writable:!0,value:Ne}):Qe[_e]=Ne;var Js=(Qe,_e,Ne)=>(Qm(Qe,typeof _e!="symbol"?_e+"":_e,Ne),Ne);(function(){"use strict";var Qe=e=>e,_e=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qs=Array.isArray,en=Qs,ec=typeof _e=="object"&&_e&&_e.Object===Object&&_e,tc=ec,rc=tc,nc=typeof self=="object"&&self&&self.Object===Object&&self,oc=rc||nc||Function("return this")(),tn=oc,ic=tn,ac=ic.Symbol,rn=ac,$o=rn,So=Object.prototype,sc=So.hasOwnProperty,cc=So.toString,Mt=$o?$o.toStringTag:void 0;function lc(e){var t=sc.call(e,Mt),r=e[Mt];try{e[Mt]=void 0;var n=!0}catch{}var o=cc.call(e);return n&&(t?e[Mt]=r:delete e[Mt]),o}var uc=lc,dc=Object.prototype,fc=dc.toString;function hc(e){return fc.call(e)}var pc=hc,Co=rn,vc=uc,mc=pc,gc="[object Null]",bc="[object Undefined]",Eo=Co?Co.toStringTag:void 0;function yc(e){return e==null?e===void 0?bc:gc:Eo&&Eo in Object(e)?vc(e):mc(e)}var Io=yc;function _c(e){return e!=null&&typeof e=="object"}var wc=_c,xc=Io,kc=wc,$c="[object Symbol]";function Sc(e){return typeof e=="symbol"||kc(e)&&xc(e)==$c}var nn=Sc,Cc=en,Ec=nn,Ic=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tc=/^\w*$/;function Oc(e,t){if(Cc(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Ec(e)?!0:Tc.test(e)||!Ic.test(e)||t!=null&&e in Object(t)}var Ac=Oc;function Pc(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var To=Pc,Nc=Io,Mc=To,Dc="[object AsyncFunction]",Fc="[object Function]",Lc="[object GeneratorFunction]",Rc="[object Proxy]";function jc(e){if(!Mc(e))return!1;var t=Nc(e);return t==Fc||t==Lc||t==Dc||t==Rc}var Vc=jc,Bc=tn,zc=Bc["__core-js_shared__"],Uc=zc,on=Uc,Oo=function(){var e=/[^.]+$/.exec(on&&on.keys&&on.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Hc(e){return!!Oo&&Oo in e}var qc=Hc,Wc=Function.prototype,Kc=Wc.toString;function Gc(e){if(e!=null){try{return Kc.call(e)}catch{}try{return e+""}catch{}}return""}var Yc=Gc,Xc=Vc,Zc=qc,Jc=To,Qc=Yc,el=/[\\^$.*+?()[\]{}|]/g,tl=/^\[object .+?Constructor\]$/,rl=Function.prototype,nl=Object.prototype,ol=rl.toString,il=nl.hasOwnProperty,al=RegExp("^"+ol.call(il).replace(el,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function sl(e){if(!Jc(e)||Zc(e))return!1;var t=Xc(e)?al:tl;return t.test(Qc(e))}var cl=sl;function ll(e,t){return e==null?void 0:e[t]}var ul=ll,dl=cl,fl=ul;function hl(e,t){var r=fl(e,t);return dl(r)?r:void 0}var Ao=hl,pl=Ao,vl=pl(Object,"create"),ir=vl,Po=ir;function ml(){this.__data__=Po?Po(null):{},this.size=0}var gl=ml;function bl(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var yl=bl,_l=ir,wl="__lodash_hash_undefined__",xl=Object.prototype,kl=xl.hasOwnProperty;function $l(e){var t=this.__data__;if(_l){var r=t[e];return r===wl?void 0:r}return kl.call(t,e)?t[e]:void 0}var Sl=$l,Cl=ir,El=Object.prototype,Il=El.hasOwnProperty;function Tl(e){var t=this.__data__;return Cl?t[e]!==void 0:Il.call(t,e)}var Ol=Tl,Al=ir,Pl="__lodash_hash_undefined__";function Nl(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Al&&t===void 0?Pl:t,this}var Ml=Nl,Dl=gl,Fl=yl,Ll=Sl,Rl=Ol,jl=Ml;function ht(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])}}ht.prototype.clear=Dl,ht.prototype.delete=Fl,ht.prototype.get=Ll,ht.prototype.has=Rl,ht.prototype.set=jl;var Vl=ht;function Bl(){this.__data__=[],this.size=0}var zl=Bl;function Ul(e,t){return e===t||e!==e&&t!==t}var Hl=Ul,ql=Hl;function Wl(e,t){for(var r=e.length;r--;)if(ql(e[r][0],t))return r;return-1}var ar=Wl,Kl=ar,Gl=Array.prototype,Yl=Gl.splice;function Xl(e){var t=this.__data__,r=Kl(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 Zl=Xl,Jl=ar;function Ql(e){var t=this.__data__,r=Jl(t,e);return r<0?void 0:t[r][1]}var eu=Ql,tu=ar;function ru(e){return tu(this.__data__,e)>-1}var nu=ru,ou=ar;function iu(e,t){var r=this.__data__,n=ou(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var au=iu,su=zl,cu=Zl,lu=eu,uu=nu,du=au;function pt(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])}}pt.prototype.clear=su,pt.prototype.delete=cu,pt.prototype.get=lu,pt.prototype.has=uu,pt.prototype.set=du;var fu=pt,hu=Ao,pu=tn,vu=hu(pu,"Map"),mu=vu,No=Vl,gu=fu,bu=mu;function yu(){this.size=0,this.__data__={hash:new No,map:new(bu||gu),string:new No}}var _u=yu;function wu(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var xu=wu,ku=xu;function $u(e,t){var r=e.__data__;return ku(t)?r[typeof t=="string"?"string":"hash"]:r.map}var sr=$u,Su=sr;function Cu(e){var t=Su(this,e).delete(e);return this.size-=t?1:0,t}var Eu=Cu,Iu=sr;function Tu(e){return Iu(this,e).get(e)}var Ou=Tu,Au=sr;function Pu(e){return Au(this,e).has(e)}var Nu=Pu,Mu=sr;function Du(e,t){var r=Mu(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Fu=Du,Lu=_u,Ru=Eu,ju=Ou,Vu=Nu,Bu=Fu;function vt(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])}}vt.prototype.clear=Lu,vt.prototype.delete=Ru,vt.prototype.get=ju,vt.prototype.has=Vu,vt.prototype.set=Bu;var zu=vt,Mo=zu,Uu="Expected a function";function an(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Uu);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(an.Cache||Mo),r}an.Cache=Mo;var Hu=an,qu=Hu,Wu=500;function Ku(e){var t=qu(e,function(n){return r.size===Wu&&r.clear(),n}),r=t.cache;return t}var Gu=Ku,Yu=Gu,Xu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zu=/\\(\\)?/g,Ju=Yu(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Xu,function(r,n,o,i){t.push(o?i.replace(Zu,"$1"):n||r)}),t}),Qu=Ju;function ed(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var td=ed,Do=rn,rd=td,nd=en,od=nn,id=1/0,Fo=Do?Do.prototype:void 0,Lo=Fo?Fo.toString:void 0;function Ro(e){if(typeof e=="string")return e;if(nd(e))return rd(e,Ro)+"";if(od(e))return Lo?Lo.call(e):"";var t=e+"";return t=="0"&&1/e==-id?"-0":t}var ad=Ro,sd=ad;function cd(e){return e==null?"":sd(e)}var ld=cd,ud=en,dd=Ac,fd=Qu,hd=ld;function pd(e,t){return ud(e)?e:dd(e,t)?[e]:fd(hd(e))}var vd=pd,md=nn,gd=1/0;function bd(e){if(typeof e=="string"||md(e))return e;var t=e+"";return t=="0"&&1/e==-gd?"-0":t}var yd=bd,_d=vd,wd=yd;function xd(e,t){t=_d(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[wd(t[r++])];return r&&r==n?e:void 0}var kd=xd,$d=kd;function Sd(e,t,r){var n=e==null?void 0:$d(e,t);return n===void 0?r:n}var Cd=Sd;const Dt=Ne(Cd);var Ft,S,jo,Vo,et,Bo,zo,sn,Uo,mt={},Ho=[],Ed=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,cr=Array.isArray;function Me(e,t){for(var r in t)e[r]=t[r];return e}function qo(e){var t=e.parentNode;t&&t.removeChild(e)}function M(e,t,r){var n,o,i,a={};for(i in t)i=="key"?n=t[i]:i=="ref"?o=t[i]:a[i]=t[i];if(arguments.length>2&&(a.children=arguments.length>3?Ft.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)a[i]===void 0&&(a[i]=e.defaultProps[i]);return Lt(e,a,n,o,null)}function Lt(e,t,r,n,o){var i={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:o??++jo};return o==null&&S.vnode!=null&&S.vnode(i),i}function Wo(){return{current:null}}function Y(e){return e.children}function we(e,t){this.props=e,this.context=t}function lr(e,t){if(t==null)return e.__?lr(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"?lr(e):null}function Ko(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 Ko(e)}}function cn(e){(!e.__d&&(e.__d=!0)&&et.push(e)&&!ur.__r++||Bo!==S.debounceRendering)&&((Bo=S.debounceRendering)||zo)(ur)}function ur(){var e,t,r,n,o,i,a,s,c;for(et.sort(sn);e=et.shift();)e.__d&&(t=et.length,n=void 0,o=void 0,i=void 0,s=(a=(r=e).__v).__e,(c=r.__P)&&(n=[],o=[],(i=Me({},a)).__v=a.__v+1,ln(c,a,i,r.__n,c.ownerSVGElement!==void 0,a.__h!=null?[s]:null,n,s??lr(a),a.__h,o),ei(n,a,o),a.__e!=s&&Ko(a)),et.length>t&&et.sort(sn));ur.__r=0}function Go(e,t,r,n,o,i,a,s,c,u,f){var l,p,m,g,v,y,x,w,I,O,T=0,H=n&&n.__k||Ho,W=H.length,D=W,F=t.length;for(r.__k=[],l=0;l<F;l++)(g=r.__k[l]=(g=t[l])==null||typeof g=="boolean"||typeof g=="function"?null:typeof g=="string"||typeof g=="number"||typeof g=="bigint"?Lt(null,g,null,null,g):cr(g)?Lt(Y,{children:g},null,null,null):g.__b>0?Lt(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)!=null&&(g.__=r,g.__b=r.__b+1,(w=Id(g,H,x=l+T,D))===-1?m=mt:(m=H[w]||mt,H[w]=void 0,D--),ln(e,g,m,o,i,a,s,c,u,f),v=g.__e,(p=g.ref)&&m.ref!=p&&(m.ref&&un(m.ref,null,g),f.push(p,g.__c||v,g)),v!=null&&(y==null&&(y=v),O=!(I=m===mt||m.__v===null)&&w===x,I?w==-1&&T--:w!==x&&(w===x+1?(T++,O=!0):w>x?D>F-x?(T+=w-x,O=!0):T--:T=w<x&&w==x-1?w-x:0),x=l+T,O=O||w==l&&!I,typeof g.type!="function"||w===x&&m.__k!==g.__k?typeof g.type=="function"||O?g.__d!==void 0?(c=g.__d,g.__d=void 0):c=v.nextSibling:c=Xo(e,v,c):c=Yo(g,c,e),typeof r.type=="function"&&(r.__d=c)));for(r.__e=y,l=W;l--;)H[l]!=null&&(typeof r.type=="function"&&H[l].__e!=null&&H[l].__e==r.__d&&(r.__d=H[l].__e.nextSibling),ti(H[l],H[l]))}function Yo(e,t,r){for(var n,o=e.__k,i=0;o&&i<o.length;i++)(n=o[i])&&(n.__=e,t=typeof n.type=="function"?Yo(n,t,r):Xo(r,n.__e,t));return t}function De(e,t){return t=t||[],e==null||typeof e=="boolean"||(cr(e)?e.some(function(r){De(r,t)}):t.push(e)),t}function Xo(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 Id(e,t,r,n){var o=e.key,i=e.type,a=r-1,s=r+1,c=t[r];if(c===null||c&&o==c.key&&i===c.type)return r;if(n>(c!=null?1:0))for(;a>=0||s<t.length;){if(a>=0){if((c=t[a])&&o==c.key&&i===c.type)return a;a--}if(s<t.length){if((c=t[s])&&o==c.key&&i===c.type)return s;s++}}return-1}function Td(e,t,r,n,o){var i;for(i in r)i==="children"||i==="key"||i in t||dr(e,i,null,r[i],n);for(i in t)o&&typeof t[i]!="function"||i==="children"||i==="key"||i==="value"||i==="checked"||r[i]===t[i]||dr(e,i,t[i],r[i],n)}function Zo(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||Ed.test(t)?r:r+"px"}function dr(e,t,r,n,o){var i;e:if(t==="style")if(typeof r=="string")e.style.cssText=r;else{if(typeof n=="string"&&(e.style.cssText=n=""),n)for(t in n)r&&t in r||Zo(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Zo(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=r,r?n||e.addEventListener(t,i?Qo:Jo,i):e.removeEventListener(t,i?Qo:Jo,i);else if(t!=="dangerouslySetInnerHTML"){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Jo(e){return this.l[e.type+!1](S.event?S.event(e):e)}function Qo(e){return this.l[e.type+!0](S.event?S.event(e):e)}function ln(e,t,r,n,o,i,a,s,c,u){var f,l,p,m,g,v,y,x,w,I,O,T,H,W,D,F=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(c=r.__h,s=t.__e=r.__e,t.__h=null,i=[s]),(f=S.__b)&&f(t);try{e:if(typeof F=="function"){if(x=t.props,w=(f=F.contextType)&&n[f.__c],I=f?w?w.props.value:f.__:n,r.__c?y=(l=t.__c=r.__c).__=l.__E:("prototype"in F&&F.prototype.render?t.__c=l=new F(x,I):(t.__c=l=new we(x,I),l.constructor=F,l.render=Ad),w&&w.sub(l),l.props=x,l.state||(l.state={}),l.context=I,l.__n=n,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),F.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Me({},l.__s)),Me(l.__s,F.getDerivedStateFromProps(x,l.__s))),m=l.props,g=l.state,l.__v=t,p)F.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(F.getDerivedStateFromProps==null&&x!==m&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(x,I),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(x,l.__s,I)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(l.props=x,l.state=l.__s,l.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(ae){ae&&(ae.__=t)}),O=0;O<l._sb.length;O++)l.__h.push(l._sb[O]);l._sb=[],l.__h.length&&a.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(x,l.__s,I),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(m,g,v)})}if(l.context=I,l.props=x,l.__P=e,l.__e=!1,T=S.__r,H=0,"prototype"in F&&F.prototype.render){for(l.state=l.__s,l.__d=!1,T&&T(t),f=l.render(l.props,l.state,l.context),W=0;W<l._sb.length;W++)l.__h.push(l._sb[W]);l._sb=[]}else do l.__d=!1,T&&T(t),f=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++H<25);l.state=l.__s,l.getChildContext!=null&&(n=Me(Me({},n),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(v=l.getSnapshotBeforeUpdate(m,g)),Go(e,cr(D=f!=null&&f.type===Y&&f.key==null?f.props.children:f)?D:[D],t,r,n,o,i,a,s,c,u),l.base=t.__e,t.__h=null,l.__h.length&&a.push(l),y&&(l.__E=l.__=null)}else i==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Od(r.__e,t,r,n,o,i,a,c,u);(f=S.diffed)&&f(t)}catch(ae){t.__v=null,(c||i!=null)&&(t.__e=s,t.__h=!!c,i[i.indexOf(s)]=null),S.__e(ae,t,r)}}function ei(e,t,r){for(var n=0;n<r.length;n++)un(r[n],r[++n],r[++n]);S.__c&&S.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(i){i.call(o)})}catch(i){S.__e(i,o.__v)}})}function Od(e,t,r,n,o,i,a,s,c){var u,f,l,p=r.props,m=t.props,g=t.type,v=0;if(g==="svg"&&(o=!0),i!=null){for(;v<i.length;v++)if((u=i[v])&&"setAttribute"in u==!!g&&(g?u.localName===g:u.nodeType===3)){e=u,i[v]=null;break}}if(e==null){if(g===null)return document.createTextNode(m);e=o?document.createElementNS("http://www.w3.org/2000/svg",g):document.createElement(g,m.is&&m),i=null,s=!1}if(g===null)p===m||s&&e.data===m||(e.data=m);else{if(i=i&&Ft.call(e.childNodes),f=(p=r.props||mt).dangerouslySetInnerHTML,l=m.dangerouslySetInnerHTML,!s){if(i!=null)for(p={},v=0;v<e.attributes.length;v++)p[e.attributes[v].name]=e.attributes[v].value;(l||f)&&(l&&(f&&l.__html==f.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(Td(e,m,p,o,s),l)t.__k=[];else if(Go(e,cr(v=t.props.children)?v:[v],t,r,n,o&&g!=="foreignObject",i,a,i?i[0]:r.__k&&lr(r,0),s,c),i!=null)for(v=i.length;v--;)i[v]!=null&&qo(i[v]);s||("value"in m&&(v=m.value)!==void 0&&(v!==e.value||g==="progress"&&!v||g==="option"&&v!==p.value)&&dr(e,"value",v,p.value,!1),"checked"in m&&(v=m.checked)!==void 0&&v!==e.checked&&dr(e,"checked",v,p.checked,!1))}return e}function un(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){S.__e(n,r)}}function ti(e,t,r){var n,o;if(S.unmount&&S.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||un(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(i){S.__e(i,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(o=0;o<n.length;o++)n[o]&&ti(n[o],t,r||typeof e.type!="function");r||e.__e==null||qo(e.__e),e.__=e.__e=e.__d=void 0}function Ad(e,t,r){return this.constructor(e,r)}function gt(e,t,r){var n,o,i,a;S.__&&S.__(e,t),o=(n=typeof r=="function")?null:r&&r.__k||t.__k,i=[],a=[],ln(t,e=(!n&&r||t).__k=M(Y,null,[e]),o||mt,mt,t.ownerSVGElement!==void 0,!n&&r?[r]:o?null:t.firstChild?Ft.call(t.childNodes):null,i,!n&&r?r:o?o.__e:t.firstChild,n,a),ei(i,e,a)}function ri(e,t){gt(e,t,ri)}function Pd(e,t,r){var n,o,i,a,s=Me({},e.props);for(i in e.type&&e.type.defaultProps&&(a=e.type.defaultProps),t)i=="key"?n=t[i]:i=="ref"?o=t[i]:s[i]=t[i]===void 0&&a!==void 0?a[i]:t[i];return arguments.length>2&&(s.children=arguments.length>3?Ft.call(arguments,2):r),Lt(e.type,s,n||e.key,o||e.ref,null)}function Rt(e,t){var r={__c:t="__cC"+Uo++,__:e,Consumer:function(n,o){return n.children(o)},Provider:function(n){var o,i;return this.getChildContext||(o=[],(i={})[t]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(a){this.props.value!==a.value&&o.some(function(s){s.__e=!0,cn(s)})},this.sub=function(a){o.push(a);var s=a.componentWillUnmount;a.componentWillUnmount=function(){o.splice(o.indexOf(a),1),s&&s.call(a)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}Ft=Ho.slice,S={__e:function(e,t,r,n){for(var o,i,a;t=t.__;)if((o=t.__c)&&!o.__)try{if((i=o.constructor)&&i.getDerivedStateFromError!=null&&(o.setState(i.getDerivedStateFromError(e)),a=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,n||{}),a=o.__d),a)return o.__E=o}catch(s){e=s}throw e}},jo=0,Vo=function(e){return e!=null&&e.constructor===void 0},we.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Me({},this.state),typeof e=="function"&&(e=e(Me({},r),this.props)),e&&Me(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),cn(this))},we.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),cn(this))},we.prototype.render=Y,et=[],zo=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,sn=function(e,t){return e.__v.__b-t.__v.__b},ur.__r=0,Uo=0;var fr=class extends Error{constructor(t){super(t[0].message);Js(this,"issues");this.name="ValiError",this.issues=t}};function ni(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function jt(e){return{issues:e}}function ue(e){return{output:e}}function Nd(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 Md(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 ze(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return ue(e);let o,i,a=e;for(const s of t){const c=s._parse(a);if(c.issues){o=o||Md(r,n);for(const u of c.issues){const f=Nd(o,u);i?i.push(f):i=[f]}if(o.abortEarly||o.abortPipeEarly)break}else a=c.output}return i?jt(i):ue(a)}function Ue(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function oi(e){return typeof e=="function"?e():e}function He(e,t,r,n){return jt([{validation:e,message:oi(t),input:r,requirement:n}])}function ii(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[i,a]=Ue(t,r);return[e,i,a]}const[n,o]=Ue(e,t);return[void 0,n,o]}function Fe(e,t,r,n,o,i){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:oi(n),input:o,issues:i,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function ai(e){return typeof e.default=="function"?e.default():e.default}function Dd(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return ze(t,this.pipe,r,"any")}}}function si(e,t,r){const[n="Invalid type",o]=Ue(t,r);return{type:"array",async:!1,item:e,message:n,pipe:o,_parse(i,a){if(!Array.isArray(i))return Fe(a,"type","array",this.message,i);let s;const c=[];for(let u=0;u<i.length;u++){const f=i[u],l=this.item._parse(f,a);if(l.issues){const p={type:"array",input:i,key:u,value:f};for(const m of l.issues)m.path?m.path.unshift(p):m.path=[p],s==null||s.push(m);if(s||(s=l.issues),a!=null&&a.abortEarly)break}else c.push(l.output)}return s?jt(s):ze(c,this.pipe,a,"array")}}}function ci(e,t){const[r="Invalid type",n]=Ue(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="boolean"?Fe(i,"type","boolean",this.message,o):ze(o,this.pipe,i,"boolean")}}}function li(e,t="Invalid type"){return{type:"literal",async:!1,literal:e,message:t,_parse(r,n){return r!==this.literal?Fe(n,"type","literal",this.message,r):ue(r)}}}function Fd(e,t){return{type:"nullable",async:!1,wrapped:e,default:t,_parse(r,n){if(r===null){const o=ai(this);if(o===void 0)return ue(r);r=o}return this.wrapped._parse(r,n)}}}function dn(e,t){const[r="Invalid type",n]=Ue(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="number"||isNaN(o)?Fe(i,"type","number",this.message,o):ze(o,this.pipe,i,"number")}}}function de(e,t,r,n){const[o,i="Invalid type",a]=ii(t,r,n);let s;return{type:"object",async:!1,entries:e,rest:o,message:i,pipe:a,_parse(c,u){if(!c||typeof c!="object")return Fe(u,"type","object",this.message,c);s=s||Object.entries(this.entries);let f;const l={};for(const[p,m]of s){const g=c[p],v=m._parse(g,u);if(v.issues){const y={type:"object",input:c,key:p,value:g};for(const x of v.issues)x.path?x.path.unshift(y):x.path=[y],f==null||f.push(x);if(f||(f=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||p in c)&&(l[p]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&f)){for(const p in c)if(!(p in this.entries)){const m=c[p],g=this.rest._parse(m,u);if(g.issues){const v={type:"object",input:c,key:p,value:m};for(const y of g.issues)y.path?y.path.unshift(v):y.path=[v],f==null||f.push(y);if(f||(f=g.issues),u!=null&&u.abortEarly)break}else l[p]=g.output}}return f?jt(f):ze(l,this.pipe,u,"object")}}}function Vt(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const o=ai(this);if(o===void 0)return ue(r);r=o}return this.wrapped._parse(r,n)}}}function Ld(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?ue(r):Fe(n,"type","picklist",this.message,r)}}}function se(e,t){const[r="Invalid type",n]=Ue(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(o,i){return typeof o!="string"?Fe(i,"type","string",this.message,o):ze(o,this.pipe,i,"string")}}}function Rd(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[a,s]=Ue(r,n);return[e,t,a,s]}const[o,i]=Ue(t,r);return[se(),e,o,i]}var jd=["__proto__","prototype","constructor"];function ui(e,t,r,n){const[o,i,a="Invalid type",s]=Rd(e,t,r,n);return{type:"record",async:!1,key:o,value:i,message:a,pipe:s,_parse(c,u){if(!c||typeof c!="object")return Fe(u,"type","record",this.message,c);let f;const l={};for(const[p,m]of Object.entries(c))if(!jd.includes(p)){let g;const v=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(v.issues){g={type:"record",input:c,key:p,value:m};for(const x of v.issues)x.path=[g],f==null||f.push(x);if(f||(f=v.issues),u!=null&&u.abortEarly)break}const y=this.value._parse(m,u);if(y.issues){g=g||{type:"record",input:c,key:p,value:m};for(const x of y.issues)x.path?x.path.unshift(g):x.path=[g],f==null||f.push(x);if(f||(f=y.issues),u!=null&&u.abortEarly)break}!v.issues&&!y.issues&&(l[v.output]=y.output)}return f?jt(f):ze(l,this.pipe,u,"record")}}}function Vd(e,t="Invalid type"){return{type:"union",async:!1,options:e,message:t,_parse(r,n){let o,i;for(const a of this.options){const s=a._parse(r,n);if(s.issues)if(o)for(const c of s.issues)o.push(c);else o=s.issues;else{i=[s.output];break}}return i?ue(i[0]):Fe(n,"type","union",this.message,r,o)}}}function hr(e,t,r){const n=e._parse(t,r);if(n.issues)throw new fr(n.issues);return n.output}async function Bd(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new fr(n.issues);return n.output}function zd(e,t,r,n){const[o,i,a]=ii(t,r,n);return de(Object.entries(e.entries).reduce((s,[c,u])=>({...s,[c]:Vt(u)}),{}),o,i,a)}function Ud(e,t,r){const n=e._parse(t,r);return n.issues?{success:!1,error:new fr(n.issues),issues:n.issues}:{success:!0,data:n.output,output:n.output}}function di(e,t,r){return{...e,_parse(n,o){const i=e._parse(n,o);if(i.issues)return i;const a=t(i.output);return r&&!Array.isArray(r)?r._parse(a,o):ze(a,r,o,typeof a)}}}var Hd=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function qd(e,t="Invalid input"){return{type:"custom",async:!1,message:t,requirement:e,_parse(r){return this.requirement(r)?ue(r):He(this.type,this.message,r,this.requirement)}}}function Wd(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Hd,_parse(t){return this.requirement.test(t)?ue(t):He(this.type,this.message,t,this.requirement)}}}function pr(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?He(this.type,this.message,r,this.requirement):ue(r)}}}function Kd(e,t="Invalid value"){return{type:"max_value",async:!1,message:t,requirement:e,_parse(r){return r>this.requirement?He(this.type,this.message,r,this.requirement):ue(r)}}}function vr(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?He(this.type,this.message,r,this.requirement):ue(r)}}}function Gd(e,t="Invalid value"){return{type:"min_value",async:!1,message:t,requirement:e,_parse(r){return r<this.requirement?He(this.type,this.message,r,this.requirement):ue(r)}}}function fi(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?ue(r):He(this.type,this.message,r,this.requirement)}}}function Yd(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)?ue(t):He(this.type,this.message,t,this.requirement)}}}function he(){return he=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},he.apply(this,arguments)}var Le,z,fn,hi,bt=0,pi=[],mr=[],vi=S.__b,mi=S.__r,gi=S.diffed,bi=S.__c,yi=S.unmount;function tt(e,t){S.__h&&S.__h(z,e,bt||t),bt=0;var r=z.__H||(z.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:mr}),r.__[e]}function K(e){return bt=1,gr($i,e)}function gr(e,t,r){var n=tt(Le++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):$i(void 0,t),function(s){var c=n.__N?n.__N[0]:n.__[0],u=n.t(c,s);c!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=z,!z.u)){var o=function(s,c,u){if(!n.__c.__H)return!0;var f=n.__c.__H.__.filter(function(p){return p.__c});if(f.every(function(p){return!p.__N}))return!i||i.call(this,s,c,u);var l=!1;return f.forEach(function(p){if(p.__N){var m=p.__[0];p.__=p.__N,p.__N=void 0,m!==p.__[0]&&(l=!0)}}),!(!l&&n.__c.props===s)&&(!i||i.call(this,s,c,u))};z.u=!0;var i=z.shouldComponentUpdate,a=z.componentWillUpdate;z.componentWillUpdate=function(s,c,u){if(this.__e){var f=i;i=void 0,o(s,c,u),i=f}a&&a.call(this,s,c,u)},z.shouldComponentUpdate=o}return n.__N||n.__}function V(e,t){var r=tt(Le++,3);!S.__s&&pn(r.__H,t)&&(r.__=e,r.i=t,z.__H.__h.push(r))}function pe(e,t){var r=tt(Le++,4);!S.__s&&pn(r.__H,t)&&(r.__=e,r.i=t,z.__h.push(r))}function L(e){return bt=5,ve(function(){return{current:e}},[])}function _i(e,t,r){bt=6,pe(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 ve(e,t){var r=tt(Le++,7);return pn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function be(e,t){return bt=8,ve(function(){return e},t)}function br(e){var t=z.context[e.__c],r=tt(Le++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(z)),t.props.value):e.__}function wi(e,t){S.useDebugValue&&S.useDebugValue(t?t(e):e)}function Xd(e){var t=tt(Le++,10),r=K();return t.__=e,z.componentDidCatch||(z.componentDidCatch=function(n,o){t.__&&t.__(n,o),r[1](n)}),[r[0],function(){r[1](void 0)}]}function xi(){var e=tt(Le++,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 Zd(){for(var e;e=pi.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(yr),e.__H.__h.forEach(hn),e.__H.__h=[]}catch(t){e.__H.__h=[],S.__e(t,e.__v)}}S.__b=function(e){z=null,vi&&vi(e)},S.__r=function(e){mi&&mi(e),Le=0;var t=(z=e.__c).__H;t&&(fn===z?(t.__h=[],z.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=mr,r.__N=r.i=void 0})):(t.__h.forEach(yr),t.__h.forEach(hn),t.__h=[],Le=0)),fn=z},S.diffed=function(e){gi&&gi(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(pi.push(t)!==1&&hi===S.requestAnimationFrame||((hi=S.requestAnimationFrame)||Jd)(Zd)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==mr&&(r.__=r.__V),r.i=void 0,r.__V=mr})),fn=z=null},S.__c=function(e,t){t.some(function(r){try{r.__h.forEach(yr),r.__h=r.__h.filter(function(n){return!n.__||hn(n)})}catch(n){t.some(function(o){o.__h&&(o.__h=[])}),t=[],S.__e(n,r.__v)}}),bi&&bi(e,t)},S.unmount=function(e){yi&&yi(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{yr(n)}catch(o){t=o}}),r.__H=void 0,t&&S.__e(t,r.__v))};var ki=typeof requestAnimationFrame=="function";function Jd(e){var t,r=function(){clearTimeout(n),ki&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);ki&&(t=requestAnimationFrame(r))}function yr(e){var t=z,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),z=t}function hn(e){var t=z;e.__c=e.__(),z=t}function pn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function $i(e,t){return typeof t=="function"?t(e):t}function Si(e,t){for(var r in t)e[r]=t[r];return e}function vn(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 mn(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function _r(e){this.props=e}function Ci(e,t){function r(o){var i=this.props.ref,a=i==o.ref;return!a&&i&&(i.call?i(null):i.current=null),t?!t(this.props,o)||!a:vn(this.props,o)}function n(o){return this.shouldComponentUpdate=r,M(e,o)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(_r.prototype=new we).isPureReactComponent=!0,_r.prototype.shouldComponentUpdate=function(e,t){return vn(this.props,e)||vn(this.state,t)};var Ei=S.__b;S.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Ei&&Ei(e)};var Qd=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function re(e){function t(r){var n=Si({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=Qd,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Ii=function(e,t){return e==null?null:De(De(e).map(t))},Re={map:Ii,forEach:Ii,count:function(e){return e?De(e).length:0},only:function(e){var t=De(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:De},ef=S.__e;S.__e=function(e,t,r,n){if(e.then){for(var o,i=t;i=i.__;)if((o=i.__c)&&o.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),o.__c(e,t)}ef(e,t,r,n)};var Ti=S.unmount;function Oi(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=Si({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return Oi(n,t,r)})),e}function Ai(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return Ai(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 yt(){this.__u=0,this.t=null,this.__b=null}function Pi(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function gn(e){var t,r,n;function o(i){if(t||(t=e()).then(function(a){r=a.default||a},function(a){n=a}),n)throw n;if(!r)throw t;return M(r,i)}return o.displayName="Lazy",o.__f=!0,o}function _t(){this.u=null,this.o=null}S.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),Ti&&Ti(e)},(yt.prototype=new we).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var o=Pi(n.__v),i=!1,a=function(){i||(i=!0,r.__R=null,o?o(s):s())};r.__R=a;var s=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=Ai(u,u.__c.__P,u.__c.__O)}var f;for(n.setState({__a:n.__b=null});f=n.t.pop();)f.forceUpdate()}},c=t.__h===!0;n.__u++||c||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},yt.prototype.componentWillUnmount=function(){this.t=[]},yt.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]=Oi(this.__b,r,n.__O=n.__P)}this.__b=null}var o=t.__a&&M(Y,null,e.fallback);return o&&(o.__h=null),[M(Y,null,t.__a?null:e.children),o]};var Ni=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 tf(e){return this.getChildContext=function(){return e.context},e.children}function rf(e){var t=this,r=e.i;t.componentWillUnmount=function(){gt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,o){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),gt(M(tf,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Mi(e,t){var r=M(rf,{__v:e,i:t});return r.containerInfo=t,r}(_t.prototype=new we).__a=function(e){var t=this,r=Pi(t.__v),n=t.o.get(e);return n[0]++,function(o){var i=function(){t.props.revealOrder?(n.push(o),Ni(t,e,n)):o()};r?r(i):i()}},_t.prototype.render=function(e){this.u=null,this.o=new Map;var t=De(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},_t.prototype.componentDidUpdate=_t.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){Ni(e,r,t)})};var Di=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,nf=/^(?: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]/,of=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,af=/[A-Z0-9]/g,sf=typeof document<"u",cf=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Fi(e,t,r){return t.__k==null&&(t.textContent=""),gt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Li(e,t,r){return ri(e,t),typeof r=="function"&&r(),e?e.__c:null}we.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(we.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ri=S.event;function lf(){}function uf(){return this.cancelBubble}function df(){return this.defaultPrevented}S.event=function(e){return Ri&&(e=Ri(e)),e.persist=lf,e.isPropagationStopped=uf,e.isDefaultPrevented=df,e.nativeEvent=e};var bn,ff={enumerable:!1,configurable:!0,get:function(){return this.class}},ji=S.vnode;S.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,o={};for(var i in r){var a=r[i];if(!(i==="value"&&"defaultValue"in r&&a==null||sf&&i==="children"&&n==="noscript"||i==="class"||i==="className")){var s=i.toLowerCase();i==="defaultValue"&&"value"in r&&r.value==null?i="value":i==="download"&&a===!0?a="":s==="ondoubleclick"?i="ondblclick":s!=="onchange"||n!=="input"&&n!=="textarea"||cf(r.type)?s==="onfocus"?i="onfocusin":s==="onblur"?i="onfocusout":of.test(i)?i=s:n.indexOf("-")===-1&&nf.test(i)?i=i.replace(af,"-$&").toLowerCase():a===null&&(a=void 0):s=i="oninput",s==="oninput"&&o[i=s]&&(i="oninputCapture"),o[i]=a}}n=="select"&&o.multiple&&Array.isArray(o.value)&&(o.value=De(r.children).forEach(function(c){c.props.selected=o.value.indexOf(c.props.value)!=-1})),n=="select"&&o.defaultValue!=null&&(o.value=De(r.children).forEach(function(c){c.props.selected=o.multiple?o.defaultValue.indexOf(c.props.value)!=-1:o.defaultValue==c.props.value})),r.class&&!r.className?(o.class=r.class,Object.defineProperty(o,"className",ff)):(r.className&&!r.class||r.class&&r.className)&&(o.class=o.className=r.className),t.props=o}(e),e.$$typeof=Di,ji&&ji(e)};var Vi=S.__r;S.__r=function(e){Vi&&Vi(e),bn=e.__c};var Bi=S.diffed;S.diffed=function(e){Bi&&Bi(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),bn=null};var zi={ReactCurrentDispatcher:{current:{readContext:function(e){return bn.__n[e.__c].props.value}}}},hf="17.0.2";function Ui(e){return M.bind(null,e)}function rt(e){return!!e&&e.$$typeof===Di}function wt(e){return rt(e)?Pd.apply(null,arguments):e}function Hi(e){return!!e.__k&&(gt(null,e),!0)}function qi(e){return e&&(e.base||e.nodeType===1&&e)||null}var Wi=function(e,t){return e(t)},wr=function(e,t){return e(t)},Ki=Y;function yn(e){e()}function Gi(e){return e}function Yi(){return[!1,yn]}var Xi=pe;function Zi(e,t){var r=t(),n=K({h:{__:r,v:t}}),o=n[0].h,i=n[1];return pe(function(){o.__=r,o.v=t,mn(o.__,t())||i({h:o})},[e,r,t]),V(function(){return mn(o.__,o.v())||i({h:o}),e(function(){mn(o.__,o.v())||i({h:o})})},[e]),r}var $e={useState:K,useId:xi,useReducer:gr,useEffect:V,useLayoutEffect:pe,useInsertionEffect:Xi,useTransition:Yi,useDeferredValue:Gi,useSyncExternalStore:Zi,startTransition:yn,useRef:L,useImperativeHandle:_i,useMemo:ve,useCallback:be,useContext:br,useDebugValue:wi,version:"17.0.2",Children:Re,render:Fi,hydrate:Li,unmountComponentAtNode:Hi,createPortal:Mi,createElement:M,createContext:Rt,createFactory:Ui,cloneElement:wt,createRef:Wo,Fragment:Y,isValidElement:rt,findDOMNode:qi,Component:we,PureComponent:_r,memo:Ci,forwardRef:re,flushSync:wr,unstable_batchedUpdates:Wi,StrictMode:Ki,Suspense:yt,SuspenseList:_t,lazy:gn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:zi};const pf=Object.freeze(Object.defineProperty({__proto__:null,Children:Re,Component:we,Fragment:Y,PureComponent:_r,StrictMode:Ki,Suspense:yt,SuspenseList:_t,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:zi,cloneElement:wt,createContext:Rt,createElement:M,createFactory:Ui,createPortal:Mi,createRef:Wo,default:$e,findDOMNode:qi,flushSync:wr,forwardRef:re,hydrate:Li,isValidElement:rt,lazy:gn,memo:Ci,render:Fi,startTransition:yn,unmountComponentAtNode:Hi,unstable_batchedUpdates:Wi,useCallback:be,useContext:br,useDebugValue:wi,useDeferredValue:Gi,useEffect:V,useErrorBoundary:Xd,useId:xi,useImperativeHandle:_i,useInsertionEffect:Xi,useLayoutEffect:pe,useMemo:ve,useReducer:gr,useRef:L,useState:K,useSyncExternalStore:Zi,useTransition:Yi,version:hf},Symbol.toStringTag,{value:"Module"}));function xt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function vf(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Ji(...e){return t=>e.forEach(r=>vf(r,t))}function Bt(...e){return be(Ji(...e),e)}function mf(e,t=[]){let r=[];function n(i,a){const s=Rt(a),c=r.length;r=[...r,a];function u(l){const{scope:p,children:m,...g}=l,v=(p==null?void 0:p[e][c])||s,y=ve(()=>g,Object.values(g));return M(v.Provider,{value:y},m)}function f(l,p){const m=(p==null?void 0:p[e][c])||s,g=br(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${l}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>Rt(a));return function(s){const c=(s==null?void 0:s[e])||i;return ve(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,gf(o,...t)]}function gf(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:c,scopeName:u})=>{const l=c(i)[`__scope${u}`];return{...s,...l}},{});return ve(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}const _n=globalThis!=null&&globalThis.document?pe:()=>{},bf=pf["useId".toString()]||(()=>{});let yf=0;function wn(e){const[t,r]=K(bf());return _n(()=>{e||r(n=>n??String(yf++))},[e]),e||(t?`radix-${t}`:"")}function nt(e){const t=L(e);return V(()=>{t.current=e}),ve(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function _f({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=wf({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=nt(r),c=be(u=>{if(i){const l=typeof u=="function"?u(e):u;l!==e&&s(l)}else o(u)},[i,e,o,s]);return[a,c]}function wf({defaultProp:e,onChange:t}){const r=K(e),[n]=r,o=L(n),i=nt(t);return V(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const xn=re((e,t)=>{const{children:r,...n}=e,o=Re.toArray(r),i=o.find(kf);if(i){const a=i.props.children,s=o.map(c=>c===i?Re.count(a)>1?Re.only(null):rt(a)?a.props.children:null:c);return M(kn,he({},n,{ref:t}),rt(a)?wt(a,void 0,s):null)}return M(kn,he({},n,{ref:t}),r)});xn.displayName="Slot";const kn=re((e,t)=>{const{children:r,...n}=e;return rt(r)?wt(r,{...$f(n,r.props),ref:t?Ji(t,r.ref):r.ref}):Re.count(r)>1?Re.only(null):null});kn.displayName="SlotClone";const xf=({children:e})=>M(Y,null,e);function kf(e){return rt(e)&&e.type===xf}function $f(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const $n=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=re((n,o)=>{const{asChild:i,...a}=n,s=i?xn:t;return V(()=>{window[Symbol.for("radix-ui")]=!0},[]),M(s,he({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Sf(e,t){e&&wr(()=>e.dispatchEvent(t))}function Cf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e);V(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Sn="dismissableLayer.update",Ef="dismissableLayer.pointerDownOutside",If="dismissableLayer.focusOutside";let Qi;const Tf=Rt({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Of=re((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...u}=e,f=br(Tf),[l,p]=K(null),m=(r=l==null?void 0:l.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,g]=K({}),v=Bt(t,D=>p(D)),y=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(x),I=l?y.indexOf(l):-1,O=f.layersWithOutsidePointerEventsDisabled.size>0,T=I>=w,H=Af(D=>{const F=D.target,ae=[...f.branches].some(te=>te.contains(F));!T||ae||(i==null||i(D),s==null||s(D),D.defaultPrevented||c==null||c())},m),W=Pf(D=>{const F=D.target;[...f.branches].some(te=>te.contains(F))||(a==null||a(D),s==null||s(D),D.defaultPrevented||c==null||c())},m);return Cf(D=>{I===f.layers.size-1&&(o==null||o(D),!D.defaultPrevented&&c&&(D.preventDefault(),c()))},m),V(()=>{if(l)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Qi=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(l)),f.layers.add(l),ea(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Qi)}},[l,m,n,f]),V(()=>()=>{l&&(f.layers.delete(l),f.layersWithOutsidePointerEventsDisabled.delete(l),ea())},[l,f]),V(()=>{const D=()=>g({});return document.addEventListener(Sn,D),()=>document.removeEventListener(Sn,D)},[]),M($n.div,he({},u,{ref:v,style:{pointerEvents:O?T?"auto":"none":void 0,...e.style},onFocusCapture:xt(e.onFocusCapture,W.onFocusCapture),onBlurCapture:xt(e.onBlurCapture,W.onBlurCapture),onPointerDownCapture:xt(e.onPointerDownCapture,H.onPointerDownCapture)}))});function Af(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1),o=L(()=>{});return V(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){ta(Ef,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}else t.removeEventListener("click",o.current);n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Pf(e,t=globalThis==null?void 0:globalThis.document){const r=nt(e),n=L(!1);return V(()=>{const o=i=>{i.target&&!n.current&&ta(If,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ea(){const e=new CustomEvent(Sn);document.dispatchEvent(e)}function ta(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Sf(o,i):o.dispatchEvent(i)}const Cn="focusScope.autoFocusOnMount",En="focusScope.autoFocusOnUnmount",ra={bubbles:!1,cancelable:!0},Nf=re((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=K(null),u=nt(o),f=nt(i),l=L(null),p=Bt(t,v=>c(v)),m=L({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;V(()=>{if(n){let v=function(I){if(m.paused||!s)return;const O=I.target;s.contains(O)?l.current=O:qe(l.current,{select:!0})},y=function(I){if(m.paused||!s)return;const O=I.relatedTarget;O!==null&&(s.contains(O)||qe(l.current,{select:!0}))},x=function(I){if(document.activeElement===document.body)for(const T of I)T.removedNodes.length>0&&qe(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const w=new MutationObserver(x);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),w.disconnect()}}},[n,s,m.paused]),V(()=>{if(s){ia.add(m);const v=document.activeElement;if(!s.contains(v)){const x=new CustomEvent(Cn,ra);s.addEventListener(Cn,u),s.dispatchEvent(x),x.defaultPrevented||(Mf(jf(na(s)),{select:!0}),document.activeElement===v&&qe(s))}return()=>{s.removeEventListener(Cn,u),setTimeout(()=>{const x=new CustomEvent(En,ra);s.addEventListener(En,f),s.dispatchEvent(x),x.defaultPrevented||qe(v??document.body,{select:!0}),s.removeEventListener(En,f),ia.remove(m)},0)}}},[s,u,f,m]);const g=be(v=>{if(!r&&!n||m.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(y&&x){const w=v.currentTarget,[I,O]=Df(w);I&&O?!v.shiftKey&&x===O?(v.preventDefault(),r&&qe(I,{select:!0})):v.shiftKey&&x===I&&(v.preventDefault(),r&&qe(O,{select:!0})):x===w&&v.preventDefault()}},[r,n,m.paused]);return M($n.div,he({tabIndex:-1},a,{ref:p,onKeyDown:g}))});function Mf(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(qe(n,{select:t}),document.activeElement!==r)return}function Df(e){const t=na(e),r=oa(t,e),n=oa(t.reverse(),e);return[r,n]}function na(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function oa(e,t){for(const r of e)if(!Ff(r,{upTo:t}))return r}function Ff(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Lf(e){return e instanceof HTMLInputElement&&"select"in e}function qe(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Lf(e)&&t&&e.select()}}const ia=Rf();function Rf(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=aa(e,t),e.unshift(t)},remove(t){var r;e=aa(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function aa(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function jf(e){return e.filter(t=>t.tagName!=="A")}function Vf(e,t){return gr((r,n)=>{const o=t[r][n];return o??r},e)}const In=e=>{const{present:t,children:r}=e,n=Bf(t),o=typeof r=="function"?r({present:n.isPresent}):Re.only(r),i=Bt(n.ref,o.ref);return typeof r=="function"||n.isPresent?wt(o,{ref:i}):null};In.displayName="Presence";function Bf(e){const[t,r]=K(),n=L({}),o=L(e),i=L("none"),a=e?"mounted":"unmounted",[s,c]=Vf(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return V(()=>{const u=xr(n.current);i.current=s==="mounted"?u:"none"},[s]),_n(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,m=xr(u);e?c("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),_n(()=>{if(t){const u=l=>{const m=xr(n.current).includes(l.animationName);l.target===t&&m&&wr(()=>c("ANIMATION_END"))},f=l=>{l.target===t&&(i.current=xr(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:be(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function xr(e){return(e==null?void 0:e.animationName)||"none"}let Tn=0;function zf(){V(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:sa()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:sa()),Tn++,()=>{Tn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Tn--}},[])}function sa(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ee=function(){return Ee=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ee.apply(this,arguments)};function ca(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Uf(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var kr="right-scroll-bar-position",$r="width-before-scroll-bar",Hf="with-scroll-bars-hidden",qf="--removed-body-scroll-bar-size";function Wf(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Kf(e,t){var r=K(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Gf(e,t){return Kf(t||null,function(r){return e.forEach(function(n){return Wf(n,r)})})}function Yf(e){return e}function Xf(e,t){t===void 0&&(t=Yf);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var c=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function Zf(e){e===void 0&&(e={});var t=Xf(null);return t.options=Ee({async:!0,ssr:!1},e),t}var la=function(e){var t=e.sideCar,r=ca(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return M(n,Ee({},r))};la.isSideCarExport=!0;function Jf(e,t){return e.useMedium(t),la}var ua=Zf(),On=function(){},Sr=re(function(e,t){var r=L(null),n=K({onScrollCapture:On,onWheelCapture:On,onTouchMoveCapture:On}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,l=e.shards,p=e.sideCar,m=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,w=ca(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),I=p,O=Gf([r,t]),T=Ee(Ee({},w),o);return M(Y,null,f&&M(I,{sideCar:ua,removeScrollBar:u,shards:l,noIsolation:m,inert:g,setCallbacks:i,allowPinchZoom:!!v,lockRef:r}),a?wt(Re.only(s),Ee(Ee({},T),{ref:O})):M(x,Ee({},T,{className:c,ref:O}),s))});Sr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Sr.classNames={fullWidth:$r,zeroRight:kr};var da,Qf=function(){if(da)return da;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Qf();return t&&e.setAttribute("nonce",t),e}function th(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function rh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var nh=function(){var e=0,t=null;return{add:function(r){e==0&&(t=eh())&&(th(t,r),rh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},oh=function(){var e=nh();return function(t,r){V(function(){return e.add(t),function(){e.remove()}},[t&&r])}},fa=function(){var e=oh(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},ih={left:0,top:0,right:0,gap:0},An=function(e){return parseInt(e||"",10)||0},ah=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[An(r),An(n),An(o)]},sh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ih;var t=ah(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},ch=fa(),lh=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
-
|
|
3
|
-
overflow: hidden `).concat(n,`;
|
|
4
|
-
padding-right: `).concat(s,"px ").concat(n,`;
|
|
5
|
-
}
|
|
6
|
-
body {
|
|
7
|
-
overflow: hidden `).concat(n,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
10
|
-
padding-left: `.concat(o,`px;
|
|
11
|
-
padding-top: `).concat(i,`px;
|
|
12
|
-
padding-right: `).concat(a,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(s,"px ").concat(n,`;
|
|
16
|
-
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(kr,` {
|
|
20
|
-
right: `).concat(s,"px ").concat(n,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat($r,` {
|
|
24
|
-
margin-right: `).concat(s,"px ").concat(n,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(kr," .").concat(kr,` {
|
|
28
|
-
right: 0 `).concat(n,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat($r," .").concat($r,` {
|
|
32
|
-
margin-right: 0 `).concat(n,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body {
|
|
36
|
-
`).concat(qf,": ").concat(s,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},uh=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=ve(function(){return sh(o)},[o]);return M(ch,{styles:lh(i,!t,o,r?"":"!important")})},Pn=!1;if(typeof window<"u")try{var Cr=Object.defineProperty({},"passive",{get:function(){return Pn=!0,!0}});window.addEventListener("test",Cr,Cr),window.removeEventListener("test",Cr,Cr)}catch{Pn=!1}var kt=Pn?{passive:!1}:!1,dh=function(e){return e.tagName==="TEXTAREA"},ha=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!dh(e)&&r[t]==="visible")},fh=function(e){return ha(e,"overflowY")},hh=function(e){return ha(e,"overflowX")},pa=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=va(e,r);if(n){var o=ma(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},ph=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},vh=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},va=function(e,t){return e==="v"?fh(t):hh(t)},ma=function(e,t){return e==="v"?ph(t):vh(t)},mh=function(e,t){return e==="h"&&t==="rtl"?-1:1},gh=function(e,t,r,n,o){var i=mh(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,c=t.contains(s),u=!1,f=a>0,l=0,p=0;do{var m=ma(e,s),g=m[0],v=m[1],y=m[2],x=v-y-i*g;(g||x)&&va(e,s)&&(l+=x,p+=g),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&(o&&l===0||!o&&a>l)||!f&&(o&&p===0||!o&&-a>p))&&(u=!0),u},Er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ga=function(e){return[e.deltaX,e.deltaY]},ba=function(e){return e&&"current"in e?e.current:e},bh=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yh=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},_h=0,$t=[];function wh(e){var t=L([]),r=L([0,0]),n=L(),o=K(_h++)[0],i=K(function(){return fa()})[0],a=L(e);V(function(){a.current=e},[e]),V(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=Uf([e.lockRef.current],(e.shards||[]).map(ba),!0).filter(Boolean);return v.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=be(function(v,y){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var x=Er(v),w=r.current,I="deltaX"in v?v.deltaX:w[0]-x[0],O="deltaY"in v?v.deltaY:w[1]-x[1],T,H=v.target,W=Math.abs(I)>Math.abs(O)?"h":"v";if("touches"in v&&W==="h"&&H.type==="range")return!1;var D=pa(W,H);if(!D)return!0;if(D?T=W:(T=W==="v"?"h":"v",D=pa(W,H)),!D)return!1;if(!n.current&&"changedTouches"in v&&(I||O)&&(n.current=T),!T)return!0;var F=n.current||T;return gh(F,y,v,F==="h"?I:O,!0)},[]),c=be(function(v){var y=v;if(!(!$t.length||$t[$t.length-1]!==i)){var x="deltaY"in y?ga(y):Er(y),w=t.current.filter(function(T){return T.name===y.type&&T.target===y.target&&bh(T.delta,x)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var I=(a.current.shards||[]).map(ba).filter(Boolean).filter(function(T){return T.contains(y.target)}),O=I.length>0?s(y,I[0]):!a.current.noIsolation;O&&y.cancelable&&y.preventDefault()}}},[]),u=be(function(v,y,x,w){var I={name:v,delta:y,target:x,should:w};t.current.push(I),setTimeout(function(){t.current=t.current.filter(function(O){return O!==I})},1)},[]),f=be(function(v){r.current=Er(v),n.current=void 0},[]),l=be(function(v){u(v.type,ga(v),v.target,s(v,e.lockRef.current))},[]),p=be(function(v){u(v.type,Er(v),v.target,s(v,e.lockRef.current))},[]);V(function(){return $t.push(i),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:p}),document.addEventListener("wheel",c,kt),document.addEventListener("touchmove",c,kt),document.addEventListener("touchstart",f,kt),function(){$t=$t.filter(function(v){return v!==i}),document.removeEventListener("wheel",c,kt),document.removeEventListener("touchmove",c,kt),document.removeEventListener("touchstart",f,kt)}},[]);var m=e.removeScrollBar,g=e.inert;return M(Y,null,g?M(i,{styles:yh(o)}):null,m?M(uh,{gapMode:"margin"}):null)}const xh=Jf(ua,wh);var ya=re(function(e,t){return M(Sr,Ee({},e,{ref:t,sideCar:xh}))});ya.classNames=Sr.classNames;const kh=ya;var $h=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},St=new WeakMap,Ir=new WeakMap,Tr={},Nn=0,_a=function(e){return e&&(e.host||_a(e.parentNode))},Sh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=_a(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ch=function(e,t,r,n){var o=Sh(t,Array.isArray(e)?e:[e]);Tr[r]||(Tr[r]=new WeakMap);var i=Tr[r],a=[],s=new Set,c=new Set(o),u=function(l){!l||s.has(l)||(s.add(l),u(l.parentNode))};o.forEach(u);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(p){if(s.has(p))f(p);else{var m=p.getAttribute(n),g=m!==null&&m!=="false",v=(St.get(p)||0)+1,y=(i.get(p)||0)+1;St.set(p,v),i.set(p,y),a.push(p),v===1&&g&&Ir.set(p,!0),y===1&&p.setAttribute(r,"true"),g||p.setAttribute(n,"true")}})};return f(t),s.clear(),Nn++,function(){a.forEach(function(l){var p=St.get(l)-1,m=i.get(l)-1;St.set(l,p),i.set(l,m),p||(Ir.has(l)||l.removeAttribute(n),Ir.delete(l)),m||l.removeAttribute(r)}),Nn--,Nn||(St=new WeakMap,St=new WeakMap,Ir=new WeakMap,Tr={})}},Eh=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||$h(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Ch(n,o,r,"aria-hidden")):function(){return null}};const wa="Dialog",[xa,tg]=mf(wa),[Ih,Ct]=xa(wa),Th=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=L(null),c=L(null),[u=!1,f]=_f({prop:n,defaultProp:o,onChange:i});return M(Ih,{scope:t,triggerRef:s,contentRef:c,contentId:wn(),titleId:wn(),descriptionId:wn(),open:u,onOpenChange:f,onOpenToggle:be(()=>f(l=>!l),[f]),modal:a},r)},Oh="DialogPortal",[rg,ka]=xa(Oh,{forceMount:void 0}),Mn="DialogOverlay",Ah=re((e,t)=>{const r=ka(Mn,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Ct(Mn,e.__scopeDialog);return i.modal?M(In,{present:n||i.open},M(Ph,he({},o,{ref:t}))):null}),Ph=re((e,t)=>{const{__scopeDialog:r,...n}=e,o=Ct(Mn,r);return M(kh,{as:xn,allowPinchZoom:!0,shards:[o.contentRef]},M($n.div,he({"data-state":Sa(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),zt="DialogContent",Nh=re((e,t)=>{const r=ka(zt,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Ct(zt,e.__scopeDialog);return M(In,{present:n||i.open},i.modal?M(Mh,he({},o,{ref:t})):M(Dh,he({},o,{ref:t})))}),Mh=re((e,t)=>{const r=Ct(zt,e.__scopeDialog),n=L(null),o=Bt(t,r.contentRef,n);return V(()=>{const i=n.current;if(i)return Eh(i)},[]),M($a,he({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:xt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:xt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:xt(e.onFocusOutside,i=>i.preventDefault())}))}),Dh=re((e,t)=>{const r=Ct(zt,e.__scopeDialog),n=L(!1),o=L(!1);return M($a,he({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),$a=re((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Ct(zt,r),c=L(null),u=Bt(t,c);return zf(),M(Y,null,M(Nf,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},M(Of,he({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Sa(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function Sa(e){return e?"open":"closed"}const Fh=Th,Lh=Ah,Rh=Nh;function Ca(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=Ca(e[t]))&&(n&&(n+=" "),n+=r);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function ot(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=Ca(e))&&(n&&(n+=" "),n+=t);return n}const Ea=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Ia=ot,Ut=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Ia(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:i}=t,a=Object.keys(o).map(u=>{const f=r==null?void 0:r[u],l=i==null?void 0:i[u];if(f===null)return null;const p=Ea(f)||Ea(l);return o[u][p]}),s=r&&Object.entries(r).reduce((u,f)=>{let[l,p]=f;return p===void 0||(u[l]=p),u},{}),c=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:l,className:p,...m}=f;return Object.entries(m).every(g=>{let[v,y]=g;return Array.isArray(y)?y.includes({...i,...s}[v]):{...i,...s}[v]===y})?[...u,l,p]:u},[]);return Ia(e,a,c,r==null?void 0:r.class,r==null?void 0:r.className)},me=Symbol.for("@ts-pattern/matcher"),Ta=Symbol.for("@ts-pattern/isVariadic"),Or="@ts-pattern/anonymous-select-key",Dn=e=>!!(e&&typeof e=="object"),Ar=e=>e&&!!e[me],ne=(e,t,r)=>{if(Ar(e)){const n=e[me](),{matched:o,selections:i}=n.match(t);return o&&i&&Object.keys(i).forEach(a=>r(a,i[a])),o}if(Dn(e)){if(!Dn(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],o=[],i=[];for(const a of e.keys()){const s=e[a];Ar(s)&&s[Ta]?i.push(s):i.length?o.push(s):n.push(s)}if(i.length){if(i.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+o.length)return!1;const a=t.slice(0,n.length),s=o.length===0?[]:t.slice(-o.length),c=t.slice(n.length,o.length===0?1/0:-o.length);return n.every((u,f)=>ne(u,a[f],r))&&o.every((u,f)=>ne(u,s[f],r))&&(i.length===0||ne(i[0],c,r))}return e.length===t.length&&e.every((a,s)=>ne(a,t[s],r))}return Object.keys(e).every(n=>{const o=e[n];return(n in t||Ar(i=o)&&i[me]().matcherType==="optional")&&ne(o,t[n],r);var i})}return Object.is(t,e)},ye=e=>{var t,r,n;return Dn(e)?Ar(e)?(t=(r=(n=e[me]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?Ht(e,ye):Ht(Object.values(e),ye):[]},Ht=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function jh(...e){if(e.length===1){const[t]=e;return r=>ne(t,r,()=>{})}if(e.length===2){const[t,r]=e;return ne(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ce(e){return Object.assign(e,{optional:()=>Ln(e),and:t=>G(e,t),or:t=>Oa(e,t),select:t=>t===void 0?qt(e):qt(t,e)})}function Fn(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Ta]:!0})}}))(e),{optional:()=>Fn(Ln(e)),select:t=>Fn(t===void 0?qt(e):qt(t,e))})}function Ln(e){return ce({[me]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return t===void 0?(ye(e).forEach(o=>n(o,void 0)),{matched:!0,selections:r}):{matched:ne(e,t,n),selections:r}},getSelectionKeys:()=>ye(e),matcherType:"optional"})})}const Vh=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},Bh=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function G(...e){return ce({[me]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return{matched:e.every(o=>ne(o,t,n)),selections:r}},getSelectionKeys:()=>Ht(e,ye),matcherType:"and"})})}function Oa(...e){return ce({[me]:()=>({match:t=>{let r={};const n=(o,i)=>{r[o]=i};return Ht(e,ye).forEach(o=>n(o,void 0)),{matched:e.some(o=>ne(o,t,n)),selections:r}},getSelectionKeys:()=>Ht(e,ye),matcherType:"or"})})}function j(e){return{[me]:()=>({match:t=>({matched:!!e(t)})})}}function qt(...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 ce({[me]:()=>({match:n=>{let o={[t??Or]:n};return{matched:r===void 0||ne(r,n,(i,a)=>{o[i]=a}),selections:o}},getSelectionKeys:()=>[t??Or].concat(r===void 0?[]:ye(r))})})}function Ie(e){return typeof e=="number"}function it(e){return typeof e=="string"}function We(e){return typeof e=="bigint"}const Aa=ce(j(function(e){return!0})),zh=Aa,at=e=>Object.assign(ce(e),{startsWith:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.startsWith(r)))));var r},endsWith:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.endsWith(r)))));var r},minLength:t=>at(G(e,(r=>j(n=>it(n)&&n.length>=r))(t))),maxLength:t=>at(G(e,(r=>j(n=>it(n)&&n.length<=r))(t))),includes:t=>{return at(G(e,(r=t,j(n=>it(n)&&n.includes(r)))));var r},regex:t=>{return at(G(e,(r=t,j(n=>it(n)&&!!n.match(r)))));var r}}),Uh=at(j(it)),Te=e=>Object.assign(ce(e),{between:(t,r)=>Te(G(e,((n,o)=>j(i=>Ie(i)&&n<=i&&o>=i))(t,r))),lt:t=>Te(G(e,(r=>j(n=>Ie(n)&&n<r))(t))),gt:t=>Te(G(e,(r=>j(n=>Ie(n)&&n>r))(t))),lte:t=>Te(G(e,(r=>j(n=>Ie(n)&&n<=r))(t))),gte:t=>Te(G(e,(r=>j(n=>Ie(n)&&n>=r))(t))),int:()=>Te(G(e,j(t=>Ie(t)&&Number.isInteger(t)))),finite:()=>Te(G(e,j(t=>Ie(t)&&Number.isFinite(t)))),positive:()=>Te(G(e,j(t=>Ie(t)&&t>0))),negative:()=>Te(G(e,j(t=>Ie(t)&&t<0)))}),Hh=Te(j(Ie)),Ke=e=>Object.assign(ce(e),{between:(t,r)=>Ke(G(e,((n,o)=>j(i=>We(i)&&n<=i&&o>=i))(t,r))),lt:t=>Ke(G(e,(r=>j(n=>We(n)&&n<r))(t))),gt:t=>Ke(G(e,(r=>j(n=>We(n)&&n>r))(t))),lte:t=>Ke(G(e,(r=>j(n=>We(n)&&n<=r))(t))),gte:t=>Ke(G(e,(r=>j(n=>We(n)&&n>=r))(t))),positive:()=>Ke(G(e,j(t=>We(t)&&t>0))),negative:()=>Ke(G(e,j(t=>We(t)&&t<0)))}),qh=Ke(j(We)),Wh=ce(j(function(e){return typeof e=="boolean"})),Kh=ce(j(function(e){return typeof e=="symbol"})),Gh=ce(j(function(e){return e==null}));var N={__proto__:null,matcher:me,optional:Ln,array:function(...e){return Fn({[me]:()=>({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 ye(r).forEach(i=>{n[i]=[]}),{matched:!0,selections:n};const o=(i,a)=>{n[i]=(n[i]||[]).concat([a])};return{matched:t.every(i=>ne(r,i,o)),selections:n}},getSelectionKeys:()=>e.length===0?[]:ye(e[0])})})},set:function(...e){return ce({[me]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};if(e.length===0)return{matched:!0};const n=(i,a)=>{r[i]=(r[i]||[]).concat([a])},o=e[0];return{matched:Vh(t,i=>ne(o,i,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:ye(e[0])})})},map:function(...e){return ce({[me]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(s,c)=>{r[s]=(r[s]||[]).concat([c])};if(e.length===0)return{matched:!0};var o;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(o=e[0])==null?void 0:o.toString()}`);const[i,a]=e;return{matched:Bh(t,(s,c)=>{const u=ne(i,c,n),f=ne(a,s,n);return u&&f}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...ye(e[0]),...ye(e[1])]})})},intersection:G,union:Oa,not:function(e){return ce({[me]:()=>({match:t=>({matched:!ne(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:j,select:qt,any:Aa,_:zh,string:Uh,number:Hh,bigint:qh,boolean:Wh,symbol:Kh,nullish:Gh,instanceOf:function(e){return ce(j(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ce(j(jh(e)))}};const Rn={matched:!1,value:void 0};function st(e){return new Pr(e,Rn)}class Pr{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let o;t.length===3&&typeof t[1]=="function"?o=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let i=!1,a={};const s=(u,f)=>{i=!0,a[u]=f},c=!n.some(u=>ne(u,this.input,s))||o&&!o(this.input)?Rn:{matched:!0,value:r(i?Or in a?a[Or]:a:this.input,this.input)};return new Pr(this.input,c)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new Pr(this.input,n?{matched:!0,value:r(this.input,this.input)}:Rn)}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 ng="";function Se(e,t){if(!e)throw new Error(t)}function Nr(){throw new Error("Cycle detected")}var Yh=Symbol.for("preact-signals");function jn(){if(Et>1)Et--;else{for(var e,t=!1;Wt!==void 0;){var r=Wt;for(Wt=void 0,Vn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&Na(r))try{r.c()}catch(o){t||(e=o,t=!0)}r=n}}if(Vn=0,Et--,t)throw e}}var X=void 0,Wt=void 0,Et=0,Vn=0,Mr=0;function Pa(e){if(X!==void 0){var t=e.n;if(t===void 0||t.t!==X)return t={i:0,S:e,p:X.s,n:void 0,t:X,e:void 0,x:void 0,r:t},X.s!==void 0&&(X.s.n=t),X.s=t,e.n=t,32&X.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=X.s,t.n=void 0,X.s.n=t,X.s=t),t}}function oe(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}oe.prototype.brand=Yh,oe.prototype.h=function(){return!0},oe.prototype.S=function(e){this.t!==e&&e.e===void 0&&(e.x=this.t,this.t!==void 0&&(this.t.e=e),this.t=e)},oe.prototype.U=function(e){if(this.t!==void 0){var t=e.e,r=e.x;t!==void 0&&(t.x=r,e.e=void 0),r!==void 0&&(r.e=t,e.x=void 0),e===this.t&&(this.t=r)}},oe.prototype.subscribe=function(e){var t=this;return zn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},oe.prototype.valueOf=function(){return this.value},oe.prototype.toString=function(){return this.value+""},oe.prototype.toJSON=function(){return this.value},oe.prototype.peek=function(){return this.v},Object.defineProperty(oe.prototype,"value",{get:function(){var e=Pa(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(X instanceof Ye&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Vn>100&&Nr(),this.v=e,this.i++,Mr++,Et++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{jn()}}}});function Ge(e){return new oe(e)}function Na(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 Ma(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 Da(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 Ye(e){oe.call(this,void 0),this.x=e,this.s=void 0,this.g=Mr-1,this.f=4}(Ye.prototype=new oe).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Mr))return!0;if(this.g=Mr,this.f|=1,this.i>0&&!Na(this))return this.f&=-2,!0;var e=X;try{Ma(this),X=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 X=e,Da(this),this.f&=-2,!0},Ye.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(var t=this.s;t!==void 0;t=t.n)t.S.S(t)}oe.prototype.S.call(this,e)},Ye.prototype.U=function(e){if(this.t!==void 0&&(oe.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(var t=this.s;t!==void 0;t=t.n)t.S.U(t)}},Ye.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ye.prototype.peek=function(){if(this.h()||Nr(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ye.prototype,"value",{get:function(){1&this.f&&Nr();var e=Pa(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function Xh(e){return new Ye(e)}function Fa(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Et++;var r=X;X=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Bn(e),n}finally{X=r,jn()}}}function Bn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Fa(e)}function Zh(e){if(X!==this)throw new Error("Out-of-order effect");Da(this),X=e,this.f&=-2,8&this.f&&Bn(this),jn()}function Kt(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}Kt.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()}},Kt.prototype.S=function(){1&this.f&&Nr(),this.f|=1,this.f&=-9,Fa(this),Ma(this),Et++;var e=X;return X=this,Zh.bind(this,e)},Kt.prototype.N=function(){2&this.f||(this.f|=2,this.o=Wt,Wt=this)},Kt.prototype.d=function(){this.f|=8,1&this.f||Bn(this)};function zn(e){var t=new Kt(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Un;function It(e,t){S[e]=t.bind(null,S[e]||function(){})}function Dr(e){Un&&Un(),Un=e&&e.S()}function La(e){var t=this,r=e.data,n=Qh(r);n.value=r;var o=ve(function(){for(var i=t.__v;i=i.__;)if(i.__c){i.__c.__$f|=4;break}return t.__$u.c=function(){var a;!Vo(o.peek())&&((a=t.base)==null?void 0:a.nodeType)===3?t.base.data=o.peek():(t.__$f|=1,t.setState({}))},Xh(function(){var a=n.value.value;return a===0?0:a===!0?"":a||""})},[]);return o.value}La.displayName="_st",Object.defineProperties(oe.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:La},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),It("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var o in n)if(o!=="children"){var i=n[o];i instanceof oe&&(r||(t.__np=r={}),r[o]=i,n[o]=i.peek())}}e(t)}),It("__r",function(e,t){Dr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(o){var i;return zn(function(){i=this}),i.c=function(){n.__$f|=1,n.setState({})},i}())),Dr(r),e(t)}),It("__e",function(e,t,r,n){Dr(),e(t,r,n)}),It("diffed",function(e,t){Dr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,o=t.props;if(n){var i=r.U;if(i)for(var a in i){var s=i[a];s!==void 0&&!(a in n)&&(s.d(),i[a]=void 0)}else r.U=i={};for(var c in n){var u=i[c],f=n[c];u===void 0?(u=Jh(r,c,f,o),i[c]=u):u.o(f,o)}}}e(t)});function Jh(e,t,r,n){var o=t in e&&e.ownerSVGElement===void 0,i=Ge(r);return{o:function(a,s){i.value=a,n=s},d:zn(function(){var a=i.value.value;n[t]!==a&&(n[t]=a,o?e[t]=a:a?e.setAttribute(t,a):e.removeAttribute(t))})}}It("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var o in n){var i=n[o];i&&i.d()}}}}else{var a=t.__c;if(a){var s=a.__$u;s&&(a.__$u=void 0,s.d())}}e(t)}),It("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),we.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var o in e)if(o!=="__source"&&e[o]!==this.props[o])return!0;for(var i in this.props)if(!(i in e))return!0;return!1};function Qh(e){return ve(function(){return Ge(e)},[])}const Hn=(e,t)=>t.some(r=>e instanceof r);let Ra,ja;function ep(){return Ra||(Ra=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function tp(){return ja||(ja=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const qn=new WeakMap,Wn=new WeakMap,Fr=new WeakMap;function rp(e){const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("success",i),e.removeEventListener("error",a)},i=()=>{r(ct(e.result)),o()},a=()=>{n(e.error),o()};e.addEventListener("success",i),e.addEventListener("error",a)});return Fr.set(t,e),t}function np(e){if(qn.has(e))return;const t=new Promise((r,n)=>{const o=()=>{e.removeEventListener("complete",i),e.removeEventListener("error",a),e.removeEventListener("abort",a)},i=()=>{r(),o()},a=()=>{n(e.error||new DOMException("AbortError","AbortError")),o()};e.addEventListener("complete",i),e.addEventListener("error",a),e.addEventListener("abort",a)});qn.set(e,t)}let Kn={get(e,t,r){if(e instanceof IDBTransaction){if(t==="done")return qn.get(e);if(t==="store")return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return ct(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 Va(e){Kn=e(Kn)}function op(e){return tp().includes(e)?function(...t){return e.apply(Gn(this),t),ct(this.request)}:function(...t){return ct(e.apply(Gn(this),t))}}function ip(e){return typeof e=="function"?op(e):(e instanceof IDBTransaction&&np(e),Hn(e,ep())?new Proxy(e,Kn):e)}function ct(e){if(e instanceof IDBRequest)return rp(e);if(Wn.has(e))return Wn.get(e);const t=ip(e);return t!==e&&(Wn.set(e,t),Fr.set(t,e)),t}const Gn=e=>Fr.get(e);function ap(e,t,{blocked:r,upgrade:n,blocking:o,terminated:i}={}){const a=indexedDB.open(e,t),s=ct(a);return n&&a.addEventListener("upgradeneeded",c=>{n(ct(a.result),c.oldVersion,c.newVersion,ct(a.transaction),c)}),r&&a.addEventListener("blocked",c=>r(c.oldVersion,c.newVersion,c)),s.then(c=>{i&&c.addEventListener("close",()=>i()),o&&c.addEventListener("versionchange",u=>o(u.oldVersion,u.newVersion,u))}).catch(()=>{}),s}const sp=["get","getKey","getAll","getAllKeys","count"],cp=["put","add","delete","clear"],Yn=new Map;function Ba(e,t){if(!(e instanceof IDBDatabase&&!(t in e)&&typeof t=="string"))return;if(Yn.get(t))return Yn.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,o=cp.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!(o||sp.includes(r)))return;const i=async function(a,...s){const c=this.transaction(a,o?"readwrite":"readonly");let u=c.store;return n&&(u=u.index(s.shift())),(await Promise.all([u[r](...s),o&&c.done]))[0]};return Yn.set(t,i),i}Va(e=>({...e,get:(t,r,n)=>Ba(t,r)||e.get(t,r,n),has:(t,r)=>!!Ba(t,r)||e.has(t,r)}));const lp=["continue","continuePrimaryKey","advance"],za={},Xn=new WeakMap,Ua=new WeakMap,up={get(e,t){if(!lp.includes(t))return e[t];let r=za[t];return r||(r=za[t]=function(...n){Xn.set(this,Ua.get(this)[t](...n))}),r}};async function*dp(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;t=t;const r=new Proxy(t,up);for(Ua.set(r,t),Fr.set(r,Gn(t));t;)yield r,t=await(Xn.get(r)||t.continue()),Xn.delete(r)}function Ha(e,t){return t===Symbol.asyncIterator&&Hn(e,[IDBIndex,IDBObjectStore,IDBCursor])||t==="iterate"&&Hn(e,[IDBIndex,IDBObjectStore])}Va(e=>({...e,get(t,r,n){return Ha(t,r)?dp:e.get(t,r,n)},has(t,r){return Ha(t,r)||e.has(t,r)}}));const Gt=e=>st(e).with(N.number.lte(1e3),()=>`${Math.round(e)}KB`).with(N.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),qa=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},fp=e=>Object.entries(e).reduce((r,[n,o])=>(r[n]=o.value,r),{}),Tt=e=>t=>t?t.type===e:!1;class Yt extends Error{constructor(){super("Aborted")}}function hp(e,t=300){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}}const Wa=e=>typeof e=="string",pp=()=>typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),Ka=()=>({messages:[],submissions:{},currentInput:null,nodeHistory:[],isFinished:!1,sequence:0,flowSessionId:pp()}),vp=e=>st(e).with({nativeEvent:{submitter:N.select(N.union(N.instanceOf(HTMLButtonElement),N.instanceOf(HTMLInputElement)))}},t=>t).otherwise(()=>{throw new Error("invalid submitter")}),Ga=typeof window>"u"?void 0:ap("inploi-chatbot",3,{upgrade(e){try{e.deleteObjectStore("state")}catch{}e.createObjectStore("state")}}),Xt={getStateData:async(e,t)=>{var n;const r=Ya({...e,flowKeys:t});return(n=await Ga)==null?void 0:n.get("state",r)},setStateData:hp(async e=>{var r;const t=Ya(e);return(r=await Ga)==null?void 0:r.put("state",e.data,t)},1e3)},Lr=(e,t,r,n=0)=>{if(!t.nextId)return r(t.id,{stepsMade:n,remainingSteps:0}),{stepsMade:n,remainingSteps:0};const o=e.find(u=>u.id===t.nextId);if(o===void 0)return{stepsMade:n,remainingSteps:0};const i=t.type==="if-block"?t.branchId:void 0,a=e.find(u=>u.id===i),s=t.type.includes("question")?1:0;if(a){const u=s+Math.max(Lr(e,o,r,n+s).remainingSteps,Lr(e,a,r,n+s).remainingSteps);return r(t.id,{stepsMade:n,remainingSteps:u}),{stepsMade:n,remainingSteps:u}}const c=s+Lr(e,o,r,n+s).remainingSteps;return r(t.id,{stepsMade:n,remainingSteps:c}),{stepsMade:n,remainingSteps:c}},mp=e=>{const t={},r=e.find(n=>n.isHead);return r&&Lr(e,r,(n,o)=>{t[n]=o}),t},Ya=e=>[...e.flowKeys,e.id,e.version].join("/"),Xe=Ge({state:"idle"}),Zt=e=>{const{state:t,flow:r}=Xe.value;if(t!=="loaded")return;Se(r,"No flow to update");const n=e(r.data);r.data=n,Xe.value={state:t,flow:r},Xt.setStateData(r)},P={current$:Xe,viewState$:Ge("closed"),inputHeight$:Ge(53),startFlow:async({flow:e,context:t={},flowKeys:r,title:n,analytics:o,job:i})=>{const s={data:await Xt.getStateData(e,r)??Ka(),startedAt:new Date,nodeIdToProgress:mp(e.nodes),flowKeys:r,id:e.id,version:e.version,nodes:e.nodes,build:e.build,context:t,title:n,analytics:o,job:i};Xe.value={state:"loaded",flow:s},Xt.setStateData(s)},cancelCurrentFlow:()=>{Xe.value={state:"idle"},P.viewState$.value="closed"},markAsFinished:()=>Zt(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Zt(t=>(t.nodeHistory.push(e),t)),restart:()=>{const{state:e,flow:t}=Xe.value;if(e!=="loaded")throw new Error("Flow cannot be restarted: not in valid state");const r=Ka();Xe.value={state:e,flow:{...t,data:r,startedAt:new Date}},Xt.setStateData(t)},addMessage:(e,t)=>{const r={...e,groupId:t};return Zt(n=>(n.messages.push(r),n))},removeMessagesSentByNodeIds:e=>{const{state:t,flow:r}=Xe.value;Se(t==="loaded","Application not loaded");const n=r.data.messages.filter(o=>!o.groupId||!e.includes(o.groupId));r.data.messages=n,Xt.setStateData(r)},setSubmission:(e,t)=>Zt(r=>(t===null?delete r.submissions[e]:r.submissions[e]=t,r)),setInput:e=>Zt(t=>({...t,currentInput:e??null}))};var gp=0;function d(e,t,r,n,o,i){var a,s,c={};for(s in t)s=="ref"?a=t[s]:c[s]=t[s];var u={type:e,props:c,key:r,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--gp,__source:o,__self:i};if(typeof e=="function"&&(a=e.defaultProps))for(s in a)c[s]===void 0&&(c[s]=a[s]);return S.vnode&&S.vnode(u),u}const bp=({message:e})=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:[d("svg",{class:"text-error-9 h-16 w-16",fill:"none",xmlns:"http://www.w3.org/2000/svg","stroke-width":"2",stroke:"currentColor","stroke-linecap":"round",viewBox:"0 0 96 96",children:[d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z",fill:"#fff"}),d("path",{d:"M48 79H19.9l-1.3-.3a3 3 0 0 1-1.3-1.3c-.1-.3-.2-.6-.2-1.3l-.1-2.5V48a31 31 0 1 1 31 31Z"}),d("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),d("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),d("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),d("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),d("path",{d:"M38 56h19"})]}),d("div",{class:"flex flex-col gap-2 text-center",children:[d("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&d("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Xa=e=>d("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[d("title",{children:"Loading"}),d("style",{children:"#s1{animation:3s linear infinite forwards s1__to}@keyframes s1__to{0%{transform:translate(12px,0)}66.666667%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,12px)}}#s2{animation:3s linear infinite forwards s2__ts}@keyframes s2__ts{0%{transform:scale(0,0)}70%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%{transform:scale(1,1)}}#s3{animation:3s linear infinite forwards s3__to}@keyframes s3__to{0%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,33.333333%{transform:translate(12px,24px)}}#s4{animation:3s linear infinite forwards s4__ts}@keyframes s4__ts{0%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}100%,30%{transform:scale(0,0)}}#s5{animation:3s linear infinite forwards s5__to}@keyframes s5__to{0%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}33.333333%{transform:translate(12px,12.045742px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%,66.666667%{transform:translate(12px,24px)}}#s6{animation:3s linear infinite forwards s6__ts}@keyframes s6__ts{0%,100%,63.333333%{transform:scale(0,0)}3.333333%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}33.333333%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}#s7{animation:3s linear infinite forwards s7__to}@keyframes s7__to{0%{transform:translate(12px,0)}33.333333%{transform:translate(12px,0);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}66.666667%{transform:translate(12px,12px);animation-timing-function:cubic-bezier(0.77,0,0.175,1)}100%{transform:translate(12px,24px)}}#s8{animation:3s linear infinite forwards s8__ts}@keyframes s8__ts{0%,100%,96.666667%{transform:scale(0,0)}36.666667%{transform:scale(0,0);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}66.666667%{transform:scale(1,1);animation-timing-function:cubic-bezier(0.86,0,0.07,1)}}"}),d("g",{id:"s1",transform:"translate(12,0)",children:d("g",{id:"s2",transform:"scale(0,0)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s3",transform:"translate(12,12)",children:d("g",{id:"s4",transform:"scale(1,1)",children:d("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),d("g",{id:"s5",transform:"translate(12,0)",children:d("g",{id:"s6",transform:"scale(0,0)",children:d("path",{d:"M6.5,13c3.5899,0,6.5-2.9101,6.5-6.5s-2.9101-6.5-6.5-6.5-6.5,2.91015-6.5,6.5s2.91015,6.5,6.5,6.5Zm0-4C7.88071,9,9,7.88071,9,6.5s-1.11929-2.5-2.5-2.5-2.5,1.11929-2.5,2.5s1.11929,2.5,2.5,2.5Z",transform:"translate(-6.5,-6.5)","clip-rule":"evenodd",fill:"currentColor","fill-rule":"evenodd"})})}),d("g",{id:"s7",transform:"translate(12,0)",children:d("g",{id:"s8",transform:"scale(0,0)",children:d("path",{d:"M0,6c0,3.58984,2.91016,6.5,6.5,6.5s6.5-2.91016,6.5-6.5h-4C9,7.38086,7.88086,8.5,6.5,8.5s-2.5-1.11914-2.5-2.5h-4Z",transform:"translate(-6.5,-9.25)",fill:"currentColor"})})})]}),Za=()=>d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(Xa,{class:"text-neutral-6 h-8 w-8"})}),yp=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)}%`},Rr=({class:e,children:t,...r})=>d("button",{class:ot("touch-hitbox text-interactive-copy hover:text-interactive-copy-hover active:text-interactive-copy-active hover:bg-interactive-bg-hover active:bg-interactive-bg-active fr relative rounded-full p-2 transition-all",e),...r,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round",xmlns:"http://www.w3.org/2000/svg",children:t})}),_p=()=>{if(P.current$.value.state!=="loaded")return null;const e=P.current$.value.flow.nodeIdToProgress,t=P.current$.value.flow.data.nodeHistory.at(-1);if(t===void 0)return null;const r=e[t];if(r===void 0)return null;const n=100*(r.stepsMade/(r.remainingSteps+r.stepsMade));return d("div",{class:"bg-accent-3",children:d("div",{style:{width:yp(n)},class:"bg-accent-9 ring-accent-6 relative h-[3px] rounded-full transition-all duration-1000"})})},wp=({children:e})=>{const t=P.viewState$;return d(Y,{children:d("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto items-center ring-1 backdrop-blur-md backdrop-saturate-150",children:[d("div",{class:"flex h-[var(--header-height)] gap-2",children:[d("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),d("button",{tabIndex:-1,onClick:()=>{t.value==="minimised"?t.value="maximised":t.value="minimised"},class:"view-switch h-full flex-grow overflow-hidden px-4 py-1",onTouchStart:Zn,children:d("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),d("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:t.value==="minimised"?d(Y,{children:[d(Rr,{class:"view-switch",onTouchStart:Zn,"aria-label":"Maximise job application",onClick:()=>t.value="maximised",children:d("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),d(Rr,{"aria-label":"Close application",onClick:P.cancelCurrentFlow,children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):d(Y,{children:[P.current$.value.state==="loaded"&&d(Rr,{"aria-label":"Restart",onClick:()=>{P.restart()},children:[d("path",{d:"M12 8.5C12 9.29113 11.7654 10.0645 11.3259 10.7223C10.8864 11.3801 10.2616 11.8928 9.53073 12.1955C8.79983 12.4983 7.99556 12.5775 7.21964 12.4231C6.44371 12.2688 5.73098 11.8878 5.17157 11.3284C4.61216 10.769 4.2312 10.0563 4.07686 9.28036C3.92252 8.50444 4.00173 7.70017 4.30448 6.96927C4.60723 6.23836 5.11992 5.61365 5.77772 5.17412C6.43552 4.7346 7.20887 4.5 8 4.5H9"}),d("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),d(Rr,{class:"view-switch",onTouchStart:Zn,"aria-label":"Minimise application",onClick:()=>t.value="minimised",children:d("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]}),d(_p,{})]})})};function Zn(){}const xp=gn(()=>Promise.resolve().then(()=>Hm).then(e=>e.ChatbotBody)),kp=Ut("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"}}}),$p=({logger:e,apiClient:t,analytics:r})=>{const{state:n,flow:o,error:i}=P.current$.value,a=P.viewState$.value,s=n!=="idle"&&a==="maximised",c=L(null);return d(Fh,{open:s,modal:s,children:[d(Lh,{class:"bg-overlay animate-fade-in pointer-events-none fixed inset-0 isolate"}),d(Rh,{forceMount:!0,asChild:!0,children:d("div",{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",class:kp({view:a}),children:d("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[d(wp,{children:o==null?void 0:o.title}),st({state:n,view:a}).with({view:"closed"},()=>null).with({view:"minimised"},()=>null).with({state:"idle"},()=>null).with({state:"loading"},()=>d(Za,{},"loading")).with({state:"loaded"},()=>d(yt,{fallback:d(Za,{},"loading"),children:d(xp,{analytics:r,apiClient:t,logger:e})})).with({state:"error"},()=>d(bp,{message:i})).exhaustive()]})})})]})},Ja=de({id:ni(se(),String),version:dn(),build:dn(),nodes:si(Dd()),context_schema:Vt(Fd(ui(se(),de({required:ci(),type:Vd([li("string"),li("number")])}))))}),Sp=de({flow:Ja}),Cp=de({company:de({name:se()}),flow:Ja,job:de({id:ni(se(),String),title:se()})}),Ep=`#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 .pointer-events-none{pointer-events:none}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .bottom-2\\.5{bottom:.625rem}#isdk .left-0{left:0}#isdk .left-2{left:.5rem}#isdk .right-0{right:0}#isdk .right-2{right:.5rem}#isdk .top-0{top:0}#isdk .isolate{isolation:isolate}#isdk .z-20{z-index:20}#isdk .m-0{margin:0}#isdk .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left:auto}#isdk .mt-auto{margin-top:auto}#isdk .block{display:block}#isdk .inline-block{display:inline-block}#isdk .inline{display:inline}#isdk .flex{display:flex}#isdk .inline-flex{display:inline-flex}#isdk .table{display:table}#isdk .table-row{display:table-row}#isdk .flow-root{display:flow-root}#isdk .grid{display:grid}#isdk .inline-grid{display:inline-grid}#isdk .contents{display:contents}#isdk .list-item{display:list-item}#isdk .\\!hidden{display:none!important}#isdk .hidden{display:none}#isdk .h-1{height:.25rem}#isdk .h-1\\.5{height:.375rem}#isdk .h-16{height:4rem}#isdk .h-4{height:1rem}#isdk .h-48{height:12rem}#isdk .h-8{height:2rem}#isdk .h-\\[3px\\]{height:3px}#isdk .h-\\[var\\(--content-height\\)\\]{height:var(--content-height)}#isdk .h-\\[var\\(--header-height\\)\\]{height:var(--header-height)}#isdk .h-full{height:100%}#isdk .max-h-full{max-height:100%}#isdk .min-h-\\[36px\\]{min-height:36px}#isdk .w-1{width:.25rem}#isdk .w-1\\.5{width:.375rem}#isdk .w-16{width:4rem}#isdk .w-24{width:6rem}#isdk .w-4{width:1rem}#isdk .w-8{width:2rem}#isdk .w-full{width:100%}#isdk .min-w-0{min-width:0px}#isdk .min-w-\\[2rem\\]{min-width:2rem}#isdk .max-w-\\[450px\\]{max-width:450px}#isdk .max-w-\\[min\\(100\\%\\,24rem\\)\\]{max-width:min(100%,24rem)}#isdk .max-w-full{max-width:100%}#isdk .flex-1{flex:1 1 0%}#isdk .flex-none{flex:none}#isdk .flex-shrink{flex-shrink:1}#isdk .flex-shrink-0{flex-shrink:0}#isdk .shrink{flex-shrink:1}#isdk .flex-grow,#isdk .grow{flex-grow:1}#isdk .border-collapse{border-collapse:collapse}#isdk .translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}#isdk .transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes bounce{0%,to{transform:translateY(-25%);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;animation-timing-function:cubic-bezier(0,0,.2,1)}}#isdk .animate-bounce{animation:bounce 1s infinite}@keyframes bubble-in{0%{transform:translateY(100%) scale(.8);opacity:0}to{transform:translateY(0) scale(1);opacity:1}}#isdk .animate-bubble-in{animation:bubble-in .3s cubic-bezier(.34,1.56,.64,1)}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#isdk .animate-fade-in{animation:fade-in .5s cubic-bezier(.16,1,.3,1) both}@keyframes maximise{0%{transform:translateY(50%) 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-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#isdk .bg-none{background-image:none}#isdk .p-1{padding:.25rem}#isdk .p-1\\.5{padding:.375rem}#isdk .p-2{padding:.5rem}#isdk .p-2\\.5{padding:.625rem}#isdk .p-4{padding:1rem}#isdk .px-1{padding-left:.25rem;padding-right:.25rem}#isdk .px-2{padding-left:.5rem;padding-right:.5rem}#isdk .px-2\\.5{padding-left:.625rem;padding-right:.625rem}#isdk .px-3{padding-left:.75rem;padding-right:.75rem}#isdk .px-4{padding-left:1rem;padding-right:1rem}#isdk .px-5{padding-left:1.25rem;padding-right:1.25rem}#isdk .py-0{padding-top:0;padding-bottom:0}#isdk .py-0\\.5{padding-top:.125rem;padding-bottom:.125rem}#isdk .py-1{padding-top:.25rem;padding-bottom:.25rem}#isdk .py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}#isdk .py-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-3{padding-top:.75rem;padding-bottom:.75rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-1{padding-left:.25rem}#isdk .pl-1\\.5{padding-left:.375rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-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))}
|
|
42
|
-
`,Qa="isdk",Ip={not_in_local_storage:"Application not found in local storage",invalid_end_node:"Unexpected node type to finish flow",no_submissions:"Application ended without any fields submitted",invalid_state:"Invalid state"},Tp=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Qa);if(e)return document.body.appendChild(e),e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Qa,t}});var Op=["1","2","3","4","5","6","7","8","9","10","11","12"],Ap={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]}},Pp=(e,t=1,r)=>n=>{const[o,i]=Ap[r][n];return"oklch("+o+"% "+i*t+" "+e+")"},Jn=e=>{const t=Pp(e.hue,e.chroma,e.mode);return Object.fromEntries(Op.map(r=>[e.prefix+r,e.transform(t(r))]))},Qn=e=>e,Np=e=>{const t=Object.keys(e).flatMap(r=>{const n=e[r];return typeof n=="object"&&n!==null?Object.keys(n).map(o=>{const i=n[o];return[`${String(r)}.${o}`,i]}):[[r,n]]});return Object.fromEntries(t)},jr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),eo=(e,...t)=>{if(!t.length)return e;const r=t.shift();if(jr(e)&&jr(r))for(const n in r){const o=r[n];if(jr(o)){e[n]||Object.assign(e,{[n]:{}});const i=e[n];jr(i)&&eo(i,o)}else Object.assign(e,{[n]:r[n]})}return eo(e,...t)},Mp=e=>{function t(r,n){const o=[e.prefix,n.toString().replace(/\./g,"-")].join("");return r==="declaration"?`--${o}`:`var(--${o})`}return t},Dp=()=>({core:e=>({semantic:t=>({component:r=>({from:n=>{const{theme:o,getToken:i}=n,a=p=>i("reference",p.toString()),s=e({theme:o}),c=t({theme:o,core:a,raw:{core:s}}),u=r({theme:o,core:a,semantic:a,raw:{core:s,semantic:c}}),f=Np(eo(s,c,u)),l=([p,m],g)=>{const v=[g,p].filter(Boolean).join(".");return typeof m=="object"?Object.entries(m).flatMap(y=>l(y,v)):[[n.getToken("declaration",v),m]]};return{values:f,declarations:Object.fromEntries(Object.entries(f).flatMap(p=>l(p))),ref:p=>i("reference",p.toString())}}})})})});const[to,ro,es]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],Fp=Dp().core(({theme:e})=>({color:{black:to,white:ro,lowest:e.mode==="light"?ro:to,highest:e.mode==="light"?to:ro,...Jn({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:Qn}),...Jn({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:Qn}),...Jn({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:Qn})},typography:{}})).semantic(({core:e,raw:t,theme:r})=>{const n=(o,i)=>t.core.color[o].replace(")",` / ${i})`);return{"font-family":{body:"inherit",headings:"inherit"},"font-style":{body:"normal",headings:"normal"},"font-weight-body":"normal","font-weight-headings":"normal","radius-app":"1.5rem","radius-interactive":"1.5rem",color:{divider:n("n-8",r.mode==="dark"?.4:.2)},"copy-body":e("color.n-12"),"copy-headings":e("color.n-12"),interactive:{copy:e("color.n-11"),"copy-hover":e("color.n-12"),"copy-active":e("color.n-12"),bg:es,"bg-hover":n("n-10",.4),"bg-active":n("n-10",.5)}}}).component(({raw:e,theme:t,semantic:r,core:n})=>{const o=(i,a)=>e.core.color[i].replace(")",` / ${a})`);return{app:{bg:n(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:o("black",.4)},bubble:{"weak-bg":n(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":r("color.divider"),"strong-shadow":o("a-9",.05)},"status-bar":{bg:o("n-2",.8),"bg-button":es,"bg-button-hover":o("n-10",.4),"bg-button-active":o("n-10",.5)},"submit-button":{"bg-active":n(t.mode==="dark"?"color.a-8":"color.a-11")}}}),Lp=Mp({prefix:"i-"}),Rp=e=>{const t=Fp.from({theme:e,getToken:Lp}),r=Object.entries(t.declarations).map(([n,o])=>`${n}: ${o};`);return`#isdk {
|
|
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}}const 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};var 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}const 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})}),{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} {
|
|
43
3
|
${r.concat(r).join(`
|
|
44
4
|
`)}
|
|
45
|
-
}`},ts=({context:e,schema:t,logger:r})=>{if(t)for(const n in t){const o=t[n];if(!o)continue;const i=Dt(e,n,null);if(o.required&&i===null){const a=`Configuration error in context: ${n} is required`;throw r.error(a),new Error(a)}switch(o.type){case"number":if(typeof i!="number")throw new Error(`Configuration error in context: ${n} is not a number`);break;case"string":if(typeof i!="string")throw new Error(`Configuration error in context: ${n} is not a string`);break;default:o.type}}},jp=({_internal_domManager:e=Tp(),theme:t})=>Qe(({apiClient:r,logger:n,analytics:o})=>{let i=!1;const a=()=>{if(typeof window>"u")return;const s=[M("style",{id:"inploi-chatbot-styles"},Ep),M("style",{id:"inploi-chatbot-theme"},Rp(t))],c=e.getOrCreateChatbotElement();gt(M(Y,{},[s,M($p,{apiClient:r,logger:n,analytics:o})]),c),i=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(i)return;a(),n.info("Chatbot plugin prepared")}catch(s){n.error("Error preparing chatbot plugin",s)}},fetchFlowByJobId:async(s,c)=>{const u=new URLSearchParams({id_type:(c==null?void 0:c.idType)==="inploi"?"internal":"external"});return r.fetch([`/flow/job/${s}`,u.toString()].filter(Boolean).join("?")).then(f=>{const l=hr(Cp,f);return{flow:l.flow,title:`Applying for “${l.job.title}”`,flowKeys:[l.job.id,...(c==null?void 0:c.flowKeys)??[]],job:{id:l.job.id,id_type:"external"},...c}})},fetchFlowById:async(s,c)=>r.fetch(`/flow/id/${s}`).then(u=>{var l;const f=hr(Sp,u);return{flow:f.flow,title:"Chatbot",flowKeys:(c==null?void 0:c.flowKeys)??[],...c,analytics:{customProperties:{flow_id:f.flow.id,flow_version:f.flow.version,...(l=c==null?void 0:c.analytics)==null?void 0:l.customProperties}}}}),open:async s=>{if(!(typeof window>"u"))try{P.cancelCurrentFlow(),P.viewState$.value="maximised",i||a(),s instanceof Promise?(P.current$.value={state:"loading"},s.then(async c=>{ts({context:c.context||{},schema:c.flow.context_schema,logger:n}),P.startFlow(c)}).catch(c=>{const u=c instanceof Error?c.message:"An error occurred";P.current$.value={state:"error",error:u}})):(ts({context:s.context||{},schema:s.flow.context_schema,logger:n}),P.startFlow(s))}catch(c){n.error("Error starting flow",c)}},close:async()=>{typeof window>"u"||(P.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=jp;const rs=({condition:e,context:t,submissions:r,ifBlock:n})=>{const[o,...i]=e.compareKey.split(".");if(!o)return!1;const a=os({context:t,key:o,path:i,submissions:r});if(!a)return!1;switch(a.type){case"address":{const s=Dt(a.value,i.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 a.value!="object"||Array.isArray(a.value))return!1;const s=Dt(a.value,i.join(".")),c={...n,data:{...n.data,compareKey:"_temp"}};switch(typeof s){case"boolean":return Jt(c,{submissions:{_temp:{value:s,type:"boolean"}},context:t});case"string":return Jt(c,{submissions:{_temp:{value:s,type:"string"}},context:t});case"number":return Jt(c,{submissions:{_temp:{value:s,type:"number"}},context:t});case"object":return Array.isArray(s)&&s.every(Wa)?Jt(c,{submissions:{_temp:{value:s,type:"enum"}},context:t}):!1}break}case"boolean":{const s=e.compareValue==="true";switch(e.compare){case"equals":return a.value===s;case"notEquals":return a.value!==s}break}case"phone":case"string":{const s=a.type==="phone"?Vr(a.value):a.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 a.value===s;case"notEquals":return a.value!==s;case"greaterThan":return a.value>s;case"greaterThanOrEqualTo":return a.value>=s;case"lessThan":return a.value<s;case"lessThanOrEqualTo":return a.value<=s}}catch{return console.error(`Failed to parse number in if-block ${n.id}`,a.value),!1}break}case"enum":switch(e.compare){case"equals":return a.value.length===1&&a.value[0]===e.compareValue;case"notEquals":return a.value.length===1&&a.value[0]!==e.compareValue;case"contains":return a.value.includes(e.compareValue);case"notContains":return!a.value.includes(e.compareValue)}break}},Jt=(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 i of n)if(rs({condition:i,context:t,submissions:r,ifBlock:e}))return!0;return!1}else{for(const i of n)if(!rs({condition:i,context:t,submissions:r,ifBlock:e}))return!1;return!0}},Vp=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g,Oe=(e,{context:t,submissions:r})=>e.replace(Vp,(n,o,i="")=>{const[a,...s]=o.trim().split("."),c=os({key:a,path:s,submissions:r,context:t});if(!c)return i;switch(c.type){case"boolean":return c.value===!0?"true":"false";case"file":return c.value.map(u=>`${u.name} (${Gt(u.sizeKb)})`).join(", ");case"enum":return c.value.join(", ");case"address":return Object.values(c.value).filter(u=>u&&u.trim().length>0).join(", ");case"number":case"string":return c.value?c.value.toString():i;case"phone":return Vr(c.value);case"integration":{if(typeof c.value!="object"||Array.isArray(c.value))break;const u=Dt(c.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(Wa))return u.join(", ")}break}}return i}),ns=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(o=>o.id===e.nextId):void 0;if(n)return ns({node:n,nodes:t,stopWhen:r})},Bp=({childNode:e,nodes:t})=>{const n=t.filter(o=>o.type==="if-block").find(o=>{if(!o.branchId)return!1;const i=t.find(s=>s.id===o.branchId);if(!i)return!1;const a=ns({node:i,nodes:t,stopWhen:s=>s.id===e.id});return!(!a||a.id!==e.id)});if(n!=null&&n.nextId)return t.find(o=>o.id===n.nextId)},zp=({flow:e,analytics:t,logger:r,context:n,apiClient:o,getSubmissions:i,chatService:a,onFlowEnd:s,onInterpret:c})=>{let u=new AbortController;const f={...t.service,log:p=>t.service.log({...p,customProperties:{...p.customProperties,...t.customProperties}})},l=async(p,m)=>{const g=i();c==null||c(p,m);try{await Up({flow:e,analytics:f,logger:r,apiClient:o,context:n,node:p,submissions:g,chat:{sendMessage:async v=>a.send({groupId:p.id,message:v,signal:u.signal}),userInput:async v=>a.input({input:v,signal:u.signal}),addToSubmissions:a.addToSubmissions},next:v=>{const y=v?e.nodes.find(x=>x.id===v):Bp({childNode:p,nodes:e.nodes});return y?l(y,p):s==null?void 0:s(p)},end:()=>s==null?void 0:s(p)})}catch(v){if(v instanceof Yt)return;throw v}};return{interpret:async p=>{const m=e.nodes.find(g=>g.id===p)??qa(e.nodes);return l(m)},undo:p=>{let m=1;const g=e.nodes.find(y=>y.id===p[p.length-1]);for(let y=p.length-2;y>0;y--){const x=p[y],w=e.nodes.find(I=>I.id===x);if(!w||(m++,w.type.startsWith("question-")))break}u.abort(),u=new AbortController;const v=e.nodes.find(y=>y.id===p[p.length-m]);return Se(v,"Undo failed: new start node not found"),l(v,g),{removed:m}},abort:()=>{u.abort()}}},Vr=e=>`+${e.countryCode} ${e.phoneNumber}`;async function Up(e){const t=e.node;switch(t.type){case"text":return Zp({...e,node:t});case"image":return Jp({...e,node:t});case"question-text":return Qp({...e,node:t});case"question-enum":return rv({...e,node:t});case"question-number":return ev({...e,node:t});case"question-phone":return tv({...e,node:t});case"question-boolean":return nv({...e,node:t});case"question-file":return iv({...e,node:t});case"question-address":return ov({...e,node:t});case"end-flow":return av({...e,node:t});case"if-block":return Xp({...e,node:t});case"jump":return Wp({...e,node:t});case"link":return Yp({...e,node:t});case"integration-application-submit":return Gp({...e,node:t});case"add-submission":return Kp({...e,node:t});case"integration-workflow-get":throw Error("Workflow should be unreachable");case"identify":return qp({...e,node:t});case"feedback":return Hp({...e,node:t});default:throw new Error(`Unknown node: ${JSON.stringify(t)}`)}}const Qt=(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 Hp({next:e,node:t}){e(t.nextId)}async function qp({next:e,node:t,analytics:r,submissions:n,logger:o}){if(!n)return e(t.nextId);try{r.log({event:"IDENTIFY",properties:{identifier:Qt(n,t.data.key).toString(),first_name:t.data.firstName?Qt(n,t.data.firstName).toString():void 0,last_name:t.data.lastName?Qt(n,t.data.lastName).toString():void 0,email:t.data.email?Qt(n,t.data.email).toString():void 0,phone_number:t.data.phoneNumber?Qt(n,t.data.phoneNumber).toString():void 0,custom_traits:t.data.customTraits?Object.fromEntries(t.data.customTraits.map(({key:i,value:a})=>{var s;return[i,(s=n[a])==null?void 0:s.value]})):void 0}})}catch(i){o.error(i)}finally{e(t.nextId)}}async function Wp({next:e,node:t}){e(t.data.targetId)}async function Kp({next:e,node:t,logger:r,submissions:n,context:o}){if(!n){r.error("Submissions not found");return}n[t.data.key]={type:"string",value:Oe(t.data.value,{submissions:n,context:o})},e(t.nextId)}async function Gp({chat:e,next:t,node:r,logger:n,apiClient:o,submissions:i,analytics:a,flow:s}){const c=async u=>{u!==!0&&await e.userInput({type:"submit",key:void 0,config:{label:r.data.submitLabel}}),await e.sendMessage({type:"loading"});const{anonymous_id:f,session_id:l}=a.getSessionInfo(),p=await o.fetch("/flow/submit",{method:"POST",body:JSON.stringify({log_submit:!1,integration_id:r.data.integrationId,anonymous_id:f,session_id:l,job:s.job,submissions:fp(i||{})})}).catch(m=>m);r.data.key&&e.addToSubmissions(r.data.key,{type:"integration",value:p}),st(p).with({integration_response:N.select(N.union({service:N.optional(N.string),status:N.number,data:N.any},{service:N.optional(N.string),status:N.number,error:{message:N.string,data:N.any}}))},m=>{a.log({event:"FLOW_SUBMIT",properties:{flow_id:s.id,flow_version:s.version,flow_session_id:s.data.flowSessionId,flow_build:s.build,service:m.service??"INVALID_SERVICE",response:{status:m.status,payload:"data"in m?m.data:m.error.data??null},job:s.job}})}).otherwise(()=>{}),await st(p).with(N.union({ats_data:N.select("redirect",{redirect_url:N.string,message:N.optional(N.union(N.string,N.nullish)),button_text:N.optional(N.union(N.string,N.nullish))})},{integration_response:{data:N.select("redirect",{redirect_url:N.string,message:N.optional(N.union(N.string,N.nullish)),button_text:N.optional(N.union(N.string,N.nullish))})}}),async m=>{if(m.redirect!==void 0){await e.sendMessage({type:"text",author:"bot",text:m.redirect.message??"Almost there! Please complete your submission here:"});try{const g=new URL(m.redirect.redirect_url);f&&!g.searchParams.has("anonymous_id")&&g.searchParams.set("anonymous_id",f),await e.sendMessage({type:"link",href:g.toString(),text:m.redirect.button_text??"Complete submission",onClick:()=>{if(!l){n.error("session_id not set, cannot log FLOW_REDIRECT event");return}a.log({event:"FLOW_REDIRECT",properties:{flow_build:s.build,flow_id:s.id,flow_session_id:l,flow_version:s.version,href:g.toString(),job:s.job}})}})}catch(g){n.error(`Invalid redirect URL: ${m.redirect.redirect_url}`,g),e.sendMessage({type:"system",variant:"error",text:"Couldn’t get the redirect URL."})}t(r.nextId)}}).with({success:!0},async()=>{r.data.skipConfirmation!==!0&&await e.sendMessage({type:"system",variant:"success",text:"Submission completed!"}),t(r.nextId)}).with(N.union({success:!1,ats_data:N.select("error",{message:N.string})},{integration_response:{error:N.select("error",{message:N.string})}}),async m=>{var g;n.error(m.error),await e.sendMessage({type:"system",variant:"error",text:((g=m.error)==null?void 0:g.message)||"Failed to submit"}),await c(!1)}).otherwise(async m=>{n.error(m),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit"}),await c(!1)})};await c(r.data.skipConfirmation)}async function Yp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({type:"link",href:Oe(r.data.href,{submissions:n,context:o}),text:Oe(r.data.cta,{submissions:n,context:o})}),t(r.nextId)}async function Xp({submissions:e,next:t,node:r,context:n}){t(Jt(r,{submissions:e,context:n})?r.branchId:r.nextId)}async function Zp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.text,{submissions:n,context:o})}),t(r.nextId)}async function Jp({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 Qp({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:n,context:o})});const i=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}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.type==="phone"?Vr(i.value):i.value}),t(r.nextId)}async function ev({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"number",config:{max:r.data.max,min:r.data.min,optional:r.data.optional,placeholder:r.data.placeholder,decimalCases:r.data.decimalCases}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value.toString()}),t(r.nextId)}async function tv({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:n,context:o})});const i=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}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.type==="phone"?Vr(i.value):i.value}),t(r.nextId)}async function rv({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(a=>i.value.includes(a.value)).map(a=>a.label).join(", ")}),t(r.nextId)}async function nv({chat:e,next:t,node:r,submissions:n,context:o}){await e.sendMessage({author:"bot",type:"text",text:Oe(r.data.question,{submissions:n,context:o})});const i=await e.userInput({key:r.data.key,type:"boolean",config:{optional:r.data.optional,labels:{true:r.data.trueLabel,false:r.data.falseLabel}}});i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value===!0?r.data.trueLabel:r.data.falseLabel}),t(r.nextId)}async function ov({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({type:"address",key:r.data.key,config:{optional:r.data.optional,keys:r.data.keys,placeholder:r.data.placeholder}});if(n===null)await e.sendMessage({type:"system",variant:"info",text:"Skipped"});else{const o=Object.values(n.value).filter(i=>i&&i.trim().length>0).join(", ");await e.sendMessage({author:"user",type:"text",text:o})}return t(r.nextId)}async function iv({node:e,chat:t,next:r,submissions:n,context:o}){await t.sendMessage({author:"bot",type:"text",text:Oe(e.data.question,{submissions:n,context:o})});const i=await t.userInput({key:e.data.key,type:"file",config:{optional:e.data.optional,extensions:e.data.extensions,fileSizeLimitKib:e.data.maxSizeKb??10*1024,allowMultiple:e.data.multiple===!0}});if(i===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const a of i.value)await t.sendMessage({author:"user",type:"file",fileName:a.name,fileSizeKb:a.sizeKb});r(e.nextId)}async function av({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const os=({key:e,path:t,submissions:r,context:n})=>{if(e==="$context"){if(!t)return;const o=Dt(n,t.join("."));switch(typeof o){case"string":return{type:"string",value:o};case"number":return{type:"number",value:o};case"boolean":return{type:"boolean",value:o};default:console.warn(`Unexpected type for $context.${t.join(".")}`,o);return}}return r==null?void 0:r[e]};function no(e,t,r){var n,o,i,a,s;t==null&&(t=100);function c(){var f=Date.now()-a;f<t&&f>=0?n=setTimeout(c,t-f):(n=null,r||(s=e.apply(i,o),i=o=null))}var u=function(){i=this,o=arguments,a=Date.now();var f=r&&!n;return n||(n=setTimeout(c,t)),f&&(s=e.apply(i,o),i=o=null),s};return u.clear=function(){n&&(clearTimeout(n),n=null)},u.flush=function(){n&&(s=e.apply(i,o),i=o=null,clearTimeout(n),n=null)},u}no.debounce=no;var sv=no;const is=Ne(sv);function cv(e){let{debounce:t,scroll:r,polyfill:n,offsetSize:o}=e===void 0?{debounce:0,scroll:!1,offsetSize:!1}:e;const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=K({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=L({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),u=t?typeof t=="number"?t:t.scroll:null,f=t?typeof t=="number"?t:t.resize:null,l=L(!1);V(()=>(l.current=!0,()=>void(l.current=!1)));const[p,m,g]=ve(()=>{const w=()=>{if(!c.current.element)return;const{left:I,top:O,width:T,height:H,bottom:W,right:D,x:F,y:ae}=c.current.element.getBoundingClientRect(),te={left:I,top:O,width:T,height:H,bottom:W,right:D,x:F,y:ae};c.current.element instanceof HTMLElement&&o&&(te.height=c.current.element.offsetHeight,te.width=c.current.element.offsetWidth),Object.freeze(te),l.current&&!fv(c.current.lastBounds,te)&&s(c.current.lastBounds=te)};return[w,f?is(w,f):w,u?is(w,u):w]},[s,o,u,f]);function v(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(w=>w.removeEventListener("scroll",g,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function y(){c.current.element&&(c.current.resizeObserver=new i(g),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach(w=>w.addEventListener("scroll",g,{capture:!0,passive:!0})))}const x=w=>{!w||w===c.current.element||(v(),c.current.element=w,c.current.scrollContainers=as(w),y())};return uv(g,!!r),lv(m),V(()=>{v(),y()},[r,g,m]),V(()=>v,[]),[x,a,p]}function lv(e){V(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function uv(e,t){V(()=>{if(t){const r=e;return window.addEventListener("scroll",r,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",r,!0)}},[e,t])}function as(e){const t=[];if(!e||e===document.body)return t;const{overflow:r,overflowX:n,overflowY:o}=window.getComputedStyle(e);return[r,n,o].some(i=>i==="auto"||i==="scroll")&&t.push(e),[...t,...as(e.parentElement)]}const dv=["x","y","top","bottom","left","right","width","height"],fv=(e,t)=>dv.every(r=>e[r]===t[r]),lt=({class:e,...t})=>d("button",{class:ot("bg-accent-9 active:bg-accent-10 pointer-coarse:touch-hitbox fr flex-shrink-0 rounded-full p-2 text-white transition-all disabled:cursor-not-allowed disabled:opacity-50",e),type:"submit",...t,children:d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[d("title",{children:"Send"}),d("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),d("path",{d:"M8 4V13"})]})}),hv=25,oo=Ge({instant:()=>{},smooth:()=>{}}),le={onSubmitSuccessFn$:Ge(()=>{}),isBotTyping$:Ge(!1),scrollToEnd:{instant:()=>oo.value.instant(),smooth:()=>oo.value.smooth()}},pv=()=>{const e=L(null);pe(()=>{oo.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=ve(()=>({addToSubmissions:(n,o)=>P.setSubmission(n,o),send:async({message:n,signal:o,groupId:i})=>{if(await st(n).with({author:"bot",type:"text"},async a=>{if(o!=null&&o.aborted)throw new Yt;le.isBotTyping$.value=!0;const s=Math.min(Math.max(20,a.text.length),100)*hv;await new Promise(c=>setTimeout(c,s,{signal:o})),le.isBotTyping$.value=!1}).otherwise(async()=>{}),o!=null&&o.aborted)throw new Yt;P.addMessage(n,i)},input:({input:n,signal:o})=>{if(o!=null&&o.aborted)throw new Yt;return P.setInput(n),new Promise(i=>{const a=s=>{if(o!=null&&o.aborted)throw new Yt;P.setInput(void 0),n.key&&P.setSubmission(n.key,s),i(s)};le.onSubmitSuccessFn$.value=a})}}),[]);return{chatRef:e,chatService:t}},Ot=({error:e})=>!e||!e.message?null:d("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[d("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),d("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),d("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),d("p",{class:"truncate pr-1 text-sm",children:e.message})]}),ut=({class:e,...t})=>d("button",{type:"button",class:ot("fr text-neutral-9 flex h-full flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[d("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[d("title",{children:"Skip"}),d("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),d("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),io={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"},er=Ut("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}}),vv="https://api.mapbox.com/search/searchbox/v1/suggest",mv="ZzRDWFU0dTZ3SF9aWk9RNGl6QzZaWS5RZmlFak13a0hPbGxXZXlNSGN5RUhObUJ6TXpSV08yUW5OdE5tSTZJU1lpd2lJb1JYYXRObmJ2Tm5iaGhHZWx4V1lpb2pJMUp5ZS5rcA==",gv=e=>atob(e).split("").reverse().join(""),je=de({name:se()}),bv=de({suggestions:si(de({full_address:Vt(se()),place_formatted:Vt(se()),name:Vt(se()),mapbox_id:se(),context:zd(de({address:je,street:je,neighborhood:je,locality:je,district:je,place:je,region:je,postcode:je,country:je}))}))}),yv=({logger:e})=>ve(()=>{var r;const t=(r=P.current$.peek().flow)==null?void 0:r.data.flowSessionId;return t?{enabled:!0,getPredictions:async n=>{const o=new URL(vv);o.searchParams.set("q",n),o.searchParams.set("session_token",t),o.searchParams.set("access_token",gv(mv));const i=await fetch(o);if(!i.ok)return e.error("Failed to get address details",i),{ok:!1,error:"Something went wrong! Plase continue manually."};const a=Ud(bv,await i.json());if(a.success===!1)return e.error("Failed to parse address details",a.issues),{ok:!1,error:"Something went wrong! Plase continue manually."};const{suggestions:s}=a.output;return{ok:!0,data:s.map(c=>{var u,f,l,p,m,g,v,y,x;return{label:c.full_address??c.place_formatted??c.name??c.mapbox_id,id:c.mapbox_id,address:{line1:((u=c.context.address)==null?void 0:u.name)??((f=c.context.street)==null?void 0:f.name),line2:void 0,line3:((l=c.context.neighborhood)==null?void 0:l.name)??((p=c.context.locality)==null?void 0:p.name),city:((m=c.context.place)==null?void 0:m.name)??((g=c.context.district)==null?void 0:g.name),state:(v=c.context.region)==null?void 0:v.name,postcode:(y=c.context.postcode)==null?void 0:y.name,country:(x=c.context.country)==null?void 0:x.name}}})}}}:{enabled:!1}},[e]),ss=e=>d("button",{type:"button",class:"text-neutral-10 hover:bg-neutral-4 hover:text-neutral-12 hover:border-neutral-5 flex items-center gap-1 rounded-[18px] border border-solid border-transparent px-3 py-1 pl-1.5 text-sm transition-colors",...e,children:[d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M10 3L5 8L10 13"})}),d("span",{children:"Back"})]}),Br={label:"Fill in manually",value:""},_v=({input:e,onSubmitSuccess:t,logger:r})=>{const[n,o]=K(),[i,a]=K([]),{enabled:s,getPredictions:c}=yv({logger:r}),[u,f]=K(s?"query":"manual"),[l,p]=K(""),[m,g]=K(),v=y=>{Se(s,"Query state should not be enabled"),y=y.trim(),y!==(l==null?void 0:l.trim())&&(p(y),y===""&&a([]),g(void 0),c(y).then(x=>{if(x.ok===!1){a([]),g(x.error);return}a(x.data)}))};switch(u){case"query":return Se(s,"Query state should not be enabled"),d(wv,{input:e,onSkip:()=>t(null),onAddressSelect:y=>{if(y===Br.value){o(void 0),f("manual");return}const x=i.find(w=>w.id===y);x&&(o(x.address),f("details"))},onAddressSearch:y=>{v(y)},suggestions:i,query:l,error:m});case"details":return Se(n!==void 0),d(ls,{input:e,logger:r,onSubmitSuccess:t,addressFields:n,actions:d(ss,{onClick:()=>{f("query")}})});case"manual":return d(ls,{logger:r,input:e,onSubmitSuccess:t,addressFields:{},actions:s?d(ss,{onClick:()=>{f("query")}}):void 0})}},wv=({input:e,onSkip:t,suggestions:r,onAddressSelect:n,query:o,onAddressSearch:i,error:a})=>{const s=L(null);return pe(()=>{s.current&&(s.current.focus(),s.current.select())},[]),d(Y,{children:[d("form",{noValidate:!0,onSubmit:c=>{c.preventDefault();const f=new FormData(c.currentTarget).get("address");typeof f=="string"&&i(f)},class:"flex gap-1 p-2.5",children:[d("div",{class:"group relative flex-1",children:[d("input",{ref:s,name:"address",id:"chat-address",autocomplete:"address-line1 country-name postal-code",autoFocus:!0,placeholder:e.config.placeholder||"Type and search for places...",defaultValue:o,class:er({optional:!!e.config.optional,className:"w-full rounded-full"})}),d("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:d("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("g",{id:"inploi",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round",strokeWidth:"1.5",children:[d("circle",{cx:"7",cy:"7",r:"4"}),d("path",{d:"M10 10L13 13"})]}),d("span",{class:"sr-only",children:"Search"})]})})]}),e.config.optional&&d(ut,{class:"",onClick:t})]}),a?d(Ot,{error:{message:a}}):null,d("ul",{children:[r.map(c=>d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(c.id)},children:[d("span",{class:"flex-grow",children:c.label}),d("svg",{class:"flex-none",width:"16",height:"16",viewBox:"0 0 16 16",stroke:"currentColor","stroke-width":"1.5",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M6 3L11 8L6 13"})})]})},c.id)),d("li",{children:d("button",{class:"text-neutral-11 fr hover:bg-neutral-3 focus-visible:bg-neutral-3 hover:text-neutral-12 border-b-neutral-3 flex w-full items-center border border-b border-solid border-transparent px-4 py-3 text-sm transition-colors duration-100",onClick:()=>{n(Br.value)},children:d("span",{class:"flex-grow",children:Br.label})})},Br.label)]})]})},xv={line1:"Line 1",line2:"Line 2",line3:"Line 3",city:"City",state:"State",postcode:"Postcode",country:"Country"},cs=["line1","line2","line3","city","state","postcode","country"],ls=({addressFields:e,onSubmitSuccess:t,actions:r,input:n})=>{const o=L(null);pe(()=>{if(o.current){const a=o.current.querySelector("input");a&&(a.focus(),a.select())}},[]);const i=Object.keys(io);return d("form",{class:"bg-neutral-1/90 flex flex-col justify-end gap-2 p-2",onSubmit:a=>{const s=new FormData(a.currentTarget),c=Object.fromEntries(s.entries());t({type:"address",value:c})},children:[d("div",{class:"bg-neutral-3 border-neutral-5 grid items-center gap-1.5 rounded-2xl border pb-2 pl-4 pr-3 pt-3 [grid-template-columns:min-content_1fr]",ref:o,children:cs.map((a,s)=>{const c=`isdk_${a}`,u=n.config.keys[a];return u?d(Y,{children:[d("label",{for:c,class:"text-neutral-9 [&:has(+*>input:focus)]:text-neutral-11 w-24 pb-2 text-xs uppercase leading-3 tracking-widest transition-colors",children:xv[a]}),d("div",{class:"flex flex-col items-stretch gap-1.5",children:[a==="country"?d("div",{class:"relative",children:[d("select",{class:"text-neutral-12 hover:bg-neutral-4 placeholder:text-neutral-8 focus:bg-neutral-5 w-full flex-1 appearance-none rounded-lg border-solid bg-transparent bg-none px-3 py-1.5 text-base transition-colors focus:outline-none",name:u,id:c,defaultValue:e[a],required:!0,children:[e.country&&!i.includes(e.country)?d("option",{value:e[a],children:e[a]}):d("option",{value:"",children:"Select a country"}),i.map(f=>d("option",{value:f,children:f},f))]}),d("svg",{class:"text-neutral-12 absolute bottom-2.5 right-2 flex items-center justify-center",width:"16",height:"16",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M4 6.5L8 10.5L12 6.5"})})]}):d("input",{autoFocus: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:c,defaultValue:e[a],required:!0}),s===cs.length-1?d("hr",{class:"m-0 w-full border-b border-b-transparent"}):d("hr",{class:"border-b-neutral-5 m-0 w-full border-b border-solid"})]})]}):null})}),d("div",{class:"flex w-full flex-1 ",children:[d("div",{class:"flex-grow",children:r}),d(lt,{class:"flex items-center justify-center"})]})]})},ao=()=>{const e=L(null);return V(()=>{var t;(t=e.current)==null||t.focus()},[]),e},us=["true","false"],kv=Ld(us),$v="answer",ds="flex items-center gap-2 p-2.5",fs=re(({label:e,...t},r)=>d("button",{class:"bg-lowest ease-expo-out ring-divider text-neutral-12 active:ring-accent-7 active:bg-accent-2 active:text-accent-11 fr block w-full overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",...t,ref:r,children:d("p",{class:"truncate text-center text-base",children:e})})),Sv=({input:e,onSubmitSuccess:t})=>{const r=ao();return d("form",{noValidate:!0,class:"",onSubmit:n=>{n.preventDefault();const o=vp(n).value,i=hr(kv,o);t({type:"boolean",value:i==="true"})},children:[d("ul",{class:ds,children:us.map((n,o)=>d("li",{class:"flex-1",children:d(fs,{ref:o===0?r:null,type:"submit",name:$v,value:n,label:e.config.labels[n]},n)}))}),e.config.optional&&d("div",{class:"px-2 pb-2",children:d(ut,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},Cv=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}),Ev=e=>e.reduce((t,r)=>t+r.sizeKb,0),Iv=Tt("file"),hs=3,Tv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),o=e.name.replace(new RegExp(`.${n}$`),"");return d("div",{class:ot("bg-accent-1 outline-accent-4 flex max-w-full gap-2 overflow-hidden rounded-lg px-3 py-2 text-sm outline",t),...r,children:[d("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[d("span",{class:"block truncate",children:o}),d("span",{children:[".",n]})]}),d("p",{"aria-label":"File size",class:"text-accent-11",children:Gt(e.sizeKb)})]})},ps=({class:e,...t})=>d("li",{class:ot("outline-neutral-6 text-neutral-11 bg-neutral-1 block rounded-md px-1 py-0.5 text-xs outline outline-1",e),...t}),vs=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Ov=({allowedExtensions:e,files:t})=>{const r=e.map(n=>n.toLowerCase());return t.every(n=>r.includes(vs(n.name).toLowerCase()))},Av=(e,t)=>{const r=vs(e);return`${e.replace(new RegExp(`${r}$`),"").slice(0,t)}${r}`},Pv=({input:e,onSubmitSuccess:t})=>{var f;const r=(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key],[n,o]=K(Iv(r)?r.value:[]),[i,a]=K(),s=n.length-hs,c=Ev(n),u=ao();return d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:l=>(l.preventDefault(),a(void 0),n.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!Ov({allowedExtensions:e.config.extensions,files:n})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&c>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${Gt(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&n.length>1?a({type:"invalid",message:"Only one file is allowed"}):t({type:"file",value:n})),children:[d("div",{class:"flex items-center gap-2",children:[d("label",{ref:u,for:"dropzone-file",class:"border-neutral-8 bg-neutral-2 flex h-48 w-full cursor-pointer flex-col items-center justify-center overflow-hidden rounded-2xl border border-dashed p-4",children:[n.length>0?d(Y,{children:[d("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[n.slice(0,hs).map(l=>{const p=l.name.split(".").pop(),m=l.name.replace(new RegExp(`.${p}$`),"");return d(ps,{class:"flex overflow-hidden",children:[d("span",{class:"block truncate",children:m}),d("span",{children:[".",p]})]})}),s>0?d(ps,{children:["+",s," file",s!==1?"s":""]}):null]}),d("p",{class:"text-neutral-11 text-xs",children:[Gt(c)," ",n.length>1?"total":""]})]}):d("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[d("header",{class:"flex flex-col items-center gap-0",children:[d("svg",{class:"text-neutral-11 mb-1 h-8 w-8","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 16",children:d("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.5",d:"M13 13h3a3 3 0 0 0 0-6h-.025A5.56 5.56 0 0 0 16 6.5 5.5 5.5 0 0 0 5.207 5.021C5.137 5.017 5.071 5 5 5a4 4 0 0 0 0 8h2.167M10 15V6m0 0L8 8m2-2 2 2"})}),d("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?d("p",{class:"text-neutral-10 text-xs",children:["(max ",Gt(e.config.fileSizeLimitKib),")"]}):null]}),d("aside",{class:"flex flex-col items-center gap-2",children:[d("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),d("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(l=>d("li",{class:"ring-lowest outline-neutral-6 text-neutral-9 bg-neutral-1 rounded-md px-1 py-0.5 text-[11px] uppercase tracking-wide outline outline-1 ring-2",children:l.replace(".","")}))})]})]}),d("input",{id:"dropzone-file",onInput:async l=>{Se(l.target instanceof HTMLInputElement);const p=l.target.files?Array.from(l.target.files):[],m=await Promise.allSettled(p.map(async v=>{const y=await Cv(v);return{name:Av(v.name,42),data:y,sizeKb:v.size/1e3}}));if(m.some(({status:v})=>v==="rejected"))return a({type:"invalid",message:"Invalid file"});const g=m.map(v=>v.status==="fulfilled"?v.value:null).filter(Boolean);o(g)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),d("div",{class:"flex h-full flex-col items-center gap-2",children:[d(lt,{disabled:n.length===0}),e.config.optional&&d(ut,{onClick:()=>t(null)})]})]}),d(Ot,{error:i})]})};var tr=e=>e.type==="checkbox",At=e=>e instanceof Date,fe=e=>e==null;const ms=e=>typeof e=="object";var ee=e=>!fe(e)&&!Array.isArray(e)&&ms(e)&&!At(e),Nv=e=>ee(e)&&e.target?tr(e.target)?e.target.checked:e.target.value:e,Mv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Dv=(e,t)=>e.has(Mv(t)),Fv=e=>{const t=e.constructor&&e.constructor.prototype;return ee(t)&&t.hasOwnProperty("isPrototypeOf")},so=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ve(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(!(so&&(e instanceof Blob||e instanceof FileList))&&(r||ee(e)))if(t=r?[]:{},!r&&!Fv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=Ve(e[n]));else return e;return t}var rr=e=>Array.isArray(e)?e.filter(Boolean):[],Z=e=>e===void 0,C=(e,t,r)=>{if(!t||!ee(e))return r;const n=rr(t.split(/[,[\].]+?/)).reduce((o,i)=>fe(o)?o:o[i],e);return Z(n)||n===e?Z(e[t])?r:e[t]:n},Ze=e=>typeof e=="boolean";const gs={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ce={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Be={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};$e.createContext(null);var Lv=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(o,i,{get:()=>{const a=i;return t._proxyFormState[a]!==Ce.all&&(t._proxyFormState[a]=!n||Ce.all),r&&(r[a]=!0),e[a]}});return o},xe=e=>ee(e)&&!Object.keys(e).length,Rv=(e,t,r,n)=>{r(e);const{name:o,...i}=e;return xe(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(a=>t[a]===(!n||Ce.all))},co=e=>Array.isArray(e)?e:[e];function jv(e){const t=$e.useRef(e);t.current=e,$e.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ae=e=>typeof e=="string",Vv=(e,t,r,n,o)=>Ae(e)?(n&&t.watch.add(e),C(r,e,o)):Array.isArray(e)?e.map(i=>(n&&t.watch.add(i),C(r,i))):(n&&(t.watchAll=!0),r),lo=e=>/^\w*$/.test(e),bs=e=>rr(e.replace(/["|']|\]/g,"").split(/\.|\[/));function U(e,t,r){let n=-1;const o=lo(t)?[t]:bs(t),i=o.length,a=i-1;for(;++n<i;){const s=o[n];let c=r;if(n!==a){const u=e[s];c=ee(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}e[s]=c,e=e[s]}return e}var ys=(e,t,r,n,o)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:o||!0}}:{},_s=e=>({isOnSubmit:!e||e===Ce.onSubmit,isOnBlur:e===Ce.onBlur,isOnChange:e===Ce.onChange,isOnAll:e===Ce.all,isOnTouch:e===Ce.onTouched}),ws=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const zr=(e,t,r,n)=>{for(const o of r||Object.keys(e)){const i=C(e,o);if(i){const{_f:a,...s}=i;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],o)&&!n)break;if(a.ref&&t(a.ref,a.name)&&!n)break}else ee(s)&&zr(s,t)}}};var Bv=(e,t,r)=>{const n=rr(C(e,r));return U(n,"root",t[r]),U(e,r,n),e},uo=e=>e.type==="file",Je=e=>typeof e=="function",Ur=e=>{if(!so)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Hr=e=>Ae(e),fo=e=>e.type==="radio",qr=e=>e instanceof RegExp;const xs={value:!1,isValid:!1},ks={value:!0,isValid:!0};var $s=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&&!Z(e[0].attributes.value)?Z(e[0].value)||e[0].value===""?ks:{value:e[0].value,isValid:!0}:ks:xs}return xs};const Ss={isValid:!1,value:null};var Cs=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,Ss):Ss;function Es(e,t,r="validate"){if(Hr(e)||Array.isArray(e)&&e.every(Hr)||Ze(e)&&!e)return{type:r,message:Hr(e)?e:"",ref:t}}var Pt=e=>ee(e)&&!qr(e)?e:{value:e,message:""},Is=async(e,t,r,n,o)=>{const{ref:i,refs:a,required:s,maxLength:c,minLength:u,min:f,max:l,pattern:p,validate:m,name:g,valueAsNumber:v,mount:y,disabled:x}=e._f,w=C(t,g);if(!y||x)return{};const I=a?a[0]:i,O=B=>{n&&I.reportValidity&&(I.setCustomValidity(Ze(B)?"":B||""),I.reportValidity())},T={},H=fo(i),W=tr(i),D=H||W,F=(v||uo(i))&&Z(i.value)&&Z(w)||Ur(i)&&i.value===""||w===""||Array.isArray(w)&&!w.length,ae=ys.bind(null,g,r,T),te=(B,R,J,ge=Be.maxLength,ke=Be.minLength)=>{const Pe=B?R:J;T[g]={type:B?ge:ke,message:Pe,ref:i,...ae(B?ge:ke,Pe)}};if(o?!Array.isArray(w)||!w.length:s&&(!D&&(F||fe(w))||Ze(w)&&!w||W&&!$s(a).isValid||H&&!Cs(a).isValid)){const{value:B,message:R}=Hr(s)?{value:!!s,message:s}:Pt(s);if(B&&(T[g]={type:Be.required,message:R,ref:I,...ae(Be.required,R)},!r))return O(R),T}if(!F&&(!fe(f)||!fe(l))){let B,R;const J=Pt(l),ge=Pt(f);if(!fe(w)&&!isNaN(w)){const ke=i.valueAsNumber||w&&+w;fe(J.value)||(B=ke>J.value),fe(ge.value)||(R=ke<ge.value)}else{const ke=i.valueAsDate||new Date(w),Pe=Jr=>new Date(new Date().toDateString()+" "+Jr),ft=i.type=="time",or=i.type=="week";Ae(J.value)&&w&&(B=ft?Pe(w)>Pe(J.value):or?w>J.value:ke>new Date(J.value)),Ae(ge.value)&&w&&(R=ft?Pe(w)<Pe(ge.value):or?w<ge.value:ke<new Date(ge.value))}if((B||R)&&(te(!!B,J.message,ge.message,Be.max,Be.min),!r))return O(T[g].message),T}if((c||u)&&!F&&(Ae(w)||o&&Array.isArray(w))){const B=Pt(c),R=Pt(u),J=!fe(B.value)&&w.length>+B.value,ge=!fe(R.value)&&w.length<+R.value;if((J||ge)&&(te(J,B.message,R.message),!r))return O(T[g].message),T}if(p&&!F&&Ae(w)){const{value:B,message:R}=Pt(p);if(qr(B)&&!w.match(B)&&(T[g]={type:Be.pattern,message:R,ref:i,...ae(Be.pattern,R)},!r))return O(R),T}if(m){if(Je(m)){const B=await m(w,t),R=Es(B,I);if(R&&(T[g]={...R,...ae(Be.validate,R.message)},!r))return O(R.message),T}else if(ee(m)){let B={};for(const R in m){if(!xe(B)&&!r)break;const J=Es(await m[R](w,t),I,R);J&&(B={...J,...ae(R,J.message)},O(J.message),r&&(T[g]=B))}if(!xe(B)&&(T[g]={ref:I,...B},!r))return T}}return O(!0),T};function zv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=Z(e)?n++:e[t[n++]];return e}function Uv(e){for(const t in e)if(e.hasOwnProperty(t)&&!Z(e[t]))return!1;return!0}function ie(e,t){const r=Array.isArray(t)?t:lo(t)?[t]:bs(t),n=r.length===1?e:zv(e,r),o=r.length-1,i=r[o];return n&&delete n[i],o!==0&&(ee(n)&&xe(n)||Array.isArray(n)&&Uv(n))&&ie(e,r.slice(0,-1)),e}function ho(){let e=[];return{get observers(){return e},next:o=>{for(const i of e)i.next&&i.next(o)},subscribe:o=>(e.push(o),{unsubscribe:()=>{e=e.filter(i=>i!==o)}}),unsubscribe:()=>{e=[]}}}var Wr=e=>fe(e)||!ms(e);function dt(e,t){if(Wr(e)||Wr(t))return e===t;if(At(e)&&At(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const o of r){const i=e[o];if(!n.includes(o))return!1;if(o!=="ref"){const a=t[o];if(At(i)&&At(a)||ee(i)&&ee(a)||Array.isArray(i)&&Array.isArray(a)?!dt(i,a):i!==a)return!1}}return!0}var Ts=e=>e.type==="select-multiple",Hv=e=>fo(e)||tr(e),po=e=>Ur(e)&&e.isConnected,Os=e=>{for(const t in e)if(Je(e[t]))return!0;return!1};function Kr(e,t={}){const r=Array.isArray(e);if(ee(e)||r)for(const n in e)Array.isArray(e[n])||ee(e[n])&&!Os(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Kr(e[n],t[n])):fe(e[n])||(t[n]=!0);return t}function As(e,t,r){const n=Array.isArray(e);if(ee(e)||n)for(const o in e)Array.isArray(e[o])||ee(e[o])&&!Os(e[o])?Z(t)||Wr(r[o])?r[o]=Array.isArray(e[o])?Kr(e[o],[]):{...Kr(e[o])}:As(e[o],fe(t)?{}:t[o],r[o]):r[o]=!dt(e[o],t[o]);return r}var vo=(e,t)=>As(e,t,Kr(t)),Ps=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>Z(e)?e:t?e===""?NaN:e&&+e:r&&Ae(e)?new Date(e):n?n(e):e;function mo(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return uo(t)?t.files:fo(t)?Cs(e.refs).value:Ts(t)?[...t.selectedOptions].map(({value:r})=>r):tr(t)?$s(e.refs).value:Ps(Z(t.value)?e.ref.value:t.value,e)}var qv=(e,t,r,n)=>{const o={};for(const i of e){const a=C(t,i);a&&U(o,i,a._f)}return{criteriaMode:r,names:[...e],fields:o,shouldUseNativeValidation:n}},nr=e=>Z(e)?e:qr(e)?e.source:ee(e)?qr(e.value)?e.value.source:e.value:e,Wv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Ns(e,t,r){const n=C(e,r);if(n||lo(r))return{error:n,name:r};const o=r.split(".");for(;o.length;){const i=o.join("."),a=C(t,i),s=C(e,i);if(a&&!Array.isArray(a)&&r!==i)return{name:r};if(s&&s.type)return{name:i,error:s};o.pop()}return{name:r}}var Kv=(e,t,r,n,o)=>o.isOnAll?!1:!r&&o.isOnTouch?!(t||e):(r?n.isOnBlur:o.isOnBlur)?!e:(r?n.isOnChange:o.isOnChange)?e:!0,Gv=(e,t)=>!rr(C(e,t)).length&&ie(e,t);const Yv={mode:Ce.onSubmit,reValidateMode:Ce.onChange,shouldFocusError:!0};function Xv(e={},t){let r={...Yv,...e},n={submitCount:0,isDirty:!1,isLoading:Je(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},o={},i=ee(r.defaultValues)||ee(r.values)?Ve(r.defaultValues||r.values)||{}:{},a=r.shouldUnregister?{}:Ve(i),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,f=0;const l={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},p={values:ho(),array:ho(),state:ho()},m=e.resetOptions&&e.resetOptions.keepDirtyValues,g=_s(r.mode),v=_s(r.reValidateMode),y=r.criteriaMode===Ce.all,x=h=>b=>{clearTimeout(f),f=setTimeout(h,b)},w=async h=>{if(l.isValid||h){const b=r.resolver?xe((await F()).errors):await te(o,!0);b!==n.isValid&&p.state.next({isValid:b})}},I=h=>l.isValidating&&p.state.next({isValidating:h}),O=(h,b=[],_,E,$=!0,k=!0)=>{if(E&&_){if(s.action=!0,k&&Array.isArray(C(o,h))){const A=_(C(o,h),E.argA,E.argB);$&&U(o,h,A)}if(k&&Array.isArray(C(n.errors,h))){const A=_(C(n.errors,h),E.argA,E.argB);$&&U(n.errors,h,A),Gv(n.errors,h)}if(l.touchedFields&&k&&Array.isArray(C(n.touchedFields,h))){const A=_(C(n.touchedFields,h),E.argA,E.argB);$&&U(n.touchedFields,h,A)}l.dirtyFields&&(n.dirtyFields=vo(i,a)),p.state.next({name:h,isDirty:R(h,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else U(a,h,b)},T=(h,b)=>{U(n.errors,h,b),p.state.next({errors:n.errors})},H=(h,b,_,E)=>{const $=C(o,h);if($){const k=C(a,h,Z(_)?C(i,h):_);Z(k)||E&&E.defaultChecked||b?U(a,h,b?k:mo($._f)):ke(h,k),s.mount&&w()}},W=(h,b,_,E,$)=>{let k=!1,A=!1;const q={name:h};if(!_||E){l.isDirty&&(A=n.isDirty,n.isDirty=q.isDirty=R(),k=A!==q.isDirty);const Q=dt(C(i,h),b);A=C(n.dirtyFields,h),Q?ie(n.dirtyFields,h):U(n.dirtyFields,h,!0),q.dirtyFields=n.dirtyFields,k=k||l.dirtyFields&&A!==!Q}if(_){const Q=C(n.touchedFields,h);Q||(U(n.touchedFields,h,_),q.touchedFields=n.touchedFields,k=k||l.touchedFields&&Q!==_)}return k&&$&&p.state.next(q),k?q:{}},D=(h,b,_,E)=>{const $=C(n.errors,h),k=l.isValid&&Ze(b)&&n.isValid!==b;if(e.delayError&&_?(u=x(()=>T(h,_)),u(e.delayError)):(clearTimeout(f),u=null,_?U(n.errors,h,_):ie(n.errors,h)),(_?!dt($,_):$)||!xe(E)||k){const A={...E,...k&&Ze(b)?{isValid:b}:{},errors:n.errors,name:h};n={...n,...A},p.state.next(A)}I(!1)},F=async h=>r.resolver(a,r.context,qv(h||c.mount,o,r.criteriaMode,r.shouldUseNativeValidation)),ae=async h=>{const{errors:b}=await F(h);if(h)for(const _ of h){const E=C(b,_);E?U(n.errors,_,E):ie(n.errors,_)}else n.errors=b;return b},te=async(h,b,_={valid:!0})=>{for(const E in h){const $=h[E];if($){const{_f:k,...A}=$;if(k){const q=c.array.has(k.name),Q=await Is($,a,y,r.shouldUseNativeValidation&&!b,q);if(Q[k.name]&&(_.valid=!1,b))break;!b&&(C(Q,k.name)?q?Bv(n.errors,Q,k.name):U(n.errors,k.name,Q[k.name]):ie(n.errors,k.name))}A&&await te(A,b,_)}}return _.valid},B=()=>{for(const h of c.unMount){const b=C(o,h);b&&(b._f.refs?b._f.refs.every(_=>!po(_)):!po(b._f.ref))&&_o(h)}c.unMount=new Set},R=(h,b)=>(h&&b&&U(a,h,b),!dt(zs(),i)),J=(h,b,_)=>Vv(h,c,{...s.mount?a:Z(b)?i:Ae(h)?{[h]:b}:b},_,b),ge=h=>rr(C(s.mount?a:i,h,e.shouldUnregister?C(i,h,[]):[])),ke=(h,b,_={})=>{const E=C(o,h);let $=b;if(E){const k=E._f;k&&(!k.disabled&&U(a,h,Ps(b,k)),$=Ur(k.ref)&&fe(b)?"":b,Ts(k.ref)?[...k.ref.options].forEach(A=>A.selected=$.includes(A.value)):k.refs?tr(k.ref)?k.refs.length>1?k.refs.forEach(A=>(!A.defaultChecked||!A.disabled)&&(A.checked=Array.isArray($)?!!$.find(q=>q===A.value):$===A.value)):k.refs[0]&&(k.refs[0].checked=!!$):k.refs.forEach(A=>A.checked=A.value===$):uo(k.ref)?k.ref.value="":(k.ref.value=$,k.ref.type||p.values.next({name:h,values:{...a}})))}(_.shouldDirty||_.shouldTouch)&&W(h,$,_.shouldTouch,_.shouldDirty,!0),_.shouldValidate&&yo(h)},Pe=(h,b,_)=>{for(const E in b){const $=b[E],k=`${h}.${E}`,A=C(o,k);(c.array.has(h)||!Wr($)||A&&!A._f)&&!At($)?Pe(k,$,_):ke(k,$,_)}},ft=(h,b,_={})=>{const E=C(o,h),$=c.array.has(h),k=Ve(b);U(a,h,k),$?(p.array.next({name:h,values:{...a}}),(l.isDirty||l.dirtyFields)&&_.shouldDirty&&p.state.next({name:h,dirtyFields:vo(i,a),isDirty:R(h,k)})):E&&!E._f&&!fe(k)?Pe(h,k,_):ke(h,k,_),ws(h,c)&&p.state.next({...n}),p.values.next({name:h,values:{...a}}),!s.mount&&t()},or=async h=>{const b=h.target;let _=b.name,E=!0;const $=C(o,_),k=()=>b.type?mo($._f):Nv(h),A=q=>{E=Number.isNaN(q)||q===C(a,_,q)};if($){let q,Q;const Qr=k(),Nt=h.type===gs.BLUR||h.type===gs.FOCUS_OUT,Ym=!Wv($._f)&&!r.resolver&&!C(n.errors,_)&&!$._f.deps||Kv(Nt,C(n.touchedFields,_),n.isSubmitted,v,g),xo=ws(_,c,Nt);U(a,_,Qr),Nt?($._f.onBlur&&$._f.onBlur(h),u&&u(0)):$._f.onChange&&$._f.onChange(h);const ko=W(_,Qr,Nt,!1),Xm=!xe(ko)||xo;if(!Nt&&p.values.next({name:_,type:h.type,values:{...a}}),Ym)return l.isValid&&w(),Xm&&p.state.next({name:_,...xo?{}:ko});if(!Nt&&xo&&p.state.next({...n}),I(!0),r.resolver){const{errors:Xs}=await F([_]);if(A(Qr),E){const Zm=Ns(n.errors,o,_),Zs=Ns(Xs,o,Zm.name||_);q=Zs.error,_=Zs.name,Q=xe(Xs)}}else q=(await Is($,a,y,r.shouldUseNativeValidation))[_],A(Qr),E&&(q?Q=!1:l.isValid&&(Q=await te(o,!0)));E&&($._f.deps&&yo($._f.deps),D(_,Q,q,ko))}},Jr=(h,b)=>{if(C(n.errors,b)&&h.focus)return h.focus(),1},yo=async(h,b={})=>{let _,E;const $=co(h);if(I(!0),r.resolver){const k=await ae(Z(h)?h:$);_=xe(k),E=h?!$.some(A=>C(k,A)):_}else h?(E=(await Promise.all($.map(async k=>{const A=C(o,k);return await te(A&&A._f?{[k]:A}:A)}))).every(Boolean),!(!E&&!n.isValid)&&w()):E=_=await te(o);return p.state.next({...!Ae(h)||l.isValid&&_!==n.isValid?{}:{name:h},...r.resolver||!h?{isValid:_}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!E&&zr(o,Jr,h?$:c.mount),E},zs=h=>{const b={...i,...s.mount?a:{}};return Z(h)?b:Ae(h)?C(b,h):h.map(_=>C(b,_))},Us=(h,b)=>({invalid:!!C((b||n).errors,h),isDirty:!!C((b||n).dirtyFields,h),isTouched:!!C((b||n).touchedFields,h),error:C((b||n).errors,h)}),qm=h=>{h&&co(h).forEach(b=>ie(n.errors,b)),p.state.next({errors:h?n.errors:{}})},Hs=(h,b,_)=>{const E=(C(o,h,{_f:{}})._f||{}).ref;U(n.errors,h,{...b,ref:E}),p.state.next({name:h,errors:n.errors,isValid:!1}),_&&_.shouldFocus&&E&&E.focus&&E.focus()},Wm=(h,b)=>Je(h)?p.values.subscribe({next:_=>h(J(void 0,b),_)}):J(h,b,!0),_o=(h,b={})=>{for(const _ of h?co(h):c.mount)c.mount.delete(_),c.array.delete(_),b.keepValue||(ie(o,_),ie(a,_)),!b.keepError&&ie(n.errors,_),!b.keepDirty&&ie(n.dirtyFields,_),!b.keepTouched&&ie(n.touchedFields,_),!r.shouldUnregister&&!b.keepDefaultValue&&ie(i,_);p.values.next({values:{...a}}),p.state.next({...n,...b.keepDirty?{isDirty:R()}:{}}),!b.keepIsValid&&w()},qs=({disabled:h,name:b,field:_,fields:E,value:$})=>{if(Ze(h)){const k=h?void 0:Z($)?mo(_?_._f:C(E,b)._f):$;U(a,b,k),W(b,k,!1,!1,!0)}},wo=(h,b={})=>{let _=C(o,h);const E=Ze(b.disabled);return U(o,h,{..._||{},_f:{..._&&_._f?_._f:{ref:{name:h}},name:h,mount:!0,...b}}),c.mount.add(h),_?qs({field:_,disabled:b.disabled,name:h}):H(h,!0,b.value),{...E?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:nr(b.min),max:nr(b.max),minLength:nr(b.minLength),maxLength:nr(b.maxLength),pattern:nr(b.pattern)}:{},name:h,onChange:or,onBlur:or,ref:$=>{if($){wo(h,b),_=C(o,h);const k=Z($.value)&&$.querySelectorAll&&$.querySelectorAll("input,select,textarea")[0]||$,A=Hv(k),q=_._f.refs||[];if(A?q.find(Q=>Q===k):k===_._f.ref)return;U(o,h,{_f:{..._._f,...A?{refs:[...q.filter(po),k,...Array.isArray(C(i,h))?[{}]:[]],ref:{type:k.type,name:h}}:{ref:k}}}),H(h,!1,void 0,k)}else _=C(o,h,{}),_._f&&(_._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(Dv(c.array,h)&&s.action)&&c.unMount.add(h)}}},Ws=()=>r.shouldFocusError&&zr(o,Jr,c.mount),Km=h=>{Ze(h)&&(p.state.next({disabled:h}),zr(o,b=>{b.disabled=h},0,!1))},Ks=(h,b)=>async _=>{_&&(_.preventDefault&&_.preventDefault(),_.persist&&_.persist());let E=Ve(a);if(p.state.next({isSubmitting:!0}),r.resolver){const{errors:$,values:k}=await F();n.errors=$,E=k}else await te(o);ie(n.errors,"root"),xe(n.errors)?(p.state.next({errors:{}}),await h(E,_)):(b&&await b({...n.errors},_),Ws(),setTimeout(Ws)),p.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:xe(n.errors),submitCount:n.submitCount+1,errors:n.errors})},Gm=(h,b={})=>{C(o,h)&&(Z(b.defaultValue)?ft(h,C(i,h)):(ft(h,b.defaultValue),U(i,h,b.defaultValue)),b.keepTouched||ie(n.touchedFields,h),b.keepDirty||(ie(n.dirtyFields,h),n.isDirty=b.defaultValue?R(h,C(i,h)):R()),b.keepError||(ie(n.errors,h),l.isValid&&w()),p.state.next({...n}))},Gs=(h,b={})=>{const _=h?Ve(h):i,E=Ve(_),$=h&&!xe(h)?E:i;if(b.keepDefaultValues||(i=_),!b.keepValues){if(b.keepDirtyValues||m)for(const k of c.mount)C(n.dirtyFields,k)?U($,k,C(a,k)):ft(k,C($,k));else{if(so&&Z(h))for(const k of c.mount){const A=C(o,k);if(A&&A._f){const q=Array.isArray(A._f.refs)?A._f.refs[0]:A._f.ref;if(Ur(q)){const Q=q.closest("form");if(Q){Q.reset();break}}}}o={}}a=e.shouldUnregister?b.keepDefaultValues?Ve(i):{}:Ve($),p.array.next({values:{...$}}),p.values.next({values:{...$}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!s.mount&&t(),s.mount=!l.isValid||!!b.keepIsValid,s.watch=!!e.shouldUnregister,p.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!dt(h,i)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&h?vo(i,h):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Ys=(h,b)=>Gs(Je(h)?h(a):h,b);return{control:{register:wo,unregister:_o,getFieldState:Us,handleSubmit:Ks,setError:Hs,_executeSchema:F,_getWatch:J,_getDirty:R,_updateValid:w,_removeUnmounted:B,_updateFieldArray:O,_updateDisabledField:qs,_getFieldArray:ge,_reset:Gs,_resetDefaultValues:()=>Je(r.defaultValues)&&r.defaultValues().then(h=>{Ys(h,r.resetOptions),p.state.next({isLoading:!1})}),_updateFormState:h=>{n={...n,...h}},_disableForm:Km,_subjects:p,_proxyFormState:l,get _fields(){return o},get _formValues(){return a},get _state(){return s},set _state(h){s=h},get _defaultValues(){return i},get _names(){return c},set _names(h){c=h},get _formState(){return n},set _formState(h){n=h},get _options(){return r},set _options(h){r={...r,...h}}},trigger:yo,register:wo,handleSubmit:Ks,watch:Wm,setValue:ft,getValues:zs,reset:Ys,resetField:Gm,clearErrors:qm,unregister:_o,setError:Hs,setFocus:(h,b={})=>{const _=C(o,h),E=_&&_._f;if(E){const $=E.refs?E.refs[0]:E.ref;$.focus&&($.focus(),b.shouldSelect&&$.select())}},getFieldState:Us}}function Gr(e={}){const t=$e.useRef(),r=$e.useRef(),[n,o]=$e.useState({isDirty:!1,isValidating:!1,isLoading:Je(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:Je(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Xv(e,()=>o(a=>({...a}))),formState:n});const i=t.current.control;return i._options=e,jv({subject:i._subjects.state,next:a=>{Rv(a,i._proxyFormState,i._updateFormState,!0)&&o({...i._formState})}}),$e.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),$e.useEffect(()=>{if(i._proxyFormState.isDirty){const a=i._getDirty();a!==n.isDirty&&i._subjects.state.next({isDirty:a})}},[i,n.isDirty]),$e.useEffect(()=>{e.values&&!dt(e.values,r.current)?(i._reset(e.values,i._options.resetOptions),r.current=e.values):i._resetDefaultValues()},[e.values,i]),$e.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Lv(n,i),t.current}var Ms=function(e,t,r){if(e&&"reportValidity"in e){var n=C(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Zv=function(e,t){var r=function(o){var i=t.fields[o];i&&i.ref&&"reportValidity"in i.ref?Ms(i.ref,o,e):i.refs&&i.refs.forEach(function(a){return Ms(a,o,e)})};for(var n in t.fields)r(n)},Jv=function(e,t){t.shouldUseNativeValidation&&Zv(e,t);var r={};for(var n in e){var o=C(t.fields,n),i=Object.assign(e[n]||{},{ref:o&&o.ref});if(em(t.names||Object.keys(e),n)){var a=Object.assign({},Qv(C(r,n)));U(a,"root",i),U(r,n,a)}else U(r,n,i)}return r},Qv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},em=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},tm=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var o=n.path.map(function(s){return s.key}).join(".");if(r[o]||(r[o]={message:n.message,type:n.validation}),t){var i=r[o].types,a=i&&i[n.validation];r[o]=ys(o,t,r,n.validation,a?[].concat(a,n.message):n.message)}e.issues.shift()}}return r},Yr=function(e,t,r){return r===void 0&&(r={}),function(n,o,i){try{return Promise.resolve(function(a,s){try{var c=function(){function u(l){return{values:r.raw?n:l,errors:{}}}var f=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(hr(e,n,f)):Promise.resolve(Bd(e,n,f)).then(u)}()}catch(u){return s(u)}return c&&c.then?c.then(void 0,s):c}(0,function(a){if(a instanceof fr)return{values:{},errors:Jv(tm(a,!i.shouldUseNativeValidation&&i.criteriaMode==="all"),i)};throw a}))}catch(a){return Promise.reject(a)}}};const Ds=27,Fs=12,Ls=10,rm=Tt("enum"),nm=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Yr(de({checked:di(ui(ci()),r=>Object.entries(r).filter(([n,o])=>o).map(([n,o])=>n),[pr(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),vr(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},om=re(({option:e,...t},r)=>d(Y,{children:[d("input",{class:"peer sr-only h-full",type:"checkbox",...t,ref:r}),d("label",{class:"bg-lowest hover:bg-neutral-2 active:outline-neutral-8 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 peer-focus-visible:ring-accent-9 peer-focus-visible:ring-offset-accent-7 block cursor-pointer select-none rounded-2xl px-3 py-1.5 outline outline-1 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4",htmlFor:t.id,children:e.label})]})),Rs=Ut("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:ds}}}),im=({input:e,onSubmitSuccess:t})=>{var u,f;const r=e.key?(u=P.current$.value.flow)==null?void 0:u.data.submissions[e.key]:void 0,n=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1,o=n&&e.config.options.length===2,{register:i,handleSubmit:a,formState:{errors:s}}=Gr({defaultValues:{checked:n?{}:rm(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:nm(e.config)}),c=ao();return o?d("ul",{style:{maxHeight:6.5*Ds+5*Fs+2*Ls},class:Rs({variant:"booleanLike"}),children:e.config.options.map((l,p)=>d("li",{class:"flex-1",children:d(fs,{type:"submit",ref:m=>{m&&p===0&&(c.current=m)},label:l.label,value:"true",onClick:()=>t({type:"enum",value:[l.value]})})},l.value))}):d("form",{noValidate:!0,onSubmit:l=>a(p=>{const m=p.checked;t({type:"enum",value:m})})(l),children:[d("div",{class:"flex items-center gap-1",children:[d("ul",{style:{maxHeight:6.5*Ds+5*Fs+2*Ls},class:Rs({variant:e.config.options.length===1?"singleOption":void 0}),children:e.config.options.map((l,p)=>{const m=`checked.${l.value}`,{ref:g,...v}=i(m);return d("li",{class:"relative",children:d(om,{option:l,autoFocus:p===0,ref:y=>{y&&p===0&&(c.current=y),g(y)},id:m,...v,onClick:n?()=>t({type:"enum",value:[l.value]}):void 0})},l.value)})}),d("div",{class:"flex flex-col items-center gap-2 pr-2.5 pt-2.5",children:[n?null:d(lt,{}),e.config.minSelected===0&&d(ut,{type:"button",onClick:()=>t({type:"enum",value:[]})})]})]}),d("div",{class:"px-1",children:d(Ot,{error:(f=s.checked)==null?void 0:f.root})})]})},am=Tt("number"),Xr={number:()=>"Please enter a valid number",min:e=>`Please enter a number greater than or equal to ${e}`,max:e=>`Please enter a number less than or equal to ${e}`,decimalCases:e=>`Please enter a number with at most ${e} decimal cases`},sm=e=>{const t=e.min??Number.MIN_SAFE_INTEGER,r=e.max??Number.MAX_SAFE_INTEGER,n=e.decimalCases??0;return Yr(de({number:dn(Xr.number(),[Gd(t,Xr.min(t)),Kd(r,Xr.max(r)),qd(o=>o===Number(o.toFixed(n)),Xr.decimalCases(n))])}))},cm=({input:e,onSubmitSuccess:t})=>{var f;const r=e.config.defaultValue,n=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,{register:o,handleSubmit:i,formState:{errors:a}}=Gr({defaultValues:{number:r?Number(r):am(n)?n.value:void 0},resolver:sm(e.config)}),{ref:s,...c}=o("number",{required:!e.config.optional,valueAsNumber:!0}),u=L();return pe(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:i(l=>{l.number!==void 0&&t({type:"number",value:l.number})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-grow",children:[d("input",{...c,id:"chat-input",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:l=>{l&&(u.current=l),s(l)},type:"text",min:e.config.min,max:e.config.max,class:er({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&&d(ut,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(lt,{})]}),d(Ot,{error:a.number})]})},lm=e=>{if(e==="")return{countryCode:"",phoneNumber:""};const t=Object.entries(io).find(o=>e.startsWith(o[1])),r=t?t[1]:"",n=e.replace(r,"");return/^\d+$/.test(n)?{countryCode:r,phoneNumber:n}:{countryCode:"",phoneNumber:""}},um="44",go="That doesn’t look like a valid phone number",js=e=>({min:`The phone number needs to be at least ${e.minChars} digits long.`,max:`The phone number can't be longer than ${e.maxChars} digits.`}),dm=Tt("string"),fm=Tt("phone"),hm=se(go,[fi(/^\+?[0-9 -]+$/,go)]),pm=se("Please select a country code",[fi(/^\+?[0-9 -]+$/,go)]),vm=()=>Yr(de({countryCode:pm,phoneNumber:di(hm,e=>e.replace(/[^0-9]/g,""),[])})),mm=({input:e,onSubmitSuccess:t})=>{var g;const r=e.key?(g=P.current$.value.flow)==null?void 0:g.data.submissions[e.key]:void 0,[n,o]=K(),i=dm(r)?lm(r.value):fm(r)?r.value:void 0,{register:a,handleSubmit:s,formState:{errors:c},watch:u}=Gr({defaultValues:{countryCode:(i==null?void 0:i.countryCode)??e.config.defaultValue.countryCode??um,phoneNumber:(i==null?void 0:i.phoneNumber)??e.config.defaultValue.phoneNumber??""},resolver:vm()}),{ref:f,...l}=a("phoneNumber",{required:!e.config.optional}),p=L(),m=u("countryCode");return pe(()=>{p.current&&(p.current.focus(),p.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(v=>{const y=v.phoneNumber.replace(/[^0-9]/g,""),x=v.countryCode.replace(/[^0-9]/g,"");if(o(void 0),y.length+x.length>(e.config.maxChars||Number.POSITIVE_INFINITY))return o(js(e.config).max);if(y.length+x.length<(e.config.minChars||0))return o(js(e.config).min);e.config.submissionFormat==="phone"?t({type:"phone",value:{countryCode:x,phoneNumber:y}}):t({type:"string",value:m+v.phoneNumber})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative flex min-w-0 flex-1 flex-grow gap-2",children:[d("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:[d("span",{children:["+",m]}),d("select",{...a("countryCode",{}),id:`isdk_phone_${e.key}`,class:"absolute inset-0 opacity-0",children:Object.entries(io).map(([v,y])=>d("option",{value:y,children:[v," (+",y,")"]},v))})]}),d("input",{...l,id:"chat-input",type:"tel",inputMode:"tel",autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:v=>{v&&(p.current=v),f(v)},class:er({optional:e.config.optional,className:"flex-1 rounded-r-full"}),placeholder:e.config.placeholder}),e.config.optional&&d(ut,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(lt,{})]}),d(Ot,{error:c.countryCode||c.phoneNumber||{message:n}})]})},gm=({input:e,onSubmitSuccess:t})=>d("div",{class:"flex flex-col items-center py-3",children:d("button",{class:"bg-accent-9 hover:bg-accent-10 active:bg-submit-bg-active hover:border-accent-10 active:border-submit-bg-active border-accent-9 ring-accent-6 focus-visible:outline-accent-8 ring-offset-neutral-1 flex cursor-pointer rounded-full border border-solid px-5 py-3 pr-4 text-white outline-none ring-1 ring-offset-[1.5px] transition-all duration-300 focus-visible:outline-2 active:ring-2 active:ring-offset-2",name:e.key,onClick:()=>{t(null)},children:d("span",{class:"flex items-center gap-1.5",children:[d("span",{class:"inline-flex items-center text-sm font-medium",children:e.config.label||"Submit"}),d("svg",{stroke:"currentColor","stroke-width":"1.5",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[d("path",{d:"M4 8L8 4L12 8"}),d("path",{d:"M8 4V13"})]})]})})}),bo={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"},bm={email:{type:"email",inputMode:"email",formNoValidate:!0},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},ym=Tt("string"),_m=e=>{const t={maxLength:`Please enter no more than ${e.maxChars??999} characters`,minLength:`Please enter ${e.minChars??1} or more characters`};return Yr(de({text:{email:se(bo.email,[Wd(bo.email),vr(e.minChars??1,t.minLength),pr(e.maxChars??1/0,t.maxLength)]),text:se([vr(e.minChars??1,t.minLength),pr(e.maxChars??1/0,t.maxLength)]),url:se([Yd(bo.url),vr(e.minChars??1,t.minLength),pr(e.maxChars??1/0,t.maxLength)])}[e.format]}))},wm={text:({input:e,onSubmitSuccess:t})=>{var f;const r=e.key?(f=P.current$.value.flow)==null?void 0:f.data.submissions[e.key]:void 0,n=e.config.defaultValue,{register:o,handleSubmit:i,formState:{errors:a}}=Gr({defaultValues:{text:n||(ym(r)?r.value:"")},resolver:_m(e.config)}),{ref:s,...c}=o("text",{required:!e.config.optional}),u=L();return pe(()=>{u.current&&(u.current.focus(),u.current.select())},[]),d("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:i(l=>{t({type:"string",value:l.text})}),children:[d("div",{class:"flex items-center gap-2",children:[d("div",{class:"relative min-w-0 flex-1",children:[d("input",{id:"chat-input",...c,...bm[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:l=>{l&&(u.current=l),s(l)},placeholder:e.config.placeholder,class:er({optional:!!e.config.optional,className:"w-full rounded-full"})}),e.config.optional&&d(ut,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),d(lt,{})]}),d(Ot,{error:a.text})]})},phone:mm,"multiple-choice":im,boolean:Sv,file:Pv,submit:gm,address:_v,number:cm},xm=({logger:e})=>{var i;const t=(i=P.current$.value.flow)==null?void 0:i.data.currentInput,[r,n]=cv(),o=L(null);return P.inputHeight$.value=n.height,V(()=>{const a=o.current;if(a)return a.addEventListener("transitionstart",le.scrollToEnd.smooth),a.addEventListener("transitioncancel",le.scrollToEnd.smooth),a.addEventListener("transitionend",le.scrollToEnd.smooth),()=>{a.removeEventListener("transitionstart",le.scrollToEnd.smooth),a.removeEventListener("transitioncancel",le.scrollToEnd.smooth),a.removeEventListener("transitionend",le.scrollToEnd.smooth)}},[]),d("div",{ref:o,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:d("div",{ref:r,class:"border-divider flex flex-col justify-end border-t",children:t?(()=>{const a=wm[t.type];return d(a,{logger:e,onSubmitSuccess:le.onSubmitSuccessFn$.value,input:t})})():d("div",{class:"flex items-center gap-2 p-2.5",children:[d("input",{"aria-hidden":"true",id:"chat-input",class:er({optional:!1,className:"flex-grow rounded-full"}),disabled:!0}),d(lt,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})})})};var km=function(e){return e instanceof RegExp},$m=function(t){var r=/[\\^$.*+?()[\]{}|]/g,n=RegExp(r.source);return t&&n.test(t)?t.replace(r,"\\$&"):t},Vs=function(e){return typeof e=="string"},Sm=function(e){var t=[];return e.forEach(function(r){Array.isArray(r)?t=t.concat(r):t.push(r)}),t};function Cm(e,t,r){var n=0,o=0;if(e==="")return e;if(!e||!Vs(e))throw new TypeError("First argument to react-string-replace#replaceString must be a string");var i=t;km(i)||(i=new RegExp("("+$m(i)+")","gi"));for(var a=e.split(i),s=1,c=a.length;s<c;s+=2){if(a[s]===void 0||a[s-1]===void 0){console.warn("reactStringReplace: Encountered undefined value during string replacement. Your RegExp may not be working the way you expect.");continue}o=a[s].length,n+=a[s-1].length,a[s]=r(a[s],s,n),n+=o}return a}var Em=function(t,r,n){return Array.isArray(t)||(t=[t]),Sm(t.map(function(o){return Vs(o)?Cm(o,r,n):o}))};const Zr=Ne(Em),Im=/(\[[^\]]+\]\([^)]+\))/g,Tm=/\[([^\]]+)\]\(([^)]+)\)/,Om=/(https?:\/\/[^\s]+)/g,Am=/_(.*?)_/g,Pm=/\*\*(.*?)\*\*/g,Bs="text-accent-10 hover:text-accent-11 no-underline underline-offset-2 hover:underline",Nm=e=>{const t=Zr(e,Im,(i,a)=>{const[,s,c]=i.match(Tm)??[];return c?d("a",{class:Bs,href:c,children:s??c},c+a):d("span",{children:"INVALID LINK"})}),r=Zr(t,Om,(i,a)=>d("a",{class:Bs,href:i,children:i},i+a)),n=Zr(r,Am,(i,a)=>d("em",{children:i},i+a));return Zr(n,Pm,(i,a)=>d("strong",{children:i},i+a))},Mm=Ut("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"}}),Dm=({children:e,className:t,animate:r,side:n,...o})=>d("p",{style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:Mm({className:t,side:n,animate:r}),...o,children:e}),Fm=({message:e})=>d("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl px-2 py-2",children:d("a",{onClick:e.onClick,class:"bg-lowest shadow-surface-sm ring-accent-6 hover:ring-accent-8 active:bg-accent-2 active:text-accent-10 text-accent-9 focus-visible:ring-accent-7/50 text-wrap-balance flex items-center gap-1.5 rounded-full py-2 pl-4 pr-2.5 text-center no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:e.href,children:[e.text,d("svg",{class:"flex-none",width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:d("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"})})]})}),Lm=({className:e,...t})=>(V(()=>{le.scrollToEnd.smooth()}),d("div",{"aria-hidden":!0,children:le.isBotTyping$.value===!0?d("div",{"aria-label":"Typing…",class:ot("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>d("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}):void 0})),Rm={bot:"left",user:"right"},jm=Ut("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]"}}}),Vm=({lastSentMessageFooter:e})=>{var r;const t=((r=P.current$.value.flow)==null?void 0:r.data.messages)??[];return V(()=>{le.scrollToEnd.smooth()},[t.length]),d("ol",{"aria-label":"Chat messages",class:"mt-auto flex flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[t.map((n,o)=>d(Y,{children:d("li",{class:"flex",children:st(n).with({type:"system"},i=>d("p",{class:jm({variant:i.variant}),children:i.text})).with({type:"text",author:N.union("bot","user")},i=>{const a=i.author==="user"&&!t.slice(o+1).some(u=>u.type==="text"&&u.author==="user"),s=o===t.length-1,c=i.author==="bot"?Nm(i.text):i.text;return d(Dm,{animate:s,side:Rm[i.author],children:[c,a?e:null]},o)}).with({type:"link"},i=>d(Fm,{message:i})).with({type:"image"},i=>d("img",{class:"shadow-surface-md w-full max-w-[min(100%,24rem)] rounded-2xl",src:i.url,style:{aspectRatio:i.width/i.height}})).with({type:"file"},i=>d(Tv,{class:i.author==="bot"?void 0:"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).with({type:"loading"},i=>{const a=t[t.length-1];return!(i===a)||le.isBotTyping$.value?null:d("div",{class:"flex flex-grow flex-col items-center justify-center",children:d(Xa,{class:"text-neutral-6 h-8 w-8"})})}).exhaustive()})},o)),d(Lm,{},"typing")]})},Bm=({logger:e,apiClient:t,analytics:r})=>{const{flow:n}=P.current$.value;Se(n,"Flow is required to exist to show chatbot body");const o=P.viewState$.value,{chatRef:i,chatService:a}=pv(),[s,c]=K();return pe(()=>{o==="maximised"&&le.scrollToEnd.instant()},[o]),pe(()=>{var v,y;const{state:u,flow:f}=P.current$.peek();if(u!=="loaded")throw new Error(Ip.invalid_state);let l=f.data.nodeHistory.at(-1);if(le.scrollToEnd.instant(),P.setInput(void 0),f.data.isFinished)return;l===void 0?(l=qa(n.nodes).id,P.setCurrentNodeId(l),r.log({event:"FLOW_START",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:f.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(v=n.analytics)==null?void 0:v.customProperties})):P.removeMessagesSentByNodeIds([l]);const{interpret:p,abort:m,undo:g}=zp({context:n.context,analytics:{service:r,customProperties:(y=n.analytics)==null?void 0:y.customProperties},apiClient:t,logger:e,flow:n,chatService:a,getSubmissions:()=>{var x;return(x=P.current$.peek().flow)==null?void 0:x.data.submissions},onInterpret:(x,w)=>{var O;const I=P.current$.peek().flow;Se(I),w&&(I.data.sequence=I.data.sequence+1,r.log({event:"FLOW_NODE",properties:{flow_id:n.id,flow_version:n.version,from_node_id:w.id,flow_build:n.build,to_node_id:x.id,sequence:I.data.sequence,flow_session_id:I.data.flowSessionId,job:n.job},customProperties:(O=n.analytics)==null?void 0:O.customProperties})),P.setCurrentNodeId(x.id)},onFlowEnd:async()=>{var w;P.markAsFinished();const x=P.current$.peek().flow;Se(x),r.log({event:"FLOW_END",properties:{flow_id:n.id,flow_version:n.version,flow_session_id:x.data.flowSessionId,flow_build:n.build,job:n.job},customProperties:(w=n.analytics)==null?void 0:w.customProperties})}});return c(()=>g),p(l),m},[r,t,a,e,n]),d(Y,{children:[d("div",{ref:i,className:"hide-scrollbars relative flex w-full max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:P.inputHeight$.value},children:d(Vm,{lastSentMessageFooter:n.data.isFinished||!s?null:d(Um,{undoFn:s})})}),d(xm,{logger:e})]})},zm=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"):[],Um=({undoFn:e})=>d("div",{class:"absolute bottom-0 right-0 flex w-full translate-y-full justify-end",children:d("button",{class:"fr touch-hitbox text-neutral-9 hover:text-neutral-12 rounded-full p-1 text-right text-xs transition-all",onClick:async()=>{const{flow:t}=P.current$.peek();Se(t);const{removed:r}=e(t.data.nodeHistory),n=t.data.nodeHistory.splice(-r);n.length!==0&&(P.removeMessagesSentByNodeIds(n),P.setInput(void 0),n.pop(),n.map(o=>t.nodes.find(i=>i.id===o)).filter(Boolean).flatMap(zm).forEach(o=>delete t.data.submissions[o]),P.current$.value={...P.current$.value})},children:"Undo"})}),Hm=Object.freeze(Object.defineProperty({__proto__:null,ChatbotBody:Bm},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"}))})();
|