@inploi/plugin-chatbot 3.9.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 CHANGED
@@ -1,4 +1,4 @@
1
- var Mg=Object.defineProperty;var Fg=(ft,Le,$e)=>Le in ft?Mg(ft,Le,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ft[Le]=$e;var Wl=(ft,Le,$e)=>(Fg(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,Io,pt,Do,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++||Do!==V.debounceRendering)&&((Do=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,h,p,v,b,k,y,_,C,S=0,N=r&&r.__k||Ro,I=N.length,A=I,E=t.length;for(n.__k=[],l=0;l<E;l++)(p=n.__k[l]=(p=t[l])==null||typeof p=="boolean"||typeof p=="function"?null:typeof p=="string"||typeof p=="number"||typeof p=="bigint"?rn(null,p,null,null,p):Nn(p)?rn(ee,{children:p},null,null,null):p.__b>0?rn(p.type,p.props,p.key,p.ref?p.ref:null,p.__v):p)!=null&&(p.__=n,p.__b=n.__b+1,(y=ql(p,N,k=l+S,A))===-1?h=Mt:(h=N[y]||Mt,N[y]=void 0,A--),Kr(e,p,h,i,o,s,a,c,u,d),v=p.__e,(f=p.ref)&&h.ref!=f&&(h.ref&&qr(h.ref,null,p),d.push(f,p.__c||v,p)),v!=null&&(b==null&&(b=v),C=!(_=h===Mt||h.__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 p.type!="function"||y===k&&h.__k!==p.__k?typeof p.type=="function"||C?p.__d!==void 0?(c=p.__d,p.__d=void 0):c=v.nextSibling:c=Wo(e,v,c):c=Ho(p,c,e),typeof n.type=="function"&&(n.__d=c)));for(n.__e=b,l=I;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,h,p,v,b,k,y,_,C,S,N,I,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))),h=l.props,p=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!==h&&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(h,p,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),I=0;I<l._sb.length;I++)l.__h.push(l._sb[I]);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(h,p)),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,h=t.props,p=t.type,v=0;if(p==="svg"&&(i=!0),o!=null){for(;v<o.length;v++)if((u=o[v])&&"setAttribute"in u==!!p&&(p?u.localName===p:u.nodeType===3)){e=u,o[v]=null;break}}if(e==null){if(p===null)return document.createTextNode(h);e=i?document.createElementNS("http://www.w3.org/2000/svg",p):document.createElement(p,h.is&&h),o=null,a=!1}if(p===null)f===h||a&&e.data===h||(e.data=h);else{if(o=o&&$e.call(e.childNodes),d=(f=n.props||Mt).dangerouslySetInnerHTML,l=h.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,h,f,i,a),l)t.__k=[];else if(zo(e,Nn(v=t.props.children)?v:[v],t,n,r,i&&p!=="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 h&&(v=h.value)!==void 0&&(v!==e.value||p==="progress"&&!v||p==="option"&&v!==f.value)&&Bn(e,"value",v,f.value,!1),"checked"in h&&(v=h.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,Io=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,It=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,It||t),It=0;var n=K.__H||(K.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:jn}),n.__[e]}function re(e){return It=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 h=f.__[0];f.__=f.__N,f.__N=void 0,h!==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 It=5,oe(function(){return{current:e}},[])}function os(e,t,n){It=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 It=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 Dt(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;!Io(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}}),Dt("__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)}),Dt("__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)}),Dt("__e",function(e,t,n,r){Gn(),e(t,n,r)}),Dt("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))})}}Dt("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)}),Dt("__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 Is(e){return e&&(e.base||e.nodeType===1&&e)||null}var Ds=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:Is,Component:xe,PureComponent:Yn,memo:vs,forwardRef:pe,flushSync:Zn,unstable_batchedUpdates:Ds,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:Is,flushSync:Zn,forwardRef:pe,hydrate:As,isValidElement:Xe,lazy:ii,memo:vs,render:$s,startTransition:si,unmountComponentAtNode:Fs,unstable_batchedUpdates:Ds,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:h,...p}=l,v=(f==null?void 0:f[e][c])||a,b=oe(()=>p,Object.values(p));return M(v.Provider,{value:b},h)}function d(l,f){const h=(f==null?void 0:f[e][c])||a,p=fe(h);if(p)return p;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",Iu="dismissableLayer.pointerDownOutside",Du="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),h=(n=l==null?void 0:l.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,p]=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())},h),I=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())},h);return Fu(A=>{_===d.layers.size-1&&(i==null||i(A),!A.defaultPrevented&&c&&(A.preventDefault(),c()))},h),H(()=>{if(l)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Us=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(l)),d.layers.add(l),zs(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Us)}},[l,h,r,d]),H(()=>()=>{l&&(d.layers.delete(l),d.layersWithOutsidePointerEventsDisabled.delete(l),zs())},[l,d]),H(()=>{const A=()=>p({});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,I.onFocusCapture),onBlurCapture:Bt(e.onBlurCapture,I.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(Iu,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(Du,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)),h=B({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;H(()=>{if(r){let v=function(_){if(h.paused||!a)return;const C=_.target;a.contains(C)?l.current=C:Je(l.current,{select:!0})},b=function(_){if(h.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,h.paused]),H(()=>{if(a){Gs.add(h);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(h)},0)}}},[a,u,d,h]);const p=ae(v=>{if(!n&&!r||h.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,h.paused]);return M(di.div,be({tabIndex:-1},s,{ref:f,onKeyDown:p}))});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,h=Qn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,c]),ai(()=>{if(t){const u=l=>{const h=Qn(r.current).includes(l.animationName);l.target===t&&h&&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,h=e.noIsolation,p=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:h,inert:p,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"),`
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
2
  .`.concat(Qu,` {
3
3
  overflow: hidden `).concat(r,`;
4
4
  padding-right: `).concat(a,"px ").concat(r,`;
@@ -35,10 +35,10 @@ var Mg=Object.defineProperty;var Fg=(ft,Le,$e)=>Le in ft?Mg(ft,Le,{enumerable:!0
35
35
  body {
36
36
  `).concat(Ju,": ").concat(a,`px;
37
37
  }
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 h=oa(e,a),p=h[0],v=h[1],b=h[2],k=v-b-o*p;(p||k)&&ia(e,a)&&(l+=k,f+=p),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`
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
- `)},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,I=Math.abs(_)>Math.abs(C)?"h":"v";if("touches"in v&&I==="h"&&N.type==="range")return!1;var A=ra(I,N);if(!A)return!0;if(A?S=I:(S=I==="v"?"h":"v",A=ra(I,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 h=e.removeScrollBar,p=e.inert;return M(ee,null,p?M(o,{styles:Ad(i)}):null,h?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 h=f.getAttribute(r),p=h!==null&&h!=="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&&p&&ir.set(f,!0),b===1&&f.setAttribute(n,"true"),p||f.setAttribute(r,"true")}})};return d(t),a.clear(),wi++,function(){s.forEach(function(l){var f=zt.get(l)-1,h=o.get(l)-1;zt.set(l,f),o.set(l,h),f||(ir.has(l)||l.removeAttribute(r),ir.delete(l)),h||l.removeAttribute(n)}),wi--,wi||(zt=new WeakMap,zt=new WeakMap,ir=new WeakMap,or={})}},Id=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,Dg]=Su(ua),[Dd,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(Dd,{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",[Ng,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 Id(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),h=r(a,l);if(!l&&ar){f.visualElement=qd(i,h,d,t);const p=fe(Xd),v=fe(Si).strict;f.visualElement&&(u=f.visualElement.loadFeatures(d,v,e,p))}return M(sr.Provider,{value:f},u&&f.visualElement?M(u,{visualElement:f.visualElement,...d}):null,n(i,a,Gd(h,f.visualElement,c),h,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("%"),D=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:D,borderTopWidth:D,borderRightWidth:D,borderBottomWidth:D,borderLeftWidth:D,borderRadius:D,radius:D,borderTopLeftRadius:D,borderTopRightRadius:D,borderBottomRightRadius:D,borderBottomLeftRadius:D,width:D,maxWidth:D,height:D,maxHeight:D,size:D,top:D,right:D,bottom:D,left:D,padding:D,paddingTop:D,paddingRight:D,paddingBottom:D,paddingLeft:D,margin:D,marginTop:D,marginRight:D,marginBottom:D,marginLeft:D,rotate:et,rotateX:et,rotateY:et,rotateZ:et,scale:ur,scaleX:ur,scaleY:ur,scaleZ:ur,skew:et,skewX:et,skewY:et,distance:D,translateX:D,translateY:D,translateZ:D,x:D,y:D,z:D,perspective:D,transformPerspective:D,opacity:pn,originX:Ca,originY:Ca,originZ:D,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 h=Aa[l],p=lf(f,h);if(vt.has(l)){if(c=!0,s[l]=p,!d)continue;f!==(h.default||0)&&(d=!1)}else l.startsWith("origin")?(u=!0,a[l]=p):i[l]=p}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:h=0}=a;i.transformOrigin=`${l} ${f} ${h}`}}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:D.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]=D.transform(-r);const s=D.transform(t),a=D.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:h,style:p,dimensions:v}=e;h.transform&&(v&&(p.transform=h.transform),delete h.transform),v&&(i!==void 0||o!==void 0||p.transform)&&(p.transformOrigin=bf(v,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&xf(h,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 Ii(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 Ia(e,t){const n=Ii(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 Di(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 Da(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():Da(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(h=>{const p=Di(e,h);if(!p)return;const{transitionEnd:v,transition:b,...k}=p;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 h=o[f];return l[f]=(p,v=!1,b=!1)=>(n||c(),h.schedule(p,v,b)),l},{}),cancel:l=>hr.forEach(f=>o[f].cancel(l)),state:i,steps:o}}const{schedule:me,cancel:mr,state:gn,steps:Lg}=Of(typeof requestAnimationFrame<"u"?requestAnimationFrame:he,!0),Mf={useVisualState:Na({scrapeMotionValuesFromProps:Ia,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:Ii,createRenderState:Ti})};function If(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 Df=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=>Df(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 Di(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,h=Gi(u,s),p=Math.exp(-l);return qi-f/h*p},o=u=>{const l=u*s*e,f=l*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,p=Math.exp(-l),v=Gi(Math.pow(u,2),s);return(-i(u)+qi>0?-1:1)*((f-h)*p)/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 Ip(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}=Ip(r),h=d?-tt(d):0,p=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(p<1){const _=Gi(b,p);y=C=>{const S=Math.exp(-p*b*C);return o-S*((h+p*b*v)/_*Math.sin(_*C)+v*Math.cos(_*C))}}else if(p===1)y=_=>o-Math.exp(-b*_)*(v+(h+b*v)*_);else{const _=b*Math.sqrt(p*p-1);y=C=>{const S=Math.exp(-p*b*C),N=Math.min(_*C,300);return o-S*((h+p*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=h;_!==0&&(p<1?S=xc(y,_,C):S=0);const N=Math.abs(S)<=n,I=Math.abs(o-C)<=t;s.done=N&&I}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},h=A=>a!==void 0&&A<a||c!==void 0&&A>c,p=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 I=A=>{h(f.value)&&(S=A,N=Cc({keyframes:[f.value,p(f.value)],velocity:xc(_,A,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:d}))};return I(0),{calculatedDuration:null,next:A=>{let E=!1;return!N&&S===void 0&&(E=!0,C(A),I(A)),S!==void 0&&A>S?N.next(A-S):(!E&&C(A),f)}}}const Dp=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=Dp,keyframes:r,type:i="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:a="loop",onPlay:c,onStop:u,onComplete:d,onUpdate:l,...f}){let h=1,p=!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 I="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;h>0&&(E=Math.min(E,G)),h<0&&(E=Math.min(G-L/h,E)),A!==null?R=A:R=Math.round(G-E)*h;const dt=R-t*(h>=0?1:-1),Fn=h>=0?dt<0:dt>L;R=Math.max(dt,0),I==="finished"&&A===null&&(R=L);let Br=R,In=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 Dn=!!(Ot%2);Dn&&(a==="reverse"?(Ge=1-Ge,s&&(Ge-=s/j)):a==="mirror"&&(In=N));let Ur=Wt(0,1,Ge);R>L&&(Ur=a==="reverse"&&Dn?1:0),Br=Ur*j}const Vt=Fn?{done:!1,value:r[0]}:In.next(Br);C&&(Vt.value=C(Vt.value));let{done:tn}=Vt;!Fn&&Q!==null&&(tn=h>=0?R>=L:R<=0);const jr=A===null&&(I==="finished"||I==="running"&&tn);return l&&l(Vt.value),jr&&qe(),Vt},ne=()=>{y&&y.stop(),y=void 0},de=()=>{I="idle",ne(),v(),k(),E=W=null},qe=()=>{I="finished",d&&d(),ne(),v()},ut=()=>{if(p)return;y||(y=n(U));const G=y.now();c&&c(),A!==null?E=G-A:(!E||I==="finished")&&(E=G),I==="finished"&&k(),W=E,A=null,I="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||h===0?A=G:E=y.now()-G/h},get duration(){const G=S.calculatedDuration===null?Pc(S):S.calculatedDuration;return tt(G)},get speed(){return h},set speed(G){G===h||!y||(h=G,Et.time=tt(R))},get state(){return I},play:ut,pause:()=>{I="paused",A=R},stop:()=>{p=!0,I!=="idle"&&(I="idle",u&&u(),de())},cancel:()=>{W!==null&&U(W),de()},complete:()=>{I="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:h}=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;h=void 0,d=C,l=S-xr,f="linear"}const p=tp(e.owner.current,t,d,{...i,duration:l,ease:f,times:h});i.syncStart&&(p.startTime=gn.isProcessing?gn.timestamp:document.timeline?document.timeline.currentTime:performance.now());const v=()=>p.cancel(),b=()=>{me.update(v),a(),u()};return p.onfinish=()=>{e.set(np(d,i)),r&&r(),b()},{then(y,_){return c.then(y,_)},attachTimeline(y){return p.timeline=y,p.onfinish=null,he},get time(){return tt(p.currentTime||0)},set time(y){p.currentTime=wt(y)},get speed(){return p.playbackRate},set speed(y){p.playbackRate=y},get duration(){return tt(l)},play:()=>{s||(p.play(),mr(v))},pause:()=>p.pause(),stop:()=>{if(s=!0,p.playState==="idle")return;const{currentTime:y}=p;if(y){const _=_r({...i,autoplay:!1});e.setWithVelocity(_.sample(y-xr).value,_.sample(y).value,xr)}b()},complete:()=>p.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 h={keyframes:c,velocity:t.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:p=>{t.set(p),o.onUpdate&&o.onUpdate(p)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(nh(o)||(h={...h,...Yp(e,h)}),h.duration&&(h.duration=wt(h.duration)),h.repeatDelay&&(h.repeatDelay=wt(h.repeatDelay)),!l||!f||ep.current||o.type===!1)return Hp(h);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const p=zp(t,e,h);if(p)return p}return _r(h)};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),Ic=[gt,D,Kt,et,ff,df,{test:e=>e==="auto",parse:e=>e}],xn=e=>Ic.find(Fc(e)),lh=[...Ic,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 Dc(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),h=a[l];if(!f||h===void 0||d&&vh(d,l))continue;const p={delay:n,elapsed:0,...o};if(window.HandoffAppearAnimations&&!f.hasAnimated){const b=e.getProps()[Jf];b&&(p.elapsed=window.HandoffAppearAnimations(b,l,f,me),p.syncStart=!0)}f.start(ih(l,f,h,e.shouldReduceMotion&&vt.has(l)?{type:!1}:p));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(Dc(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(Dc(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,...h}=d;c={...c,...h,...f}}return c};function o(c){t=c(e)}function s(c,u){const d=e.getProps(),l=e.getVariantContext(!0)||{},f=[],h=new Set;let p={},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 I=C===l[y]&&C!==d[y]&&S;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),_.protectedKeys={...p},!_.isActive&&N===null||!C&&!_.prevProp||cr(C)||typeof C=="boolean")continue;const A=Sh(_.prevProp,C);let E=A||y===u&&_.isActive&&!I&&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,h.delete(U),_.needsAnimating[U]=!0};for(const U in L){const ne=Q[U],de=j[U];p.hasOwnProperty(U)||(ne!==de?pr(ne)&&pr(de)?!Ka(ne,de)||A?R(U):_.protectedKeys[U]=!0:ne!==void 0?R(U):h.add(U):ne!==void 0&&h.has(U)?R(U):_.protectedKeys[U]=!0)}_.prevProp=C,_.prevResolvedValues=Q,_.isActive&&(p={...p,...Q}),r&&e.blockInitialAnimation&&(E=!1),E&&!I&&f.push(...W.map(U=>({animation:U,options:{type:y,...c}})))}if(h.size){const k={};h.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(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=s(d,c);for(const h in n)n[h].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 Ih=4;function eo(e,t,n=1){Me(n<=Ih,`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 Dh(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===D,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 h;if(pr(f)){const p=f.length,v=f[0]===null?1:0;d=f[v],l=xn(d);for(let b=v;b<p&&f[b]!==null;b++)h?Me(xn(f[b])===h,"All keyframes must be of the same type"):(h=xn(f[b]),Me(h===l||Sr(l)&&Sr(h),"Keyframes must be of the same dimension as the current value"))}else h=xn(f);if(l!==h)if(Sr(l)&&Sr(h)){const p=u.get();typeof p=="string"&&u.set(parseFloat(p)),typeof f=="string"?t[c]=parseFloat(f):Array.isArray(f)&&h===D&&(t[c]=f.map(parseFloat))}else l!=null&&l.transform&&(h!=null&&h.transform)&&(d===0||f===0)?d===0?u.set(h.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=Dh(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:h}=dn[u];f&&(s=f),d(n)&&(!this.features[u]&&l&&(this.features[u]=new l(this)),h&&(a=h))}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:h}=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:h})}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=Di(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 Ii(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 Ia(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(If);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(`
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
42
  [data-motion-pop-id="${n}"] {
43
43
  position: absolute !important;
44
44
  width: ${o}px !important;
@@ -46,8 +46,8 @@ var Mg=Object.defineProperty;var Fg=(ft,Le,$e)=>Le in ft?Mg(ft,Le,{enumerable:!0
46
46
  top: ${a}px !important;
47
47
  left: ${c}px !important;
48
48
  }
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=Da(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),h=B(new Map).current,p=B(!0);if(ki(()=>{p.current=!1,sm(u,h),f.current=d}),om(()=>{p.current=!0,h.clear(),l.clear()}),p.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=h.get(_);if(!C)return;const S=v.indexOf(_);let N=y;if(!N){const I=()=>{l.delete(_);const A=Array.from(h.keys()).filter(E=>!b.includes(E));if(A.forEach(E=>h.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:I,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)),Ie=e=>Object.assign(ve(e),{between:(t,n)=>Ie(X(e,((r,i)=>z(o=>Fe(o)&&r<=o&&i>=o))(t,n))),lt:t=>Ie(X(e,(n=>z(r=>Fe(r)&&r<n))(t))),gt:t=>Ie(X(e,(n=>z(r=>Fe(r)&&r>n))(t))),lte:t=>Ie(X(e,(n=>z(r=>Fe(r)&&r<=n))(t))),gte:t=>Ie(X(e,(n=>z(r=>Fe(r)&&r>=n))(t))),int:()=>Ie(X(e,z(t=>Fe(t)&&Number.isInteger(t)))),finite:()=>Ie(X(e,z(t=>Fe(t)&&Number.isFinite(t)))),positive:()=>Ie(X(e,z(t=>Fe(t)&&t>0))),negative:()=>Ie(X(e,z(t=>Fe(t)&&t<0)))}),mm=Ie(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(()=>Eg).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 Im(e){return typeof e.default=="function"?e.default():e.default}function Dm(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 h of l.issues)h.path?h.path.unshift(f):h.path=[f],a==null||a.push(h);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,h]of a){const p=c[f],v=h._parse(p,u);if(v.issues){const b={type:"object",input:c,key:f,value:p};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 h=c[f],p=this.rest._parse(h,u);if(p.issues){const v={type:"object",input:c,key:f,value:h};for(const b of p.issues)b.path?b.path.unshift(v):b.path=[v],d==null||d.push(b);if(d||(d=p.issues),u!=null&&u.abortEarly)break}else l[f]=p.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=Im(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 De(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[De(),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,h]of Object.entries(c))if(!zm.includes(f)){let p;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){p={type:"record",input:c,key:f,value:h};for(const k of v.issues)k.path=[p],d==null||d.push(k);if(d||(d=v.issues),u!=null&&u.abortEarly)break}const b=this.value._parse(h,u);if(b.issues){p=p||{type:"record",input:c,key:f,value:h};for(const k of b.issues)k.path?k.path.unshift(p):k.path=[p],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(De(),String),title:De()}),company:Xt({name:De(),logo:Bm(De())}),flow:Xt({id:ol(De(),String),version:Rm(),nodes:Nm(Dm())})});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,h],p)=>{const v=[p,f].filter(Boolean).join(".");return typeof h=="object"?Object.entries(h).flatMap(b=>l(b,v)):[[r.getToken("declaration",v),h]]};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 {
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
51
  ${n.concat(n).join(`
52
52
  `)}
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 h=o();c==null||c(l,f);try{await hv({analytics:t,logger:n,apiClient:i,context:r,node:l,submissions:h,chat:{sendMessage:async p=>s.send({groupId:l.id,message:p,signal:u.signal}),userInput:async p=>s.input({input:p,signal:u.signal})},next:p=>{const v=p?e.find(b=>b.id===p):fv({childNode:l,nodes:e});return v?d(v,l):a==null?void 0:a(l)},end:()=>a==null?void 0:a(l)})}catch(p){if(p instanceof Vn)return;throw p}};return{interpret:async l=>{const f=e.find(h=>h.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 d=typeof s.jobId=="string"?s.jobId:void 0,l=typeof s.flowId=="string"?s.flowId:void 0;Nt(d),Nt(l),d&&a.log({event:"APPLY_COMPLETE",attributionKey:`job_${d}`,properties:{job_id:d,flow_id:l}})};await e.sendMessage({type:"system",variant:"info",text:"Submitting your application…"});const u=await i.fetch("/flow/apply",{method:"POST",body:JSON.stringify({...s,integration_id:n.data.integrationId,anonymous_id:a.getAnonymousId(),submissions:dv(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 l=a.getAnonymousId(),f=new URL(d.ats_data.redirect_url);l&&!f.searchParams.has("anonymous_id")&&f.searchParams.set("anonymous_id",l),c(),await e.sendMessage({type:"link",href:f.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 d=>{r.error(d),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 p=>{const v=[{label:"Postcode",key:n.data.keys.postcode,optional:!1,defaultValue:p.postcode},{label:"Line 1",key:n.data.keys.line1,optional:!1,defaultValue:p.line1},{label:"Line 2",key:n.data.keys.line2,optional:!0,defaultValue:p.line2},{label:"Line 3",key:n.data.keys.line3,optional:!0,defaultValue:p.line3},{label:"City",key:n.data.keys.city,optional:!1,defaultValue:p.city},{label:"State/County/Province",key:n.data.keys.state,optional:!0,defaultValue:p.state},{label:"Country",key:n.data.keys.country,optional:!1,defaultValue:p.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(p=>({label:p.description,value:p.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((p,v)=>a.getDetails({placeId:d,fields:["address_components"]},(b,k)=>k!==i.maps.places.PlacesServiceStatus.OK?v(k):b===null?v("ZERO_RESULTS"):p({ok:!0,place:b}))).catch(async p=>(r.error("Failed to get address details",p),{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,h=f?Cv.reduce((p,v)=>{const b=fl[v],k=f.filter(y=>y.types.some(_=>b.includes(_))).map(y=>y.long_name).join(", ");return k&&(p[v]=k),p},{}):{};return await e.sendMessage({author:"bot",type:"text",text:"Please confirm or adjust your address:"}),await o(h),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),Iv=wo("file"),ml=3,Dv=({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=({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(Iv(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.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 h=f.name.split(".").pop(),p=f.name.replace(new RegExp(`.${h}$`),"");return g(vl,{class:"flex overflow-hidden",children:[g("span",{class:"block truncate",children:p}),g("span",{children:[".",h]})]})}),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 h=f.target.files?Array.from(f.target.files):[],p=await Promise.allSettled(h.map(async b=>{const k=await Mv(b);return{name:b.name,data:k,sizeKb:b.size/1e3}}));if(p.some(({status:b})=>b==="rejected"))return a({type:"invalid",message:"Invalid file"});const v=p.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),Lv=e=>se(e)&&e.target?Tn(e.target)?e.target.checked:e.target.value:e,Rv=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Bv=(e,t)=>e.has(Rv(t)),jv=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&&!jv(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 Uv=(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,zv=(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 Hv(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",Wv=(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 Kv=(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",Ir=e=>{if(!ko)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Dr=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(Dr(e)||Array.isArray(e)&&e.every(Dr)||ct(e)&&!e)return{type:n,message:Dr(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:h,name:p,valueAsNumber:v,mount:b,disabled:k}=e._f,y=T(t,p);if(!b||k)return{};const _=s?s[0]:o,C=j=>{r&&_.reportValidity&&(_.setCustomValidity(ct(j)?"":j||""),_.reportValidity())},S={},N=Ao(o),I=Tn(o),A=N||I,E=(v||$o(o))&&te(o.value)&&te(y)||Ir(o)&&o.value===""||y===""||Array.isArray(y)&&!y.length,W=wl.bind(null,p,n,S),Q=(j,L,R,U=Ke.maxLength,ne=Ke.minLength)=>{const de=j?L:R;S[p]={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||I&&!Cl(s).isValid||N&&!Al(s).isValid)){const{value:j,message:L}=Dr(a)?{value:!!a,message:a}:Jt(a);if(j&&(S[p]={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[p].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[p].message),S}if(f&&!E&&Ne(y)){const{value:j,message:L}=Jt(f);if(Nr(j)&&!y.match(j)&&(S[p]={type:Ke.pattern,message:L,ref:o,...W(Ke.pattern,L)},!n))return C(L),S}if(h){if(lt(h)){const j=await h(y,t),L=Pl(j,_);if(L&&(S[p]={...L,...W(Ke.validate,L.message)},!n))return C(L.message),S}else if(se(h)){let j={};for(const L in h){if(!Ce(j)&&!n)break;const R=Pl(await h[L](y,t),_,L);R&&(j={...R,...W(L,R.message)},C(R.message),n&&(S[p]=j))}if(!Ce(j)&&(S[p]={ref:_,...j},!n))return S}}return C(!0),S};function qv(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 Gv(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:qv(e,n),i=n.length-1,o=n[i];return r&&delete r[o],i!==0&&(se(r)&&Ce(r)||Array.isArray(r)&&Gv(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",Yv=e=>Ao(e)||Tn(e),Eo=e=>Ir(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 Zv=(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,Xv=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 Qv=(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,Jv=(e,t)=>!On(T(e,t)).length&&ue(e,t);const eg={mode:Ve.onSubmit,reValidateMode:Ve.onChange,shouldFocusError:!0};function tg(e={},t){let n={...eg,...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()},h=e.resetOptions&&e.resetOptions.keepDirtyValues,p=_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),Jv(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()}},I=(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,Zv(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?Kv(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)=>Wv(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=Ir($.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)&&I(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):Lv(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,Vg=!Xv(P._f)&&!n.resolver&&!T(r.errors,x)&&!P._f.deps||Qv(nn,T(r.touchedFields,x),r.isSubmitted,v,p),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=I(x,zr,nn,!1),Tg=!Ce(Mo)||Oo;if(!nn&&f.values.next({name:x,type:m.type,values:{...s}}),Vg)return l.isValid&&y(),Tg&&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 Og=Fl(r.errors,i,x),Hl=Fl(zl,i,Og.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:{}})},In=(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,$),I(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=Yv($),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)&&!(Bv(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))},Dn=(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||h)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(Ir(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:Dn,setError:In,_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:Dn,watch:Vt,setValue:qe,getValues:dt,reset:Ul,resetField:Ur,clearErrors:Br,unregister:tn,setError:In,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 Il(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={...tg(e,()=>i(s=>({...s}))),formState:r});const o=t.current.control;return o._options=e,Hv({subject:o._subjects.state,next:s=>{zv(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=Uv(r,o),t.current}var Dl=function(e,t,n){if(e&&"reportValidity"in e){var r=T(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},ng=function(e,t){var n=function(i){var o=t.fields[i];o&&o.ref&&"reportValidity"in o.ref?Dl(o.ref,i,e):o.refs&&o.refs.forEach(function(s){return Dl(s,i,e)})};for(var r in t.fields)n(r)},rg=function(e,t){t.shouldUseNativeValidation&&ng(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(og(t.names||Object.keys(e),r)){var s=Object.assign({},ig(T(n,r)));q(s,"root",o),q(n,r,s)}else q(n,r,o)}return n},ig=function(e){return Array.isArray(e)?e.filter(Boolean):[]},og=function(e,t){return e.some(function(n){return n.startsWith(t+".")})},sg=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:rg(sg(s,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw s}))}catch(s){return Promise.reject(s)}}};const ag=27,cg=12,lg=10,ug=e=>{const t=Object.fromEntries(new FormData(e).entries());Object.keys(t).length&&e.dispatchEvent(new Event("submit",{bubbles:!0}))},dg=wo("multiple-choice"),fg=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":""}`)])}))},pg=({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}}=Il({defaultValues:{checked:dg(r)?Object.fromEntries(r.value.map(l=>[l,!0])):{}},resolver:fg(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&&ug(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*ag+5*cg+2*lg},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 h=`checked.${l.value}`,{ref:p,...v}=i(h);return g("li",{class:"relative",children:[g("input",{autoFocus:f===0,ref:b=>{b&&f===0&&(a.current=b),p(b)},id:h,...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:h,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"},hg=De(en.phone,[Ym(/^\+?[0-9 -]+$/,en.phone)]),mg={email:{type:"email",inputMode:"email",formNoValidate:!0},phone:{type:"tel",inputMode:"tel"},text:{type:"text",inputMode:"text"},url:{type:"url",inputMode:"url",formNoValidate:!0}},vg=wo("text"),gg=e=>Nl(Xt({text:{email:De(en.email,[qm(en.email)]),phone:al(hg,t=>t.replace(/[^0-9]/g,"")),text:De([cl(1,en.empty)]),url:De([Zm(en.url)])}[e.format]})),yg=({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}}=Il({defaultValues:{text:i||(vg(r)?r.value:"")},resolver:gg(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,...mg[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})]})})},bg=({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(yg,{onSubmitSuccess:o(s.input.type),...s})).with({input:{type:"multiple-choice"}},s=>g(pg,{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(Nv,{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,...h}=d;return Object.entries(h).every(p=>{let[v,b]=p;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)},wg=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"}}),_g={hidden:{y:"100%",scale:.75},shown:{y:0,scale:1}},xg=({children:e,className:t,transitionState:n,side:r,...i})=>g(Cr.p,{variants:_g,initial:"hidden",animate:"shown",transition:{type:"spring",damping:25,stiffness:500},"data-transition":n,style:{transformOrigin:r==="left"?"0% 50%":"100% 50%"},class:wg({className:t,side:r,transitionState:n}),...i,children:e}),kg=({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`}}))}),Sg={bot:"left",user:"right"},Cg=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]"}}}),$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(ro,{initial:!1,children:e.map((n,r)=>g("li",{class:"flex",children:Ue(n).with({type:"system"},i=>g("p",{class:Cg({variant:i.variant}),children:i.text})).with({type:"text",author:_e.union("bot","user")},i=>g(xg,{side:Sg[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(Dv,{class:i.author==="bot"?"":"ml-auto",file:{name:i.fileName,sizeKb:i.fileSizeKb}})).exhaustive()},r))}),g("aside",{"aria-hidden":!0,children:t&&g(kg,{})})]}),Ag=25,Pg=()=>{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)*Ag;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}},Eg=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}=Pg(),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:h}=Y.current$.peek();if(f!=="loaded")throw new Error(wm.invalid_state);let p=h.data.currentNodeId;if(c({behavior:"instant"}),Y.setInput(void 0),h.data.isFinished)return;p===null?(p=ul(d.nodes).id,Y.setCurrentNodeId(p),r.log({event:"APPLY_START",attributionKey:`job_${l.id}`,properties:{job_id:l.id,flow_id:d.id}})):Y.removeLastGroupMessagesById(p);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(p),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($g,{isBotTyping:s,messages:e.data.messages})})}),g(bg,{input:e.data.currentInput,onInputChange:()=>c({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"}))})();