@inploi/plugin-chatbot 3.8.0 → 3.10.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 +25 -25
- package/dist/chatbot.d.ts +0 -1
- package/dist/chatbot.utils.d.ts +1 -2
- package/dist/{index-b616116f.js → index-122b2522.js} +16 -12
- package/dist/{index-efb34443.cjs → index-2d0cac15.cjs} +5 -1
- package/dist/interpreter.d.ts +4 -3
- package/dist/{job-application-content-8b7e62bb.cjs → job-application-content-191ecc14.cjs} +256 -26
- package/dist/{job-application-content-b9799966.js → job-application-content-c89a480d.js} +256 -26
- package/dist/plugin-chatbot.cjs +1 -1
- package/dist/plugin-chatbot.js +2 -2
- package/package.json +5 -4
package/cdn/index.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
var Pg=Object.defineProperty;var Eg=(ft,Le,$e)=>Le in ft?Pg(ft,Le,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ft[Le]=$e;var Ul=(ft,Le,$e)=>(Eg(ft,typeof Le!="symbol"?Le+"":Le,$e),$e);(function(){"use strict";var ft=e=>e,Le=class extends Error{constructor(){super("Not found"),this.name="NotFoundError"}},$e,V,Oo,Mo,pt,Fo,Do,zn,Io,Ot={},No=[],zl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Fr=Array.isArray;function Re(e,t){for(var r in t)e[r]=t[r];return e}function Lo(e){var t=e.parentNode;t&&t.removeChild(e)}function M(e,t,r){var n,i,o,s={};for(o in t)o=="key"?n=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?$e.call(arguments,2):r),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return rr(e,s,n,i,null)}function rr(e,t,r,n,i){var o={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Oo};return i==null&&V.vnode!=null&&V.vnode(o),o}function Ro(){return{current:null}}function ee(e){return e.children}function xe(e,t){this.props=e,this.context=t}function Dr(e,t){if(t==null)return e.__?Dr(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"?Dr(e):null}function Bo(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 Bo(e)}}function Hn(e){(!e.__d&&(e.__d=!0)&&pt.push(e)&&!Ir.__r++||Fo!==V.debounceRendering)&&((Fo=V.debounceRendering)||Do)(Ir)}function Ir(){var e,t,r,n,i,o,s,a,l;for(pt.sort(zn);e=pt.shift();)e.__d&&(t=pt.length,n=void 0,i=void 0,o=void 0,a=(s=(r=e).__v).__e,(l=r.__P)&&(n=[],i=[],(o=Re({},s)).__v=s.__v+1,Wn(l,s,o,r.__n,l.ownerSVGElement!==void 0,s.__h!=null?[a]:null,n,a??Dr(s),s.__h,i),qo(n,s,i),s.__e!=a&&Bo(s)),pt.length>t&&pt.sort(zn));Ir.__r=0}function jo(e,t,r,n,i,o,s,a,l,u,d){var c,f,p,h,v,w,k,y,_,C,S=0,N=n&&n.__k||No,D=N.length,A=D,E=t.length;for(r.__k=[],c=0;c<E;c++)(h=r.__k[c]=(h=t[c])==null||typeof h=="boolean"||typeof h=="function"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"?rr(null,h,null,null,h):Fr(h)?rr(ee,{children:h},null,null,null):h.__b>0?rr(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null&&(h.__=r,h.__b=r.__b+1,(y=Hl(h,N,k=c+S,A))===-1?p=Ot:(p=N[y]||Ot,N[y]=void 0,A--),Wn(e,h,p,i,o,s,a,l,u,d),v=h.__e,(f=h.ref)&&p.ref!=f&&(p.ref&&Kn(p.ref,null,h),d.push(f,h.__c||v,h)),v!=null&&(w==null&&(w=v),C=!(_=p===Ot||p.__v===null)&&y===k,_?y==-1&&S--:y!==k&&(y===k+1?(S++,C=!0):y>k?A>E-k?(S+=y-k,C=!0):S--:S=y<k&&y==k-1?y-k:0),k=c+S,C=C||y==c&&!_,typeof h.type!="function"||y===k&&p.__k!==h.__k?typeof h.type=="function"||C?h.__d!==void 0?(l=h.__d,h.__d=void 0):l=v.nextSibling:l=zo(e,v,l):l=Uo(h,l,e),typeof r.type=="function"&&(r.__d=l)));for(r.__e=w,c=D;c--;)N[c]!=null&&(typeof r.type=="function"&&N[c].__e!=null&&N[c].__e==r.__d&&(r.__d=N[c].__e.nextSibling),Go(N[c],N[c]))}function Uo(e,t,r){for(var n,i=e.__k,o=0;i&&o<i.length;o++)(n=i[o])&&(n.__=e,t=typeof n.type=="function"?Uo(n,t,r):zo(r,n.__e,t));return t}function Be(e,t){return t=t||[],e==null||typeof e=="boolean"||(Fr(e)?e.some(function(r){Be(r,t)}):t.push(e)),t}function zo(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 Hl(e,t,r,n){var i=e.key,o=e.type,s=r-1,a=r+1,l=t[r];if(l===null||l&&i==l.key&&o===l.type)return r;if(n>(l!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((l=t[s])&&i==l.key&&o===l.type)return s;s--}if(a<t.length){if((l=t[a])&&i==l.key&&o===l.type)return a;a++}}return-1}function Wl(e,t,r,n,i){var o;for(o in r)o==="children"||o==="key"||o in t||Nr(e,o,null,r[o],n);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||r[o]===t[o]||Nr(e,o,t[o],r[o],n)}function Ho(e,t,r){t[0]==="-"?e.setProperty(t,r??""):e[t]=r==null?"":typeof r!="number"||zl.test(t)?r:r+"px"}function Nr(e,t,r,n,i){var o;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||Ho(e.style,t,"");if(r)for(t in r)n&&r[t]===n[t]||Ho(e.style,t,r[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=r,r?n||e.addEventListener(t,o?Ko:Wo,o):e.removeEventListener(t,o?Ko:Wo,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=r??"";break e}catch{}typeof r=="function"||(r==null||r===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,r))}}function Wo(e){return this.l[e.type+!1](V.event?V.event(e):e)}function Ko(e){return this.l[e.type+!0](V.event?V.event(e):e)}function Wn(e,t,r,n,i,o,s,a,l,u){var d,c,f,p,h,v,w,k,y,_,C,S,N,D,A,E=t.type;if(t.constructor!==void 0)return null;r.__h!=null&&(l=r.__h,a=t.__e=r.__e,t.__h=null,o=[a]),(d=V.__b)&&d(t);try{e:if(typeof E=="function"){if(k=t.props,y=(d=E.contextType)&&n[d.__c],_=d?y?y.props.value:d.__:n,r.__c?w=(c=t.__c=r.__c).__=c.__E:("prototype"in E&&E.prototype.render?t.__c=c=new E(k,_):(t.__c=c=new xe(k,_),c.constructor=E,c.render=ql),y&&y.sub(c),c.props=k,c.state||(c.state={}),c.context=_,c.__n=n,f=c.__d=!0,c.__h=[],c._sb=[]),c.__s==null&&(c.__s=c.state),E.getDerivedStateFromProps!=null&&(c.__s==c.state&&(c.__s=Re({},c.__s)),Re(c.__s,E.getDerivedStateFromProps(k,c.__s))),p=c.props,h=c.state,c.__v=t,f)E.getDerivedStateFromProps==null&&c.componentWillMount!=null&&c.componentWillMount(),c.componentDidMount!=null&&c.__h.push(c.componentDidMount);else{if(E.getDerivedStateFromProps==null&&k!==p&&c.componentWillReceiveProps!=null&&c.componentWillReceiveProps(k,_),!c.__e&&(c.shouldComponentUpdate!=null&&c.shouldComponentUpdate(k,c.__s,_)===!1||t.__v===r.__v)){for(t.__v!==r.__v&&(c.props=k,c.state=c.__s,c.__d=!1),t.__e=r.__e,t.__k=r.__k,t.__k.forEach(function(W){W&&(W.__=t)}),C=0;C<c._sb.length;C++)c.__h.push(c._sb[C]);c._sb=[],c.__h.length&&s.push(c);break e}c.componentWillUpdate!=null&&c.componentWillUpdate(k,c.__s,_),c.componentDidUpdate!=null&&c.__h.push(function(){c.componentDidUpdate(p,h,v)})}if(c.context=_,c.props=k,c.__P=e,c.__e=!1,S=V.__r,N=0,"prototype"in E&&E.prototype.render){for(c.state=c.__s,c.__d=!1,S&&S(t),d=c.render(c.props,c.state,c.context),D=0;D<c._sb.length;D++)c.__h.push(c._sb[D]);c._sb=[]}else do c.__d=!1,S&&S(t),d=c.render(c.props,c.state,c.context),c.state=c.__s;while(c.__d&&++N<25);c.state=c.__s,c.getChildContext!=null&&(n=Re(Re({},n),c.getChildContext())),f||c.getSnapshotBeforeUpdate==null||(v=c.getSnapshotBeforeUpdate(p,h)),jo(e,Fr(A=d!=null&&d.type===ee&&d.key==null?d.props.children:d)?A:[A],t,r,n,i,o,s,a,l,u),c.base=t.__e,t.__h=null,c.__h.length&&s.push(c),w&&(c.__E=c.__=null)}else o==null&&t.__v===r.__v?(t.__k=r.__k,t.__e=r.__e):t.__e=Kl(r.__e,t,r,n,i,o,s,l,u);(d=V.diffed)&&d(t)}catch(W){t.__v=null,(l||o!=null)&&(t.__e=a,t.__h=!!l,o[o.indexOf(a)]=null),V.__e(W,t,r)}}function qo(e,t,r){for(var n=0;n<r.length;n++)Kn(r[n],r[++n],r[++n]);V.__c&&V.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){V.__e(o,i.__v)}})}function Kl(e,t,r,n,i,o,s,a,l){var u,d,c,f=r.props,p=t.props,h=t.type,v=0;if(h==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((u=o[v])&&"setAttribute"in u==!!h&&(h?u.localName===h:u.nodeType===3)){e=u,o[v]=null;break}}if(e==null){if(h===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(h===null)f===p||a&&e.data===p||(e.data=p);else{if(o=o&&$e.call(e.childNodes),d=(f=r.props||Ot).dangerouslySetInnerHTML,c=p.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},v=0;v<e.attributes.length;v++)f[e.attributes[v].name]=e.attributes[v].value;(c||d)&&(c&&(d&&c.__html==d.__html||c.__html===e.innerHTML)||(e.innerHTML=c&&c.__html||""))}if(Wl(e,p,f,i,a),c)t.__k=[];else if(jo(e,Fr(v=t.props.children)?v:[v],t,r,n,i&&h!=="foreignObject",o,s,o?o[0]:r.__k&&Dr(r,0),a,l),o!=null)for(v=o.length;v--;)o[v]!=null&&Lo(o[v]);a||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||h==="progress"&&!v||h==="option"&&v!==f.value)&&Nr(e,"value",v,f.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Nr(e,"checked",v,f.checked,!1))}return e}function Kn(e,t,r){try{typeof e=="function"?e(t):e.current=t}catch(n){V.__e(n,r)}}function Go(e,t,r){var n,i;if(V.unmount&&V.unmount(e),(n=e.ref)&&(n.current&&n.current!==e.__e||Kn(n,null,t)),(n=e.__c)!=null){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(o){V.__e(o,t)}n.base=n.__P=null,e.__c=void 0}if(n=e.__k)for(i=0;i<n.length;i++)n[i]&&Go(n[i],t,r||typeof e.type!="function");r||e.__e==null||Lo(e.__e),e.__=e.__e=e.__d=void 0}function ql(e,t,r){return this.constructor(e,r)}function Mt(e,t,r){var n,i,o,s;V.__&&V.__(e,t),i=(n=typeof r=="function")?null:r&&r.__k||t.__k,o=[],s=[],Wn(t,e=(!n&&r||t).__k=M(ee,null,[e]),i||Ot,Ot,t.ownerSVGElement!==void 0,!n&&r?[r]:i?null:t.firstChild?$e.call(t.childNodes):null,o,!n&&r?r:i?i.__e:t.firstChild,n,s),qo(o,e,s)}function Yo(e,t){Mt(e,t,Yo)}function Gl(e,t,r){var n,i,o,s,a=Re({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?n=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?$e.call(arguments,2):r),rr(e.type,a,n||e.key,i||e.ref,null)}function Ae(e,t){var r={__c:t="__cC"+Io++,__:e,Consumer:function(n,i){return n.children(i)},Provider:function(n){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(a){a.__e=!0,Hn(a)})},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),n.children}};return r.Provider.__=r.Consumer.contextType=r}$e=No.slice,V={__e:function(e,t,r,n){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,n||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Oo=0,Mo=function(e){return e!=null&&e.constructor===void 0},xe.prototype.setState=function(e,t){var r;r=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Re({},this.state),typeof e=="function"&&(e=e(Re({},r),this.props)),e&&Re(r,e),e!=null&&this.__v&&(t&&this._sb.push(t),Hn(this))},xe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Hn(this))},xe.prototype.render=ee,pt=[],Do=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,zn=function(e,t){return e.__v.__b-t.__v.__b},Ir.__r=0,Io=0;var je,K,qn,Zo,Ft=0,Xo=[],Lr=[],Qo=V.__b,Jo=V.__r,es=V.diffed,ts=V.__c,rs=V.unmount;function ht(e,t){V.__h&&V.__h(K,e,Ft||t),Ft=0;var r=K.__H||(K.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:Lr}),r.__[e]}function ne(e){return Ft=1,Rr(ss,e)}function Rr(e,t,r){var n=ht(je++,2);if(n.t=e,!n.__c&&(n.__=[r?r(t):ss(void 0,t),function(a){var l=n.__N?n.__N[0]:n.__[0],u=n.t(l,a);l!==u&&(n.__N=[u,n.__[1]],n.__c.setState({}))}],n.__c=K,!K.u)){var i=function(a,l,u){if(!n.__c.__H)return!0;var d=n.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!o||o.call(this,a,l,u);var c=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(c=!0)}}),!(!c&&n.__c.props===a)&&(!o||o.call(this,a,l,u))};K.u=!0;var o=K.shouldComponentUpdate,s=K.componentWillUpdate;K.componentWillUpdate=function(a,l,u){if(this.__e){var d=o;o=void 0,i(a,l,u),o=d}s&&s.call(this,a,l,u)},K.shouldComponentUpdate=i}return n.__N||n.__}function H(e,t){var r=ht(je++,3);!V.__s&&Yn(r.__H,t)&&(r.__=e,r.i=t,K.__H.__h.push(r))}function Pe(e,t){var r=ht(je++,4);!V.__s&&Yn(r.__H,t)&&(r.__=e,r.i=t,K.__h.push(r))}function B(e){return Ft=5,oe(function(){return{current:e}},[])}function ns(e,t,r){Ft=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 oe(e,t){var r=ht(je++,7);return Yn(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function ae(e,t){return Ft=8,oe(function(){return e},t)}function fe(e){var t=K.context[e.__c],r=ht(je++,9);return r.c=e,t?(r.__==null&&(r.__=!0,t.sub(K)),t.props.value):e.__}function is(e,t){V.useDebugValue&&V.useDebugValue(t?t(e):e)}function Yl(e){var t=ht(je++,10),r=ne();return t.__=e,K.componentDidCatch||(K.componentDidCatch=function(n,i){t.__&&t.__(n,i),r[1](n)}),[r[0],function(){r[1](void 0)}]}function Br(){var e=ht(je++,11);if(!e.__){for(var t=K.__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 Zl(){for(var e;e=Xo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(jr),e.__H.__h.forEach(Gn),e.__H.__h=[]}catch(t){e.__H.__h=[],V.__e(t,e.__v)}}V.__b=function(e){K=null,Qo&&Qo(e)},V.__r=function(e){Jo&&Jo(e),je=0;var t=(K=e.__c).__H;t&&(qn===K?(t.__h=[],K.__h=[],t.__.forEach(function(r){r.__N&&(r.__=r.__N),r.__V=Lr,r.__N=r.i=void 0})):(t.__h.forEach(jr),t.__h.forEach(Gn),t.__h=[],je=0)),qn=K},V.diffed=function(e){es&&es(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Xo.push(t)!==1&&Zo===V.requestAnimationFrame||((Zo=V.requestAnimationFrame)||Xl)(Zl)),t.__H.__.forEach(function(r){r.i&&(r.__H=r.i),r.__V!==Lr&&(r.__=r.__V),r.i=void 0,r.__V=Lr})),qn=K=null},V.__c=function(e,t){t.some(function(r){try{r.__h.forEach(jr),r.__h=r.__h.filter(function(n){return!n.__||Gn(n)})}catch(n){t.some(function(i){i.__h&&(i.__h=[])}),t=[],V.__e(n,r.__v)}}),ts&&ts(e,t)},V.unmount=function(e){rs&&rs(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{jr(n)}catch(i){t=i}}),r.__H=void 0,t&&V.__e(t,r.__v))};var os=typeof requestAnimationFrame=="function";function Xl(e){var t,r=function(){clearTimeout(n),os&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);os&&(t=requestAnimationFrame(r))}function jr(e){var t=K,r=e.__c;typeof r=="function"&&(e.__c=void 0,r()),K=t}function Gn(e){var t=K;e.__c=e.__(),K=t}function Yn(e,t){return!e||e.length!==t.length||t.some(function(r,n){return r!==e[n]})}function ss(e,t){return typeof t=="function"?t(e):t}function Ur(){throw new Error("Cycle detected")}var Ql=Symbol.for("preact-signals");function zr(){if(Ye>1)Ye--;else{for(var e,t=!1;nr!==void 0;){var r=nr;for(nr=void 0,Zn++;r!==void 0;){var n=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&cs(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=n}}if(Zn=0,Ye--,t)throw e}}function Jl(e){if(Ye>0)return e();Ye++;try{return e()}finally{zr()}}var J=void 0,nr=void 0,Ye=0,Zn=0,Hr=0;function as(e){if(J!==void 0){var t=e.n;if(t===void 0||t.t!==J)return t={i:0,S:e,p:J.s,n:void 0,t:J,e:void 0,x:void 0,r:t},J.s!==void 0&&(J.s.n=t),J.s=t,e.n=t,32&J.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=J.s,t.n=void 0,J.s.n=t,J.s=t),t}}function ce(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ce.prototype.brand=Ql,ce.prototype.h=function(){return!0},ce.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)},ce.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)}},ce.prototype.subscribe=function(e){var t=this;return Qn(function(){var r=t.value,n=32&this.f;this.f&=-33;try{e(r)}finally{this.f|=n}})},ce.prototype.valueOf=function(){return this.value},ce.prototype.toString=function(){return this.value+""},ce.prototype.toJSON=function(){return this.value},ce.prototype.peek=function(){return this.v},Object.defineProperty(ce.prototype,"value",{get:function(){var e=as(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(J instanceof Ze&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Zn>100&&Ur(),this.v=e,this.i++,Hr++,Ye++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{zr()}}}});function ir(e){return new ce(e)}function cs(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 ls(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 us(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 Ze(e){ce.call(this,void 0),this.x=e,this.s=void 0,this.g=Hr-1,this.f=4}(Ze.prototype=new ce).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Hr))return!0;if(this.g=Hr,this.f|=1,this.i>0&&!cs(this))return this.f&=-2,!0;var e=J;try{ls(this),J=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 J=e,us(this),this.f&=-2,!0},Ze.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)}ce.prototype.S.call(this,e)},Ze.prototype.U=function(e){if(this.t!==void 0&&(ce.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)}},Ze.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ze.prototype.peek=function(){if(this.h()||Ur(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ze.prototype,"value",{get:function(){1&this.f&&Ur();var e=as(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function eu(e){return new Ze(e)}function ds(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ye++;var r=J;J=void 0;try{t()}catch(n){throw e.f&=-2,e.f|=8,Xn(e),n}finally{J=r,zr()}}}function Xn(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ds(e)}function tu(e){if(J!==this)throw new Error("Out-of-order effect");us(this),J=e,this.f&=-2,8&this.f&&Xn(this),zr()}function or(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}or.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()}},or.prototype.S=function(){1&this.f&&Ur(),this.f|=1,this.f&=-9,ds(this),ls(this),Ye++;var e=J;return J=this,tu.bind(this,e)},or.prototype.N=function(){2&this.f||(this.f|=2,this.o=nr,nr=this)},or.prototype.d=function(){this.f|=8,1&this.f||Xn(this)};function Qn(e){var t=new or(e);try{t.c()}catch(r){throw t.d(),r}return t.d.bind(t)}var Jn;function Dt(e,t){V[e]=t.bind(null,V[e]||function(){})}function Wr(e){Jn&&Jn(),Jn=e&&e.S()}function fs(e){var t=this,r=e.data,n=nu(r);n.value=r;var i=oe(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Mo(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},eu(function(){var s=n.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}fs.displayName="_st",Object.defineProperties(ce.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:fs},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),Dt("__b",function(e,t){if(typeof t.type=="string"){var r,n=t.props;for(var i in n)if(i!=="children"){var o=n[i];o instanceof ce&&(r||(t.__np=r={}),r[i]=o,n[i]=o.peek())}}e(t)}),Dt("__r",function(e,t){Wr();var r,n=t.__c;n&&(n.__$f&=-2,(r=n.__$u)===void 0&&(n.__$u=r=function(i){var o;return Qn(function(){o=this}),o.c=function(){n.__$f|=1,n.setState({})},o}())),Wr(r),e(t)}),Dt("__e",function(e,t,r,n){Wr(),e(t,r,n)}),Dt("diffed",function(e,t){Wr();var r;if(typeof t.type=="string"&&(r=t.__e)){var n=t.__np,i=t.props;if(n){var o=r.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in n)&&(a.d(),o[s]=void 0)}else r.U=o={};for(var l in n){var u=o[l],d=n[l];u===void 0?(u=ru(r,l,d,i),o[l]=u):u.o(d,i)}}}e(t)});function ru(e,t,r,n){var i=t in e&&e.ownerSVGElement===void 0,o=ir(r);return{o:function(s,a){o.value=s,n=a},d:Qn(function(){var s=o.value.value;n[t]!==s&&(n[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}Dt("unmount",function(e,t){if(typeof t.type=="string"){var r=t.__e;if(r){var n=r.U;if(n){r.U=void 0;for(var i in n){var o=n[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),Dt("__h",function(e,t,r,n){(n<3||n===9)&&(t.__$f|=2),e(t,r,n)}),xe.prototype.shouldComponentUpdate=function(e,t){var r=this.__$u;if(!(r&&r.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var n in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function nu(e){return oe(function(){return ir(e)},[])}var iu=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function It(e,t){if(!e)throw new Error(t)}function be(){return be=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},be.apply(this,arguments)}function ps(e,t){for(var r in t)e[r]=t[r];return e}function ei(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 ti(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Kr(e){this.props=e}function hs(e,t){function r(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:ei(this.props,i)}function n(i){return this.shouldComponentUpdate=r,M(e,i)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}(Kr.prototype=new xe).isPureReactComponent=!0,Kr.prototype.shouldComponentUpdate=function(e,t){return ei(this.props,e)||ei(this.state,t)};var ms=V.__b;V.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),ms&&ms(e)};var ou=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function pe(e){function t(r){var n=ps({},r);return delete n.ref,e(n,r.ref||null)}return t.$$typeof=ou,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var vs=function(e,t){return e==null?null:Be(Be(e).map(t))},Te={map:vs,forEach:vs,count:function(e){return e?Be(e).length:0},only:function(e){var t=Be(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Be},su=V.__e;V.__e=function(e,t,r,n){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t)}su(e,t,r,n)};var gs=V.unmount;function ys(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=ps({},e)).__c!=null&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(n){return ys(n,t,r)})),e}function bs(e,t,r){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(n){return bs(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 Nt(){this.__u=0,this.t=null,this.__b=null}function ws(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ri(e){var t,r,n;function i(o){if(t||(t=e()).then(function(s){r=s.default||s},function(s){n=s}),n)throw n;if(!r)throw t;return M(r,o)}return i.displayName="Lazy",i.__f=!0,i}function Lt(){this.u=null,this.o=null}V.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),gs&&gs(e)},(Nt.prototype=new xe).__c=function(e,t){var r=t.__c,n=this;n.t==null&&(n.t=[]),n.t.push(r);var i=ws(n.__v),o=!1,s=function(){o||(o=!0,r.__R=null,i?i(a):a())};r.__R=s;var a=function(){if(!--n.__u){if(n.state.__a){var u=n.state.__a;n.__v.__k[0]=bs(u,u.__c.__P,u.__c.__O)}var d;for(n.setState({__a:n.__b=null});d=n.t.pop();)d.forceUpdate()}},l=t.__h===!0;n.__u++||l||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(s,s)},Nt.prototype.componentWillUnmount=function(){this.t=[]},Nt.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]=ys(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&M(ee,null,e.fallback);return i&&(i.__h=null),[M(ee,null,t.__a?null:e.children),i]};var _s=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 au(e){return this.getChildContext=function(){return e.context},e.children}function cu(e){var t=this,r=e.i;t.componentWillUnmount=function(){Mt(null,t.l),t.l=null,t.i=null},t.i&&t.i!==r&&t.componentWillUnmount(),e.__v?(t.l||(t.i=r,t.l={nodeType:1,parentNode:r,childNodes:[],appendChild:function(n){this.childNodes.push(n),t.i.appendChild(n)},insertBefore:function(n,i){this.childNodes.push(n),t.i.appendChild(n)},removeChild:function(n){this.childNodes.splice(this.childNodes.indexOf(n)>>>1,1),t.i.removeChild(n)}}),Mt(M(au,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function xs(e,t){var r=M(cu,{__v:e,i:t});return r.containerInfo=t,r}(Lt.prototype=new xe).__a=function(e){var t=this,r=ws(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),_s(t,e,n)):i()};r?r(o):o()}},Lt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Be(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},Lt.prototype.componentDidUpdate=Lt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,r){_s(e,r,t)})};var ks=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,lu=/^(?: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]/,uu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,du=/[A-Z0-9]/g,fu=typeof document<"u",pu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Ss(e,t,r){return t.__k==null&&(t.textContent=""),Mt(e,t),typeof r=="function"&&r(),e?e.__c:null}function Cs(e,t,r){return Yo(e,t),typeof r=="function"&&r(),e?e.__c:null}xe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(xe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var $s=V.event;function hu(){}function mu(){return this.cancelBubble}function vu(){return this.defaultPrevented}V.event=function(e){return $s&&(e=$s(e)),e.persist=hu,e.isPropagationStopped=mu,e.isDefaultPrevented=vu,e.nativeEvent=e};var ni,gu={enumerable:!1,configurable:!0,get:function(){return this.class}},As=V.vnode;V.vnode=function(e){typeof e.type=="string"&&function(t){var r=t.props,n=t.type,i={};for(var o in r){var s=r[o];if(!(o==="value"&&"defaultValue"in r&&s==null||fu&&o==="children"&&n==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in r&&r.value==null?o="value":o==="download"&&s===!0?s="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||n!=="input"&&n!=="textarea"||pu(r.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":uu.test(o)?o=a:n.indexOf("-")===-1&&lu.test(o)?o=o.replace(du,"-$&").toLowerCase():s===null&&(s=void 0):a=o="oninput",a==="oninput"&&i[o=a]&&(o="oninputCapture"),i[o]=s}}n=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Be(r.children).forEach(function(l){l.props.selected=i.value.indexOf(l.props.value)!=-1})),n=="select"&&i.defaultValue!=null&&(i.value=Be(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",gu)):(r.className&&!r.class||r.class&&r.className)&&(i.class=i.className=r.className),t.props=i}(e),e.$$typeof=ks,As&&As(e)};var Ps=V.__r;V.__r=function(e){Ps&&Ps(e),ni=e.__c};var Es=V.diffed;V.diffed=function(e){Es&&Es(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),ni=null};var Vs={ReactCurrentDispatcher:{current:{readContext:function(e){return ni.__n[e.__c].props.value}}}},yu="17.0.2";function Ts(e){return M.bind(null,e)}function Xe(e){return!!e&&e.$$typeof===ks}function Qe(e){return Xe(e)?Gl.apply(null,arguments):e}function Os(e){return!!e.__k&&(Mt(null,e),!0)}function Ms(e){return e&&(e.base||e.nodeType===1&&e)||null}var Fs=function(e,t){return e(t)},qr=function(e,t){return e(t)},Ds=ee;function ii(e){e()}function Is(e){return e}function Ns(){return[!1,ii]}var Gr=Pe;function Ls(e,t){var r=t(),n=ne({h:{__:r,v:t}}),i=n[0].h,o=n[1];return Pe(function(){i.__=r,i.v=t,ti(i.__,t())||o({h:i})},[e,r,t]),H(function(){return ti(i.__,i.v())||o({h:i}),e(function(){ti(i.__,i.v())||o({h:i})})},[e]),r}var Ee={useState:ne,useId:Br,useReducer:Rr,useEffect:H,useLayoutEffect:Pe,useInsertionEffect:Gr,useTransition:Ns,useDeferredValue:Is,useSyncExternalStore:Ls,startTransition:ii,useRef:B,useImperativeHandle:ns,useMemo:oe,useCallback:ae,useContext:fe,useDebugValue:is,version:"17.0.2",Children:Te,render:Ss,hydrate:Cs,unmountComponentAtNode:Os,createPortal:xs,createElement:M,createContext:Ae,createFactory:Ts,cloneElement:Qe,createRef:Ro,Fragment:ee,isValidElement:Xe,findDOMNode:Ms,Component:xe,PureComponent:Kr,memo:hs,forwardRef:pe,flushSync:qr,unstable_batchedUpdates:Fs,StrictMode:Ds,Suspense:Nt,SuspenseList:Lt,lazy:ri,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Vs};const bu=Object.freeze(Object.defineProperty({__proto__:null,Children:Te,Component:xe,Fragment:ee,PureComponent:Kr,StrictMode:Ds,Suspense:Nt,SuspenseList:Lt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Vs,cloneElement:Qe,createContext:Ae,createElement:M,createFactory:Ts,createPortal:xs,createRef:Ro,default:Ee,findDOMNode:Ms,flushSync:qr,forwardRef:pe,hydrate:Cs,isValidElement:Xe,lazy:ri,memo:hs,render:Ss,startTransition:ii,unmountComponentAtNode:Os,unstable_batchedUpdates:Fs,useCallback:ae,useContext:fe,useDebugValue:is,useDeferredValue:Is,useEffect:H,useErrorBoundary:Yl,useId:Br,useImperativeHandle:ns,useInsertionEffect:Gr,useLayoutEffect:Pe,useMemo:oe,useReducer:Rr,useRef:B,useState:ne,useSyncExternalStore:Ls,useTransition:Ns,version:yu},Symbol.toStringTag,{value:"Module"}));function Rt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(i){if(e==null||e(i),r===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function wu(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Rs(...e){return t=>e.forEach(r=>wu(r,t))}function sr(...e){return ae(Rs(...e),e)}function _u(e,t=[]){let r=[];function n(o,s){const a=Ae(s),l=r.length;r=[...r,s];function u(c){const{scope:f,children:p,...h}=c,v=(f==null?void 0:f[e][l])||a,w=oe(()=>h,Object.values(h));return M(v.Provider,{value:w},p)}function d(c,f){const p=(f==null?void 0:f[e][l])||a,h=fe(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=r.map(s=>Ae(s));return function(a){const l=(a==null?void 0:a[e])||o;return oe(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[n,xu(i,...t)]}function xu(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=n.reduce((a,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...a,...c}},{});return oe(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}const oi=globalThis!=null&&globalThis.document?Pe:()=>{},ku=bu["useId".toString()]||(()=>{});let Su=0;function si(e){const[t,r]=ne(ku());return oi(()=>{e||r(n=>n??String(Su++))},[e]),e||(t?`radix-${t}`:"")}function mt(e){const t=B(e);return H(()=>{t.current=e}),oe(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function Cu({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,i]=$u({defaultProp:t,onChange:r}),o=e!==void 0,s=o?e:n,a=mt(r),l=ae(u=>{if(o){const c=typeof u=="function"?u(e):u;c!==e&&a(c)}else i(u)},[o,e,i,a]);return[s,l]}function $u({defaultProp:e,onChange:t}){const r=ne(e),[n]=r,i=B(n),o=mt(t);return H(()=>{i.current!==n&&(o(n),i.current=n)},[n,i,o]),r}const ai=pe((e,t)=>{const{children:r,...n}=e,i=Te.toArray(r),o=i.find(Pu);if(o){const s=o.props.children,a=i.map(l=>l===o?Te.count(s)>1?Te.only(null):Xe(s)?s.props.children:null:l);return M(ci,be({},n,{ref:t}),Xe(s)?Qe(s,void 0,a):null)}return M(ci,be({},n,{ref:t}),r)});ai.displayName="Slot";const ci=pe((e,t)=>{const{children:r,...n}=e;return Xe(r)?Qe(r,{...Eu(n,r.props),ref:t?Rs(t,r.ref):r.ref}):Te.count(r)>1?Te.only(null):null});ci.displayName="SlotClone";const Au=({children:e})=>M(ee,null,e);function Pu(e){return Xe(e)&&e.type===Au}function Eu(e,t){const r={...t};for(const n in t){const i=e[n],o=t[n];/^on[A-Z]/.test(n)?i&&o?r[n]=(...a)=>{o(...a),i(...a)}:i&&(r[n]=i):n==="style"?r[n]={...i,...o}:n==="className"&&(r[n]=[i,o].filter(Boolean).join(" "))}return{...e,...r}}const li=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=pe((n,i)=>{const{asChild:o,...s}=n,a=o?ai:t;return H(()=>{window[Symbol.for("radix-ui")]=!0},[]),M(a,be({},s,{ref:i}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Vu(e,t){e&&qr(()=>e.dispatchEvent(t))}function Tu(e,t=globalThis==null?void 0:globalThis.document){const r=mt(e);H(()=>{const n=i=>{i.key==="Escape"&&r(i)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const ui="dismissableLayer.update",Ou="dismissableLayer.pointerDownOutside",Mu="dismissableLayer.focusOutside";let Bs;const Fu=Ae({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Du=pe((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...u}=e,d=fe(Fu),[c,f]=ne(null),p=(r=c==null?void 0:c.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,h]=ne({}),v=sr(t,A=>f(A)),w=Array.from(d.layers),[k]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=w.indexOf(k),_=c?w.indexOf(c):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,S=_>=y,N=Iu(A=>{const E=A.target,W=[...d.branches].some(Q=>Q.contains(E));!S||W||(o==null||o(A),a==null||a(A),A.defaultPrevented||l==null||l())},p),D=Nu(A=>{const E=A.target;[...d.branches].some(Q=>Q.contains(E))||(s==null||s(A),a==null||a(A),A.defaultPrevented||l==null||l())},p);return Tu(A=>{_===d.layers.size-1&&(i==null||i(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},p),H(()=>{if(c)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Bs=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(c)),d.layers.add(c),js(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Bs)}},[c,p,n,d]),H(()=>()=>{c&&(d.layers.delete(c),d.layersWithOutsidePointerEventsDisabled.delete(c),js())},[c,d]),H(()=>{const A=()=>h({});return document.addEventListener(ui,A),()=>document.removeEventListener(ui,A)},[]),M(li.div,be({},u,{ref:v,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:Rt(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Rt(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Rt(e.onPointerDownCapture,N.onPointerDownCapture)}))});function Iu(e,t=globalThis==null?void 0:globalThis.document){const r=mt(e),n=B(!1),i=B(()=>{});return H(()=>{const o=a=>{if(a.target&&!n.current){let u=function(){Us(Ou,r,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Nu(e,t=globalThis==null?void 0:globalThis.document){const r=mt(e),n=B(!1);return H(()=>{const i=o=>{o.target&&!n.current&&Us(Mu,r,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function js(){const e=new CustomEvent(ui);document.dispatchEvent(e)}function Us(e,t,r,{discrete:n}){const i=r.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&i.addEventListener(e,t,{once:!0}),n?Vu(i,o):i.dispatchEvent(o)}const di="focusScope.autoFocusOnMount",fi="focusScope.autoFocusOnUnmount",zs={bubbles:!1,cancelable:!0},Lu=pe((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=ne(null),u=mt(i),d=mt(o),c=B(null),f=sr(t,v=>l(v)),p=B({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;H(()=>{if(n){let v=function(_){if(p.paused||!a)return;const C=_.target;a.contains(C)?c.current=C:Je(c.current,{select:!0})},w=function(_){if(p.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||Je(c.current,{select:!0}))},k=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&Je(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",w);const y=new MutationObserver(k);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",w),y.disconnect()}}},[n,a,p.paused]),H(()=>{if(a){Ks.add(p);const v=document.activeElement;if(!a.contains(v)){const k=new CustomEvent(di,zs);a.addEventListener(di,u),a.dispatchEvent(k),k.defaultPrevented||(Ru(Hu(Hs(a)),{select:!0}),document.activeElement===v&&Je(a))}return()=>{a.removeEventListener(di,u),setTimeout(()=>{const k=new CustomEvent(fi,zs);a.addEventListener(fi,d),a.dispatchEvent(k),k.defaultPrevented||Je(v??document.body,{select:!0}),a.removeEventListener(fi,d),Ks.remove(p)},0)}}},[a,u,d,p]);const h=ae(v=>{if(!r&&!n||p.paused)return;const w=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,k=document.activeElement;if(w&&k){const y=v.currentTarget,[_,C]=Bu(y);_&&C?!v.shiftKey&&k===C?(v.preventDefault(),r&&Je(_,{select:!0})):v.shiftKey&&k===_&&(v.preventDefault(),r&&Je(C,{select:!0})):k===y&&v.preventDefault()}},[r,n,p.paused]);return M(li.div,be({tabIndex:-1},s,{ref:f,onKeyDown:h}))});function Ru(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Je(n,{select:t}),document.activeElement!==r)return}function Bu(e){const t=Hs(e),r=Ws(t,e),n=Ws(t.reverse(),e);return[r,n]}function Hs(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const i=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||i?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ws(e,t){for(const r of e)if(!ju(r,{upTo:t}))return r}function ju(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 Uu(e){return e instanceof HTMLInputElement&&"select"in e}function Je(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Uu(e)&&t&&e.select()}}const Ks=zu();function zu(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=qs(e,t),e.unshift(t)},remove(t){var r;e=qs(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function qs(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Hu(e){return e.filter(t=>t.tagName!=="A")}function Wu(e,t){return Rr((r,n)=>{const i=t[r][n];return i??r},e)}const pi=e=>{const{present:t,children:r}=e,n=Ku(t),i=typeof r=="function"?r({present:n.isPresent}):Te.only(r),o=sr(n.ref,i.ref);return typeof r=="function"||n.isPresent?Qe(i,{ref:o}):null};pi.displayName="Presence";function Ku(e){const[t,r]=ne(),n=B({}),i=B(e),o=B("none"),s=e?"mounted":"unmounted",[a,l]=Wu(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return H(()=>{const u=Yr(n.current);o.current=a==="mounted"?u:"none"},[a]),oi(()=>{const u=n.current,d=i.current;if(d!==e){const f=o.current,p=Yr(u);e?l("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),oi(()=>{if(t){const u=c=>{const p=Yr(n.current).includes(c.animationName);c.target===t&&p&&qr(()=>l("ANIMATION_END"))},d=c=>{c.target===t&&(o.current=Yr(n.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:ae(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Yr(e){return(e==null?void 0:e.animationName)||"none"}let hi=0;function qu(){H(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Gs()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Gs()),hi++,()=>{hi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),hi--}},[])}function Gs(){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 Oe=function(){return Oe=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t},Oe.apply(this,arguments)};function Ys(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function Gu(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,o;n<i;n++)(o||!(n in t))&&(o||(o=Array.prototype.slice.call(t,0,n)),o[n]=t[n]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Zr="right-scroll-bar-position",Xr="width-before-scroll-bar",Yu="with-scroll-bars-hidden",Zu="--removed-body-scroll-bar-size";function Xu(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Qu(e,t){var r=ne(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var i=r.value;i!==n&&(r.value=n,r.callback(n,i))}}}})[0];return r.callback=t,r.facade}function Ju(e,t){return Qu(t||null,function(r){return e.forEach(function(n){return Xu(n,r)})})}function ed(e){return e}function td(e,t){t===void 0&&(t=ed);var r=[],n=!1,i={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(o){var s=t(o,n);return r.push(s),function(){r=r.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(n=!0;r.length;){var s=r;r=[],s.forEach(o)}r={push:function(a){return o(a)},filter:function(){return r}}},assignMedium:function(o){n=!0;var s=[];if(r.length){var a=r;r=[],a.forEach(o),s=r}var l=function(){var d=s;s=[],d.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),r}}}};return i}function rd(e){e===void 0&&(e={});var t=td(null);return t.options=Oe({async:!0,ssr:!1},e),t}var Zs=function(e){var t=e.sideCar,r=Ys(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,Oe({},r))};Zs.isSideCarExport=!0;function nd(e,t){return e.useMedium(t),Zs}var Xs=rd(),mi=function(){},Qr=pe(function(e,t){var r=B(null),n=ne({onScrollCapture:mi,onWheelCapture:mi,onTouchMoveCapture:mi}),i=n[0],o=n[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,c=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,v=e.allowPinchZoom,w=e.as,k=w===void 0?"div":w,y=Ys(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,C=Ju([r,t]),S=Oe(Oe({},y),i);return M(ee,null,d&&M(_,{sideCar:Xs,removeScrollBar:u,shards:c,noIsolation:p,inert:h,setCallbacks:o,allowPinchZoom:!!v,lockRef:r}),s?Qe(Te.only(a),Oe(Oe({},S),{ref:C})):M(k,Oe({},S,{className:l,ref:C}),a))});Qr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Qr.classNames={fullWidth:Xr,zeroRight:Zr};var Qs,id=function(){if(Qs)return Qs;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function od(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=id();return t&&e.setAttribute("nonce",t),e}function sd(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ad(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cd=function(){var e=0,t=null;return{add:function(r){e==0&&(t=od())&&(sd(t,r),ad(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ld=function(){var e=cd();return function(t,r){H(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Js=function(){var e=ld(),t=function(r){var n=r.styles,i=r.dynamic;return e(n,i),null};return t},ud={left:0,top:0,right:0,gap:0},vi=function(e){return parseInt(e||"",10)||0},dd=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[vi(r),vi(n),vi(i)]},fd=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ud;var t=dd(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])}},pd=Js(),hd=function(e,t,r,n){var i=e.left,o=e.top,s=e.right,a=e.gap;return r===void 0&&(r="margin"),`
|
|
2
|
-
.`.concat(
|
|
3
|
-
overflow: hidden `).concat(
|
|
4
|
-
padding-right: `).concat(a,"px ").concat(
|
|
1
|
+
var Dg=Object.defineProperty;var Ig=(ft,Le,$e)=>Le in ft?Dg(ft,Le,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ft[Le]=$e;var Wl=(ft,Le,$e)=>(Ig(ft,typeof Le!="symbol"?Le+"":Le,$e),$e);(function(){"use strict";var ft=e=>e,Le=class extends Error{constructor(){super("Not found"),this.name="NotFoundError"}},$e,V,Fo,Do,pt,Io,No,Hr,Lo,Mt={},Ro=[],Kl=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Nn=Array.isArray;function Re(e,t){for(var n in t)e[n]=t[n];return e}function Bo(e){var t=e.parentNode;t&&t.removeChild(e)}function M(e,t,n){var r,i,o,s={};for(o in t)o=="key"?r=t[o]:o=="ref"?i=t[o]:s[o]=t[o];if(arguments.length>2&&(s.children=arguments.length>3?$e.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return rn(e,s,r,i,null)}function rn(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:i??++Fo};return i==null&&V.vnode!=null&&V.vnode(o),o}function jo(){return{current:null}}function ee(e){return e.children}function xe(e,t){this.props=e,this.context=t}function Ln(e,t){if(t==null)return e.__?Ln(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ln(e):null}function Uo(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Uo(e)}}function Wr(e){(!e.__d&&(e.__d=!0)&&pt.push(e)&&!Rn.__r++||Io!==V.debounceRendering)&&((Io=V.debounceRendering)||No)(Rn)}function Rn(){var e,t,n,r,i,o,s,a,c;for(pt.sort(Hr);e=pt.shift();)e.__d&&(t=pt.length,r=void 0,i=void 0,o=void 0,a=(s=(n=e).__v).__e,(c=n.__P)&&(r=[],i=[],(o=Re({},s)).__v=s.__v+1,Kr(c,s,o,n.__n,c.ownerSVGElement!==void 0,s.__h!=null?[a]:null,r,a??Ln(s),s.__h,i),Yo(r,s,i),s.__e!=a&&Uo(s)),pt.length>t&&pt.sort(Hr));Rn.__r=0}function zo(e,t,n,r,i,o,s,a,c,u,d){var l,f,p,h,v,b,k,y,_,C,S=0,N=r&&r.__k||Ro,D=N.length,A=D,E=t.length;for(n.__k=[],l=0;l<E;l++)(h=n.__k[l]=(h=t[l])==null||typeof h=="boolean"||typeof h=="function"?null:typeof h=="string"||typeof h=="number"||typeof h=="bigint"?rn(null,h,null,null,h):Nn(h)?rn(ee,{children:h},null,null,null):h.__b>0?rn(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)!=null&&(h.__=n,h.__b=n.__b+1,(y=ql(h,N,k=l+S,A))===-1?p=Mt:(p=N[y]||Mt,N[y]=void 0,A--),Kr(e,h,p,i,o,s,a,c,u,d),v=h.__e,(f=h.ref)&&p.ref!=f&&(p.ref&&qr(p.ref,null,h),d.push(f,h.__c||v,h)),v!=null&&(b==null&&(b=v),C=!(_=p===Mt||p.__v===null)&&y===k,_?y==-1&&S--:y!==k&&(y===k+1?(S++,C=!0):y>k?A>E-k?(S+=y-k,C=!0):S--:S=y<k&&y==k-1?y-k:0),k=l+S,C=C||y==l&&!_,typeof h.type!="function"||y===k&&p.__k!==h.__k?typeof h.type=="function"||C?h.__d!==void 0?(c=h.__d,h.__d=void 0):c=v.nextSibling:c=Wo(e,v,c):c=Ho(h,c,e),typeof n.type=="function"&&(n.__d=c)));for(n.__e=b,l=D;l--;)N[l]!=null&&(typeof n.type=="function"&&N[l].__e!=null&&N[l].__e==n.__d&&(n.__d=N[l].__e.nextSibling),Zo(N[l],N[l]))}function Ho(e,t,n){for(var r,i=e.__k,o=0;i&&o<i.length;o++)(r=i[o])&&(r.__=e,t=typeof r.type=="function"?Ho(r,t,n):Wo(n,r.__e,t));return t}function Be(e,t){return t=t||[],e==null||typeof e=="boolean"||(Nn(e)?e.some(function(n){Be(n,t)}):t.push(e)),t}function Wo(e,t,n){return n==null||n.parentNode!==e?e.insertBefore(t,null):t==n&&t.parentNode!=null||e.insertBefore(t,n),t.nextSibling}function ql(e,t,n,r){var i=e.key,o=e.type,s=n-1,a=n+1,c=t[n];if(c===null||c&&i==c.key&&o===c.type)return n;if(r>(c!=null?1:0))for(;s>=0||a<t.length;){if(s>=0){if((c=t[s])&&i==c.key&&o===c.type)return s;s--}if(a<t.length){if((c=t[a])&&i==c.key&&o===c.type)return a;a++}}return-1}function Gl(e,t,n,r,i){var o;for(o in n)o==="children"||o==="key"||o in t||Bn(e,o,null,n[o],r);for(o in t)i&&typeof t[o]!="function"||o==="children"||o==="key"||o==="value"||o==="checked"||n[o]===t[o]||Bn(e,o,t[o],n[o],r)}function Ko(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Kl.test(t)?n:n+"px"}function Bn(e,t,n,r,i){var o;e:if(t==="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Ko(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Ko(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")o=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r||e.addEventListener(t,o?Go:qo,o):e.removeEventListener(t,o?Go:qo,o);else if(t!=="dangerouslySetInnerHTML"){if(i)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!=="width"&&t!=="height"&&t!=="href"&&t!=="list"&&t!=="form"&&t!=="tabIndex"&&t!=="download"&&t!=="rowSpan"&&t!=="colSpan"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}function qo(e){return this.l[e.type+!1](V.event?V.event(e):e)}function Go(e){return this.l[e.type+!0](V.event?V.event(e):e)}function Kr(e,t,n,r,i,o,s,a,c,u){var d,l,f,p,h,v,b,k,y,_,C,S,N,D,A,E=t.type;if(t.constructor!==void 0)return null;n.__h!=null&&(c=n.__h,a=t.__e=n.__e,t.__h=null,o=[a]),(d=V.__b)&&d(t);try{e:if(typeof E=="function"){if(k=t.props,y=(d=E.contextType)&&r[d.__c],_=d?y?y.props.value:d.__:r,n.__c?b=(l=t.__c=n.__c).__=l.__E:("prototype"in E&&E.prototype.render?t.__c=l=new E(k,_):(t.__c=l=new xe(k,_),l.constructor=E,l.render=Zl),y&&y.sub(l),l.props=k,l.state||(l.state={}),l.context=_,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),E.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Re({},l.__s)),Re(l.__s,E.getDerivedStateFromProps(k,l.__s))),p=l.props,h=l.state,l.__v=t,f)E.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(E.getDerivedStateFromProps==null&&k!==p&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(k,_),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(k,l.__s,_)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=k,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(W){W&&(W.__=t)}),C=0;C<l._sb.length;C++)l.__h.push(l._sb[C]);l._sb=[],l.__h.length&&s.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(k,l.__s,_),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(p,h,v)})}if(l.context=_,l.props=k,l.__P=e,l.__e=!1,S=V.__r,N=0,"prototype"in E&&E.prototype.render){for(l.state=l.__s,l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),D=0;D<l._sb.length;D++)l.__h.push(l._sb[D]);l._sb=[]}else do l.__d=!1,S&&S(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++N<25);l.state=l.__s,l.getChildContext!=null&&(r=Re(Re({},r),l.getChildContext())),f||l.getSnapshotBeforeUpdate==null||(v=l.getSnapshotBeforeUpdate(p,h)),zo(e,Nn(A=d!=null&&d.type===ee&&d.key==null?d.props.children:d)?A:[A],t,n,r,i,o,s,a,c,u),l.base=t.__e,t.__h=null,l.__h.length&&s.push(l),b&&(l.__E=l.__=null)}else o==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Yl(n.__e,t,n,r,i,o,s,c,u);(d=V.diffed)&&d(t)}catch(W){t.__v=null,(c||o!=null)&&(t.__e=a,t.__h=!!c,o[o.indexOf(a)]=null),V.__e(W,t,n)}}function Yo(e,t,n){for(var r=0;r<n.length;r++)qr(n[r],n[++r],n[++r]);V.__c&&V.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){V.__e(o,i.__v)}})}function Yl(e,t,n,r,i,o,s,a,c){var u,d,l,f=n.props,p=t.props,h=t.type,v=0;if(h==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((u=o[v])&&"setAttribute"in u==!!h&&(h?u.localName===h:u.nodeType===3)){e=u,o[v]=null;break}}if(e==null){if(h===null)return document.createTextNode(p);e=i?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,p.is&&p),o=null,a=!1}if(h===null)f===p||a&&e.data===p||(e.data=p);else{if(o=o&&$e.call(e.childNodes),d=(f=n.props||Mt).dangerouslySetInnerHTML,l=p.dangerouslySetInnerHTML,!a){if(o!=null)for(f={},v=0;v<e.attributes.length;v++)f[e.attributes[v].name]=e.attributes[v].value;(l||d)&&(l&&(d&&l.__html==d.__html||l.__html===e.innerHTML)||(e.innerHTML=l&&l.__html||""))}if(Gl(e,p,f,i,a),l)t.__k=[];else if(zo(e,Nn(v=t.props.children)?v:[v],t,n,r,i&&h!=="foreignObject",o,s,o?o[0]:n.__k&&Ln(n,0),a,c),o!=null)for(v=o.length;v--;)o[v]!=null&&Bo(o[v]);a||("value"in p&&(v=p.value)!==void 0&&(v!==e.value||h==="progress"&&!v||h==="option"&&v!==f.value)&&Bn(e,"value",v,f.value,!1),"checked"in p&&(v=p.checked)!==void 0&&v!==e.checked&&Bn(e,"checked",v,f.checked,!1))}return e}function qr(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){V.__e(r,n)}}function Zo(e,t,n){var r,i;if(V.unmount&&V.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||qr(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){V.__e(o,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Zo(r[i],t,n||typeof e.type!="function");n||e.__e==null||Bo(e.__e),e.__=e.__e=e.__d=void 0}function Zl(e,t,n){return this.constructor(e,n)}function Ft(e,t,n){var r,i,o,s;V.__&&V.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],Kr(t,e=(!r&&n||t).__k=M(ee,null,[e]),i||Mt,Mt,t.ownerSVGElement!==void 0,!r&&n?[n]:i?null:t.firstChild?$e.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),Yo(o,e,s)}function Xo(e,t){Ft(e,t,Xo)}function Xl(e,t,n){var r,i,o,s,a=Re({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!==void 0?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?$e.call(arguments,2):n),rn(e.type,a,r||e.key,i||e.ref,null)}function Ae(e,t){var n={__c:t="__cC"+Lo++,__:e,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=[],(o={})[t]=this,this.getChildContext=function(){return o},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.some(function(a){a.__e=!0,Wr(a)})},this.sub=function(s){i.push(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i.splice(i.indexOf(s),1),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}$e=Ro.slice,V={__e:function(e,t,n,r){for(var i,o,s;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},Fo=0,Do=function(e){return e!=null&&e.constructor===void 0},xe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Re({},this.state),typeof e=="function"&&(e=e(Re({},n),this.props)),e&&Re(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Wr(this))},xe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Wr(this))},xe.prototype.render=ee,pt=[],No=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Hr=function(e,t){return e.__v.__b-t.__v.__b},Rn.__r=0,Lo=0;var je,K,Gr,Qo,Dt=0,Jo=[],jn=[],es=V.__b,ts=V.__r,ns=V.diffed,rs=V.__c,is=V.unmount;function ht(e,t){V.__h&&V.__h(K,e,Dt||t),Dt=0;var n=K.__H||(K.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:jn}),n.__[e]}function re(e){return Dt=1,Un(cs,e)}function Un(e,t,n){var r=ht(je++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):cs(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=K,!K.u)){var i=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return f.__c});if(d.every(function(f){return!f.__N}))return!o||o.call(this,a,c,u);var l=!1;return d.forEach(function(f){if(f.__N){var p=f.__[0];f.__=f.__N,f.__N=void 0,p!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!o||o.call(this,a,c,u))};K.u=!0;var o=K.shouldComponentUpdate,s=K.componentWillUpdate;K.componentWillUpdate=function(a,c,u){if(this.__e){var d=o;o=void 0,i(a,c,u),o=d}s&&s.call(this,a,c,u)},K.shouldComponentUpdate=i}return r.__N||r.__}function H(e,t){var n=ht(je++,3);!V.__s&&Zr(n.__H,t)&&(n.__=e,n.i=t,K.__H.__h.push(n))}function Pe(e,t){var n=ht(je++,4);!V.__s&&Zr(n.__H,t)&&(n.__=e,n.i=t,K.__h.push(n))}function B(e){return Dt=5,oe(function(){return{current:e}},[])}function os(e,t,n){Dt=6,Pe(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function oe(e,t){var n=ht(je++,7);return Zr(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function ae(e,t){return Dt=8,oe(function(){return e},t)}function fe(e){var t=K.context[e.__c],n=ht(je++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(K)),t.props.value):e.__}function ss(e,t){V.useDebugValue&&V.useDebugValue(t?t(e):e)}function Ql(e){var t=ht(je++,10),n=re();return t.__=e,K.componentDidCatch||(K.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function zn(){var e=ht(je++,11);if(!e.__){for(var t=K.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Jl(){for(var e;e=Jo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Hn),e.__H.__h.forEach(Yr),e.__H.__h=[]}catch(t){e.__H.__h=[],V.__e(t,e.__v)}}V.__b=function(e){K=null,es&&es(e)},V.__r=function(e){ts&&ts(e),je=0;var t=(K=e.__c).__H;t&&(Gr===K?(t.__h=[],K.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=jn,n.__N=n.i=void 0})):(t.__h.forEach(Hn),t.__h.forEach(Yr),t.__h=[],je=0)),Gr=K},V.diffed=function(e){ns&&ns(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Jo.push(t)!==1&&Qo===V.requestAnimationFrame||((Qo=V.requestAnimationFrame)||eu)(Jl)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==jn&&(n.__=n.__V),n.i=void 0,n.__V=jn})),Gr=K=null},V.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Hn),n.__h=n.__h.filter(function(r){return!r.__||Yr(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],V.__e(r,n.__v)}}),rs&&rs(e,t)},V.unmount=function(e){is&&is(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Hn(r)}catch(i){t=i}}),n.__H=void 0,t&&V.__e(t,n.__v))};var as=typeof requestAnimationFrame=="function";function eu(e){var t,n=function(){clearTimeout(r),as&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);as&&(t=requestAnimationFrame(n))}function Hn(e){var t=K,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),K=t}function Yr(e){var t=K;e.__c=e.__(),K=t}function Zr(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function cs(e,t){return typeof t=="function"?t(e):t}function Wn(){throw new Error("Cycle detected")}var tu=Symbol.for("preact-signals");function Kn(){if(Ye>1)Ye--;else{for(var e,t=!1;on!==void 0;){var n=on;for(on=void 0,Xr++;n!==void 0;){var r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&us(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(Xr=0,Ye--,t)throw e}}function nu(e){if(Ye>0)return e();Ye++;try{return e()}finally{Kn()}}var J=void 0,on=void 0,Ye=0,Xr=0,qn=0;function ls(e){if(J!==void 0){var t=e.n;if(t===void 0||t.t!==J)return t={i:0,S:e,p:J.s,n:void 0,t:J,e:void 0,x:void 0,r:t},J.s!==void 0&&(J.s.n=t),J.s=t,e.n=t,32&J.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=J.s,t.n=void 0,J.s.n=t,J.s=t),t}}function ce(e){this.v=e,this.i=0,this.n=void 0,this.t=void 0}ce.prototype.brand=tu,ce.prototype.h=function(){return!0},ce.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)},ce.prototype.U=function(e){if(this.t!==void 0){var t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n)}},ce.prototype.subscribe=function(e){var t=this;return Jr(function(){var n=t.value,r=32&this.f;this.f&=-33;try{e(n)}finally{this.f|=r}})},ce.prototype.valueOf=function(){return this.value},ce.prototype.toString=function(){return this.value+""},ce.prototype.toJSON=function(){return this.value},ce.prototype.peek=function(){return this.v},Object.defineProperty(ce.prototype,"value",{get:function(){var e=ls(this);return e!==void 0&&(e.i=this.i),this.v},set:function(e){if(J instanceof Ze&&function(){throw new Error("Computed cannot have side-effects")}(),e!==this.v){Xr>100&&Wn(),this.v=e,this.i++,qn++,Ye++;try{for(var t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Kn()}}}});function sn(e){return new ce(e)}function us(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 ds(e){for(var t=e.s;t!==void 0;t=t.n){var n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function fs(e){for(var t=e.s,n=void 0;t!==void 0;){var r=t.p;t.i===-1?(t.S.U(t),r!==void 0&&(r.n=t.n),t.n!==void 0&&(t.n.p=r)):n=t,t.S.n=t.r,t.r!==void 0&&(t.r=void 0),t=r}e.s=n}function Ze(e){ce.call(this,void 0),this.x=e,this.s=void 0,this.g=qn-1,this.f=4}(Ze.prototype=new ce).h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===qn))return!0;if(this.g=qn,this.f|=1,this.i>0&&!us(this))return this.f&=-2,!0;var e=J;try{ds(this),J=this;var t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(n){this.v=n,this.f|=16,this.i++}return J=e,fs(this),this.f&=-2,!0},Ze.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)}ce.prototype.S.call(this,e)},Ze.prototype.U=function(e){if(this.t!==void 0&&(ce.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)}},Ze.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var e=this.t;e!==void 0;e=e.x)e.t.N()}},Ze.prototype.peek=function(){if(this.h()||Wn(),16&this.f)throw this.v;return this.v},Object.defineProperty(Ze.prototype,"value",{get:function(){1&this.f&&Wn();var e=ls(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}});function ru(e){return new Ze(e)}function ps(e){var t=e.u;if(e.u=void 0,typeof t=="function"){Ye++;var n=J;J=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,Qr(e),r}finally{J=n,Kn()}}}function Qr(e){for(var t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,ps(e)}function iu(e){if(J!==this)throw new Error("Out-of-order effect");fs(this),J=e,this.f&=-2,8&this.f&&Qr(this),Kn()}function an(e){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}an.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()}},an.prototype.S=function(){1&this.f&&Wn(),this.f|=1,this.f&=-9,ps(this),ds(this),Ye++;var e=J;return J=this,iu.bind(this,e)},an.prototype.N=function(){2&this.f||(this.f|=2,this.o=on,on=this)},an.prototype.d=function(){this.f|=8,1&this.f||Qr(this)};function Jr(e){var t=new an(e);try{t.c()}catch(n){throw t.d(),n}return t.d.bind(t)}var ei;function It(e,t){V[e]=t.bind(null,V[e]||function(){})}function Gn(e){ei&&ei(),ei=e&&e.S()}function hs(e){var t=this,n=e.data,r=su(n);r.value=n;var i=oe(function(){for(var o=t.__v;o=o.__;)if(o.__c){o.__c.__$f|=4;break}return t.__$u.c=function(){var s;!Do(i.peek())&&((s=t.base)==null?void 0:s.nodeType)===3?t.base.data=i.peek():(t.__$f|=1,t.setState({}))},ru(function(){var s=r.value.value;return s===0?0:s===!0?"":s||""})},[]);return i.value}hs.displayName="_st",Object.defineProperties(ce.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:hs},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}}),It("__b",function(e,t){if(typeof t.type=="string"){var n,r=t.props;for(var i in r)if(i!=="children"){var o=r[i];o instanceof ce&&(n||(t.__np=n={}),n[i]=o,r[i]=o.peek())}}e(t)}),It("__r",function(e,t){Gn();var n,r=t.__c;r&&(r.__$f&=-2,(n=r.__$u)===void 0&&(r.__$u=n=function(i){var o;return Jr(function(){o=this}),o.c=function(){r.__$f|=1,r.setState({})},o}())),Gn(n),e(t)}),It("__e",function(e,t,n,r){Gn(),e(t,n,r)}),It("diffed",function(e,t){Gn();var n;if(typeof t.type=="string"&&(n=t.__e)){var r=t.__np,i=t.props;if(r){var o=n.U;if(o)for(var s in o){var a=o[s];a!==void 0&&!(s in r)&&(a.d(),o[s]=void 0)}else n.U=o={};for(var c in r){var u=o[c],d=r[c];u===void 0?(u=ou(n,c,d,i),o[c]=u):u.o(d,i)}}}e(t)});function ou(e,t,n,r){var i=t in e&&e.ownerSVGElement===void 0,o=sn(n);return{o:function(s,a){o.value=s,r=a},d:Jr(function(){var s=o.value.value;r[t]!==s&&(r[t]=s,i?e[t]=s:s?e.setAttribute(t,s):e.removeAttribute(t))})}}It("unmount",function(e,t){if(typeof t.type=="string"){var n=t.__e;if(n){var r=n.U;if(r){n.U=void 0;for(var i in r){var o=r[i];o&&o.d()}}}}else{var s=t.__c;if(s){var a=s.__$u;a&&(s.__$u=void 0,a.d())}}e(t)}),It("__h",function(e,t,n,r){(r<3||r===9)&&(t.__$f|=2),e(t,n,r)}),xe.prototype.shouldComponentUpdate=function(e,t){var n=this.__$u;if(!(n&&n.s!==void 0||4&this.__$f)||3&this.__$f)return!0;for(var r in t)return!0;for(var i in e)if(i!=="__source"&&e[i]!==this.props[i])return!0;for(var o in this.props)if(!(o in e))return!0;return!1};function su(e){return oe(function(){return sn(e)},[])}var au=e=>{throw new Error(`Unhandled discriminated union member: ${JSON.stringify(e)}`)};function Nt(e,t){if(!e)throw new Error(t)}function ti(e,t){return t in e}function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},be.apply(this,arguments)}function ms(e,t){for(var n in t)e[n]=t[n];return e}function ni(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function ri(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t}function Yn(e){this.props=e}function vs(e,t){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),t?!t(this.props,i)||!s:ni(this.props,i)}function r(i){return this.shouldComponentUpdate=n,M(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Yn.prototype=new xe).isPureReactComponent=!0,Yn.prototype.shouldComponentUpdate=function(e,t){return ni(this.props,e)||ni(this.state,t)};var gs=V.__b;V.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),gs&&gs(e)};var cu=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function pe(e){function t(n){var r=ms({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=cu,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var ys=function(e,t){return e==null?null:Be(Be(e).map(t))},Te={map:ys,forEach:ys,count:function(e){return e?Be(e).length:0},only:function(e){var t=Be(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Be},lu=V.__e;V.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}lu(e,t,n,r)};var bs=V.unmount;function ws(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=ms({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return ws(r,t,n)})),e}function _s(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return _s(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function Lt(){this.__u=0,this.t=null,this.__b=null}function xs(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ii(e){var t,n,r;function i(o){if(t||(t=e()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw t;return M(n,o)}return i.displayName="Lazy",i.__f=!0,i}function Rt(){this.u=null,this.o=null}V.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&e.__h===!0&&(e.type=null),bs&&bs(e)},(Lt.prototype=new xe).__c=function(e,t){var n=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=xs(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var u=r.state.__a;r.__v.__k[0]=_s(u,u.__c.__P,u.__c.__O)}var d;for(r.setState({__a:r.__b=null});d=r.t.pop();)d.forceUpdate()}},c=t.__h===!0;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Lt.prototype.componentWillUnmount=function(){this.t=[]},Lt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=ws(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&M(ee,null,e.fallback);return i&&(i.__h=null),[M(ee,null,t.__a?null:e.children),i]};var ks=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function uu(e){return this.getChildContext=function(){return e.context},e.children}function du(e){var t=this,n=e.i;t.componentWillUnmount=function(){Ft(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(r){this.childNodes.push(r),t.i.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),t.i.appendChild(r)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),t.i.removeChild(r)}}),Ft(M(uu,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function Ss(e,t){var n=M(du,{__v:e,i:t});return n.containerInfo=t,n}(Rt.prototype=new xe).__a=function(e){var t=this,n=xs(t.__v),r=t.o.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),ks(t,e,r)):i()};n?n(o):o()}},Rt.prototype.render=function(e){this.u=null,this.o=new Map;var t=Be(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},Rt.prototype.componentDidUpdate=Rt.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){ks(e,n,t)})};var Cs=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,fu=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,pu=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,hu=/[A-Z0-9]/g,mu=typeof document<"u",vu=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function $s(e,t,n){return t.__k==null&&(t.textContent=""),Ft(e,t),typeof n=="function"&&n(),e?e.__c:null}function As(e,t,n){return Xo(e,t),typeof n=="function"&&n(),e?e.__c:null}xe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(xe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ps=V.event;function gu(){}function yu(){return this.cancelBubble}function bu(){return this.defaultPrevented}V.event=function(e){return Ps&&(e=Ps(e)),e.persist=gu,e.isPropagationStopped=yu,e.isDefaultPrevented=bu,e.nativeEvent=e};var oi,wu={enumerable:!1,configurable:!0,get:function(){return this.class}},Es=V.vnode;V.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={};for(var o in n){var s=n[o];if(!(o==="value"&&"defaultValue"in n&&s==null||mu&&o==="children"&&r==="noscript"||o==="class"||o==="className")){var a=o.toLowerCase();o==="defaultValue"&&"value"in n&&n.value==null?o="value":o==="download"&&s===!0?s="":a==="ondoubleclick"?o="ondblclick":a!=="onchange"||r!=="input"&&r!=="textarea"||vu(n.type)?a==="onfocus"?o="onfocusin":a==="onblur"?o="onfocusout":pu.test(o)?o=a:r.indexOf("-")===-1&&fu.test(o)?o=o.replace(hu,"-$&").toLowerCase():s===null&&(s=void 0):a=o="oninput",a==="oninput"&&i[o=a]&&(o="oninputCapture"),i[o]=s}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Be(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Be(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",wu)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=Cs,Es&&Es(e)};var Vs=V.__r;V.__r=function(e){Vs&&Vs(e),oi=e.__c};var Ts=V.diffed;V.diffed=function(e){Ts&&Ts(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),oi=null};var Os={ReactCurrentDispatcher:{current:{readContext:function(e){return oi.__n[e.__c].props.value}}}},_u="17.0.2";function Ms(e){return M.bind(null,e)}function Xe(e){return!!e&&e.$$typeof===Cs}function Qe(e){return Xe(e)?Xl.apply(null,arguments):e}function Fs(e){return!!e.__k&&(Ft(null,e),!0)}function Ds(e){return e&&(e.base||e.nodeType===1&&e)||null}var Is=function(e,t){return e(t)},Zn=function(e,t){return e(t)},Ns=ee;function si(e){e()}function Ls(e){return e}function Rs(){return[!1,si]}var Xn=Pe;function Bs(e,t){var n=t(),r=re({h:{__:n,v:t}}),i=r[0].h,o=r[1];return Pe(function(){i.__=n,i.v=t,ri(i.__,t())||o({h:i})},[e,n,t]),H(function(){return ri(i.__,i.v())||o({h:i}),e(function(){ri(i.__,i.v())||o({h:i})})},[e]),n}var Ee={useState:re,useId:zn,useReducer:Un,useEffect:H,useLayoutEffect:Pe,useInsertionEffect:Xn,useTransition:Rs,useDeferredValue:Ls,useSyncExternalStore:Bs,startTransition:si,useRef:B,useImperativeHandle:os,useMemo:oe,useCallback:ae,useContext:fe,useDebugValue:ss,version:"17.0.2",Children:Te,render:$s,hydrate:As,unmountComponentAtNode:Fs,createPortal:Ss,createElement:M,createContext:Ae,createFactory:Ms,cloneElement:Qe,createRef:jo,Fragment:ee,isValidElement:Xe,findDOMNode:Ds,Component:xe,PureComponent:Yn,memo:vs,forwardRef:pe,flushSync:Zn,unstable_batchedUpdates:Is,StrictMode:Ns,Suspense:Lt,SuspenseList:Rt,lazy:ii,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Os};const xu=Object.freeze(Object.defineProperty({__proto__:null,Children:Te,Component:xe,Fragment:ee,PureComponent:Yn,StrictMode:Ns,Suspense:Lt,SuspenseList:Rt,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Os,cloneElement:Qe,createContext:Ae,createElement:M,createFactory:Ms,createPortal:Ss,createRef:jo,default:Ee,findDOMNode:Ds,flushSync:Zn,forwardRef:pe,hydrate:As,isValidElement:Xe,lazy:ii,memo:vs,render:$s,startTransition:si,unmountComponentAtNode:Fs,unstable_batchedUpdates:Is,useCallback:ae,useContext:fe,useDebugValue:ss,useDeferredValue:Ls,useEffect:H,useErrorBoundary:Ql,useId:zn,useImperativeHandle:os,useInsertionEffect:Xn,useLayoutEffect:Pe,useMemo:oe,useReducer:Un,useRef:B,useState:re,useSyncExternalStore:Bs,useTransition:Rs,version:_u},Symbol.toStringTag,{value:"Module"}));function Bt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function ku(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function js(...e){return t=>e.forEach(n=>ku(n,t))}function cn(...e){return ae(js(...e),e)}function Su(e,t=[]){let n=[];function r(o,s){const a=Ae(s),c=n.length;n=[...n,s];function u(l){const{scope:f,children:p,...h}=l,v=(f==null?void 0:f[e][c])||a,b=oe(()=>h,Object.values(h));return M(v.Provider,{value:b},p)}function d(l,f){const p=(f==null?void 0:f[e][c])||a,h=fe(p);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${l}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,d]}const i=()=>{const o=n.map(s=>Ae(s));return function(a){const c=(a==null?void 0:a[e])||o;return oe(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return i.scopeName=e,[r,Cu(i,...t)]}function Cu(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:c,scopeName:u})=>{const l=c(o)[`__scope${u}`];return{...a,...l}},{});return oe(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const ai=globalThis!=null&&globalThis.document?Pe:()=>{},$u=xu["useId".toString()]||(()=>{});let Au=0;function ci(e){const[t,n]=re($u());return ai(()=>{e||n(r=>r??String(Au++))},[e]),e||(t?`radix-${t}`:"")}function mt(e){const t=B(e);return H(()=>{t.current=e}),oe(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Pu({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Eu({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=mt(n),c=ae(u=>{if(o){const l=typeof u=="function"?u(e):u;l!==e&&a(l)}else i(u)},[o,e,i,a]);return[s,c]}function Eu({defaultProp:e,onChange:t}){const n=re(e),[r]=n,i=B(r),o=mt(t);return H(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const li=pe((e,t)=>{const{children:n,...r}=e,i=Te.toArray(n),o=i.find(Tu);if(o){const s=o.props.children,a=i.map(c=>c===o?Te.count(s)>1?Te.only(null):Xe(s)?s.props.children:null:c);return M(ui,be({},r,{ref:t}),Xe(s)?Qe(s,void 0,a):null)}return M(ui,be({},r,{ref:t}),n)});li.displayName="Slot";const ui=pe((e,t)=>{const{children:n,...r}=e;return Xe(n)?Qe(n,{...Ou(r,n.props),ref:t?js(t,n.ref):n.ref}):Te.count(n)>1?Te.only(null):null});ui.displayName="SlotClone";const Vu=({children:e})=>M(ee,null,e);function Tu(e){return Xe(e)&&e.type===Vu}function Ou(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const di=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const n=pe((r,i)=>{const{asChild:o,...s}=r,a=o?li:t;return H(()=>{window[Symbol.for("radix-ui")]=!0},[]),M(a,be({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Mu(e,t){e&&Zn(()=>e.dispatchEvent(t))}function Fu(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e);H(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const fi="dismissableLayer.update",Du="dismissableLayer.pointerDownOutside",Iu="dismissableLayer.focusOutside";let Us;const Nu=Ae({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lu=pe((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...u}=e,d=fe(Nu),[l,f]=re(null),p=(n=l==null?void 0:l.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,h]=re({}),v=cn(t,A=>f(A)),b=Array.from(d.layers),[k]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=b.indexOf(k),_=l?b.indexOf(l):-1,C=d.layersWithOutsidePointerEventsDisabled.size>0,S=_>=y,N=Ru(A=>{const E=A.target,W=[...d.branches].some(Q=>Q.contains(E));!S||W||(o==null||o(A),a==null||a(A),A.defaultPrevented||c==null||c())},p),D=Bu(A=>{const E=A.target;[...d.branches].some(Q=>Q.contains(E))||(s==null||s(A),a==null||a(A),A.defaultPrevented||c==null||c())},p);return Fu(A=>{_===d.layers.size-1&&(i==null||i(A),!A.defaultPrevented&&c&&(A.preventDefault(),c()))},p),H(()=>{if(l)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Us=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),zs(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Us)}},[l,p,r,d]),H(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),zs())},[l,d]),H(()=>{const A=()=>h({});return document.addEventListener(fi,A),()=>document.removeEventListener(fi,A)},[]),M(di.div,be({},u,{ref:v,style:{pointerEvents:C?S?"auto":"none":void 0,...e.style},onFocusCapture:Bt(e.onFocusCapture,D.onFocusCapture),onBlurCapture:Bt(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:Bt(e.onPointerDownCapture,N.onPointerDownCapture)}))});function Ru(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e),r=B(!1),i=B(()=>{});return H(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){Hs(Du,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Bu(e,t=globalThis==null?void 0:globalThis.document){const n=mt(e),r=B(!1);return H(()=>{const i=o=>{o.target&&!r.current&&Hs(Iu,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zs(){const e=new CustomEvent(fi);document.dispatchEvent(e)}function Hs(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Mu(i,o):i.dispatchEvent(o)}const pi="focusScope.autoFocusOnMount",hi="focusScope.autoFocusOnUnmount",Ws={bubbles:!1,cancelable:!0},ju=pe((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,c]=re(null),u=mt(i),d=mt(o),l=B(null),f=cn(t,v=>c(v)),p=B({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;H(()=>{if(r){let v=function(_){if(p.paused||!a)return;const C=_.target;a.contains(C)?l.current=C:Je(l.current,{select:!0})},b=function(_){if(p.paused||!a)return;const C=_.relatedTarget;C!==null&&(a.contains(C)||Je(l.current,{select:!0}))},k=function(_){if(document.activeElement===document.body)for(const S of _)S.removedNodes.length>0&&Je(a)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const y=new MutationObserver(k);return a&&y.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),y.disconnect()}}},[r,a,p.paused]),H(()=>{if(a){Gs.add(p);const v=document.activeElement;if(!a.contains(v)){const k=new CustomEvent(pi,Ws);a.addEventListener(pi,u),a.dispatchEvent(k),k.defaultPrevented||(Uu(qu(Ks(a)),{select:!0}),document.activeElement===v&&Je(a))}return()=>{a.removeEventListener(pi,u),setTimeout(()=>{const k=new CustomEvent(hi,Ws);a.addEventListener(hi,d),a.dispatchEvent(k),k.defaultPrevented||Je(v??document.body,{select:!0}),a.removeEventListener(hi,d),Gs.remove(p)},0)}}},[a,u,d,p]);const h=ae(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,k=document.activeElement;if(b&&k){const y=v.currentTarget,[_,C]=zu(y);_&&C?!v.shiftKey&&k===C?(v.preventDefault(),n&&Je(_,{select:!0})):v.shiftKey&&k===_&&(v.preventDefault(),n&&Je(C,{select:!0})):k===y&&v.preventDefault()}},[n,r,p.paused]);return M(di.div,be({tabIndex:-1},s,{ref:f,onKeyDown:h}))});function Uu(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Je(r,{select:t}),document.activeElement!==n)return}function zu(e){const t=Ks(e),n=qs(t,e),r=qs(t.reverse(),e);return[n,r]}function Ks(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function qs(e,t){for(const n of e)if(!Hu(n,{upTo:t}))return n}function Hu(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 Wu(e){return e instanceof HTMLInputElement&&"select"in e}function Je(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Wu(e)&&t&&e.select()}}const Gs=Ku();function Ku(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ys(e,t),e.unshift(t)},remove(t){var n;e=Ys(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function Ys(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qu(e){return e.filter(t=>t.tagName!=="A")}function Gu(e,t){return Un((n,r)=>{const i=t[n][r];return i??n},e)}const mi=e=>{const{present:t,children:n}=e,r=Yu(t),i=typeof n=="function"?n({present:r.isPresent}):Te.only(n),o=cn(r.ref,i.ref);return typeof n=="function"||r.isPresent?Qe(i,{ref:o}):null};mi.displayName="Presence";function Yu(e){const[t,n]=re(),r=B({}),i=B(e),o=B("none"),s=e?"mounted":"unmounted",[a,c]=Gu(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return H(()=>{const u=Qn(r.current);o.current=a==="mounted"?u:"none"},[a]),ai(()=>{const u=r.current,d=i.current;if(d!==e){const f=o.current,p=Qn(u);e?c("MOUNT"):p==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ai(()=>{if(t){const u=l=>{const p=Qn(r.current).includes(l.animationName);l.target===t&&p&&Zn(()=>c("ANIMATION_END"))},d=l=>{l.target===t&&(o.current=Qn(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:ae(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Qn(e){return(e==null?void 0:e.animationName)||"none"}let vi=0;function Zu(){H(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:Zs()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:Zs()),vi++,()=>{vi===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),vi--}},[])}function Zs(){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 Oe=function(){return Oe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Oe.apply(this,arguments)};function Xs(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Xu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Jn="right-scroll-bar-position",er="width-before-scroll-bar",Qu="with-scroll-bars-hidden",Ju="--removed-body-scroll-bar-size";function ed(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function td(e,t){var n=re(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function nd(e,t){return td(t||null,function(n){return e.forEach(function(r){return ed(r,n)})})}function rd(e){return e}function id(e,t){t===void 0&&(t=rd);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var c=function(){var d=s;s=[],d.forEach(o)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){s.push(d),u()},filter:function(d){return s=s.filter(d),n}}}};return i}function od(e){e===void 0&&(e={});var t=id(null);return t.options=Oe({async:!0,ssr:!1},e),t}var Qs=function(e){var t=e.sideCar,n=Xs(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return M(r,Oe({},n))};Qs.isSideCarExport=!0;function sd(e,t){return e.useMedium(t),Qs}var Js=od(),gi=function(){},tr=pe(function(e,t){var n=B(null),r=re({onScrollCapture:gi,onWheelCapture:gi,onTouchMoveCapture:gi}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,l=e.shards,f=e.sideCar,p=e.noIsolation,h=e.inert,v=e.allowPinchZoom,b=e.as,k=b===void 0?"div":b,y=Xs(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),_=f,C=nd([n,t]),S=Oe(Oe({},y),i);return M(ee,null,d&&M(_,{sideCar:Js,removeScrollBar:u,shards:l,noIsolation:p,inert:h,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),s?Qe(Te.only(a),Oe(Oe({},S),{ref:C})):M(k,Oe({},S,{className:c,ref:C}),a))});tr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},tr.classNames={fullWidth:er,zeroRight:Jn};var ea,ad=function(){if(ea)return ea;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cd(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ad();return t&&e.setAttribute("nonce",t),e}function ld(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ud(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var dd=function(){var e=0,t=null;return{add:function(n){e==0&&(t=cd())&&(ld(t,n),ud(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fd=function(){var e=dd();return function(t,n){H(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ta=function(){var e=fd(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},pd={left:0,top:0,right:0,gap:0},yi=function(e){return parseInt(e||"",10)||0},hd=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[yi(n),yi(r),yi(i)]},md=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pd;var t=hd(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},vd=ta(),gd=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
+
.`.concat(Qu,` {
|
|
3
|
+
overflow: hidden `).concat(r,`;
|
|
4
|
+
padding-right: `).concat(a,"px ").concat(r,`;
|
|
5
5
|
}
|
|
6
6
|
body {
|
|
7
|
-
overflow: hidden `).concat(
|
|
7
|
+
overflow: hidden `).concat(r,`;
|
|
8
8
|
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(
|
|
9
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
10
10
|
padding-left: `.concat(i,`px;
|
|
11
11
|
padding-top: `).concat(o,`px;
|
|
12
12
|
padding-right: `).concat(s,`px;
|
|
13
13
|
margin-left:0;
|
|
14
14
|
margin-top:0;
|
|
15
|
-
margin-right: `).concat(a,"px ").concat(
|
|
16
|
-
`),
|
|
15
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
16
|
+
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.`).concat(
|
|
20
|
-
right: `).concat(a,"px ").concat(
|
|
19
|
+
.`).concat(Jn,` {
|
|
20
|
+
right: `).concat(a,"px ").concat(r,`;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.`).concat(
|
|
24
|
-
margin-right: `).concat(a,"px ").concat(
|
|
23
|
+
.`).concat(er,` {
|
|
24
|
+
margin-right: `).concat(a,"px ").concat(r,`;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.`).concat(
|
|
28
|
-
right: 0 `).concat(
|
|
27
|
+
.`).concat(Jn," .").concat(Jn,` {
|
|
28
|
+
right: 0 `).concat(r,`;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.`).concat(
|
|
32
|
-
margin-right: 0 `).concat(
|
|
31
|
+
.`).concat(er," .").concat(er,` {
|
|
32
|
+
margin-right: 0 `).concat(r,`;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
body {
|
|
36
|
-
`).concat(
|
|
36
|
+
`).concat(Ju,": ").concat(a,`px;
|
|
37
37
|
}
|
|
38
|
-
`)},
|
|
38
|
+
`)},yd=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=oe(function(){return md(i)},[i]);return M(vd,{styles:gd(o,!t,i,n?"":"!important")})},bi=!1;if(typeof window<"u")try{var nr=Object.defineProperty({},"passive",{get:function(){return bi=!0,!0}});window.addEventListener("test",nr,nr),window.removeEventListener("test",nr,nr)}catch{bi=!1}var jt=bi?{passive:!1}:!1,bd=function(e){return e.tagName==="TEXTAREA"},na=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bd(e)&&n[t]==="visible")},wd=function(e){return na(e,"overflowY")},_d=function(e){return na(e,"overflowX")},ra=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=ia(e,n);if(r){var i=oa(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},xd=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},kd=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ia=function(e,t){return e==="v"?wd(t):_d(t)},oa=function(e,t){return e==="v"?xd(t):kd(t)},Sd=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cd=function(e,t,n,r,i){var o=Sd(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,c=t.contains(a),u=!1,d=s>0,l=0,f=0;do{var p=oa(e,a),h=p[0],v=p[1],b=p[2],k=v-b-o*h;(h||k)&&ia(e,a)&&(l+=k,f+=h),a=a.parentNode}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(d&&(i&&l===0||!i&&s>l)||!d&&(i&&f===0||!i&&-s>f))&&(u=!0),u},rr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},sa=function(e){return[e.deltaX,e.deltaY]},aa=function(e){return e&&"current"in e?e.current:e},$d=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ad=function(e){return`
|
|
39
39
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
40
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},Cd=0,jt=[];function $d(e){var t=B([]),r=B([0,0]),n=B(),i=ne(Cd++)[0],o=ne(function(){return Js()})[0],s=B(e);H(function(){s.current=e},[e]),H(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Gu([e.lockRef.current],(e.shards||[]).map(oa),!0).filter(Boolean);return v.forEach(function(w){return w.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(w){return w.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=ae(function(v,w){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var k=en(v),y=r.current,_="deltaX"in v?v.deltaX:y[0]-k[0],C="deltaY"in v?v.deltaY:y[1]-k[1],S,N=v.target,D=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in v&&D==="h"&&N.type==="range")return!1;var A=ta(D,N);if(!A)return!0;if(A?S=D:(S=D==="v"?"h":"v",A=ta(D,N)),!A)return!1;if(!n.current&&"changedTouches"in v&&(_||C)&&(n.current=S),!S)return!0;var E=n.current||S;return xd(E,w,v,E==="h"?_:C,!0)},[]),l=ae(function(v){var w=v;if(!(!jt.length||jt[jt.length-1]!==o)){var k="deltaY"in w?ia(w):en(w),y=t.current.filter(function(S){return S.name===w.type&&S.target===w.target&&kd(S.delta,k)})[0];if(y&&y.should){w.cancelable&&w.preventDefault();return}if(!y){var _=(s.current.shards||[]).map(oa).filter(Boolean).filter(function(S){return S.contains(w.target)}),C=_.length>0?a(w,_[0]):!s.current.noIsolation;C&&w.cancelable&&w.preventDefault()}}},[]),u=ae(function(v,w,k,y){var _={name:v,delta:w,target:k,should:y};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),d=ae(function(v){r.current=en(v),n.current=void 0},[]),c=ae(function(v){u(v.type,ia(v),v.target,a(v,e.lockRef.current))},[]),f=ae(function(v){u(v.type,en(v),v.target,a(v,e.lockRef.current))},[]);H(function(){return jt.push(o),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Bt),document.addEventListener("touchmove",l,Bt),document.addEventListener("touchstart",d,Bt),function(){jt=jt.filter(function(v){return v!==o}),document.removeEventListener("wheel",l,Bt),document.removeEventListener("touchmove",l,Bt),document.removeEventListener("touchstart",d,Bt)}},[]);var p=e.removeScrollBar,h=e.inert;return M(ee,null,h?M(o,{styles:Sd(i)}):null,p?M(md,{gapMode:"margin"}):null)}const Ad=nd(Xs,$d);var sa=pe(function(e,t){return M(Qr,Oe({},e,{ref:t,sideCar:Ad}))});sa.classNames=Qr.classNames;const Pd=sa;var Ed=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ut=new WeakMap,tn=new WeakMap,rn={},yi=0,aa=function(e){return e&&(e.host||aa(e.parentNode))},Vd=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=aa(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})},Td=function(e,t,r,n){var i=Vd(t,Array.isArray(e)?e:[e]);rn[r]||(rn[r]=new WeakMap);var o=rn[r],s=[],a=new Set,l=new Set(i),u=function(c){!c||a.has(c)||(a.add(c),u(c.parentNode))};i.forEach(u);var d=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(f){if(a.has(f))d(f);else{var p=f.getAttribute(n),h=p!==null&&p!=="false",v=(Ut.get(f)||0)+1,w=(o.get(f)||0)+1;Ut.set(f,v),o.set(f,w),s.push(f),v===1&&h&&tn.set(f,!0),w===1&&f.setAttribute(r,"true"),h||f.setAttribute(n,"true")}})};return d(t),a.clear(),yi++,function(){s.forEach(function(c){var f=Ut.get(c)-1,p=o.get(c)-1;Ut.set(c,f),o.set(c,p),f||(tn.has(c)||c.removeAttribute(n),tn.delete(c)),p||c.removeAttribute(r)}),yi--,yi||(Ut=new WeakMap,Ut=new WeakMap,tn=new WeakMap,rn={})}},Od=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),i=t||Ed(e);return i?(n.push.apply(n,Array.from(i.querySelectorAll("[aria-live]"))),Td(n,i,r,"aria-hidden")):function(){return null}};const ca="Dialog",[la,Tg]=_u(ca),[Md,zt]=la(ca),Fd=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=B(null),l=B(null),[u=!1,d]=Cu({prop:n,defaultProp:i,onChange:o});return M(Md,{scope:t,triggerRef:a,contentRef:l,contentId:si(),titleId:si(),descriptionId:si(),open:u,onOpenChange:d,onOpenToggle:ae(()=>d(c=>!c),[d]),modal:s},r)},Dd="DialogPortal",[Og,ua]=la(Dd,{forceMount:void 0}),bi="DialogOverlay",Id=pe((e,t)=>{const r=ua(bi,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=zt(bi,e.__scopeDialog);return o.modal?M(pi,{present:n||o.open},M(Nd,be({},i,{ref:t}))):null}),Nd=pe((e,t)=>{const{__scopeDialog:r,...n}=e,i=zt(bi,r);return M(Pd,{as:ai,allowPinchZoom:!0,shards:[i.contentRef]},M(li.div,be({"data-state":fa(i.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),ar="DialogContent",Ld=pe((e,t)=>{const r=ua(ar,e.__scopeDialog),{forceMount:n=r.forceMount,...i}=e,o=zt(ar,e.__scopeDialog);return M(pi,{present:n||o.open},o.modal?M(Rd,be({},i,{ref:t})):M(Bd,be({},i,{ref:t})))}),Rd=pe((e,t)=>{const r=zt(ar,e.__scopeDialog),n=B(null),i=sr(t,r.contentRef,n);return H(()=>{const o=n.current;if(o)return Od(o)},[]),M(da,be({},e,{ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Rt(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=r.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Rt(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Rt(e.onFocusOutside,o=>o.preventDefault())}))}),Bd=pe((e,t)=>{const r=zt(ar,e.__scopeDialog),n=B(!1),i=B(!1);return M(da,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}n.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(n.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),da=pe((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=zt(ar,r),l=B(null),u=sr(t,l);return qu(),M(ee,null,M(Lu,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:i,onUnmountAutoFocus:o},M(Du,be({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":fa(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function fa(e){return e?"open":"closed"}const jd=Fd,Ud=Id,zd=Ld,pa=Ae({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),nn=Ae({}),wi=Ae(null),on=typeof document<"u",_i=on?Pe:H,xi=Ae({strict:!1});function Hd(e,t,r,n){const{visualElement:i}=fe(nn),o=fe(xi),s=fe(wi),a=fe(pa).reducedMotion,l=B();n=n||o.renderer,!l.current&&n&&(l.current=n(e,{visualState:t,parent:i,props:r,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;Gr(()=>{u&&u.update(r,s)});const d=B(!!window.HandoffAppearAnimations);return _i(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),H(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function ha(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Wd(e,t,r){return ae(n=>{n&&e.mount&&e.mount(n),t&&(n?t.mount(n):t.unmount()),r&&(typeof r=="function"?r(n):ha(r)&&(r.current=n))},[t])}function cr(e){return typeof e=="string"||Array.isArray(e)}function sn(e){return typeof e=="object"&&typeof e.start=="function"}const ki=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Si=["initial",...ki];function an(e){return sn(e.animate)||Si.some(t=>cr(e[t]))}function ma(e){return!!(an(e)||e.variants)}function Kd(e,t){if(an(e)){const{initial:r,animate:n}=e;return{initial:r===!1||cr(r)?r:void 0,animate:cr(n)?n:void 0}}return e.inherit!==!1?t:{}}function qd(e){const{initial:t,animate:r}=Kd(e,fe(nn));return oe(()=>({initial:t,animate:r}),[va(t),va(r)])}function va(e){return Array.isArray(e)?e.join(" "):e}const ga={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},lr={};for(const e in ga)lr[e]={isEnabled:t=>ga[e].some(r=>!!t[r])};function Ci(e){for(const t in e)lr[t]={...lr[t],...e[t]}}const ya=Ae({}),Gd=Ae({}),Yd=Symbol.for("motionComponentSymbol");function Zd({preloadedFeatures:e,createVisualElement:t,useRender:r,useVisualState:n,Component:i}){e&&Ci(e);function o(a,l){let u;const d={...fe(pa),...a,layoutId:Xd(a)},{isStatic:c}=d,f=qd(a),p=n(a,c);if(!c&&on){f.visualElement=Hd(i,p,d,t);const h=fe(Gd),v=fe(xi).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,v,e,h))}return M(nn.Provider,{value:f},u&&f.visualElement?M(u,{visualElement:f.visualElement,...d}):null,r(i,a,Wd(p,f.visualElement,l),p,c,f.visualElement))}const s=pe(o);return s[Yd]=i,s}function Xd({layoutId:e}){const t=fe(ya).id;return t&&e!==void 0?t+"-"+e:e}function Qd(e){function t(n,i={}){return Zd(e(n,i))}if(typeof Proxy>"u")return t;const r=new Map;return new Proxy(t,{get:(n,i)=>(r.has(i)||r.set(i,t(i)),r.get(i))})}const Jd=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function $i(e){return typeof e!="string"||e.includes("-")?!1:!!(Jd.indexOf(e)>-1||/[A-Z]/.test(e))}const ef={},ur=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vt=new Set(ur);function ba(e,{layout:t,layoutId:r}){return vt.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!ef[e]||e==="opacity")}const ke=e=>!!(e&&e.getVelocity),tf={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},rf=ur.length;function nf(e,{enableHardwareAcceleration:t=!0,allowTransformNone:r=!0},n,i){let o="";for(let s=0;s<rf;s++){const a=ur[s];if(e[a]!==void 0){const l=tf[a]||a;o+=`${l}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,n?"":o):r&&n&&(o="none"),o}const wa=e=>t=>typeof t=="string"&&t.startsWith(e),_a=wa("--"),Ai=wa("var(--"),of=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,sf=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Ht=(e,t,r)=>Math.min(Math.max(r,e),t),gt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},dr={...gt,transform:e=>Ht(0,1,e)},cn={...gt,default:1},fr=e=>Math.round(e*1e5)/1e5,ln=/(-)?([\d]*\.?[\d])+/g,xa=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,af=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function pr(e){return typeof e=="string"}const hr=e=>({test:t=>pr(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),et=hr("deg"),Wt=hr("%"),I=hr("px"),cf=hr("vh"),lf=hr("vw"),ka={...Wt,parse:e=>Wt.parse(e)/100,transform:e=>Wt.transform(e*100)},Sa={...gt,transform:Math.round},Ca={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,size:I,top:I,right:I,bottom:I,left:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:cn,scaleX:cn,scaleY:cn,scaleZ:cn,skew:et,skewX:et,skewY:et,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:dr,originX:ka,originY:ka,originZ:I,zIndex:Sa,fillOpacity:dr,strokeOpacity:dr,numOctaves:Sa};function Pi(e,t,r,n){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let l=!1,u=!1,d=!0;for(const c in t){const f=t[c];if(_a(c)){o[c]=f;continue}const p=Ca[c],h=sf(f,p);if(vt.has(c)){if(l=!0,s[c]=h,!d)continue;f!==(p.default||0)&&(d=!1)}else c.startsWith("origin")?(u=!0,a[c]=h):i[c]=h}if(t.transform||(l||n?i.transform=nf(e.transform,r,d,n):i.transform&&(i.transform="none")),u){const{originX:c="50%",originY:f="50%",originZ:p=0}=a;i.transformOrigin=`${c} ${f} ${p}`}}const Ei=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $a(e,t,r){for(const n in t)!ke(t[n])&&!ba(n,r)&&(e[n]=t[n])}function uf({transformTemplate:e},t,r){return oe(()=>{const n=Ei();return Pi(n,t,{enableHardwareAcceleration:!r},e),Object.assign({},n.vars,n.style)},[t])}function df(e,t,r){const n=e.style||{},i={};return $a(i,n,e),Object.assign(i,uf(e,t,r)),e.transformValues?e.transformValues(i):i}function ff(e,t,r){const n={},i=df(e,t,r);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=i,n}const pf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function un(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||pf.has(e)}let Aa=e=>!un(e);function hf(e){e&&(Aa=t=>t.startsWith("on")?!un(t):e(t))}try{hf(require("@emotion/is-prop-valid").default)}catch{}function mf(e,t,r){const n={};for(const i in e)i==="values"&&typeof e.values=="object"||(Aa(i)||r===!0&&un(i)||!t&&!un(i)||e.draggable&&i.startsWith("onDrag"))&&(n[i]=e[i]);return n}function Pa(e,t,r){return typeof e=="string"?e:I.transform(t+r*e)}function vf(e,t,r){const n=Pa(t,e.x,e.width),i=Pa(r,e.y,e.height);return`${n} ${i}`}const gf={offset:"stroke-dashoffset",array:"stroke-dasharray"},yf={offset:"strokeDashoffset",array:"strokeDasharray"};function bf(e,t,r=1,n=0,i=!0){e.pathLength=1;const o=i?gf:yf;e[o.offset]=I.transform(-n);const s=I.transform(t),a=I.transform(r);e[o.array]=`${s} ${a}`}function Vi(e,{attrX:t,attrY:r,attrScale:n,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},d,c,f){if(Pi(e,u,d,f),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:v}=e;p.transform&&(v&&(h.transform=p.transform),delete p.transform),v&&(i!==void 0||o!==void 0||h.transform)&&(h.transformOrigin=vf(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(p.x=t),r!==void 0&&(p.y=r),n!==void 0&&(p.scale=n),s!==void 0&&bf(p,s,a,l,!1)}const Ea=()=>({...Ei(),attrs:{}}),Ti=e=>typeof e=="string"&&e.toLowerCase()==="svg";function wf(e,t,r,n){const i=oe(()=>{const o=Ea();return Vi(o,t,{enableHardwareAcceleration:!1},Ti(n),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};$a(o,e.style,e),i.style={...o,...i.style}}return i}function _f(e=!1){return(r,n,i,{latestValues:o},s)=>{const l=($i(r)?wf:ff)(n,o,s,r),d={...mf(n,typeof r=="string",e),...l,ref:i},{children:c}=n,f=oe(()=>ke(c)?c.get():c,[c]);return M(r,{...d,children:f})}}const Oi=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Va(e,{style:t,vars:r},n,i){Object.assign(e.style,t,i&&i.getProjectionStyles(n));for(const o in r)e.style.setProperty(o,r[o])}const Ta=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Oa(e,t,r,n){Va(e,t,void 0,n);for(const i in t.attrs)e.setAttribute(Ta.has(i)?i:Oi(i),t.attrs[i])}function Mi(e,t){const{style:r}=e,n={};for(const i in r)(ke(r[i])||t.style&&ke(t.style[i])||ba(i,e))&&(n[i]=r[i]);return n}function Ma(e,t){const r=Mi(e,t);for(const n in e)if(ke(e[n])||ke(t[n])){const i=ur.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;r[i]=e[n]}return r}function Fi(e,t,r,n={},i={}){return typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(r!==void 0?r:e.custom,n,i)),t}function Fa(e){const t=B(null);return t.current===null&&(t.current=e()),t.current}const dn=e=>Array.isArray(e),xf=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),kf=e=>dn(e)?e[e.length-1]||0:e;function Sf(e){const t=ke(e)?e.get():e;return xf(t)?t.toValue():t}function Cf({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:r},n,i,o){const s={latestValues:$f(n,i,o,e),renderState:t()};return r&&(s.mount=a=>r(n,a,s)),s}const Da=e=>(t,r)=>{const n=fe(nn),i=fe(wi),o=()=>Cf(e,t,n,i);return r?o():Fa(o)};function $f(e,t,r,n){const i={},o=n(e,{});for(const f in o)i[f]=Sf(o[f]);let{initial:s,animate:a}=e;const l=an(e),u=ma(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=r?r.initial===!1:!1;d=d||s===!1;const c=d?a:s;return c&&typeof c!="boolean"&&!sn(c)&&(Array.isArray(c)?c:[c]).forEach(p=>{const h=Fi(e,p);if(!h)return;const{transitionEnd:v,transition:w,...k}=h;for(const y in k){let _=k[y];if(Array.isArray(_)){const C=d?_.length-1:0;_=_[C]}_!==null&&(i[y]=_)}for(const y in v)i[y]=v[y]}),i}const he=e=>e;class Ia{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const r=this.order.indexOf(t);r!==-1&&(this.order.splice(r,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Af(e){let t=new Ia,r=new Ia,n=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,d=!1)=>{const c=d&&i,f=c?t:r;return u&&s.add(l),f.add(l)&&c&&i&&(n=t.order.length),l},cancel:l=>{r.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,r]=[r,t],r.clear(),n=t.order.length,n)for(let u=0;u<n;u++){const d=t.order[u];d(l),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(l))}};return a}const fn=["prepare","read","update","preRender","render","postRender"],Pf=40;function Ef(e,t){let r=!1,n=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=fn.reduce((c,f)=>(c[f]=Af(()=>r=!0),c),{}),s=c=>o[c].process(i),a=()=>{const c=performance.now();r=!1,i.delta=n?1e3/60:Math.max(Math.min(c-i.timestamp,Pf),1),i.timestamp=c,i.isProcessing=!0,fn.forEach(s),i.isProcessing=!1,r&&t&&(n=!1,e(a))},l=()=>{r=!0,n=!0,i.isProcessing||e(a)};return{schedule:fn.reduce((c,f)=>{const p=o[f];return c[f]=(h,v=!1,w=!1)=>(r||l(),p.schedule(h,v,w)),c},{}),cancel:c=>fn.forEach(f=>o[f].cancel(c)),state:i,steps:o}}const{schedule:me,cancel:pn,state:mr,steps:Mg}=Ef(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),Vf={useVisualState:Da({scrapeMotionValuesFromProps:Ma,createRenderState:Ea,onMount:(e,t,{renderState:r,latestValues:n})=>{me.read(()=>{try{r.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{r.dimensions={x:0,y:0,width:0,height:0}}}),me.render(()=>{Vi(r,n,{enableHardwareAcceleration:!1},Ti(t.tagName),e.transformTemplate),Oa(t,r)})}})},Tf={useVisualState:Da({scrapeMotionValuesFromProps:Mi,createRenderState:Ei})};function Of(e,{forwardMotionProps:t=!1},r,n){return{...$i(e)?Vf:Tf,preloadedFeatures:r,useRender:_f(t),createVisualElement:n,Component:e}}function yt(e,t,r,n={passive:!0}){return e.addEventListener(t,r,n),()=>e.removeEventListener(t,r)}const Mf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Na(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Ff=e=>t=>Mf(t)&&e(t,Na(t));function hn(e,t,r,n){return yt(e,t,Ff(r),n)}const Df=(e,t)=>r=>t(e(r)),bt=(...e)=>e.reduce(Df);function La(e){let t=null;return()=>{const r=()=>{t=null};return t===null?(t=e,r):!1}}const Ra=La("dragHorizontal"),Ba=La("dragVertical");function If(e){let t=!1;if(e==="y")t=Ba();else if(e==="x")t=Ra();else{const r=Ra(),n=Ba();r&&n?t=()=>{r(),n()}:(r&&r(),n&&n())}return t}function ja(){const e=If(!0);return e?(e(),!1):!0}class Kt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ua(e,t){const r="pointer"+(t?"enter":"leave"),n="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||ja())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[n]&&me.update(()=>a[n](o,s))};return hn(e.current,r,i,{passive:!e.getProps()[n]})}class Nf extends Kt{mount(){this.unmount=bt(Ua(this.node,!0),Ua(this.node,!1))}unmount(){}}class Lf extends Kt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bt(yt(this.node.current,"focus",()=>this.onFocus()),yt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const za=(e,t)=>t?e===t?!0:za(e,t.parentElement):!1;function Di(e,t){if(!t)return;const r=new PointerEvent("pointer"+e);t(r,Na(r))}class Rf extends Kt{constructor(){super(...arguments),this.removeStartListeners=he,this.removeEndListeners=he,this.removeAccessibleListeners=he,this.startPointerPress=(t,r)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),o=hn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();me.update(()=>{za(this.node.current,a.target)?u&&u(a,l):d&&d(a,l)})},{passive:!(n.onTap||n.onPointerUp)}),s=hn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=bt(o,s),this.startPress(t,r)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Di("up",(l,u)=>{const{onTap:d}=this.node.getProps();d&&me.update(()=>d(l,u))})};this.removeEndListeners(),this.removeEndListeners=yt(this.node.current,"keyup",s),Di("down",(a,l)=>{this.startPress(a,l)})},r=yt(this.node.current,"keydown",t),n=()=>{this.isPressing&&Di("cancel",(o,s)=>this.cancelPress(o,s))},i=yt(this.node.current,"blur",n);this.removeAccessibleListeners=bt(r,i)}}startPress(t,r){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&me.update(()=>n(t,r))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ja()}cancelPress(t,r){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&me.update(()=>n(t,r))}mount(){const t=this.node.getProps(),r=hn(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=yt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=bt(r,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Ii=new WeakMap,Ni=new WeakMap,Bf=e=>{const t=Ii.get(e.target);t&&t(e)},jf=e=>{e.forEach(Bf)};function Uf({root:e,...t}){const r=e||document;Ni.has(r)||Ni.set(r,{});const n=Ni.get(r),i=JSON.stringify(t);return n[i]||(n[i]=new IntersectionObserver(jf,{root:e,...t})),n[i]}function zf(e,t,r){const n=Uf(t);return Ii.set(e,r),n.observe(e),()=>{Ii.delete(e),n.unobserve(e)}}const Hf={some:0,all:1};class Wf extends Kt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:r,margin:n,amount:i="some",once:o}=t,s={root:r?r.current:void 0,rootMargin:n,threshold:typeof i=="number"?i:Hf[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};return zf(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:r}=this.node;["amount","margin","root"].some(Kf(t,r))&&this.startObserver()}unmount(){}}function Kf({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}const qf={inView:{Feature:Wf},tap:{Feature:Rf},focus:{Feature:Lf},hover:{Feature:Nf}};function Ha(e,t){if(!Array.isArray(t))return!1;const r=t.length;if(r!==e.length)return!1;for(let n=0;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Gf(e){const t={};return e.values.forEach((r,n)=>t[n]=r.get()),t}function Yf(e){const t={};return e.values.forEach((r,n)=>t[n]=r.getVelocity()),t}function mn(e,t,r){const n=e.getProps();return Fi(n,t,r!==void 0?r:n.custom,Gf(e),Yf(e))}const Zf="data-"+Oi("framerAppearId");let vr=he,Me=he;process.env.NODE_ENV!=="production"&&(vr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Me=(e,t)=>{if(!e)throw new Error(t)});const wt=e=>e*1e3,tt=e=>e/1e3,Xf={current:!1},Wa=e=>Array.isArray(e)&&typeof e[0]=="number";function Ka(e){return!!(!e||typeof e=="string"&&qa[e]||Wa(e)||Array.isArray(e)&&e.every(Ka))}const gr=([e,t,r,n])=>`cubic-bezier(${e}, ${t}, ${r}, ${n})`,qa={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:gr([0,.65,.55,1]),circOut:gr([.55,0,1,.45]),backIn:gr([.31,.01,.66,-.59]),backOut:gr([.33,1.53,.69,.99])};function Ga(e){if(e)return Wa(e)?gr(e):Array.isArray(e)?e.map(Ga):qa[e]}function Qf(e,t,r,{delay:n=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:r};l&&(u.offset=l);const d=Ga(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:n,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function Jf(e,{repeat:t,repeatType:r="loop"}){const n=t&&r!=="loop"&&t%2===1?0:e.length-1;return e[n]}const Ya=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,ep=1e-7,tp=12;function rp(e,t,r,n,i){let o,s,a=0;do s=t+(r-t)/2,o=Ya(s,n,i)-e,o>0?r=s:t=s;while(Math.abs(o)>ep&&++a<tp);return s}function yr(e,t,r,n){if(e===t&&r===n)return he;const i=o=>rp(o,0,1,e,r);return o=>o===0||o===1?o:Ya(i(o),t,n)}const np=yr(.42,0,1,1),ip=yr(0,0,.58,1),Za=yr(.42,0,.58,1),op=e=>Array.isArray(e)&&typeof e[0]!="number",Xa=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Qa=e=>t=>1-e(1-t),Ja=e=>1-Math.sin(Math.acos(e)),ec=Qa(Ja),sp=Xa(ec),tc=yr(.33,1.53,.69,.99),Li=Qa(tc),ap=Xa(Li),rc={linear:he,easeIn:np,easeInOut:Za,easeOut:ip,circIn:Ja,circInOut:sp,circOut:ec,backIn:Li,backInOut:ap,backOut:tc,anticipate:e=>(e*=2)<1?.5*Li(e):.5*(2-Math.pow(2,-10*(e-1)))},nc=e=>{if(Array.isArray(e)){Me(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,r,n,i]=e;return yr(t,r,n,i)}else if(typeof e=="string")return Me(rc[e]!==void 0,`Invalid easing type '${e}'`),rc[e];return e},Ri=(e,t)=>r=>!!(pr(r)&&af.test(r)&&r.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(r,t)),ic=(e,t,r)=>n=>{if(!pr(n))return n;const[i,o,s,a]=n.match(ln);return{[e]:parseFloat(i),[t]:parseFloat(o),[r]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},cp=e=>Ht(0,255,e),Bi={...gt,transform:e=>Math.round(cp(e))},_t={test:Ri("rgb","red"),parse:ic("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:n=1})=>"rgba("+Bi.transform(e)+", "+Bi.transform(t)+", "+Bi.transform(r)+", "+fr(dr.transform(n))+")"};function lp(e){let t="",r="",n="",i="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),n=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),n=e.substring(3,4),i=e.substring(4,5),t+=t,r+=r,n+=n,i+=i),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(n,16),alpha:i?parseInt(i,16)/255:1}}const ji={test:Ri("#"),parse:lp,transform:_t.transform},qt={test:Ri("hsl","hue"),parse:ic("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:n=1})=>"hsla("+Math.round(e)+", "+Wt.transform(fr(t))+", "+Wt.transform(fr(r))+", "+fr(dr.transform(n))+")"},ge={test:e=>_t.test(e)||ji.test(e)||qt.test(e),parse:e=>_t.test(e)?_t.parse(e):qt.test(e)?qt.parse(e):ji.parse(e),transform:e=>pr(e)?e:e.hasOwnProperty("red")?_t.transform(e):qt.transform(e)},vn=(e,t,r)=>-r*e+r*t+e;function Ui(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function up({hue:e,saturation:t,lightness:r,alpha:n}){e/=360,t/=100,r/=100;let i=0,o=0,s=0;if(!t)i=o=s=r;else{const a=r<.5?r*(1+t):r+t-r*t,l=2*r-a;i=Ui(l,a,e+1/3),o=Ui(l,a,e),s=Ui(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:n}}const zi=(e,t,r)=>{const n=e*e;return Math.sqrt(Math.max(0,r*(t*t-n)+n))},dp=[ji,_t,qt],fp=e=>dp.find(t=>t.test(e));function oc(e){const t=fp(e);Me(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let r=t.parse(e);return t===qt&&(r=up(r)),r}const sc=(e,t)=>{const r=oc(e),n=oc(t),i={...r};return o=>(i.red=zi(r.red,n.red,o),i.green=zi(r.green,n.green,o),i.blue=zi(r.blue,n.blue,o),i.alpha=vn(r.alpha,n.alpha,o),_t.transform(i))};function pp(e){var t,r;return isNaN(e)&&pr(e)&&(((t=e.match(ln))===null||t===void 0?void 0:t.length)||0)+(((r=e.match(xa))===null||r===void 0?void 0:r.length)||0)>0}const ac={regex:of,countKey:"Vars",token:"${v}",parse:he},cc={regex:xa,countKey:"Colors",token:"${c}",parse:ge.parse},lc={regex:ln,countKey:"Numbers",token:"${n}",parse:gt.parse};function Hi(e,{regex:t,countKey:r,token:n,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+r]=o.length,e.tokenised=e.tokenised.replace(t,n),e.values.push(...o.map(i)))}function gn(e){const t=e.toString(),r={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return r.value.includes("var(--")&&Hi(r,ac),Hi(r,cc),Hi(r,lc),r}function uc(e){return gn(e).values}function dc(e){const{values:t,numColors:r,numVars:n,tokenised:i}=gn(e),o=t.length;return s=>{let a=i;for(let l=0;l<o;l++)l<n?a=a.replace(ac.token,s[l]):l<n+r?a=a.replace(cc.token,ge.transform(s[l])):a=a.replace(lc.token,fr(s[l]));return a}}const hp=e=>typeof e=="number"?0:e;function mp(e){const t=uc(e);return dc(e)(t.map(hp))}const Gt={test:pp,parse:uc,createTransformer:dc,getAnimatableNone:mp},fc=(e,t)=>r=>`${r>0?t:e}`;function pc(e,t){return typeof e=="number"?r=>vn(e,t,r):ge.test(e)?sc(e,t):e.startsWith("var(")?fc(e,t):mc(e,t)}const hc=(e,t)=>{const r=[...e],n=r.length,i=e.map((o,s)=>pc(o,t[s]));return o=>{for(let s=0;s<n;s++)r[s]=i[s](o);return r}},vp=(e,t)=>{const r={...e,...t},n={};for(const i in r)e[i]!==void 0&&t[i]!==void 0&&(n[i]=pc(e[i],t[i]));return i=>{for(const o in n)r[o]=n[o](i);return r}},mc=(e,t)=>{const r=Gt.createTransformer(t),n=gn(e),i=gn(t);return n.numVars===i.numVars&&n.numColors===i.numColors&&n.numNumbers>=i.numNumbers?bt(hc(n.values,i.values),r):(vr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),fc(e,t))},vc=(e,t,r)=>{const n=t-e;return n===0?1:(r-e)/n},gc=(e,t)=>r=>vn(e,t,r);function gp(e){return typeof e=="number"?gc:typeof e=="string"?ge.test(e)?sc:mc:Array.isArray(e)?hc:typeof e=="object"?vp:gc}function yp(e,t,r){const n=[],i=r||gp(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||he:t;a=bt(l,a)}n.push(a)}return n}function yc(e,t,{clamp:r=!0,ease:n,mixer:i}={}){const o=e.length;if(Me(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=yp(t,n,i),a=s.length,l=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const c=vc(e[d],e[d+1],u);return s[d](c)};return r?u=>l(Ht(e[0],e[o-1],u)):l}function bp(e,t){const r=e[e.length-1];for(let n=1;n<=t;n++){const i=vc(0,t,n);e.push(vn(r,1,i))}}function wp(e){const t=[0];return bp(t,e.length-1),t}function _p(e,t){return e.map(r=>r*t)}function xp(e,t){return e.map(()=>t||Za).splice(0,e.length-1)}function yn({duration:e=300,keyframes:t,times:r,ease:n="easeInOut"}){const i=op(n)?n.map(nc):nc(n),o={done:!1,value:t[0]},s=_p(r&&r.length===t.length?r:wp(t),e),a=yc(s,t,{ease:Array.isArray(i)?i:xp(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}function bc(e,t){return t?e*(1e3/t):0}const kp=5;function wc(e,t,r){const n=Math.max(t-kp,0);return bc(r-e(n),t-n)}const Wi=.001,Sp=.01,_c=10,Cp=.05,$p=1;function Ap({duration:e=800,bounce:t=.25,velocity:r=0,mass:n=1}){let i,o;vr(e<=wt(_c),"Spring duration must be 10 seconds or less");let s=1-t;s=Ht(Cp,$p,s),e=Ht(Sp,_c,tt(e)),s<1?(i=u=>{const d=u*s,c=d*e,f=d-r,p=Ki(u,s),h=Math.exp(-c);return Wi-f/p*h},o=u=>{const c=u*s*e,f=c*r+r,p=Math.pow(s,2)*Math.pow(u,2)*e,h=Math.exp(-c),v=Ki(Math.pow(u,2),s);return(-i(u)+Wi>0?-1:1)*((f-p)*h)/v}):(i=u=>{const d=Math.exp(-u*e),c=(u-r)*e+1;return-Wi+d*c},o=u=>{const d=Math.exp(-u*e),c=(r-u)*(e*e);return d*c});const a=5/e,l=Ep(i,o,a);if(e=wt(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*n;return{stiffness:u,damping:s*2*Math.sqrt(n*u),duration:e}}}const Pp=12;function Ep(e,t,r){let n=r;for(let i=1;i<Pp;i++)n=n-e(n)/t(n);return n}function Ki(e,t){return e*Math.sqrt(1-t*t)}const Vp=["duration","bounce"],Tp=["stiffness","damping","mass"];function xc(e,t){return t.some(r=>e[r]!==void 0)}function Op(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!xc(e,Tp)&&xc(e,Vp)){const r=Ap(e);t={...t,...r,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function kc({keyframes:e,restDelta:t,restSpeed:r,...n}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,velocity:d,duration:c,isResolvedFromDuration:f}=Op(n),p=d?-tt(d):0,h=l/(2*Math.sqrt(a*u)),v=o-i,w=tt(Math.sqrt(a/u)),k=Math.abs(v)<5;r||(r=k?.01:2),t||(t=k?.005:.5);let y;if(h<1){const _=Ki(w,h);y=C=>{const S=Math.exp(-h*w*C);return o-S*((p+h*w*v)/_*Math.sin(_*C)+v*Math.cos(_*C))}}else if(h===1)y=_=>o-Math.exp(-w*_)*(v+(p+w*v)*_);else{const _=w*Math.sqrt(h*h-1);y=C=>{const S=Math.exp(-h*w*C),N=Math.min(_*C,300);return o-S*((p+h*w*v)*Math.sinh(N)+_*v*Math.cosh(N))/_}}return{calculatedDuration:f&&c||null,next:_=>{const C=y(_);if(f)s.done=_>=c;else{let S=p;_!==0&&(h<1?S=wc(y,_,C):S=0);const N=Math.abs(S)<=r,D=Math.abs(o-C)<=t;s.done=N&&D}return s.value=s.done?o:C,s}}}function Sc({keyframes:e,velocity:t=0,power:r=.8,timeConstant:n=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:d}){const c=e[0],f={done:!1,value:c},p=A=>a!==void 0&&A<a||l!==void 0&&A>l,h=A=>a===void 0?l:l===void 0||Math.abs(a-A)<Math.abs(l-A)?a:l;let v=r*t;const w=c+v,k=s===void 0?w:s(w);k!==w&&(v=k-c);const y=A=>-v*Math.exp(-A/n),_=A=>k+y(A),C=A=>{const E=y(A),W=_(A);f.done=Math.abs(E)<=u,f.value=f.done?k:W};let S,N;const D=A=>{p(f.value)&&(S=A,N=kc({keyframes:[f.value,h(f.value)],velocity:wc(_,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return D(0),{calculatedDuration:null,next:A=>{let E=!1;return!N&&S===void 0&&(E=!0,C(A),D(A)),S!==void 0&&A>S?N.next(A-S):(!E&&C(A),f)}}}const Mp=e=>{const t=({timestamp:r})=>e(r);return{start:()=>me.update(t,!0),stop:()=>pn(t),now:()=>mr.isProcessing?mr.timestamp:performance.now()}},Cc=2e4;function $c(e){let t=0;const r=50;let n=e.next(t);for(;!n.done&&t<Cc;)t+=r,n=e.next(t);return t>=Cc?1/0:t}const Fp={decay:Sc,inertia:Sc,tween:yn,keyframes:yn,spring:kc};function bn({autoplay:e=!0,delay:t=0,driver:r=Mp,keyframes:n,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:d,onUpdate:c,...f}){let p=1,h=!1,v,w;const k=()=>{w=new Promise(G=>{v=G})};k();let y;const _=Fp[i]||yn;let C;_!==yn&&typeof n[0]!="number"&&(C=yc([0,100],n,{clamp:!1}),n=[0,100]);const S=_({...f,keyframes:n});let N;a==="mirror"&&(N=_({...f,keyframes:[...n].reverse(),velocity:-(f.velocity||0)}));let D="idle",A=null,E=null,W=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=$c(S));const{calculatedDuration:Q}=S;let j=1/0,L=1/0;Q!==null&&(j=Q+s,L=j*(o+1)-s);let R=0;const U=G=>{if(E===null)return;p>0&&(E=Math.min(E,G)),p<0&&(E=Math.min(G-L/p,E)),A!==null?R=A:R=Math.round(G-E)*p;const dt=R-t*(p>=0?1:-1),Tr=p>=0?dt<0:dt>L;R=Math.max(dt,0),D==="finished"&&A===null&&(R=L);let Rn=R,Or=S;if(o){const Vt=R/j;let Tt=Math.floor(Vt),Ge=Vt%1;!Ge&&Vt>=1&&(Ge=1),Ge===1&&Tt--,Tt=Math.min(Tt,o+1);const Mr=!!(Tt%2);Mr&&(a==="reverse"?(Ge=1-Ge,s&&(Ge-=s/j)):a==="mirror"&&(Or=N));let jn=Ht(0,1,Ge);R>L&&(jn=a==="reverse"&&Mr?1:0),Rn=jn*j}const Et=Tr?{done:!1,value:n[0]}:Or.next(Rn);C&&(Et.value=C(Et.value));let{done:er}=Et;!Tr&&Q!==null&&(er=p>=0?R>=L:R<=0);const Bn=A===null&&(D==="finished"||D==="running"&&er);return c&&c(Et.value),Bn&&qe(),Et},re=()=>{y&&y.stop(),y=void 0},de=()=>{D="idle",re(),v(),k(),E=W=null},qe=()=>{D="finished",d&&d(),re(),v()},ut=()=>{if(h)return;y||(y=r(U));const G=y.now();l&&l(),A!==null?E=G-A:(!E||D==="finished")&&(E=G),D==="finished"&&k(),W=E,A=null,D="running",y.start()};e&&ut();const Pt={then(G,dt){return w.then(G,dt)},get time(){return tt(R)},set time(G){G=wt(G),R=G,A!==null||!y||p===0?A=G:E=y.now()-G/p},get duration(){const G=S.calculatedDuration===null?$c(S):S.calculatedDuration;return tt(G)},get speed(){return p},set speed(G){G===p||!y||(p=G,Pt.time=tt(R))},get state(){return D},play:ut,pause:()=>{D="paused",A=R},stop:()=>{h=!0,D!=="idle"&&(D="idle",u&&u(),de())},cancel:()=>{W!==null&&U(W),de()},complete:()=>{D="finished"},sample:G=>(E=0,U(G))};return Pt}function Dp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Ip=Dp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Np=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),wn=10,Lp=2e4,Rp=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Ka(t.ease);function Bp(e,t,{onUpdate:r,onComplete:n,...i}){if(!(Ip()&&Np.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,l;const u=()=>{l=new Promise(y=>{a=y})};u();let{keyframes:d,duration:c=300,ease:f,times:p}=i;if(Rp(t,i)){const y=bn({...i,repeat:0,delay:0});let _={done:!1,value:d[0]};const C=[];let S=0;for(;!_.done&&S<Lp;)_=y.sample(S),C.push(_.value),S+=wn;p=void 0,d=C,c=S-wn,f="linear"}const h=Qf(e.owner.current,t,d,{...i,duration:c,ease:f,times:p});i.syncStart&&(h.startTime=mr.isProcessing?mr.timestamp:document.timeline?document.timeline.currentTime:performance.now());const v=()=>h.cancel(),w=()=>{me.update(v),a(),u()};return h.onfinish=()=>{e.set(Jf(d,i)),n&&n(),w()},{then(y,_){return l.then(y,_)},attachTimeline(y){return h.timeline=y,h.onfinish=null,he},get time(){return tt(h.currentTime||0)},set time(y){h.currentTime=wt(y)},get speed(){return h.playbackRate},set speed(y){h.playbackRate=y},get duration(){return tt(c)},play:()=>{s||(h.play(),pn(v))},pause:()=>h.pause(),stop:()=>{if(s=!0,h.playState==="idle")return;const{currentTime:y}=h;if(y){const _=bn({...i,autoplay:!1});e.setWithVelocity(_.sample(y-wn).value,_.sample(y).value,wn)}w()},complete:()=>h.finish(),cancel:w}}function jp({keyframes:e,delay:t,onUpdate:r,onComplete:n}){const i=()=>(r&&r(e[e.length-1]),n&&n(),{time:0,speed:1,duration:0,play:he,pause:he,stop:he,then:o=>(o(),Promise.resolve()),cancel:he,complete:he});return t?bn({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Up={type:"spring",stiffness:500,damping:25,restSpeed:10},zp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Hp={type:"keyframes",duration:.8},Wp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Kp=(e,{keyframes:t})=>t.length>2?Hp:vt.has(e)?e.startsWith("scale")?zp(t[1]):Up:Wp,qi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Gt.test(t)||t==="0")&&!t.startsWith("url(")),qp=new Set(["brightness","contrast","saturate","opacity"]);function Gp(e){const[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[n]=r.match(ln)||[];if(!n)return e;const i=r.replace(n,"");let o=qp.has(t)?1:0;return n!==r&&(o*=100),t+"("+o+i+")"}const Yp=/([a-z-]*)\(.*?\)/g,Gi={...Gt,getAnimatableNone:e=>{const t=e.match(Yp);return t?t.map(Gp).join(" "):e}},Zp={...Ca,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:Gi,WebkitFilter:Gi},Yi=e=>Zp[e];function Ac(e,t){let r=Yi(e);return r!==Gi&&(r=Gt),r.getAnimatableNone?r.getAnimatableNone(t):void 0}const Pc=e=>/^0[^.\s]+$/.test(e);function Xp(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Pc(e)}function Qp(e,t,r,n){const i=qi(t,r);let o;Array.isArray(r)?o=[...r]:o=[null,r];const s=n.from!==void 0?n.from:e.get();let a;const l=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),Xp(o[u])&&l.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&l.length&&a)for(let u=0;u<l.length;u++){const d=l[u];o[d]=Ac(t,a)}return o}function Jp({when:e,delay:t,delayChildren:r,staggerChildren:n,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...d}){return!!Object.keys(d).length}function eh(e,t){return e[t]||e.default||e}const th=(e,t,r,n={})=>i=>{const o=eh(n,e)||{},s=o.delay||n.delay||0;let{elapsed:a=0}=n;a=a-wt(s);const l=Qp(t,e,r,o),u=l[0],d=l[l.length-1],c=qi(e,u),f=qi(e,d);vr(c===f,`You are trying to animate ${e} from "${u}" to "${d}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${d} via the \`style\` property.`);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(Jp(o)||(p={...p,...Kp(e,p)}),p.duration&&(p.duration=wt(p.duration)),p.repeatDelay&&(p.repeatDelay=wt(p.repeatDelay)),!c||!f||Xf.current||o.type===!1)return jp(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const h=Bp(t,e,p);if(h)return h}return bn(p)};function _n(e){return!!(ke(e)&&e.add)}const Ec=e=>/^\-?\d*\.?\d+$/.test(e);function rh(e,t){e.indexOf(t)===-1&&e.push(t)}function nh(e,t){const r=e.indexOf(t);r>-1&&e.splice(r,1)}class Vc{constructor(){this.subscriptions=[]}add(t){return rh(this.subscriptions,t),()=>nh(this.subscriptions,t)}notify(t,r,n){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,r,n);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,r,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Tc=new Set;function Zi(e,t,r){e||Tc.has(t)||(console.warn(t),r&&console.warn(r),Tc.add(t))}const ih=e=>!isNaN(parseFloat(e));class oh{constructor(t,r={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(n,i=!0)=>{this.prev=this.current,this.current=n;const{delta:o,timestamp:s}=mr;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,me.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>me.postRender(this.velocityCheck),this.velocityCheck=({timestamp:n})=>{n!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=ih(this.current),this.owner=r.owner}onChange(t){return process.env.NODE_ENV!=="production"&&Zi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Vc);const n=this.events[t].add(r);return t==="change"?()=>{n(),me.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t,r=!0){!r||!this.passiveEffect?this.updateAndNotify(t,r):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,r,n){this.set(r),this.prev=t,this.timeDelta=n}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?bc(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function br(e,t){return new oh(e,t)}const Oc=e=>t=>t.test(e),Mc=[gt,I,Wt,et,lf,cf,{test:e=>e==="auto",parse:e=>e}],wr=e=>Mc.find(Oc(e)),sh=[...Mc,ge,Gt],ah=e=>sh.find(Oc(e));function ch(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,br(r))}function lh(e,t){const r=mn(e,t);let{transitionEnd:n={},transition:i={},...o}=r?e.makeTargetAnimatable(r,!1):{};o={...o,...n};for(const s in o){const a=kf(o[s]);ch(e,s,a)}}function uh(e,t,r){var n,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const l=o[a],u=t[l];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(n=r[l])!==null&&n!==void 0?n:e.readValue(l))!==null&&i!==void 0?i:t[l]),d!=null&&(typeof d=="string"&&(Ec(d)||Pc(d))?d=parseFloat(d):!ah(d)&&Gt.test(u)&&(d=Ac(l,u)),e.addValue(l,br(d,{owner:e})),r[l]===void 0&&(r[l]=d),d!==null&&e.setBaseTarget(l,d))}}function dh(e,t){return t?(t[e]||t.default||t).from:void 0}function fh(e,t,r){const n={};for(const i in e){const o=dh(i,t);if(o!==void 0)n[i]=o;else{const s=r.getValue(i);s&&(n[i]=s.get())}}return n}function ph({protectedKeys:e,needsAnimating:t},r){const n=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,n}function Fc(e,t,{delay:r=0,transitionOverride:n,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");n&&(o=n);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const c in a){const f=e.getValue(c),p=a[c];if(!f||p===void 0||d&&ph(d,c))continue;const h={delay:r,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const w=e.getProps()[Zf];w&&(h.elapsed=window.HandoffAppearAnimations(w,c,f,me),h.syncStart=!0)}f.start(th(c,f,p,e.shouldReduceMotion&&vt.has(c)?{type:!1}:h));const v=f.animation;_n(l)&&(l.add(c),v.then(()=>l.remove(c))),u.push(v)}return s&&Promise.all(u).then(()=>{s&&lh(e,s)}),u}function Xi(e,t,r={}){const n=mn(e,t,r.custom);let{transition:i=e.getDefaultTransition()||{}}=n||{};r.transitionOverride&&(i=r.transitionOverride);const o=n?()=>Promise.all(Fc(e,n,r)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:c}=i;return hh(e,t,u+l,d,c,r)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,u]=a==="beforeChildren"?[o,s]:[s,o];return l().then(()=>u())}else return Promise.all([o(),s(r.delay)])}function hh(e,t,r=0,n=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*n,l=i===1?(u=0)=>u*n:(u=0)=>a-u*n;return Array.from(e.variantChildren).sort(mh).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Xi(u,t,{...o,delay:r+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function mh(e,t){return e.sortNodePosition(t)}function vh(e,t,r={}){e.notify("AnimationStart",t);let n;if(Array.isArray(t)){const i=t.map(o=>Xi(e,o,r));n=Promise.all(i)}else if(typeof t=="string")n=Xi(e,t,r);else{const i=typeof t=="function"?mn(e,t,r.custom):t;n=Promise.all(Fc(e,i,r))}return n.then(()=>e.notify("AnimationComplete",t))}const gh=[...ki].reverse(),yh=ki.length;function bh(e){return t=>Promise.all(t.map(({animation:r,options:n})=>vh(e,r,n)))}function wh(e){let t=bh(e);const r=xh();let n=!0;const i=(l,u)=>{const d=mn(e,u);if(d){const{transition:c,transitionEnd:f,...p}=d;l={...l,...p,...f}}return l};function o(l){t=l(e)}function s(l,u){const d=e.getProps(),c=e.getVariantContext(!0)||{},f=[],p=new Set;let h={},v=1/0;for(let k=0;k<yh;k++){const y=gh[k],_=r[y],C=d[y]!==void 0?d[y]:c[y],S=cr(C),N=y===u?_.isActive:null;N===!1&&(v=k);let D=C===c[y]&&C!==d[y]&&S;if(D&&n&&e.manuallyAnimateOnMount&&(D=!1),_.protectedKeys={...h},!_.isActive&&N===null||!C&&!_.prevProp||sn(C)||typeof C=="boolean")continue;const A=_h(_.prevProp,C);let E=A||y===u&&_.isActive&&!D&&S||k>v&&S;const W=Array.isArray(C)?C:[C];let Q=W.reduce(i,{});N===!1&&(Q={});const{prevResolvedValues:j={}}=_,L={...j,...Q},R=U=>{E=!0,p.delete(U),_.needsAnimating[U]=!0};for(const U in L){const re=Q[U],de=j[U];h.hasOwnProperty(U)||(re!==de?dn(re)&&dn(de)?!Ha(re,de)||A?R(U):_.protectedKeys[U]=!0:re!==void 0?R(U):p.add(U):re!==void 0&&p.has(U)?R(U):_.protectedKeys[U]=!0)}_.prevProp=C,_.prevResolvedValues=Q,_.isActive&&(h={...h,...Q}),n&&e.blockInitialAnimation&&(E=!1),E&&!D&&f.push(...W.map(U=>({animation:U,options:{type:y,...l}})))}if(p.size){const k={};p.forEach(y=>{const _=e.getBaseTarget(y);_!==void 0&&(k[y]=_)}),f.push({animation:k})}let w=!!f.length;return n&&d.initial===!1&&!e.manuallyAnimateOnMount&&(w=!1),n=!1,w?t(f):Promise.resolve()}function a(l,u,d){var c;if(r[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(p=>{var h;return(h=p.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),r[l].isActive=u;const f=s(d,l);for(const p in r)r[p].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>r}}function _h(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ha(t,e):!1}function xt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function xh(){return{animate:xt(!0),whileInView:xt(),whileHover:xt(),whileTap:xt(),whileDrag:xt(),whileFocus:xt(),exit:xt()}}class kh extends Kt{constructor(t){super(t),t.animationState||(t.animationState=wh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),sn(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){}}let Sh=0;class Ch extends Kt{constructor(){super(...arguments),this.id=Sh++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:r,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:n??this.node.getProps().custom});r&&!t&&o.then(()=>r(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const $h={animation:{Feature:kh},exit:{Feature:Ch}},Dc=()=>({min:0,max:0}),Ic=()=>({x:Dc(),y:Dc()});function Ah({top:e,left:t,right:r,bottom:n}){return{x:{min:t,max:r},y:{min:e,max:n}}}function Ph(e,t){if(!t)return e;const r=t({x:e.left,y:e.top}),n=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:n.y,right:n.x}}function Eh(e,t){return Ah(Ph(e.getBoundingClientRect(),t))}const Vh=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Th(e){const t=Vh.exec(e);if(!t)return[,];const[,r,n]=t;return[r,n]}const Oh=4;function Qi(e,t,r=1){Me(r<=Oh,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[n,i]=Th(e);if(!n)return;const o=window.getComputedStyle(t).getPropertyValue(n);if(o){const s=o.trim();return Ec(s)?parseFloat(s):s}else return Ai(i)?Qi(i,t,r+1):i}function Mh(e,{...t},r){const n=e.current;if(!(n instanceof Element))return{target:t,transitionEnd:r};r&&(r={...r}),e.values.forEach(i=>{const o=i.get();if(!Ai(o))return;const s=Qi(o,n);s&&i.set(s)});for(const i in t){const o=t[i];if(!Ai(o))continue;const s=Qi(o,n);s&&(t[i]=s,r||(r={}),r[i]===void 0&&(r[i]=o))}return{target:t,transitionEnd:r}}const Fh=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Nc=e=>Fh.has(e),Dh=e=>Object.keys(e).some(Nc),xn=e=>e===gt||e===I,Lc=(e,t)=>parseFloat(e.split(", ")[t]),Rc=(e,t)=>(r,{transform:n})=>{if(n==="none"||!n)return 0;const i=n.match(/^matrix3d\((.+)\)$/);if(i)return Lc(i[1],t);{const o=n.match(/^matrix\((.+)\)$/);return o?Lc(o[1],e):0}},Ih=new Set(["x","y","z"]),Nh=ur.filter(e=>!Ih.has(e));function Lh(e){const t=[];return Nh.forEach(r=>{const n=e.getValue(r);n!==void 0&&(t.push([r,n.get()]),n.set(r.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Yt={width:({x:e},{paddingLeft:t="0",paddingRight:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),height:({y:e},{paddingTop:t="0",paddingBottom:r="0"})=>e.max-e.min-parseFloat(t)-parseFloat(r),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Rc(4,13),y:Rc(5,14)};Yt.translateX=Yt.x,Yt.translateY=Yt.y;const Rh=(e,t,r)=>{const n=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),r.forEach(u=>{a[u]=Yt[u](n,o)}),t.render();const l=t.measureViewportBox();return r.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=Yt[u](l,o)}),e},Bh=(e,t,r={},n={})=>{t={...t},n={...n};const i=Object.keys(t).filter(Nc);let o=[],s=!1;const a=[];if(i.forEach(l=>{const u=e.getValue(l);if(!e.hasValue(l))return;let d=r[l],c=wr(d);const f=t[l];let p;if(dn(f)){const h=f.length,v=f[0]===null?1:0;d=f[v],c=wr(d);for(let w=v;w<h&&f[w]!==null;w++)p?Me(wr(f[w])===p,"All keyframes must be of the same type"):(p=wr(f[w]),Me(p===c||xn(c)&&xn(p),"Keyframes must be of the same dimension as the current value"))}else p=wr(f);if(c!==p)if(xn(c)&&xn(p)){const h=u.get();typeof h=="string"&&u.set(parseFloat(h)),typeof f=="string"?t[l]=parseFloat(f):Array.isArray(f)&&p===I&&(t[l]=f.map(parseFloat))}else c!=null&&c.transform&&(p!=null&&p.transform)&&(d===0||f===0)?d===0?u.set(p.transform(d)):t[l]=c.transform(f):(s||(o=Lh(e),s=!0),a.push(l),n[l]=n[l]!==void 0?n[l]:t[l],u.jump(f))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,u=Rh(t,e,a);return o.length&&o.forEach(([d,c])=>{e.getValue(d).set(c)}),e.render(),on&&l!==null&&window.scrollTo({top:l}),{target:u,transitionEnd:n}}else return{target:t,transitionEnd:n}};function jh(e,t,r,n){return Dh(t)?Bh(e,t,r,n):{target:t,transitionEnd:n}}const Uh=(e,t,r,n)=>{const i=Mh(e,t,n);return t=i.target,n=i.transitionEnd,jh(e,t,r,n)},Ji={current:null},Bc={current:!1};function zh(){if(Bc.current=!0,!!on)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ji.current=e.matches;e.addListener(t),t()}else Ji.current=!1}function Hh(e,t,r){const{willChange:n}=t;for(const i in t){const o=t[i],s=r[i];if(ke(o))e.addValue(i,o),_n(n)&&n.add(i),process.env.NODE_ENV==="development"&&Zi(o.version==="10.16.5",`Attempting to mix Framer Motion versions ${o.version} with 10.16.5 may not work as expected.`);else if(ke(s))e.addValue(i,br(o,{owner:e})),_n(n)&&n.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,br(a!==void 0?a:o,{owner:e}))}}for(const i in r)t[i]===void 0&&e.removeValue(i);return t}const jc=new WeakMap,Uc=Object.keys(lr),Wh=Uc.length,zc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Kh=Si.length;class qh{constructor({parent:t,props:r,presenceContext:n,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>me.render(this.render,!1,!0);const{latestValues:a,renderState:l}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=r.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=r,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=an(r),this.isVariantNode=ma(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(r,{});for(const c in d){const f=d[c];a[c]!==void 0&&ke(f)&&(f.set(a[c],!1),_n(u)&&u.add(c))}}scrapeMotionValuesFromProps(t,r){return{}}mount(t){this.current=t,jc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,n)=>this.bindToMotionValue(n,r)),Bc.current||zh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ji.current,process.env.NODE_ENV!=="production"&&Zi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){jc.delete(this.current),this.projection&&this.projection.unmount(),pn(this.notifyUpdate),pn(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,r){const n=vt.has(t),i=r.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&me.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)}),o=r.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...r},n,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&n){const l="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";r.ignoreStrict?vr(!1,l):Me(!1,l)}for(let l=0;l<Wh;l++){const u=Uc[l],{isEnabled:d,Feature:c,ProjectionNode:f,MeasureLayout:p}=lr[u];f&&(s=f),d(r)&&(!this.features[u]&&c&&(this.features[u]=new c(this)),p&&(a=p))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:d,dragConstraints:c,layoutScroll:f,layoutRoot:p}=r;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!d||c&&ha(c),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const r=this.features[t];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ic()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}makeTargetAnimatable(t,r=!0){return this.makeTargetAnimatableFromInstance(t,this.props,r)}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let n=0;n<zc.length;n++){const i=zc[n];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=Hh(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const n=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(n.initial=this.props.initial),n}const r={};for(let n=0;n<Kh;n++){const i=Si[n],o=this.props[i];(cr(o)||o===!1)&&(r[i]=o)}return r}addVariantChild(t){const r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){r!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,r)),this.values.set(t,r),this.latestValues[t]=r.get()}removeValue(t){this.values.delete(t);const r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return n===void 0&&r!==void 0&&(n=br(r,{owner:this}),this.addValue(t,n)),n}readValue(t){var r;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){var r;const{initial:n}=this.props,i=typeof n=="string"||typeof n=="object"?(r=Fi(this.props,n))===null||r===void 0?void 0:r[t]:void 0;if(n&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ke(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Vc),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}}class Hc extends qh{sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){return t.style?t.style[r]:void 0}removeValueFromRenderState(t,{vars:r,style:n}){delete r[t],delete n[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:r,...n},{transformValues:i},o){let s=fh(n,t||{},this);if(i&&(r&&(r=i(r)),n&&(n=i(n)),s&&(s=i(s))),o){uh(this,n,s);const a=Uh(this,n,s,r);r=a.transitionEnd,n=a.target}return{transition:t,transitionEnd:r,...n}}}function Gh(e){return window.getComputedStyle(e)}class Yh extends Hc{readValueFromInstance(t,r){if(vt.has(r)){const n=Yi(r);return n&&n.default||0}else{const n=Gh(t),i=(_a(r)?n.getPropertyValue(r):n[r])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:r}){return Eh(t,r)}build(t,r,n,i){Pi(t,r,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,r){return Mi(t,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ke(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}renderInstance(t,r,n,i){Va(t,r,n,i)}}class Zh extends Hc{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(vt.has(r)){const n=Yi(r);return n&&n.default||0}return r=Ta.has(r)?r:Oi(r),t.getAttribute(r)}measureInstanceViewportBox(){return Ic()}scrapeMotionValuesFromProps(t,r){return Ma(t,r)}build(t,r,n,i){Vi(t,r,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,r,n,i){Oa(t,r,n,i)}mount(t){this.isSVGTag=Ti(t.tagName),super.mount(t)}}const Xh=(e,t)=>$i(e)?new Zh(t,{enableHardwareAcceleration:!1}):new Yh(t,{enableHardwareAcceleration:!0}),kn=Qd(Of);function Wc(){const e=B(!1);return _i(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Qh(){const e=Wc(),[t,r]=ne(0),n=ae(()=>{e.current&&r(t+1)},[t]);return[ae(()=>me.postRender(n),[n]),t]}class Jh extends xe{getSnapshotBeforeUpdate(t){const r=this.props.childRef.current;if(r&&t.isPresent&&!this.props.isPresent){const n=this.props.sizeRef.current;n.height=r.offsetHeight||0,n.width=r.offsetWidth||0,n.top=r.offsetTop,n.left=r.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function em({children:e,isPresent:t}){const r=Br(),n=B(null),i=B({width:0,height:0,top:0,left:0});return Gr(()=>{const{width:o,height:s,top:a,left:l}=i.current;if(t||!n.current||!o||!s)return;n.current.dataset.motionPopId=r;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
42
|
-
[data-motion-pop-id="${
|
|
41
|
+
`)},Pd=0,Ut=[];function Ed(e){var t=B([]),n=B([0,0]),r=B(),i=re(Pd++)[0],o=re(function(){return ta()})[0],s=B(e);H(function(){s.current=e},[e]),H(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=Xu([e.lockRef.current],(e.shards||[]).map(aa),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=ae(function(v,b){if("touches"in v&&v.touches.length===2)return!s.current.allowPinchZoom;var k=rr(v),y=n.current,_="deltaX"in v?v.deltaX:y[0]-k[0],C="deltaY"in v?v.deltaY:y[1]-k[1],S,N=v.target,D=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in v&&D==="h"&&N.type==="range")return!1;var A=ra(D,N);if(!A)return!0;if(A?S=D:(S=D==="v"?"h":"v",A=ra(D,N)),!A)return!1;if(!r.current&&"changedTouches"in v&&(_||C)&&(r.current=S),!S)return!0;var E=r.current||S;return Cd(E,b,v,E==="h"?_:C,!0)},[]),c=ae(function(v){var b=v;if(!(!Ut.length||Ut[Ut.length-1]!==o)){var k="deltaY"in b?sa(b):rr(b),y=t.current.filter(function(S){return S.name===b.type&&S.target===b.target&&$d(S.delta,k)})[0];if(y&&y.should){b.cancelable&&b.preventDefault();return}if(!y){var _=(s.current.shards||[]).map(aa).filter(Boolean).filter(function(S){return S.contains(b.target)}),C=_.length>0?a(b,_[0]):!s.current.noIsolation;C&&b.cancelable&&b.preventDefault()}}},[]),u=ae(function(v,b,k,y){var _={name:v,delta:b,target:k,should:y};t.current.push(_),setTimeout(function(){t.current=t.current.filter(function(C){return C!==_})},1)},[]),d=ae(function(v){n.current=rr(v),r.current=void 0},[]),l=ae(function(v){u(v.type,sa(v),v.target,a(v,e.lockRef.current))},[]),f=ae(function(v){u(v.type,rr(v),v.target,a(v,e.lockRef.current))},[]);H(function(){return Ut.push(o),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:f}),document.addEventListener("wheel",c,jt),document.addEventListener("touchmove",c,jt),document.addEventListener("touchstart",d,jt),function(){Ut=Ut.filter(function(v){return v!==o}),document.removeEventListener("wheel",c,jt),document.removeEventListener("touchmove",c,jt),document.removeEventListener("touchstart",d,jt)}},[]);var p=e.removeScrollBar,h=e.inert;return M(ee,null,h?M(o,{styles:Ad(i)}):null,p?M(yd,{gapMode:"margin"}):null)}const Vd=sd(Js,Ed);var ca=pe(function(e,t){return M(tr,Oe({},e,{ref:t,sideCar:Vd}))});ca.classNames=tr.classNames;const Td=ca;var Od=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},zt=new WeakMap,ir=new WeakMap,or={},wi=0,la=function(e){return e&&(e.host||la(e.parentNode))},Md=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=la(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Fd=function(e,t,n,r){var i=Md(t,Array.isArray(e)?e:[e]);or[n]||(or[n]=new WeakMap);var o=or[n],s=[],a=new Set,c=new Set(i),u=function(l){!l||a.has(l)||(a.add(l),u(l.parentNode))};i.forEach(u);var d=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(f){if(a.has(f))d(f);else{var p=f.getAttribute(r),h=p!==null&&p!=="false",v=(zt.get(f)||0)+1,b=(o.get(f)||0)+1;zt.set(f,v),o.set(f,b),s.push(f),v===1&&h&&ir.set(f,!0),b===1&&f.setAttribute(n,"true"),h||f.setAttribute(r,"true")}})};return d(t),a.clear(),wi++,function(){s.forEach(function(l){var f=zt.get(l)-1,p=o.get(l)-1;zt.set(l,f),o.set(l,p),f||(ir.has(l)||l.removeAttribute(r),ir.delete(l)),p||l.removeAttribute(n)}),wi--,wi||(zt=new WeakMap,zt=new WeakMap,ir=new WeakMap,or={})}},Dd=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||Od(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),Fd(r,i,n,"aria-hidden")):function(){return null}};const ua="Dialog",[da,Lg]=Su(ua),[Id,Ht]=da(ua),Nd=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=B(null),c=B(null),[u=!1,d]=Pu({prop:r,defaultProp:i,onChange:o});return M(Id,{scope:t,triggerRef:a,contentRef:c,contentId:ci(),titleId:ci(),descriptionId:ci(),open:u,onOpenChange:d,onOpenToggle:ae(()=>d(l=>!l),[d]),modal:s},n)},Ld="DialogPortal",[Rg,fa]=da(Ld,{forceMount:void 0}),_i="DialogOverlay",Rd=pe((e,t)=>{const n=fa(_i,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(_i,e.__scopeDialog);return o.modal?M(mi,{present:r||o.open},M(Bd,be({},i,{ref:t}))):null}),Bd=pe((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ht(_i,n);return M(Td,{as:li,allowPinchZoom:!0,shards:[i.contentRef]},M(di.div,be({"data-state":ha(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),ln="DialogContent",jd=pe((e,t)=>{const n=fa(ln,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Ht(ln,e.__scopeDialog);return M(mi,{present:r||o.open},o.modal?M(Ud,be({},i,{ref:t})):M(zd,be({},i,{ref:t})))}),Ud=pe((e,t)=>{const n=Ht(ln,e.__scopeDialog),r=B(null),i=cn(t,n.contentRef,r);return H(()=>{const o=r.current;if(o)return Dd(o)},[]),M(pa,be({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Bt(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:Bt(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:Bt(e.onFocusOutside,o=>o.preventDefault())}))}),zd=pe((e,t)=>{const n=Ht(ln,e.__scopeDialog),r=B(!1),i=B(!1);return M(pa,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const c=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(c))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),pa=pe((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Ht(ln,n),c=B(null),u=cn(t,c);return Zu(),M(ee,null,M(ju,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},M(Lu,be({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":ha(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function ha(e){return e?"open":"closed"}const Hd=Nd,Wd=Rd,Kd=jd,ma=Ae({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),sr=Ae({}),xi=Ae(null),ar=typeof document<"u",ki=ar?Pe:H,Si=Ae({strict:!1});function qd(e,t,n,r){const{visualElement:i}=fe(sr),o=fe(Si),s=fe(xi),a=fe(ma).reducedMotion,c=B();r=r||o.renderer,!c.current&&r&&(c.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=c.current;Xn(()=>{u&&u.update(n,s)});const d=B(!!window.HandoffAppearAnimations);return ki(()=>{u&&(u.render(),d.current&&u.animationState&&u.animationState.animateChanges())}),H(()=>{u&&(u.updateFeatures(),!d.current&&u.animationState&&u.animationState.animateChanges(),window.HandoffAppearAnimations=void 0,d.current=!1)}),u}function va(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Gd(e,t,n){return ae(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):va(n)&&(n.current=r))},[t])}function un(e){return typeof e=="string"||Array.isArray(e)}function cr(e){return typeof e=="object"&&typeof e.start=="function"}const Ci=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$i=["initial",...Ci];function lr(e){return cr(e.animate)||$i.some(t=>un(e[t]))}function ga(e){return!!(lr(e)||e.variants)}function Yd(e,t){if(lr(e)){const{initial:n,animate:r}=e;return{initial:n===!1||un(n)?n:void 0,animate:un(r)?r:void 0}}return e.inherit!==!1?t:{}}function Zd(e){const{initial:t,animate:n}=Yd(e,fe(sr));return oe(()=>({initial:t,animate:n}),[ya(t),ya(n)])}function ya(e){return Array.isArray(e)?e.join(" "):e}const ba={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},dn={};for(const e in ba)dn[e]={isEnabled:t=>ba[e].some(n=>!!t[n])};function Ai(e){for(const t in e)dn[t]={...dn[t],...e[t]}}const wa=Ae({}),Xd=Ae({}),Qd=Symbol.for("motionComponentSymbol");function Jd({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&Ai(e);function o(a,c){let u;const d={...fe(ma),...a,layoutId:ef(a)},{isStatic:l}=d,f=Zd(a),p=r(a,l);if(!l&&ar){f.visualElement=qd(i,p,d,t);const h=fe(Xd),v=fe(Si).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,v,e,h))}return M(sr.Provider,{value:f},u&&f.visualElement?M(u,{visualElement:f.visualElement,...d}):null,n(i,a,Gd(p,f.visualElement,c),p,l,f.visualElement))}const s=pe(o);return s[Qd]=i,s}function ef({layoutId:e}){const t=fe(wa).id;return t&&e!==void 0?t+"-"+e:e}function tf(e){function t(r,i={}){return Jd(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const nf=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Pi(e){return typeof e!="string"||e.includes("-")?!1:!!(nf.indexOf(e)>-1||/[A-Z]/.test(e))}const rf={},fn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vt=new Set(fn);function _a(e,{layout:t,layoutId:n}){return vt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!rf[e]||e==="opacity")}const ke=e=>!!(e&&e.getVelocity),of={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},sf=fn.length;function af(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<sf;s++){const a=fn[s];if(e[a]!==void 0){const c=of[a]||a;o+=`${c}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const xa=e=>t=>typeof t=="string"&&t.startsWith(e),ka=xa("--"),Ei=xa("var(--"),cf=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,lf=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Wt=(e,t,n)=>Math.min(Math.max(n,e),t),gt={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pn={...gt,transform:e=>Wt(0,1,e)},ur={...gt,default:1},hn=e=>Math.round(e*1e5)/1e5,dr=/(-)?([\d]*\.?[\d])+/g,Sa=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,uf=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function mn(e){return typeof e=="string"}const vn=e=>({test:t=>mn(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),et=vn("deg"),Kt=vn("%"),I=vn("px"),df=vn("vh"),ff=vn("vw"),Ca={...Kt,parse:e=>Kt.parse(e)/100,transform:e=>Kt.transform(e*100)},$a={...gt,transform:Math.round},Aa={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,size:I,top:I,right:I,bottom:I,left:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:ur,scaleX:ur,scaleY:ur,scaleZ:ur,skew:et,skewX:et,skewY:et,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:pn,originX:Ca,originY:Ca,originZ:I,zIndex:$a,fillOpacity:pn,strokeOpacity:pn,numOctaves:$a};function Vi(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let c=!1,u=!1,d=!0;for(const l in t){const f=t[l];if(ka(l)){o[l]=f;continue}const p=Aa[l],h=lf(f,p);if(vt.has(l)){if(c=!0,s[l]=h,!d)continue;f!==(p.default||0)&&(d=!1)}else l.startsWith("origin")?(u=!0,a[l]=h):i[l]=h}if(t.transform||(c||r?i.transform=af(e.transform,n,d,r):i.transform&&(i.transform="none")),u){const{originX:l="50%",originY:f="50%",originZ:p=0}=a;i.transformOrigin=`${l} ${f} ${p}`}}const Ti=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Pa(e,t,n){for(const r in t)!ke(t[r])&&!_a(r,n)&&(e[r]=t[r])}function pf({transformTemplate:e},t,n){return oe(()=>{const r=Ti();return Vi(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function hf(e,t,n){const r=e.style||{},i={};return Pa(i,r,e),Object.assign(i,pf(e,t,n)),e.transformValues?e.transformValues(i):i}function mf(e,t,n){const r={},i=hf(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const vf=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function fr(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||vf.has(e)}let Ea=e=>!fr(e);function gf(e){e&&(Ea=t=>t.startsWith("on")?!fr(t):e(t))}try{gf(require("@emotion/is-prop-valid").default)}catch{}function yf(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Ea(i)||n===!0&&fr(i)||!t&&!fr(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Va(e,t,n){return typeof e=="string"?e:I.transform(t+n*e)}function bf(e,t,n){const r=Va(t,e.x,e.width),i=Va(n,e.y,e.height);return`${r} ${i}`}const wf={offset:"stroke-dashoffset",array:"stroke-dasharray"},_f={offset:"strokeDashoffset",array:"strokeDasharray"};function xf(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?wf:_f;e[o.offset]=I.transform(-r);const s=I.transform(t),a=I.transform(n);e[o.array]=`${s} ${a}`}function Oi(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:c=0,...u},d,l,f){if(Vi(e,u,d,f),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:h,dimensions:v}=e;p.transform&&(v&&(h.transform=p.transform),delete p.transform),v&&(i!==void 0||o!==void 0||h.transform)&&(h.transformOrigin=bf(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),s!==void 0&&xf(p,s,a,c,!1)}const Ta=()=>({...Ti(),attrs:{}}),Mi=e=>typeof e=="string"&&e.toLowerCase()==="svg";function kf(e,t,n,r){const i=oe(()=>{const o=Ta();return Oi(o,t,{enableHardwareAcceleration:!1},Mi(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Pa(o,e.style,e),i.style={...o,...i.style}}return i}function Sf(e=!1){return(n,r,i,{latestValues:o},s)=>{const c=(Pi(n)?kf:mf)(r,o,s,n),d={...yf(r,typeof n=="string",e),...c,ref:i},{children:l}=r,f=oe(()=>ke(l)?l.get():l,[l]);return M(n,{...d,children:f})}}const Fi=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Oa(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Ma=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Fa(e,t,n,r){Oa(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Ma.has(i)?i:Fi(i),t.attrs[i])}function Di(e,t){const{style:n}=e,r={};for(const i in n)(ke(n[i])||t.style&&ke(t.style[i])||_a(i,e))&&(r[i]=n[i]);return r}function Da(e,t){const n=Di(e,t);for(const r in e)if(ke(e[r])||ke(t[r])){const i=fn.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[i]=e[r]}return n}function Ii(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function Ia(e){const t=B(null);return t.current===null&&(t.current=e()),t.current}const pr=e=>Array.isArray(e),Cf=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),$f=e=>pr(e)?e[e.length-1]||0:e;function Af(e){const t=ke(e)?e.get():e;return Cf(t)?t.toValue():t}function Pf({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:Ef(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const Na=e=>(t,n)=>{const r=fe(sr),i=fe(xi),o=()=>Pf(e,t,r,i);return n?o():Ia(o)};function Ef(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=Af(o[f]);let{initial:s,animate:a}=e;const c=lr(e),u=ga(e);t&&u&&!c&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||s===!1;const l=d?a:s;return l&&typeof l!="boolean"&&!cr(l)&&(Array.isArray(l)?l:[l]).forEach(p=>{const h=Ii(e,p);if(!h)return;const{transitionEnd:v,transition:b,...k}=h;for(const y in k){let _=k[y];if(Array.isArray(_)){const C=d?_.length-1:0;_=_[C]}_!==null&&(i[y]=_)}for(const y in v)i[y]=v[y]}),i}const he=e=>e;class La{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function Vf(e){let t=new La,n=new La,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(c,u=!1,d=!1)=>{const l=d&&i,f=l?t:n;return u&&s.add(c),f.add(c)&&l&&i&&(r=t.order.length),c},cancel:c=>{n.remove(c),s.delete(c)},process:c=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u<r;u++){const d=t.order[u];d(c),s.has(d)&&(a.schedule(d),e())}i=!1,o&&(o=!1,a.process(c))}};return a}const hr=["prepare","read","update","preRender","render","postRender"],Tf=40;function Of(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=hr.reduce((l,f)=>(l[f]=Vf(()=>n=!0),l),{}),s=l=>o[l].process(i),a=()=>{const l=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(l-i.timestamp,Tf),1),i.timestamp=l,i.isProcessing=!0,hr.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},c=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:hr.reduce((l,f)=>{const p=o[f];return l[f]=(h,v=!1,b=!1)=>(n||c(),p.schedule(h,v,b)),l},{}),cancel:l=>hr.forEach(f=>o[f].cancel(l)),state:i,steps:o}}const{schedule:me,cancel:mr,state:gn,steps:Bg}=Of(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),Mf={useVisualState:Na({scrapeMotionValuesFromProps:Da,createRenderState:Ta,onMount:(e,t,{renderState:n,latestValues:r})=>{me.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),me.render(()=>{Oi(n,r,{enableHardwareAcceleration:!1},Mi(t.tagName),e.transformTemplate),Fa(t,n)})}})},Ff={useVisualState:Na({scrapeMotionValuesFromProps:Di,createRenderState:Ti})};function Df(e,{forwardMotionProps:t=!1},n,r){return{...Pi(e)?Mf:Ff,preloadedFeatures:n,useRender:Sf(t),createVisualElement:r,Component:e}}function yt(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const If=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Ra(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const Nf=e=>t=>If(t)&&e(t,Ra(t));function vr(e,t,n,r){return yt(e,t,Nf(n),r)}const Lf=(e,t)=>n=>t(e(n)),bt=(...e)=>e.reduce(Lf);function Ba(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const ja=Ba("dragHorizontal"),Ua=Ba("dragVertical");function Rf(e){let t=!1;if(e==="y")t=Ua();else if(e==="x")t=ja();else{const n=ja(),r=Ua();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function za(){const e=Rf(!0);return e?(e(),!1):!0}class qt{constructor(t){this.isMounted=!1,this.node=t}update(){}}function Ha(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.type==="touch"||za())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&me.update(()=>a[r](o,s))};return vr(e.current,n,i,{passive:!e.getProps()[r]})}class Bf extends qt{mount(){this.unmount=bt(Ha(this.node,!0),Ha(this.node,!1))}unmount(){}}class jf extends qt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=bt(yt(this.node.current,"focus",()=>this.onFocus()),yt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const Wa=(e,t)=>t?e===t?!0:Wa(e,t.parentElement):!1;function Ni(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Ra(n))}class Uf extends qt{constructor(){super(...arguments),this.removeStartListeners=he,this.removeEndListeners=he,this.removeAccessibleListeners=he,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),o=vr(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:d}=this.node.getProps();me.update(()=>{Wa(this.node.current,a.target)?u&&u(a,c):d&&d(a,c)})},{passive:!(r.onTap||r.onPointerUp)}),s=vr(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=bt(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Ni("up",(c,u)=>{const{onTap:d}=this.node.getProps();d&&me.update(()=>d(c,u))})};this.removeEndListeners(),this.removeEndListeners=yt(this.node.current,"keyup",s),Ni("down",(a,c)=>{this.startPress(a,c)})},n=yt(this.node.current,"keydown",t),r=()=>{this.isPressing&&Ni("cancel",(o,s)=>this.cancelPress(o,s))},i=yt(this.node.current,"blur",r);this.removeAccessibleListeners=bt(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&me.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!za()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&me.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=vr(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=yt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=bt(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Li=new WeakMap,Ri=new WeakMap,zf=e=>{const t=Li.get(e.target);t&&t(e)},Hf=e=>{e.forEach(zf)};function Wf({root:e,...t}){const n=e||document;Ri.has(n)||Ri.set(n,{});const r=Ri.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Hf,{root:e,...t})),r[i]}function Kf(e,t,n){const r=Wf(t);return Li.set(e,n),r.observe(e),()=>{Li.delete(e),r.unobserve(e)}}const qf={some:0,all:1};class Gf extends qt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:qf[i]},a=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:l}=this.node.getProps(),f=u?d:l;f&&f(c)};return Kf(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Yf(t,n))&&this.startObserver()}unmount(){}}function Yf({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Zf={inView:{Feature:Gf},tap:{Feature:Uf},focus:{Feature:jf},hover:{Feature:Bf}};function Ka(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Xf(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function Qf(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function gr(e,t,n){const r=e.getProps();return Ii(r,t,n!==void 0?n:r.custom,Xf(e),Qf(e))}const Jf="data-"+Fi("framerAppearId");let yn=he,Me=he;process.env.NODE_ENV!=="production"&&(yn=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Me=(e,t)=>{if(!e)throw new Error(t)});const wt=e=>e*1e3,tt=e=>e/1e3,ep={current:!1},qa=e=>Array.isArray(e)&&typeof e[0]=="number";function Ga(e){return!!(!e||typeof e=="string"&&Ya[e]||qa(e)||Array.isArray(e)&&e.every(Ga))}const bn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Ya={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bn([0,.65,.55,1]),circOut:bn([.55,0,1,.45]),backIn:bn([.31,.01,.66,-.59]),backOut:bn([.33,1.53,.69,.99])};function Za(e){if(e)return qa(e)?bn(e):Array.isArray(e)?e.map(Za):Ya[e]}function tp(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:s="loop",ease:a,times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=Za(a);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:i,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}function np(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const Xa=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,rp=1e-7,ip=12;function op(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=Xa(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>rp&&++a<ip);return s}function wn(e,t,n,r){if(e===t&&n===r)return he;const i=o=>op(o,0,1,e,n);return o=>o===0||o===1?o:Xa(i(o),t,r)}const sp=wn(.42,0,1,1),ap=wn(0,0,.58,1),Qa=wn(.42,0,.58,1),cp=e=>Array.isArray(e)&&typeof e[0]!="number",Ja=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ec=e=>t=>1-e(1-t),tc=e=>1-Math.sin(Math.acos(e)),nc=ec(tc),lp=Ja(nc),rc=wn(.33,1.53,.69,.99),Bi=ec(rc),up=Ja(Bi),ic={linear:he,easeIn:sp,easeInOut:Qa,easeOut:ap,circIn:tc,circInOut:lp,circOut:nc,backIn:Bi,backInOut:up,backOut:rc,anticipate:e=>(e*=2)<1?.5*Bi(e):.5*(2-Math.pow(2,-10*(e-1)))},oc=e=>{if(Array.isArray(e)){Me(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return wn(t,n,r,i)}else if(typeof e=="string")return Me(ic[e]!==void 0,`Invalid easing type '${e}'`),ic[e];return e},ji=(e,t)=>n=>!!(mn(n)&&uf.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),sc=(e,t,n)=>r=>{if(!mn(r))return r;const[i,o,s,a]=r.match(dr);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},dp=e=>Wt(0,255,e),Ui={...gt,transform:e=>Math.round(dp(e))},_t={test:ji("rgb","red"),parse:sc("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ui.transform(e)+", "+Ui.transform(t)+", "+Ui.transform(n)+", "+hn(pn.transform(r))+")"};function fp(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const zi={test:ji("#"),parse:fp,transform:_t.transform},Gt={test:ji("hsl","hue"),parse:sc("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Kt.transform(hn(t))+", "+Kt.transform(hn(n))+", "+hn(pn.transform(r))+")"},ge={test:e=>_t.test(e)||zi.test(e)||Gt.test(e),parse:e=>_t.test(e)?_t.parse(e):Gt.test(e)?Gt.parse(e):zi.parse(e),transform:e=>mn(e)?e:e.hasOwnProperty("red")?_t.transform(e):Gt.transform(e)},yr=(e,t,n)=>-n*e+n*t+e;function Hi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function pp({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,c=2*n-a;i=Hi(c,a,e+1/3),o=Hi(c,a,e),s=Hi(c,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Wi=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},hp=[zi,_t,Gt],mp=e=>hp.find(t=>t.test(e));function ac(e){const t=mp(e);Me(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`);let n=t.parse(e);return t===Gt&&(n=pp(n)),n}const cc=(e,t)=>{const n=ac(e),r=ac(t),i={...n};return o=>(i.red=Wi(n.red,r.red,o),i.green=Wi(n.green,r.green,o),i.blue=Wi(n.blue,r.blue,o),i.alpha=yr(n.alpha,r.alpha,o),_t.transform(i))};function vp(e){var t,n;return isNaN(e)&&mn(e)&&(((t=e.match(dr))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Sa))===null||n===void 0?void 0:n.length)||0)>0}const lc={regex:cf,countKey:"Vars",token:"${v}",parse:he},uc={regex:Sa,countKey:"Colors",token:"${c}",parse:ge.parse},dc={regex:dr,countKey:"Numbers",token:"${n}",parse:gt.parse};function Ki(e,{regex:t,countKey:n,token:r,parse:i}){const o=e.tokenised.match(t);o&&(e["num"+n]=o.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...o.map(i)))}function br(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Ki(n,lc),Ki(n,uc),Ki(n,dc),n}function fc(e){return br(e).values}function pc(e){const{values:t,numColors:n,numVars:r,tokenised:i}=br(e),o=t.length;return s=>{let a=i;for(let c=0;c<o;c++)c<r?a=a.replace(lc.token,s[c]):c<r+n?a=a.replace(uc.token,ge.transform(s[c])):a=a.replace(dc.token,hn(s[c]));return a}}const gp=e=>typeof e=="number"?0:e;function yp(e){const t=fc(e);return pc(e)(t.map(gp))}const Yt={test:vp,parse:fc,createTransformer:pc,getAnimatableNone:yp},hc=(e,t)=>n=>`${n>0?t:e}`;function mc(e,t){return typeof e=="number"?n=>yr(e,t,n):ge.test(e)?cc(e,t):e.startsWith("var(")?hc(e,t):gc(e,t)}const vc=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,s)=>mc(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}},bp=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=mc(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},gc=(e,t)=>{const n=Yt.createTransformer(t),r=br(e),i=br(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?bt(vc(r.values,i.values),n):(yn(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),hc(e,t))},yc=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},bc=(e,t)=>n=>yr(e,t,n);function wp(e){return typeof e=="number"?bc:typeof e=="string"?ge.test(e)?cc:gc:Array.isArray(e)?vc:typeof e=="object"?bp:bc}function _p(e,t,n){const r=[],i=n||wp(e[0]),o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const c=Array.isArray(t)?t[s]||he:t;a=bt(c,a)}r.push(a)}return r}function wc(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Me(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=_p(t,r,i),a=s.length,c=u=>{let d=0;if(a>1)for(;d<e.length-2&&!(u<e[d+1]);d++);const l=yc(e[d],e[d+1],u);return s[d](l)};return n?u=>c(Wt(e[0],e[o-1],u)):c}function xp(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=yc(0,t,r);e.push(yr(n,1,i))}}function kp(e){const t=[0];return xp(t,e.length-1),t}function Sp(e,t){return e.map(n=>n*t)}function Cp(e,t){return e.map(()=>t||Qa).splice(0,e.length-1)}function wr({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=cp(r)?r.map(oc):oc(r),o={done:!1,value:t[0]},s=Sp(n&&n.length===t.length?n:kp(t),e),a=wc(s,t,{ease:Array.isArray(i)?i:Cp(t,i)});return{calculatedDuration:e,next:c=>(o.value=a(c),o.done=c>=e,o)}}function _c(e,t){return t?e*(1e3/t):0}const $p=5;function xc(e,t,n){const r=Math.max(t-$p,0);return _c(n-e(r),t-r)}const qi=.001,Ap=.01,kc=10,Pp=.05,Ep=1;function Vp({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;yn(e<=wt(kc),"Spring duration must be 10 seconds or less");let s=1-t;s=Wt(Pp,Ep,s),e=Wt(Ap,kc,tt(e)),s<1?(i=u=>{const d=u*s,l=d*e,f=d-n,p=Gi(u,s),h=Math.exp(-l);return qi-f/p*h},o=u=>{const l=u*s*e,f=l*n+n,p=Math.pow(s,2)*Math.pow(u,2)*e,h=Math.exp(-l),v=Gi(Math.pow(u,2),s);return(-i(u)+qi>0?-1:1)*((f-p)*h)/v}):(i=u=>{const d=Math.exp(-u*e),l=(u-n)*e+1;return-qi+d*l},o=u=>{const d=Math.exp(-u*e),l=(n-u)*(e*e);return d*l});const a=5/e,c=Op(i,o,a);if(e=wt(e),isNaN(c))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const Tp=12;function Op(e,t,n){let r=n;for(let i=1;i<Tp;i++)r=r-e(r)/t(r);return r}function Gi(e,t){return e*Math.sqrt(1-t*t)}const Mp=["duration","bounce"],Fp=["stiffness","damping","mass"];function Sc(e,t){return t.some(n=>e[n]!==void 0)}function Dp(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Sc(e,Fp)&&Sc(e,Mp)){const n=Vp(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function Cc({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:c,mass:u,velocity:d,duration:l,isResolvedFromDuration:f}=Dp(r),p=d?-tt(d):0,h=c/(2*Math.sqrt(a*u)),v=o-i,b=tt(Math.sqrt(a/u)),k=Math.abs(v)<5;n||(n=k?.01:2),t||(t=k?.005:.5);let y;if(h<1){const _=Gi(b,h);y=C=>{const S=Math.exp(-h*b*C);return o-S*((p+h*b*v)/_*Math.sin(_*C)+v*Math.cos(_*C))}}else if(h===1)y=_=>o-Math.exp(-b*_)*(v+(p+b*v)*_);else{const _=b*Math.sqrt(h*h-1);y=C=>{const S=Math.exp(-h*b*C),N=Math.min(_*C,300);return o-S*((p+h*b*v)*Math.sinh(N)+_*v*Math.cosh(N))/_}}return{calculatedDuration:f&&l||null,next:_=>{const C=y(_);if(f)s.done=_>=l;else{let S=p;_!==0&&(h<1?S=xc(y,_,C):S=0);const N=Math.abs(S)<=n,D=Math.abs(o-C)<=t;s.done=N&&D}return s.value=s.done?o:C,s}}}function $c({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:u=.5,restSpeed:d}){const l=e[0],f={done:!1,value:l},p=A=>a!==void 0&&A<a||c!==void 0&&A>c,h=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let v=n*t;const b=l+v,k=s===void 0?b:s(b);k!==b&&(v=k-l);const y=A=>-v*Math.exp(-A/r),_=A=>k+y(A),C=A=>{const E=y(A),W=_(A);f.done=Math.abs(E)<=u,f.value=f.done?k:W};let S,N;const D=A=>{p(f.value)&&(S=A,N=Cc({keyframes:[f.value,h(f.value)],velocity:xc(_,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return D(0),{calculatedDuration:null,next:A=>{let E=!1;return!N&&S===void 0&&(E=!0,C(A),D(A)),S!==void 0&&A>S?N.next(A-S):(!E&&C(A),f)}}}const Ip=e=>{const t=({timestamp:n})=>e(n);return{start:()=>me.update(t,!0),stop:()=>mr(t),now:()=>gn.isProcessing?gn.timestamp:performance.now()}},Ac=2e4;function Pc(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Ac;)t+=n,r=e.next(t);return t>=Ac?1/0:t}const Np={decay:$c,inertia:$c,tween:wr,keyframes:wr,spring:Cc};function _r({autoplay:e=!0,delay:t=0,driver:n=Ip,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:l,...f}){let p=1,h=!1,v,b;const k=()=>{b=new Promise(G=>{v=G})};k();let y;const _=Np[i]||wr;let C;_!==wr&&typeof r[0]!="number"&&(C=wc([0,100],r,{clamp:!1}),r=[0,100]);const S=_({...f,keyframes:r});let N;a==="mirror"&&(N=_({...f,keyframes:[...r].reverse(),velocity:-(f.velocity||0)}));let D="idle",A=null,E=null,W=null;S.calculatedDuration===null&&o&&(S.calculatedDuration=Pc(S));const{calculatedDuration:Q}=S;let j=1/0,L=1/0;Q!==null&&(j=Q+s,L=j*(o+1)-s);let R=0;const U=G=>{if(E===null)return;p>0&&(E=Math.min(E,G)),p<0&&(E=Math.min(G-L/p,E)),A!==null?R=A:R=Math.round(G-E)*p;const dt=R-t*(p>=0?1:-1),Fn=p>=0?dt<0:dt>L;R=Math.max(dt,0),D==="finished"&&A===null&&(R=L);let Br=R,Dn=S;if(o){const Tt=R/j;let Ot=Math.floor(Tt),Ge=Tt%1;!Ge&&Tt>=1&&(Ge=1),Ge===1&&Ot--,Ot=Math.min(Ot,o+1);const In=!!(Ot%2);In&&(a==="reverse"?(Ge=1-Ge,s&&(Ge-=s/j)):a==="mirror"&&(Dn=N));let Ur=Wt(0,1,Ge);R>L&&(Ur=a==="reverse"&&In?1:0),Br=Ur*j}const Vt=Fn?{done:!1,value:r[0]}:Dn.next(Br);C&&(Vt.value=C(Vt.value));let{done:tn}=Vt;!Fn&&Q!==null&&(tn=p>=0?R>=L:R<=0);const jr=A===null&&(D==="finished"||D==="running"&&tn);return l&&l(Vt.value),jr&&qe(),Vt},ne=()=>{y&&y.stop(),y=void 0},de=()=>{D="idle",ne(),v(),k(),E=W=null},qe=()=>{D="finished",d&&d(),ne(),v()},ut=()=>{if(h)return;y||(y=n(U));const G=y.now();c&&c(),A!==null?E=G-A:(!E||D==="finished")&&(E=G),D==="finished"&&k(),W=E,A=null,D="running",y.start()};e&&ut();const Et={then(G,dt){return b.then(G,dt)},get time(){return tt(R)},set time(G){G=wt(G),R=G,A!==null||!y||p===0?A=G:E=y.now()-G/p},get duration(){const G=S.calculatedDuration===null?Pc(S):S.calculatedDuration;return tt(G)},get speed(){return p},set speed(G){G===p||!y||(p=G,Et.time=tt(R))},get state(){return D},play:ut,pause:()=>{D="paused",A=R},stop:()=>{h=!0,D!=="idle"&&(D="idle",u&&u(),de())},cancel:()=>{W!==null&&U(W),de()},complete:()=>{D="finished"},sample:G=>(E=0,U(G))};return Et}function Lp(e){let t;return()=>(t===void 0&&(t=e()),t)}const Rp=Lp(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bp=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),xr=10,jp=2e4,Up=(e,t)=>t.type==="spring"||e==="backgroundColor"||!Ga(t.ease);function zp(e,t,{onUpdate:n,onComplete:r,...i}){if(!(Rp()&&Bp.has(t)&&!i.repeatDelay&&i.repeatType!=="mirror"&&i.damping!==0&&i.type!=="inertia"))return!1;let s=!1,a,c;const u=()=>{c=new Promise(y=>{a=y})};u();let{keyframes:d,duration:l=300,ease:f,times:p}=i;if(Up(t,i)){const y=_r({...i,repeat:0,delay:0});let _={done:!1,value:d[0]};const C=[];let S=0;for(;!_.done&&S<jp;)_=y.sample(S),C.push(_.value),S+=xr;p=void 0,d=C,l=S-xr,f="linear"}const h=tp(e.owner.current,t,d,{...i,duration:l,ease:f,times:p});i.syncStart&&(h.startTime=gn.isProcessing?gn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const v=()=>h.cancel(),b=()=>{me.update(v),a(),u()};return h.onfinish=()=>{e.set(np(d,i)),r&&r(),b()},{then(y,_){return c.then(y,_)},attachTimeline(y){return h.timeline=y,h.onfinish=null,he},get time(){return tt(h.currentTime||0)},set time(y){h.currentTime=wt(y)},get speed(){return h.playbackRate},set speed(y){h.playbackRate=y},get duration(){return tt(l)},play:()=>{s||(h.play(),mr(v))},pause:()=>h.pause(),stop:()=>{if(s=!0,h.playState==="idle")return;const{currentTime:y}=h;if(y){const _=_r({...i,autoplay:!1});e.setWithVelocity(_.sample(y-xr).value,_.sample(y).value,xr)}b()},complete:()=>h.finish(),cancel:b}}function Hp({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:he,pause:he,stop:he,then:o=>(o(),Promise.resolve()),cancel:he,complete:he});return t?_r({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}const Wp={type:"spring",stiffness:500,damping:25,restSpeed:10},Kp=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),qp={type:"keyframes",duration:.8},Gp={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Yp=(e,{keyframes:t})=>t.length>2?qp:vt.has(e)?e.startsWith("scale")?Kp(t[1]):Wp:Gp,Yi=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Yt.test(t)||t==="0")&&!t.startsWith("url(")),Zp=new Set(["brightness","contrast","saturate","opacity"]);function Xp(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(dr)||[];if(!r)return e;const i=n.replace(r,"");let o=Zp.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const Qp=/([a-z-]*)\(.*?\)/g,Zi={...Yt,getAnimatableNone:e=>{const t=e.match(Qp);return t?t.map(Xp).join(" "):e}},Jp={...Aa,color:ge,backgroundColor:ge,outlineColor:ge,fill:ge,stroke:ge,borderColor:ge,borderTopColor:ge,borderRightColor:ge,borderBottomColor:ge,borderLeftColor:ge,filter:Zi,WebkitFilter:Zi},Xi=e=>Jp[e];function Ec(e,t){let n=Xi(e);return n!==Zi&&(n=Yt),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Vc=e=>/^0[^.\s]+$/.test(e);function eh(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Vc(e)}function th(e,t,n,r){const i=Yi(t,n);let o;Array.isArray(n)?o=[...n]:o=[null,n];const s=r.from!==void 0?r.from:e.get();let a;const c=[];for(let u=0;u<o.length;u++)o[u]===null&&(o[u]=u===0?s:o[u-1]),eh(o[u])&&c.push(u),typeof o[u]=="string"&&o[u]!=="none"&&o[u]!=="0"&&(a=o[u]);if(i&&c.length&&a)for(let u=0;u<c.length;u++){const d=c[u];o[d]=Ec(t,a)}return o}function nh({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:u,...d}){return!!Object.keys(d).length}function rh(e,t){return e[t]||e.default||e}const ih=(e,t,n,r={})=>i=>{const o=rh(r,e)||{},s=o.delay||r.delay||0;let{elapsed:a=0}=r;a=a-wt(s);const c=th(t,e,n,o),u=c[0],d=c[c.length-1],l=Yi(e,u),f=Yi(e,d);yn(l===f,`You are trying to animate ${e} from "${u}" to "${d}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${d} via the \`style\` property.`);let p={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:h=>{t.set(h),o.onUpdate&&o.onUpdate(h)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(nh(o)||(p={...p,...Yp(e,p)}),p.duration&&(p.duration=wt(p.duration)),p.repeatDelay&&(p.repeatDelay=wt(p.repeatDelay)),!l||!f||ep.current||o.type===!1)return Hp(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const h=zp(t,e,p);if(h)return h}return _r(p)};function kr(e){return!!(ke(e)&&e.add)}const Tc=e=>/^\-?\d*\.?\d+$/.test(e);function oh(e,t){e.indexOf(t)===-1&&e.push(t)}function sh(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Oc{constructor(){this.subscriptions=[]}add(t){return oh(this.subscriptions,t),()=>sh(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Mc=new Set;function Qi(e,t,n){e||Mc.has(t)||(console.warn(t),n&&console.warn(n),Mc.add(t))}const ah=e=>!isNaN(parseFloat(e));class ch{constructor(t,n={}){this.version="10.16.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:s}=gn;this.lastUpdated!==s&&(this.timeDelta=o,this.lastUpdated=s,me.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>me.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=ah(this.current),this.owner=n.owner}onChange(t){return process.env.NODE_ENV!=="production"&&Qi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Oc);const r=this.events[t].add(n);return t==="change"?()=>{r(),me.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?_c(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function _n(e,t){return new ch(e,t)}const Fc=e=>t=>t.test(e),Dc=[gt,I,Kt,et,ff,df,{test:e=>e==="auto",parse:e=>e}],xn=e=>Dc.find(Fc(e)),lh=[...Dc,ge,Yt],uh=e=>lh.find(Fc(e));function dh(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,_n(n))}function fh(e,t){const n=gr(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const s in o){const a=$f(o[s]);dh(e,s,a)}}function ph(e,t,n){var r,i;const o=Object.keys(t).filter(a=>!e.hasValue(a)),s=o.length;if(s)for(let a=0;a<s;a++){const c=o[a],u=t[c];let d=null;Array.isArray(u)&&(d=u[0]),d===null&&(d=(i=(r=n[c])!==null&&r!==void 0?r:e.readValue(c))!==null&&i!==void 0?i:t[c]),d!=null&&(typeof d=="string"&&(Tc(d)||Vc(d))?d=parseFloat(d):!uh(d)&&Yt.test(u)&&(d=Ec(c,u)),e.addValue(c,_n(d,{owner:e})),n[c]===void 0&&(n[c]=d),d!==null&&e.setBaseTarget(c,d))}}function hh(e,t){return t?(t[e]||t.default||t).from:void 0}function mh(e,t,n){const r={};for(const i in e){const o=hh(i,t);if(o!==void 0)r[i]=o;else{const s=n.getValue(i);s&&(r[i]=s.get())}}return r}function vh({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ic(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=e.getDefaultTransition(),transitionEnd:s,...a}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(o=r);const u=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const l in a){const f=e.getValue(l),p=a[l];if(!f||p===void 0||d&&vh(d,l))continue;const h={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const b=e.getProps()[Jf];b&&(h.elapsed=window.HandoffAppearAnimations(b,l,f,me),h.syncStart=!0)}f.start(ih(l,f,p,e.shouldReduceMotion&&vt.has(l)?{type:!1}:h));const v=f.animation;kr(c)&&(c.add(l),v.then(()=>c.remove(l))),u.push(v)}return s&&Promise.all(u).then(()=>{s&&fh(e,s)}),u}function Ji(e,t,n={}){const r=gr(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Ic(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:l}=i;return gh(e,t,u+c,d,l,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[c,u]=a==="beforeChildren"?[o,s]:[s,o];return c().then(()=>u())}else return Promise.all([o(),s(n.delay)])}function gh(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,c=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(yh).forEach((u,d)=>{u.notify("AnimationStart",t),s.push(Ji(u,t,{...o,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function yh(e,t){return e.sortNodePosition(t)}function bh(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Ji(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Ji(e,t,n);else{const i=typeof t=="function"?gr(e,t,n.custom):t;r=Promise.all(Ic(e,i,n))}return r.then(()=>e.notify("AnimationComplete",t))}const wh=[...Ci].reverse(),_h=Ci.length;function xh(e){return t=>Promise.all(t.map(({animation:n,options:r})=>bh(e,n,r)))}function kh(e){let t=xh(e);const n=Ch();let r=!0;const i=(c,u)=>{const d=gr(e,u);if(d){const{transition:l,transitionEnd:f,...p}=d;c={...c,...p,...f}}return c};function o(c){t=c(e)}function s(c,u){const d=e.getProps(),l=e.getVariantContext(!0)||{},f=[],p=new Set;let h={},v=1/0;for(let k=0;k<_h;k++){const y=wh[k],_=n[y],C=d[y]!==void 0?d[y]:l[y],S=un(C),N=y===u?_.isActive:null;N===!1&&(v=k);let D=C===l[y]&&C!==d[y]&&S;if(D&&r&&e.manuallyAnimateOnMount&&(D=!1),_.protectedKeys={...h},!_.isActive&&N===null||!C&&!_.prevProp||cr(C)||typeof C=="boolean")continue;const A=Sh(_.prevProp,C);let E=A||y===u&&_.isActive&&!D&&S||k>v&&S;const W=Array.isArray(C)?C:[C];let Q=W.reduce(i,{});N===!1&&(Q={});const{prevResolvedValues:j={}}=_,L={...j,...Q},R=U=>{E=!0,p.delete(U),_.needsAnimating[U]=!0};for(const U in L){const ne=Q[U],de=j[U];h.hasOwnProperty(U)||(ne!==de?pr(ne)&&pr(de)?!Ka(ne,de)||A?R(U):_.protectedKeys[U]=!0:ne!==void 0?R(U):p.add(U):ne!==void 0&&p.has(U)?R(U):_.protectedKeys[U]=!0)}_.prevProp=C,_.prevResolvedValues=Q,_.isActive&&(h={...h,...Q}),r&&e.blockInitialAnimation&&(E=!1),E&&!D&&f.push(...W.map(U=>({animation:U,options:{type:y,...c}})))}if(p.size){const k={};p.forEach(y=>{const _=e.getBaseTarget(y);_!==void 0&&(k[y]=_)}),f.push({animation:k})}let b=!!f.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(f):Promise.resolve()}function a(c,u,d){var l;if(n[c].isActive===u)return Promise.resolve();(l=e.variantChildren)===null||l===void 0||l.forEach(p=>{var h;return(h=p.animationState)===null||h===void 0?void 0:h.setActive(c,u)}),n[c].isActive=u;const f=s(d,c);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function Sh(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ka(t,e):!1}function xt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Ch(){return{animate:xt(!0),whileInView:xt(),whileHover:xt(),whileTap:xt(),whileDrag:xt(),whileFocus:xt(),exit:xt()}}class $h extends qt{constructor(t){super(t),t.animationState||(t.animationState=kh(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),cr(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let Ah=0;class Ph extends qt{constructor(){super(...arguments),this.id=Ah++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const o=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Eh={animation:{Feature:$h},exit:{Feature:Ph}},Nc=()=>({min:0,max:0}),Lc=()=>({x:Nc(),y:Nc()});function Vh({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Th(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Oh(e,t){return Vh(Th(e.getBoundingClientRect(),t))}const Mh=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Fh(e){const t=Mh.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}const Dh=4;function eo(e,t,n=1){Me(n<=Dh,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=Fh(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return Tc(s)?parseFloat(s):s}else return Ei(i)?eo(i,t,n+1):i}function Ih(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!Ei(o))return;const s=eo(o,r);s&&i.set(s)});for(const i in t){const o=t[i];if(!Ei(o))continue;const s=eo(o,r);s&&(t[i]=s,n||(n={}),n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Nh=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Rc=e=>Nh.has(e),Lh=e=>Object.keys(e).some(Rc),Sr=e=>e===gt||e===I,Bc=(e,t)=>parseFloat(e.split(", ")[t]),jc=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Bc(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?Bc(o[1],e):0}},Rh=new Set(["x","y","z"]),Bh=fn.filter(e=>!Rh.has(e));function jh(e){const t=[];return Bh.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const Zt={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jc(4,13),y:jc(5,14)};Zt.translateX=Zt.x,Zt.translateY=Zt.y;const Uh=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:s}=o,a={};s==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(u=>{a[u]=Zt[u](r,o)}),t.render();const c=t.measureViewportBox();return n.forEach(u=>{const d=t.getValue(u);d&&d.jump(a[u]),e[u]=Zt[u](c,o)}),e},zh=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Rc);let o=[],s=!1;const a=[];if(i.forEach(c=>{const u=e.getValue(c);if(!e.hasValue(c))return;let d=n[c],l=xn(d);const f=t[c];let p;if(pr(f)){const h=f.length,v=f[0]===null?1:0;d=f[v],l=xn(d);for(let b=v;b<h&&f[b]!==null;b++)p?Me(xn(f[b])===p,"All keyframes must be of the same type"):(p=xn(f[b]),Me(p===l||Sr(l)&&Sr(p),"Keyframes must be of the same dimension as the current value"))}else p=xn(f);if(l!==p)if(Sr(l)&&Sr(p)){const h=u.get();typeof h=="string"&&u.set(parseFloat(h)),typeof f=="string"?t[c]=parseFloat(f):Array.isArray(f)&&p===I&&(t[c]=f.map(parseFloat))}else l!=null&&l.transform&&(p!=null&&p.transform)&&(d===0||f===0)?d===0?u.set(p.transform(d)):t[c]=l.transform(f):(s||(o=jh(e),s=!0),a.push(c),r[c]=r[c]!==void 0?r[c]:t[c],u.jump(f))}),a.length){const c=a.indexOf("height")>=0?window.pageYOffset:null,u=Uh(t,e,a);return o.length&&o.forEach(([d,l])=>{e.getValue(d).set(l)}),e.render(),ar&&c!==null&&window.scrollTo({top:c}),{target:u,transitionEnd:r}}else return{target:t,transitionEnd:r}};function Hh(e,t,n,r){return Lh(t)?zh(e,t,n,r):{target:t,transitionEnd:r}}const Wh=(e,t,n,r)=>{const i=Ih(e,t,r);return t=i.target,r=i.transitionEnd,Hh(e,t,n,r)},to={current:null},Uc={current:!1};function Kh(){if(Uc.current=!0,!!ar)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>to.current=e.matches;e.addListener(t),t()}else to.current=!1}function qh(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(ke(o))e.addValue(i,o),kr(r)&&r.add(i),process.env.NODE_ENV==="development"&&Qi(o.version==="10.16.5",`Attempting to mix Framer Motion versions ${o.version} with 10.16.5 may not work as expected.`);else if(ke(s))e.addValue(i,_n(o,{owner:e})),kr(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);!a.hasAnimated&&a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,_n(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const zc=new WeakMap,Hc=Object.keys(dn),Gh=Hc.length,Wc=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Yh=$i.length;class Zh{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>me.render(this.render,!1,!0);const{latestValues:a,renderState:c}=o;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=s,this.isControllingVariants=lr(n),this.isVariantNode=ga(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(n,{});for(const l in d){const f=d[l];a[l]!==void 0&&ke(f)&&(f.set(a[l],!1),kr(u)&&u.add(l))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,zc.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Uc.current||Kh(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:to.current,process.env.NODE_ENV!=="production"&&Qi(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zc.delete(this.current),this.projection&&this.projection.unmount(),mr(this.notifyUpdate),mr(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=vt.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&me.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;if(process.env.NODE_ENV!=="production"&&i&&r){const c="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";n.ignoreStrict?yn(!1,c):Me(!1,c)}for(let c=0;c<Gh;c++){const u=Hc[c],{isEnabled:d,Feature:l,ProjectionNode:f,MeasureLayout:p}=dn[u];f&&(s=f),d(n)&&(!this.features[u]&&l&&(this.features[u]=new l(this)),p&&(a=p))}if(!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:c,layout:u,drag:d,dragConstraints:l,layoutScroll:f,layoutRoot:p}=n;this.projection.setOptions({layoutId:c,layout:u,alwaysMeasureLayout:!!d||l&&va(l),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lc()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Wc.length;r++){const i=Wc[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=qh(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<Yh;r++){const i=$i[r],o=this.props[i];(un(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=_n(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=Ii(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!ke(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Oc),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Kc extends Zh{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let s=mh(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),s&&(s=i(s))),o){ph(this,r,s);const a=Wh(this,r,s,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function Xh(e){return window.getComputedStyle(e)}class Qh extends Kc{readValueFromInstance(t,n){if(vt.has(n)){const r=Xi(n);return r&&r.default||0}else{const r=Xh(t),i=(ka(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Oh(t,n)}build(t,n,r,i){Vi(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Di(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ke(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Oa(t,n,r,i)}}class Jh extends Kc{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(vt.has(n)){const r=Xi(n);return r&&r.default||0}return n=Ma.has(n)?n:Fi(n),t.getAttribute(n)}measureInstanceViewportBox(){return Lc()}scrapeMotionValuesFromProps(t,n){return Da(t,n)}build(t,n,r,i){Oi(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Fa(t,n,r,i)}mount(t){this.isSVGTag=Mi(t.tagName),super.mount(t)}}const em=(e,t)=>Pi(e)?new Jh(t,{enableHardwareAcceleration:!1}):new Qh(t,{enableHardwareAcceleration:!0}),Cr=tf(Df);function qc(){const e=B(!1);return ki(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function tm(){const e=qc(),[t,n]=re(0),r=ae(()=>{e.current&&n(t+1)},[t]);return[ae(()=>me.postRender(r),[r]),t]}class nm extends xe{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function rm({children:e,isPresent:t}){const n=zn(),r=B(null),i=B({width:0,height:0,top:0,left:0});return Xn(()=>{const{width:o,height:s,top:a,left:c}=i.current;if(t||!r.current||!o||!s)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
|
|
42
|
+
[data-motion-pop-id="${n}"] {
|
|
43
43
|
position: absolute !important;
|
|
44
44
|
width: ${o}px !important;
|
|
45
45
|
height: ${s}px !important;
|
|
46
46
|
top: ${a}px !important;
|
|
47
|
-
left: ${
|
|
47
|
+
left: ${c}px !important;
|
|
48
48
|
}
|
|
49
|
-
`),()=>{document.head.removeChild(u)}},[t]),M(Jh,{isPresent:t,childRef:n,sizeRef:i},Qe(e,{ref:n}))}const eo=({children:e,initial:t,isPresent:r,onExitComplete:n,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Fa(tm),l=Br(),u=oe(()=>({id:l,initial:t,isPresent:r,custom:i,onExitComplete:d=>{a.set(d,!0);for(const c of a.values())if(!c)return;n&&n()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[r]);return oe(()=>{a.forEach((d,c)=>a.set(c,!1))},[r]),H(()=>{!r&&!a.size&&n&&n()},[r]),s==="popLayout"&&(e=M(em,{isPresent:r},e)),M(wi.Provider,{value:u},e)};function tm(){return new Map}function rm(e){return H(()=>()=>e(),[])}const kt=e=>e.key||"";function nm(e,t){e.forEach(r=>{const n=kt(r);t.set(n,r)})}function im(e){const t=[];return Te.forEach(e,r=>{Xe(r)&&t.push(r)}),t}const to=({children:e,custom:t,initial:r=!0,onExitComplete:n,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Me(!i,"Replace exitBeforeEnter with mode='wait'");const a=fe(ya).forceRender||Qh()[0],l=Wc(),u=im(e);let d=u;const c=B(new Map).current,f=B(d),p=B(new Map).current,h=B(!0);if(_i(()=>{h.current=!1,nm(u,p),f.current=d}),rm(()=>{h.current=!0,p.clear(),c.clear()}),h.current)return M(ee,null,d.map(y=>M(eo,{key:kt(y),isPresent:!0,initial:r?void 0:!1,presenceAffectsLayout:o,mode:s},y)));d=[...d];const v=f.current.map(kt),w=u.map(kt),k=v.length;for(let y=0;y<k;y++){const _=v[y];w.indexOf(_)===-1&&!c.has(_)&&c.set(_,void 0)}return s==="wait"&&c.size&&(d=[]),c.forEach((y,_)=>{if(w.indexOf(_)!==-1)return;const C=p.get(_);if(!C)return;const S=v.indexOf(_);let N=y;if(!N){const D=()=>{c.delete(_);const A=Array.from(p.keys()).filter(E=>!w.includes(E));if(A.forEach(E=>p.delete(E)),f.current=u.filter(E=>{const W=kt(E);return W===_||A.includes(W)}),!c.size){if(l.current===!1)return;a(),n&&n()}};N=M(eo,{key:kt(C),isPresent:!1,onExitComplete:D,custom:t,presenceAffectsLayout:o,mode:s},C),c.set(_,N)}d.splice(S,0,N)}),d=d.map(y=>{const _=y.key;return c.has(_)?y:M(eo,{key:kt(y),isPresent:!0,presenceAffectsLayout:o,mode:s},y)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),M(ee,null,c.size?d:d.map(y=>Qe(y)))};function om({children:e,features:t,strict:r=!1}){const[,n]=ne(!ro(t)),i=B(void 0);if(!ro(t)){const{renderer:o,...s}=t;i.current=o,Ci(s)}return H(()=>{ro(t)&&t().then(({renderer:o,...s})=>{Ci(s),i.current=o,n(!0)})},[]),M(xi.Provider,{value:{renderer:i.current,strict:r}},e)}function ro(e){return typeof e=="function"}const sm={renderer:Xh,...$h,...qf},we=Symbol.for("@ts-pattern/matcher"),Kc=Symbol.for("@ts-pattern/isVariadic"),Sn="@ts-pattern/anonymous-select-key",no=e=>!!(e&&typeof e=="object"),Cn=e=>e&&!!e[we],le=(e,t,r)=>{if(Cn(e)){const n=e[we](),{matched:i,selections:o}=n.match(t);return i&&o&&Object.keys(o).forEach(s=>r(s,o[s])),i}if(no(e)){if(!no(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=[],i=[],o=[];for(const s of e.keys()){const a=e[s];Cn(a)&&a[Kc]?o.push(a):o.length?i.push(a):n.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<n.length+i.length)return!1;const s=t.slice(0,n.length),a=i.length===0?[]:t.slice(-i.length),l=t.slice(n.length,i.length===0?1/0:-i.length);return n.every((u,d)=>le(u,s[d],r))&&i.every((u,d)=>le(u,a[d],r))&&(o.length===0||le(o[0],l,r))}return e.length===t.length&&e.every((s,a)=>le(s,t[a],r))}return Object.keys(e).every(n=>{const i=e[n];return(n in t||Cn(o=i)&&o[we]().matcherType==="optional")&&le(i,t[n],r);var o})}return Object.is(t,e)},Se=e=>{var t,r,n;return no(e)?Cn(e)?(t=(r=(n=e[we]()).getSelectionKeys)==null?void 0:r.call(n))!=null?t:[]:Array.isArray(e)?_r(e,Se):_r(Object.values(e),Se):[]},_r=(e,t)=>e.reduce((r,n)=>r.concat(t(n)),[]);function am(...e){if(e.length===1){const[t]=e;return r=>le(t,r,()=>{})}if(e.length===2){const[t,r]=e;return le(t,r,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ve(e){return Object.assign(e,{optional:()=>oo(e),and:t=>X(e,t),or:t=>qc(e,t),select:t=>t===void 0?xr(e):xr(t,e)})}function io(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Kc]:!0})}}))(e),{optional:()=>io(oo(e)),select:t=>io(t===void 0?xr(e):xr(t,e))})}function oo(e){return ve({[we]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return t===void 0?(Se(e).forEach(i=>n(i,void 0)),{matched:!0,selections:r}):{matched:le(e,t,n),selections:r}},getSelectionKeys:()=>Se(e),matcherType:"optional"})})}const cm=(e,t)=>{for(const r of e)if(!t(r))return!1;return!0},lm=(e,t)=>{for(const[r,n]of e.entries())if(!t(n,r))return!1;return!0};function X(...e){return ve({[we]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return{matched:e.every(i=>le(i,t,n)),selections:r}},getSelectionKeys:()=>_r(e,Se),matcherType:"and"})})}function qc(...e){return ve({[we]:()=>({match:t=>{let r={};const n=(i,o)=>{r[i]=o};return _r(e,Se).forEach(i=>n(i,void 0)),{matched:e.some(i=>le(i,t,n)),selections:r}},getSelectionKeys:()=>_r(e,Se),matcherType:"or"})})}function z(e){return{[we]:()=>({match:t=>({matched:!!e(t)})})}}function xr(...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 ve({[we]:()=>({match:n=>{let i={[t??Sn]:n};return{matched:r===void 0||le(r,n,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??Sn].concat(r===void 0?[]:Se(r))})})}function Fe(e){return typeof e=="number"}function St(e){return typeof e=="string"}function rt(e){return typeof e=="bigint"}const Gc=ve(z(function(e){return!0})),um=Gc,Ct=e=>Object.assign(ve(e),{startsWith:t=>{return Ct(X(e,(r=t,z(n=>St(n)&&n.startsWith(r)))));var r},endsWith:t=>{return Ct(X(e,(r=t,z(n=>St(n)&&n.endsWith(r)))));var r},minLength:t=>Ct(X(e,(r=>z(n=>St(n)&&n.length>=r))(t))),maxLength:t=>Ct(X(e,(r=>z(n=>St(n)&&n.length<=r))(t))),includes:t=>{return Ct(X(e,(r=t,z(n=>St(n)&&n.includes(r)))));var r},regex:t=>{return Ct(X(e,(r=t,z(n=>St(n)&&!!n.match(r)))));var r}}),dm=Ct(z(St)),De=e=>Object.assign(ve(e),{between:(t,r)=>De(X(e,((n,i)=>z(o=>Fe(o)&&n<=o&&i>=o))(t,r))),lt:t=>De(X(e,(r=>z(n=>Fe(n)&&n<r))(t))),gt:t=>De(X(e,(r=>z(n=>Fe(n)&&n>r))(t))),lte:t=>De(X(e,(r=>z(n=>Fe(n)&&n<=r))(t))),gte:t=>De(X(e,(r=>z(n=>Fe(n)&&n>=r))(t))),int:()=>De(X(e,z(t=>Fe(t)&&Number.isInteger(t)))),finite:()=>De(X(e,z(t=>Fe(t)&&Number.isFinite(t)))),positive:()=>De(X(e,z(t=>Fe(t)&&t>0))),negative:()=>De(X(e,z(t=>Fe(t)&&t<0)))}),fm=De(z(Fe)),nt=e=>Object.assign(ve(e),{between:(t,r)=>nt(X(e,((n,i)=>z(o=>rt(o)&&n<=o&&i>=o))(t,r))),lt:t=>nt(X(e,(r=>z(n=>rt(n)&&n<r))(t))),gt:t=>nt(X(e,(r=>z(n=>rt(n)&&n>r))(t))),lte:t=>nt(X(e,(r=>z(n=>rt(n)&&n<=r))(t))),gte:t=>nt(X(e,(r=>z(n=>rt(n)&&n>=r))(t))),positive:()=>nt(X(e,z(t=>rt(t)&&t>0))),negative:()=>nt(X(e,z(t=>rt(t)&&t<0)))}),pm=nt(z(rt)),hm=ve(z(function(e){return typeof e=="boolean"})),mm=ve(z(function(e){return typeof e=="symbol"})),vm=ve(z(function(e){return e==null}));var _e={__proto__:null,matcher:we,optional:oo,array:function(...e){return io({[we]:()=>({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 Se(r).forEach(o=>{n[o]=[]}),{matched:!0,selections:n};const i=(o,s)=>{n[o]=(n[o]||[]).concat([s])};return{matched:t.every(o=>le(r,o,i)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Se(e[0])})})},set:function(...e){return ve({[we]:()=>({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=(o,s)=>{r[o]=(r[o]||[]).concat([s])},i=e[0];return{matched:cm(t,o=>le(i,o,n)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Se(e[0])})})},map:function(...e){return ve({[we]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let r={};if(t.size===0)return{matched:!0,selections:r};const n=(a,l)=>{r[a]=(r[a]||[]).concat([l])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,s]=e;return{matched:lm(t,(a,l)=>{const u=le(o,l,n),d=le(s,a,n);return u&&d}),selections:r}},getSelectionKeys:()=>e.length===0?[]:[...Se(e[0]),...Se(e[1])]})})},intersection:X,union:qc,not:function(e){return ve({[we]:()=>({match:t=>({matched:!le(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:z,select:xr,any:Gc,_:um,string:dm,number:fm,bigint:pm,boolean:hm,symbol:mm,nullish:vm,instanceOf:function(e){return ve(z(function(t){return r=>r instanceof t}(e)))},shape:function(e){return ve(z(am(e)))}};const so={matched:!1,value:void 0};function Ue(e){return new $n(e,so)}class $n{constructor(t,r){this.input=void 0,this.state=void 0,this.input=t,this.state=r}with(...t){if(this.state.matched)return this;const r=t[t.length-1],n=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&n.push(...t.slice(1,t.length-1));let o=!1,s={};const a=(u,d)=>{o=!0,s[u]=d},l=!n.some(u=>le(u,this.input,a))||i&&!i(this.input)?so:{matched:!0,value:r(o?Sn in s?s[Sn]:s:this.input,this.input)};return new $n(this.input,l)}when(t,r){if(this.state.matched)return this;const n=!!t(this.input);return new $n(this.input,n?{matched:!0,value:r(this.input,this.input)}:so)}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 Yc="isdk",ao=44,gm={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"};function co(e){return new Promise((t,r)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>r(e.error)})}function Zc(e,t){const r=indexedDB.open(e);r.onupgradeneeded=()=>r.result.createObjectStore(t);const n=co(r);return(i,o)=>n.then(s=>o(s.transaction(t,i).objectStore(t)))}let lo;function Xc(){return lo||(lo=Zc("keyval-store","keyval")),lo}function ym(e,t=Xc()){return t("readonly",r=>co(r.get(e)))}function bm(e,t,r=Xc()){return r("readwrite",n=>(n.put(t,e),co(n.transaction)))}const Qc=typeof window>"u"?void 0:Zc("inploi","applications"),kr={getApplicationData:async e=>{const t=Jc(e);return await ym(t,Qc)},setApplicationData:async e=>{const t=Jc(e.application);return await bm(t,e.data,Qc)}},Jc=e=>[e.job.id,e.flow.id,e.flow.version].join("/"),ze=ir("maximised"),uo=ir(53),it=ir({state:"idle"}),Sr=e=>{const{state:t,application:r}=it.value;if(t!=="loaded")return;It(r,"No application to update");const n=e(r.data),i={...r,data:n};it.value={state:t,application:i},kr.setApplicationData({application:r,data:n})},Y={current$:it,start:async e=>{const t=await kr.getApplicationData(e)??el();it.value={state:"loaded",application:{...e,data:t,startedAt:new Date}},kr.setApplicationData({application:e,data:t})},cancel:()=>{it.value={state:"idle"}},markAsFinished:()=>Sr(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>Sr(t=>({...t,currentNodeId:e})),restart:()=>{const{state:e,application:t}=it.value;if(e!=="loaded")throw new Error("Application cannot be restarted: not in valid state");const r=el();it.value={state:e,application:{...t,data:r,startedAt:new Date}},kr.setApplicationData({application:t,data:r})},addMessage:(e,t)=>{const r={...e,groupId:t};return Sr(n=>({...n,messages:[...n.messages,r]}))},removeLastGroupMessagesById:e=>{var o;const{state:t,application:r}=it.value;It(t==="loaded","Application not loaded");const n=[...r.data.messages];let i=n.length-1;for(;i>=0&&n[i]&&((o=n[i])==null?void 0:o.groupId)===e;)n.pop(),i--;r.data.messages=n,kr.setApplicationData({application:r,data:r.data})},setSubmission:(e,t)=>Sr(r=>{const n={...r.submissions};return t===null?delete n[e]:n[e]=t,{...r,submissions:n}}),setInput:e=>Sr(t=>({...t,currentInput:e}))},el=()=>({messages:[],submissions:{},currentNodeId:null,isFinished:!1,sequence:0,flowSessionId:crypto.randomUUID()});var wm=0;function g(e,t,r,n,i,o){var s,a,l={};for(a in t)a=="ref"?s=t[a]:l[a]=t[a];var u={type:e,props:l,key:r,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--wm,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return V.vnode&&V.vnode(u),u}const _m=({message:e})=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:[g("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:[g("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"}),g("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"}),g("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),g("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),g("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),g("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),g("path",{d:"M38 56h19"})]}),g("div",{class:"flex flex-col gap-2 text-center",children:[g("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&g("p",{class:"text-neutral-9 text-sm",children:e})]})]}),xm=e=>g("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[g("title",{children:"Loading"}),g("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)}}"}),g("g",{id:"s1",transform:"translate(12,0)",children:g("g",{id:"s2",transform:"scale(0,0)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s3",transform:"translate(12,12)",children:g("g",{id:"s4",transform:"scale(1,1)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s5",transform:"translate(12,0)",children:g("g",{id:"s6",transform:"scale(0,0)",children:g("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"})})}),g("g",{id:"s7",transform:"translate(12,0)",children:g("g",{id:"s8",transform:"scale(0,0)",children:g("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"})})})]}),tl=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(xm,{class:"text-neutral-6 h-8 w-8"})});function rl(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=rl(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=rl(e))&&(n&&(n+=" "),n+=t);return n}const An=({class:e,children:t,...r})=>g("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:g("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})}),km=({children:e})=>{const t=ze.value;return g("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto flex h-[var(--header-height)] items-center gap-2 ring-1 backdrop-blur-md backdrop-saturate-150",children:[g("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),g("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t==="minimised"?ze.value="maximised":ze.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:g("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),g("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:ze.value==="minimised"?g(ee,{children:[g(An,{"aria-label":"Maximise job application",onClick:()=>ze.value="maximised",children:g("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),g(An,{"aria-label":"Close application",onClick:Y.cancel,children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):g(ee,{children:[Y.current$.value.state==="loaded"&&g(An,{"aria-label":"Restart",onClick:()=>{Y.restart()},children:[g("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"}),g("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),g(An,{"aria-label":"Minimise application",onClick:()=>ze.value="minimised",children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]})},Sm=ri(()=>Promise.resolve().then(()=>Sg).then(e=>e.JobApplicationContent)),Cm=({children:e})=>g(om,{features:sm,children:e}),$m={closed:{y:"calc(100% + 1rem)",height:ao},maximised:{y:0,height:"75vh"},minimised:{y:0,height:ao}},Am=({logger:e,apiClient:t,analytics:r})=>{const{state:n,application:i,error:o}=Y.current$.value,s=ze.value,a=n!=="idle"&&s==="maximised",l=B(null);return g(Cm,{children:g(jd,{open:a,modal:a,children:g(to,{children:[g(Ud,{forceMount:!0,asChild:!0,children:a&&g(kn.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-overlay fixed inset-0"})},"bg"),g(zd,{forceMount:!0,asChild:!0,children:g(kn.div,{ref:l,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",variants:$m,initial:"closed",animate:Ue({state:n,view:s}).with({state:"idle"},()=>"closed").with({state:_e.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${ao}px`},class:"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",children:g("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[g(km,{children:i?`Applying for “${i.job.title}” at ${i.company.name}`:"inploi chatbot: "+n}),(()=>{switch(n){case"idle":return null;case"loading":return g(tl,{},"loading");case"loaded":return s!=="maximised"?null:g(Nt,{fallback:g(tl,{},"loading"),children:g(Sm,{analytics:r,currentApplication:i,apiClient:t,logger:e})});case"error":return g(_m,{message:o});default:iu(n)}})()]})},"content")})]})})})};function Pm(e){return(Array.isArray(e)?e:e.issues).reduce((t,r)=>{if(r.path){if(r.path.every(({key:n})=>typeof n=="string"||typeof n=="number")){const n=r.path.map(({key:i})=>i).join(".");t.nested[n]?t.nested[n].push(r.message):t.nested[n]=[r.message]}}else t.root?t.root.push(r.message):t.root=[r.message];return t},{nested:{}})}var Pn=class extends Error{constructor(t){super(t[0].message);Ul(this,"issues");this.name="ValiError",this.issues=t}};function nl(e,t){return{...e,_parse(r,n){return e._parse(t(r),n)}}}function Cr(e){return{issues:e}}function He(e){return{output:e}}function Em(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 Vm(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 st(e,t,r,n){if(!t||!t.length||r!=null&&r.skipPipe)return He(e);let i,o,s=e;for(const a of t){const l=a._parse(s);if(l.issues){i=i||Vm(r,n);for(const u of l.issues){const d=Em(i,u);o?o.push(d):o=[d]}if(i.abortEarly||i.abortPipeEarly)break}else s=l.output}return o?Cr(o):He(s)}function at(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function il(e){return typeof e=="function"?e():e}function $r(e,t,r,n){return Cr([{validation:e,message:il(t),input:r,requirement:n}])}function Tm(e,t,r){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,s]=at(t,r);return[e,o,s]}const[n,i]=at(e,t);return[void 0,n,i]}function $t(e,t,r,n,i,o){return{issues:[{reason:t,validation:r,origin:(e==null?void 0:e.origin)||"value",message:il(n),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Om(e){return typeof e.default=="function"?e.default():e.default}function Mm(e){return{type:"any",async:!1,pipe:e,_parse(t,r){return st(t,this.pipe,r,"any")}}}function Fm(e,t,r){const[n="Invalid type",i]=at(t,r);return{type:"array",async:!1,item:e,message:n,pipe:i,_parse(o,s){if(!Array.isArray(o))return $t(s,"type","array",this.message,o);let a;const l=[];for(let u=0;u<o.length;u++){const d=o[u],c=this.item._parse(d,s);if(c.issues){const f={type:"array",input:o,key:u,value:d};for(const p of c.issues)p.path?p.path.unshift(f):p.path=[f],a==null||a.push(p);if(a||(a=c.issues),s!=null&&s.abortEarly)break}else l.push(c.output)}return a?Cr(a):st(l,this.pipe,s,"array")}}}function Dm(e,t){const[r="Invalid type",n]=at(e,t);return{type:"boolean",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="boolean"?$t(o,"type","boolean",this.message,i):st(i,this.pipe,o,"boolean")}}}function Im(e,t){const[r="Invalid type",n]=at(e,t);return{type:"number",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="number"||isNaN(i)?$t(o,"type","number",this.message,i):st(i,this.pipe,o,"number")}}}function Zt(e,t,r,n){const[i,o="Invalid type",s]=Tm(t,r,n);let a;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:s,_parse(l,u){if(!l||typeof l!="object")return $t(u,"type","object",this.message,l);a=a||Object.entries(this.entries);let d;const c={};for(const[f,p]of a){const h=l[f],v=p._parse(h,u);if(v.issues){const w={type:"object",input:l,key:f,value:h};for(const k of v.issues)k.path?k.path.unshift(w):k.path=[w],d==null||d.push(k);if(d||(d=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||f in l)&&(c[f]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in l)if(!(f in this.entries)){const p=l[f],h=this.rest._parse(p,u);if(h.issues){const v={type:"object",input:l,key:f,value:p};for(const w of h.issues)w.path?w.path.unshift(v):w.path=[v],d==null||d.push(w);if(d||(d=h.issues),u!=null&&u.abortEarly)break}else c[f]=h.output}}return d?Cr(d):st(c,this.pipe,u,"object")}}}function Nm(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(r,n){if(r===void 0){const i=Om(this);if(i===void 0)return He(r);r=i}return this.wrapped._parse(r,n)}}}function Lm(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(r,n){return this.options.includes(r)?He(r):$t(n,"type","picklist",this.message,r)}}}function Ie(e,t){const[r="Invalid type",n]=at(e,t);return{type:"string",async:!1,message:r,pipe:n,_parse(i,o){return typeof i!="string"?$t(o,"type","string",this.message,i):st(i,this.pipe,o,"string")}}}function Rm(e,t,r,n){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=at(r,n);return[e,t,s,a]}const[i,o]=at(t,r);return[Ie(),e,i,o]}var Bm=["__proto__","prototype","constructor"];function jm(e,t,r,n){const[i,o,s="Invalid type",a]=Rm(e,t,r,n);return{type:"record",async:!1,key:i,value:o,message:s,pipe:a,_parse(l,u){if(!l||typeof l!="object")return $t(u,"type","record",this.message,l);let d;const c={};for(const[f,p]of Object.entries(l))if(!Bm.includes(f)){let h;const v=this.key._parse(f,{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){h={type:"record",input:l,key:f,value:p};for(const k of v.issues)k.path=[h],d==null||d.push(k);if(d||(d=v.issues),u!=null&&u.abortEarly)break}const w=this.value._parse(p,u);if(w.issues){h=h||{type:"record",input:l,key:f,value:p};for(const k of w.issues)k.path?k.path.unshift(h):k.path=[h],d==null||d.push(k);if(d||(d=w.issues),u!=null&&u.abortEarly)break}!v.issues&&!w.issues&&(c[v.output]=w.output)}return d?Cr(d):st(c,this.pipe,u,"record")}}}function fo(e,t,r){const n=e._parse(t,r);if(n.issues)throw new Pn(n.issues);return n.output}async function Um(e,t,r){const n=await e._parse(t,r);if(n.issues)throw new Pn(n.issues);return n.output}function ol(e,t,r){return{...e,_parse(n,i){const o=e._parse(n,i);if(o.issues)return o;const s=t(o.output);return r&&!Array.isArray(r)?r._parse(s,i):st(s,r,i,typeof s)}}}var zm=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function Hm(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:zm,_parse(t){return this.requirement.test(t)?He(t):$r(this.type,this.message,t,this.requirement)}}}function Wm(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(r){return r.length>this.requirement?$r(this.type,this.message,r,this.requirement):He(r)}}}function sl(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(r){return r.length<this.requirement?$r(this.type,this.message,r,this.requirement):He(r)}}}function Km(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(r){return this.requirement.test(r)?He(r):$r(this.type,this.message,r,this.requirement)}}}function qm(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)?He(t):$r(this.type,this.message,t,this.requirement)}}}const Gm=Zt({job:Zt({id:nl(Ie(),String),title:Ie()}),company:Zt({name:Ie(),logo:Nm(Ie())}),flow:Zt({id:nl(Ie(),String),version:Im(),nodes:Fm(Mm())})});async function Ym({jobId:e,apiClient:t,logger:r}){try{const n=await t.fetch(`/flow/job/${e}`);return{ok:!0,value:fo(Gm,n)}}catch(n){return n instanceof Pn?(r.error(Pm(n).nested),{ok:!1,error:"API error: Invalid application data received"}):n instanceof Le?{ok:!1,error:"Application flow not found."}:n instanceof Error?(r.error(n),{ok:!1,error:n.message}):(r.error(n),{ok:!1,error:"Unknown error"})}}const Zm=`#isdk{position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{box-sizing:border-box;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .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 .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left: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-\\[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-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-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-0{--tw-translate-y: 0px;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 .translate-y-8{--tw-translate-y: 2rem;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 .scale-0{--tw-scale-x: 0;--tw-scale-y: 0;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}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-dashed{border-style:dashed}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#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-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#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 .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-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-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-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 .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-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .opacity-0{opacity:0}#isdk .opacity-100{opacity:1}#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{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 .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{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));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-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 .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 .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 .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#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 .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#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\\: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\\: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-10:active{outline-color:var(--i-color-n-10)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#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-7{--tw-ring-color: var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-2{--tw-ring-offset-width: 2px}@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}}
|
|
50
|
-
`,
|
|
51
|
-
${
|
|
49
|
+
`),()=>{document.head.removeChild(u)}},[t]),M(nm,{isPresent:t,childRef:r,sizeRef:i},Qe(e,{ref:r}))}const no=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s})=>{const a=Ia(im),c=zn(),u=oe(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:d=>{a.set(d,!0);for(const l of a.values())if(!l)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),o?void 0:[n]);return oe(()=>{a.forEach((d,l)=>a.set(l,!1))},[n]),H(()=>{!n&&!a.size&&r&&r()},[n]),s==="popLayout"&&(e=M(rm,{isPresent:n},e)),M(xi.Provider,{value:u},e)};function im(){return new Map}function om(e){return H(()=>()=>e(),[])}const kt=e=>e.key||"";function sm(e,t){e.forEach(n=>{const r=kt(n);t.set(r,n)})}function am(e){const t=[];return Te.forEach(e,n=>{Xe(n)&&t.push(n)}),t}const ro=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:s="sync"})=>{Me(!i,"Replace exitBeforeEnter with mode='wait'");const a=fe(wa).forceRender||tm()[0],c=qc(),u=am(e);let d=u;const l=B(new Map).current,f=B(d),p=B(new Map).current,h=B(!0);if(ki(()=>{h.current=!1,sm(u,p),f.current=d}),om(()=>{h.current=!0,p.clear(),l.clear()}),h.current)return M(ee,null,d.map(y=>M(no,{key:kt(y),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:s},y)));d=[...d];const v=f.current.map(kt),b=u.map(kt),k=v.length;for(let y=0;y<k;y++){const _=v[y];b.indexOf(_)===-1&&!l.has(_)&&l.set(_,void 0)}return s==="wait"&&l.size&&(d=[]),l.forEach((y,_)=>{if(b.indexOf(_)!==-1)return;const C=p.get(_);if(!C)return;const S=v.indexOf(_);let N=y;if(!N){const D=()=>{l.delete(_);const A=Array.from(p.keys()).filter(E=>!b.includes(E));if(A.forEach(E=>p.delete(E)),f.current=u.filter(E=>{const W=kt(E);return W===_||A.includes(W)}),!l.size){if(c.current===!1)return;a(),r&&r()}};N=M(no,{key:kt(C),isPresent:!1,onExitComplete:D,custom:t,presenceAffectsLayout:o,mode:s},C),l.set(_,N)}d.splice(S,0,N)}),d=d.map(y=>{const _=y.key;return l.has(_)?y:M(no,{key:kt(y),isPresent:!0,presenceAffectsLayout:o,mode:s},y)}),process.env.NODE_ENV!=="production"&&s==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),M(ee,null,l.size?d:d.map(y=>Qe(y)))};function cm({children:e,features:t,strict:n=!1}){const[,r]=re(!io(t)),i=B(void 0);if(!io(t)){const{renderer:o,...s}=t;i.current=o,Ai(s)}return H(()=>{io(t)&&t().then(({renderer:o,...s})=>{Ai(s),i.current=o,r(!0)})},[]),M(Si.Provider,{value:{renderer:i.current,strict:n}},e)}function io(e){return typeof e=="function"}const lm={renderer:em,...Eh,...Zf},we=Symbol.for("@ts-pattern/matcher"),Gc=Symbol.for("@ts-pattern/isVariadic"),$r="@ts-pattern/anonymous-select-key",oo=e=>!!(e&&typeof e=="object"),Ar=e=>e&&!!e[we],le=(e,t,n)=>{if(Ar(e)){const r=e[we](),{matched:i,selections:o}=r.match(t);return i&&o&&Object.keys(o).forEach(s=>n(s,o[s])),i}if(oo(e)){if(!oo(t))return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let r=[],i=[],o=[];for(const s of e.keys()){const a=e[s];Ar(a)&&a[Gc]?o.push(a):o.length?i.push(a):r.push(a)}if(o.length){if(o.length>1)throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");if(t.length<r.length+i.length)return!1;const s=t.slice(0,r.length),a=i.length===0?[]:t.slice(-i.length),c=t.slice(r.length,i.length===0?1/0:-i.length);return r.every((u,d)=>le(u,s[d],n))&&i.every((u,d)=>le(u,a[d],n))&&(o.length===0||le(o[0],c,n))}return e.length===t.length&&e.every((s,a)=>le(s,t[a],n))}return Object.keys(e).every(r=>{const i=e[r];return(r in t||Ar(o=i)&&o[we]().matcherType==="optional")&&le(i,t[r],n);var o})}return Object.is(t,e)},Se=e=>{var t,n,r;return oo(e)?Ar(e)?(t=(n=(r=e[we]()).getSelectionKeys)==null?void 0:n.call(r))!=null?t:[]:Array.isArray(e)?kn(e,Se):kn(Object.values(e),Se):[]},kn=(e,t)=>e.reduce((n,r)=>n.concat(t(r)),[]);function um(...e){if(e.length===1){const[t]=e;return n=>le(t,n,()=>{})}if(e.length===2){const[t,n]=e;return le(t,n,()=>{})}throw new Error(`isMatching wasn't given the right number of arguments: expected 1 or 2, received ${e.length}.`)}function ve(e){return Object.assign(e,{optional:()=>ao(e),and:t=>X(e,t),or:t=>Yc(e,t),select:t=>t===void 0?Sn(e):Sn(t,e)})}function so(e){return Object.assign((t=>Object.assign(t,{*[Symbol.iterator](){yield Object.assign(t,{[Gc]:!0})}}))(e),{optional:()=>so(ao(e)),select:t=>so(t===void 0?Sn(e):Sn(t,e))})}function ao(e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return t===void 0?(Se(e).forEach(i=>r(i,void 0)),{matched:!0,selections:n}):{matched:le(e,t,r),selections:n}},getSelectionKeys:()=>Se(e),matcherType:"optional"})})}const dm=(e,t)=>{for(const n of e)if(!t(n))return!1;return!0},fm=(e,t)=>{for(const[n,r]of e.entries())if(!t(r,n))return!1;return!0};function X(...e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return{matched:e.every(i=>le(i,t,r)),selections:n}},getSelectionKeys:()=>kn(e,Se),matcherType:"and"})})}function Yc(...e){return ve({[we]:()=>({match:t=>{let n={};const r=(i,o)=>{n[i]=o};return kn(e,Se).forEach(i=>r(i,void 0)),{matched:e.some(i=>le(i,t,r)),selections:n}},getSelectionKeys:()=>kn(e,Se),matcherType:"or"})})}function z(e){return{[we]:()=>({match:t=>({matched:!!e(t)})})}}function Sn(...e){const t=typeof e[0]=="string"?e[0]:void 0,n=e.length===2?e[1]:typeof e[0]=="string"?void 0:e[0];return ve({[we]:()=>({match:r=>{let i={[t??$r]:r};return{matched:n===void 0||le(n,r,(o,s)=>{i[o]=s}),selections:i}},getSelectionKeys:()=>[t??$r].concat(n===void 0?[]:Se(n))})})}function Fe(e){return typeof e=="number"}function St(e){return typeof e=="string"}function nt(e){return typeof e=="bigint"}const Zc=ve(z(function(e){return!0})),pm=Zc,Ct=e=>Object.assign(ve(e),{startsWith:t=>{return Ct(X(e,(n=t,z(r=>St(r)&&r.startsWith(n)))));var n},endsWith:t=>{return Ct(X(e,(n=t,z(r=>St(r)&&r.endsWith(n)))));var n},minLength:t=>Ct(X(e,(n=>z(r=>St(r)&&r.length>=n))(t))),maxLength:t=>Ct(X(e,(n=>z(r=>St(r)&&r.length<=n))(t))),includes:t=>{return Ct(X(e,(n=t,z(r=>St(r)&&r.includes(n)))));var n},regex:t=>{return Ct(X(e,(n=t,z(r=>St(r)&&!!r.match(n)))));var n}}),hm=Ct(z(St)),De=e=>Object.assign(ve(e),{between:(t,n)=>De(X(e,((r,i)=>z(o=>Fe(o)&&r<=o&&i>=o))(t,n))),lt:t=>De(X(e,(n=>z(r=>Fe(r)&&r<n))(t))),gt:t=>De(X(e,(n=>z(r=>Fe(r)&&r>n))(t))),lte:t=>De(X(e,(n=>z(r=>Fe(r)&&r<=n))(t))),gte:t=>De(X(e,(n=>z(r=>Fe(r)&&r>=n))(t))),int:()=>De(X(e,z(t=>Fe(t)&&Number.isInteger(t)))),finite:()=>De(X(e,z(t=>Fe(t)&&Number.isFinite(t)))),positive:()=>De(X(e,z(t=>Fe(t)&&t>0))),negative:()=>De(X(e,z(t=>Fe(t)&&t<0)))}),mm=De(z(Fe)),rt=e=>Object.assign(ve(e),{between:(t,n)=>rt(X(e,((r,i)=>z(o=>nt(o)&&r<=o&&i>=o))(t,n))),lt:t=>rt(X(e,(n=>z(r=>nt(r)&&r<n))(t))),gt:t=>rt(X(e,(n=>z(r=>nt(r)&&r>n))(t))),lte:t=>rt(X(e,(n=>z(r=>nt(r)&&r<=n))(t))),gte:t=>rt(X(e,(n=>z(r=>nt(r)&&r>=n))(t))),positive:()=>rt(X(e,z(t=>nt(t)&&t>0))),negative:()=>rt(X(e,z(t=>nt(t)&&t<0)))}),vm=rt(z(nt)),gm=ve(z(function(e){return typeof e=="boolean"})),ym=ve(z(function(e){return typeof e=="symbol"})),bm=ve(z(function(e){return e==null}));var _e={__proto__:null,matcher:we,optional:ao,array:function(...e){return so({[we]:()=>({match:t=>{if(!Array.isArray(t))return{matched:!1};if(e.length===0)return{matched:!0};const n=e[0];let r={};if(t.length===0)return Se(n).forEach(o=>{r[o]=[]}),{matched:!0,selections:r};const i=(o,s)=>{r[o]=(r[o]||[]).concat([s])};return{matched:t.every(o=>le(n,o,i)),selections:r}},getSelectionKeys:()=>e.length===0?[]:Se(e[0])})})},set:function(...e){return ve({[we]:()=>({match:t=>{if(!(t instanceof Set))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};if(e.length===0)return{matched:!0};const r=(o,s)=>{n[o]=(n[o]||[]).concat([s])},i=e[0];return{matched:dm(t,o=>le(i,o,r)),selections:n}},getSelectionKeys:()=>e.length===0?[]:Se(e[0])})})},map:function(...e){return ve({[we]:()=>({match:t=>{if(!(t instanceof Map))return{matched:!1};let n={};if(t.size===0)return{matched:!0,selections:n};const r=(a,c)=>{n[a]=(n[a]||[]).concat([c])};if(e.length===0)return{matched:!0};var i;if(e.length===1)throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${(i=e[0])==null?void 0:i.toString()}`);const[o,s]=e;return{matched:fm(t,(a,c)=>{const u=le(o,c,r),d=le(s,a,r);return u&&d}),selections:n}},getSelectionKeys:()=>e.length===0?[]:[...Se(e[0]),...Se(e[1])]})})},intersection:X,union:Yc,not:function(e){return ve({[we]:()=>({match:t=>({matched:!le(e,t,()=>{})}),getSelectionKeys:()=>[],matcherType:"not"})})},when:z,select:Sn,any:Zc,_:pm,string:hm,number:mm,bigint:vm,boolean:gm,symbol:ym,nullish:bm,instanceOf:function(e){return ve(z(function(t){return n=>n instanceof t}(e)))},shape:function(e){return ve(z(um(e)))}};const co={matched:!1,value:void 0};function Ue(e){return new Pr(e,co)}class Pr{constructor(t,n){this.input=void 0,this.state=void 0,this.input=t,this.state=n}with(...t){if(this.state.matched)return this;const n=t[t.length-1],r=[t[0]];let i;t.length===3&&typeof t[1]=="function"?i=t[1]:t.length>2&&r.push(...t.slice(1,t.length-1));let o=!1,s={};const a=(u,d)=>{o=!0,s[u]=d},c=!r.some(u=>le(u,this.input,a))||i&&!i(this.input)?co:{matched:!0,value:n(o?$r in s?s[$r]:s:this.input,this.input)};return new Pr(this.input,c)}when(t,n){if(this.state.matched)return this;const r=!!t(this.input);return new Pr(this.input,r?{matched:!0,value:n(this.input,this.input)}:co)}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 Xc="isdk",lo=44,wm={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"};function uo(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Qc(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=uo(n);return(i,o)=>r.then(s=>o(s.transaction(t,i).objectStore(t)))}let fo;function Jc(){return fo||(fo=Qc("keyval-store","keyval")),fo}function _m(e,t=Jc()){return t("readonly",n=>uo(n.get(e)))}function xm(e,t,n=Jc()){return n("readwrite",r=>(r.put(t,e),uo(r.transaction)))}const el=typeof window>"u"?void 0:Qc("inploi","applications"),Cn={getApplicationData:async e=>{const t=tl(e);return await _m(t,el)},setApplicationData:async e=>{const t=tl(e.application);return await xm(t,e.data,el)}},tl=e=>[e.job.id,e.flow.id,e.flow.version].join("/"),ze=sn("maximised"),po=sn(53),it=sn({state:"idle"}),$n=e=>{const{state:t,application:n}=it.value;if(t!=="loaded")return;Nt(n,"No application to update");const r=e(n.data),i={...n,data:r};it.value={state:t,application:i},Cn.setApplicationData({application:n,data:r})},Y={current$:it,start:async e=>{const t=await Cn.getApplicationData(e)??nl();it.value={state:"loaded",application:{...e,data:t,startedAt:new Date}},Cn.setApplicationData({application:e,data:t})},cancel:()=>{it.value={state:"idle"}},markAsFinished:()=>$n(e=>({...e,isFinished:!0})),setCurrentNodeId:e=>$n(t=>({...t,currentNodeId:e})),restart:()=>{const{state:e,application:t}=it.value;if(e!=="loaded")throw new Error("Application cannot be restarted: not in valid state");const n=nl();it.value={state:e,application:{...t,data:n,startedAt:new Date}},Cn.setApplicationData({application:t,data:n})},addMessage:(e,t)=>{const n={...e,groupId:t};return $n(r=>({...r,messages:[...r.messages,n]}))},removeLastGroupMessagesById:e=>{var o;const{state:t,application:n}=it.value;Nt(t==="loaded","Application not loaded");const r=[...n.data.messages];let i=r.length-1;for(;i>=0&&r[i]&&((o=r[i])==null?void 0:o.groupId)===e;)r.pop(),i--;n.data.messages=r,Cn.setApplicationData({application:n,data:n.data})},setSubmission:(e,t)=>$n(n=>{const r={...n.submissions};return t===null?delete r[e]:r[e]=t,{...n,submissions:r}}),setInput:e=>$n(t=>({...t,currentInput:e}))},nl=()=>({messages:[],submissions:{},currentNodeId:null,isFinished:!1,sequence:0,flowSessionId:crypto.randomUUID()});var km=0;function g(e,t,n,r,i,o){var s,a,c={};for(a in t)a=="ref"?s=t[a]:c[a]=t[a];var u={type:e,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--km,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return V.vnode&&V.vnode(u),u}const Sm=({message:e})=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:[g("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:[g("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"}),g("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"}),g("line",{x1:"36.7",y1:"39.3",x2:"44.8",y2:"47.4"}),g("line",{x1:"52.2",y1:"39.3",x2:"60.3",y2:"47.4"}),g("line",{x1:"44.7",y1:"39.2",x2:"36.6",y2:"47.3"}),g("line",{x1:"60.2",y1:"39.2",x2:"52.1",y2:"47.3"}),g("path",{d:"M38 56h19"})]}),g("div",{class:"flex flex-col gap-2 text-center",children:[g("p",{class:"text-error-11 font-bold",children:"Something unexpected happened"}),e&&g("p",{class:"text-neutral-9 text-sm",children:e})]})]}),Cm=e=>g("svg",{role:"img",viewBox:"0 0 24 24",...e,children:[g("title",{children:"Loading"}),g("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)}}"}),g("g",{id:"s1",transform:"translate(12,0)",children:g("g",{id:"s2",transform:"scale(0,0)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s3",transform:"translate(12,12)",children:g("g",{id:"s4",transform:"scale(1,1)",children:g("circle",{r:"6.5",transform:"translate(0,0)",fill:"currentColor"})})}),g("g",{id:"s5",transform:"translate(12,0)",children:g("g",{id:"s6",transform:"scale(0,0)",children:g("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"})})}),g("g",{id:"s7",transform:"translate(12,0)",children:g("g",{id:"s8",transform:"scale(0,0)",children:g("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"})})})]}),rl=()=>g("div",{class:"flex flex-grow flex-col items-center justify-center",children:g(Cm,{class:"text-neutral-6 h-8 w-8"})});function il(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=il(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function ot(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=il(e))&&(r&&(r+=" "),r+=t);return r}const Er=({class:e,children:t,...n})=>g("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),...n,children:g("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})}),$m=({children:e})=>{const t=ze.value;return g("header",{class:"ring-divider bg-statusbar absolute left-0 right-0 top-0 z-20 mx-auto flex h-[var(--header-height)] items-center gap-2 ring-1 backdrop-blur-md backdrop-saturate-150",children:[g("p",{id:"chatbot-status-bar",class:"sr-only",children:e}),g("button",{tabIndex:-1,"aria-hidden":!0,onClick:()=>{t==="minimised"?ze.value="maximised":ze.value="minimised"},class:"h-full flex-grow overflow-hidden px-4 py-1",children:g("p",{"aria-hidden":!0,class:"text-neutral-12 truncate text-sm font-bold tracking-tight",children:e})}),g("div",{class:"flex flex-shrink-0 items-center gap-3 p-1.5",children:ze.value==="minimised"?g(ee,{children:[g(Er,{"aria-label":"Maximise job application",onClick:()=>ze.value="maximised",children:g("path",{d:"M12.5 9.5L8 5L3.5 9.5"})},"minmax"),g(Er,{"aria-label":"Close application",onClick:Y.cancel,children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"close")]}):g(ee,{children:[Y.current$.value.state==="loaded"&&g(Er,{"aria-label":"Restart",onClick:()=>{Y.restart()},children:[g("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"}),g("path",{d:"M8 7L10 4.5L8 2.5"})]},"restart"),g(Er,{"aria-label":"Minimise application",onClick:()=>ze.value="minimised",children:g("path",{d:"M12.5 6.5L8 11L3.5 6.5"})},"minmax")]})})]})},Am=ii(()=>Promise.resolve().then(()=>Tg).then(e=>e.JobApplicationContent)),Pm=({children:e})=>g(cm,{features:lm,children:e}),Em={closed:{y:"calc(100% + 1rem)",height:lo},maximised:{y:0,height:"75vh"},minimised:{y:0,height:lo}},Vm=({logger:e,apiClient:t,analytics:n})=>{const{state:r,application:i,error:o}=Y.current$.value,s=ze.value,a=r!=="idle"&&s==="maximised",c=B(null);return g(Pm,{children:g(Hd,{open:a,modal:a,children:g(ro,{children:[g(Wd,{forceMount:!0,asChild:!0,children:a&&g(Cr.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},class:"bg-overlay fixed inset-0"})},"bg"),g(Kd,{forceMount:!0,asChild:!0,children:g(Cr.div,{ref:c,"aria-modal":"true",role:"dialog","aria-labelledby":"chatbot-status-bar",variants:Em,initial:"closed",animate:Ue({state:r,view:s}).with({state:"idle"},()=>"closed").with({state:_e.union("loaded","error","loading")},({view:u})=>u).exhaustive(),exit:"closed",style:{"--header-height":`${lo}px`},class:"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",children:g("div",{class:"outline-neutral-3 bg-neutral-1 relative flex h-full flex-col overflow-hidden rounded-3xl outline outline-1",children:[g($m,{children:i?`Applying for “${i.job.title}” at ${i.company.name}`:"inploi chatbot: "+r}),(()=>{switch(r){case"idle":return null;case"loading":return g(rl,{},"loading");case"loaded":return s!=="maximised"?null:g(Lt,{fallback:g(rl,{},"loading"),children:g(Am,{analytics:n,currentApplication:i,apiClient:t,logger:e})});case"error":return g(Sm,{message:o});default:au(r)}})()]})},"content")})]})})})};function Tm(e){return(Array.isArray(e)?e:e.issues).reduce((t,n)=>{if(n.path){if(n.path.every(({key:r})=>typeof r=="string"||typeof r=="number")){const r=n.path.map(({key:i})=>i).join(".");t.nested[r]?t.nested[r].push(n.message):t.nested[r]=[n.message]}}else t.root?t.root.push(n.message):t.root=[n.message];return t},{nested:{}})}var Vr=class extends Error{constructor(t){super(t[0].message);Wl(this,"issues");this.name="ValiError",this.issues=t}};function ol(e,t){return{...e,_parse(n,r){return e._parse(t(n),r)}}}function An(e){return{issues:e}}function He(e){return{output:e}}function Om(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 Mm(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 st(e,t,n,r){if(!t||!t.length||n!=null&&n.skipPipe)return He(e);let i,o,s=e;for(const a of t){const c=a._parse(s);if(c.issues){i=i||Mm(n,r);for(const u of c.issues){const d=Om(i,u);o?o.push(d):o=[d]}if(i.abortEarly||i.abortPipeEarly)break}else s=c.output}return o?An(o):He(s)}function at(e,t){return Array.isArray(e)?[void 0,e]:[e,t]}function sl(e){return typeof e=="function"?e():e}function Pn(e,t,n,r){return An([{validation:e,message:sl(t),input:n,requirement:r}])}function Fm(e,t,n){if(!e||typeof e=="object"&&!Array.isArray(e)){const[o,s]=at(t,n);return[e,o,s]}const[r,i]=at(e,t);return[void 0,r,i]}function $t(e,t,n,r,i,o){return{issues:[{reason:t,validation:n,origin:(e==null?void 0:e.origin)||"value",message:sl(r),input:i,issues:o,abortEarly:e==null?void 0:e.abortEarly,abortPipeEarly:e==null?void 0:e.abortPipeEarly,skipPipe:e==null?void 0:e.skipPipe}]}}function Dm(e){return typeof e.default=="function"?e.default():e.default}function Im(e){return{type:"any",async:!1,pipe:e,_parse(t,n){return st(t,this.pipe,n,"any")}}}function Nm(e,t,n){const[r="Invalid type",i]=at(t,n);return{type:"array",async:!1,item:e,message:r,pipe:i,_parse(o,s){if(!Array.isArray(o))return $t(s,"type","array",this.message,o);let a;const c=[];for(let u=0;u<o.length;u++){const d=o[u],l=this.item._parse(d,s);if(l.issues){const f={type:"array",input:o,key:u,value:d};for(const p of l.issues)p.path?p.path.unshift(f):p.path=[f],a==null||a.push(p);if(a||(a=l.issues),s!=null&&s.abortEarly)break}else c.push(l.output)}return a?An(a):st(c,this.pipe,s,"array")}}}function Lm(e,t){const[n="Invalid type",r]=at(e,t);return{type:"boolean",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="boolean"?$t(o,"type","boolean",this.message,i):st(i,this.pipe,o,"boolean")}}}function Rm(e,t){const[n="Invalid type",r]=at(e,t);return{type:"number",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="number"||isNaN(i)?$t(o,"type","number",this.message,i):st(i,this.pipe,o,"number")}}}function Xt(e,t,n,r){const[i,o="Invalid type",s]=Fm(t,n,r);let a;return{type:"object",async:!1,entries:e,rest:i,message:o,pipe:s,_parse(c,u){if(!c||typeof c!="object")return $t(u,"type","object",this.message,c);a=a||Object.entries(this.entries);let d;const l={};for(const[f,p]of a){const h=c[f],v=p._parse(h,u);if(v.issues){const b={type:"object",input:c,key:f,value:h};for(const k of v.issues)k.path?k.path.unshift(b):k.path=[b],d==null||d.push(k);if(d||(d=v.issues),u!=null&&u.abortEarly)break}else(v.output!==void 0||f in c)&&(l[f]=v.output)}if(this.rest&&!(u!=null&&u.abortEarly&&d)){for(const f in c)if(!(f in this.entries)){const p=c[f],h=this.rest._parse(p,u);if(h.issues){const v={type:"object",input:c,key:f,value:p};for(const b of h.issues)b.path?b.path.unshift(v):b.path=[v],d==null||d.push(b);if(d||(d=h.issues),u!=null&&u.abortEarly)break}else l[f]=h.output}}return d?An(d):st(l,this.pipe,u,"object")}}}function Bm(e,t){return{type:"optional",async:!1,wrapped:e,default:t,_parse(n,r){if(n===void 0){const i=Dm(this);if(i===void 0)return He(n);n=i}return this.wrapped._parse(n,r)}}}function jm(e,t="Invalid type"){return{type:"picklist",async:!1,options:e,message:t,_parse(n,r){return this.options.includes(n)?He(n):$t(r,"type","picklist",this.message,n)}}}function Ie(e,t){const[n="Invalid type",r]=at(e,t);return{type:"string",async:!1,message:n,pipe:r,_parse(i,o){return typeof i!="string"?$t(o,"type","string",this.message,i):st(i,this.pipe,o,"string")}}}function Um(e,t,n,r){if(typeof t=="object"&&!Array.isArray(t)){const[s,a]=at(n,r);return[e,t,s,a]}const[i,o]=at(t,n);return[Ie(),e,i,o]}var zm=["__proto__","prototype","constructor"];function Hm(e,t,n,r){const[i,o,s="Invalid type",a]=Um(e,t,n,r);return{type:"record",async:!1,key:i,value:o,message:s,pipe:a,_parse(c,u){if(!c||typeof c!="object")return $t(u,"type","record",this.message,c);let d;const l={};for(const[f,p]of Object.entries(c))if(!zm.includes(f)){let h;const v=this.key._parse(f,{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){h={type:"record",input:c,key:f,value:p};for(const k of v.issues)k.path=[h],d==null||d.push(k);if(d||(d=v.issues),u!=null&&u.abortEarly)break}const b=this.value._parse(p,u);if(b.issues){h=h||{type:"record",input:c,key:f,value:p};for(const k of b.issues)k.path?k.path.unshift(h):k.path=[h],d==null||d.push(k);if(d||(d=b.issues),u!=null&&u.abortEarly)break}!v.issues&&!b.issues&&(l[v.output]=b.output)}return d?An(d):st(l,this.pipe,u,"record")}}}function ho(e,t,n){const r=e._parse(t,n);if(r.issues)throw new Vr(r.issues);return r.output}async function Wm(e,t,n){const r=await e._parse(t,n);if(r.issues)throw new Vr(r.issues);return r.output}function al(e,t,n){return{...e,_parse(r,i){const o=e._parse(r,i);if(o.issues)return o;const s=t(o.output);return n&&!Array.isArray(n)?n._parse(s,i):st(s,n,i,typeof s)}}}var Km=/^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/iu;function qm(e="Invalid email"){return{type:"email",async:!1,message:e,requirement:Km,_parse(t){return this.requirement.test(t)?He(t):Pn(this.type,this.message,t,this.requirement)}}}function Gm(e,t="Invalid length"){return{type:"max_length",async:!1,message:t,requirement:e,_parse(n){return n.length>this.requirement?Pn(this.type,this.message,n,this.requirement):He(n)}}}function cl(e,t="Invalid length"){return{type:"min_length",async:!1,message:t,requirement:e,_parse(n){return n.length<this.requirement?Pn(this.type,this.message,n,this.requirement):He(n)}}}function Ym(e,t="Invalid regex"){return{type:"regex",async:!1,message:t,requirement:e,_parse(n){return this.requirement.test(n)?He(n):Pn(this.type,this.message,n,this.requirement)}}}function Zm(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)?He(t):Pn(this.type,this.message,t,this.requirement)}}}const Xm=Xt({job:Xt({id:ol(Ie(),String),title:Ie()}),company:Xt({name:Ie(),logo:Bm(Ie())}),flow:Xt({id:ol(Ie(),String),version:Rm(),nodes:Nm(Im())})});async function Qm({jobId:e,apiClient:t,logger:n}){try{const r=await t.fetch(`/flow/job/${e}`);return{ok:!0,value:ho(Xm,r)}}catch(r){return r instanceof Vr?(n.error(Tm(r).nested),{ok:!1,error:"API error: Invalid application data received"}):r instanceof Le?{ok:!1,error:"Application flow not found."}:r instanceof Error?(n.error(r),{ok:!1,error:r.message}):(n.error(r),{ok:!1,error:"Unknown error"})}}const Jm=`#isdk{position:relative;z-index:99999;font-size:16px;font-family:sans-serif;--i-lowest: 0 0% 100%;--i-e-1: 340 100% 99%;--i-e-2: 353 100% 98%;--i-e-3: 351 91% 96%;--i-e-4: 351 100% 93%;--i-e-5: 350 100% 90%;--i-e-6: 351 80% 86%;--i-e-7: 349 68% 81%;--i-e-8: 348 61% 74%;--i-e-9: 348 75% 59%;--i-e-10: 347 70% 55%;--i-e-11: 345 70% 47%;--i-e-12: 344 63% 24%;--tw-content: "";font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif}#isdk *{box-sizing:border-box;border-style:solid;border-width:0;-webkit-tap-highlight-color:transparent}#isdk :before,#isdk :after{box-sizing:border-box}#isdk :is(ul,ol){list-style:none;padding:0;margin:0}#isdk :is(p){margin:0;padding:0}#isdk :is(li){margin:0;padding:0;list-style:none}#isdk :is(button){margin:0;padding:0;border:unset;background:unset;text-align:unset}#isdk *,#isdk :before,#isdk :after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk ::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }#isdk .container{width:100%}@media (min-width: 640px){#isdk .container{max-width:640px}}@media (min-width: 768px){#isdk .container{max-width:768px}}@media (min-width: 1024px){#isdk .container{max-width:1024px}}@media (min-width: 1280px){#isdk .container{max-width:1280px}}@media (min-width: 1536px){#isdk .container{max-width:1536px}}#isdk .sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}#isdk .visible{visibility:visible}#isdk .collapse{visibility:collapse}#isdk .static{position:static}#isdk .fixed{position:fixed}#isdk .absolute{position:absolute}#isdk .relative{position:relative}#isdk .sticky{position:sticky}#isdk .inset-0{top:0;right:0;bottom:0;left:0}#isdk .bottom-0{bottom:0}#isdk .bottom-2{bottom:.5rem}#isdk .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 .mx-auto{margin-left:auto;margin-right:auto}#isdk .mb-1{margin-bottom:.25rem}#isdk .ml-auto{margin-left: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-\\[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-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-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-0{--tw-translate-y: 0px;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 .translate-y-8{--tw-translate-y: 2rem;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 .scale-0{--tw-scale-x: 0;--tw-scale-y: 0;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}#isdk .cursor-pointer{cursor:pointer}#isdk .select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}#isdk .resize{resize:both}#isdk .flex-col{flex-direction:column}#isdk .flex-wrap{flex-wrap:wrap}#isdk .items-center{align-items:center}#isdk .justify-end{justify-content:flex-end}#isdk .justify-center{justify-content:center}#isdk .gap-0{gap:0px}#isdk .gap-1{gap:.25rem}#isdk .gap-1\\.5{gap:.375rem}#isdk .gap-2{gap:.5rem}#isdk .gap-3{gap:.75rem}#isdk .gap-4{gap:1rem}#isdk .gap-px{gap:1px}#isdk .overflow-hidden{overflow:hidden}#isdk .overflow-y-auto{overflow-y:auto}#isdk .overflow-y-scroll{overflow-y:scroll}#isdk .truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#isdk .break-words{overflow-wrap:break-word}#isdk .rounded{border-radius:.25rem}#isdk .rounded-2xl{border-radius:1rem}#isdk .rounded-3xl{border-radius:1.5rem}#isdk .rounded-\\[18px\\]{border-radius:18px}#isdk .rounded-full{border-radius:9999px}#isdk .rounded-lg{border-radius:.5rem}#isdk .rounded-md{border-radius:.375rem}#isdk .rounded-xl{border-radius:.75rem}#isdk .rounded-b-3xl{border-bottom-right-radius:1.5rem;border-bottom-left-radius:1.5rem}#isdk .rounded-bl-md{border-bottom-left-radius:.375rem}#isdk .rounded-br-md{border-bottom-right-radius:.375rem}#isdk .border{border-width:1px}#isdk .border-t{border-top-width:1px}#isdk .border-dashed{border-style:dashed}#isdk .border-divider{border-color:var(--i-color-divider)}#isdk .border-neutral-8{border-color:var(--i-color-n-8)}#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-overlay{background-color:var(--i-overlay-bg)}#isdk .bg-statusbar{background-color:var(--i-status-bar-bg)}#isdk .bg-transparent{background-color:transparent}#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 .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-2{padding-top:.5rem;padding-bottom:.5rem}#isdk .py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}#isdk .py-\\[6px\\]{padding-top:6px;padding-bottom:6px}#isdk .pb-2{padding-bottom:.5rem}#isdk .pb-6{padding-bottom:1.5rem}#isdk .pl-2{padding-left:.5rem}#isdk .pl-4{padding-left:1rem}#isdk .pr-1{padding-right:.25rem}#isdk .pr-2{padding-right:.5rem}#isdk .pr-2\\.5{padding-right:.625rem}#isdk .pr-3{padding-right:.75rem}#isdk .pr-4{padding-right:1rem}#isdk .pt-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-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 .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-snug{line-height:1.375}#isdk .tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}#isdk .tracking-tight{letter-spacing:-.025em}#isdk .tracking-wide{letter-spacing:.025em}#isdk .tracking-widest{letter-spacing:.1em}#isdk .text-\\[\\#4CAF50\\]{--tw-text-opacity: 1;color:rgb(76 175 80 / var(--tw-text-opacity))}#isdk .text-\\[\\#FFC107\\]{--tw-text-opacity: 1;color:rgb(255 193 7 / var(--tw-text-opacity))}#isdk .text-accent-11{color:var(--i-color-a-11)}#isdk .text-accent-12{color:var(--i-color-a-12)}#isdk .text-accent-9{color:var(--i-color-a-9)}#isdk .text-error-11{color:var(--i-color-e-11)}#isdk .text-error-9{color:var(--i-color-e-9)}#isdk .text-interactive-copy{color:var(--i-interactive-copy)}#isdk .text-neutral-10{color:var(--i-color-n-10)}#isdk .text-neutral-11{color:var(--i-color-n-11)}#isdk .text-neutral-12{color:var(--i-color-n-12)}#isdk .text-neutral-6{color:var(--i-color-n-6)}#isdk .text-neutral-8{color:var(--i-color-n-8)}#isdk .text-neutral-9{color:var(--i-color-n-9)}#isdk .text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}#isdk .underline{text-decoration-line:underline}#isdk .no-underline{text-decoration-line:none}#isdk .underline-offset-2{text-underline-offset:2px}#isdk .caret-accent-9{caret-color:var(--i-color-a-9)}#isdk .opacity-0{opacity:0}#isdk .opacity-100{opacity:1}#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{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 .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{--tw-drop-shadow: drop-shadow(0 1px 2px rgb(0 0 0 / .1)) drop-shadow(0 1px 1px rgb(0 0 0 / .06));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-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 .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 .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 .\\[a-zA-Z0-9-_\\:\\.\\$\\@\\?\\]{a-z-a--z0-9-_:.$@?}#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 .hover\\:bg-interactive-bg-hover:hover{background-color:var(--i-interactive-bg-hover)}#isdk .hover\\:text-interactive-copy-hover:hover{color:var(--i-interactive-copy-hover)}#isdk .hover\\:ring-accent-8:hover{--tw-ring-color: var(--i-color-a-8)}#isdk .focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}#isdk .focus-visible\\:outline-accent-7:focus-visible{outline-color:var(--i-color-a-7)}#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\\: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\\: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-10:active{outline-color:var(--i-color-n-10)}#isdk .active\\:ring-accent-7:active{--tw-ring-color: var(--i-color-a-7)}#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-7{--tw-ring-color: var(--i-color-a-7)}#isdk .peer:focus-visible~.peer-focus-visible\\:ring-offset-2{--tw-ring-offset-width: 2px}@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}}
|
|
50
|
+
`,ev=()=>({getOrCreateChatbotElement:()=>{const e=document.getElementById(Xc);if(e)return e;const t=document.createElement("div");return document.body.appendChild(t),t.id=Xc,t}});var tv=["1","2","3","4","5","6","7","8","9","10","11","12"],nv={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:[60.5,.2],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]}},rv=(e,t=1,n)=>r=>{const[i,o]=nv[n][r];return"oklch("+i+"% "+o*t+" "+e+")"},mo=e=>{const t=rv(e.hue,e.chroma,e.mode);return Object.fromEntries(tv.map(n=>[e.prefix+n,e.transform(t(n))]))},vo=e=>e,iv=e=>{const t=Object.keys(e).flatMap(n=>{const r=e[n];return typeof r=="object"&&r!==null?Object.keys(r).map(i=>{const o=r[i];return[`${String(n)}.${i}`,o]}):[[n,r]]});return Object.fromEntries(t)},Tr=e=>!!e&&typeof e=="object"&&!Array.isArray(e),go=(e,...t)=>{if(!t.length)return e;const n=t.shift();if(Tr(e)&&Tr(n))for(const r in n){const i=n[r];if(Tr(i)){e[r]||Object.assign(e,{[r]:{}});const o=e[r];Tr(o)&&go(o,i)}else Object.assign(e,{[r]:n[r]})}return go(e,...t)},ov=e=>{function t(n,r){const i=[e.prefix,r.toString().replace(/\./g,"-")].join("");return n==="declaration"?`--${i}`:`var(--${i})`}return t},sv=()=>({core:e=>({semantic:t=>({component:n=>({from:r=>{const{theme:i,getToken:o}=r,s=f=>o("reference",f.toString()),a=e({theme:i}),c=t({theme:i,core:s,raw:{core:a}}),u=n({theme:i,core:s,semantic:s,raw:{core:a,semantic:c}}),d=iv(go(a,c,u)),l=([f,p],h)=>{const v=[h,f].filter(Boolean).join(".");return typeof p=="object"?Object.entries(p).flatMap(b=>l(b,v)):[[r.getToken("declaration",v),p]]};return{values:d,declarations:Object.fromEntries(Object.entries(d).flatMap(f=>l(f))),ref:f=>o("reference",f.toString())}}})})})});const[yo,bo,ll]=["oklch(0% 0 0)","oklch(100% 0 0)","transparent"],av=sv().core(({theme:e})=>({color:{black:yo,white:bo,lowest:e.mode==="light"?bo:yo,highest:e.mode==="light"?yo:bo,...mo({prefix:"a-",hue:e.hue,chroma:e.chroma,mode:e.mode,transform:vo}),...mo({prefix:"n-",hue:e.hue,chroma:.05,mode:e.mode,transform:vo}),...mo({prefix:"e-",hue:20,chroma:e.chroma,mode:e.mode,transform:vo})},typography:{}})).semantic(({core:e,raw:t,theme:n})=>{const r=(i,o)=>t.core.color[i].replace(")",` / ${o})`);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:r("n-8",n.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:ll,"bg-hover":r("n-10",.4),"bg-active":r("n-10",.5)}}}).component(({raw:e,theme:t,semantic:n,core:r})=>{const i=(o,s)=>e.core.color[o].replace(")",` / ${s})`);return{app:{bg:r(t.mode==="dark"?"color.n-1":"color.n-2")},overlay:{bg:i("black",.4)},bubble:{"weak-bg":r(t.mode==="dark"?"color.n-3":"color.lowest"),"weak-outline":n("color.divider"),"strong-shadow":i("a-9",.05)},"status-bar":{bg:i("n-2",.8),"bg-button":ll,"bg-button-hover":i("n-10",.4),"bg-button-active":i("n-10",.5)}}}),cv=ov({prefix:"i-"}),lv=e=>{const t=av.from({theme:e,getToken:cv}),n=Object.entries(t.declarations).map(([r,i])=>`${r}: ${i};`);return`#isdk {
|
|
51
|
+
${n.concat(n).join(`
|
|
52
52
|
`)}
|
|
53
|
-
}`},av=({_internal_domManager:e=Xm(),theme:t})=>ft(({apiClient:r,logger:n,analytics:i})=>{let o=!1;const s=()=>{if(typeof window>"u")return;const a=[M("style",{id:"inploi-chatbot-styles"},Zm),M("style",{id:"inploi-chatbot-theme"},sv(t))],l=e.getOrCreateChatbotElement();Mt(M(ee,{},[a,M(Am,{apiClient:r,logger:n,analytics:i})]),l),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;s(),n.info("Chatbot plugin prepared")}catch(a){console.error(a),n.error("Error preparing chatbot plugin",a)}},startApplication:async({jobId:a})=>{if(!(typeof window>"u"))try{Y.cancel(),Jl(()=>{ze.value="maximised",Y.current$.value={state:"loading"}}),Ym({jobId:a,apiClient:r,logger:n}).then(async l=>{l.ok?Y.start(l.value):Y.current$.value={state:"error",error:l.error}}),o||s()}catch(l){console.error(l),n.error("Error starting application",l)}},closeApplication:async()=>{typeof window>"u"||(n.info("Closing application from an external source"),Y.cancel())}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=av;const cl=e=>{const t=e.find(r=>r.isHead);if(!t)throw new Error("No head node found");return t},cv=e=>Object.entries(e).reduce((r,[n,i])=>(r[n]=i.value,r),{}),yo=e=>t=>t?t.type===e:!1;class Ar extends Error{constructor(){super("Aborted")}}const ll=({node:e,nodes:t,stopWhen:r})=>{if((r==null?void 0:r(e))===!0)return e;const n=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(n)return ll({node:n,nodes:t,stopWhen:r})},lv=({childNode:e,nodes:t})=>{const n=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(a=>a.id===i.branchId);if(!o)return!1;const s=ll({node:o,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(n!=null&&n.nextId)return t.find(i=>i.id===n.nextId)},uv=({flow:e,analytics:t,logger:r,context:n,apiClient:i,getSubmissions:o,chatService:s,onFlowEnd:a,onInterpret:l})=>{const u=new AbortController,d=async(c,f)=>{const p=o();l==null||l(c,f);try{await dv({analytics:t,logger:r,apiClient:i,context:n,node:c,submissions:p,chat:{sendMessage:async h=>s.send({groupId:c.id,message:h,signal:u.signal}),userInput:async h=>s.input({input:h,signal:u.signal})},next:h=>{const v=h?e.find(w=>w.id===h):lv({childNode:c,nodes:e});return v?d(v,c):a==null?void 0:a(c)},end:()=>a==null?void 0:a(c)})}catch(h){if(h instanceof Ar)return;throw h}};return{interpret:async c=>{const f=e.find(p=>p.id===c)??cl(e);return d(f)},abort:()=>{u.abort()}}};async function dv(e){return await Ue(e).with({node:{type:"text"}},mv).with({node:{type:"image"}},vv).with({node:{type:"question-text"}},gv).with({node:{type:"question-enum"}},bv).with({node:{type:"question-number"}},yv).with({node:{type:"question-boolean"}},wv).with({node:{type:"question-file"}},xv).with({node:{type:"question-address"}},_v).with({node:{type:"end-flow"}},kv).with({node:{type:"if-block"}},hv).with({node:{type:"jump"}},({node:t,next:r})=>r(t.data.targetId)).with({node:{type:"link"}},pv).with({node:{type:"integration-application-submit"}},fv).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function fv({chat:e,next:t,node:r,logger:n,apiClient:i,submissions:o,context:s,analytics:a}){await e.userInput({type:"multiple-choice",key:void 0,config:{options:[{label:"Submit my application",value:"submit"}],maxSelected:1,minSelected:1}});const l=()=>{const d=typeof s.jobId=="string"?s.jobId:void 0,c=typeof s.flowId=="string"?s.flowId:void 0;It(d),It(c),d&&a.log({event:"APPLY_COMPLETE",attributionKey:`job_${d}`,properties:{job_id:d,flow_id:c}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const u=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,type:r.data.type,ats:r.data.ats,integration_id:r.data.integrationId,anonymous_id:a.getAnonymousId(),submissions:cv(o||{})})}).catch(d=>d);await Ue(u).with({ats_data:{redirect_url:_e.string}},async d=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const c=a.getAnonymousId(),f=new URL(d.ats_data.redirect_url);c&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",c),l(),await e.sendMessage({type:"link",href:f.toString(),text:"Finalise application on partner"}),t(r.nextId)}).with({success:!0},async()=>{l(),await e.sendMessage({type:"system",variant:"success",text:"Application submitted"}),t(r.nextId)}).otherwise(async d=>{n.error(d),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(r.id)})}async function pv({chat:e,next:t,node:r}){await e.sendMessage({type:"link",href:r.data.href,text:r.data.cta}),t(r.nextId)}async function hv({submissions:e,next:t,node:r}){const n=Sv(r,e)?r.branchId:r.nextId;t(n)}async function mv({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.text}),t(r.nextId)}async function vv({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 gv({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:r.data.format}});n.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:n.value}),t(r.nextId)}async function yv({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({key:r.data.key,type:"text",config:{optional:r.data.optional,placeholder:r.data.placeholder,format:"text"}});n.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:n.value}),t(r.nextId)}async function bv({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});const n=await e.userInput({key:r.data.key,type:"multiple-choice",config:r.data});n.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:r.data.options.filter(i=>n.value.includes(i.value)).map(i=>i.label).join(", ")}),t(r.nextId)}async function wv({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:r.data.question});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}}})).value;i===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:{true:r.data.trueLabel,false:r.data.falseLabel}[i]}),t(r.nextId)}async function _v({chat:e,next:t,node:r}){await e.sendMessage({author:"bot",type:"text",text:"Address questions are not implemented yet"}),t(r.nextId)}async function xv({node:e,chat:t,next:r}){await t.sendMessage({author:"bot",type:"text",text:e.data.question});const n=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(n.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const i of n.value)await t.sendMessage({author:"user",type:"file",fileName:i.name,fileSizeKb:i.sizeKb});r(e.nextId)}async function kv({chat:e,end:t,node:r}){await e.sendMessage({type:"system",variant:"info",text:r.data.systemMessage}),t()}const ul=_e.union(_e.string,_e.array(_e.string),null),Sv=(e,t)=>{const r=t==null?void 0:t[e.data.compareKey];return r?Ue({...e.data,answer:r}).with({compare:"equals"},({compareValue:n})=>typeof r.value=="string"||typeof r.value=="boolean"?n===r.value.toString():!1).with({compare:"notEquals"},({compareValue:n})=>typeof r.value=="string"||typeof r.value=="boolean"?n!==r.value.toString():!1).with({compare:"contains",answer:{value:ul}},({compareValue:n,answer:i})=>i.value!==null&&i.value.includes(n)).with({compare:"notContains",answer:{value:ul}},({compareValue:n,answer:i})=>i.value===null||!i.value.includes(n)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},Vn=({class:e,...t})=>g("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:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[g("title",{children:"Send"}),g("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),g("path",{d:"M8 4V13"})]})}),Tn=({class:e,...t})=>g("button",{type:"button",class:ot("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[g("title",{children:"Skip"}),g("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),g("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),bo=()=>{const e=B(null);return H(()=>{var t;(t=e.current)==null||t.focus()},[]),e},dl=["true","false"],Cv=Lm(dl),$v="answer",Av=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{const n=bo();return r(),g("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const o=Ue(i).with({nativeEvent:{submitter:_e.select(_e.union(_e.instanceOf(HTMLButtonElement),_e.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=fo(Cv,o);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:dl.map((i,o)=>g("button",{ref:o===0?n:null,type:"submit",name:$v,value:i,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 flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:g("p",{class:"truncate text-center text-base",children:e.config.labels[i]})}))}),e.config.optional&&g("div",{class:"pb-2",children:g(Tn,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},wo=({error:e,onAnimationComplete:t})=>(Pe(()=>{e&&t()},[e,t]),e?g("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[g("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),g("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),g("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),g("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null),Pv=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}),On=e=>Ue(e).with(_e.number.lte(1e3),()=>`${Math.round(e)}KB`).with(_e.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),Ev=e=>e.reduce((t,r)=>t+r.sizeKb,0),Vv=yo("file"),fl=3,Tv=({file:e,class:t,...r})=>{const n=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${n}$`),"");return g("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:[g("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[g("span",{class:"block truncate",children:i}),g("span",{children:[".",n]})]}),g("p",{"aria-label":"File size",class:"text-accent-11",children:On(e.sizeKb)})]})},pl=({class:e,...t})=>g("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}),Ov=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var c;const n=(c=Y.current$.value.application)==null?void 0:c.data.submissions[e.key],[i,o]=ne(Vv(n)&&n.value!==null?n.value:[]),[s,a]=ne(),l=i.length-fl,u=Ev(i),d=bo();return g("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),a(void 0),i.length===0?a({type:"required",message:"Please select a file"}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${On(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(i)),children:[g("div",{class:"flex items-center gap-2",children:[g("label",{ref:d,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:[i.length>0?g(ee,{children:[g("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,fl).map(f=>{const p=f.name.split(".").pop(),h=f.name.replace(new RegExp(`.${p}$`),"");return g(pl,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:h}),g("span",{children:[".",p]})]})}),l>0?g(pl,{children:["+",l," file",l!==1?"s":""]}):null]}),g("p",{class:"text-neutral-11 text-xs",children:[On(u)," ",i.length>1?"total":""]})]}):g("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[g("header",{class:"flex flex-col items-center gap-0",children:[g("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:g("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"})}),g("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?g("p",{class:"text-neutral-10 text-xs",children:["(max ",On(e.config.fileSizeLimitKib),")"]}):null]}),g("aside",{class:"flex flex-col items-center gap-2",children:[g("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),g("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>g("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:f.replace(".","")}))})]})]}),g("input",{id:"dropzone-file",onInput:async f=>{It(f.target instanceof HTMLInputElement);const p=f.target.files?Array.from(f.target.files):[],h=await Promise.allSettled(p.map(async w=>{const k=await Pv(w);return{name:w.name,data:k,sizeKb:w.size/1e3}}));if(h.some(({status:w})=>w==="rejected"))return a({type:"invalid",message:"Invalid file"});const v=h.map(w=>w.status==="fulfilled"?w.value:null).filter(Boolean);o(v)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),g("div",{class:"flex h-full flex-col items-center gap-2",children:[g(Vn,{disabled:i.length===0}),e.config.optional&&g(Tn,{onClick:()=>t(null)})]})]}),s&&g(wo,{onAnimationComplete:r,error:s})]})};var Pr=e=>e.type==="checkbox",Xt=e=>e instanceof Date,ye=e=>e==null;const hl=e=>typeof e=="object";var se=e=>!ye(e)&&!Array.isArray(e)&&hl(e)&&!Xt(e),Mv=e=>se(e)&&e.target?Pr(e.target)?e.target.checked:e.target.value:e,Fv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Dv=(e,t)=>e.has(Fv(t)),Iv=e=>{const t=e.constructor&&e.constructor.prototype;return se(t)&&t.hasOwnProperty("isPrototypeOf")},_o=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function We(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(!(_o&&(e instanceof Blob||e instanceof FileList))&&(r||se(e)))if(t=r?[]:{},!r&&!Iv(e))t=e;else for(const n in e)e.hasOwnProperty(n)&&(t[n]=We(e[n]));else return e;return t}var Er=e=>Array.isArray(e)?e.filter(Boolean):[],te=e=>e===void 0,T=(e,t,r)=>{if(!t||!se(e))return r;const n=Er(t.split(/[,[\].]+?/)).reduce((i,o)=>ye(i)?i:i[o],e);return te(n)||n===e?te(e[t])?r:e[t]:n},ct=e=>typeof e=="boolean";const ml={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ve={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ke={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};Ee.createContext(null);var Nv=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Ve.all&&(t._proxyFormState[s]=!n||Ve.all),r&&(r[s]=!0),e[s]}});return i},Ce=e=>se(e)&&!Object.keys(e).length,Lv=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return Ce(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!n||Ve.all))},xo=e=>Array.isArray(e)?e:[e];function Rv(e){const t=Ee.useRef(e);t.current=e,Ee.useEffect(()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}},[e.disabled])}var Ne=e=>typeof e=="string",Bv=(e,t,r,n,i)=>Ne(e)?(n&&t.watch.add(e),T(r,e,i)):Array.isArray(e)?e.map(o=>(n&&t.watch.add(o),T(r,o))):(n&&(t.watchAll=!0),r),ko=e=>/^\w*$/.test(e),vl=e=>Er(e.replace(/["|']|\]/g,"").split(/\.|\[/));function q(e,t,r){let n=-1;const i=ko(t)?[t]:vl(t),o=i.length,s=o-1;for(;++n<o;){const a=i[n];let l=r;if(n!==s){const u=e[a];l=se(u)||Array.isArray(u)?u:isNaN(+i[n+1])?{}:[]}e[a]=l,e=e[a]}return e}var gl=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{},yl=e=>({isOnSubmit:!e||e===Ve.onSubmit,isOnBlur:e===Ve.onBlur,isOnChange:e===Ve.onChange,isOnAll:e===Ve.all,isOnTouch:e===Ve.onTouched}),bl=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(n=>e.startsWith(n)&&/^\.\w+/.test(e.slice(n.length))));const Mn=(e,t,r,n)=>{for(const i of r||Object.keys(e)){const o=T(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!n)break;if(s.ref&&t(s.ref,s.name)&&!n)break}else se(a)&&Mn(a,t)}}};var jv=(e,t,r)=>{const n=Er(T(e,r));return q(n,"root",t[r]),q(e,r,n),e},So=e=>e.type==="file",lt=e=>typeof e=="function",Fn=e=>{if(!_o)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Dn=e=>Ne(e),Co=e=>e.type==="radio",In=e=>e instanceof RegExp;const wl={value:!1,isValid:!1},_l={value:!0,isValid:!0};var xl=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&&!te(e[0].attributes.value)?te(e[0].value)||e[0].value===""?_l:{value:e[0].value,isValid:!0}:_l:wl}return wl};const kl={isValid:!1,value:null};var Sl=e=>Array.isArray(e)?e.reduce((t,r)=>r&&r.checked&&!r.disabled?{isValid:!0,value:r.value}:t,kl):kl;function Cl(e,t,r="validate"){if(Dn(e)||Array.isArray(e)&&e.every(Dn)||ct(e)&&!e)return{type:r,message:Dn(e)?e:"",ref:t}}var Qt=e=>se(e)&&!In(e)?e:{value:e,message:""},$l=async(e,t,r,n,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:u,min:d,max:c,pattern:f,validate:p,name:h,valueAsNumber:v,mount:w,disabled:k}=e._f,y=T(t,h);if(!w||k)return{};const _=s?s[0]:o,C=j=>{n&&_.reportValidity&&(_.setCustomValidity(ct(j)?"":j||""),_.reportValidity())},S={},N=Co(o),D=Pr(o),A=N||D,E=(v||So(o))&&te(o.value)&&te(y)||Fn(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,W=gl.bind(null,h,r,S),Q=(j,L,R,U=Ke.maxLength,re=Ke.minLength)=>{const de=j?L:R;S[h]={type:j?U:re,message:de,ref:o,...W(j?U:re,de)}};if(i?!Array.isArray(y)||!y.length:a&&(!A&&(E||ye(y))||ct(y)&&!y||D&&!xl(s).isValid||N&&!Sl(s).isValid)){const{value:j,message:L}=Dn(a)?{value:!!a,message:a}:Qt(a);if(j&&(S[h]={type:Ke.required,message:L,ref:_,...W(Ke.required,L)},!r))return C(L),S}if(!E&&(!ye(d)||!ye(c))){let j,L;const R=Qt(c),U=Qt(d);if(!ye(y)&&!isNaN(y)){const re=o.valueAsNumber||y&&+y;ye(R.value)||(j=re>R.value),ye(U.value)||(L=re<U.value)}else{const re=o.valueAsDate||new Date(y),de=Pt=>new Date(new Date().toDateString()+" "+Pt),qe=o.type=="time",ut=o.type=="week";Ne(R.value)&&y&&(j=qe?de(y)>de(R.value):ut?y>R.value:re>new Date(R.value)),Ne(U.value)&&y&&(L=qe?de(y)<de(U.value):ut?y<U.value:re<new Date(U.value))}if((j||L)&&(Q(!!j,R.message,U.message,Ke.max,Ke.min),!r))return C(S[h].message),S}if((l||u)&&!E&&(Ne(y)||i&&Array.isArray(y))){const j=Qt(l),L=Qt(u),R=!ye(j.value)&&y.length>+j.value,U=!ye(L.value)&&y.length<+L.value;if((R||U)&&(Q(R,j.message,L.message),!r))return C(S[h].message),S}if(f&&!E&&Ne(y)){const{value:j,message:L}=Qt(f);if(In(j)&&!y.match(j)&&(S[h]={type:Ke.pattern,message:L,ref:o,...W(Ke.pattern,L)},!r))return C(L),S}if(p){if(lt(p)){const j=await p(y,t),L=Cl(j,_);if(L&&(S[h]={...L,...W(Ke.validate,L.message)},!r))return C(L.message),S}else if(se(p)){let j={};for(const L in p){if(!Ce(j)&&!r)break;const R=Cl(await p[L](y,t),_,L);R&&(j={...R,...W(L,R.message)},C(R.message),r&&(S[h]=j))}if(!Ce(j)&&(S[h]={ref:_,...j},!r))return S}}return C(!0),S};function Uv(e,t){const r=t.slice(0,-1).length;let n=0;for(;n<r;)e=te(e)?n++:e[t[n++]];return e}function zv(e){for(const t in e)if(e.hasOwnProperty(t)&&!te(e[t]))return!1;return!0}function ue(e,t){const r=Array.isArray(t)?t:ko(t)?[t]:vl(t),n=r.length===1?e:Uv(e,r),i=r.length-1,o=r[i];return n&&delete n[o],i!==0&&(se(n)&&Ce(n)||Array.isArray(n)&&zv(n))&&ue(e,r.slice(0,-1)),e}function $o(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Nn=e=>ye(e)||!hl(e);function At(e,t){if(Nn(e)||Nn(t))return e===t;if(Xt(e)&&Xt(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const o=e[i];if(!n.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Xt(o)&&Xt(s)||se(o)&&se(s)||Array.isArray(o)&&Array.isArray(s)?!At(o,s):o!==s)return!1}}return!0}var Al=e=>e.type==="select-multiple",Hv=e=>Co(e)||Pr(e),Ao=e=>Fn(e)&&e.isConnected,Pl=e=>{for(const t in e)if(lt(e[t]))return!0;return!1};function Ln(e,t={}){const r=Array.isArray(e);if(se(e)||r)for(const n in e)Array.isArray(e[n])||se(e[n])&&!Pl(e[n])?(t[n]=Array.isArray(e[n])?[]:{},Ln(e[n],t[n])):ye(e[n])||(t[n]=!0);return t}function El(e,t,r){const n=Array.isArray(e);if(se(e)||n)for(const i in e)Array.isArray(e[i])||se(e[i])&&!Pl(e[i])?te(t)||Nn(r[i])?r[i]=Array.isArray(e[i])?Ln(e[i],[]):{...Ln(e[i])}:El(e[i],ye(t)?{}:t[i],r[i]):r[i]=!At(e[i],t[i]);return r}var Po=(e,t)=>El(e,t,Ln(t)),Vl=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>te(e)?e:t?e===""?NaN:e&&+e:r&&Ne(e)?new Date(e):n?n(e):e;function Eo(e){const t=e.ref;if(!(e.refs?e.refs.every(r=>r.disabled):t.disabled))return So(t)?t.files:Co(t)?Sl(e.refs).value:Al(t)?[...t.selectedOptions].map(({value:r})=>r):Pr(t)?xl(e.refs).value:Vl(te(t.value)?e.ref.value:t.value,e)}var Wv=(e,t,r,n)=>{const i={};for(const o of e){const s=T(t,o);s&&q(i,o,s._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}},Vr=e=>te(e)?e:In(e)?e.source:se(e)?In(e.value)?e.value.source:e.value:e,Kv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Tl(e,t,r){const n=T(e,r);if(n||ko(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const o=i.join("."),s=T(t,o),a=T(e,o);if(s&&!Array.isArray(s)&&r!==o)return{name:r};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:r}}var qv=(e,t,r,n,i)=>i.isOnAll?!1:!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:(r?n.isOnChange:i.isOnChange)?e:!0,Gv=(e,t)=>!Er(T(e,t)).length&&ue(e,t);const Yv={mode:Ve.onSubmit,reValidateMode:Ve.onChange,shouldFocusError:!0};function Zv(e={},t){let r={...Yv,...e},n={submitCount:0,isDirty:!1,isLoading:lt(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=se(r.defaultValues)||se(r.values)?We(r.defaultValues||r.values)||{}:{},s=r.shouldUnregister?{}:We(o),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const c={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:$o(),array:$o(),state:$o()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,h=yl(r.mode),v=yl(r.reValidateMode),w=r.criteriaMode===Ve.all,k=m=>b=>{clearTimeout(d),d=setTimeout(m,b)},y=async m=>{if(c.isValid||m){const b=r.resolver?Ce((await E()).errors):await Q(i,!0);b!==n.isValid&&f.state.next({isValid:b})}},_=m=>c.isValidating&&f.state.next({isValidating:m}),C=(m,b=[],x,O,P=!0,$=!0)=>{if(O&&x){if(a.action=!0,$&&Array.isArray(T(i,m))){const F=x(T(i,m),O.argA,O.argB);P&&q(i,m,F)}if($&&Array.isArray(T(n.errors,m))){const F=x(T(n.errors,m),O.argA,O.argB);P&&q(n.errors,m,F),Gv(n.errors,m)}if(c.touchedFields&&$&&Array.isArray(T(n.touchedFields,m))){const F=x(T(n.touchedFields,m),O.argA,O.argB);P&&q(n.touchedFields,m,F)}c.dirtyFields&&(n.dirtyFields=Po(o,s)),f.state.next({name:m,isDirty:L(m,b),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else q(s,m,b)},S=(m,b)=>{q(n.errors,m,b),f.state.next({errors:n.errors})},N=(m,b,x,O)=>{const P=T(i,m);if(P){const $=T(s,m,te(x)?T(o,m):x);te($)||O&&O.defaultChecked||b?q(s,m,b?$:Eo(P._f)):re(m,$),a.mount&&y()}},D=(m,b,x,O,P)=>{let $=!1,F=!1;const Z={name:m};if(!x||O){c.isDirty&&(F=n.isDirty,n.isDirty=Z.isDirty=L(),$=F!==Z.isDirty);const ie=At(T(o,m),b);F=T(n.dirtyFields,m),ie?ue(n.dirtyFields,m):q(n.dirtyFields,m,!0),Z.dirtyFields=n.dirtyFields,$=$||c.dirtyFields&&F!==!ie}if(x){const ie=T(n.touchedFields,m);ie||(q(n.touchedFields,m,x),Z.touchedFields=n.touchedFields,$=$||c.touchedFields&&ie!==x)}return $&&P&&f.state.next(Z),$?Z:{}},A=(m,b,x,O)=>{const P=T(n.errors,m),$=c.isValid&&ct(b)&&n.isValid!==b;if(e.delayError&&x?(u=k(()=>S(m,x)),u(e.delayError)):(clearTimeout(d),u=null,x?q(n.errors,m,x):ue(n.errors,m)),(x?!At(P,x):P)||!Ce(O)||$){const F={...O,...$&&ct(b)?{isValid:b}:{},errors:n.errors,name:m};n={...n,...F},f.state.next(F)}_(!1)},E=async m=>r.resolver(s,r.context,Wv(m||l.mount,i,r.criteriaMode,r.shouldUseNativeValidation)),W=async m=>{const{errors:b}=await E(m);if(m)for(const x of m){const O=T(b,x);O?q(n.errors,x,O):ue(n.errors,x)}else n.errors=b;return b},Q=async(m,b,x={valid:!0})=>{for(const O in m){const P=m[O];if(P){const{_f:$,...F}=P;if($){const Z=l.array.has($.name),ie=await $l(P,s,w,r.shouldUseNativeValidation&&!b,Z);if(ie[$.name]&&(x.valid=!1,b))break;!b&&(T(ie,$.name)?Z?jv(n.errors,ie,$.name):q(n.errors,$.name,ie[$.name]):ue(n.errors,$.name))}F&&await Q(F,b,x)}}return x.valid},j=()=>{for(const m of l.unMount){const b=T(i,m);b&&(b._f.refs?b._f.refs.every(x=>!Ao(x)):!Ao(b._f.ref))&&er(m)}l.unMount=new Set},L=(m,b)=>(m&&b&&q(s,m,b),!At(dt(),o)),R=(m,b,x)=>Bv(m,l,{...a.mount?s:te(b)?o:Ne(m)?{[m]:b}:b},x,b),U=m=>Er(T(a.mount?s:o,m,e.shouldUnregister?T(o,m,[]):[])),re=(m,b,x={})=>{const O=T(i,m);let P=b;if(O){const $=O._f;$&&(!$.disabled&&q(s,m,Vl(b,$)),P=Fn($.ref)&&ye(b)?"":b,Al($.ref)?[...$.ref.options].forEach(F=>F.selected=P.includes(F.value)):$.refs?Pr($.ref)?$.refs.length>1?$.refs.forEach(F=>(!F.defaultChecked||!F.disabled)&&(F.checked=Array.isArray(P)?!!P.find(Z=>Z===F.value):P===F.value)):$.refs[0]&&($.refs[0].checked=!!P):$.refs.forEach(F=>F.checked=F.value===P):So($.ref)?$.ref.value="":($.ref.value=P,$.ref.type||f.values.next({name:m,values:{...s}})))}(x.shouldDirty||x.shouldTouch)&&D(m,P,x.shouldTouch,x.shouldDirty,!0),x.shouldValidate&&G(m)},de=(m,b,x)=>{for(const O in b){const P=b[O],$=`${m}.${O}`,F=T(i,$);(l.array.has(m)||!Nn(P)||F&&!F._f)&&!Xt(P)?de($,P,x):re($,P,x)}},qe=(m,b,x={})=>{const O=T(i,m),P=l.array.has(m),$=We(b);q(s,m,$),P?(f.array.next({name:m,values:{...s}}),(c.isDirty||c.dirtyFields)&&x.shouldDirty&&f.state.next({name:m,dirtyFields:Po(o,s),isDirty:L(m,$)})):O&&!O._f&&!ye($)?de(m,$,x):re(m,$,x),bl(m,l)&&f.state.next({...n}),f.values.next({name:m,values:{...s}}),!a.mount&&t()},ut=async m=>{const b=m.target;let x=b.name,O=!0;const P=T(i,x),$=()=>b.type?Eo(P._f):Mv(m),F=Z=>{O=Number.isNaN(Z)||Z===T(s,x,Z)};if(P){let Z,ie;const Un=$(),tr=m.type===ml.BLUR||m.type===ml.FOCUS_OUT,Cg=!Kv(P._f)&&!r.resolver&&!T(n.errors,x)&&!P._f.deps||qv(tr,T(n.touchedFields,x),n.isSubmitted,v,h),Vo=bl(x,l,tr);q(s,x,Un),tr?(P._f.onBlur&&P._f.onBlur(m),u&&u(0)):P._f.onChange&&P._f.onChange(m);const To=D(x,Un,tr,!1),$g=!Ce(To)||Vo;if(!tr&&f.values.next({name:x,type:m.type,values:{...s}}),Cg)return c.isValid&&y(),$g&&f.state.next({name:x,...Vo?{}:To});if(!tr&&Vo&&f.state.next({...n}),_(!0),r.resolver){const{errors:Bl}=await E([x]);if(F(Un),O){const Ag=Tl(n.errors,i,x),jl=Tl(Bl,i,Ag.name||x);Z=jl.error,x=jl.name,ie=Ce(Bl)}}else Z=(await $l(P,s,w,r.shouldUseNativeValidation))[x],F(Un),O&&(Z?ie=!1:c.isValid&&(ie=await Q(i,!0)));O&&(P._f.deps&&G(P._f.deps),A(x,ie,Z,To))}},Pt=(m,b)=>{if(T(n.errors,b)&&m.focus)return m.focus(),1},G=async(m,b={})=>{let x,O;const P=xo(m);if(_(!0),r.resolver){const $=await W(te(m)?m:P);x=Ce($),O=m?!P.some(F=>T($,F)):x}else m?(O=(await Promise.all(P.map(async $=>{const F=T(i,$);return await Q(F&&F._f?{[$]:F}:F)}))).every(Boolean),!(!O&&!n.isValid)&&y()):O=x=await Q(i);return f.state.next({...!Ne(m)||c.isValid&&x!==n.isValid?{}:{name:m},...r.resolver||!m?{isValid:x}:{},errors:n.errors,isValidating:!1}),b.shouldFocus&&!O&&Mn(i,Pt,m?P:l.mount),O},dt=m=>{const b={...o,...a.mount?s:{}};return te(m)?b:Ne(m)?T(b,m):m.map(x=>T(b,x))},Tr=(m,b)=>({invalid:!!T((b||n).errors,m),isDirty:!!T((b||n).dirtyFields,m),isTouched:!!T((b||n).touchedFields,m),error:T((b||n).errors,m)}),Rn=m=>{m&&xo(m).forEach(b=>ue(n.errors,b)),f.state.next({errors:m?n.errors:{}})},Or=(m,b,x)=>{const O=(T(i,m,{_f:{}})._f||{}).ref;q(n.errors,m,{...b,ref:O}),f.state.next({name:m,errors:n.errors,isValid:!1}),x&&x.shouldFocus&&O&&O.focus&&O.focus()},Et=(m,b)=>lt(m)?f.values.subscribe({next:x=>m(R(void 0,b),x)}):R(m,b,!0),er=(m,b={})=>{for(const x of m?xo(m):l.mount)l.mount.delete(x),l.array.delete(x),b.keepValue||(ue(i,x),ue(s,x)),!b.keepError&&ue(n.errors,x),!b.keepDirty&&ue(n.dirtyFields,x),!b.keepTouched&&ue(n.touchedFields,x),!r.shouldUnregister&&!b.keepDefaultValue&&ue(o,x);f.values.next({values:{...s}}),f.state.next({...n,...b.keepDirty?{isDirty:L()}:{}}),!b.keepIsValid&&y()},Bn=({disabled:m,name:b,field:x,fields:O,value:P})=>{if(ct(m)){const $=m?void 0:te(P)?Eo(x?x._f:T(O,b)._f):P;q(s,b,$),D(b,$,!1,!1,!0)}},Vt=(m,b={})=>{let x=T(i,m);const O=ct(b.disabled);return q(i,m,{...x||{},_f:{...x&&x._f?x._f:{ref:{name:m}},name:m,mount:!0,...b}}),l.mount.add(m),x?Bn({field:x,disabled:b.disabled,name:m}):N(m,!0,b.value),{...O?{disabled:b.disabled}:{},...r.progressive?{required:!!b.required,min:Vr(b.min),max:Vr(b.max),minLength:Vr(b.minLength),maxLength:Vr(b.maxLength),pattern:Vr(b.pattern)}:{},name:m,onChange:ut,onBlur:ut,ref:P=>{if(P){Vt(m,b),x=T(i,m);const $=te(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,F=Hv($),Z=x._f.refs||[];if(F?Z.find(ie=>ie===$):$===x._f.ref)return;q(i,m,{_f:{...x._f,...F?{refs:[...Z.filter(Ao),$,...Array.isArray(T(o,m))?[{}]:[]],ref:{type:$.type,name:m}}:{ref:$}}}),N(m,!1,void 0,$)}else x=T(i,m,{}),x._f&&(x._f.mount=!1),(r.shouldUnregister||b.shouldUnregister)&&!(Dv(l.array,m)&&a.action)&&l.unMount.add(m)}}},Tt=()=>r.shouldFocusError&&Mn(i,Pt,l.mount),Ge=m=>{ct(m)&&(f.state.next({disabled:m}),Mn(i,b=>{b.disabled=m},0,!1))},Mr=(m,b)=>async x=>{x&&(x.preventDefault&&x.preventDefault(),x.persist&&x.persist());let O=We(s);if(f.state.next({isSubmitting:!0}),r.resolver){const{errors:P,values:$}=await E();n.errors=P,O=$}else await Q(i);ue(n.errors,"root"),Ce(n.errors)?(f.state.next({errors:{}}),await m(O,x)):(b&&await b({...n.errors},x),Tt(),setTimeout(Tt)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ce(n.errors),submitCount:n.submitCount+1,errors:n.errors})},jn=(m,b={})=>{T(i,m)&&(te(b.defaultValue)?qe(m,T(o,m)):(qe(m,b.defaultValue),q(o,m,b.defaultValue)),b.keepTouched||ue(n.touchedFields,m),b.keepDirty||(ue(n.dirtyFields,m),n.isDirty=b.defaultValue?L(m,T(o,m)):L()),b.keepError||(ue(n.errors,m),c.isValid&&y()),f.state.next({...n}))},Ll=(m,b={})=>{const x=m?We(m):o,O=We(x),P=m&&!Ce(m)?O:o;if(b.keepDefaultValues||(o=x),!b.keepValues){if(b.keepDirtyValues||p)for(const $ of l.mount)T(n.dirtyFields,$)?q(P,$,T(s,$)):qe($,T(P,$));else{if(_o&&te(m))for(const $ of l.mount){const F=T(i,$);if(F&&F._f){const Z=Array.isArray(F._f.refs)?F._f.refs[0]:F._f.ref;if(Fn(Z)){const ie=Z.closest("form");if(ie){ie.reset();break}}}}i={}}s=e.shouldUnregister?b.keepDefaultValues?We(o):{}:We(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!c.isValid||!!b.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:b.keepSubmitCount?n.submitCount:0,isDirty:b.keepDirty?n.isDirty:!!(b.keepDefaultValues&&!At(m,o)),isSubmitted:b.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:b.keepDirtyValues?n.dirtyFields:b.keepDefaultValues&&m?Po(o,m):{},touchedFields:b.keepTouched?n.touchedFields:{},errors:b.keepErrors?n.errors:{},isSubmitSuccessful:b.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},Rl=(m,b)=>Ll(lt(m)?m(s):m,b);return{control:{register:Vt,unregister:er,getFieldState:Tr,handleSubmit:Mr,setError:Or,_executeSchema:E,_getWatch:R,_getDirty:L,_updateValid:y,_removeUnmounted:j,_updateFieldArray:C,_updateDisabledField:Bn,_getFieldArray:U,_reset:Ll,_resetDefaultValues:()=>lt(r.defaultValues)&&r.defaultValues().then(m=>{Rl(m,r.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:m=>{n={...n,...m}},_disableForm:Ge,_subjects:f,_proxyFormState:c,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(m){a=m},get _defaultValues(){return o},get _names(){return l},set _names(m){l=m},get _formState(){return n},set _formState(m){n=m},get _options(){return r},set _options(m){r={...r,...m}}},trigger:G,register:Vt,handleSubmit:Mr,watch:Et,setValue:qe,getValues:dt,reset:Rl,resetField:jn,clearErrors:Rn,unregister:er,setError:Or,setFocus:(m,b={})=>{const x=T(i,m),O=x&&x._f;if(O){const P=O.refs?O.refs[0]:O.ref;P.focus&&(P.focus(),b.shouldSelect&&P.select())}},getFieldState:Tr}}function Ol(e={}){const t=Ee.useRef(),r=Ee.useRef(),[n,i]=Ee.useState({isDirty:!1,isValidating:!1,isLoading:lt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:lt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Zv(e,()=>i(s=>({...s}))),formState:n});const o=t.current.control;return o._options=e,Rv({subject:o._subjects.state,next:s=>{Lv(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Ee.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Ee.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==n.isDirty&&o._subjects.state.next({isDirty:s})}},[o,n.isDirty]),Ee.useEffect(()=>{e.values&&!At(e.values,r.current)?(o._reset(e.values,o._options.resetOptions),r.current=e.values):o._resetDefaultValues()},[e.values,o]),Ee.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Nv(n,o),t.current}var Ml=function(e,t,r){if(e&&"reportValidity"in e){var n=T(r,t);e.setCustomValidity(n&&n.message||""),e.reportValidity()}},Xv=function(e,t){var r=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Ml(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return Ml(s,i,e)})};for(var n in t.fields)r(n)},Qv=function(e,t){t.shouldUseNativeValidation&&Xv(e,t);var r={};for(var n in e){var i=T(t.fields,n),o=Object.assign(e[n]||{},{ref:i&&i.ref});if(eg(t.names||Object.keys(e),n)){var s=Object.assign({},Jv(T(r,n)));q(s,"root",o),q(r,n,s)}else q(r,n,o)}return r},Jv=function(e){return Array.isArray(e)?e.filter(Boolean):[]},eg=function(e,t){return e.some(function(r){return r.startsWith(t+".")})},tg=function(e,t){for(var r={};e.issues.length;){var n=e.issues[0];if(n.path){var i=n.path.map(function(a){return a.key}).join(".");if(r[i]||(r[i]={message:n.message,type:n.validation}),t){var o=r[i].types,s=o&&o[n.validation];r[i]=gl(i,t,r,n.validation,s?[].concat(s,n.message):n.message)}e.issues.shift()}}return r},Fl=function(e,t,r){return r===void 0&&(r={}),function(n,i,o){try{return Promise.resolve(function(s,a){try{var l=function(){function u(c){return{values:r.raw?n:c,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return r.mode==="sync"?u(fo(e,n,d)):Promise.resolve(Um(e,n,d)).then(u)}()}catch(u){return a(u)}return l&&l.then?l.then(void 0,a):l}(0,function(s){if(s instanceof Pn)return{values:{},errors:Qv(tg(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const rg=27,ng=12,ig=10,og=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},sg=yo("multiple-choice"),ag=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Fl(Zt({checked:ol(jm(Dm()),r=>Object.entries(r).filter(([n,i])=>i).map(([n,i])=>n),[Wm(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),sl(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},cg=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var u,d;const n=e.key?(u=Y.current$.value.application)==null?void 0:u.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:s}}=Ol({defaultValues:{checked:sg(n)?Object.fromEntries(n.value.map(c=>[c,!0])):{}},resolver:ag(e.config)}),a=bo(),l=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1;return g("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:c=>{l&&og(c.currentTarget)},onSubmit:o(c=>{const f=c.checked;t(f)}),children:[g("div",{class:"flex items-center gap-1",children:[g("ul",{style:{maxHeight:6.5*rg+5*ng+2*ig},class:ot("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{"justify-center":e.config.options.length===1}),children:e.config.options.map((c,f)=>{const p=`checked.${c.value}`,{ref:h,...v}=i(p);return g("li",{class:"relative",children:[g("input",{autoFocus:f===0,ref:w=>{w&&f===0&&(a.current=w),h(w)},id:p,...v,class:"peer sr-only h-full",type:"checkbox"}),g("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",htmlFor:p,children:c.label})]},c.value)})}),g("div",{class:"flex flex-col items-center gap-2",children:[!l&&g(Vn,{}),e.config.minSelected===0&&g(Tn,{type:"button",onClick:()=>t([])})]})]}),g("div",{class:"px-1",children:g(wo,{onAnimationComplete:r,error:(d=s.checked)==null?void 0:d.root})})]})},Jt={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"},lg=Ie(Jt.phone,[Km(/^\+?[0-9 -]+$/,Jt.phone)]),ug={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},dg=yo("text"),fg=e=>Fl(Zt({text:{email:Ie(Jt.email,[Hm(Jt.email)]),phone:ol(lg,t=>t.replace(/[^0-9]/g,"")),text:Ie([sl(1,Jt.empty)]),url:Ie([qm(Jt.url)])}[e.format]})),pg=({input:e,onSubmitSuccess:t,onHeightChange:r})=>{var d;const n=e.key?(d=Y.current$.value.application)==null?void 0:d.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:s}}=Ol({defaultValues:{text:dg(n)?n.value:""},resolver:fg(e.config)}),{ref:a,...l}=i("text",{required:!e.config.optional}),u=B();return Pe(()=>{u.current&&(u.current.focus(),u.current.select())},[]),g(ee,{children:g("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:o(c=>{t(c.text)}),children:[g("div",{class:"flex items-center gap-2",children:[g("div",{class:"relative min-w-0 flex-grow",children:[g("input",{id:"chat-input",...l,...ug[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:c=>{c&&(u.current=c),a(c)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&g(Tn,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),g(Vn,{})]}),g(wo,{onAnimationComplete:r,error:s.text})]})})},hg=({onSubmit:e,onInputChange:t,input:r})=>{const n=B(null),i=ae(()=>{n.current&&(uo.value=n.current.getBoundingClientRect().height)},[]);H(()=>{i(),t(r==null?void 0:r.type)},[r==null?void 0:r.type,t,i]);const o=s=>a=>e({type:s,value:a});return g(kn.div,{initial:{height:0},animate:{height:uo.value},exit:{height:0,opacity:0},class:"bg-statusbar absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:g("div",{ref:n,class:"border-divider border-t",children:Ue({application:Y,input:r,onHeightChange:i}).with({input:_e.nullish},()=>g("div",{class:"flex items-center gap-2 p-2.5",children:[g("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),g(Vn,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>g(pg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>g(cg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"boolean"}},s=>g(Av,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"file"}},s=>g(Ov,{onSubmitSuccess:o(s.input.type),...s})).exhaustive()})})},Dl=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Il=ot,Nl=(e,t)=>r=>{var n;if((t==null?void 0:t.variants)==null)return Il(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=r==null?void 0:r[u],c=o==null?void 0:o[u];if(d===null)return null;const f=Dl(d)||Dl(c);return i[u][f]}),a=r&&Object.entries(r).reduce((u,d)=>{let[c,f]=d;return f===void 0||(u[c]=f),u},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((u,d)=>{let{class:c,className:f,...p}=d;return Object.entries(p).every(h=>{let[v,w]=h;return Array.isArray(w)?w.includes({...o,...a}[v]):{...o,...a}[v]===w})?[...u,c,f]:u},[]);return Il(e,s,l,r==null?void 0:r.class,r==null?void 0:r.className)},mg=Nl("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",{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"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),vg={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},gg=({children:e,className:t,transitionState:r,side:n,...i})=>g(kn.p,{variants:vg,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":r,style:{transformOrigin:n==="left"?"0% 50%":"100% 50%"},class:mg({className:t,side:n,transitionState:r}),...i,children:e}),yg=({className:e,...t})=>g("div",{"aria-label":"Typing…",class:ot("flex gap-1 p-4",e),...t,children:Array.from({length:3},(r,n)=>g("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-n*200}ms`}}))}),bg={bot:"left",user:"right"},wg=Nl("w-full select-none py-2 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]"}}}),_g=({messages:e,isBotTyping:t})=>g("ol",{"aria-label":"Chat messages",class:"flex flex-grow flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[g(to,{initial:!1,children:e.map((r,n)=>g("li",{class:"flex",children:Ue(r).with({type:"system"},i=>g("p",{class:wg({variant:i.variant}),children:i.text})).with({type:"text",author:_e.union("bot","user")},i=>g(gg,{side:bg[i.author],children:i.text},n)).with({type:"link"},i=>g("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",children:g("a",{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 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:i.href,children:[i.text,g("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g("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"})})]})})).with({type:"image"},i=>g("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=>g(Tv,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()},n))}),g("aside",{"aria-hidden":!0,children:t&&g(yg,{})})]}),xg=25,kg=()=>{const e=B(null),[t,r]=ne(!1),[n,i]=ne(()=>()=>{}),o=oe(()=>a=>{var l;return(l=e.current)==null?void 0:l.scrollTo({top:e.current.scrollHeight,...a})},[e]),s=oe(()=>({send:async({message:a,signal:l,groupId:u})=>{if(await Ue(a).with({author:"bot",type:"text"},async d=>{if(l!=null&&l.aborted)throw new Ar;r(!0);const c=Math.min(Math.max(20,d.text.length),100)*xg;await new Promise(f=>setTimeout(f,c,{signal:l})),r(!1)}).otherwise(async()=>{}),l!=null&&l.aborted)throw new Ar;Y.addMessage(a,u)},input:async({input:a,signal:l})=>{if(l!=null&&l.aborted)throw new Ar;return Y.setInput(a),await new Promise(u=>{const d=c=>{if(l!=null&&l.aborted)throw new Ar;Y.setInput(void 0),a.key&&(Y.setSubmission,Y.setSubmission(a.key,c)),u(c)};i(()=>d)})}}),[]);return{chatRef:e,chatService:s,isBotTyping:t,onSubmitSuccessFn:n,scrollToEnd:o}},Sg=Object.freeze(Object.defineProperty({__proto__:null,JobApplicationContent:({currentApplication:e,logger:t,apiClient:r,analytics:n})=>{const{chatRef:i,chatService:o,isBotTyping:s,onSubmitSuccessFn:a,scrollToEnd:l}=kg(),u=ze.value,d=e.flow,c=e.job;return Pe(()=>{u==="maximised"&&l({behavior:"instant"})},[l,u]),H(()=>{l({behavior:"smooth"})},[e.data.messages,l]),Pe(()=>{const{state:f,application:p}=Y.current$.peek();if(f!=="loaded")throw new Error(gm.invalid_state);let h=p.data.currentNodeId;if(l({behavior:"instant"}),Y.setInput(void 0),p.data.isFinished)return;h===null?(h=cl(d.nodes).id,Y.setCurrentNodeId(h),n.log({event:"APPLY_START",attributionKey:`job_${c.id}`,properties:{job_id:c.id,flow_id:d.id}})):Y.removeLastGroupMessagesById(h);const{interpret:v,abort:w}=uv({context:{jobId:c.id,flowId:d.id},analytics:n,apiClient:r,logger:t,flow:d.nodes,chatService:o,getSubmissions:()=>{var k;return(k=Y.current$.peek().application)==null?void 0:k.data.submissions},onInterpret:(k,y)=>{const _=Y.current$.peek().application;It(_),y&&(_.data.sequence=_.data.sequence+1,n.log({event:"FLOW_NODE",attributionKey:`job_${c.id}`,properties:{flow_id:d.id,flow_version:d.version,job_id:c.id,from_node_id:y.id,to_node_id:k.id,sequence:_.data.sequence,flow_session_id:_.data.flowSessionId}})),Y.setCurrentNodeId(k.id)},onFlowEnd:async()=>{Y.markAsFinished()}});return v(h),w},[n,r,o,t,l,d,c.id,e.startedAt]),g(ee,{children:[g("div",{ref:i,className:"hide-scrollbars relative flex max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:uo.value},children:g(to,{children:g(_g,{isBotTyping:s,messages:e.data.messages})})}),g(hg,{input:e.data.currentInput,onInputChange:()=>l({behavior:"smooth"}),onSubmit:a})]})}},Symbol.toStringTag,{value:"Module"}))})();
|
|
53
|
+
}`},uv=({_internal_domManager:e=ev(),theme:t})=>ft(({apiClient:n,logger:r,analytics:i})=>{let o=!1;const s=()=>{if(typeof window>"u")return;const a=[M("style",{id:"inploi-chatbot-styles"},Jm),M("style",{id:"inploi-chatbot-theme"},lv(t))],c=e.getOrCreateChatbotElement();Ft(M(ee,{},[a,M(Vm,{apiClient:n,logger:r,analytics:i})]),c),o=!0};return{prepare:async()=>{if(!(typeof window>"u"))try{if(o)return;s(),r.info("Chatbot plugin prepared")}catch(a){console.error(a),r.error("Error preparing chatbot plugin",a)}},startApplication:async({jobId:a})=>{if(!(typeof window>"u"))try{Y.cancel(),nu(()=>{ze.value="maximised",Y.current$.value={state:"loading"}}),Qm({jobId:a,apiClient:n,logger:r}).then(async c=>{c.ok?Y.start(c.value):Y.current$.value={state:"error",error:c.error}}),o||s()}catch(c){console.error(c),r.error("Error starting application",c)}},closeApplication:async()=>{typeof window>"u"||(r.info("Closing application from an external source"),Y.cancel())}}});if(!window.inploi)throw new Error("Please insert the SDK script tag above the plugins.");window.inploi.chatbotPlugin=uv;const En=e=>Ue(e).with(_e.number.lte(1e3),()=>`${Math.round(e)}KB`).with(_e.number.lt(1e3*10),()=>`${(e/1e3).toFixed(1)}MB`).otherwise(()=>`${Math.round(e/1e3)}MB`),ul=e=>{const t=e.find(n=>n.isHead);if(!t)throw new Error("No head node found");return t},dv=e=>Object.entries(e).reduce((n,[r,i])=>(n[r]=i.value,n),{}),wo=e=>t=>t?t.type===e:!1;class Vn extends Error{constructor(){super("Aborted")}}const dl=({node:e,nodes:t,stopWhen:n})=>{if((n==null?void 0:n(e))===!0)return e;const r=e.nextId?t.find(i=>i.id===e.nextId):void 0;if(r)return dl({node:r,nodes:t,stopWhen:n})},fv=({childNode:e,nodes:t})=>{const r=t.filter(i=>i.type==="if-block").find(i=>{if(!i.branchId)return!1;const o=t.find(a=>a.id===i.branchId);if(!o)return!1;const s=dl({node:o,nodes:t,stopWhen:a=>a.id===e.id});return!(!s||s.id!==e.id)});if(r!=null&&r.nextId)return t.find(i=>i.id===r.nextId)},pv=({flow:e,analytics:t,logger:n,context:r,apiClient:i,getSubmissions:o,chatService:s,onFlowEnd:a,onInterpret:c})=>{const u=new AbortController,d=async(l,f)=>{const p=o();c==null||c(l,f);try{await hv({analytics:t,logger:n,apiClient:i,context:r,node:l,submissions:p,chat:{sendMessage:async h=>s.send({groupId:l.id,message:h,signal:u.signal}),userInput:async h=>s.input({input:h,signal:u.signal})},next:h=>{const v=h?e.find(b=>b.id===h):fv({childNode:l,nodes:e});return v?d(v,l):a==null?void 0:a(l)},end:()=>a==null?void 0:a(l)})}catch(h){if(h instanceof Vn)return;throw h}};return{interpret:async l=>{const f=e.find(p=>p.id===l)??ul(e);return d(f)},abort:()=>{u.abort()}}};async function hv(e){return await Ue(e).with({node:{type:"text"}},yv).with({node:{type:"image"}},bv).with({node:{type:"question-text"}},wv).with({node:{type:"question-enum"}},xv).with({node:{type:"question-number"}},_v).with({node:{type:"question-boolean"}},kv).with({node:{type:"question-file"}},Av).with({node:{type:"question-address"}},$v).with({node:{type:"end-flow"}},Pv).with({node:{type:"if-block"}},gv).with({node:{type:"jump"}},({node:t,next:n})=>n(t.data.targetId)).with({node:{type:"link"}},vv).with({node:{type:"integration-application-submit"}},mv).with({node:{type:"integration-workflow-get"}},()=>Error("Unreachable")).exhaustive()}async function mv({chat:e,next:t,node:n,logger:r,apiClient:i,submissions:o,context:s,analytics:a}){await e.userInput({type:"multiple-choice",key:void 0,config:{options:[{label:"Submit my application",value:"submit"}],maxSelected:1,minSelected:1}});const c=()=>{const f=typeof s.jobId=="string"?s.jobId:void 0,p=typeof s.flowId=="string"?s.flowId:void 0;Nt(f),Nt(p),f&&a.log({event:"APPLY_COMPLETE",attributionKey:`job_${f}`,properties:{job_id:f,flow_id:p}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const{anonymous_id:u,session_id:d}=a.getSessionInfo(),l=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:n.data.integrationId,anonymous_id:u,session_id:d,submissions:dv(o||{})})}).catch(f=>f);await Ue(l).with({ats_data:{redirect_url:_e.string}},async f=>{await e.sendMessage({type:"text",author:"bot",text:"Almost there! Please finalise your application on our partner’s website."});const p=new URL(f.ats_data.redirect_url);u&&!p.searchParams.has("anonymous_id")&&p.searchParams.set("anonymous_id",u),c(),await e.sendMessage({type:"link",href:p.toString(),text:"Finalise application on partner"}),t(n.nextId)}).with({success:!0},async()=>{c(),await e.sendMessage({type:"system",variant:"success",text:"Application submitted"}),t(n.nextId)}).otherwise(async f=>{r.error(f),await e.sendMessage({type:"system",variant:"error",text:"Failed to submit application"}),t(n.id)})}async function vv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({type:"link",href:n.data.href,text:At(n.data.cta,r)}),t(n.nextId)}async function gv({submissions:e,next:t,node:n}){const r=Ev(n,e)?n.branchId:n.nextId;t(r)}async function yv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.text,r)}),t(n.nextId)}async function bv({chat:e,next:t,node:n}){await e.sendMessage({author:"bot",type:"image",url:n.data.url,height:n.data.height,width:n.data.width}),t(n.nextId)}async function wv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:n.data.format}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(n.nextId)}async function _v({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"text",config:{optional:n.data.optional,placeholder:n.data.placeholder,format:"text"}});i.value===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:i.value}),t(n.nextId)}async function xv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.question,r)});const i=await e.userInput({key:n.data.key,type:"multiple-choice",config:n.data});i.value.length===0?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:n.data.options.filter(o=>i.value.includes(o.value)).map(o=>o.label).join(", ")}),t(n.nextId)}async function kv({chat:e,next:t,node:n,submissions:r}){await e.sendMessage({author:"bot",type:"text",text:At(n.data.question,r)});const o=(await e.userInput({key:n.data.key,type:"boolean",config:{optional:n.data.optional,labels:{true:n.data.trueLabel,false:n.data.falseLabel}}})).value;o===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:{true:n.data.trueLabel,false:n.data.falseLabel}[o]}),t(n.nextId)}const Sv=document.createElement("div"),fl={line1:["street_number","floor","room","premise"],line2:["subpremise","street_address","route"],line3:["sublocality","neighborhood"],city:["locality","postal_town"],state:["administrative_area_level_1"],postcode:["postal_code"],country:["country"]},Cv=Object.keys(fl);async function $v({chat:e,next:t,node:n,logger:r}){const{google:i}=window;await e.sendMessage({author:"bot",type:"text",text:n.data.question});const o=async h=>{const v=[{label:"Postcode",key:n.data.keys.postcode,optional:!1,defaultValue:h.postcode},{label:"Line 1",key:n.data.keys.line1,optional:!1,defaultValue:h.line1},{label:"Line 2",key:n.data.keys.line2,optional:!0,defaultValue:h.line2},{label:"Line 3",key:n.data.keys.line3,optional:!0,defaultValue:h.line3},{label:"City",key:n.data.keys.city,optional:!1,defaultValue:h.city},{label:"State/County/Province",key:n.data.keys.state,optional:!0,defaultValue:h.state},{label:"Country",key:n.data.keys.country,optional:!1,defaultValue:h.country}];for(const b of v){await e.sendMessage({author:"bot",type:"text",text:b.label});const{value:k}=await e.userInput({type:"text",key:b.key,config:{format:"text",optional:b.optional,defaultValue:b.defaultValue}});k===null?await e.sendMessage({type:"system",variant:"info",text:"Skipped"}):await e.sendMessage({author:"user",type:"text",text:k})}};if(!ti(window,"google")||!ti(window.google,"maps")||!ti(window.google.maps,"places"))return r.warn("Google maps not available, falling back to manual input."),r.info("If you’d like to use the address autocomplete, please insert the google maps API snippet in your website and make sure it has access to the *places* library."),await o({}),t(n.nextId);const s=new i.maps.places.AutocompleteService,a=new i.maps.places.PlacesService(Sv),{value:c}=await e.userInput({type:"text",key:"_internal-address-search",config:{format:"text",optional:!1,placeholder:"Search for your address"}});if(c===null)return t(n.id);await e.sendMessage({author:"user",type:"text",text:`Search for “${c}”`});const{predictions:u}=await s.getPlacePredictions({input:c}),{value:[d]}=await e.userInput({type:"multiple-choice",key:void 0,config:{options:u.slice(0,4).map(h=>({label:h.description,value:h.place_id})).concat({label:"None of these",value:"none"}),maxSelected:1,minSelected:1}});if(!d||d==="none")return t(n.id);const l=await new Promise((h,v)=>a.getDetails({placeId:d,fields:["address_components"]},(b,k)=>k!==i.maps.places.PlacesServiceStatus.OK?v(k):b===null?v("ZERO_RESULTS"):h({ok:!0,place:b}))).catch(async h=>(r.error("Failed to get address details",h),{ok:!1}));if(l.ok===!1)return await e.sendMessage({type:"system",variant:"error",text:"Failed to get address details"}),await o({}),t(n.id);const f=l.place.address_components,p=f?Cv.reduce((h,v)=>{const b=fl[v],k=f.filter(y=>y.types.some(_=>b.includes(_))).map(y=>y.long_name).join(", ");return k&&(h[v]=k),h},{}):{};return await e.sendMessage({author:"bot",type:"text",text:"Please confirm or adjust your address:"}),await o(p),t(n.nextId)}async function Av({node:e,chat:t,next:n,submissions:r}){await t.sendMessage({author:"bot",type:"text",text:At(e.data.question,r)});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.value===null)await t.sendMessage({type:"system",variant:"info",text:"Skipped"});else for(const o of i.value)await t.sendMessage({author:"user",type:"file",fileName:o.name,fileSizeKb:o.sizeKb});n(e.nextId)}async function Pv({chat:e,end:t,node:n}){await e.sendMessage({type:"system",variant:"info",text:n.data.systemMessage}),t()}const pl=_e.union(_e.string,_e.array(_e.string),null),Ev=(e,t)=>{const n=t==null?void 0:t[e.data.compareKey];return n?Ue({...e.data,answer:n}).with({compare:"equals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r===n.value.toString():!1).with({compare:"notEquals"},({compareValue:r})=>typeof n.value=="string"||typeof n.value=="boolean"?r!==n.value.toString():!1).with({compare:"contains",answer:{value:pl}},({compareValue:r,answer:i})=>i.value!==null&&i.value.includes(r)).with({compare:"notContains",answer:{value:pl}},({compareValue:r,answer:i})=>i.value===null||!i.value.includes(r)).with({answer:{type:"file"}},()=>!1).exhaustive():!1},At=(e,t)=>{const n=/{{\s*([^}]+?)\s*(?:\|\s*([^}]+?)\s*)?}}/g;return e.replace(n,(r,i,o="")=>{i=i.trim();const s=t==null?void 0:t[i];if(!s)return o;switch(s.type){case"boolean":return s.value==="true"?"true":"false";case"file":return s.value?s.value.map(a=>`${a.name} (${En(a.sizeKb)})`).join(", "):"no files";case"multiple-choice":return s.value.join(", ");default:return s.value||o}})},Or=({class:e,...t})=>g("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:g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"2",children:[g("title",{children:"Send"}),g("path",{d:"M3.5 7.5L8 3L12.5 7.5"}),g("path",{d:"M8 4V13"})]})}),Mr=({class:e,...t})=>g("button",{type:"button",class:ot("fr text-neutral-9 flex flex-shrink-0 items-center justify-center gap-1 rounded-full py-[6px] pl-2 pr-3 text-sm underline-offset-2 transition-all",e),...t,children:[g("svg",{class:"block",width:"16",height:"16",viewBox:"0 0 16 16",fill:"transparent",stroke:"currentColor","stroke-linecap":"round","stroke-width":"1.5",children:[g("title",{children:"Skip"}),g("path",{d:"M3.25 11.25A5 5 0 0 1 12 7"}),g("path",{d:"M13.25 4.5V8.25H9.5"})]}),"Skip"]}),_o=()=>{const e=B(null);return H(()=>{var t;(t=e.current)==null||t.focus()},[]),e},hl=["true","false"],Vv=jm(hl),Tv="answer",Ov=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{const r=_o();return n(),g("form",{noValidate:!0,class:"",onSubmit:i=>{i.preventDefault();const o=Ue(i).with({nativeEvent:{submitter:_e.select(_e.union(_e.instanceOf(HTMLButtonElement),_e.instanceOf(HTMLInputElement)))}},a=>a.value).otherwise(()=>{throw new Error("invalid form")}),s=ho(Vv,o);t(s)},children:[g("div",{class:"flex items-center gap-2 p-2.5",children:hl.map((i,o)=>g("button",{ref:o===0?r:null,type:"submit",name:Tv,value:i,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 flex-1 overflow-hidden rounded-2xl px-2.5 py-2.5 ring-2 transition-all selection:bg-transparent",children:g("p",{class:"truncate text-center text-base",children:e.config.labels[i]})}))}),e.config.optional&&g("div",{class:"pb-2",children:g(Mr,{class:"w-full",type:"button",onClick:()=>t(null)})})]})},xo=({error:e,onAnimationComplete:t})=>(Pe(()=>{e&&t()},[e,t]),e?g("div",{role:"alert",class:"text-error-11 flex max-w-full items-center gap-1 overflow-hidden rounded-full px-2 py-2",children:[g("svg",{class:"text-error-9 h-4 w-4",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[g("circle",{cx:"8",cy:"8",r:"6.3",stroke:"currentColor","stroke-width":"1.4"}),g("rect",{x:"7",y:"4",width:"2",height:"5",fill:"currentColor"}),g("rect",{x:"7",y:"10",width:"2",height:"2",fill:"currentColor"})]}),g("p",{class:"truncate pr-1 text-sm",children:e.message})]}):null),Mv=e=>new Promise((t,n)=>{const r=new FileReader;r.readAsDataURL(e),r.onload=()=>r.result?t(r.result.toString()):n("No result from reader"),r.onerror=n}),Fv=e=>e.reduce((t,n)=>t+n.sizeKb,0),Dv=wo("file"),ml=3,Iv=({file:e,class:t,...n})=>{const r=e.name.split(".").pop(),i=e.name.replace(new RegExp(`.${r}$`),"");return g("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),...n,children:[g("p",{"aria-label":"File name",class:"text-accent-12 flex flex-grow overflow-hidden",children:[g("span",{class:"block truncate",children:i}),g("span",{children:[".",r]})]}),g("p",{"aria-label":"File size",class:"text-accent-11",children:En(e.sizeKb)})]})},vl=({class:e,...t})=>g("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}),Nv=e=>{const t=e.split(".").pop();if(!t)throw new Error("No file extension found");return t?"."+t:""},Lv=({allowedExtensions:e,files:t})=>{const n=e.map(r=>r.toLowerCase());return t.every(r=>n.includes(Nv(r.name).toLowerCase()))},Rv=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=(l=Y.current$.value.application)==null?void 0:l.data.submissions[e.key],[i,o]=re(Dv(r)&&r.value!==null?r.value:[]),[s,a]=re(),c=i.length-ml,u=Fv(i),d=_o();return g("form",{class:"flex flex-col gap-1 p-2.5",onSubmit:f=>(f.preventDefault(),a(void 0),i.length===0?a({type:"required",message:"Please select a file"}):e.config.extensions.length>0&&!Lv({allowedExtensions:e.config.extensions,files:i})?a({type:"validate",message:`Please upload ${e.config.extensions.join(", ")} files only`}):e.config.fileSizeLimitKib&&u>e.config.fileSizeLimitKib?a({type:"max",message:`File size exceeds limit of ${En(e.config.fileSizeLimitKib)}`}):e.config.allowMultiple===!1&&i.length>1?a({type:"invalid",message:"Only one file is allowed"}):t(i)),children:[g("div",{class:"flex items-center gap-2",children:[g("label",{ref:d,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:[i.length>0?g(ee,{children:[g("ul",{class:"flex max-w-full flex-wrap justify-center gap-1 overflow-hidden p-1",children:[i.slice(0,ml).map(f=>{const p=f.name.split(".").pop(),h=f.name.replace(new RegExp(`.${p}$`),"");return g(vl,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:h}),g("span",{children:[".",p]})]})}),c>0?g(vl,{children:["+",c," file",c!==1?"s":""]}):null]}),g("p",{class:"text-neutral-11 text-xs",children:[En(u)," ",i.length>1?"total":""]})]}):g("div",{class:"flex flex-col justify-center gap-4 pb-6 pt-5",children:[g("header",{class:"flex flex-col items-center gap-0",children:[g("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:g("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"})}),g("p",{class:"text-neutral-12 tracking-[-0.01em]",children:[e.config.allowMultiple?"Select files":"Select a file"," to upload"]}),e.config.fileSizeLimitKib?g("p",{class:"text-neutral-10 text-xs",children:["(max ",En(e.config.fileSizeLimitKib),")"]}):null]}),g("aside",{class:"flex flex-col items-center gap-2",children:[g("p",{id:"accepted-filetypes",class:"sr-only",children:"Accepted file extensions"}),g("ul",{"aria-describedby":"accepted-filetypes",class:"flex flex-wrap justify-center gap-2",children:e.config.extensions.map(f=>g("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:f.replace(".","")}))})]})]}),g("input",{id:"dropzone-file",onInput:async f=>{Nt(f.target instanceof HTMLInputElement);const p=f.target.files?Array.from(f.target.files):[],h=await Promise.allSettled(p.map(async b=>{const k=await Mv(b);return{name:b.name,data:k,sizeKb:b.size/1e3}}));if(h.some(({status:b})=>b==="rejected"))return a({type:"invalid",message:"Invalid file"});const v=h.map(b=>b.status==="fulfilled"?b.value:null).filter(Boolean);o(v)},multiple:e.config.allowMultiple,type:"file",class:"sr-only"})]}),g("div",{class:"flex h-full flex-col items-center gap-2",children:[g(Or,{disabled:i.length===0}),e.config.optional&&g(Mr,{onClick:()=>t(null)})]})]}),s&&g(xo,{onAnimationComplete:n,error:s})]})};var Tn=e=>e.type==="checkbox",Qt=e=>e instanceof Date,ye=e=>e==null;const gl=e=>typeof e=="object";var se=e=>!ye(e)&&!Array.isArray(e)&&gl(e)&&!Qt(e),Bv=e=>se(e)&&e.target?Tn(e.target)?e.target.checked:e.target.value:e,jv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Uv=(e,t)=>e.has(jv(t)),zv=e=>{const t=e.constructor&&e.constructor.prototype;return se(t)&&t.hasOwnProperty("isPrototypeOf")},ko=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function We(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(ko&&(e instanceof Blob||e instanceof FileList))&&(n||se(e)))if(t=n?[]:{},!n&&!zv(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=We(e[r]));else return e;return t}var On=e=>Array.isArray(e)?e.filter(Boolean):[],te=e=>e===void 0,T=(e,t,n)=>{if(!t||!se(e))return n;const r=On(t.split(/[,[\].]+?/)).reduce((i,o)=>ye(i)?i:i[o],e);return te(r)||r===e?te(e[t])?n:e[t]:r},ct=e=>typeof e=="boolean";const yl={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ve={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Ke={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"};Ee.createContext(null);var Hv=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Ve.all&&(t._proxyFormState[s]=!r||Ve.all),n&&(n[s]=!0),e[s]}});return i},Ce=e=>se(e)&&!Object.keys(e).length,Wv=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return Ce(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Ve.all))},So=e=>Array.isArray(e)?e:[e];function Kv(e){const t=Ee.useRef(e);t.current=e,Ee.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}var Ne=e=>typeof e=="string",qv=(e,t,n,r,i)=>Ne(e)?(r&&t.watch.add(e),T(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),T(n,o))):(r&&(t.watchAll=!0),n),Co=e=>/^\w*$/.test(e),bl=e=>On(e.replace(/["|']|\]/g,"").split(/\.|\[/));function q(e,t,n){let r=-1;const i=Co(t)?[t]:bl(t),o=i.length,s=o-1;for(;++r<o;){const a=i[r];let c=n;if(r!==s){const u=e[a];c=se(u)||Array.isArray(u)?u:isNaN(+i[r+1])?{}:[]}e[a]=c,e=e[a]}return e}var wl=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},_l=e=>({isOnSubmit:!e||e===Ve.onSubmit,isOnBlur:e===Ve.onBlur,isOnChange:e===Ve.onChange,isOnAll:e===Ve.all,isOnTouch:e===Ve.onTouched}),xl=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Fr=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=T(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break}else se(a)&&Fr(a,t)}}};var Gv=(e,t,n)=>{const r=On(T(e,n));return q(r,"root",t[n]),q(e,n,r),e},$o=e=>e.type==="file",lt=e=>typeof e=="function",Dr=e=>{if(!ko)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Ir=e=>Ne(e),Ao=e=>e.type==="radio",Nr=e=>e instanceof RegExp;const kl={value:!1,isValid:!1},Sl={value:!0,isValid:!0};var Cl=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!te(e[0].attributes.value)?te(e[0].value)||e[0].value===""?Sl:{value:e[0].value,isValid:!0}:Sl:kl}return kl};const $l={isValid:!1,value:null};var Al=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,$l):$l;function Pl(e,t,n="validate"){if(Ir(e)||Array.isArray(e)&&e.every(Ir)||ct(e)&&!e)return{type:n,message:Ir(e)?e:"",ref:t}}var Jt=e=>se(e)&&!Nr(e)?e:{value:e,message:""},El=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:c,minLength:u,min:d,max:l,pattern:f,validate:p,name:h,valueAsNumber:v,mount:b,disabled:k}=e._f,y=T(t,h);if(!b||k)return{};const _=s?s[0]:o,C=j=>{r&&_.reportValidity&&(_.setCustomValidity(ct(j)?"":j||""),_.reportValidity())},S={},N=Ao(o),D=Tn(o),A=N||D,E=(v||$o(o))&&te(o.value)&&te(y)||Dr(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,W=wl.bind(null,h,n,S),Q=(j,L,R,U=Ke.maxLength,ne=Ke.minLength)=>{const de=j?L:R;S[h]={type:j?U:ne,message:de,ref:o,...W(j?U:ne,de)}};if(i?!Array.isArray(y)||!y.length:a&&(!A&&(E||ye(y))||ct(y)&&!y||D&&!Cl(s).isValid||N&&!Al(s).isValid)){const{value:j,message:L}=Ir(a)?{value:!!a,message:a}:Jt(a);if(j&&(S[h]={type:Ke.required,message:L,ref:_,...W(Ke.required,L)},!n))return C(L),S}if(!E&&(!ye(d)||!ye(l))){let j,L;const R=Jt(l),U=Jt(d);if(!ye(y)&&!isNaN(y)){const ne=o.valueAsNumber||y&&+y;ye(R.value)||(j=ne>R.value),ye(U.value)||(L=ne<U.value)}else{const ne=o.valueAsDate||new Date(y),de=Et=>new Date(new Date().toDateString()+" "+Et),qe=o.type=="time",ut=o.type=="week";Ne(R.value)&&y&&(j=qe?de(y)>de(R.value):ut?y>R.value:ne>new Date(R.value)),Ne(U.value)&&y&&(L=qe?de(y)<de(U.value):ut?y<U.value:ne<new Date(U.value))}if((j||L)&&(Q(!!j,R.message,U.message,Ke.max,Ke.min),!n))return C(S[h].message),S}if((c||u)&&!E&&(Ne(y)||i&&Array.isArray(y))){const j=Jt(c),L=Jt(u),R=!ye(j.value)&&y.length>+j.value,U=!ye(L.value)&&y.length<+L.value;if((R||U)&&(Q(R,j.message,L.message),!n))return C(S[h].message),S}if(f&&!E&&Ne(y)){const{value:j,message:L}=Jt(f);if(Nr(j)&&!y.match(j)&&(S[h]={type:Ke.pattern,message:L,ref:o,...W(Ke.pattern,L)},!n))return C(L),S}if(p){if(lt(p)){const j=await p(y,t),L=Pl(j,_);if(L&&(S[h]={...L,...W(Ke.validate,L.message)},!n))return C(L.message),S}else if(se(p)){let j={};for(const L in p){if(!Ce(j)&&!n)break;const R=Pl(await p[L](y,t),_,L);R&&(j={...R,...W(L,R.message)},C(R.message),n&&(S[h]=j))}if(!Ce(j)&&(S[h]={ref:_,...j},!n))return S}}return C(!0),S};function Yv(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=te(e)?r++:e[t[r++]];return e}function Zv(e){for(const t in e)if(e.hasOwnProperty(t)&&!te(e[t]))return!1;return!0}function ue(e,t){const n=Array.isArray(t)?t:Co(t)?[t]:bl(t),r=n.length===1?e:Yv(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(se(r)&&Ce(r)||Array.isArray(r)&&Zv(r))&&ue(e,n.slice(0,-1)),e}function Po(){let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}}var Lr=e=>ye(e)||!gl(e);function Pt(e,t){if(Lr(e)||Lr(t))return e===t;if(Qt(e)&&Qt(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Qt(o)&&Qt(s)||se(o)&&se(s)||Array.isArray(o)&&Array.isArray(s)?!Pt(o,s):o!==s)return!1}}return!0}var Vl=e=>e.type==="select-multiple",Xv=e=>Ao(e)||Tn(e),Eo=e=>Dr(e)&&e.isConnected,Tl=e=>{for(const t in e)if(lt(e[t]))return!0;return!1};function Rr(e,t={}){const n=Array.isArray(e);if(se(e)||n)for(const r in e)Array.isArray(e[r])||se(e[r])&&!Tl(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Rr(e[r],t[r])):ye(e[r])||(t[r]=!0);return t}function Ol(e,t,n){const r=Array.isArray(e);if(se(e)||r)for(const i in e)Array.isArray(e[i])||se(e[i])&&!Tl(e[i])?te(t)||Lr(n[i])?n[i]=Array.isArray(e[i])?Rr(e[i],[]):{...Rr(e[i])}:Ol(e[i],ye(t)?{}:t[i],n[i]):n[i]=!Pt(e[i],t[i]);return n}var Vo=(e,t)=>Ol(e,t,Rr(t)),Ml=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>te(e)?e:t?e===""?NaN:e&&+e:n&&Ne(e)?new Date(e):r?r(e):e;function To(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return $o(t)?t.files:Ao(t)?Al(e.refs).value:Vl(t)?[...t.selectedOptions].map(({value:n})=>n):Tn(t)?Cl(e.refs).value:Ml(te(t.value)?e.ref.value:t.value,e)}var Qv=(e,t,n,r)=>{const i={};for(const o of e){const s=T(t,o);s&&q(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Mn=e=>te(e)?e:Nr(e)?e.source:se(e)?Nr(e.value)?e.value.source:e.value:e,Jv=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Fl(e,t,n){const r=T(e,n);if(r||Co(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=T(t,o),a=T(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var eg=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,tg=(e,t)=>!On(T(e,t)).length&&ue(e,t);const ng={mode:Ve.onSubmit,reValidateMode:Ve.onChange,shouldFocusError:!0};function rg(e={},t){let n={...ng,...e},r={submitCount:0,isDirty:!1,isLoading:lt(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{},disabled:!1},i={},o=se(n.defaultValues)||se(n.values)?We(n.defaultValues||n.values)||{}:{},s=n.shouldUnregister?{}:We(o),a={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},u,d=0;const l={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:Po(),array:Po(),state:Po()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,h=_l(n.mode),v=_l(n.reValidateMode),b=n.criteriaMode===Ve.all,k=m=>w=>{clearTimeout(d),d=setTimeout(m,w)},y=async m=>{if(l.isValid||m){const w=n.resolver?Ce((await E()).errors):await Q(i,!0);w!==r.isValid&&f.state.next({isValid:w})}},_=m=>l.isValidating&&f.state.next({isValidating:m}),C=(m,w=[],x,O,P=!0,$=!0)=>{if(O&&x){if(a.action=!0,$&&Array.isArray(T(i,m))){const F=x(T(i,m),O.argA,O.argB);P&&q(i,m,F)}if($&&Array.isArray(T(r.errors,m))){const F=x(T(r.errors,m),O.argA,O.argB);P&&q(r.errors,m,F),tg(r.errors,m)}if(l.touchedFields&&$&&Array.isArray(T(r.touchedFields,m))){const F=x(T(r.touchedFields,m),O.argA,O.argB);P&&q(r.touchedFields,m,F)}l.dirtyFields&&(r.dirtyFields=Vo(o,s)),f.state.next({name:m,isDirty:L(m,w),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else q(s,m,w)},S=(m,w)=>{q(r.errors,m,w),f.state.next({errors:r.errors})},N=(m,w,x,O)=>{const P=T(i,m);if(P){const $=T(s,m,te(x)?T(o,m):x);te($)||O&&O.defaultChecked||w?q(s,m,w?$:To(P._f)):ne(m,$),a.mount&&y()}},D=(m,w,x,O,P)=>{let $=!1,F=!1;const Z={name:m};if(!x||O){l.isDirty&&(F=r.isDirty,r.isDirty=Z.isDirty=L(),$=F!==Z.isDirty);const ie=Pt(T(o,m),w);F=T(r.dirtyFields,m),ie?ue(r.dirtyFields,m):q(r.dirtyFields,m,!0),Z.dirtyFields=r.dirtyFields,$=$||l.dirtyFields&&F!==!ie}if(x){const ie=T(r.touchedFields,m);ie||(q(r.touchedFields,m,x),Z.touchedFields=r.touchedFields,$=$||l.touchedFields&&ie!==x)}return $&&P&&f.state.next(Z),$?Z:{}},A=(m,w,x,O)=>{const P=T(r.errors,m),$=l.isValid&&ct(w)&&r.isValid!==w;if(e.delayError&&x?(u=k(()=>S(m,x)),u(e.delayError)):(clearTimeout(d),u=null,x?q(r.errors,m,x):ue(r.errors,m)),(x?!Pt(P,x):P)||!Ce(O)||$){const F={...O,...$&&ct(w)?{isValid:w}:{},errors:r.errors,name:m};r={...r,...F},f.state.next(F)}_(!1)},E=async m=>n.resolver(s,n.context,Qv(m||c.mount,i,n.criteriaMode,n.shouldUseNativeValidation)),W=async m=>{const{errors:w}=await E(m);if(m)for(const x of m){const O=T(w,x);O?q(r.errors,x,O):ue(r.errors,x)}else r.errors=w;return w},Q=async(m,w,x={valid:!0})=>{for(const O in m){const P=m[O];if(P){const{_f:$,...F}=P;if($){const Z=c.array.has($.name),ie=await El(P,s,b,n.shouldUseNativeValidation&&!w,Z);if(ie[$.name]&&(x.valid=!1,w))break;!w&&(T(ie,$.name)?Z?Gv(r.errors,ie,$.name):q(r.errors,$.name,ie[$.name]):ue(r.errors,$.name))}F&&await Q(F,w,x)}}return x.valid},j=()=>{for(const m of c.unMount){const w=T(i,m);w&&(w._f.refs?w._f.refs.every(x=>!Eo(x)):!Eo(w._f.ref))&&tn(m)}c.unMount=new Set},L=(m,w)=>(m&&w&&q(s,m,w),!Pt(dt(),o)),R=(m,w,x)=>qv(m,c,{...a.mount?s:te(w)?o:Ne(m)?{[m]:w}:w},x,w),U=m=>On(T(a.mount?s:o,m,e.shouldUnregister?T(o,m,[]):[])),ne=(m,w,x={})=>{const O=T(i,m);let P=w;if(O){const $=O._f;$&&(!$.disabled&&q(s,m,Ml(w,$)),P=Dr($.ref)&&ye(w)?"":w,Vl($.ref)?[...$.ref.options].forEach(F=>F.selected=P.includes(F.value)):$.refs?Tn($.ref)?$.refs.length>1?$.refs.forEach(F=>(!F.defaultChecked||!F.disabled)&&(F.checked=Array.isArray(P)?!!P.find(Z=>Z===F.value):P===F.value)):$.refs[0]&&($.refs[0].checked=!!P):$.refs.forEach(F=>F.checked=F.value===P):$o($.ref)?$.ref.value="":($.ref.value=P,$.ref.type||f.values.next({name:m,values:{...s}})))}(x.shouldDirty||x.shouldTouch)&&D(m,P,x.shouldTouch,x.shouldDirty,!0),x.shouldValidate&&G(m)},de=(m,w,x)=>{for(const O in w){const P=w[O],$=`${m}.${O}`,F=T(i,$);(c.array.has(m)||!Lr(P)||F&&!F._f)&&!Qt(P)?de($,P,x):ne($,P,x)}},qe=(m,w,x={})=>{const O=T(i,m),P=c.array.has(m),$=We(w);q(s,m,$),P?(f.array.next({name:m,values:{...s}}),(l.isDirty||l.dirtyFields)&&x.shouldDirty&&f.state.next({name:m,dirtyFields:Vo(o,s),isDirty:L(m,$)})):O&&!O._f&&!ye($)?de(m,$,x):ne(m,$,x),xl(m,c)&&f.state.next({...r}),f.values.next({name:m,values:{...s}}),!a.mount&&t()},ut=async m=>{const w=m.target;let x=w.name,O=!0;const P=T(i,x),$=()=>w.type?To(P._f):Bv(m),F=Z=>{O=Number.isNaN(Z)||Z===T(s,x,Z)};if(P){let Z,ie;const zr=$(),nn=m.type===yl.BLUR||m.type===yl.FOCUS_OUT,Og=!Jv(P._f)&&!n.resolver&&!T(r.errors,x)&&!P._f.deps||eg(nn,T(r.touchedFields,x),r.isSubmitted,v,h),Oo=xl(x,c,nn);q(s,x,zr),nn?(P._f.onBlur&&P._f.onBlur(m),u&&u(0)):P._f.onChange&&P._f.onChange(m);const Mo=D(x,zr,nn,!1),Mg=!Ce(Mo)||Oo;if(!nn&&f.values.next({name:x,type:m.type,values:{...s}}),Og)return l.isValid&&y(),Mg&&f.state.next({name:x,...Oo?{}:Mo});if(!nn&&Oo&&f.state.next({...r}),_(!0),n.resolver){const{errors:zl}=await E([x]);if(F(zr),O){const Fg=Fl(r.errors,i,x),Hl=Fl(zl,i,Fg.name||x);Z=Hl.error,x=Hl.name,ie=Ce(zl)}}else Z=(await El(P,s,b,n.shouldUseNativeValidation))[x],F(zr),O&&(Z?ie=!1:l.isValid&&(ie=await Q(i,!0)));O&&(P._f.deps&&G(P._f.deps),A(x,ie,Z,Mo))}},Et=(m,w)=>{if(T(r.errors,w)&&m.focus)return m.focus(),1},G=async(m,w={})=>{let x,O;const P=So(m);if(_(!0),n.resolver){const $=await W(te(m)?m:P);x=Ce($),O=m?!P.some(F=>T($,F)):x}else m?(O=(await Promise.all(P.map(async $=>{const F=T(i,$);return await Q(F&&F._f?{[$]:F}:F)}))).every(Boolean),!(!O&&!r.isValid)&&y()):O=x=await Q(i);return f.state.next({...!Ne(m)||l.isValid&&x!==r.isValid?{}:{name:m},...n.resolver||!m?{isValid:x}:{},errors:r.errors,isValidating:!1}),w.shouldFocus&&!O&&Fr(i,Et,m?P:c.mount),O},dt=m=>{const w={...o,...a.mount?s:{}};return te(m)?w:Ne(m)?T(w,m):m.map(x=>T(w,x))},Fn=(m,w)=>({invalid:!!T((w||r).errors,m),isDirty:!!T((w||r).dirtyFields,m),isTouched:!!T((w||r).touchedFields,m),error:T((w||r).errors,m)}),Br=m=>{m&&So(m).forEach(w=>ue(r.errors,w)),f.state.next({errors:m?r.errors:{}})},Dn=(m,w,x)=>{const O=(T(i,m,{_f:{}})._f||{}).ref;q(r.errors,m,{...w,ref:O}),f.state.next({name:m,errors:r.errors,isValid:!1}),x&&x.shouldFocus&&O&&O.focus&&O.focus()},Vt=(m,w)=>lt(m)?f.values.subscribe({next:x=>m(R(void 0,w),x)}):R(m,w,!0),tn=(m,w={})=>{for(const x of m?So(m):c.mount)c.mount.delete(x),c.array.delete(x),w.keepValue||(ue(i,x),ue(s,x)),!w.keepError&&ue(r.errors,x),!w.keepDirty&&ue(r.dirtyFields,x),!w.keepTouched&&ue(r.touchedFields,x),!n.shouldUnregister&&!w.keepDefaultValue&&ue(o,x);f.values.next({values:{...s}}),f.state.next({...r,...w.keepDirty?{isDirty:L()}:{}}),!w.keepIsValid&&y()},jr=({disabled:m,name:w,field:x,fields:O,value:P})=>{if(ct(m)){const $=m?void 0:te(P)?To(x?x._f:T(O,w)._f):P;q(s,w,$),D(w,$,!1,!1,!0)}},Tt=(m,w={})=>{let x=T(i,m);const O=ct(w.disabled);return q(i,m,{...x||{},_f:{...x&&x._f?x._f:{ref:{name:m}},name:m,mount:!0,...w}}),c.mount.add(m),x?jr({field:x,disabled:w.disabled,name:m}):N(m,!0,w.value),{...O?{disabled:w.disabled}:{},...n.progressive?{required:!!w.required,min:Mn(w.min),max:Mn(w.max),minLength:Mn(w.minLength),maxLength:Mn(w.maxLength),pattern:Mn(w.pattern)}:{},name:m,onChange:ut,onBlur:ut,ref:P=>{if(P){Tt(m,w),x=T(i,m);const $=te(P.value)&&P.querySelectorAll&&P.querySelectorAll("input,select,textarea")[0]||P,F=Xv($),Z=x._f.refs||[];if(F?Z.find(ie=>ie===$):$===x._f.ref)return;q(i,m,{_f:{...x._f,...F?{refs:[...Z.filter(Eo),$,...Array.isArray(T(o,m))?[{}]:[]],ref:{type:$.type,name:m}}:{ref:$}}}),N(m,!1,void 0,$)}else x=T(i,m,{}),x._f&&(x._f.mount=!1),(n.shouldUnregister||w.shouldUnregister)&&!(Uv(c.array,m)&&a.action)&&c.unMount.add(m)}}},Ot=()=>n.shouldFocusError&&Fr(i,Et,c.mount),Ge=m=>{ct(m)&&(f.state.next({disabled:m}),Fr(i,w=>{w.disabled=m},0,!1))},In=(m,w)=>async x=>{x&&(x.preventDefault&&x.preventDefault(),x.persist&&x.persist());let O=We(s);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:P,values:$}=await E();r.errors=P,O=$}else await Q(i);ue(r.errors,"root"),Ce(r.errors)?(f.state.next({errors:{}}),await m(O,x)):(w&&await w({...r.errors},x),Ot(),setTimeout(Ot)),f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ce(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Ur=(m,w={})=>{T(i,m)&&(te(w.defaultValue)?qe(m,T(o,m)):(qe(m,w.defaultValue),q(o,m,w.defaultValue)),w.keepTouched||ue(r.touchedFields,m),w.keepDirty||(ue(r.dirtyFields,m),r.isDirty=w.defaultValue?L(m,T(o,m)):L()),w.keepError||(ue(r.errors,m),l.isValid&&y()),f.state.next({...r}))},jl=(m,w={})=>{const x=m?We(m):o,O=We(x),P=m&&!Ce(m)?O:o;if(w.keepDefaultValues||(o=x),!w.keepValues){if(w.keepDirtyValues||p)for(const $ of c.mount)T(r.dirtyFields,$)?q(P,$,T(s,$)):qe($,T(P,$));else{if(ko&&te(m))for(const $ of c.mount){const F=T(i,$);if(F&&F._f){const Z=Array.isArray(F._f.refs)?F._f.refs[0]:F._f.ref;if(Dr(Z)){const ie=Z.closest("form");if(ie){ie.reset();break}}}}i={}}s=e.shouldUnregister?w.keepDefaultValues?We(o):{}:We(P),f.array.next({values:{...P}}),f.values.next({values:{...P}})}c={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!l.isValid||!!w.keepIsValid,a.watch=!!e.shouldUnregister,f.state.next({submitCount:w.keepSubmitCount?r.submitCount:0,isDirty:w.keepDirty?r.isDirty:!!(w.keepDefaultValues&&!Pt(m,o)),isSubmitted:w.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:w.keepDirtyValues?r.dirtyFields:w.keepDefaultValues&&m?Vo(o,m):{},touchedFields:w.keepTouched?r.touchedFields:{},errors:w.keepErrors?r.errors:{},isSubmitSuccessful:w.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},Ul=(m,w)=>jl(lt(m)?m(s):m,w);return{control:{register:Tt,unregister:tn,getFieldState:Fn,handleSubmit:In,setError:Dn,_executeSchema:E,_getWatch:R,_getDirty:L,_updateValid:y,_removeUnmounted:j,_updateFieldArray:C,_updateDisabledField:jr,_getFieldArray:U,_reset:jl,_resetDefaultValues:()=>lt(n.defaultValues)&&n.defaultValues().then(m=>{Ul(m,n.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:m=>{r={...r,...m}},_disableForm:Ge,_subjects:f,_proxyFormState:l,get _fields(){return i},get _formValues(){return s},get _state(){return a},set _state(m){a=m},get _defaultValues(){return o},get _names(){return c},set _names(m){c=m},get _formState(){return r},set _formState(m){r=m},get _options(){return n},set _options(m){n={...n,...m}}},trigger:G,register:Tt,handleSubmit:In,watch:Vt,setValue:qe,getValues:dt,reset:Ul,resetField:Ur,clearErrors:Br,unregister:tn,setError:Dn,setFocus:(m,w={})=>{const x=T(i,m),O=x&&x._f;if(O){const P=O.refs?O.refs[0]:O.ref;P.focus&&(P.focus(),w.shouldSelect&&P.select())}},getFieldState:Fn}}function Dl(e={}){const t=Ee.useRef(),n=Ee.useRef(),[r,i]=Ee.useState({isDirty:!1,isValidating:!1,isLoading:lt(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},disabled:!1,defaultValues:lt(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...rg(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,Kv({subject:o._subjects.state,next:s=>{Wv(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),Ee.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),Ee.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),Ee.useEffect(()=>{e.values&&!Pt(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values):o._resetDefaultValues()},[e.values,o]),Ee.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),t.current.formState=Hv(r,o),t.current}var Il=function(e,t,n){if(e&&"reportValidity"in e){var r=T(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ig=function(e,t){var n=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Il(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return Il(s,i,e)})};for(var r in t.fields)n(r)},og=function(e,t){t.shouldUseNativeValidation&&ig(e,t);var n={};for(var r in e){var i=T(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(ag(t.names||Object.keys(e),r)){var s=Object.assign({},sg(T(n,r)));q(s,"root",o),q(n,r,s)}else q(n,r,o)}return n},sg=function(e){return Array.isArray(e)?e.filter(Boolean):[]},ag=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},cg=function(e,t){for(var n={};e.issues.length;){var r=e.issues[0];if(r.path){var i=r.path.map(function(a){return a.key}).join(".");if(n[i]||(n[i]={message:r.message,type:r.validation}),t){var o=n[i].types,s=o&&o[r.validation];n[i]=wl(i,t,n,r.validation,s?[].concat(s,r.message):r.message)}e.issues.shift()}}return n},Nl=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(s,a){try{var c=function(){function u(l){return{values:n.raw?r:l,errors:{}}}var d=Object.assign({},{abortEarly:!1,abortPipeEarly:!1},t);return n.mode==="sync"?u(ho(e,r,d)):Promise.resolve(Wm(e,r,d)).then(u)}()}catch(u){return a(u)}return c&&c.then?c.then(void 0,a):c}(0,function(s){if(s instanceof Vr)return{values:{},errors:og(cg(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const lg=27,ug=12,dg=10,fg=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},pg=wo("multiple-choice"),hg=e=>{const t={min:e.minSelected??0,max:e.maxSelected??e.options.length};return Nl(Xt({checked:al(Hm(Lm()),n=>Object.entries(n).filter(([r,i])=>i).map(([r,i])=>r),[Gm(t.max,`Please select at most ${t.max} option${t.max!==1?"s":""}`),cl(t.min,`Please select at least ${t.min} option${t.min!==1?"s":""}`)])}))},mg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var u,d;const r=e.key?(u=Y.current$.value.application)==null?void 0:u.data.submissions[e.key]:void 0,{register:i,handleSubmit:o,formState:{errors:s}}=Dl({defaultValues:{checked:pg(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:hg(e.config)}),a=_o(),c=(e.config.minSelected===1||e.config.minSelected===void 0)&&e.config.maxSelected===1;return g("form",{noValidate:!0,class:"flex flex-col gap-1 pr-2.5",onChange:l=>{c&&fg(l.currentTarget)},onSubmit:o(l=>{const f=l.checked;t(f)}),children:[g("div",{class:"flex items-center gap-1",children:[g("ul",{style:{maxHeight:6.5*lg+5*ug+2*dg},class:ot("gutter-stable flex w-full flex-1 flex-wrap gap-3 overflow-y-auto rounded-xl p-2.5 pr-4",{"justify-center":e.config.options.length===1}),children:e.config.options.map((l,f)=>{const p=`checked.${l.value}`,{ref:h,...v}=i(p);return g("li",{class:"relative",children:[g("input",{autoFocus:f===0,ref:b=>{b&&f===0&&(a.current=b),h(b)},id:p,...v,class:"peer sr-only h-full",type:"checkbox"}),g("label",{class:"bg-lowest peer-focus-visible:ring-accent-7 active:outline-neutral-10 ease-expo-out outline-divider text-neutral-11 peer-checked:outline-accent-7 peer-checked:bg-accent-2 peer-checked:text-accent-9 block rounded-2xl px-2.5 py-1 outline outline-2 ring-0 ring-transparent transition-all selection:bg-transparent peer-focus-visible:ring-4 peer-focus-visible:ring-offset-2",htmlFor:p,children:l.label})]},l.value)})}),g("div",{class:"flex flex-col items-center gap-2",children:[!c&&g(Or,{}),e.config.minSelected===0&&g(Mr,{type:"button",onClick:()=>t([])})]})]}),g("div",{class:"px-1",children:g(xo,{onAnimationComplete:n,error:(d=s.checked)==null?void 0:d.root})})]})},en={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"},vg=Ie(en.phone,[Ym(/^\+?[0-9 -]+$/,en.phone)]),gg={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},yg=wo("text"),bg=e=>Nl(Xt({text:{email:Ie(en.email,[qm(en.email)]),phone:al(vg,t=>t.replace(/[^0-9]/g,"")),text:Ie([cl(1,en.empty)]),url:Ie([Zm(en.url)])}[e.format]})),wg=({input:e,onSubmitSuccess:t,onHeightChange:n})=>{var l;const r=e.key?(l=Y.current$.value.application)==null?void 0:l.data.submissions[e.key]:void 0,i=e.config.defaultValue,{register:o,handleSubmit:s,formState:{errors:a}}=Dl({defaultValues:{text:i||(yg(r)?r.value:"")},resolver:bg(e.config)}),{ref:c,...u}=o("text",{required:!e.config.optional}),d=B();return Pe(()=>{d.current&&(d.current.focus(),d.current.select())},[]),g(ee,{children:g("form",{noValidate:!0,class:"flex flex-col gap-1 p-2.5",onSubmit:s(f=>{t(f.text)}),children:[g("div",{class:"flex items-center gap-2",children:[g("div",{class:"relative min-w-0 flex-grow",children:[g("input",{id:"chat-input",...u,...gg[e.config.format],autocomplete:"off",autoCapitalize:"off",autoCorrect:"off",autoFocus:!0,ref:f=>{f&&(d.current=f),c(f)},class:"outline-divider ease-expo-out placeholder:text-neutral-10 text-neutral-12 focus-visible:outline-accent-7 caret-accent-9 bg-lowest w-full rounded-full px-3 py-1 text-base outline outline-2 transition-all",placeholder:e.config.placeholder}),e.config.optional&&g(Mr,{class:"absolute right-0 top-0",onClick:()=>t(null)})]}),g(Or,{})]}),g(xo,{onAnimationComplete:n,error:a.text})]})})},_g=({onSubmit:e,onInputChange:t,input:n})=>{const r=B(null),i=ae(()=>{r.current&&(po.value=r.current.getBoundingClientRect().height)},[]);H(()=>{i(),t(n==null?void 0:n.type)},[n==null?void 0:n.type,t,i]);const o=s=>a=>e({type:s,value:a});return g(Cr.div,{initial:{height:0},animate:{height:po.value},exit:{height:0,opacity:0},class:"bg-statusbar absolute bottom-0 w-full overflow-hidden rounded-b-3xl backdrop-blur-md backdrop-saturate-150",children:g("div",{ref:r,class:"border-divider border-t",children:Ue({application:Y,input:n,onHeightChange:i}).with({input:_e.nullish},()=>g("div",{class:"flex items-center gap-2 p-2.5",children:[g("input",{"aria-hidden":"true",id:"chat-input",class:"outline-divider flex-grow rounded-full bg-transparent px-3 py-1 text-base outline outline-2",disabled:!0}),g(Or,{disabled:!0,"aria-hidden":"true",tabIndex:-1})]})).with({input:{type:"text"}},s=>g(wg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>g(mg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"boolean"}},s=>g(Ov,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"file"}},s=>g(Rv,{onSubmitSuccess:o(s.input.type),...s})).exhaustive()})})},Ll=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Rl=ot,Bl=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Rl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const d=n==null?void 0:n[u],l=o==null?void 0:o[u];if(d===null)return null;const f=Ll(d)||Ll(l);return i[u][f]}),a=n&&Object.entries(n).reduce((u,d)=>{let[l,f]=d;return f===void 0||(u[l]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:l,className:f,...p}=d;return Object.entries(p).every(h=>{let[v,b]=h;return Array.isArray(b)?b.includes({...o,...a}[v]):{...o,...a}[v]===b})?[...u,l,f]:u},[]);return Rl(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},xg=Bl("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",{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"},transitionState:{entering:"opacity-0 translate-y-8",entered:"opacity-100 translate-y-0",exiting:"opacity-0 scale-0",exited:""}},defaultVariants:{side:"left"}}),kg={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},Sg=({children:e,className:t,transitionState:n,side:r,...i})=>g(Cr.p,{variants:kg,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:xg({className:t,side:r,transitionState:n}),...i,children:e}),Cg=({className:e,...t})=>g("div",{"aria-label":"Typing…",class:ot("flex gap-1 p-4",e),...t,children:Array.from({length:3},(n,r)=>g("div",{class:"bg-accent-9 h-1.5 w-1.5 animate-bounce rounded-full",style:{animationDelay:`${-r*200}ms`}}))}),$g={bot:"left",user:"right"},Ag=Bl("w-full select-none py-2 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]"}}}),Pg=({messages:e,isBotTyping:t})=>g("ol",{"aria-label":"Chat messages",class:"flex flex-grow flex-col justify-end gap-2 p-2 pt-[calc(var(--header-height)+1rem)]",children:[g(ro,{initial:!1,children:e.map((n,r)=>g("li",{class:"flex",children:Ue(n).with({type:"system"},i=>g("p",{class:Ag({variant:i.variant}),children:i.text})).with({type:"text",author:_e.union("bot","user")},i=>g(Sg,{side:$g[i.author],children:i.text},r)).with({type:"link"},i=>g("div",{class:"bg-accent-3 flex w-full items-center justify-center overflow-hidden rounded-xl py-2",children:g("a",{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 flex items-center gap-1.5 truncate rounded-full py-2 pl-4 pr-2.5 no-underline ring-1 transition-all focus:outline-none focus-visible:ring-4 focus-visible:ring-offset-2",target:"_blank",href:i.href,children:[i.text,g("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:g("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"})})]})})).with({type:"image"},i=>g("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=>g(Iv,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()},r))}),g("aside",{"aria-hidden":!0,children:t&&g(Cg,{})})]}),Eg=25,Vg=()=>{const e=B(null),[t,n]=re(!1),[r,i]=re(()=>()=>{}),o=oe(()=>a=>{var c;return(c=e.current)==null?void 0:c.scrollTo({top:e.current.scrollHeight,...a})},[e]),s=oe(()=>({send:async({message:a,signal:c,groupId:u})=>{if(await Ue(a).with({author:"bot",type:"text"},async d=>{if(c!=null&&c.aborted)throw new Vn;n(!0);const l=Math.min(Math.max(20,d.text.length),100)*Eg;await new Promise(f=>setTimeout(f,l,{signal:c})),n(!1)}).otherwise(async()=>{}),c!=null&&c.aborted)throw new Vn;Y.addMessage(a,u)},input:async({input:a,signal:c})=>{if(c!=null&&c.aborted)throw new Vn;return Y.setInput(a),await new Promise(u=>{const d=l=>{if(c!=null&&c.aborted)throw new Vn;Y.setInput(void 0),a.key&&(Y.setSubmission,Y.setSubmission(a.key,l)),u(l)};i(()=>d)})}}),[]);return{chatRef:e,chatService:s,isBotTyping:t,onSubmitSuccessFn:r,scrollToEnd:o}},Tg=Object.freeze(Object.defineProperty({__proto__:null,JobApplicationContent:({currentApplication:e,logger:t,apiClient:n,analytics:r})=>{const{chatRef:i,chatService:o,isBotTyping:s,onSubmitSuccessFn:a,scrollToEnd:c}=Vg(),u=ze.value,d=e.flow,l=e.job;return Pe(()=>{u==="maximised"&&c({behavior:"instant"})},[c,u]),H(()=>{c({behavior:"smooth"})},[e.data.messages,c]),Pe(()=>{const{state:f,application:p}=Y.current$.peek();if(f!=="loaded")throw new Error(wm.invalid_state);let h=p.data.currentNodeId;if(c({behavior:"instant"}),Y.setInput(void 0),p.data.isFinished)return;h===null?(h=ul(d.nodes).id,Y.setCurrentNodeId(h),r.log({event:"APPLY_START",attributionKey:`job_${l.id}`,properties:{job_id:l.id,flow_id:d.id}})):Y.removeLastGroupMessagesById(h);const{interpret:v,abort:b}=pv({context:{jobId:l.id,flowId:d.id},analytics:r,apiClient:n,logger:t,flow:d.nodes,chatService:o,getSubmissions:()=>{var k;return(k=Y.current$.peek().application)==null?void 0:k.data.submissions},onInterpret:(k,y)=>{const _=Y.current$.peek().application;Nt(_),y&&(_.data.sequence=_.data.sequence+1,r.log({event:"FLOW_NODE",attributionKey:`job_${l.id}`,properties:{flow_id:d.id,flow_version:d.version,job_id:l.id,from_node_id:y.id,to_node_id:k.id,sequence:_.data.sequence,flow_session_id:_.data.flowSessionId}})),Y.setCurrentNodeId(k.id)},onFlowEnd:async()=>{Y.markAsFinished()}});return v(h),b},[r,n,o,t,c,d,l.id,e.startedAt]),g(ee,{children:[g("div",{ref:i,className:"hide-scrollbars relative flex max-w-full flex-grow flex-col overflow-y-scroll",style:{WebkitOverflowScrolling:"touch",paddingBottom:po.value},children:g(ro,{children:g(Pg,{isBotTyping:s,messages:e.data.messages})})}),g(_g,{input:e.data.currentInput,onInputChange:()=>c({behavior:"smooth"}),onSubmit:a})]})}},Symbol.toStringTag,{value:"Module"}))})();
|