deskcord 0.4.2 → 0.4.4
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/dist/deskcord.min.js +51 -52
- package/package.json +1 -1
package/dist/deskcord.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";var Hn,ft,_c,qe,xc,Sc,Xi,Ec,Ji,Zi,Qi,Ac,Gn={},Tc=[],Tm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Br=Array.isArray;function Ce(t,e){for(var n in e)t[n]=e[n];return t}function to(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function et(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Hn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Kn(t,s,r,i,null)}function Kn(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++_c,__i:-1,__u:0};return i==null&&ft.vnode!=null&&ft.vnode(o),o}function Pc(){return{current:null}}function kt(t){return t.children}function se(t,e){this.props=t,this.context=e}function dn(t,e){if(e==null)return t.__?dn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?dn(t):null}function kc(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return kc(t)}}function eo(t){(!t.__d&&(t.__d=!0)&&qe.push(t)&&!Fr.__r++||xc!==ft.debounceRendering)&&((xc=ft.debounceRendering)||Sc)(Fr)}function Fr(){var t,e,n,r,i,o,s,a;for(qe.sort(Xi);t=qe.shift();)t.__d&&(e=qe.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=Ce({},i)).__v=i.__v+1,ft.vnode&&ft.vnode(r),no(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??dn(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Nc(s,r,a),r.__e!=o&&kc(r)),qe.length>e&&qe.sort(Xi));Fr.__r=0}function Cc(t,e,n,r,i,o,s,a,l,f,c){var h,m,y,b,w,P,x=r&&r.__k||Tc,v=e.length;for(l=Pm(n,e,x,l,v),h=0;h<v;h++)(y=n.__k[h])!=null&&(m=y.__i===-1?Gn:x[y.__i]||Gn,y.__i=h,P=no(t,y,m,i,o,s,a,l,f,c),b=y.__e,y.ref&&m.ref!=y.ref&&(m.ref&&ro(m.ref,null,y),c.push(y.ref,y.__c||b,y)),w==null&&b!=null&&(w=b),4&y.__u||m.__k===y.__k?l=Oc(y,l,t):typeof y.type=="function"&&P!==void 0?l=P:b&&(l=b.nextSibling),y.__u&=-7);return n.__e=w,l}function Pm(t,e,n,r,i){var o,s,a,l,f,c=n.length,h=c,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Kn(null,s,null,null,null):Br(s)?Kn(kt,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Kn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(f=s.__i=km(s,n,l,h))!==-1&&(h--,(a=n[f])&&(a.__u|=2)),a==null||a.__v===null?(f==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):f!=l&&(f==l-1?m--:f==l+1?m++:(f>l?m--:m++,s.__u|=4))):t.__k[o]=null;if(h)for(o=0;o<c;o++)(a=n[o])!=null&&!(2&a.__u)&&(a.__e==r&&(r=dn(a)),Mc(a,a));return r}function Oc(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Oc(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=dn(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Oe(t,e){return e=e||[],t==null||typeof t=="boolean"||(Br(t)?t.some(function(n){Oe(n,e)}):e.push(t)),e}function km(t,e,n,r){var i,o,s=t.key,a=t.type,l=e[n];if(l===null||l&&s==l.key&&a===l.type&&!(2&l.__u))return n;if(r>(l!=null&&!(2&l.__u)?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((l=e[i])&&!(2&l.__u)&&s==l.key&&a===l.type)return i;i--}if(o<e.length){if((l=e[o])&&!(2&l.__u)&&s==l.key&&a===l.type)return o;o++}}return-1}function Ic(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Tm.test(e)?n:n+"px"}function Lr(t,e,n,r,i){var o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Ic(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Ic(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ec,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Ji,t.addEventListener(e,o?Qi:Zi,o)):t.removeEventListener(e,o?Qi:Zi,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Rc(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Ji++;else if(e.t<n.u)return;return n(ft.event?ft.event(e):e)}}}function no(t,e,n,r,i,o,s,a,l,f){var c,h,m,y,b,w,P,x,v,E,N,O,j,B,F,L,Y,Z=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=ft.__b)&&c(e);t:if(typeof Z=="function")try{if(x=e.props,v="prototype"in Z&&Z.prototype.render,E=(c=Z.contextType)&&r[c.__c],N=c?E?E.props.value:c.__:r,n.__c?P=(h=e.__c=n.__c).__=h.__E:(v?e.__c=h=new Z(x,N):(e.__c=h=new se(x,N),h.constructor=Z,h.render=Om),E&&E.sub(h),h.props=x,h.state||(h.state={}),h.context=N,h.__n=r,m=h.__d=!0,h.__h=[],h._sb=[]),v&&h.__s==null&&(h.__s=h.state),v&&Z.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=Ce({},h.__s)),Ce(h.__s,Z.getDerivedStateFromProps(x,h.__s))),y=h.props,b=h.state,h.__v=e,m)v&&Z.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),v&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(v&&Z.getDerivedStateFromProps==null&&x!==y&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(x,N),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(x,h.__s,N)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(h.props=x,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(nt){nt&&(nt.__=e)}),O=0;O<h._sb.length;O++)h.__h.push(h._sb[O]);h._sb=[],h.__h.length&&s.push(h);break t}h.componentWillUpdate!=null&&h.componentWillUpdate(x,h.__s,N),v&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(y,b,w)})}if(h.context=N,h.props=x,h.__P=t,h.__e=!1,j=ft.__r,B=0,v){for(h.state=h.__s,h.__d=!1,j&&j(e),c=h.render(h.props,h.state,h.context),F=0;F<h._sb.length;F++)h.__h.push(h._sb[F]);h._sb=[]}else do h.__d=!1,j&&j(e),c=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++B<25);h.state=h.__s,h.getChildContext!=null&&(r=Ce(Ce({},r),h.getChildContext())),v&&!m&&h.getSnapshotBeforeUpdate!=null&&(w=h.getSnapshotBeforeUpdate(y,b)),a=Cc(t,Br(L=c!=null&&c.type===kt&&c.key==null?c.props.children:c)?L:[L],e,n,r,i,o,s,a,l,f),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),P&&(h.__E=h.__=null)}catch(nt){if(e.__v=null,l||o!=null)if(nt.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(Y=o.length;Y--;)to(o[Y]);else e.__e=n.__e,e.__k=n.__k;ft.__e(nt,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Cm(n.__e,e,n,r,i,o,s,l,f);return(c=ft.diffed)&&c(e),128&e.__u?void 0:a}function Nc(t,e,n){for(var r=0;r<n.length;r++)ro(n[r],n[++r],n[++r]);ft.__c&&ft.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ft.__e(o,i.__v)}})}function Cm(t,e,n,r,i,o,s,a,l){var f,c,h,m,y,b,w,P=n.props,x=e.props,v=e.type;if(v=="svg"?i="http://www.w3.org/2000/svg":v=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(f=0;f<o.length;f++)if((y=o[f])&&"setAttribute"in y==!!v&&(v?y.localName==v:y.nodeType==3)){t=y,o[f]=null;break}}if(t==null){if(v==null)return document.createTextNode(x);t=document.createElementNS(i,v,x.is&&x),a&&(ft.__m&&ft.__m(e,o),a=!1),o=null}if(v===null)P===x||a&&t.data===x||(t.data=x);else{if(o=o&&Hn.call(t.childNodes),P=n.props||Gn,!a&&o!=null)for(P={},f=0;f<t.attributes.length;f++)P[(y=t.attributes[f]).name]=y.value;for(f in P)if(y=P[f],f!="children"){if(f=="dangerouslySetInnerHTML")h=y;else if(!(f in x)){if(f=="value"&&"defaultValue"in x||f=="checked"&&"defaultChecked"in x)continue;Lr(t,f,null,y,i)}}for(f in x)y=x[f],f=="children"?m=y:f=="dangerouslySetInnerHTML"?c=y:f=="value"?b=y:f=="checked"?w=y:a&&typeof y!="function"||P[f]===y||Lr(t,f,y,P[f],i);if(c)a||h&&(c.__html===h.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(h&&(t.innerHTML=""),Cc(t,Br(m)?m:[m],e,n,r,v=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&dn(n,0),a,l),o!=null)for(f=o.length;f--;)to(o[f]);a||(f="value",v=="progress"&&b==null?t.removeAttribute("value"):b!==void 0&&(b!==t[f]||v=="progress"&&!b||v=="option"&&b!==P[f])&&Lr(t,f,b,P[f],i),f="checked",w!==void 0&&w!==t[f]&&Lr(t,f,w,P[f],i))}return t}function ro(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){ft.__e(i,n)}}function Mc(t,e,n){var r,i;if(ft.unmount&&ft.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||ro(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ft.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Mc(r[i],e,n||typeof t.type!="function");n||to(t.__e),t.__c=t.__=t.__e=void 0}function Om(t,e,n){return this.constructor(t,n)}function Yn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ft.__&&ft.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],no(e,t=(!r&&n||e).__k=et(kt,null,[t]),i||Gn,Gn,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Hn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Nc(o,t,s)}function Dc(t,e){Yn(t,e,Dc)}function Im(t,e,n){var r,i,o,s,a=Ce({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!==void 0?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?Hn.call(arguments,2):n),Kn(t.type,a,r||t.key,i||t.ref,null)}function te(t,e){var n={__c:e="__cC"+Ac++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=new Set,(o={})[e]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.forEach(function(a){a.__e=!0,eo(a)})},this.sub=function(s){i.add(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.delete(s),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Hn=Tc.slice,ft={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},_c=0,se.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Ce({},this.state),typeof t=="function"&&(t=t(Ce({},n),this.props)),t&&Ce(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),eo(this))},se.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),eo(this))},se.prototype.render=kt,qe=[],Sc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xi=function(t,e){return t.__v.__b-e.__v.__b},Fr.__r=0,Ec=/(PointerCapture)$|Capture$/i,Ji=0,Zi=Rc(!1),Qi=Rc(!0),Ac=0;var Rm=0;function k(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var f={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Rm,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return ft.vnode&&ft.vnode(f),f}var Ie,At,io,Bc,hn=0,Fc=[],Rt=ft,Lc=Rt.__b,jc=Rt.__r,$c=Rt.diffed,Vc=Rt.__c,Uc=Rt.unmount,zc=Rt.__;function He(t,e){Rt.__h&&Rt.__h(At,t,hn||e),hn=0;var n=At.__H||(At.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function gt(t){return hn=1,Xn(qc,t)}function Xn(t,e,n){var r=He(Ie++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):qc(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],f=r.t(l,a);l!==f&&(r.__N=[f,r.__[1]],r.__c.setState({}))}],r.__c=At,!At.u)){var i=function(a,l,f){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(m){return!!m.__c});if(c.every(function(m){return!m.__N}))return!o||o.call(this,a,l,f);var h=r.__c.props!==a;return c.forEach(function(m){if(m.__N){var y=m.__[0];m.__=m.__N,m.__N=void 0,y!==m.__[0]&&(h=!0)}}),o&&o.call(this,a,l,f)||h};At.u=!0;var o=At.shouldComponentUpdate,s=At.componentWillUpdate;At.componentWillUpdate=function(a,l,f){if(this.__e){var c=o;o=void 0,i(a,l,f),o=c}s&&s.call(this,a,l,f)},At.shouldComponentUpdate=i}return r.__N||r.__}function ut(t,e){var n=He(Ie++,3);!Rt.__s&&ao(n.__H,e)&&(n.__=t,n.i=e,At.__H.__h.push(n))}function Re(t,e){var n=He(Ie++,4);!Rt.__s&&ao(n.__H,e)&&(n.__=t,n.i=e,At.__h.push(n))}function it(t){return hn=5,Ht(function(){return{current:t}},[])}function Jn(t,e,n){hn=6,Re(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function Ht(t,e){var n=He(Ie++,7);return ao(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Ct(t,e){return hn=8,Ht(function(){return t},e)}function Ft(t){var e=At.context[t.__c],n=He(Ie++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(At)),e.props.value):t.__}function oo(t,e){Rt.useDebugValue&&Rt.useDebugValue(e?e(t):t)}function Nm(t){var e=He(Ie++,10),n=gt();return e.__=t,At.componentDidCatch||(At.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function pn(){var t=He(Ie++,11);if(!t.__){for(var e=At.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Mm(){for(var t;t=Fc.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(jr),t.__H.__h.forEach(so),t.__H.__h=[]}catch(e){t.__H.__h=[],Rt.__e(e,t.__v)}}Rt.__b=function(t){At=null,Lc&&Lc(t)},Rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),zc&&zc(t,e)},Rt.__r=function(t){jc&&jc(t),Ie=0;var e=(At=t.__c).__H;e&&(io===At?(e.__h=[],At.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(jr),e.__h.forEach(so),e.__h=[],Ie=0)),io=At},Rt.diffed=function(t){$c&&$c(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Fc.push(e)!==1&&Bc===Rt.requestAnimationFrame||((Bc=Rt.requestAnimationFrame)||Dm)(Mm)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),io=At=null},Rt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(jr),n.__h=n.__h.filter(function(r){return!r.__||so(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Rt.__e(r,n.__v)}}),Vc&&Vc(t,e)},Rt.unmount=function(t){Uc&&Uc(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{jr(r)}catch(i){e=i}}),n.__H=void 0,e&&Rt.__e(e,n.__v))};var Wc=typeof requestAnimationFrame=="function";function Dm(t){var e,n=function(){clearTimeout(r),Wc&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Wc&&(e=requestAnimationFrame(n))}function jr(t){var e=At,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),At=e}function so(t){var e=At;t.__c=t.__(),At=e}function ao(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function qc(t,e){return typeof e=="function"?e(t):e}function Hc(t,e){for(var n in e)t[n]=e[n];return t}function co(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function lo(t,e){var n=e(),r=gt({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Re(function(){i.__=n,i.u=e,uo(i)&&o({t:i})},[t,n,e]),ut(function(){return uo(i)&&o({t:i}),t(function(){uo(i)&&o({t:i})})},[t]),n}function uo(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function fo(t){t()}function ho(t){return t}function po(){return[!1,fo]}var Zn=Re;function $r(t,e){this.props=t,this.context=e}function Gc(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:co(this.props,i)}function r(i){return this.shouldComponentUpdate=n,et(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}($r.prototype=new se).isPureReactComponent=!0,$r.prototype.shouldComponentUpdate=function(t,e){return co(this.props,t)||co(this.state,e)};var Kc=ft.__b;ft.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Kc&&Kc(t)};var Bm=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function $e(t){function e(n){var r=Hc({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Bm,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Yc=function(t,e){return t==null?null:Oe(Oe(t).map(e))},mo={map:Yc,forEach:Yc,count:function(t){return t?Oe(t).length:0},only:function(t){var e=Oe(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Oe},Fm=ft.__e;ft.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}Fm(t,e,n,r)};var Xc=ft.unmount;function Jc(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=Hc({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return Jc(r,e,n)})),t}function Zc(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Zc(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Qn(){this.__u=0,this.o=null,this.__b=null}function Qc(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function tl(t){var e,n,r;function i(o){if(e||(e=t()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw e;return et(n,o)}return i.displayName="Lazy",i.__f=!0,i}function mn(){this.i=null,this.l=null}ft.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Xc&&Xc(t)},(Qn.prototype=new se).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Qc(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 l=r.state.__a;r.__v.__k[0]=Zc(l,l.__c.__P,l.__c.__O)}var f;for(r.setState({__a:r.__b=null});f=r.o.pop();)f.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Qn.prototype.componentWillUnmount=function(){this.o=[]},Qn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Jc(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&et(kt,null,t.fallback);return i&&(i.__u&=-33),[et(kt,null,e.__a?null:t.children),i]};var el=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Lm(t){return this.getChildContext=function(){return t.context},t.children}function jm(t){var e=this,n=t.h;e.componentWillUnmount=function(){Yn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),e.v||(e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),e.h.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.h.insertBefore(r,i)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}),Yn(et(Lm,{context:e.context},t.__v),e.v)}function yo(t,e){var n=et(jm,{__v:t,h:e});return n.containerInfo=e,n}(mn.prototype=new se).__a=function(t){var e=this,n=Qc(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),el(e,t,r)):i()};n?n(o):o()}},mn.prototype.render=function(t){this.i=null,this.l=new Map;var e=Oe(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},mn.prototype.componentDidUpdate=mn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){el(t,n,e)})};var nl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,$m=/^(?: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]/,Vm=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Um=/[A-Z0-9]/g,zm=typeof document<"u",Wm=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function rl(t,e,n){return e.__k==null&&(e.textContent=""),Yn(t,e),typeof n=="function"&&n(),t?t.__c:null}function il(t,e,n){return Dc(t,e),typeof n=="function"&&n(),t?t.__c:null}se.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(se.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var ol=ft.event;function qm(){}function Hm(){return this.cancelBubble}function Gm(){return this.defaultPrevented}ft.event=function(t){return ol&&(t=ol(t)),t.persist=qm,t.isPropagationStopped=Hm,t.isDefaultPrevented=Gm,t.nativeEvent=t};var go,Km={enumerable:!1,configurable:!0,get:function(){return this.class}},sl=ft.vnode;ft.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||zm&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||Wm(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":Vm.test(s)&&(s=l):l=s="oninput":o&&$m.test(s)?s=s.replace(Um,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Oe(n.children).forEach(function(f){f.props.selected=i.value.indexOf(f.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Oe(n.children).forEach(function(f){f.props.selected=i.multiple?i.defaultValue.indexOf(f.props.value)!=-1:i.defaultValue==f.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Km)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=nl,sl&&sl(t)};var al=ft.__r;ft.__r=function(t){al&&al(t),go=t.__c};var cl=ft.diffed;ft.diffed=function(t){cl&&cl(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),go=null};var ll={ReactCurrentDispatcher:{current:{readContext:function(t){return go.__n[t.__c].props.value},useCallback:Ct,useContext:Ft,useDebugValue:oo,useDeferredValue:ho,useEffect:ut,useId:pn,useImperativeHandle:Jn,useInsertionEffect:Zn,useLayoutEffect:Re,useMemo:Ht,useReducer:Xn,useRef:it,useState:gt,useSyncExternalStore:lo,useTransition:po}}},ul="18.3.1";function fl(t){return et.bind(null,t)}function yn(t){return!!t&&t.$$typeof===nl}function dl(t){return yn(t)&&t.type===kt}function hl(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function vo(t){return yn(t)?Im.apply(null,arguments):t}function pl(t){return!!t.__k&&(Yn(null,t),!0)}function ml(t){return t&&(t.base||t.nodeType===1&&t)||null}var yl=function(t,e){return t(e)},gl=function(t,e){return t(e)},vl=kt,wl=yn,gn={useState:gt,useId:pn,useReducer:Xn,useEffect:ut,useLayoutEffect:Re,useInsertionEffect:Zn,useTransition:po,useDeferredValue:ho,useSyncExternalStore:lo,startTransition:fo,useRef:it,useImperativeHandle:Jn,useMemo:Ht,useCallback:Ct,useContext:Ft,useDebugValue:oo,version:"18.3.1",Children:mo,render:rl,hydrate:il,unmountComponentAtNode:pl,createPortal:yo,createElement:et,createContext:te,createFactory:fl,cloneElement:vo,createRef:Pc,Fragment:kt,isValidElement:yn,isElement:wl,isFragment:dl,isMemo:hl,findDOMNode:ml,Component:se,PureComponent:$r,memo:Gc,forwardRef:$e,flushSync:gl,unstable_batchedUpdates:yl,StrictMode:vl,Suspense:Qn,SuspenseList:mn,lazy:tl,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ll};const Ym=Object.freeze(Object.defineProperty({__proto__:null,Children:mo,Component:se,Fragment:kt,PureComponent:$r,StrictMode:vl,Suspense:Qn,SuspenseList:mn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ll,cloneElement:vo,createContext:te,createElement:et,createFactory:fl,createPortal:yo,createRef:Pc,default:gn,findDOMNode:ml,flushSync:gl,forwardRef:$e,hydrate:il,isElement:wl,isFragment:dl,isMemo:hl,isValidElement:yn,lazy:tl,memo:Gc,render:rl,startTransition:fo,unmountComponentAtNode:pl,unstable_batchedUpdates:yl,useCallback:Ct,useContext:Ft,useDebugValue:oo,useDeferredValue:ho,useEffect:ut,useErrorBoundary:Nm,useId:pn,useImperativeHandle:Jn,useInsertionEffect:Zn,useLayoutEffect:Re,useMemo:Ht,useReducer:Xn,useRef:it,useState:gt,useSyncExternalStore:lo,useTransition:po,version:ul},Symbol.toStringTag,{value:"Module"})),Xm='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,*:before,*:after{border-color:hsl(var(--border))}#deskcord-shadow-container{color:hsl(var(--foreground));font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}*,:before,: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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.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}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-x-px{left:1px;right:1px}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.bottom-px{bottom:1px}.end-0{inset-inline-end:0px}.left-0{left:0}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.top-0{top:0}.top-1{top:.25rem}.top-full{top:100%}.z-20{z-index:20}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-\\[3px\\]{margin-top:3px;margin-bottom:3px}.\\!me-1{margin-inline-end:.25rem!important}.\\!me-1\\.5{margin-inline-end:.375rem!important}.\\!ms-auto{margin-inline-start:auto!important}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.me-11{margin-inline-end:2.75rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.ms-0\\.5{margin-inline-start:.125rem}.ms-2{margin-inline-start:.5rem}.ms-auto{margin-inline-start:auto}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-\\[32px\\]{width:32px;height:32px}.\\!h-2\\.5{height:.625rem!important}.h-1{height:.25rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-32{height:8rem}.h-8{height:2rem}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[200px\\]{max-height:200px}.\\!w-2\\.5{width:.625rem!important}.w-1{width:.25rem}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-32{width:8rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[40px\\]{width:40px}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[300px\\]{max-width:300px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.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 slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.animate-slide-in{animation:slide-in .2s ease-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.\\!justify-between{justify-content:space-between!important}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-\\[3px\\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3px * var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.self-center{align-self:center}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-scroll{overflow-y:scroll}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.\\!rounded-sm{border-radius:calc(var(--radius) - 4px)!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-b-md{border-bottom-right-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.\\!border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity))!important}.border-current{border-color:currentColor}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity: 1;border-top-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\\!bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.bg-\\[\\#7289DA\\]{--tw-bg-opacity: 1;background-color:rgb(114 137 218 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-teal-400{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.fill-black{fill:#000}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.\\!py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pb-12{padding-bottom:3rem}.pr-3{padding-right:.75rem}.ps-11{padding-inline-start:2.75rem}.ps-3\\.5{padding-inline-start:.875rem}.text-center{text-align:center}.text-end{text-align:end}.align-bottom{vertical-align:bottom}.\\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[12px\\]{font-size:12px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg\\/5{font-size:1.125rem;line-height:1.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-sm\\/3{font-size:.875rem;line-height:.75rem}.text-xs,.text-xs\\/4{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.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)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--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(3px + 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)}.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)}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.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)}.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)}.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)}.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}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-500{animation-duration:.5s}.running{animation-play-state:running}:host,#deskcord-shadow-container{--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark,:host(.dark) #deskcord-shadow-container{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;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))}.hover\\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-\\[\\#5B6EAB\\]:hover{--tw-bg-opacity: 1;background-color:rgb(91 110 171 / var(--tw-bg-opacity))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:z-10:focus{z-index:10}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--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)}.focus\\:ring-\\[\\#7289DA\\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(114 137 218 / var(--tw-ring-opacity))}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;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))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:transform-none:disabled{transform:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.disabled\\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}.selected .hs-combo-box-selected\\:block,.selected.hs-combo-box-selected\\:block{display:block}.complete .hs-file-upload-complete\\:bg-green-600,.complete.hs-file-upload-complete\\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.dark\\:\\!border-neutral-700:is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(64 64 64 / var(--tw-border-opacity))!important}.dark\\:border-neutral-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity))}.dark\\:border-neutral-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\\:\\!bg-neutral-800:is(.dark *){--tw-bg-opacity: 1 !important;background-color:rgb(38 38 38 / var(--tw-bg-opacity))!important}.dark\\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\\:bg-neutral-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\\:fill-neutral-200:is(.dark *){fill:#e5e5e5}.dark\\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:text-neutral-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-500:is(.dark *){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:ring-neutral-900:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(23 23 23 / var(--tw-ring-opacity))}.dark\\:hover\\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:hover\\:text-neutral-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}',Jm=".yarl__fullsize{height:100%;width:100%}.yarl__relative{position:relative}.yarl__portal{bottom:0;left:0;opacity:0;overflow:hidden;position:fixed;right:0;top:0;transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);z-index:var(--yarl__portal_zindex,9999)}.yarl__portal_open{opacity:1}.yarl__container{background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));bottom:0;left:0;outline:none;overflow:hidden;overscroll-behavior:var(--yarl__controller_overscroll_behavior,contain);position:absolute;right:0;top:0;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yarl__carousel{align-content:center;align-items:stretch;display:flex;flex:0 0 auto;height:100%;justify-content:center;opacity:var(--yarl__pull_opacity,1);transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_offset,0));width:calc(100% + (var(--yarl__carousel_slides_count) - 1)*(100% + var(--yarl__carousel_spacing_px, 0)*1px + var(--yarl__carousel_spacing_percent, 0)*1%))}.yarl__carousel_with_slides{-moz-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%)}.yarl__flex_center{align-content:center;align-items:center;display:flex;justify-content:center}.yarl__slide{flex:1;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_padding_percent, 0)*1%);position:relative}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-moz-user-select:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.yarl__slide_image_cover{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yarl__slide_image_loading{opacity:0}@media screen and (min-width:800px){.yarl__slide_wrapper:not(.yarl__slide_wrapper_interactive) .yarl__slide_image{-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);-webkit-transform-style:preserve-3d}}.yarl__slide_placeholder{left:50%;line-height:0;position:absolute;top:50%;transform:translate(-50%) translateY(-50%)}.yarl__slide_loading{animation:yarl__delayed_fadein 1s linear;color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)))}.yarl__slide_loading line{animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){animation-delay:-1s}.yarl__slide_error{color:var(--yarl__slide_icon_error_color,red);height:var(--yarl__slide_icon_error_size,48px);width:var(--yarl__slide_icon_error_size,48px)}@media (prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{animation:unset}}.yarl__toolbar{bottom:auto;display:flex;justify-content:flex-end;left:auto;padding:var(--yarl__toolbar_padding,8px);position:absolute;right:0;top:0}[dir=rtl] .yarl__toolbar{bottom:auto;left:0;right:auto;top:0}.yarl__icon{height:var(--yarl__icon_size,32px);width:var(--yarl__icon_size,32px)}.yarl__button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);color:var(--yarl__color_button,hsla(0,0%,100%,.8));cursor:pointer;filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));line-height:0;margin:var(--yarl__button_margin,0);outline:none;padding:var(--yarl__button_padding,8px);-webkit-tap-highlight-color:transparent}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media (hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{padding:var(--yarl__navigation_button_padding,24px 16px);position:absolute;top:50%;transform:translateY(-50%)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}",wo=te({});function bo(t){const e=it(null);return e.current===null&&(e.current=t()),e.current}const _o=typeof window<"u",bl=_o?Re:ut,Vr=te(null);function xo(t,e){t.indexOf(e)===-1&&t.push(e)}function So(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Ne=(t,e,n)=>n>e?e:n<t?t:n;let Ur=()=>{};const Me={},_l=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function xl(t){return typeof t=="object"&&t!==null}const Sl=t=>/^0[^.\s]+$/u.test(t);function Eo(t){let e;return()=>(e===void 0&&(e=t()),e)}const ue=t=>t,Zm=(t,e)=>n=>e(t(n)),tr=(...t)=>t.reduce(Zm),er=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Ao{constructor(){this.subscriptions=[]}add(e){return xo(this.subscriptions,e),()=>So(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const be=t=>t*1e3,_e=t=>t/1e3;function El(t,e){return e?t*(1e3/e):0}const Al=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Qm=1e-7,ty=12;function ey(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=Al(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>Qm&&++a<ty);return s}function nr(t,e,n,r){if(t===e&&n===r)return ue;const i=o=>ey(o,0,1,t,n);return o=>o===0||o===1?o:Al(i(o),e,r)}const Tl=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Pl=t=>e=>1-t(1-e),kl=nr(.33,1.53,.69,.99),To=Pl(kl),Cl=Tl(To),Ol=t=>(t*=2)<1?.5*To(t):.5*(2-Math.pow(2,-10*(t-1))),Po=t=>1-Math.sin(Math.acos(t)),Il=Pl(Po),Rl=Tl(Po),ny=nr(.42,0,1,1),ry=nr(0,0,.58,1),Nl=nr(.42,0,.58,1),iy=t=>Array.isArray(t)&&typeof t[0]!="number",Ml=t=>Array.isArray(t)&&typeof t[0]=="number",Dl={linear:ue,easeIn:ny,easeInOut:Nl,easeOut:ry,circIn:Po,circInOut:Rl,circOut:Il,backIn:To,backInOut:Cl,backOut:kl,anticipate:Ol},oy=t=>typeof t=="string",Bl=t=>{if(Ml(t)){Ur(t.length===4);const[e,n,r,i]=t;return nr(e,n,r,i)}else if(oy(t))return Ur(Dl[t]!==void 0),Dl[t];return t},zr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Fl={value:null,addProjectionMetrics:null};function sy(t,e){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function f(h){s.has(h)&&(c.schedule(h),t()),l++,h(a)}const c={schedule:(h,m=!1,y=!1)=>{const w=y&&i?n:r;return m&&s.add(h),w.has(h)||w.add(h),h},cancel:h=>{r.delete(h),s.delete(h)},process:h=>{if(a=h,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(f),e&&Fl.value&&Fl.value.frameloop[e].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(h))}};return c}const ay=40;function Ll(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=zr.reduce((E,N)=>(E[N]=sy(o,e?N:void 0),E),{}),{setup:a,read:l,resolveKeyframes:f,preUpdate:c,update:h,preRender:m,render:y,postRender:b}=s,w=()=>{const E=Me.useManualTiming?i.timestamp:performance.now();n=!1,Me.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,ay),1)),i.timestamp=E,i.isProcessing=!0,a.process(i),l.process(i),f.process(i),c.process(i),h.process(i),m.process(i),y.process(i),b.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(w))},P=()=>{n=!0,r=!0,i.isProcessing||t(w)};return{schedule:zr.reduce((E,N)=>{const O=s[N];return E[N]=(j,B=!1,F=!1)=>(n||P(),O.schedule(j,B,F)),E},{}),cancel:E=>{for(let N=0;N<zr.length;N++)s[zr[N]].cancel(E)},state:i,steps:s}}const{schedule:Ot,cancel:Ve,state:Xt,steps:ko}=Ll(typeof requestAnimationFrame<"u"?requestAnimationFrame:ue,!0);let Wr;function cy(){Wr=void 0}const ie={now:()=>(Wr===void 0&&ie.set(Xt.isProcessing||Me.useManualTiming?Xt.timestamp:performance.now()),Wr),set:t=>{Wr=t,queueMicrotask(cy)}},jl=t=>e=>typeof e=="string"&&e.startsWith(t),Co=jl("--"),ly=jl("var(--"),Oo=t=>ly(t)?uy.test(t.split("/*")[0].trim()):!1,uy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vn={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},rr={...vn,transform:t=>Ne(0,1,t)},qr={...vn,default:1},ir=t=>Math.round(t*1e5)/1e5,Io=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function fy(t){return t==null}const dy=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ro=(t,e)=>n=>!!(typeof n=="string"&&dy.test(n)&&n.startsWith(t)||e&&!fy(n)&&Object.prototype.hasOwnProperty.call(n,e)),$l=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Io);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},hy=t=>Ne(0,255,t),No={...vn,transform:t=>Math.round(hy(t))},Ge={test:Ro("rgb","red"),parse:$l("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+No.transform(t)+", "+No.transform(e)+", "+No.transform(n)+", "+ir(rr.transform(r))+")"};function py(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Mo={test:Ro("#"),parse:py,transform:Ge.transform},or=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ue=or("deg"),xe=or("%"),ot=or("px"),my=or("vh"),yy=or("vw"),Vl={...xe,parse:t=>xe.parse(t)/100,transform:t=>xe.transform(t*100)},wn={test:Ro("hsl","hue"),parse:$l("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+xe.transform(ir(e))+", "+xe.transform(ir(n))+", "+ir(rr.transform(r))+")"},Vt={test:t=>Ge.test(t)||Mo.test(t)||wn.test(t),parse:t=>Ge.test(t)?Ge.parse(t):wn.test(t)?wn.parse(t):Mo.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ge.transform(t):wn.transform(t),getAnimatableNone:t=>{const e=Vt.parse(t);return e.alpha=0,Vt.transform(e)}},gy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vy(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Io))==null?void 0:e.length)||0)+(((n=t.match(gy))==null?void 0:n.length)||0)>0}const Ul="number",zl="color",wy="var",by="var(",Wl="${}",_y=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function sr(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(_y,l=>(Vt.test(l)?(r.color.push(o),i.push(zl),n.push(Vt.parse(l))):l.startsWith(by)?(r.var.push(o),i.push(wy),n.push(l)):(r.number.push(o),i.push(Ul),n.push(parseFloat(l))),++o,Wl)).split(Wl);return{values:n,split:a,indexes:r,types:i}}function ql(t){return sr(t).values}function Hl(t){const{split:e,types:n}=sr(t),r=e.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=e[s],i[s]!==void 0){const a=n[s];a===Ul?o+=ir(i[s]):a===zl?o+=Vt.transform(i[s]):o+=i[s]}return o}}const xy=t=>typeof t=="number"?0:Vt.test(t)?Vt.getAnimatableNone(t):t;function Sy(t){const e=ql(t);return Hl(t)(e.map(xy))}const ze={test:vy,parse:ql,createTransformer:Hl,getAnimatableNone:Sy};function Do(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ey({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Do(l,a,t+1/3),o=Do(l,a,t),s=Do(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Hr(t,e){return n=>n>0?e:t}const Nt=(t,e,n)=>t+(e-t)*n,Bo=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Ay=[Mo,Ge,wn],Ty=t=>Ay.find(e=>e.test(t));function Gl(t){const e=Ty(t);if(!e)return!1;let n=e.parse(t);return e===wn&&(n=Ey(n)),n}const Kl=(t,e)=>{const n=Gl(t),r=Gl(e);if(!n||!r)return Hr(t,e);const i={...n};return o=>(i.red=Bo(n.red,r.red,o),i.green=Bo(n.green,r.green,o),i.blue=Bo(n.blue,r.blue,o),i.alpha=Nt(n.alpha,r.alpha,o),Ge.transform(i))},Fo=new Set(["none","hidden"]);function Py(t,e){return Fo.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ky(t,e){return n=>Nt(t,e,n)}function Lo(t){return typeof t=="number"?ky:typeof t=="string"?Oo(t)?Hr:Vt.test(t)?Kl:Iy:Array.isArray(t)?Yl:typeof t=="object"?Vt.test(t)?Kl:Cy:Hr}function Yl(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Lo(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function Cy(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Lo(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Oy(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],s=t.indexes[o][r[o]],a=t.values[s]??0;n[i]=a,r[o]++}return n}const Iy=(t,e)=>{const n=ze.createTransformer(e),r=sr(t),i=sr(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Fo.has(t)&&!i.values.length||Fo.has(e)&&!r.values.length?Py(t,e):tr(Yl(Oy(r,i),i.values),n):Hr(t,e)};function Xl(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Nt(t,e,n):Lo(t)(t,e)}const Ry=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Ot.update(e,n),stop:()=>Ve(e),now:()=>Xt.isProcessing?Xt.timestamp:ie.now()}},Jl=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)r+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Gr=2e4;function jo(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Gr;)e+=n,r=t.next(e);return e>=Gr?1/0:e}function Ny(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(jo(r),Gr);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:_e(i)}}const My=5;function Zl(t,e,n){const r=Math.max(e-My,0);return El(n-t(r),e-r)}const Dt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},$o=.001;function Dy({duration:t=Dt.duration,bounce:e=Dt.bounce,velocity:n=Dt.velocity,mass:r=Dt.mass}){let i,o,s=1-e;s=Ne(Dt.minDamping,Dt.maxDamping,s),t=Ne(Dt.minDuration,Dt.maxDuration,_e(t)),s<1?(i=f=>{const c=f*s,h=c*t,m=c-n,y=Vo(f,s),b=Math.exp(-h);return $o-m/y*b},o=f=>{const h=f*s*t,m=h*n+n,y=Math.pow(s,2)*Math.pow(f,2)*t,b=Math.exp(-h),w=Vo(Math.pow(f,2),s);return(-i(f)+$o>0?-1:1)*((m-y)*b)/w}):(i=f=>{const c=Math.exp(-f*t),h=(f-n)*t+1;return-$o+c*h},o=f=>{const c=Math.exp(-f*t),h=(n-f)*(t*t);return c*h});const a=5/t,l=Fy(i,o,a);if(t=be(t),isNaN(l))return{stiffness:Dt.stiffness,damping:Dt.damping,duration:t};{const f=Math.pow(l,2)*r;return{stiffness:f,damping:s*2*Math.sqrt(r*f),duration:t}}}const By=12;function Fy(t,e,n){let r=n;for(let i=1;i<By;i++)r=r-t(r)/e(r);return r}function Vo(t,e){return t*Math.sqrt(1-e*e)}const Ly=["duration","bounce"],jy=["stiffness","damping","mass"];function Ql(t,e){return e.some(n=>t[n]!==void 0)}function $y(t){let e={velocity:Dt.velocity,stiffness:Dt.stiffness,damping:Dt.damping,mass:Dt.mass,isResolvedFromDuration:!1,...t};if(!Ql(t,jy)&&Ql(t,Ly))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Ne(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Dt.mass,stiffness:i,damping:o}}else{const n=Dy(t);e={...e,...n,mass:Dt.mass},e.isResolvedFromDuration=!0}return e}function Kr(t=Dt.visualDuration,e=Dt.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:f,mass:c,duration:h,velocity:m,isResolvedFromDuration:y}=$y({...n,velocity:-_e(n.velocity||0)}),b=m||0,w=f/(2*Math.sqrt(l*c)),P=s-o,x=_e(Math.sqrt(l/c)),v=Math.abs(P)<5;r||(r=v?Dt.restSpeed.granular:Dt.restSpeed.default),i||(i=v?Dt.restDelta.granular:Dt.restDelta.default);let E;if(w<1){const O=Vo(x,w);E=j=>{const B=Math.exp(-w*x*j);return s-B*((b+w*x*P)/O*Math.sin(O*j)+P*Math.cos(O*j))}}else if(w===1)E=O=>s-Math.exp(-x*O)*(P+(b+x*P)*O);else{const O=x*Math.sqrt(w*w-1);E=j=>{const B=Math.exp(-w*x*j),F=Math.min(O*j,300);return s-B*((b+w*x*P)*Math.sinh(F)+O*P*Math.cosh(F))/O}}const N={calculatedDuration:y&&h||null,next:O=>{const j=E(O);if(y)a.done=O>=h;else{let B=O===0?b:0;w<1&&(B=O===0?be(b):Zl(E,O,j));const F=Math.abs(B)<=r,L=Math.abs(s-j)<=i;a.done=F&&L}return a.value=a.done?s:j,a},toString:()=>{const O=Math.min(jo(N),Gr),j=Jl(B=>N.next(O*B).value,O,30);return O+"ms "+j},toTransition:()=>{}};return N}Kr.applyToOptions=t=>{const e=Ny(t,100,Kr);return t.ease=e.ease,t.duration=be(e.duration),t.type="keyframes",t};function Uo({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:f=.5,restSpeed:c}){const h=t[0],m={done:!1,value:h},y=F=>a!==void 0&&F<a||l!==void 0&&F>l,b=F=>a===void 0?l:l===void 0||Math.abs(a-F)<Math.abs(l-F)?a:l;let w=n*e;const P=h+w,x=s===void 0?P:s(P);x!==P&&(w=x-h);const v=F=>-w*Math.exp(-F/r),E=F=>x+v(F),N=F=>{const L=v(F),Y=E(F);m.done=Math.abs(L)<=f,m.value=m.done?x:Y};let O,j;const B=F=>{y(m.value)&&(O=F,j=Kr({keyframes:[m.value,b(m.value)],velocity:Zl(E,F,m.value),damping:i,stiffness:o,restDelta:f,restSpeed:c}))};return B(0),{calculatedDuration:null,next:F=>{let L=!1;return!j&&O===void 0&&(L=!0,N(F),B(F)),O!==void 0&&F>=O?j.next(F-O):(!L&&N(F),m)}}}function Vy(t,e,n){const r=[],i=n||Me.mix||Xl,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||ue:e;a=tr(l,a)}r.push(a)}return r}function Uy(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Ur(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const s=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Vy(e,r,i),l=a.length,f=c=>{if(s&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const m=er(t[h],t[h+1],c);return a[h](m)};return n?c=>f(Ne(t[0],t[o-1],c)):f}function zy(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=er(0,e,r);t.push(Nt(n,1,i))}}function Wy(t){const e=[0];return zy(e,t.length-1),e}function qy(t,e){return t.map(n=>n*e)}function Hy(t,e){return t.map(()=>e||Nl).splice(0,t.length-1)}function ar({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=iy(r)?r.map(Bl):Bl(r),o={done:!1,value:e[0]},s=qy(n&&n.length===e.length?n:Wy(e),t),a=Uy(s,e,{ease:Array.isArray(i)?i:Hy(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Gy=t=>t!==null;function zo(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(Gy),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Ky={decay:Uo,inertia:Uo,tween:ar,keyframes:ar,spring:Kr};function tu(t){typeof t.type=="string"&&(t.type=Ky[t.type])}class Wo{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Yy=t=>t/100;class qo extends Wo{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==ie.now()&&this.tick(ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;tu(e);const{type:n=ar,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const l=n||ar;l!==ar&&typeof a[0]!="number"&&(this.mixKeyframes=tr(Yy,Xl(a[0],a[1])),a=[0,100]);const f=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-s})),f.calculatedDuration===null&&(f.calculatedDuration=jo(f));const{calculatedDuration:c}=f;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=f}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:c,repeat:h,repeatType:m,repeatDelay:y,type:b,onUpdate:w,finalKeyframe:P}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const x=this.currentTime-f*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,N=r;if(h){const F=Math.min(this.currentTime,i)/a;let L=Math.floor(F),Y=F%1;!Y&&F>=1&&(Y=1),Y===1&&L--,L=Math.min(L,h+1),!!(L%2)&&(m==="reverse"?(Y=1-Y,y&&(Y-=y/a)):m==="mirror"&&(N=s)),E=Ne(0,1,Y)*a}const O=v?{done:!1,value:c[0]}:N.next(E);o&&(O.value=o(O.value));let{done:j}=O;!v&&l!==null&&(j=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const B=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return B&&b!==Uo&&(O.value=zo(c,this.options,P,this.speed)),w&&w(O.value),B&&this.finish(),O}then(e,n){return this.finished.then(e,n)}get duration(){return _e(this.calculatedDuration)}get time(){return _e(this.currentTime)}set time(e){var n;e=be(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(ie.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=_e(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Ry,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Xy(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ke=t=>t*180/Math.PI,Ho=t=>{const e=Ke(Math.atan2(t[1],t[0]));return Go(e)},Jy={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ho,rotateZ:Ho,skewX:t=>Ke(Math.atan(t[1])),skewY:t=>Ke(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Go=t=>(t=t%360,t<0&&(t+=360),t),eu=Ho,nu=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ru=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Zy={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nu,scaleY:ru,scale:t=>(nu(t)+ru(t))/2,rotateX:t=>Go(Ke(Math.atan2(t[6],t[5]))),rotateY:t=>Go(Ke(Math.atan2(-t[2],t[0]))),rotateZ:eu,rotate:eu,skewX:t=>Ke(Math.atan(t[4])),skewY:t=>Ke(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ko(t){return t.includes("scale")?1:0}function Yo(t,e){if(!t||t==="none")return Ko(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Zy,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Jy,i=a}if(!i)return Ko(e);const o=r[e],s=i[1].split(",").map(tg);return typeof o=="function"?o(s):s[o]}const Qy=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Yo(n,e)};function tg(t){return parseFloat(t.trim())}const bn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_n=new Set(bn),iu=t=>t===vn||t===ot,eg=new Set(["x","y","z"]),ng=bn.filter(t=>!eg.has(t));function rg(t){const e=[];return ng.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Ye={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Yo(e,"x"),y:(t,{transform:e})=>Yo(e,"y")};Ye.translateX=Ye.x,Ye.translateY=Ye.y;const Xe=new Set;let Xo=!1,Jo=!1,Zo=!1;function ou(){if(Jo){const t=Array.from(Xe).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=rg(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Jo=!1,Xo=!1,Xe.forEach(t=>t.complete(Zo)),Xe.clear()}function su(){Xe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Jo=!0)})}function ig(){Zo=!0,su(),ou(),Zo=!1}class Qo{constructor(e,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Xe.add(this),Xo||(Xo=!0,Ot.read(su),Ot.resolveKeyframes(ou))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),i&&o===void 0&&i.set(e[0])}Xy(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Xe.delete(this)}cancel(){this.state==="scheduled"&&(Xe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const og=t=>t.startsWith("--");function sg(t,e,n){og(e)?t.style.setProperty(e,n):t.style[e]=n}const ag=Eo(()=>window.ScrollTimeline!==void 0),cg={};function lg(t,e){const n=Eo(t);return()=>cg[e]??n()}const au=lg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cr=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,cu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cr([0,.65,.55,1]),circOut:cr([.55,0,1,.45]),backIn:cr([.31,.01,.66,-.59]),backOut:cr([.33,1.53,.69,.99])};function lu(t,e){if(t)return typeof t=="function"?au()?Jl(t,e):"ease-out":Ml(t)?cr(t):Array.isArray(t)?t.map(n=>lu(n,e)||cu.easeOut):cu[t]}function ug(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},f=void 0){const c={[e]:n};l&&(c.offset=l);const h=lu(a,i);Array.isArray(h)&&(c.easing=h);const m={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return f&&(m.pseudoElement=f),t.animate(c,m)}function uu(t){return typeof t=="function"&&"applyToOptions"in t}function fg({type:t,...e}){return uu(t)&&au()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class dg extends Wo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,Ur(typeof e.type!="string");const f=fg(e);this.animation=ug(n,r,i,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=zo(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):sg(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return _e(Number(e))}get time(){return _e(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=be(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&ag()?(this.animation.timeline=e,ue):n(this)}}const fu={anticipate:Ol,backInOut:Cl,circInOut:Rl};function hg(t){return t in fu}function pg(t){typeof t.ease=="string"&&hg(t.ease)&&(t.ease=fu[t.ease])}const du=10;class mg extends dg{constructor(e){pg(e),tu(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new qo({...s,autoplay:!1}),l=be(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-du).value,a.sample(l).value,du),a.stop()}}const hu=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ze.test(t)||t==="0")&&!t.startsWith("url("));function yg(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function gg(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],s=hu(i,e),a=hu(o,e);return!s||!a?!1:yg(t)||(n==="spring"||uu(n))&&r}function ts(t){t.duration=0,t.type}const vg=new Set(["opacity","clipPath","filter","transform"]),wg=Eo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bg(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:f}=e.owner.getProps();return wg()&&n&&vg.has(n)&&(n!=="transform"||!f)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const _g=40;class xg extends Wo{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:f,element:c,...h}){var b;super(),this.stop=()=>{var w,P;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(P=this.keyframeResolver)==null||P.cancel()},this.createdAt=ie.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:l,motionValue:f,element:c,...h},y=(c==null?void 0:c.KeyframeResolver)||Qo;this.keyframeResolver=new y(a,(w,P,x)=>this.onKeyframesResolved(w,P,m,!x),l,f,c),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:f,onUpdate:c}=r;this.resolvedAt=ie.now(),gg(e,o,s,a)||((Me.instantAnimations||!l)&&(c==null||c(zo(e,r,n))),e[0]=e[e.length-1],ts(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>_g?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},y=!f&&bg(m)?new mg({...m,element:m.motionValue.owner.current}):new qo(m);y.finished.then(()=>this.notifyFinished()).catch(ue),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),ig()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Sg=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Eg(t){const e=Sg.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function pu(t,e,n=1){const[r,i]=Eg(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return _l(s)?parseFloat(s):s}return Oo(i)?pu(i,e,n+1):i}function es(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const mu=new Set(["width","height","top","left","right","bottom",...bn]),Ag={test:t=>t==="auto",parse:t=>t},yu=t=>e=>e.test(t),gu=[vn,ot,xe,Ue,yy,my,Ag],vu=t=>gu.find(yu(t));function Tg(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Sl(t):!0}const Pg=new Set(["brightness","contrast","saturate","opacity"]);function kg(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Io)||[];if(!r)return t;const i=n.replace(r,"");let o=Pg.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Cg=/\b([a-z-]*)\(.*?\)/gu,ns={...ze,getAnimatableNone:t=>{const e=t.match(Cg);return e?e.map(kg).join(" "):t}},wu={...vn,transform:Math.round},rs={borderWidth:ot,borderTopWidth:ot,borderRightWidth:ot,borderBottomWidth:ot,borderLeftWidth:ot,borderRadius:ot,radius:ot,borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomRightRadius:ot,borderBottomLeftRadius:ot,width:ot,maxWidth:ot,height:ot,maxHeight:ot,top:ot,right:ot,bottom:ot,left:ot,padding:ot,paddingTop:ot,paddingRight:ot,paddingBottom:ot,paddingLeft:ot,margin:ot,marginTop:ot,marginRight:ot,marginBottom:ot,marginLeft:ot,backgroundPositionX:ot,backgroundPositionY:ot,...{rotate:Ue,rotateX:Ue,rotateY:Ue,rotateZ:Ue,scale:qr,scaleX:qr,scaleY:qr,scaleZ:qr,skew:Ue,skewX:Ue,skewY:Ue,distance:ot,translateX:ot,translateY:ot,translateZ:ot,x:ot,y:ot,z:ot,perspective:ot,transformPerspective:ot,opacity:rr,originX:Vl,originY:Vl,originZ:ot},zIndex:wu,fillOpacity:rr,strokeOpacity:rr,numOctaves:wu},Og={...rs,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:ns,WebkitFilter:ns},bu=t=>Og[t];function _u(t,e){let n=bu(t);return n!==ns&&(n=ze),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ig=new Set(["auto","none","0"]);function Rg(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!Ig.has(o)&&sr(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=_u(n,i)}class Ng extends Qo{constructor(e,n,r,i,o){super(e,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let f=e[l];if(typeof f=="string"&&(f=f.trim(),Oo(f))){const c=pu(f,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!mu.has(r)||e.length!==2)return;const[i,o]=e,s=vu(i),a=vu(o);if(s!==a)if(iu(s)&&iu(a))for(let l=0;l<e.length;l++){const f=e[l];typeof f=="string"&&(e[l]=parseFloat(f))}else Ye[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Tg(e[i]))&&r.push(i);r.length&&Rg(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ye[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Ye[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,f])=>{e.getValue(l).set(f)}),this.resolveNoneKeyframes()}}function Mg(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const xu=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Su(t){return xl(t)&&"offsetHeight"in t}const Eu=30,Dg=t=>!isNaN(parseFloat(t));class Bg{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=ie.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=ie.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Dg(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ao);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ot.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Eu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Eu);return El(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xn(t,e){return new Bg(t,e)}const{schedule:is,cancel:vA}=Ll(queueMicrotask,!1),ye={x:!1,y:!1};function Au(){return ye.x||ye.y}function Fg(t){return t==="x"||t==="y"?ye[t]?null:(ye[t]=!0,()=>{ye[t]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function Tu(t,e){const n=Mg(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Pu(t){return!(t.pointerType==="touch"||Au())}function Lg(t,e,n={}){const[r,i,o]=Tu(t,n),s=a=>{if(!Pu(a))return;const{target:l}=a,f=e(l,a);if(typeof f!="function"||!l)return;const c=h=>{Pu(h)&&(f(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const ku=(t,e)=>e?t===e?!0:ku(t,e.parentElement):!1,os=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,jg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $g(t){return jg.has(t.tagName)||t.tabIndex!==-1}const Yr=new WeakSet;function Cu(t){return e=>{e.key==="Enter"&&t(e)}}function ss(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Vg=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Cu(()=>{if(Yr.has(n))return;ss(n,"down");const i=Cu(()=>{ss(n,"up")}),o=()=>ss(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Ou(t){return os(t)&&!Au()}function Ug(t,e,n={}){const[r,i,o]=Tu(t,n),s=a=>{const l=a.currentTarget;if(!Ou(a))return;Yr.add(l);const f=e(l,a),c=(y,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),Yr.has(l)&&Yr.delete(l),Ou(y)&&typeof f=="function"&&f(y,{success:b})},h=y=>{c(y,l===window||l===document||n.useGlobalTarget||ku(l,y.target))},m=y=>{c(y,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),Su(a)&&(a.addEventListener("focus",f=>Vg(f,i)),!$g(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Iu(t){return xl(t)&&"ownerSVGElement"in t}function zg(t){return Iu(t)&&t.tagName==="svg"}const Zt=t=>!!(t&&t.getVelocity),Wg=[...gu,Vt,ze],qg=t=>Wg.find(yu(t)),as=te({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Hg extends se{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=Su(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Gg({children:t,isPresent:e,anchorX:n,root:r}){const i=pn(),o=it(null),s=it({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=Ft(as);return Zn(()=>{const{width:l,height:f,top:c,left:h,right:m}=s.current;if(e||!o.current||!l||!f)return;const y=n==="left"?`left: ${h}`:`right: ${m}`;o.current.dataset.motionPopId=i;const b=document.createElement("style");a&&(b.nonce=a);const w=r??document.head;return w.appendChild(b),b.sheet&&b.sheet.insertRule(`
|
|
1
|
+
(function(){"use strict";var Hn,ft,_c,qe,xc,Sc,Xi,Ec,Ji,Zi,Qi,Ac,Gn={},Cc=[],Cm=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Br=Array.isArray;function ke(t,e){for(var n in e)t[n]=e[n];return t}function to(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function et(t,e,n){var r,i,o,s={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:s[o]=e[o];if(arguments.length>2&&(s.children=arguments.length>3?Hn.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)s[o]===void 0&&(s[o]=t.defaultProps[o]);return Kn(t,s,r,i,null)}function Kn(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++_c,__i:-1,__u:0};return i==null&&ft.vnode!=null&&ft.vnode(o),o}function Tc(){return{current:null}}function Pt(t){return t.children}function se(t,e){this.props=t,this.context=e}function dn(t,e){if(e==null)return t.__?dn(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null)return n.__e;return typeof t.type=="function"?dn(t):null}function Pc(t){var e,n;if((t=t.__)!=null&&t.__c!=null){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if((n=t.__k[e])!=null&&n.__e!=null){t.__e=t.__c.base=n.__e;break}return Pc(t)}}function eo(t){(!t.__d&&(t.__d=!0)&&qe.push(t)&&!Fr.__r++||xc!==ft.debounceRendering)&&((xc=ft.debounceRendering)||Sc)(Fr)}function Fr(){var t,e,n,r,i,o,s,a;for(qe.sort(Xi);t=qe.shift();)t.__d&&(e=qe.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=ke({},i)).__v=i.__v+1,ft.vnode&&ft.vnode(r),no(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??dn(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Mc(s,r,a),r.__e!=o&&Pc(r)),qe.length>e&&qe.sort(Xi));Fr.__r=0}function kc(t,e,n,r,i,o,s,a,l,f,c){var h,m,y,b,w,T,x=r&&r.__k||Cc,v=e.length;for(l=Tm(n,e,x,l,v),h=0;h<v;h++)(y=n.__k[h])!=null&&(m=y.__i===-1?Gn:x[y.__i]||Gn,y.__i=h,T=no(t,y,m,i,o,s,a,l,f,c),b=y.__e,y.ref&&m.ref!=y.ref&&(m.ref&&ro(m.ref,null,y),c.push(y.ref,y.__c||b,y)),w==null&&b!=null&&(w=b),4&y.__u||m.__k===y.__k?l=Oc(y,l,t):typeof y.type=="function"&&T!==void 0?l=T:b&&(l=b.nextSibling),y.__u&=-7);return n.__e=w,l}function Tm(t,e,n,r,i){var o,s,a,l,f,c=n.length,h=c,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(l=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?Kn(null,s,null,null,null):Br(s)?Kn(Pt,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?Kn(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(f=s.__i=Pm(s,n,l,h))!==-1&&(h--,(a=n[f])&&(a.__u|=2)),a==null||a.__v===null?(f==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):f!=l&&(f==l-1?m--:f==l+1?m++:(f>l?m--:m++,s.__u|=4))):t.__k[o]=null;if(h)for(o=0;o<c;o++)(a=n[o])!=null&&!(2&a.__u)&&(a.__e==r&&(r=dn(a)),Nc(a,a));return r}function Oc(t,e,n){var r,i;if(typeof t.type=="function"){for(r=t.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=t,e=Oc(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=dn(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function Oe(t,e){return e=e||[],t==null||typeof t=="boolean"||(Br(t)?t.some(function(n){Oe(n,e)}):e.push(t)),e}function Pm(t,e,n,r){var i,o,s=t.key,a=t.type,l=e[n];if(l===null||l&&s==l.key&&a===l.type&&!(2&l.__u))return n;if(r>(l!=null&&!(2&l.__u)?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((l=e[i])&&!(2&l.__u)&&s==l.key&&a===l.type)return i;i--}if(o<e.length){if((l=e[o])&&!(2&l.__u)&&s==l.key&&a===l.type)return o;o++}}return-1}function Ic(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Cm.test(e)?n:n+"px"}function Lr(t,e,n,r,i){var o;t:if(e=="style")if(typeof n=="string")t.style.cssText=n;else{if(typeof r=="string"&&(t.style.cssText=r=""),r)for(e in r)n&&e in n||Ic(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Ic(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Ec,"$1")),e=e.toLowerCase()in t||e=="onFocusOut"||e=="onFocusIn"?e.toLowerCase().slice(2):e.slice(2),t.l||(t.l={}),t.l[e+o]=n,n?r?n.u=r.u:(n.u=Ji,t.addEventListener(e,o?Qi:Zi,o)):t.removeEventListener(e,o?Qi:Zi,o);else{if(i=="http://www.w3.org/2000/svg")e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!="width"&&e!="height"&&e!="href"&&e!="list"&&e!="form"&&e!="tabIndex"&&e!="download"&&e!="rowSpan"&&e!="colSpan"&&e!="role"&&e!="popover"&&e in t)try{t[e]=n??"";break t}catch{}typeof n=="function"||(n==null||n===!1&&e[4]!="-"?t.removeAttribute(e):t.setAttribute(e,e=="popover"&&n==1?"":n))}}function Rc(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=Ji++;else if(e.t<n.u)return;return n(ft.event?ft.event(e):e)}}}function no(t,e,n,r,i,o,s,a,l,f){var c,h,m,y,b,w,T,x,v,E,M,O,j,B,F,L,Y,Z=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=e.__e=n.__e]),(c=ft.__b)&&c(e);t:if(typeof Z=="function")try{if(x=e.props,v="prototype"in Z&&Z.prototype.render,E=(c=Z.contextType)&&r[c.__c],M=c?E?E.props.value:c.__:r,n.__c?T=(h=e.__c=n.__c).__=h.__E:(v?e.__c=h=new Z(x,M):(e.__c=h=new se(x,M),h.constructor=Z,h.render=Om),E&&E.sub(h),h.props=x,h.state||(h.state={}),h.context=M,h.__n=r,m=h.__d=!0,h.__h=[],h._sb=[]),v&&h.__s==null&&(h.__s=h.state),v&&Z.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=ke({},h.__s)),ke(h.__s,Z.getDerivedStateFromProps(x,h.__s))),y=h.props,b=h.state,h.__v=e,m)v&&Z.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),v&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(v&&Z.getDerivedStateFromProps==null&&x!==y&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(x,M),!h.__e&&(h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(x,h.__s,M)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(h.props=x,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(nt){nt&&(nt.__=e)}),O=0;O<h._sb.length;O++)h.__h.push(h._sb[O]);h._sb=[],h.__h.length&&s.push(h);break t}h.componentWillUpdate!=null&&h.componentWillUpdate(x,h.__s,M),v&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(y,b,w)})}if(h.context=M,h.props=x,h.__P=t,h.__e=!1,j=ft.__r,B=0,v){for(h.state=h.__s,h.__d=!1,j&&j(e),c=h.render(h.props,h.state,h.context),F=0;F<h._sb.length;F++)h.__h.push(h._sb[F]);h._sb=[]}else do h.__d=!1,j&&j(e),c=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++B<25);h.state=h.__s,h.getChildContext!=null&&(r=ke(ke({},r),h.getChildContext())),v&&!m&&h.getSnapshotBeforeUpdate!=null&&(w=h.getSnapshotBeforeUpdate(y,b)),a=kc(t,Br(L=c!=null&&c.type===Pt&&c.key==null?c.props.children:c)?L:[L],e,n,r,i,o,s,a,l,f),h.base=e.__e,e.__u&=-161,h.__h.length&&s.push(h),T&&(h.__E=h.__=null)}catch(nt){if(e.__v=null,l||o!=null)if(nt.then){for(e.__u|=l?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(Y=o.length;Y--;)to(o[Y]);else e.__e=n.__e,e.__k=n.__k;ft.__e(nt,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=km(n.__e,e,n,r,i,o,s,l,f);return(c=ft.diffed)&&c(e),128&e.__u?void 0:a}function Mc(t,e,n){for(var r=0;r<n.length;r++)ro(n[r],n[++r],n[++r]);ft.__c&&ft.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){ft.__e(o,i.__v)}})}function km(t,e,n,r,i,o,s,a,l){var f,c,h,m,y,b,w,T=n.props,x=e.props,v=e.type;if(v=="svg"?i="http://www.w3.org/2000/svg":v=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(f=0;f<o.length;f++)if((y=o[f])&&"setAttribute"in y==!!v&&(v?y.localName==v:y.nodeType==3)){t=y,o[f]=null;break}}if(t==null){if(v==null)return document.createTextNode(x);t=document.createElementNS(i,v,x.is&&x),a&&(ft.__m&&ft.__m(e,o),a=!1),o=null}if(v===null)T===x||a&&t.data===x||(t.data=x);else{if(o=o&&Hn.call(t.childNodes),T=n.props||Gn,!a&&o!=null)for(T={},f=0;f<t.attributes.length;f++)T[(y=t.attributes[f]).name]=y.value;for(f in T)if(y=T[f],f!="children"){if(f=="dangerouslySetInnerHTML")h=y;else if(!(f in x)){if(f=="value"&&"defaultValue"in x||f=="checked"&&"defaultChecked"in x)continue;Lr(t,f,null,y,i)}}for(f in x)y=x[f],f=="children"?m=y:f=="dangerouslySetInnerHTML"?c=y:f=="value"?b=y:f=="checked"?w=y:a&&typeof y!="function"||T[f]===y||Lr(t,f,y,T[f],i);if(c)a||h&&(c.__html===h.__html||c.__html===t.innerHTML)||(t.innerHTML=c.__html),e.__k=[];else if(h&&(t.innerHTML=""),kc(t,Br(m)?m:[m],e,n,r,v=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&dn(n,0),a,l),o!=null)for(f=o.length;f--;)to(o[f]);a||(f="value",v=="progress"&&b==null?t.removeAttribute("value"):b!==void 0&&(b!==t[f]||v=="progress"&&!b||v=="option"&&b!==T[f])&&Lr(t,f,b,T[f],i),f="checked",w!==void 0&&w!==t[f]&&Lr(t,f,w,T[f],i))}return t}function ro(t,e,n){try{if(typeof t=="function"){var r=typeof t.__u=="function";r&&t.__u(),r&&e==null||(t.__u=t(e))}else t.current=e}catch(i){ft.__e(i,n)}}function Nc(t,e,n){var r,i;if(ft.unmount&&ft.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||ro(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ft.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Nc(r[i],e,n||typeof t.type!="function");n||to(t.__e),t.__c=t.__=t.__e=void 0}function Om(t,e,n){return this.constructor(t,n)}function Yn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),ft.__&&ft.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],no(e,t=(!r&&n||e).__k=et(Pt,null,[t]),i||Gn,Gn,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?Hn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Mc(o,t,s)}function Dc(t,e){Yn(t,e,Dc)}function Im(t,e,n){var r,i,o,s,a=ke({},t.props);for(o in t.type&&t.type.defaultProps&&(s=t.type.defaultProps),e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o]===void 0&&s!==void 0?s[o]:e[o];return arguments.length>2&&(a.children=arguments.length>3?Hn.call(arguments,2):n),Kn(t.type,a,r||t.key,i||t.ref,null)}function te(t,e){var n={__c:e="__cC"+Ac++,__:t,Consumer:function(r,i){return r.children(i)},Provider:function(r){var i,o;return this.getChildContext||(i=new Set,(o={})[e]=this,this.getChildContext=function(){return o},this.componentWillUnmount=function(){i=null},this.shouldComponentUpdate=function(s){this.props.value!==s.value&&i.forEach(function(a){a.__e=!0,eo(a)})},this.sub=function(s){i.add(s);var a=s.componentWillUnmount;s.componentWillUnmount=function(){i&&i.delete(s),a&&a.call(s)}}),r.children}};return n.Provider.__=n.Consumer.contextType=n}Hn=Cc.slice,ft={__e:function(t,e,n,r){for(var i,o,s;e=e.__;)if((i=e.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(t)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(t,r||{}),s=i.__d),s)return i.__E=i}catch(a){t=a}throw t}},_c=0,se.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ke({},this.state),typeof t=="function"&&(t=t(ke({},n),this.props)),t&&ke(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),eo(this))},se.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),eo(this))},se.prototype.render=Pt,qe=[],Sc=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Xi=function(t,e){return t.__v.__b-e.__v.__b},Fr.__r=0,Ec=/(PointerCapture)$|Capture$/i,Ji=0,Zi=Rc(!1),Qi=Rc(!0),Ac=0;var Rm=0;function P(t,e,n,r,i,o){e||(e={});var s,a,l=e;if("ref"in l)for(a in l={},e)a=="ref"?s=e[a]:l[a]=e[a];var f={type:t,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Rm,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return ft.vnode&&ft.vnode(f),f}var Ie,At,io,Bc,hn=0,Fc=[],Rt=ft,Lc=Rt.__b,jc=Rt.__r,Vc=Rt.diffed,$c=Rt.__c,Uc=Rt.unmount,zc=Rt.__;function He(t,e){Rt.__h&&Rt.__h(At,t,hn||e),hn=0;var n=At.__H||(At.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function gt(t){return hn=1,Xn(qc,t)}function Xn(t,e,n){var r=He(Ie++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):qc(void 0,e),function(a){var l=r.__N?r.__N[0]:r.__[0],f=r.t(l,a);l!==f&&(r.__N=[f,r.__[1]],r.__c.setState({}))}],r.__c=At,!At.u)){var i=function(a,l,f){if(!r.__c.__H)return!0;var c=r.__c.__H.__.filter(function(m){return!!m.__c});if(c.every(function(m){return!m.__N}))return!o||o.call(this,a,l,f);var h=r.__c.props!==a;return c.forEach(function(m){if(m.__N){var y=m.__[0];m.__=m.__N,m.__N=void 0,y!==m.__[0]&&(h=!0)}}),o&&o.call(this,a,l,f)||h};At.u=!0;var o=At.shouldComponentUpdate,s=At.componentWillUpdate;At.componentWillUpdate=function(a,l,f){if(this.__e){var c=o;o=void 0,i(a,l,f),o=c}s&&s.call(this,a,l,f)},At.shouldComponentUpdate=i}return r.__N||r.__}function ut(t,e){var n=He(Ie++,3);!Rt.__s&&ao(n.__H,e)&&(n.__=t,n.i=e,At.__H.__h.push(n))}function Re(t,e){var n=He(Ie++,4);!Rt.__s&&ao(n.__H,e)&&(n.__=t,n.i=e,At.__h.push(n))}function it(t){return hn=5,Ht(function(){return{current:t}},[])}function Jn(t,e,n){hn=6,Re(function(){return typeof t=="function"?(t(e()),function(){return t(null)}):t?(t.current=e(),function(){return t.current=null}):void 0},n==null?n:n.concat(t))}function Ht(t,e){var n=He(Ie++,7);return ao(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function kt(t,e){return hn=8,Ht(function(){return t},e)}function Ft(t){var e=At.context[t.__c],n=He(Ie++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(At)),e.props.value):t.__}function oo(t,e){Rt.useDebugValue&&Rt.useDebugValue(e?e(t):t)}function Mm(t){var e=He(Ie++,10),n=gt();return e.__=t,At.componentDidCatch||(At.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function pn(){var t=He(Ie++,11);if(!t.__){for(var e=At.__v;e!==null&&!e.__m&&e.__!==null;)e=e.__;var n=e.__m||(e.__m=[0,0]);t.__="P"+n[0]+"-"+n[1]++}return t.__}function Nm(){for(var t;t=Fc.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(jr),t.__H.__h.forEach(so),t.__H.__h=[]}catch(e){t.__H.__h=[],Rt.__e(e,t.__v)}}Rt.__b=function(t){At=null,Lc&&Lc(t)},Rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),zc&&zc(t,e)},Rt.__r=function(t){jc&&jc(t),Ie=0;var e=(At=t.__c).__H;e&&(io===At?(e.__h=[],At.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(jr),e.__h.forEach(so),e.__h=[],Ie=0)),io=At},Rt.diffed=function(t){Vc&&Vc(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Fc.push(e)!==1&&Bc===Rt.requestAnimationFrame||((Bc=Rt.requestAnimationFrame)||Dm)(Nm)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),io=At=null},Rt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(jr),n.__h=n.__h.filter(function(r){return!r.__||so(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Rt.__e(r,n.__v)}}),$c&&$c(t,e)},Rt.unmount=function(t){Uc&&Uc(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{jr(r)}catch(i){e=i}}),n.__H=void 0,e&&Rt.__e(e,n.__v))};var Wc=typeof requestAnimationFrame=="function";function Dm(t){var e,n=function(){clearTimeout(r),Wc&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);Wc&&(e=requestAnimationFrame(n))}function jr(t){var e=At,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),At=e}function so(t){var e=At;t.__c=t.__(),At=e}function ao(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function qc(t,e){return typeof e=="function"?e(t):e}function Hc(t,e){for(var n in e)t[n]=e[n];return t}function co(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function lo(t,e){var n=e(),r=gt({t:{__:n,u:e}}),i=r[0].t,o=r[1];return Re(function(){i.__=n,i.u=e,uo(i)&&o({t:i})},[t,n,e]),ut(function(){return uo(i)&&o({t:i}),t(function(){uo(i)&&o({t:i})})},[t]),n}function uo(t){var e,n,r=t.u,i=t.__;try{var o=r();return!((e=i)===(n=o)&&(e!==0||1/e==1/n)||e!=e&&n!=n)}catch{return!0}}function fo(t){t()}function ho(t){return t}function po(){return[!1,fo]}var Zn=Re;function Vr(t,e){this.props=t,this.context=e}function Gc(t,e){function n(i){var o=this.props.ref,s=o==i.ref;return!s&&o&&(o.call?o(null):o.current=null),e?!e(this.props,i)||!s:co(this.props,i)}function r(i){return this.shouldComponentUpdate=n,et(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(Vr.prototype=new se).isPureReactComponent=!0,Vr.prototype.shouldComponentUpdate=function(t,e){return co(this.props,t)||co(this.state,e)};var Kc=ft.__b;ft.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Kc&&Kc(t)};var Bm=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function Ve(t){function e(n){var r=Hc({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Bm,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var Yc=function(t,e){return t==null?null:Oe(Oe(t).map(e))},mo={map:Yc,forEach:Yc,count:function(t){return t?Oe(t).length:0},only:function(t){var e=Oe(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:Oe},Fm=ft.__e;ft.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}Fm(t,e,n,r)};var Xc=ft.unmount;function Jc(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=Hc({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return Jc(r,e,n)})),t}function Zc(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return Zc(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Qn(){this.__u=0,this.o=null,this.__b=null}function Qc(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function tl(t){var e,n,r;function i(o){if(e||(e=t()).then(function(s){n=s.default||s},function(s){r=s}),r)throw r;if(!n)throw e;return et(n,o)}return i.displayName="Lazy",i.__f=!0,i}function mn(){this.i=null,this.l=null}ft.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Xc&&Xc(t)},(Qn.prototype=new se).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Qc(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 l=r.state.__a;r.__v.__k[0]=Zc(l,l.__c.__P,l.__c.__O)}var f;for(r.setState({__a:r.__b=null});f=r.o.pop();)f.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Qn.prototype.componentWillUnmount=function(){this.o=[]},Qn.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Jc(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&et(Pt,null,t.fallback);return i&&(i.__u&=-33),[et(Pt,null,e.__a?null:t.children),i]};var el=function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}};function Lm(t){return this.getChildContext=function(){return t.context},t.children}function jm(t){var e=this,n=t.h;e.componentWillUnmount=function(){Yn(null,e.v),e.v=null,e.h=null},e.h&&e.h!==n&&e.componentWillUnmount(),e.v||(e.h=n,e.v={nodeType:1,parentNode:n,childNodes:[],contains:function(){return!0},appendChild:function(r){this.childNodes.push(r),e.h.appendChild(r)},insertBefore:function(r,i){this.childNodes.push(r),e.h.insertBefore(r,i)},removeChild:function(r){this.childNodes.splice(this.childNodes.indexOf(r)>>>1,1),e.h.removeChild(r)}}),Yn(et(Lm,{context:e.context},t.__v),e.v)}function yo(t,e){var n=et(jm,{__v:t,h:e});return n.containerInfo=e,n}(mn.prototype=new se).__a=function(t){var e=this,n=Qc(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),el(e,t,r)):i()};n?n(o):o()}},mn.prototype.render=function(t){this.i=null,this.l=new Map;var e=Oe(t.children);t.revealOrder&&t.revealOrder[0]==="b"&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},mn.prototype.componentDidUpdate=mn.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){el(t,n,e)})};var nl=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Vm=/^(?: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]/,$m=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Um=/[A-Z0-9]/g,zm=typeof document<"u",Wm=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function rl(t,e,n){return e.__k==null&&(e.textContent=""),Yn(t,e),typeof n=="function"&&n(),t?t.__c:null}function il(t,e,n){return Dc(t,e),typeof n=="function"&&n(),t?t.__c:null}se.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(se.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var ol=ft.event;function qm(){}function Hm(){return this.cancelBubble}function Gm(){return this.defaultPrevented}ft.event=function(t){return ol&&(t=ol(t)),t.persist=qm,t.isPropagationStopped=Hm,t.isDefaultPrevented=Gm,t.nativeEvent=t};var go,Km={enumerable:!1,configurable:!0,get:function(){return this.class}},sl=ft.vnode;ft.vnode=function(t){typeof t.type=="string"&&function(e){var n=e.props,r=e.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||zm&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||Wm(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":$m.test(s)&&(s=l):l=s="oninput":o&&Vm.test(s)?s=s.replace(Um,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Oe(n.children).forEach(function(f){f.props.selected=i.value.indexOf(f.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Oe(n.children).forEach(function(f){f.props.selected=i.multiple?i.defaultValue.indexOf(f.props.value)!=-1:i.defaultValue==f.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Km)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=nl,sl&&sl(t)};var al=ft.__r;ft.__r=function(t){al&&al(t),go=t.__c};var cl=ft.diffed;ft.diffed=function(t){cl&&cl(t);var e=t.props,n=t.__e;n!=null&&t.type==="textarea"&&"value"in e&&e.value!==n.value&&(n.value=e.value==null?"":e.value),go=null};var ll={ReactCurrentDispatcher:{current:{readContext:function(t){return go.__n[t.__c].props.value},useCallback:kt,useContext:Ft,useDebugValue:oo,useDeferredValue:ho,useEffect:ut,useId:pn,useImperativeHandle:Jn,useInsertionEffect:Zn,useLayoutEffect:Re,useMemo:Ht,useReducer:Xn,useRef:it,useState:gt,useSyncExternalStore:lo,useTransition:po}}},ul="18.3.1";function fl(t){return et.bind(null,t)}function yn(t){return!!t&&t.$$typeof===nl}function dl(t){return yn(t)&&t.type===Pt}function hl(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function vo(t){return yn(t)?Im.apply(null,arguments):t}function pl(t){return!!t.__k&&(Yn(null,t),!0)}function ml(t){return t&&(t.base||t.nodeType===1&&t)||null}var yl=function(t,e){return t(e)},gl=function(t,e){return t(e)},vl=Pt,wl=yn,gn={useState:gt,useId:pn,useReducer:Xn,useEffect:ut,useLayoutEffect:Re,useInsertionEffect:Zn,useTransition:po,useDeferredValue:ho,useSyncExternalStore:lo,startTransition:fo,useRef:it,useImperativeHandle:Jn,useMemo:Ht,useCallback:kt,useContext:Ft,useDebugValue:oo,version:"18.3.1",Children:mo,render:rl,hydrate:il,unmountComponentAtNode:pl,createPortal:yo,createElement:et,createContext:te,createFactory:fl,cloneElement:vo,createRef:Tc,Fragment:Pt,isValidElement:yn,isElement:wl,isFragment:dl,isMemo:hl,findDOMNode:ml,Component:se,PureComponent:Vr,memo:Gc,forwardRef:Ve,flushSync:gl,unstable_batchedUpdates:yl,StrictMode:vl,Suspense:Qn,SuspenseList:mn,lazy:tl,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ll};const Ym=Object.freeze(Object.defineProperty({__proto__:null,Children:mo,Component:se,Fragment:Pt,PureComponent:Vr,StrictMode:vl,Suspense:Qn,SuspenseList:mn,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ll,cloneElement:vo,createContext:te,createElement:et,createFactory:fl,createPortal:yo,createRef:Tc,default:gn,findDOMNode:ml,flushSync:gl,forwardRef:Ve,hydrate:il,isElement:wl,isFragment:dl,isMemo:hl,isValidElement:yn,lazy:tl,memo:Gc,render:rl,startTransition:fo,unmountComponentAtNode:pl,unstable_batchedUpdates:yl,useCallback:kt,useContext:Ft,useDebugValue:oo,useDeferredValue:ho,useEffect:ut,useErrorBoundary:Mm,useId:pn,useImperativeHandle:Jn,useInsertionEffect:Zn,useLayoutEffect:Re,useMemo:Ht,useReducer:Xn,useRef:it,useState:gt,useSyncExternalStore:lo,useTransition:po,version:ul},Symbol.toStringTag,{value:"Module"})),Xm='*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,*:before,*:after{border-color:hsl(var(--border))}#deskcord-shadow-container{color:hsl(var(--foreground));font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}*,:before,: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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::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: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.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}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.invisible{visibility:hidden}.collapse{visibility:collapse}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.bottom-0{bottom:0}.bottom-full{bottom:100%}.end-0{inset-inline-end:0px}.left-0{left:0}.right-0{right:0}.right-1{right:.25rem}.start-0{inset-inline-start:0px}.top-0{top:0}.top-1{top:.25rem}.top-full{top:100%}.z-20{z-index:20}.m-2{margin:.5rem}.mx-4{margin-left:1rem;margin-right:1rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-4{margin-top:1rem;margin-bottom:1rem}.my-\\[3px\\]{margin-top:3px;margin-bottom:3px}.\\!me-1{margin-inline-end:.25rem!important}.\\!me-1\\.5{margin-inline-end:.375rem!important}.\\!ms-auto{margin-inline-start:auto!important}.mb-1{margin-bottom:.25rem}.mb-1\\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.me-11{margin-inline-end:2.75rem}.ml-2{margin-left:.5rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.ms-0\\.5{margin-inline-start:.125rem}.ms-2{margin-inline-start:.5rem}.ms-auto{margin-inline-start:auto}.mt-1{margin-top:.25rem}.mt-1\\.5{margin-top:.375rem}.mt-2{margin-top:.5rem}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.\\!flex{display:flex!important}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.aspect-auto{aspect-ratio:auto}.size-3{width:.75rem;height:.75rem}.size-3\\.5{width:.875rem;height:.875rem}.size-4{width:1rem;height:1rem}.size-5{width:1.25rem;height:1.25rem}.size-6{width:1.5rem;height:1.5rem}.size-8{width:2rem;height:2rem}.size-\\[32px\\]{width:32px;height:32px}.\\!h-2\\.5{height:.625rem!important}.h-1{height:.25rem}.h-14{height:3.5rem}.h-16{height:4rem}.h-2{height:.5rem}.h-32{height:8rem}.h-8{height:2rem}.h-\\[10px\\]{height:10px}.h-\\[33px\\]{height:33px}.h-full{height:100%}.max-h-40{max-height:10rem}.max-h-\\[100px\\]{max-height:100px}.max-h-\\[200px\\]{max-height:200px}.min-h-\\[55px\\]{min-height:55px}.\\!w-2\\.5{width:.625rem!important}.w-1{width:.25rem}.w-10{width:2.5rem}.w-14{width:3.5rem}.w-32{width:8rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-\\[33px\\]{width:33px}.w-\\[40px\\]{width:40px}.w-\\[calc\\(100\\%-2rem\\)\\]{width:calc(100% - 2rem)}.w-auto{width:auto}.w-full{width:100%}.min-w-10{min-width:2.5rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[300px\\]{max-width:300px}.max-w-full{max-width:100%}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.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 slide-in{0%{transform:translateY(100%);opacity:0}to{transform:translateY(0);opacity:1}}.animate-slide-in{animation:slide-in .2s ease-out}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize{resize:both}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-nowrap{flex-wrap:nowrap}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.\\!justify-between{justify-content:space-between!important}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-x-1{-moz-column-gap:.25rem;column-gap:.25rem}.gap-x-2{-moz-column-gap:.5rem;column-gap:.5rem}.gap-x-3{-moz-column-gap:.75rem;column-gap:.75rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-\\[3px\\]>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(3px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(3px * var(--tw-space-y-reverse))}.space-y-reverse>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 1}.self-center{align-self:center}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.\\!rounded-sm{border-radius:calc(var(--radius) - 4px)!important}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-xl{border-radius:.75rem}.rounded-t-lg{border-top-left-radius:var(--radius);border-top-right-radius:var(--radius)}.border{border-width:1px}.border-\\[3px\\]{border-width:3px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.\\!border-gray-200{--tw-border-opacity: 1 !important;border-color:rgb(229 231 235 / var(--tw-border-opacity))!important}.border-current{border-color:currentColor}.border-gray-100{--tw-border-opacity: 1;border-color:rgb(243 244 246 / var(--tw-border-opacity))}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity))}.border-red-500{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity))}.border-transparent{border-color:transparent}.border-t-gray-200{--tw-border-opacity: 1;border-top-color:rgb(229 231 235 / var(--tw-border-opacity))}.border-t-transparent{border-top-color:transparent}.\\!bg-white{--tw-bg-opacity: 1 !important;background-color:rgb(255 255 255 / var(--tw-bg-opacity))!important}.bg-\\[\\#7289DA\\]{--tw-bg-opacity: 1;background-color:rgb(114 137 218 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity))}.bg-gray-600{--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity))}.bg-gray-800{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity))}.bg-red-400{--tw-bg-opacity: 1;background-color:rgb(248 113 113 / var(--tw-bg-opacity))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity))}.bg-red-600{--tw-bg-opacity: 1;background-color:rgb(220 38 38 / var(--tw-bg-opacity))}.bg-teal-400{--tw-bg-opacity: 1;background-color:rgb(45 212 191 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-yellow-400{--tw-bg-opacity: 1;background-color:rgb(250 204 21 / var(--tw-bg-opacity))}.bg-opacity-50{--tw-bg-opacity: .5}.bg-opacity-80{--tw-bg-opacity: .8}.fill-black{fill:#000}.object-contain{-o-object-fit:contain;object-fit:contain}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.\\!py-0\\.5{padding-top:.125rem!important;padding-bottom:.125rem!important}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\\.5{padding-top:.625rem;padding-bottom:.625rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pr-3{padding-right:.75rem}.ps-11{padding-inline-start:2.75rem}.ps-3\\.5{padding-inline-start:.875rem}.text-left{text-align:left}.text-center{text-align:center}.text-end{text-align:end}.align-bottom{vertical-align:bottom}.\\!text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\\[10px\\]{font-size:10px}.text-\\[12px\\]{font-size:12px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg\\/5{font-size:1.125rem;line-height:1.25rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-sm\\/3{font-size:.875rem;line-height:.75rem}.text-xs,.text-xs\\/4{font-size:.75rem;line-height:1rem}.\\!font-medium{font-weight:500!important}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-blue-500{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity))}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity))}.text-red-400{--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity))}.text-slate-50{--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity))}.text-teal-600{--tw-text-opacity: 1;color:rgb(13 148 136 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-yellow-600{--tw-text-opacity: 1;color:rgb(202 138 4 / var(--tw-text-opacity))}.no-underline{text-decoration-line:none}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity))}.opacity-0{opacity:0}.opacity-75{opacity:.75}.opacity-80{opacity:.8}.\\!shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1) !important;--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color) !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important}.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)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--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(3px + 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)}.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)}.ring-white{--tw-ring-opacity: 1;--tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity))}.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)}.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)}.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)}.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}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-500{animation-duration:.5s}.running{animation-play-state:running}:host,#deskcord-shadow-container{overflow-x:hidden;--background: 0 0% 100%;--foreground: 222.2 84% 4.9%;--card: 0 0% 100%;--card-foreground: 222.2 84% 4.9%;--popover: 0 0% 100%;--popover-foreground: 222.2 84% 4.9%;--primary: 222.2 47.4% 11.2%;--primary-foreground: 210 40% 98%;--secondary: 210 40% 96.1%;--secondary-foreground: 222.2 47.4% 11.2%;--muted: 210 40% 96.1%;--muted-foreground: 215.4 16.3% 46.9%;--accent: 210 40% 96.1%;--accent-foreground: 222.2 47.4% 11.2%;--destructive: 0 84.2% 60.2%;--destructive-foreground: 210 40% 98%;--border: 214.3 31.8% 91.4%;--input: 214.3 31.8% 91.4%;--ring: 222.2 84% 4.9%;--radius: .5rem;--chart-1: 12 76% 61%;--chart-2: 173 58% 39%;--chart-3: 197 37% 24%;--chart-4: 43 74% 66%;--chart-5: 27 87% 67%}.dark,:host(.dark) #deskcord-shadow-container{--background: 222.2 84% 4.9%;--foreground: 210 40% 98%;--card: 222.2 84% 4.9%;--card-foreground: 210 40% 98%;--popover: 222.2 84% 4.9%;--popover-foreground: 210 40% 98%;--primary: 210 40% 98%;--primary-foreground: 222.2 47.4% 11.2%;--secondary: 217.2 32.6% 17.5%;--secondary-foreground: 210 40% 98%;--muted: 217.2 32.6% 17.5%;--muted-foreground: 215 20.2% 65.1%;--accent: 217.2 32.6% 17.5%;--accent-foreground: 210 40% 98%;--destructive: 0 62.8% 30.6%;--destructive-foreground: 210 40% 98%;--border: 217.2 32.6% 17.5%;--input: 217.2 32.6% 17.5%;--ring: 212.7 26.8% 83.9%;--chart-1: 220 70% 50%;--chart-2: 160 60% 45%;--chart-3: 30 80% 55%;--chart-4: 280 65% 60%;--chart-5: 340 75% 55%}.hover\\:scale-105:hover{--tw-scale-x: 1.05;--tw-scale-y: 1.05;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))}.hover\\:scale-110:hover{--tw-scale-x: 1.1;--tw-scale-y: 1.1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:bg-\\[\\#5B6EAB\\]:hover{--tw-bg-opacity: 1;background-color:rgb(91 110 171 / var(--tw-bg-opacity))}.hover\\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.hover\\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.hover\\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity))}.hover\\:text-blue-500:hover{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.hover\\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.hover\\:text-gray-800:hover{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity))}.hover\\:text-white:hover{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.hover\\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\\:z-10:focus{z-index:10}.focus\\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity))}.focus\\:border-transparent:focus{border-color:transparent}.focus\\:bg-gray-100:focus{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\\:ring-2:focus{--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)}.focus\\:ring-\\[\\#7289DA\\]:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(114 137 218 / var(--tw-ring-opacity))}.focus\\:ring-blue-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity))}.focus\\:ring-red-500:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(239 68 68 / var(--tw-ring-opacity))}.focus\\:ring-opacity-50:focus{--tw-ring-opacity: .5}.active\\:scale-95:active{--tw-scale-x: .95;--tw-scale-y: .95;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))}.disabled\\:pointer-events-none:disabled{pointer-events:none}.disabled\\:transform-none:disabled{transform:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-gray-100:disabled{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity))}.disabled\\:text-gray-500:disabled{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}.disabled\\:opacity-50:disabled{opacity:.5}.selected .hs-combo-box-selected\\:block,.selected.hs-combo-box-selected\\:block{display:block}.complete .hs-file-upload-complete\\:bg-green-600,.complete.hs-file-upload-complete\\:bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.dark\\:\\!border-neutral-700:is(.dark *){--tw-border-opacity: 1 !important;border-color:rgb(64 64 64 / var(--tw-border-opacity))!important}.dark\\:border-neutral-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(82 82 82 / var(--tw-border-opacity))}.dark\\:border-neutral-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(64 64 64 / var(--tw-border-opacity))}.dark\\:\\!bg-neutral-800:is(.dark *){--tw-bg-opacity: 1 !important;background-color:rgb(38 38 38 / var(--tw-bg-opacity))!important}.dark\\:bg-blue-500:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity))}.dark\\:bg-neutral-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity))}.dark\\:bg-neutral-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:bg-neutral-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(23 23 23 / var(--tw-bg-opacity))}.dark\\:bg-opacity-80:is(.dark *){--tw-bg-opacity: .8}.dark\\:fill-neutral-200:is(.dark *){fill:#e5e5e5}.dark\\:text-blue-500:is(.dark *){--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity))}.dark\\:text-neutral-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:text-neutral-400:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:text-neutral-500:is(.dark *){--tw-text-opacity: 1;color:rgb(115 115 115 / var(--tw-text-opacity))}.dark\\:text-neutral-600:is(.dark *){--tw-text-opacity: 1;color:rgb(82 82 82 / var(--tw-text-opacity))}.dark\\:text-white:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:placeholder-neutral-500:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(115 115 115 / var(--tw-placeholder-opacity))}.dark\\:ring-neutral-900:is(.dark *){--tw-ring-opacity: 1;--tw-ring-color: rgb(23 23 23 / var(--tw-ring-opacity))}.dark\\:hover\\:bg-neutral-800:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}.dark\\:hover\\:text-neutral-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 229 229 / var(--tw-text-opacity))}.dark\\:hover\\:text-neutral-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(163 163 163 / var(--tw-text-opacity))}.dark\\:focus\\:bg-neutral-800:focus:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(38 38 38 / var(--tw-bg-opacity))}@media (min-width: 640px){.sm\\:gap-x-4{-moz-column-gap:1rem;column-gap:1rem}}@media (min-width: 768px){.md\\:text-sm{font-size:.875rem;line-height:1.25rem}}',Jm=".yarl__fullsize{height:100%;width:100%}.yarl__relative{position:relative}.yarl__portal{bottom:0;left:0;opacity:0;overflow:hidden;position:fixed;right:0;top:0;transition:opacity var(--yarl__fade_animation_duration,.25s) var(--yarl__fade_animation_timing_function,ease);z-index:var(--yarl__portal_zindex,9999)}.yarl__portal_open{opacity:1}.yarl__container{background-color:var(--yarl__container_background_color,var(--yarl__color_backdrop,#000));bottom:0;left:0;outline:none;overflow:hidden;overscroll-behavior:var(--yarl__controller_overscroll_behavior,contain);position:absolute;right:0;top:0;touch-action:var(--yarl__controller_touch_action,none);-webkit-user-select:none;-moz-user-select:none;user-select:none}.yarl__carousel{align-content:center;align-items:stretch;display:flex;flex:0 0 auto;height:100%;justify-content:center;opacity:var(--yarl__pull_opacity,1);transform:translate(var(--yarl__swipe_offset,0),var(--yarl__pull_offset,0));width:calc(100% + (var(--yarl__carousel_slides_count) - 1)*(100% + var(--yarl__carousel_spacing_px, 0)*1px + var(--yarl__carousel_spacing_percent, 0)*1%))}.yarl__carousel_with_slides{-moz-column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%);column-gap:calc(var(--yarl__carousel_spacing_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_spacing_percent, 0)*1%)}.yarl__flex_center{align-content:center;align-items:center;display:flex;justify-content:center}.yarl__slide{flex:1;overflow:hidden;padding:calc(var(--yarl__carousel_padding_px, 0)*1px + 100/(var(--yarl__carousel_slides_count)*100 + (var(--yarl__carousel_slides_count) - 1)*var(--yarl__carousel_spacing_percent, 0))*var(--yarl__carousel_padding_percent, 0)*1%);position:relative}[dir=rtl] .yarl__slide{--yarl__direction:-1}.yarl__slide_image{max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;touch-action:var(--yarl__controller_touch_action,none);-moz-user-select:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}.yarl__slide_image_cover{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.yarl__slide_image_loading{opacity:0}@media screen and (min-width:800px){.yarl__slide_wrapper:not(.yarl__slide_wrapper_interactive) .yarl__slide_image{-webkit-backface-visibility:hidden;-webkit-transform:translateZ(0);-webkit-transform-style:preserve-3d}}.yarl__slide_placeholder{left:50%;line-height:0;position:absolute;top:50%;transform:translate(-50%) translateY(-50%)}.yarl__slide_loading{animation:yarl__delayed_fadein 1s linear;color:var(--yarl__slide_icon_loading_color,var(--yarl__color_button,hsla(0,0%,100%,.8)))}.yarl__slide_loading line{animation:yarl__stroke_opacity 1s linear infinite}.yarl__slide_loading line:first-of-type{animation-delay:-1.875s}.yarl__slide_loading line:nth-of-type(2){animation-delay:-1.75s}.yarl__slide_loading line:nth-of-type(3){animation-delay:-1.625s}.yarl__slide_loading line:nth-of-type(4){animation-delay:-1.5s}.yarl__slide_loading line:nth-of-type(5){animation-delay:-1.375s}.yarl__slide_loading line:nth-of-type(6){animation-delay:-1.25s}.yarl__slide_loading line:nth-of-type(7){animation-delay:-1.125s}.yarl__slide_loading line:nth-of-type(8){animation-delay:-1s}.yarl__slide_error{color:var(--yarl__slide_icon_error_color,red);height:var(--yarl__slide_icon_error_size,48px);width:var(--yarl__slide_icon_error_size,48px)}@media (prefers-reduced-motion){.yarl__portal,.yarl__slide{transition:unset}.yarl__slide_loading,.yarl__slide_loading line{animation:unset}}.yarl__toolbar{bottom:auto;display:flex;justify-content:flex-end;left:auto;padding:var(--yarl__toolbar_padding,8px);position:absolute;right:0;top:0}[dir=rtl] .yarl__toolbar{bottom:auto;left:0;right:auto;top:0}.yarl__icon{height:var(--yarl__icon_size,32px);width:var(--yarl__icon_size,32px)}.yarl__button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:var(--yarl__button_background_color,transparent);border:var(--yarl__button_border,0);color:var(--yarl__color_button,hsla(0,0%,100%,.8));cursor:pointer;filter:var(--yarl__button_filter,drop-shadow(2px 2px 2px rgba(0,0,0,.8)));line-height:0;margin:var(--yarl__button_margin,0);outline:none;padding:var(--yarl__button_padding,8px);-webkit-tap-highlight-color:transparent}.yarl__button:focus{color:var(--yarl__color_button_active,#fff)}.yarl__button:focus:not(:focus-visible){color:var(--yarl__color_button,hsla(0,0%,100%,.8))}.yarl__button:focus-visible{color:var(--yarl__color_button_active,#fff)}@media (hover:hover){.yarl__button:focus-visible:hover,.yarl__button:focus:hover,.yarl__button:hover{color:var(--yarl__color_button_active,#fff)}}.yarl__button:disabled{color:var(--yarl__color_button_disabled,hsla(0,0%,100%,.4));cursor:default}.yarl__navigation_next,.yarl__navigation_prev{padding:var(--yarl__navigation_button_padding,24px 16px);position:absolute;top:50%;transform:translateY(-50%)}.yarl__navigation_prev{left:0}[dir=rtl] .yarl__navigation_prev{left:unset;right:0;transform:translateY(-50%) rotate(180deg)}.yarl__navigation_next{right:0}[dir=rtl] .yarl__navigation_next{left:0;right:unset;transform:translateY(-50%) rotate(180deg)}.yarl__no_scroll{height:100%;overflow:hidden;overscroll-behavior:none}@keyframes yarl__delayed_fadein{0%{opacity:0}80%{opacity:0}to{opacity:1}}@keyframes yarl__stroke_opacity{0%{stroke-opacity:1}to{stroke-opacity:.125}}",wo=te({});function bo(t){const e=it(null);return e.current===null&&(e.current=t()),e.current}const _o=typeof window<"u",bl=_o?Re:ut,$r=te(null);function xo(t,e){t.indexOf(e)===-1&&t.push(e)}function So(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Me=(t,e,n)=>n>e?e:n<t?t:n;let Ur=()=>{};const Ne={},_l=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function xl(t){return typeof t=="object"&&t!==null}const Sl=t=>/^0[^.\s]+$/u.test(t);function Eo(t){let e;return()=>(e===void 0&&(e=t()),e)}const ue=t=>t,Zm=(t,e)=>n=>e(t(n)),tr=(...t)=>t.reduce(Zm),er=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Ao{constructor(){this.subscriptions=[]}add(e){return xo(this.subscriptions,e),()=>So(this.subscriptions,e)}notify(e,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(e,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const be=t=>t*1e3,_e=t=>t/1e3;function El(t,e){return e?t*(1e3/e):0}const Al=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Qm=1e-7,ty=12;function ey(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=Al(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>Qm&&++a<ty);return s}function nr(t,e,n,r){if(t===e&&n===r)return ue;const i=o=>ey(o,0,1,t,n);return o=>o===0||o===1?o:Al(i(o),e,r)}const Cl=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Tl=t=>e=>1-t(1-e),Pl=nr(.33,1.53,.69,.99),Co=Tl(Pl),kl=Cl(Co),Ol=t=>(t*=2)<1?.5*Co(t):.5*(2-Math.pow(2,-10*(t-1))),To=t=>1-Math.sin(Math.acos(t)),Il=Tl(To),Rl=Cl(To),ny=nr(.42,0,1,1),ry=nr(0,0,.58,1),Ml=nr(.42,0,.58,1),iy=t=>Array.isArray(t)&&typeof t[0]!="number",Nl=t=>Array.isArray(t)&&typeof t[0]=="number",Dl={linear:ue,easeIn:ny,easeInOut:Ml,easeOut:ry,circIn:To,circInOut:Rl,circOut:Il,backIn:Co,backInOut:kl,backOut:Pl,anticipate:Ol},oy=t=>typeof t=="string",Bl=t=>{if(Nl(t)){Ur(t.length===4);const[e,n,r,i]=t;return nr(e,n,r,i)}else if(oy(t))return Ur(Dl[t]!==void 0),Dl[t];return t},zr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Fl={value:null,addProjectionMetrics:null};function sy(t,e){let n=new Set,r=new Set,i=!1,o=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function f(h){s.has(h)&&(c.schedule(h),t()),l++,h(a)}const c={schedule:(h,m=!1,y=!1)=>{const w=y&&i?n:r;return m&&s.add(h),w.has(h)||w.add(h),h},cancel:h=>{r.delete(h),s.delete(h)},process:h=>{if(a=h,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(f),e&&Fl.value&&Fl.value.frameloop[e].push(l),l=0,n.clear(),i=!1,o&&(o=!1,c.process(h))}};return c}const ay=40;function Ll(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=zr.reduce((E,M)=>(E[M]=sy(o,e?M:void 0),E),{}),{setup:a,read:l,resolveKeyframes:f,preUpdate:c,update:h,preRender:m,render:y,postRender:b}=s,w=()=>{const E=Ne.useManualTiming?i.timestamp:performance.now();n=!1,Ne.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(E-i.timestamp,ay),1)),i.timestamp=E,i.isProcessing=!0,a.process(i),l.process(i),f.process(i),c.process(i),h.process(i),m.process(i),y.process(i),b.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(w))},T=()=>{n=!0,r=!0,i.isProcessing||t(w)};return{schedule:zr.reduce((E,M)=>{const O=s[M];return E[M]=(j,B=!1,F=!1)=>(n||T(),O.schedule(j,B,F)),E},{}),cancel:E=>{for(let M=0;M<zr.length;M++)s[zr[M]].cancel(E)},state:i,steps:s}}const{schedule:Ot,cancel:$e,state:Xt,steps:Po}=Ll(typeof requestAnimationFrame<"u"?requestAnimationFrame:ue,!0);let Wr;function cy(){Wr=void 0}const ie={now:()=>(Wr===void 0&&ie.set(Xt.isProcessing||Ne.useManualTiming?Xt.timestamp:performance.now()),Wr),set:t=>{Wr=t,queueMicrotask(cy)}},jl=t=>e=>typeof e=="string"&&e.startsWith(t),ko=jl("--"),ly=jl("var(--"),Oo=t=>ly(t)?uy.test(t.split("/*")[0].trim()):!1,uy=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,vn={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},rr={...vn,transform:t=>Me(0,1,t)},qr={...vn,default:1},ir=t=>Math.round(t*1e5)/1e5,Io=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function fy(t){return t==null}const dy=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ro=(t,e)=>n=>!!(typeof n=="string"&&dy.test(n)&&n.startsWith(t)||e&&!fy(n)&&Object.prototype.hasOwnProperty.call(n,e)),Vl=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Io);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},hy=t=>Me(0,255,t),Mo={...vn,transform:t=>Math.round(hy(t))},Ge={test:Ro("rgb","red"),parse:Vl("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+Mo.transform(t)+", "+Mo.transform(e)+", "+Mo.transform(n)+", "+ir(rr.transform(r))+")"};function py(t){let e="",n="",r="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),r=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),r=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const No={test:Ro("#"),parse:py,transform:Ge.transform},or=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),Ue=or("deg"),xe=or("%"),ot=or("px"),my=or("vh"),yy=or("vw"),$l={...xe,parse:t=>xe.parse(t)/100,transform:t=>xe.transform(t*100)},wn={test:Ro("hsl","hue"),parse:Vl("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+xe.transform(ir(e))+", "+xe.transform(ir(n))+", "+ir(rr.transform(r))+")"},$t={test:t=>Ge.test(t)||No.test(t)||wn.test(t),parse:t=>Ge.test(t)?Ge.parse(t):wn.test(t)?wn.parse(t):No.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ge.transform(t):wn.transform(t),getAnimatableNone:t=>{const e=$t.parse(t);return e.alpha=0,$t.transform(e)}},gy=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vy(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Io))==null?void 0:e.length)||0)+(((n=t.match(gy))==null?void 0:n.length)||0)>0}const Ul="number",zl="color",wy="var",by="var(",Wl="${}",_y=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function sr(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(_y,l=>($t.test(l)?(r.color.push(o),i.push(zl),n.push($t.parse(l))):l.startsWith(by)?(r.var.push(o),i.push(wy),n.push(l)):(r.number.push(o),i.push(Ul),n.push(parseFloat(l))),++o,Wl)).split(Wl);return{values:n,split:a,indexes:r,types:i}}function ql(t){return sr(t).values}function Hl(t){const{split:e,types:n}=sr(t),r=e.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=e[s],i[s]!==void 0){const a=n[s];a===Ul?o+=ir(i[s]):a===zl?o+=$t.transform(i[s]):o+=i[s]}return o}}const xy=t=>typeof t=="number"?0:$t.test(t)?$t.getAnimatableNone(t):t;function Sy(t){const e=ql(t);return Hl(t)(e.map(xy))}const ze={test:vy,parse:ql,createTransformer:Hl,getAnimatableNone:Sy};function Do(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Ey({hue:t,saturation:e,lightness:n,alpha:r}){t/=360,e/=100,n/=100;let i=0,o=0,s=0;if(!e)i=o=s=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=Do(l,a,t+1/3),o=Do(l,a,t),s=Do(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function Hr(t,e){return n=>n>0?e:t}const Mt=(t,e,n)=>t+(e-t)*n,Bo=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Ay=[No,Ge,wn],Cy=t=>Ay.find(e=>e.test(t));function Gl(t){const e=Cy(t);if(!e)return!1;let n=e.parse(t);return e===wn&&(n=Ey(n)),n}const Kl=(t,e)=>{const n=Gl(t),r=Gl(e);if(!n||!r)return Hr(t,e);const i={...n};return o=>(i.red=Bo(n.red,r.red,o),i.green=Bo(n.green,r.green,o),i.blue=Bo(n.blue,r.blue,o),i.alpha=Mt(n.alpha,r.alpha,o),Ge.transform(i))},Fo=new Set(["none","hidden"]);function Ty(t,e){return Fo.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Py(t,e){return n=>Mt(t,e,n)}function Lo(t){return typeof t=="number"?Py:typeof t=="string"?Oo(t)?Hr:$t.test(t)?Kl:Iy:Array.isArray(t)?Yl:typeof t=="object"?$t.test(t)?Kl:ky:Hr}function Yl(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Lo(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function ky(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Lo(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Oy(t,e){const n=[],r={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],s=t.indexes[o][r[o]],a=t.values[s]??0;n[i]=a,r[o]++}return n}const Iy=(t,e)=>{const n=ze.createTransformer(e),r=sr(t),i=sr(e);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Fo.has(t)&&!i.values.length||Fo.has(e)&&!r.values.length?Ty(t,e):tr(Yl(Oy(r,i),i.values),n):Hr(t,e)};function Xl(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?Mt(t,e,n):Lo(t)(t,e)}const Ry=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>Ot.update(e,n),stop:()=>$e(e),now:()=>Xt.isProcessing?Xt.timestamp:ie.now()}},Jl=(t,e,n=10)=>{let r="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)r+=Math.round(t(o/(i-1))*1e4)/1e4+", ";return`linear(${r.substring(0,r.length-2)})`},Gr=2e4;function jo(t){let e=0;const n=50;let r=t.next(e);for(;!r.done&&e<Gr;)e+=n,r=t.next(e);return e>=Gr?1/0:e}function My(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(jo(r),Gr);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:_e(i)}}const Ny=5;function Zl(t,e,n){const r=Math.max(e-Ny,0);return El(n-t(r),e-r)}const Dt={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Vo=.001;function Dy({duration:t=Dt.duration,bounce:e=Dt.bounce,velocity:n=Dt.velocity,mass:r=Dt.mass}){let i,o,s=1-e;s=Me(Dt.minDamping,Dt.maxDamping,s),t=Me(Dt.minDuration,Dt.maxDuration,_e(t)),s<1?(i=f=>{const c=f*s,h=c*t,m=c-n,y=$o(f,s),b=Math.exp(-h);return Vo-m/y*b},o=f=>{const h=f*s*t,m=h*n+n,y=Math.pow(s,2)*Math.pow(f,2)*t,b=Math.exp(-h),w=$o(Math.pow(f,2),s);return(-i(f)+Vo>0?-1:1)*((m-y)*b)/w}):(i=f=>{const c=Math.exp(-f*t),h=(f-n)*t+1;return-Vo+c*h},o=f=>{const c=Math.exp(-f*t),h=(n-f)*(t*t);return c*h});const a=5/t,l=Fy(i,o,a);if(t=be(t),isNaN(l))return{stiffness:Dt.stiffness,damping:Dt.damping,duration:t};{const f=Math.pow(l,2)*r;return{stiffness:f,damping:s*2*Math.sqrt(r*f),duration:t}}}const By=12;function Fy(t,e,n){let r=n;for(let i=1;i<By;i++)r=r-t(r)/e(r);return r}function $o(t,e){return t*Math.sqrt(1-e*e)}const Ly=["duration","bounce"],jy=["stiffness","damping","mass"];function Ql(t,e){return e.some(n=>t[n]!==void 0)}function Vy(t){let e={velocity:Dt.velocity,stiffness:Dt.stiffness,damping:Dt.damping,mass:Dt.mass,isResolvedFromDuration:!1,...t};if(!Ql(t,jy)&&Ql(t,Ly))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Me(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:Dt.mass,stiffness:i,damping:o}}else{const n=Dy(t);e={...e,...n,mass:Dt.mass},e.isResolvedFromDuration=!0}return e}function Kr(t=Dt.visualDuration,e=Dt.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:f,mass:c,duration:h,velocity:m,isResolvedFromDuration:y}=Vy({...n,velocity:-_e(n.velocity||0)}),b=m||0,w=f/(2*Math.sqrt(l*c)),T=s-o,x=_e(Math.sqrt(l/c)),v=Math.abs(T)<5;r||(r=v?Dt.restSpeed.granular:Dt.restSpeed.default),i||(i=v?Dt.restDelta.granular:Dt.restDelta.default);let E;if(w<1){const O=$o(x,w);E=j=>{const B=Math.exp(-w*x*j);return s-B*((b+w*x*T)/O*Math.sin(O*j)+T*Math.cos(O*j))}}else if(w===1)E=O=>s-Math.exp(-x*O)*(T+(b+x*T)*O);else{const O=x*Math.sqrt(w*w-1);E=j=>{const B=Math.exp(-w*x*j),F=Math.min(O*j,300);return s-B*((b+w*x*T)*Math.sinh(F)+O*T*Math.cosh(F))/O}}const M={calculatedDuration:y&&h||null,next:O=>{const j=E(O);if(y)a.done=O>=h;else{let B=O===0?b:0;w<1&&(B=O===0?be(b):Zl(E,O,j));const F=Math.abs(B)<=r,L=Math.abs(s-j)<=i;a.done=F&&L}return a.value=a.done?s:j,a},toString:()=>{const O=Math.min(jo(M),Gr),j=Jl(B=>M.next(O*B).value,O,30);return O+"ms "+j},toTransition:()=>{}};return M}Kr.applyToOptions=t=>{const e=My(t,100,Kr);return t.ease=e.ease,t.duration=be(e.duration),t.type="keyframes",t};function Uo({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:f=.5,restSpeed:c}){const h=t[0],m={done:!1,value:h},y=F=>a!==void 0&&F<a||l!==void 0&&F>l,b=F=>a===void 0?l:l===void 0||Math.abs(a-F)<Math.abs(l-F)?a:l;let w=n*e;const T=h+w,x=s===void 0?T:s(T);x!==T&&(w=x-h);const v=F=>-w*Math.exp(-F/r),E=F=>x+v(F),M=F=>{const L=v(F),Y=E(F);m.done=Math.abs(L)<=f,m.value=m.done?x:Y};let O,j;const B=F=>{y(m.value)&&(O=F,j=Kr({keyframes:[m.value,b(m.value)],velocity:Zl(E,F,m.value),damping:i,stiffness:o,restDelta:f,restSpeed:c}))};return B(0),{calculatedDuration:null,next:F=>{let L=!1;return!j&&O===void 0&&(L=!0,M(F),B(F)),O!==void 0&&F>=O?j.next(F-O):(!L&&M(F),m)}}}function $y(t,e,n){const r=[],i=n||Ne.mix||Xl,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const l=Array.isArray(e)?e[s]||ue:e;a=tr(l,a)}r.push(a)}return r}function Uy(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(Ur(o===e.length),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const s=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=$y(e,r,i),l=a.length,f=c=>{if(s&&c<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const m=er(t[h],t[h+1],c);return a[h](m)};return n?c=>f(Me(t[0],t[o-1],c)):f}function zy(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=er(0,e,r);t.push(Mt(n,1,i))}}function Wy(t){const e=[0];return zy(e,t.length-1),e}function qy(t,e){return t.map(n=>n*e)}function Hy(t,e){return t.map(()=>e||Ml).splice(0,t.length-1)}function ar({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=iy(r)?r.map(Bl):Bl(r),o={done:!1,value:e[0]},s=qy(n&&n.length===e.length?n:Wy(e),t),a=Uy(s,e,{ease:Array.isArray(i)?i:Hy(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Gy=t=>t!==null;function zo(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(Gy),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Ky={decay:Uo,inertia:Uo,tween:ar,keyframes:ar,spring:Kr};function tu(t){typeof t.type=="string"&&(t.type=Ky[t.type])}class Wo{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Yy=t=>t/100;class qo extends Wo{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var r,i;const{motionValue:n}=this.options;n&&n.updatedAt!==ie.now()&&this.tick(ie.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(i=(r=this.options).onStop)==null||i.call(r))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;tu(e);const{type:n=ar,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const l=n||ar;l!==ar&&typeof a[0]!="number"&&(this.mixKeyframes=tr(Yy,Xl(a[0],a[1])),a=[0,100]);const f=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-s})),f.calculatedDuration===null&&(f.calculatedDuration=jo(f));const{calculatedDuration:c}=f;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=f}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:r,totalDuration:i,mixKeyframes:o,mirroredGenerator:s,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return r.next(0);const{delay:f=0,keyframes:c,repeat:h,repeatType:m,repeatDelay:y,type:b,onUpdate:w,finalKeyframe:T}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const x=this.currentTime-f*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let E=this.currentTime,M=r;if(h){const F=Math.min(this.currentTime,i)/a;let L=Math.floor(F),Y=F%1;!Y&&F>=1&&(Y=1),Y===1&&L--,L=Math.min(L,h+1),!!(L%2)&&(m==="reverse"?(Y=1-Y,y&&(Y-=y/a)):m==="mirror"&&(M=s)),E=Me(0,1,Y)*a}const O=v?{done:!1,value:c[0]}:M.next(E);o&&(O.value=o(O.value));let{done:j}=O;!v&&l!==null&&(j=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const B=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&j);return B&&b!==Uo&&(O.value=zo(c,this.options,T,this.speed)),w&&w(O.value),B&&this.finish(),O}then(e,n){return this.finished.then(e,n)}get duration(){return _e(this.calculatedDuration)}get time(){return _e(this.currentTime)}set time(e){var n;e=be(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),(n=this.driver)==null||n.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(ie.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=_e(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Ry,startTime:n}=this.options;this.driver||(this.driver=e(s=>this.tick(s))),(o=(i=this.options).onPlay)==null||o.call(i);const r=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=r):this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime||(this.startTime=n??r),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(ie.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function Xy(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ke=t=>t*180/Math.PI,Ho=t=>{const e=Ke(Math.atan2(t[1],t[0]));return Go(e)},Jy={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Ho,rotateZ:Ho,skewX:t=>Ke(Math.atan(t[1])),skewY:t=>Ke(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Go=t=>(t=t%360,t<0&&(t+=360),t),eu=Ho,nu=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),ru=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Zy={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:nu,scaleY:ru,scale:t=>(nu(t)+ru(t))/2,rotateX:t=>Go(Ke(Math.atan2(t[6],t[5]))),rotateY:t=>Go(Ke(Math.atan2(-t[2],t[0]))),rotateZ:eu,rotate:eu,skewX:t=>Ke(Math.atan(t[4])),skewY:t=>Ke(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Ko(t){return t.includes("scale")?1:0}function Yo(t,e){if(!t||t==="none")return Ko(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Zy,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Jy,i=a}if(!i)return Ko(e);const o=r[e],s=i[1].split(",").map(tg);return typeof o=="function"?o(s):s[o]}const Qy=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Yo(n,e)};function tg(t){return parseFloat(t.trim())}const bn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],_n=new Set(bn),iu=t=>t===vn||t===ot,eg=new Set(["x","y","z"]),ng=bn.filter(t=>!eg.has(t));function rg(t){const e=[];return ng.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Ye={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>Yo(e,"x"),y:(t,{transform:e})=>Yo(e,"y")};Ye.translateX=Ye.x,Ye.translateY=Ye.y;const Xe=new Set;let Xo=!1,Jo=!1,Zo=!1;function ou(){if(Jo){const t=Array.from(Xe).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=rg(r);i.length&&(n.set(r,i),r.render())}),t.forEach(r=>r.measureInitialState()),e.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,s])=>{var a;(a=r.getValue(o))==null||a.set(s)})}),t.forEach(r=>r.measureEndState()),t.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Jo=!1,Xo=!1,Xe.forEach(t=>t.complete(Zo)),Xe.clear()}function su(){Xe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Jo=!0)})}function ig(){Zo=!0,su(),ou(),Zo=!1}class Qo{constructor(e,n,r,i,o,s=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.state="scheduled",this.isAsync?(Xe.add(this),Xo||(Xo=!0,Ot.read(su),Ot.resolveKeyframes(ou))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:r,motionValue:i}=this;if(e[0]===null){const o=i==null?void 0:i.get(),s=e[e.length-1];if(o!==void 0)e[0]=o;else if(r&&n){const a=r.readValue(n,s);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=s),i&&o===void 0&&i.set(e[0])}Xy(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Xe.delete(this)}cancel(){this.state==="scheduled"&&(Xe.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const og=t=>t.startsWith("--");function sg(t,e,n){og(e)?t.style.setProperty(e,n):t.style[e]=n}const ag=Eo(()=>window.ScrollTimeline!==void 0),cg={};function lg(t,e){const n=Eo(t);return()=>cg[e]??n()}const au=lg(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cr=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,cu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:cr([0,.65,.55,1]),circOut:cr([.55,0,1,.45]),backIn:cr([.31,.01,.66,-.59]),backOut:cr([.33,1.53,.69,.99])};function lu(t,e){if(t)return typeof t=="function"?au()?Jl(t,e):"ease-out":Nl(t)?cr(t):Array.isArray(t)?t.map(n=>lu(n,e)||cu.easeOut):cu[t]}function ug(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:l}={},f=void 0){const c={[e]:n};l&&(c.offset=l);const h=lu(a,i);Array.isArray(h)&&(c.easing=h);const m={delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return f&&(m.pseudoElement=f),t.animate(c,m)}function uu(t){return typeof t=="function"&&"applyToOptions"in t}function fg({type:t,...e}){return uu(t)&&au()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class dg extends Wo{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:r,keyframes:i,pseudoElement:o,allowFlatten:s=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,Ur(typeof e.type!="string");const f=fg(e);this.animation=ug(n,r,i,f,o),f.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const c=zo(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(c):sg(n,r,c),this.animation.cancel()}l==null||l(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e,n;this.isPseudoElement||(n=(e=this.animation).commitStyles)==null||n.call(e)}get duration(){var n,r;const e=((r=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:r.call(n).duration)||0;return _e(Number(e))}get time(){return _e(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=be(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){var r;return this.allowFlatten&&((r=this.animation.effect)==null||r.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&ag()?(this.animation.timeline=e,ue):n(this)}}const fu={anticipate:Ol,backInOut:kl,circInOut:Rl};function hg(t){return t in fu}function pg(t){typeof t.ease=="string"&&hg(t.ease)&&(t.ease=fu[t.ease])}const du=10;class mg extends dg{constructor(e){pg(e),tu(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:r,onComplete:i,element:o,...s}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new qo({...s,autoplay:!1}),l=be(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-du).value,a.sample(l).value,du),a.stop()}}const hu=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ze.test(t)||t==="0")&&!t.startsWith("url("));function yg(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function gg(t,e,n,r){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],s=hu(i,e),a=hu(o,e);return!s||!a?!1:yg(t)||(n==="spring"||uu(n))&&r}function ts(t){t.duration=0,t.type}const vg=new Set(["opacity","clipPath","filter","transform"]),wg=Eo(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function bg(t){var c;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;if(!(((c=e==null?void 0:e.owner)==null?void 0:c.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:f}=e.owner.getProps();return wg()&&n&&vg.has(n)&&(n!=="transform"||!f)&&!l&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const _g=40;class xg extends Wo{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:l,motionValue:f,element:c,...h}){var b;super(),this.stop=()=>{var w,T;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(T=this.keyframeResolver)==null||T.cancel()},this.createdAt=ie.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:l,motionValue:f,element:c,...h},y=(c==null?void 0:c.KeyframeResolver)||Qo;this.keyframeResolver=new y(a,(w,T,x)=>this.onKeyframesResolved(w,T,m,!x),l,f,c),(b=this.keyframeResolver)==null||b.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:l,isHandoff:f,onUpdate:c}=r;this.resolvedAt=ie.now(),gg(e,o,s,a)||((Ne.instantAnimations||!l)&&(c==null||c(zo(e,r,n))),e[0]=e[e.length-1],ts(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>_g?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},y=!f&&bg(m)?new mg({...m,element:m.motionValue.owner.current}):new qo(m);y.finished.then(()=>this.notifyFinished()).catch(ue),this.pendingTimeline&&(this.stopTimeline=y.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=y}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),ig()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}const Sg=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Eg(t){const e=Sg.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function pu(t,e,n=1){const[r,i]=Eg(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return _l(s)?parseFloat(s):s}return Oo(i)?pu(i,e,n+1):i}function es(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const mu=new Set(["width","height","top","left","right","bottom",...bn]),Ag={test:t=>t==="auto",parse:t=>t},yu=t=>e=>e.test(t),gu=[vn,ot,xe,Ue,yy,my,Ag],vu=t=>gu.find(yu(t));function Cg(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Sl(t):!0}const Tg=new Set(["brightness","contrast","saturate","opacity"]);function Pg(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Io)||[];if(!r)return t;const i=n.replace(r,"");let o=Tg.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const kg=/\b([a-z-]*)\(.*?\)/gu,ns={...ze,getAnimatableNone:t=>{const e=t.match(kg);return e?e.map(Pg).join(" "):t}},wu={...vn,transform:Math.round},rs={borderWidth:ot,borderTopWidth:ot,borderRightWidth:ot,borderBottomWidth:ot,borderLeftWidth:ot,borderRadius:ot,radius:ot,borderTopLeftRadius:ot,borderTopRightRadius:ot,borderBottomRightRadius:ot,borderBottomLeftRadius:ot,width:ot,maxWidth:ot,height:ot,maxHeight:ot,top:ot,right:ot,bottom:ot,left:ot,padding:ot,paddingTop:ot,paddingRight:ot,paddingBottom:ot,paddingLeft:ot,margin:ot,marginTop:ot,marginRight:ot,marginBottom:ot,marginLeft:ot,backgroundPositionX:ot,backgroundPositionY:ot,...{rotate:Ue,rotateX:Ue,rotateY:Ue,rotateZ:Ue,scale:qr,scaleX:qr,scaleY:qr,scaleZ:qr,skew:Ue,skewX:Ue,skewY:Ue,distance:ot,translateX:ot,translateY:ot,translateZ:ot,x:ot,y:ot,z:ot,perspective:ot,transformPerspective:ot,opacity:rr,originX:$l,originY:$l,originZ:ot},zIndex:wu,fillOpacity:rr,strokeOpacity:rr,numOctaves:wu},Og={...rs,color:$t,backgroundColor:$t,outlineColor:$t,fill:$t,stroke:$t,borderColor:$t,borderTopColor:$t,borderRightColor:$t,borderBottomColor:$t,borderLeftColor:$t,filter:ns,WebkitFilter:ns},bu=t=>Og[t];function _u(t,e){let n=bu(t);return n!==ns&&(n=ze),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ig=new Set(["auto","none","0"]);function Rg(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!Ig.has(o)&&sr(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=_u(n,i)}class Mg extends Qo{constructor(e,n,r,i,o){super(e,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let f=e[l];if(typeof f=="string"&&(f=f.trim(),Oo(f))){const c=pu(f,n.current);c!==void 0&&(e[l]=c),l===e.length-1&&(this.finalKeyframe=f)}}if(this.resolveNoneKeyframes(),!mu.has(r)||e.length!==2)return;const[i,o]=e,s=vu(i),a=vu(o);if(s!==a)if(iu(s)&&iu(a))for(let l=0;l<e.length;l++){const f=e[l];typeof f=="string"&&(e[l]=parseFloat(f))}else Ye[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Cg(e[i]))&&r.push(i);r.length&&Rg(e,r,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:r}=this;if(!e||!e.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ye[r](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(r,i).jump(i,!1)}measureEndState(){var a;const{element:e,name:n,unresolvedKeyframes:r}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=r.length-1,s=r[o];r[o]=Ye[n](e.measureViewportBox(),window.getComputedStyle(e.current)),s!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=s),(a=this.removedTransforms)!=null&&a.length&&this.removedTransforms.forEach(([l,f])=>{e.getValue(l).set(f)}),this.resolveNoneKeyframes()}}function Ng(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}const xu=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Su(t){return xl(t)&&"offsetHeight"in t}const Eu=30,Dg=t=>!isNaN(parseFloat(t));class Bg{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=ie.now();if(this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&((o=this.events.change)==null||o.notify(this.current),this.dependents))for(const s of this.dependents)s.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=ie.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Dg(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Ao);const r=this.events[e].add(n);return e==="change"?()=>{r(),Ot.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-r}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=ie.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Eu)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Eu);return El(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function xn(t,e){return new Bg(t,e)}const{schedule:is,cancel:w6}=Ll(queueMicrotask,!1),ye={x:!1,y:!1};function Au(){return ye.x||ye.y}function Fg(t){return t==="x"||t==="y"?ye[t]?null:(ye[t]=!0,()=>{ye[t]=!1}):ye.x||ye.y?null:(ye.x=ye.y=!0,()=>{ye.x=ye.y=!1})}function Cu(t,e){const n=Ng(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Tu(t){return!(t.pointerType==="touch"||Au())}function Lg(t,e,n={}){const[r,i,o]=Cu(t,n),s=a=>{if(!Tu(a))return;const{target:l}=a,f=e(l,a);if(typeof f!="function"||!l)return;const c=h=>{Tu(h)&&(f(h),l.removeEventListener("pointerleave",c))};l.addEventListener("pointerleave",c,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const Pu=(t,e)=>e?t===e?!0:Pu(t,e.parentElement):!1,os=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,jg=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Vg(t){return jg.has(t.tagName)||t.tabIndex!==-1}const Yr=new WeakSet;function ku(t){return e=>{e.key==="Enter"&&t(e)}}function ss(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const $g=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=ku(()=>{if(Yr.has(n))return;ss(n,"down");const i=ku(()=>{ss(n,"up")}),o=()=>ss(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",r,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),e)};function Ou(t){return os(t)&&!Au()}function Ug(t,e,n={}){const[r,i,o]=Cu(t,n),s=a=>{const l=a.currentTarget;if(!Ou(a))return;Yr.add(l);const f=e(l,a),c=(y,b)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",m),Yr.has(l)&&Yr.delete(l),Ou(y)&&typeof f=="function"&&f(y,{success:b})},h=y=>{c(y,l===window||l===document||n.useGlobalTarget||Pu(l,y.target))},m=y=>{c(y,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),Su(a)&&(a.addEventListener("focus",f=>$g(f,i)),!Vg(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Iu(t){return xl(t)&&"ownerSVGElement"in t}function zg(t){return Iu(t)&&t.tagName==="svg"}const Zt=t=>!!(t&&t.getVelocity),Wg=[...gu,$t,ze],qg=t=>Wg.find(yu(t)),as=te({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Hg extends se{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=Su(r)&&r.offsetWidth||0,o=this.props.sizeRef.current;o.height=n.offsetHeight||0,o.width=n.offsetWidth||0,o.top=n.offsetTop,o.left=n.offsetLeft,o.right=i-o.width-o.left}return null}componentDidUpdate(){}render(){return this.props.children}}function Gg({children:t,isPresent:e,anchorX:n,root:r}){const i=pn(),o=it(null),s=it({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=Ft(as);return Zn(()=>{const{width:l,height:f,top:c,left:h,right:m}=s.current;if(e||!o.current||!l||!f)return;const y=n==="left"?`left: ${h}`:`right: ${m}`;o.current.dataset.motionPopId=i;const b=document.createElement("style");a&&(b.nonce=a);const w=r??document.head;return w.appendChild(b),b.sheet&&b.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${i}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${l}px !important;
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
${y}px !important;
|
|
7
7
|
top: ${c}px !important;
|
|
8
8
|
}
|
|
9
|
-
`),()=>{w.contains(b)&&w.removeChild(b)}},[e]),k(Hg,{isPresent:e,childRef:o,sizeRef:s,children:vo(t,{ref:o})})}const Kg=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const f=bo(Yg),c=pn();let h=!0,m=Ht(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:y=>{f.set(y,!0);for(const b of f.values())if(!b)return;r&&r()},register:y=>(f.set(y,!1),()=>f.delete(y))}),[n,f,r]);return o&&h&&(m={...m}),Ht(()=>{f.forEach((y,b)=>f.set(b,!1))},[n]),ut(()=>{!n&&!f.size&&r&&r()},[n]),s==="popLayout"&&(t=k(Gg,{isPresent:n,anchorX:a,root:l,children:t})),k(Vr.Provider,{value:m,children:t})};function Yg(){return new Map}function Ru(t=!0){const e=Ft(Vr);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=pn();ut(()=>{if(t)return i(o)},[t]);const s=Ct(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const Xr=t=>t.key||"";function Nu(t){const e=[];return mo.forEach(t,n=>{yn(n)&&e.push(n)}),e}const cs=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[f,c]=Ru(s),h=Ht(()=>Nu(t),[t]),m=s&&!f?[]:h.map(Xr),y=it(!0),b=it(h),w=bo(()=>new Map),[P,x]=gt(h),[v,E]=gt(h);bl(()=>{y.current=!1,b.current=h;for(let j=0;j<v.length;j++){const B=Xr(v[j]);m.includes(B)?w.delete(B):w.get(B)!==!0&&w.set(B,!1)}},[v,m.length,m.join("-")]);const N=[];if(h!==P){let j=[...h];for(let B=0;B<v.length;B++){const F=v[B],L=Xr(F);m.includes(L)||(j.splice(B,0,F),N.push(F))}return o==="wait"&&N.length&&(j=N),E(Nu(j)),x(h),null}const{forceRender:O}=Ft(wo);return k(kt,{children:v.map(j=>{const B=Xr(j),F=s&&!f?!1:h===v||m.includes(B),L=()=>{if(w.has(B))w.set(B,!0);else return;let Y=!0;w.forEach(Z=>{Z||(Y=!1)}),Y&&(O==null||O(),E(b.current),s&&(c==null||c()),r&&r())};return k(Kg,{isPresent:F,initial:!y.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:F?void 0:L,anchorX:a,children:j},B)})})},Mu=te({strict:!1}),Du={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"]},Sn={};for(const t in Du)Sn[t]={isEnabled:e=>Du[t].some(n=>!!e[n])};function Xg(t){for(const e in t)Sn[e]={...Sn[e],...t[e]}}const Jg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Jr(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Jg.has(t)}let Bu=t=>!Jr(t);function Zg(t){typeof t=="function"&&(Bu=e=>e.startsWith("on")?!Jr(e):t(e))}try{Zg(require("@emotion/is-prop-valid").default)}catch{}function Qg(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Bu(i)||n===!0&&Jr(i)||!e&&!Jr(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const Zr=te({});function Qr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function lr(t){return typeof t=="string"||Array.isArray(t)}const ls=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],us=["initial",...ls];function ti(t){return Qr(t.animate)||us.some(e=>lr(t[e]))}function Fu(t){return!!(ti(t)||t.variants)}function t0(t,e){if(ti(t)){const{initial:n,animate:r}=t;return{initial:n===!1||lr(n)?n:void 0,animate:lr(r)?r:void 0}}return t.inherit!==!1?e:{}}function e0(t){const{initial:e,animate:n}=t0(t,Ft(Zr));return Ht(()=>({initial:e,animate:n}),[Lu(e),Lu(n)])}function Lu(t){return Array.isArray(t)?t.join(" "):t}const ur={};function n0(t){for(const e in t)ur[e]=t[e],Co(e)&&(ur[e].isCSSVariable=!0)}function ju(t,{layout:e,layoutId:n}){return _n.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ur[t]||t==="opacity")}const r0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},i0=bn.length;function o0(t,e,n){let r="",i=!0;for(let o=0;o<i0;o++){const s=bn[o],a=t[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const f=xu(a,rs[s]);if(!l){i=!1;const c=r0[s]||s;r+=`${c}(${f}) `}n&&(e[s]=f)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function fs(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const f=e[l];if(_n.has(l)){s=!0;continue}else if(Co(l)){i[l]=f;continue}else{const c=xu(f,rs[l]);l.startsWith("origin")?(a=!0,o[l]=c):r[l]=c}}if(e.transform||(s||n?r.transform=o0(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:f="50%",originZ:c=0}=o;r.transformOrigin=`${l} ${f} ${c}`}}const ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function $u(t,e,n){for(const r in e)!Zt(e[r])&&!ju(r,n)&&(t[r]=e[r])}function s0({transformTemplate:t},e){return Ht(()=>{const n=ds();return fs(n,e,t),Object.assign({},n.vars,n.style)},[e])}function a0(t,e){const n=t.style||{},r={};return $u(r,n,t),Object.assign(r,s0(t,e)),r}function c0(t,e){const n={},r=a0(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const l0={offset:"stroke-dashoffset",array:"stroke-dasharray"},u0={offset:"strokeDashoffset",array:"strokeDasharray"};function f0(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?l0:u0;t[o.offset]=ot.transform(-r);const s=ot.transform(e),a=ot.transform(n);t[o.array]=`${s} ${a}`}function Vu(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,f,c){if(fs(t,a,f),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:m}=t;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&f0(h,i,o,s,!1)}const Uu=()=>({...ds(),attrs:{}}),zu=t=>typeof t=="string"&&t.toLowerCase()==="svg";function d0(t,e,n,r){const i=Ht(()=>{const o=Uu();return Vu(o,e,zu(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};$u(o,t.style,t),i.style={...o,...i.style}}return i}const h0=["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 hs(t){return typeof t!="string"||t.includes("-")?!1:!!(h0.indexOf(t)>-1||/[A-Z]/u.test(t))}function p0(t,e,n,{latestValues:r},i,o=!1){const a=(hs(t)?d0:c0)(e,r,i,t),l=Qg(e,typeof t=="string",o),f=t!==kt?{...l,...a,ref:n}:{},{children:c}=e,h=Ht(()=>Zt(c)?c.get():c,[c]);return et(t,{...f,children:h})}function Wu(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function ps(t,e,n,r){if(typeof e=="function"){const[i,o]=Wu(r);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Wu(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function ei(t){return Zt(t)?t.get():t}function m0({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:y0(n,r,i,t),renderState:e()}}function y0(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=ei(o[m]);let{initial:s,animate:a}=t;const l=ti(t),f=Fu(t);e&&f&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const h=c?a:s;if(h&&typeof h!="boolean"&&!Qr(h)){const m=Array.isArray(h)?h:[h];for(let y=0;y<m.length;y++){const b=ps(t,m[y]);if(b){const{transitionEnd:w,transition:P,...x}=b;for(const v in x){let E=x[v];if(Array.isArray(E)){const N=c?E.length-1:0;E=E[N]}E!==null&&(i[v]=E)}for(const v in w)i[v]=w[v]}}}return i}const qu=t=>(e,n)=>{const r=Ft(Zr),i=Ft(Vr),o=()=>m0(t,e,r,i);return n?o():bo(o)};function ms(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Zt(r[s])||e.style&&Zt(e.style[s])||ju(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const g0=qu({scrapeMotionValuesFromProps:ms,createRenderState:ds});function Hu(t,e,n){const r=ms(t,e,n);for(const i in t)if(Zt(t[i])||Zt(e[i])){const o=bn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const v0=qu({scrapeMotionValuesFromProps:Hu,createRenderState:Uu}),w0=Symbol.for("motionComponentSymbol");function En(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function b0(t,e,n){return Ct(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):En(n)&&(n.current=r))},[e])}const ys=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Gu="data-"+ys("framerAppearId"),Ku=te({});function _0(t,e,n,r,i){var w,P;const{visualElement:o}=Ft(Zr),s=Ft(Mu),a=Ft(Vr),l=Ft(as).reducedMotion,f=it(null);r=r||s.renderer,!f.current&&r&&(f.current=r(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=f.current,h=Ft(Ku);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&x0(f.current,n,i,h);const m=it(!1);Zn(()=>{c&&m.current&&c.update(n,a)});const y=n[Gu],b=it(!!y&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,y))&&((P=window.MotionHasOptimisedAnimation)==null?void 0:P.call(window,y)));return bl(()=>{c&&(m.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),b.current&&c.animationState&&c.animationState.animateChanges())}),ut(()=>{c&&(!b.current&&c.animationState&&c.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,y)}),b.current=!1),c.enteringChildren=void 0)}),c}function x0(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:f,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Yu(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&En(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:f})}function Yu(t){if(t)return t.options.allowProjection!==!1?t.projection:Yu(t.parent)}function gs(t,{forwardMotionProps:e=!1}={},n,r){n&&Xg(n);const i=hs(t)?v0:g0;function o(a,l){let f;const c={...Ft(as),...a,layoutId:S0(a)},{isStatic:h}=c,m=e0(a),y=i(a,h);if(!h&&_o){E0();const b=A0(c);f=b.MeasureLayout,m.visualElement=_0(t,y,c,r,b.ProjectionNode)}return k(Zr.Provider,{value:m,children:[f&&m.visualElement?k(f,{visualElement:m.visualElement,...c}):null,p0(t,a,b0(y,m.visualElement,l),y,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=$e(o);return s[w0]=t,s}function S0({layoutId:t}){const e=Ft(wo).id;return e&&t!==void 0?e+"-"+t:t}function E0(t,e){Ft(Mu).strict}function A0(t){const{drag:e,layout:n}=Sn;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function T0(t,e){if(typeof Proxy>"u")return gs;const n=new Map,r=(o,s)=>gs(o,s,t,e),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,gs(s,void 0,t,e)),n.get(s))})}function Xu({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function P0({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function k0(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function vs(t){return t===void 0||t===1}function ws({scale:t,scaleX:e,scaleY:n}){return!vs(t)||!vs(e)||!vs(n)}function Je(t){return ws(t)||Ju(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ju(t){return Zu(t.x)||Zu(t.y)}function Zu(t){return t&&t!=="0%"}function ni(t,e,n){const r=t-n,i=e*r;return n+i}function Qu(t,e,n,r,i){return i!==void 0&&(t=ni(t,i,r)),ni(t,n,r)+e}function bs(t,e=0,n=1,r,i){t.min=Qu(t.min,e,n,r,i),t.max=Qu(t.max,e,n,r,i)}function tf(t,{x:e,y:n}){bs(t.x,e.translate,e.scale,e.originPoint),bs(t.y,n.translate,n.scale,n.originPoint)}const ef=.999999999999,nf=1.0000000000001;function C0(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Tn(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,tf(t,s)),r&&Je(o.latestValues)&&Tn(t,o.latestValues))}e.x<nf&&e.x>ef&&(e.x=1),e.y<nf&&e.y>ef&&(e.y=1)}function An(t,e){t.min=t.min+e,t.max=t.max+e}function rf(t,e,n,r,i=.5){const o=Nt(t.min,t.max,i);bs(t,e,n,o,r)}function Tn(t,e){rf(t.x,e.x,e.scaleX,e.scale,e.originX),rf(t.y,e.y,e.scaleY,e.scale,e.originY)}function of(t,e){return Xu(k0(t.getBoundingClientRect(),e))}function O0(t,e,n){const r=of(t,n),{scroll:i}=e;return i&&(An(r.x,i.offset.x),An(r.y,i.offset.y)),r}const sf=()=>({translate:0,scale:1,origin:0,originPoint:0}),Pn=()=>({x:sf(),y:sf()}),af=()=>({min:0,max:0}),Lt=()=>({x:af(),y:af()}),_s={current:null},cf={current:!1};function I0(){if(cf.current=!0,!!_o)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_s.current=t.matches;t.addEventListener("change",e),e()}else _s.current=!1}const R0=new WeakMap;function N0(t,e,n){for(const r in e){const i=e[r],o=n[r];if(Zt(i))t.addValue(r,i);else if(Zt(o))t.addValue(r,xn(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=t.getStaticValue(r);t.addValue(r,xn(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const lf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class M0{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qo,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.renderScheduledAt=0,this.scheduleRender=()=>{const m=ie.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Ot.render(this.render,!1,!0))};const{latestValues:l,renderState:f}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=f,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ti(n),this.isVariantNode=Fu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const y=h[m];l[m]!==void 0&&Zt(y)&&y.set(l[m])}}mount(e){var n;this.current=e,R0.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),cf.current||I0(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_s.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),Ve(this.notifyUpdate),Ve(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=_n.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Ot.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Sn){const n=Sn[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<lf.length;r++){const i=lf[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=e[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=N0(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=xn(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(_l(r)||Sl(r))?r=parseFloat(r):!qg(r)&&ze.test(n)&&(r=_u(e,n)),this.setBaseTarget(e,Zt(r)?r.get():r)),Zt(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=ps(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Zt(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ao),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){is.render(this.render)}}class uf extends M0{constructor(){super(...arguments),this.KeyframeResolver=Ng}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Zt(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ff(t,{style:e,vars:n},r,i){const o=t.style;let s;for(s in e)o[s]=e[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function D0(t){return window.getComputedStyle(t)}class B0 extends uf{constructor(){super(...arguments),this.type="html",this.renderInstance=ff}readValueFromInstance(e,n){var r;if(_n.has(n))return(r=this.projection)!=null&&r.isProjecting?Ko(n):Qy(e,n);{const i=D0(e),o=(Co(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return of(e,n)}build(e,n,r){fs(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ms(e,n,r)}}const df=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 F0(t,e,n,r){ff(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(df.has(i)?i:ys(i),e.attrs[i])}class L0 extends uf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_n.has(n)){const r=bu(n);return r&&r.default||0}return n=df.has(n)?n:ys(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return Hu(e,n,r)}build(e,n,r){Vu(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){F0(e,n,r,i)}mount(e){this.isSVGTag=zu(e.tagName),super.mount(e)}}const j0=(t,e)=>hs(t)?new L0(e):new B0(e,{allowProjection:t!==kt});function kn(t,e,n){const r=t.getProps();return ps(r,e,n!==void 0?n:r.custom,t)}const xs=t=>Array.isArray(t);function $0(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xn(n))}function V0(t){return xs(t)?t[t.length-1]||0:t}function U0(t,e){const n=kn(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=V0(o[s]);$0(t,s,a)}}function z0(t){return!!(Zt(t)&&t.add)}function Ss(t,e){const n=t.getValue("willChange");if(z0(n))return n.add(e);if(!n&&Me.WillChange){const r=new Me.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function hf(t){return t.props[Gu]}const W0=t=>t!==null;function q0(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(W0),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const H0={type:"spring",stiffness:500,damping:25,restSpeed:10},G0=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),K0={type:"keyframes",duration:.8},Y0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},X0=(t,{keyframes:e})=>e.length>2?K0:_n.has(t)?t.startsWith("scale")?G0(e[1]):H0:Y0;function J0({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:f,...c}){return!!Object.keys(c).length}const Es=(t,e,n,r={},i,o)=>s=>{const a=es(r,t)||{},l=a.delay||r.delay||0;let{elapsed:f=0}=r;f=f-be(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-f,onUpdate:m=>{e.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};J0(a)||Object.assign(c,X0(t,c)),c.duration&&(c.duration=be(c.duration)),c.repeatDelay&&(c.repeatDelay=be(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(ts(c),c.delay===0&&(h=!0)),(Me.instantAnimations||Me.skipAnimations)&&(h=!0,ts(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const m=q0(c.keyframes,a);if(m!==void 0){Ot.update(()=>{c.onUpdate(m),c.onComplete()});return}}return a.isSync?new qo(c):new xg(c)};function Z0({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function pf(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;r&&(o=r);const l=[],f=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),m=a[c];if(m===void 0||f&&Z0(f,c))continue;const y={delay:n,...es(o||{},c)},b=h.get();if(b!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===b&&!y.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const x=hf(t);if(x){const v=window.MotionHandoffAnimation(x,c,Ot);v!==null&&(y.startTime=v,w=!0)}}Ss(t,c),h.start(Es(c,h,m,t.shouldReduceMotion&&mu.has(c)?{type:!1}:y,t,w));const P=h.animation;P&&l.push(P)}return s&&Promise.all(l).then(()=>{Ot.update(()=>{s&&U0(t,s)})}),l}function mf(t,e,n,r=0,i=1){const o=Array.from(t).sort((f,c)=>f.sortNodePosition(c)).indexOf(e),s=t.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function As(t,e,n={}){var l;const r=kn(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(pf(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(f=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:m}=i;return Q0(t,e,f,c,h,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[f,c]=a==="beforeChildren"?[o,s]:[s,o];return f().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function Q0(t,e,n=0,r=0,i=0,o=1,s){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(As(l,e,{...s,delay:n+(typeof r=="function"?0:r)+mf(t.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function tv(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>As(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=As(t,e,n);else{const i=typeof e=="function"?kn(t,e,n.custom):e;r=Promise.all(pf(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function yf(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const ev=us.length;function gf(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?gf(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<ev;n++){const r=us[n],i=t.props[r];(lr(i)||i===!1)&&(e[r]=i)}return e}const nv=[...ls].reverse(),rv=ls.length;function iv(t){return e=>Promise.all(e.map(({animation:n,options:r})=>tv(t,n,r)))}function ov(t){let e=iv(t),n=vf(),r=!0;const i=l=>(f,c)=>{var m;const h=kn(t,c,l==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:y,transitionEnd:b,...w}=h;f={...f,...w,...b}}return f};function o(l){e=l(t)}function s(l){const{props:f}=t,c=gf(t.parent)||{},h=[],m=new Set;let y={},b=1/0;for(let P=0;P<rv;P++){const x=nv[P],v=n[x],E=f[x]!==void 0?f[x]:c[x],N=lr(E),O=x===l?v.isActive:null;O===!1&&(b=P);let j=E===c[x]&&E!==f[x]&&N;if(j&&r&&t.manuallyAnimateOnMount&&(j=!1),v.protectedKeys={...y},!v.isActive&&O===null||!E&&!v.prevProp||Qr(E)||typeof E=="boolean")continue;const B=sv(v.prevProp,E);let F=B||x===l&&v.isActive&&!j&&N||P>b&&N,L=!1;const Y=Array.isArray(E)?E:[E];let Z=Y.reduce(i(x),{});O===!1&&(Z={});const{prevResolvedValues:nt={}}=v,st={...nt,...Z},_t=at=>{F=!0,m.has(at)&&(L=!0,m.delete(at)),v.needsAnimating[at]=!0;const pt=t.getValue(at);pt&&(pt.liveStyle=!1)};for(const at in st){const pt=Z[at],z=nt[at];if(y.hasOwnProperty(at))continue;let H=!1;xs(pt)&&xs(z)?H=!yf(pt,z):H=pt!==z,H?pt!=null?_t(at):m.add(at):pt!==void 0&&m.has(at)?_t(at):v.protectedKeys[at]=!0}v.prevProp=E,v.prevResolvedValues=Z,v.isActive&&(y={...y,...Z}),r&&t.blockInitialAnimation&&(F=!1);const dt=j&&B;F&&(!dt||L)&&h.push(...Y.map(at=>{const pt={type:x};if(typeof at=="string"&&r&&!dt&&t.manuallyAnimateOnMount&&t.parent){const{parent:z}=t,H=kn(z,at);if(z.enteringChildren&&H){const{delayChildren:G}=H.transition||{};pt.delay=mf(z.enteringChildren,t,G)}}return{animation:at,options:pt}}))}if(m.size){const P={};if(typeof f.initial!="boolean"){const x=kn(t,Array.isArray(f.initial)?f.initial[0]:f.initial);x&&x.transition&&(P.transition=x.transition)}m.forEach(x=>{const v=t.getBaseTarget(x),E=t.getValue(x);E&&(E.liveStyle=!0),P[x]=v??null}),h.push({animation:P})}let w=!!h.length;return r&&(f.initial===!1||f.initial===f.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,w?e(h):Promise.resolve()}function a(l,f){var h;if(n[l].isActive===f)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(m=>{var y;return(y=m.animationState)==null?void 0:y.setActive(l,f)}),n[l].isActive=f;const c=s(l);for(const m in n)n[m].protectedKeys={};return c}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=vf(),r=!0}}}function sv(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!yf(e,t):!1}function Ze(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vf(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class We{constructor(e){this.isMounted=!1,this.node=e}update(){}}class av extends We{constructor(e){super(e),e.animationState||(e.animationState=ov(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Qr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let cv=0;class lv extends We{constructor(){super(...arguments),this.id=cv++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const uv={animation:{Feature:av},exit:{Feature:lv}};function fr(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function dr(t){return{point:{x:t.pageX,y:t.pageY}}}const fv=t=>e=>os(e)&&t(e,dr(e));function hr(t,e,n,r){return fr(t,e,fv(n),r)}const wf=1e-4,dv=1-wf,hv=1+wf,bf=.01,pv=0-bf,mv=0+bf;function ee(t){return t.max-t.min}function yv(t,e,n){return Math.abs(t-e)<=n}function _f(t,e,n,r=.5){t.origin=r,t.originPoint=Nt(e.min,e.max,t.origin),t.scale=ee(n)/ee(e),t.translate=Nt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=dv&&t.scale<=hv||isNaN(t.scale))&&(t.scale=1),(t.translate>=pv&&t.translate<=mv||isNaN(t.translate))&&(t.translate=0)}function pr(t,e,n,r){_f(t.x,e.x,n.x,r?r.originX:void 0),_f(t.y,e.y,n.y,r?r.originY:void 0)}function xf(t,e,n){t.min=n.min+e.min,t.max=t.min+ee(e)}function gv(t,e,n){xf(t.x,e.x,n.x),xf(t.y,e.y,n.y)}function Sf(t,e,n){t.min=e.min-n.min,t.max=t.min+ee(e)}function mr(t,e,n){Sf(t.x,e.x,n.x),Sf(t.y,e.y,n.y)}function fe(t){return[t("x"),t("y")]}const Ef=({current:t})=>t?t.ownerDocument.defaultView:null,Af=(t,e)=>Math.abs(t-e);function vv(t,e){const n=Af(t.x,e.x),r=Af(t.y,e.y);return Math.sqrt(n**2+r**2)}class Tf{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Ps(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,b=vv(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!b)return;const{point:w}=m,{timestamp:P}=Xt;this.history.push({...w,timestamp:P});const{onStart:x,onMove:v}=this.handlers;y||(x&&x(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Ts(y,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:b,onSessionEnd:w,resumeAnimation:P}=this.handlers;if(this.dragSnapToOrigin&&P&&P(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ps(m.type==="pointercancel"?this.lastMoveEventInfo:Ts(y,this.transformPagePoint),this.history);this.startEvent&&b&&b(m,x),w&&w(m,x)},!os(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=dr(e),l=Ts(a,this.transformPagePoint),{point:f}=l,{timestamp:c}=Xt;this.history=[{...f,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Ps(l,this.history)),this.removeListeners=tr(hr(this.contextWindow,"pointermove",this.handlePointerMove),hr(this.contextWindow,"pointerup",this.handlePointerUp),hr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Ve(this.updatePoint)}}function Ts(t,e){return e?{point:e(t.point)}:t}function Pf(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ps({point:t},e){return{point:t,delta:Pf(t,kf(e)),offset:Pf(t,wv(e)),velocity:bv(e,.1)}}function wv(t){return t[0]}function kf(t){return t[t.length-1]}function bv(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=kf(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>be(e)));)n--;if(!r)return{x:0,y:0};const o=_e(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function _v(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Nt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Nt(n,t,r.max):Math.min(t,n)),t}function Cf(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function xv(t,{top:e,left:n,bottom:r,right:i}){return{x:Cf(t.x,n,i),y:Cf(t.y,e,r)}}function Of(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function Sv(t,e){return{x:Of(t.x,e.x),y:Of(t.y,e.y)}}function Ev(t,e){let n=.5;const r=ee(t),i=ee(e);return i>r?n=er(e.min,e.max-r,t.min):r>i&&(n=er(t.min,t.max-i,e.min)),Ne(0,1,n)}function Av(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const ks=.35;function Tv(t=ks){return t===!1?t=0:t===!0&&(t=ks),{x:If(t,"left","right"),y:If(t,"top","bottom")}}function If(t,e,n){return{min:Rf(t,e),max:Rf(t,n)}}function Rf(t,e){return typeof t=="number"?t:t[e]||0}const Pv=new WeakMap;class kv{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(dr(h).point)},s=(h,m)=>{const{drag:y,dragPropagation:b,onDragStart:w}=this.getProps();if(y&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fg(y),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fe(x=>{let v=this.getAxisMotionValue(x).get()||0;if(xe.test(v)){const{projection:E}=this.visualElement;if(E&&E.layout){const N=E.layout.layoutBox[x];N&&(v=ee(N)*(parseFloat(v)/100))}}this.originPoint[x]=v}),w&&Ot.postRender(()=>w(h,m)),Ss(this.visualElement,"transform");const{animationState:P}=this.visualElement;P&&P.setActive("whileDrag",!0)},a=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:y,dragDirectionLock:b,onDirectionLock:w,onDrag:P}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:x}=m;if(b&&this.currentDirection===null){this.currentDirection=Cv(x),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),P&&P(h,m)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>fe(h=>{var m;return this.getAnimationState(h)==="paused"&&((m=this.getAxisMotionValue(h).animation)==null?void 0:m.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Tf(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Ef(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Ot.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!ri(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=_v(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&En(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=xv(r.layoutBox,e):this.constraints=!1,this.elastic=Tv(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&fe(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Av(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!En(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=O0(r,i.root,this.visualElement.getTransformPagePoint());let s=Sv(i.layout.layoutBox,o);if(n){const a=n(P0(s));this.hasMutatedConstraints=!!a,a&&(s=Xu(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=fe(c=>{if(!ri(c,n,this.currentDirection))return;let h=l&&l[c]||{};s&&(h={min:0,max:0});const m=i?200:1e6,y=i?40:1e7,b={type:"inertia",velocity:r?e[c]:0,bounceStiffness:m,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,b)});return Promise.all(f).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Ss(this.visualElement,e),r.start(Es(e,r,0,n,this.visualElement,!1))}stopAnimation(){fe(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){fe(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){fe(n=>{const{drag:r}=this.getProps();if(!ri(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-Nt(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!En(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};fe(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=Ev({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),fe(s=>{if(!ri(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:f}=this.constraints[s];a.set(Nt(l,f,i[s]))})}addListeners(){if(!this.visualElement.current)return;Pv.set(this.visualElement,this);const e=this.visualElement.current,n=hr(e,"pointerdown",l=>{const{drag:f,dragListener:c=!0}=this.getProps();f&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();En(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ot.read(r);const s=fr(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f})=>{this.isDragging&&f&&(fe(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=ks,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function ri(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function Cv(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ov extends We{constructor(e){super(e),this.removeGroupControls=ue,this.removeListeners=ue,this.controls=new kv(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ue}unmount(){this.removeGroupControls(),this.removeListeners()}}const Nf=t=>(e,n)=>{t&&Ot.postRender(()=>t(e,n))};class Iv extends We{constructor(){super(...arguments),this.removePointerDownListener=ue}onPointerDown(e){this.session=new Tf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ef(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Nf(e),onStart:Nf(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Ot.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=hr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ii={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Mf(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const yr={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ot.test(t))t=parseFloat(t);else return t;const n=Mf(t,e.target.x),r=Mf(t,e.target.y);return`${n}% ${r}%`}},Rv={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=ze.parse(t);if(i.length>5)return r;const o=ze.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const f=Nt(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=f),typeof i[3+s]=="number"&&(i[3+s]/=f),o(i)}};let Cs=!1;class Nv extends se{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;n0(Mv),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Cs&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ii.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,Cs=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Ot.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),is.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Cs=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Df(t){const[e,n]=Ru(),r=Ft(wo);return k(Nv,{...t,layoutGroup:r,switchLayoutGroup:Ft(Ku),isPresent:e,safeToRemove:n})}const Mv={borderRadius:{...yr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:yr,borderTopRightRadius:yr,borderBottomLeftRadius:yr,borderBottomRightRadius:yr,boxShadow:Rv};function Dv(t,e,n){const r=Zt(t)?t:xn(t);return r.start(Es("",r,e,n)),r.animation}const Bv=(t,e)=>t.depth-e.depth;class Fv{constructor(){this.children=[],this.isDirty=!1}add(e){xo(this.children,e),this.isDirty=!0}remove(e){So(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Bv),this.isDirty=!1,this.children.forEach(e)}}function Lv(t,e){const n=ie.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(Ve(r),t(o-e))};return Ot.setup(r,!0),()=>Ve(r)}const Bf=["TopLeft","TopRight","BottomLeft","BottomRight"],jv=Bf.length,Ff=t=>typeof t=="string"?parseFloat(t):t,Lf=t=>typeof t=="number"||ot.test(t);function $v(t,e,n,r,i,o){i?(t.opacity=Nt(0,n.opacity??1,Vv(r)),t.opacityExit=Nt(e.opacity??1,0,Uv(r))):o&&(t.opacity=Nt(e.opacity??1,n.opacity??1,r));for(let s=0;s<jv;s++){const a=`border${Bf[s]}Radius`;let l=jf(e,a),f=jf(n,a);if(l===void 0&&f===void 0)continue;l||(l=0),f||(f=0),l===0||f===0||Lf(l)===Lf(f)?(t[a]=Math.max(Nt(Ff(l),Ff(f),r),0),(xe.test(f)||xe.test(l))&&(t[a]+="%")):t[a]=f}(e.rotate||n.rotate)&&(t.rotate=Nt(e.rotate||0,n.rotate||0,r))}function jf(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Vv=$f(0,.5,Il),Uv=$f(.5,.95,ue);function $f(t,e,n){return r=>r<t?0:r>e?1:n(er(t,e,r))}function Vf(t,e){t.min=e.min,t.max=e.max}function de(t,e){Vf(t.x,e.x),Vf(t.y,e.y)}function Uf(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function zf(t,e,n,r,i){return t-=e,t=ni(t,1/n,r),i!==void 0&&(t=ni(t,1/i,r)),t}function zv(t,e=0,n=1,r=.5,i,o=t,s=t){if(xe.test(e)&&(e=parseFloat(e),e=Nt(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Nt(o.min,o.max,r);t===o&&(a-=e),t.min=zf(t.min,e,n,a,i),t.max=zf(t.max,e,n,a,i)}function Wf(t,e,[n,r,i],o,s){zv(t,e[n],e[r],e[i],e.scale,o,s)}const Wv=["x","scaleX","originX"],qv=["y","scaleY","originY"];function qf(t,e,n,r){Wf(t.x,e,Wv,n?n.x:void 0,r?r.x:void 0),Wf(t.y,e,qv,n?n.y:void 0,r?r.y:void 0)}function Hf(t){return t.translate===0&&t.scale===1}function Gf(t){return Hf(t.x)&&Hf(t.y)}function Kf(t,e){return t.min===e.min&&t.max===e.max}function Hv(t,e){return Kf(t.x,e.x)&&Kf(t.y,e.y)}function Yf(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Xf(t,e){return Yf(t.x,e.x)&&Yf(t.y,e.y)}function Jf(t){return ee(t.x)/ee(t.y)}function Zf(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Gv{constructor(){this.members=[]}add(e){xo(this.members,e),e.scheduleRender()}remove(e){if(So(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Kv(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:f,rotate:c,rotateX:h,rotateY:m,skewX:y,skewY:b}=n;f&&(r=`perspective(${f}px) ${r}`),c&&(r+=`rotate(${c}deg) `),h&&(r+=`rotateX(${h}deg) `),m&&(r+=`rotateY(${m}deg) `),y&&(r+=`skewX(${y}deg) `),b&&(r+=`skewY(${b}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Os=["","X","Y","Z"],Yv=1e3;let Xv=0;function Is(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Qf(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=hf(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ot,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Qf(r)}function td({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Xv++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Qv),this.nodes.forEach(rw),this.nodes.forEach(iw),this.nodes.forEach(tw)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Fv)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Ao),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Iu(s)&&!zg(s),this.instance=s;const{layoutId:a,layout:l,visualElement:f}=this.options;if(f&&!f.current&&f.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const m=()=>this.root.updateBlockedByResize=!1;Ot.read(()=>{h=window.innerWidth}),t(s,()=>{const y=window.innerWidth;y!==h&&(h=y,this.root.updateBlockedByResize=!0,c&&c(),c=Lv(m,250),ii.hasAnimatedSinceResize&&(ii.hasAnimatedSinceResize=!1,this.nodes.forEach(rd)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&f&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||f.getDefaultTransition()||lw,{onLayoutAnimationStart:w,onLayoutAnimationComplete:P}=f.getProps(),x=!this.targetLayout||!Xf(this.targetLayout,y),v=!h&&m;if(this.options.layoutRoot||this.resumeFrom||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...es(b,"layout"),onPlay:w,onComplete:P};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(c,v)}else h||rd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Ve(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ow),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ed);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(nd);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nw),this.nodes.forEach(Jv),this.nodes.forEach(Zv)):this.nodes.forEach(nd),this.clearAllSnapshots();const a=ie.now();Xt.delta=Ne(0,1e3/60,a-Xt.timestamp),Xt.timestamp=a,Xt.isProcessing=!0,ko.update.process(Xt),ko.preRender.process(Xt),ko.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,is.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ew),this.sharedNodes.forEach(sw)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ot.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ot.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ee(this.snapshot.measuredBox.x)&&!ee(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gf(this.projectionDelta),l=this.getTransformTemplate(),f=l?l(this.latestValues,""):void 0,c=f!==this.prevTransformTemplateValue;s&&this.instance&&(a||Je(this.latestValues)||c)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),uw(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:s}=this.options;if(!s)return Lt();const a=s.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(fw))){const{scroll:c}=this.root;c&&(An(a.x,c.offset.x),An(a.y,c.offset.y))}return a}removeElementScroll(s){var l;const a=Lt();if(de(a,s),(l=this.scroll)!=null&&l.wasRoot)return a;for(let f=0;f<this.path.length;f++){const c=this.path[f],{scroll:h,options:m}=c;c!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&de(a,s),An(a.x,h.offset.x),An(a.y,h.offset.y))}return a}applyTransform(s,a=!1){const l=Lt();de(l,s);for(let f=0;f<this.path.length;f++){const c=this.path[f];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Tn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Je(c.latestValues)&&Tn(l,c.latestValues)}return Je(this.latestValues)&&Tn(l,this.latestValues),l}removeTransform(s){const a=Lt();de(a,s);for(let l=0;l<this.path.length;l++){const f=this.path[l];if(!f.instance||!Je(f.latestValues))continue;ws(f.latestValues)&&f.updateSnapshot();const c=Lt(),h=f.measurePageBox();de(c,h),qf(a,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,c)}return Je(this.latestValues)&&qf(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=Xt.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),mr(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),de(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gv(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):de(this.target,this.layout.layoutBox),tf(this.target,this.targetDelta)):de(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),mr(this.relativeTargetOrigin,this.target,y.target),de(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ws(this.parent.latestValues)||Ju(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var b;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Xt.timestamp&&(l=!1),l)return;const{layout:f,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||c))return;de(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;C0(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Lt());const{target:y}=s;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Uf(this.prevProjectionDelta.x,this.projectionDelta.x),Uf(this.prevProjectionDelta.y,this.projectionDelta.y)),pr(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!Zf(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zf(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Pn(),this.projectionDelta=Pn(),this.projectionDeltaWithTransform=Pn()}setAnimationOrigin(s,a=!1){const l=this.snapshot,f=l?l.latestValues:{},c={...this.latestValues},h=Pn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=Lt(),y=l?l.source:void 0,b=this.layout?this.layout.source:void 0,w=y!==b,P=this.getStack(),x=!P||P.members.length<=1,v=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(cw));this.animationProgress=0;let E;this.mixTargetDelta=N=>{const O=N/1e3;id(h.x,s.x,O),id(h.y,s.y,O),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aw(this.relativeTarget,this.relativeTargetOrigin,m,O),E&&Hv(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=Lt()),de(E,this.relativeTarget)),w&&(this.animationValues=c,$v(c,f,this.latestValues,O,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,l,f;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(f=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||f.stop(),this.pendingAnimation&&(Ve(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ot.update(()=>{ii.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=xn(0)),this.currentAnimation=Dv(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),s.onUpdate&&s.onUpdate(c)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:c}=s;if(!(!a||!l||!f)){if(this!==s&&this.layout&&f&&ld(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||Lt();const h=ee(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+h;const m=ee(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+m}de(a,l),Tn(a,c),pr(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Gv),this.sharedNodes.get(s).add(a);const f=a.options.initialPromotionConfig;a.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const f=this.getStack();f&&f.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const f={};l.z&&Is("z",s,f,this.animationValues);for(let c=0;c<Os.length;c++)Is(`rotate${Os[c]}`,s,f,this.animationValues),Is(`skew${Os[c]}`,s,f,this.animationValues);s.render();for(const c in f)s.setStaticValue(c,f[c]),this.animationValues&&(this.animationValues[c]=f[c]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=ei(a==null?void 0:a.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=ei(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Je(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=f.animationValues||f.latestValues;this.applyTransformsToTarget();let h=Kv(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),s.transform=h;const{x:m,y}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${y.origin*100}% 0`,f.animationValues?s.opacity=f===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=f===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const b in ur){if(c[b]===void 0)continue;const{correct:w,applyTo:P,isCSSVariable:x}=ur[b],v=h==="none"?c[b]:w(c[b],f);if(P){const E=P.length;for(let N=0;N<E;N++)s[P[N]]=v}else x?this.options.visualElement.renderState.vars[b]=v:s[b]=v}this.options.layoutId&&(s.pointerEvents=f===this?ei(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ed),this.root.sharedNodes.clear()}}}function Jv(t){t.updateLayout()}function Zv(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=e.source!==t.layout.source;o==="size"?fe(h=>{const m=s?e.measuredBox[h]:e.layoutBox[h],y=ee(m);m.min=r[h].min,m.max=m.min+y}):ld(o,e.layoutBox,r)&&fe(h=>{const m=s?e.measuredBox[h]:e.layoutBox[h],y=ee(r[h]);m.max=m.min+y,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+y)});const a=Pn();pr(a,r,e.layoutBox);const l=Pn();s?pr(l,t.applyTransform(i,!0),e.measuredBox):pr(l,r,e.layoutBox);const f=!Gf(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:y}=h;if(m&&y){const b=Lt();mr(b,e.layoutBox,m.layoutBox);const w=Lt();mr(w,r,y.layoutBox),Xf(b,w)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=b,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:f,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function Qv(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function tw(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ew(t){t.clearSnapshot()}function ed(t){t.clearMeasurements()}function nd(t){t.isLayoutDirty=!1}function nw(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rd(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rw(t){t.resolveTargetDelta()}function iw(t){t.calcProjection()}function ow(t){t.resetSkewAndRotation()}function sw(t){t.removeLeadSnapshot()}function id(t,e,n){t.translate=Nt(e.translate,0,n),t.scale=Nt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function od(t,e,n,r){t.min=Nt(e.min,n.min,r),t.max=Nt(e.max,n.max,r)}function aw(t,e,n,r){od(t.x,e.x,n.x,r),od(t.y,e.y,n.y,r)}function cw(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lw={duration:.45,ease:[.4,0,.1,1]},sd=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ad=sd("applewebkit/")&&!sd("chrome/")?Math.round:ue;function cd(t){t.min=ad(t.min),t.max=ad(t.max)}function uw(t){cd(t.x),cd(t.y)}function ld(t,e,n){return t==="position"||t==="preserve-aspect"&&!yv(Jf(e),Jf(n),.2)}function fw(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const dw=td({attachResizeListener:(t,e)=>fr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rs={current:void 0},ud=td({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Rs.current){const t=new dw({});t.mount(window),t.setOptions({layoutScroll:!0}),Rs.current=t}return Rs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),hw={pan:{Feature:Iv},drag:{Feature:Ov,ProjectionNode:ud,MeasureLayout:Df}};function fd(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Ot.postRender(()=>o(e,dr(e)))}class pw extends We{mount(){const{current:e}=this.node;e&&(this.unmount=Lg(e,(n,r)=>(fd(this.node,r,"Start"),i=>fd(this.node,i,"End"))))}unmount(){}}class mw extends We{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=tr(fr(this.node.current,"focus",()=>this.onFocus()),fr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dd(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&Ot.postRender(()=>o(e,dr(e)))}class yw extends We{mount(){const{current:e}=this.node;e&&(this.unmount=Ug(e,(n,r)=>(dd(this.node,r,"Start"),(i,{success:o})=>dd(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ns=new WeakMap,Ms=new WeakMap,gw=t=>{const e=Ns.get(t.target);e&&e(t)},vw=t=>{t.forEach(gw)};function ww({root:t,...e}){const n=t||document;Ms.has(n)||Ms.set(n,{});const r=Ms.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(vw,{root:t,...e})),r[i]}function bw(t,e,n){const r=ww(e);return Ns.set(t,n),r.observe(t),()=>{Ns.delete(t),r.unobserve(t)}}const _w={some:0,all:1};class xw extends We{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:_w[i]},a=l=>{const{isIntersecting:f}=l;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),m=f?c:h;m&&m(l)};return bw(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Sw(e,n))&&this.startObserver()}unmount(){}}function Sw({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Ew={...uv,...{inView:{Feature:xw},tap:{Feature:yw},focus:{Feature:mw},hover:{Feature:pw}},...hw,...{layout:{ProjectionNode:ud,MeasureLayout:Df}}},De=T0(Ew,j0);/**
|
|
9
|
+
`),()=>{w.contains(b)&&w.removeChild(b)}},[e]),P(Hg,{isPresent:e,childRef:o,sizeRef:s,children:vo(t,{ref:o})})}const Kg=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:l})=>{const f=bo(Yg),c=pn();let h=!0,m=Ht(()=>(h=!1,{id:c,initial:e,isPresent:n,custom:i,onExitComplete:y=>{f.set(y,!0);for(const b of f.values())if(!b)return;r&&r()},register:y=>(f.set(y,!1),()=>f.delete(y))}),[n,f,r]);return o&&h&&(m={...m}),Ht(()=>{f.forEach((y,b)=>f.set(b,!1))},[n]),ut(()=>{!n&&!f.size&&r&&r()},[n]),s==="popLayout"&&(t=P(Gg,{isPresent:n,anchorX:a,root:l,children:t})),P($r.Provider,{value:m,children:t})};function Yg(){return new Map}function Ru(t=!0){const e=Ft($r);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=pn();ut(()=>{if(t)return i(o)},[t]);const s=kt(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const Xr=t=>t.key||"";function Mu(t){const e=[];return mo.forEach(t,n=>{yn(n)&&e.push(n)}),e}const cs=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:l})=>{const[f,c]=Ru(s),h=Ht(()=>Mu(t),[t]),m=s&&!f?[]:h.map(Xr),y=it(!0),b=it(h),w=bo(()=>new Map),[T,x]=gt(h),[v,E]=gt(h);bl(()=>{y.current=!1,b.current=h;for(let j=0;j<v.length;j++){const B=Xr(v[j]);m.includes(B)?w.delete(B):w.get(B)!==!0&&w.set(B,!1)}},[v,m.length,m.join("-")]);const M=[];if(h!==T){let j=[...h];for(let B=0;B<v.length;B++){const F=v[B],L=Xr(F);m.includes(L)||(j.splice(B,0,F),M.push(F))}return o==="wait"&&M.length&&(j=M),E(Mu(j)),x(h),null}const{forceRender:O}=Ft(wo);return P(Pt,{children:v.map(j=>{const B=Xr(j),F=s&&!f?!1:h===v||m.includes(B),L=()=>{if(w.has(B))w.set(B,!0);else return;let Y=!0;w.forEach(Z=>{Z||(Y=!1)}),Y&&(O==null||O(),E(b.current),s&&(c==null||c()),r&&r())};return P(Kg,{isPresent:F,initial:!y.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:l,onExitComplete:F?void 0:L,anchorX:a,children:j},B)})})},Nu=te({strict:!1}),Du={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"]},Sn={};for(const t in Du)Sn[t]={isEnabled:e=>Du[t].some(n=>!!e[n])};function Xg(t){for(const e in t)Sn[e]={...Sn[e],...t[e]}}const Jg=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Jr(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Jg.has(t)}let Bu=t=>!Jr(t);function Zg(t){typeof t=="function"&&(Bu=e=>e.startsWith("on")?!Jr(e):t(e))}try{Zg(require("@emotion/is-prop-valid").default)}catch{}function Qg(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Bu(i)||n===!0&&Jr(i)||!e&&!Jr(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const Zr=te({});function Qr(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function lr(t){return typeof t=="string"||Array.isArray(t)}const ls=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],us=["initial",...ls];function ti(t){return Qr(t.animate)||us.some(e=>lr(t[e]))}function Fu(t){return!!(ti(t)||t.variants)}function t0(t,e){if(ti(t)){const{initial:n,animate:r}=t;return{initial:n===!1||lr(n)?n:void 0,animate:lr(r)?r:void 0}}return t.inherit!==!1?e:{}}function e0(t){const{initial:e,animate:n}=t0(t,Ft(Zr));return Ht(()=>({initial:e,animate:n}),[Lu(e),Lu(n)])}function Lu(t){return Array.isArray(t)?t.join(" "):t}const ur={};function n0(t){for(const e in t)ur[e]=t[e],ko(e)&&(ur[e].isCSSVariable=!0)}function ju(t,{layout:e,layoutId:n}){return _n.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!ur[t]||t==="opacity")}const r0={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},i0=bn.length;function o0(t,e,n){let r="",i=!0;for(let o=0;o<i0;o++){const s=bn[o],a=t[s];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(s.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const f=xu(a,rs[s]);if(!l){i=!1;const c=r0[s]||s;r+=`${c}(${f}) `}n&&(e[s]=f)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function fs(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const l in e){const f=e[l];if(_n.has(l)){s=!0;continue}else if(ko(l)){i[l]=f;continue}else{const c=xu(f,rs[l]);l.startsWith("origin")?(a=!0,o[l]=c):r[l]=c}}if(e.transform||(s||n?r.transform=o0(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:f="50%",originZ:c=0}=o;r.transformOrigin=`${l} ${f} ${c}`}}const ds=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Vu(t,e,n){for(const r in e)!Zt(e[r])&&!ju(r,n)&&(t[r]=e[r])}function s0({transformTemplate:t},e){return Ht(()=>{const n=ds();return fs(n,e,t),Object.assign({},n.vars,n.style)},[e])}function a0(t,e){const n=t.style||{},r={};return Vu(r,n,t),Object.assign(r,s0(t,e)),r}function c0(t,e){const n={},r=a0(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=r,n}const l0={offset:"stroke-dashoffset",array:"stroke-dasharray"},u0={offset:"strokeDashoffset",array:"strokeDasharray"};function f0(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?l0:u0;t[o.offset]=ot.transform(-r);const s=ot.transform(e),a=ot.transform(n);t[o.array]=`${s} ${a}`}function $u(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},l,f,c){if(fs(t,a,f),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:m}=t;h.transform&&(m.transform=h.transform,delete h.transform),(m.transform||h.transformOrigin)&&(m.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),m.transform&&(m.transformBox=(c==null?void 0:c.transformBox)??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&f0(h,i,o,s,!1)}const Uu=()=>({...ds(),attrs:{}}),zu=t=>typeof t=="string"&&t.toLowerCase()==="svg";function d0(t,e,n,r){const i=Ht(()=>{const o=Uu();return $u(o,e,zu(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};Vu(o,t.style,t),i.style={...o,...i.style}}return i}const h0=["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 hs(t){return typeof t!="string"||t.includes("-")?!1:!!(h0.indexOf(t)>-1||/[A-Z]/u.test(t))}function p0(t,e,n,{latestValues:r},i,o=!1){const a=(hs(t)?d0:c0)(e,r,i,t),l=Qg(e,typeof t=="string",o),f=t!==Pt?{...l,...a,ref:n}:{},{children:c}=e,h=Ht(()=>Zt(c)?c.get():c,[c]);return et(t,{...f,children:h})}function Wu(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function ps(t,e,n,r){if(typeof e=="function"){const[i,o]=Wu(r);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Wu(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function ei(t){return Zt(t)?t.get():t}function m0({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:y0(n,r,i,t),renderState:e()}}function y0(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=ei(o[m]);let{initial:s,animate:a}=t;const l=ti(t),f=Fu(t);e&&f&&!l&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const h=c?a:s;if(h&&typeof h!="boolean"&&!Qr(h)){const m=Array.isArray(h)?h:[h];for(let y=0;y<m.length;y++){const b=ps(t,m[y]);if(b){const{transitionEnd:w,transition:T,...x}=b;for(const v in x){let E=x[v];if(Array.isArray(E)){const M=c?E.length-1:0;E=E[M]}E!==null&&(i[v]=E)}for(const v in w)i[v]=w[v]}}}return i}const qu=t=>(e,n)=>{const r=Ft(Zr),i=Ft($r),o=()=>m0(t,e,r,i);return n?o():bo(o)};function ms(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Zt(r[s])||e.style&&Zt(e.style[s])||ju(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const g0=qu({scrapeMotionValuesFromProps:ms,createRenderState:ds});function Hu(t,e,n){const r=ms(t,e,n);for(const i in t)if(Zt(t[i])||Zt(e[i])){const o=bn.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const v0=qu({scrapeMotionValuesFromProps:Hu,createRenderState:Uu}),w0=Symbol.for("motionComponentSymbol");function En(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function b0(t,e,n){return kt(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):En(n)&&(n.current=r))},[e])}const ys=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Gu="data-"+ys("framerAppearId"),Ku=te({});function _0(t,e,n,r,i){var w,T;const{visualElement:o}=Ft(Zr),s=Ft(Nu),a=Ft($r),l=Ft(as).reducedMotion,f=it(null);r=r||s.renderer,!f.current&&r&&(f.current=r(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const c=f.current,h=Ft(Ku);c&&!c.projection&&i&&(c.type==="html"||c.type==="svg")&&x0(f.current,n,i,h);const m=it(!1);Zn(()=>{c&&m.current&&c.update(n,a)});const y=n[Gu],b=it(!!y&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,y))&&((T=window.MotionHasOptimisedAnimation)==null?void 0:T.call(window,y)));return bl(()=>{c&&(m.current=!0,window.MotionIsMounted=!0,c.updateFeatures(),c.scheduleRenderMicrotask(),b.current&&c.animationState&&c.animationState.animateChanges())}),ut(()=>{c&&(!b.current&&c.animationState&&c.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,y)}),b.current=!1),c.enteringChildren=void 0)}),c}function x0(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:f,layoutCrossfade:c}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Yu(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&En(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:c,layoutScroll:l,layoutRoot:f})}function Yu(t){if(t)return t.options.allowProjection!==!1?t.projection:Yu(t.parent)}function gs(t,{forwardMotionProps:e=!1}={},n,r){n&&Xg(n);const i=hs(t)?v0:g0;function o(a,l){let f;const c={...Ft(as),...a,layoutId:S0(a)},{isStatic:h}=c,m=e0(a),y=i(a,h);if(!h&&_o){E0();const b=A0(c);f=b.MeasureLayout,m.visualElement=_0(t,y,c,r,b.ProjectionNode)}return P(Zr.Provider,{value:m,children:[f&&m.visualElement?P(f,{visualElement:m.visualElement,...c}):null,p0(t,a,b0(y,m.visualElement,l),y,h,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=Ve(o);return s[w0]=t,s}function S0({layoutId:t}){const e=Ft(wo).id;return e&&t!==void 0?e+"-"+t:t}function E0(t,e){Ft(Nu).strict}function A0(t){const{drag:e,layout:n}=Sn;if(!e&&!n)return{};const r={...e,...n};return{MeasureLayout:e!=null&&e.isEnabled(t)||n!=null&&n.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function C0(t,e){if(typeof Proxy>"u")return gs;const n=new Map,r=(o,s)=>gs(o,s,t,e),i=(o,s)=>r(o,s);return new Proxy(i,{get:(o,s)=>s==="create"?r:(n.has(s)||n.set(s,gs(s,void 0,t,e)),n.get(s))})}function Xu({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function T0({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function P0(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),r=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function vs(t){return t===void 0||t===1}function ws({scale:t,scaleX:e,scaleY:n}){return!vs(t)||!vs(e)||!vs(n)}function Je(t){return ws(t)||Ju(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Ju(t){return Zu(t.x)||Zu(t.y)}function Zu(t){return t&&t!=="0%"}function ni(t,e,n){const r=t-n,i=e*r;return n+i}function Qu(t,e,n,r,i){return i!==void 0&&(t=ni(t,i,r)),ni(t,n,r)+e}function bs(t,e=0,n=1,r,i){t.min=Qu(t.min,e,n,r,i),t.max=Qu(t.max,e,n,r,i)}function tf(t,{x:e,y:n}){bs(t.x,e.translate,e.scale,e.originPoint),bs(t.y,n.translate,n.scale,n.originPoint)}const ef=.999999999999,nf=1.0000000000001;function k0(t,e,n,r=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Cn(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,tf(t,s)),r&&Je(o.latestValues)&&Cn(t,o.latestValues))}e.x<nf&&e.x>ef&&(e.x=1),e.y<nf&&e.y>ef&&(e.y=1)}function An(t,e){t.min=t.min+e,t.max=t.max+e}function rf(t,e,n,r,i=.5){const o=Mt(t.min,t.max,i);bs(t,e,n,o,r)}function Cn(t,e){rf(t.x,e.x,e.scaleX,e.scale,e.originX),rf(t.y,e.y,e.scaleY,e.scale,e.originY)}function of(t,e){return Xu(P0(t.getBoundingClientRect(),e))}function O0(t,e,n){const r=of(t,n),{scroll:i}=e;return i&&(An(r.x,i.offset.x),An(r.y,i.offset.y)),r}const sf=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tn=()=>({x:sf(),y:sf()}),af=()=>({min:0,max:0}),Lt=()=>({x:af(),y:af()}),_s={current:null},cf={current:!1};function I0(){if(cf.current=!0,!!_o)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>_s.current=t.matches;t.addEventListener("change",e),e()}else _s.current=!1}const R0=new WeakMap;function M0(t,e,n){for(const r in e){const i=e[r],o=n[r];if(Zt(i))t.addValue(r,i);else if(Zt(o))t.addValue(r,xn(i,{owner:t}));else if(o!==i)if(t.hasValue(r)){const s=t.getValue(r);s.liveStyle===!0?s.jump(i):s.hasAnimated||s.set(i)}else{const s=t.getStaticValue(r);t.addValue(r,xn(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const lf=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class N0{scrapeMotionValuesFromProps(e,n,r){return{}}constructor({parent:e,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Qo,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.renderScheduledAt=0,this.scheduleRender=()=>{const m=ie.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,Ot.render(this.render,!1,!0))};const{latestValues:l,renderState:f}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=f,this.parent=e,this.props=n,this.presenceContext=r,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=ti(n),this.isVariantNode=Fu(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const y=h[m];l[m]!==void 0&&Zt(y)&&y.set(l[m])}}mount(e){var n;this.current=e,R0.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),cf.current||I0(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:_s.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),$e(this.notifyUpdate),$e(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const r=this.features[n];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const r=_n.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&Ot.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Sn){const n=Sn[e];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[e]&&i&&r(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Lt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<lf.length;r++){const i=lf[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,s=e[o];s&&(this.propEventSubscriptions[i]=this.on(i,s))}this.prevMotionValues=M0(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const r=this.values.get(e);n!==r&&(r&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let r=this.values.get(e);return r===void 0&&n!==void 0&&(r=xn(n===null?void 0:n,{owner:this}),this.addValue(e,r)),r}readValue(e,n){let r=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return r!=null&&(typeof r=="string"&&(_l(r)||Sl(r))?r=parseFloat(r):!qg(r)&&ze.test(n)&&(r=_u(e,n)),this.setBaseTarget(e,Zt(r)?r.get():r)),Zt(r)?r.get():r}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var o;const{initial:n}=this.props;let r;if(typeof n=="string"||typeof n=="object"){const s=ps(this.props,n,(o=this.presenceContext)==null?void 0:o.custom);s&&(r=s[e])}if(n&&r!==void 0)return r;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!Zt(i)?i:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Ao),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){is.render(this.render)}}class uf extends N0{constructor(){super(...arguments),this.KeyframeResolver=Mg}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:r}){delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Zt(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function ff(t,{style:e,vars:n},r,i){const o=t.style;let s;for(s in e)o[s]=e[s];i==null||i.applyProjectionStyles(o,r);for(s in n)o.setProperty(s,n[s])}function D0(t){return window.getComputedStyle(t)}class B0 extends uf{constructor(){super(...arguments),this.type="html",this.renderInstance=ff}readValueFromInstance(e,n){var r;if(_n.has(n))return(r=this.projection)!=null&&r.isProjecting?Ko(n):Qy(e,n);{const i=D0(e),o=(ko(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return of(e,n)}build(e,n,r){fs(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ms(e,n,r)}}const df=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 F0(t,e,n,r){ff(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(df.has(i)?i:ys(i),e.attrs[i])}class L0 extends uf{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Lt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(_n.has(n)){const r=bu(n);return r&&r.default||0}return n=df.has(n)?n:ys(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return Hu(e,n,r)}build(e,n,r){$u(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){F0(e,n,r,i)}mount(e){this.isSVGTag=zu(e.tagName),super.mount(e)}}const j0=(t,e)=>hs(t)?new L0(e):new B0(e,{allowProjection:t!==Pt});function Pn(t,e,n){const r=t.getProps();return ps(r,e,n!==void 0?n:r.custom,t)}const xs=t=>Array.isArray(t);function V0(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,xn(n))}function $0(t){return xs(t)?t[t.length-1]||0:t}function U0(t,e){const n=Pn(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=$0(o[s]);V0(t,s,a)}}function z0(t){return!!(Zt(t)&&t.add)}function Ss(t,e){const n=t.getValue("willChange");if(z0(n))return n.add(e);if(!n&&Ne.WillChange){const r=new Ne.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function hf(t){return t.props[Gu]}const W0=t=>t!==null;function q0(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(W0),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const H0={type:"spring",stiffness:500,damping:25,restSpeed:10},G0=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),K0={type:"keyframes",duration:.8},Y0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},X0=(t,{keyframes:e})=>e.length>2?K0:_n.has(t)?t.startsWith("scale")?G0(e[1]):H0:Y0;function J0({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:f,...c}){return!!Object.keys(c).length}const Es=(t,e,n,r={},i,o)=>s=>{const a=es(r,t)||{},l=a.delay||r.delay||0;let{elapsed:f=0}=r;f=f-be(l);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-f,onUpdate:m=>{e.set(m),a.onUpdate&&a.onUpdate(m)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};J0(a)||Object.assign(c,X0(t,c)),c.duration&&(c.duration=be(c.duration)),c.repeatDelay&&(c.repeatDelay=be(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(ts(c),c.delay===0&&(h=!0)),(Ne.instantAnimations||Ne.skipAnimations)&&(h=!0,ts(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const m=q0(c.keyframes,a);if(m!==void 0){Ot.update(()=>{c.onUpdate(m),c.onComplete()});return}}return a.isSync?new qo(c):new xg(c)};function Z0({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function pf(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;r&&(o=r);const l=[],f=i&&t.animationState&&t.animationState.getState()[i];for(const c in a){const h=t.getValue(c,t.latestValues[c]??null),m=a[c];if(m===void 0||f&&Z0(f,c))continue;const y={delay:n,...es(o||{},c)},b=h.get();if(b!==void 0&&!h.isAnimating&&!Array.isArray(m)&&m===b&&!y.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const x=hf(t);if(x){const v=window.MotionHandoffAnimation(x,c,Ot);v!==null&&(y.startTime=v,w=!0)}}Ss(t,c),h.start(Es(c,h,m,t.shouldReduceMotion&&mu.has(c)?{type:!1}:y,t,w));const T=h.animation;T&&l.push(T)}return s&&Promise.all(l).then(()=>{Ot.update(()=>{s&&U0(t,s)})}),l}function mf(t,e,n,r=0,i=1){const o=Array.from(t).sort((f,c)=>f.sortNodePosition(c)).indexOf(e),s=t.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function As(t,e,n={}){var l;const r=Pn(t,e,n.type==="exit"?(l=t.presenceContext)==null?void 0:l.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(pf(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(f=0)=>{const{delayChildren:c=0,staggerChildren:h,staggerDirection:m}=i;return Q0(t,e,f,c,h,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[f,c]=a==="beforeChildren"?[o,s]:[s,o];return f().then(()=>c())}else return Promise.all([o(),s(n.delay)])}function Q0(t,e,n=0,r=0,i=0,o=1,s){const a=[];for(const l of t.variantChildren)l.notify("AnimationStart",e),a.push(As(l,e,{...s,delay:n+(typeof r=="function"?0:r)+mf(t.variantChildren,l,r,i,o)}).then(()=>l.notify("AnimationComplete",e)));return Promise.all(a)}function tv(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>As(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=As(t,e,n);else{const i=typeof e=="function"?Pn(t,e,n.custom):e;r=Promise.all(pf(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function yf(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}const ev=us.length;function gf(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?gf(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<ev;n++){const r=us[n],i=t.props[r];(lr(i)||i===!1)&&(e[r]=i)}return e}const nv=[...ls].reverse(),rv=ls.length;function iv(t){return e=>Promise.all(e.map(({animation:n,options:r})=>tv(t,n,r)))}function ov(t){let e=iv(t),n=vf(),r=!0;const i=l=>(f,c)=>{var m;const h=Pn(t,c,l==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(h){const{transition:y,transitionEnd:b,...w}=h;f={...f,...w,...b}}return f};function o(l){e=l(t)}function s(l){const{props:f}=t,c=gf(t.parent)||{},h=[],m=new Set;let y={},b=1/0;for(let T=0;T<rv;T++){const x=nv[T],v=n[x],E=f[x]!==void 0?f[x]:c[x],M=lr(E),O=x===l?v.isActive:null;O===!1&&(b=T);let j=E===c[x]&&E!==f[x]&&M;if(j&&r&&t.manuallyAnimateOnMount&&(j=!1),v.protectedKeys={...y},!v.isActive&&O===null||!E&&!v.prevProp||Qr(E)||typeof E=="boolean")continue;const B=sv(v.prevProp,E);let F=B||x===l&&v.isActive&&!j&&M||T>b&&M,L=!1;const Y=Array.isArray(E)?E:[E];let Z=Y.reduce(i(x),{});O===!1&&(Z={});const{prevResolvedValues:nt={}}=v,st={...nt,...Z},_t=at=>{F=!0,m.has(at)&&(L=!0,m.delete(at)),v.needsAnimating[at]=!0;const pt=t.getValue(at);pt&&(pt.liveStyle=!1)};for(const at in st){const pt=Z[at],z=nt[at];if(y.hasOwnProperty(at))continue;let H=!1;xs(pt)&&xs(z)?H=!yf(pt,z):H=pt!==z,H?pt!=null?_t(at):m.add(at):pt!==void 0&&m.has(at)?_t(at):v.protectedKeys[at]=!0}v.prevProp=E,v.prevResolvedValues=Z,v.isActive&&(y={...y,...Z}),r&&t.blockInitialAnimation&&(F=!1);const dt=j&&B;F&&(!dt||L)&&h.push(...Y.map(at=>{const pt={type:x};if(typeof at=="string"&&r&&!dt&&t.manuallyAnimateOnMount&&t.parent){const{parent:z}=t,H=Pn(z,at);if(z.enteringChildren&&H){const{delayChildren:G}=H.transition||{};pt.delay=mf(z.enteringChildren,t,G)}}return{animation:at,options:pt}}))}if(m.size){const T={};if(typeof f.initial!="boolean"){const x=Pn(t,Array.isArray(f.initial)?f.initial[0]:f.initial);x&&x.transition&&(T.transition=x.transition)}m.forEach(x=>{const v=t.getBaseTarget(x),E=t.getValue(x);E&&(E.liveStyle=!0),T[x]=v??null}),h.push({animation:T})}let w=!!h.length;return r&&(f.initial===!1||f.initial===f.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,w?e(h):Promise.resolve()}function a(l,f){var h;if(n[l].isActive===f)return Promise.resolve();(h=t.variantChildren)==null||h.forEach(m=>{var y;return(y=m.animationState)==null?void 0:y.setActive(l,f)}),n[l].isActive=f;const c=s(l);for(const m in n)n[m].protectedKeys={};return c}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=vf(),r=!0}}}function sv(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!yf(e,t):!1}function Ze(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vf(){return{animate:Ze(!0),whileInView:Ze(),whileHover:Ze(),whileTap:Ze(),whileDrag:Ze(),whileFocus:Ze(),exit:Ze()}}class We{constructor(e){this.isMounted=!1,this.node=e}update(){}}class av extends We{constructor(e){super(e),e.animationState||(e.animationState=ov(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Qr(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let cv=0;class lv extends We{constructor(){super(...arguments),this.id=cv++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const uv={animation:{Feature:av},exit:{Feature:lv}};function fr(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function dr(t){return{point:{x:t.pageX,y:t.pageY}}}const fv=t=>e=>os(e)&&t(e,dr(e));function hr(t,e,n,r){return fr(t,e,fv(n),r)}const wf=1e-4,dv=1-wf,hv=1+wf,bf=.01,pv=0-bf,mv=0+bf;function ee(t){return t.max-t.min}function yv(t,e,n){return Math.abs(t-e)<=n}function _f(t,e,n,r=.5){t.origin=r,t.originPoint=Mt(e.min,e.max,t.origin),t.scale=ee(n)/ee(e),t.translate=Mt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=dv&&t.scale<=hv||isNaN(t.scale))&&(t.scale=1),(t.translate>=pv&&t.translate<=mv||isNaN(t.translate))&&(t.translate=0)}function pr(t,e,n,r){_f(t.x,e.x,n.x,r?r.originX:void 0),_f(t.y,e.y,n.y,r?r.originY:void 0)}function xf(t,e,n){t.min=n.min+e.min,t.max=t.min+ee(e)}function gv(t,e,n){xf(t.x,e.x,n.x),xf(t.y,e.y,n.y)}function Sf(t,e,n){t.min=e.min-n.min,t.max=t.min+ee(e)}function mr(t,e,n){Sf(t.x,e.x,n.x),Sf(t.y,e.y,n.y)}function fe(t){return[t("x"),t("y")]}const Ef=({current:t})=>t?t.ownerDocument.defaultView:null,Af=(t,e)=>Math.abs(t-e);function vv(t,e){const n=Af(t.x,e.x),r=Af(t.y,e.y);return Math.sqrt(n**2+r**2)}class Cf{constructor(e,n,{transformPagePoint:r,contextWindow:i=window,dragSnapToOrigin:o=!1,distanceThreshold:s=3}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=Ts(this.lastMoveEventInfo,this.history),y=this.startEvent!==null,b=vv(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!y&&!b)return;const{point:w}=m,{timestamp:T}=Xt;this.history.push({...w,timestamp:T});const{onStart:x,onMove:v}=this.handlers;y||(x&&x(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,m)},this.handlePointerMove=(m,y)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Cs(y,this.transformPagePoint),Ot.update(this.updatePoint,!0)},this.handlePointerUp=(m,y)=>{this.end();const{onEnd:b,onSessionEnd:w,resumeAnimation:T}=this.handlers;if(this.dragSnapToOrigin&&T&&T(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Ts(m.type==="pointercancel"?this.lastMoveEventInfo:Cs(y,this.transformPagePoint),this.history);this.startEvent&&b&&b(m,x),w&&w(m,x)},!os(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=dr(e),l=Cs(a,this.transformPagePoint),{point:f}=l,{timestamp:c}=Xt;this.history=[{...f,timestamp:c}];const{onSessionStart:h}=n;h&&h(e,Ts(l,this.history)),this.removeListeners=tr(hr(this.contextWindow,"pointermove",this.handlePointerMove),hr(this.contextWindow,"pointerup",this.handlePointerUp),hr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),$e(this.updatePoint)}}function Cs(t,e){return e?{point:e(t.point)}:t}function Tf(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ts({point:t},e){return{point:t,delta:Tf(t,Pf(e)),offset:Tf(t,wv(e)),velocity:bv(e,.1)}}function wv(t){return t[0]}function Pf(t){return t[t.length-1]}function bv(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Pf(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>be(e)));)n--;if(!r)return{x:0,y:0};const o=_e(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function _v(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?Mt(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?Mt(n,t,r.max):Math.min(t,n)),t}function kf(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function xv(t,{top:e,left:n,bottom:r,right:i}){return{x:kf(t.x,n,i),y:kf(t.y,e,r)}}function Of(t,e){let n=e.min-t.min,r=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,r]=[r,n]),{min:n,max:r}}function Sv(t,e){return{x:Of(t.x,e.x),y:Of(t.y,e.y)}}function Ev(t,e){let n=.5;const r=ee(t),i=ee(e);return i>r?n=er(e.min,e.max-r,t.min):r>i&&(n=er(t.min,t.max-i,e.min)),Me(0,1,n)}function Av(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ps=.35;function Cv(t=Ps){return t===!1?t=0:t===!0&&(t=Ps),{x:If(t,"left","right"),y:If(t,"top","bottom")}}function If(t,e,n){return{min:Rf(t,e),max:Rf(t,n)}}function Rf(t,e){return typeof t=="number"?t:t[e]||0}const Tv=new WeakMap;class Pv{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Lt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:r}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const o=h=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(dr(h).point)},s=(h,m)=>{const{drag:y,dragPropagation:b,onDragStart:w}=this.getProps();if(y&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fg(y),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=m,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),fe(x=>{let v=this.getAxisMotionValue(x).get()||0;if(xe.test(v)){const{projection:E}=this.visualElement;if(E&&E.layout){const M=E.layout.layoutBox[x];M&&(v=ee(M)*(parseFloat(v)/100))}}this.originPoint[x]=v}),w&&Ot.postRender(()=>w(h,m)),Ss(this.visualElement,"transform");const{animationState:T}=this.visualElement;T&&T.setActive("whileDrag",!0)},a=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m;const{dragPropagation:y,dragDirectionLock:b,onDirectionLock:w,onDrag:T}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:x}=m;if(b&&this.currentDirection===null){this.currentDirection=kv(x),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),T&&T(h,m)},l=(h,m)=>{this.latestPointerEvent=h,this.latestPanInfo=m,this.stop(h,m),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>fe(h=>{var m;return this.getAnimationState(h)==="paused"&&((m=this.getAxisMotionValue(h).animation)==null?void 0:m.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new Cf(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:f},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:r,contextWindow:Ef(this.visualElement)})}stop(e,n){const r=e||this.latestPointerEvent,i=n||this.latestPanInfo,o=this.isDragging;if(this.cancel(),!o||!i||!r)return;const{velocity:s}=i;this.startAnimation(s);const{onDragEnd:a}=this.getProps();a&&Ot.postRender(()=>a(r,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,r){const{drag:i}=this.getProps();if(!r||!ri(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=_v(s,this.constraints[e],this.elastic[e])),o.set(s)}resolveConstraints(){var o;const{dragConstraints:e,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(o=this.visualElement.projection)==null?void 0:o.layout,i=this.constraints;e&&En(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=xv(r.layoutBox,e):this.constraints=!1,this.elastic=Cv(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&fe(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=Av(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!En(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=O0(r,i.root,this.visualElement.getTransformPagePoint());let s=Sv(i.layout.layoutBox,o);if(n){const a=n(T0(s));this.hasMutatedConstraints=!!a,a&&(s=Xu(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=fe(c=>{if(!ri(c,n,this.currentDirection))return;let h=l&&l[c]||{};s&&(h={min:0,max:0});const m=i?200:1e6,y=i?40:1e7,b={type:"inertia",velocity:r?e[c]:0,bounceStiffness:m,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(c,b)});return Promise.all(f).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Ss(this.visualElement,e),r.start(Es(e,r,0,n,this.visualElement,!1))}stopAnimation(){fe(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){fe(e=>{var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.pause()})}getAnimationState(e){var n;return(n=this.getAxisMotionValue(e).animation)==null?void 0:n.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(e,(r.initial?r.initial[e]:void 0)||0)}snapToCursor(e){fe(n=>{const{drag:r}=this.getProps();if(!ri(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(e[n]-Mt(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!En(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};fe(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const l=a.get();i[s]=Ev({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),fe(s=>{if(!ri(s,e,null))return;const a=this.getAxisMotionValue(s),{min:l,max:f}=this.constraints[s];a.set(Mt(l,f,i[s]))})}addListeners(){if(!this.visualElement.current)return;Tv.set(this.visualElement,this);const e=this.visualElement.current,n=hr(e,"pointerdown",l=>{const{drag:f,dragListener:c=!0}=this.getProps();f&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();En(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),Ot.read(r);const s=fr(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f})=>{this.isDragging&&f&&(fe(c=>{const h=this.getAxisMotionValue(c);h&&(this.originPoint[c]+=l[c].translate,h.set(h.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Ps,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function ri(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function kv(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class Ov extends We{constructor(e){super(e),this.removeGroupControls=ue,this.removeListeners=ue,this.controls=new Pv(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||ue}unmount(){this.removeGroupControls(),this.removeListeners()}}const Mf=t=>(e,n)=>{t&&Ot.postRender(()=>t(e,n))};class Iv extends We{constructor(){super(...arguments),this.removePointerDownListener=ue}onPointerDown(e){this.session=new Cf(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ef(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Mf(e),onStart:Mf(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&Ot.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=hr(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ii={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Nf(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const yr={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ot.test(t))t=parseFloat(t);else return t;const n=Nf(t,e.target.x),r=Nf(t,e.target.y);return`${n}% ${r}%`}},Rv={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=ze.parse(t);if(i.length>5)return r;const o=ze.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=l;const f=Mt(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=f),typeof i[3+s]=="number"&&(i[3+s]/=f),o(i)}};let ks=!1;class Mv extends se{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;n0(Nv),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),ks&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),ii.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,ks=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||Ot.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),is.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;ks=!0,i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Df(t){const[e,n]=Ru(),r=Ft(wo);return P(Mv,{...t,layoutGroup:r,switchLayoutGroup:Ft(Ku),isPresent:e,safeToRemove:n})}const Nv={borderRadius:{...yr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:yr,borderTopRightRadius:yr,borderBottomLeftRadius:yr,borderBottomRightRadius:yr,boxShadow:Rv};function Dv(t,e,n){const r=Zt(t)?t:xn(t);return r.start(Es("",r,e,n)),r.animation}const Bv=(t,e)=>t.depth-e.depth;class Fv{constructor(){this.children=[],this.isDirty=!1}add(e){xo(this.children,e),this.isDirty=!0}remove(e){So(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Bv),this.isDirty=!1,this.children.forEach(e)}}function Lv(t,e){const n=ie.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&($e(r),t(o-e))};return Ot.setup(r,!0),()=>$e(r)}const Bf=["TopLeft","TopRight","BottomLeft","BottomRight"],jv=Bf.length,Ff=t=>typeof t=="string"?parseFloat(t):t,Lf=t=>typeof t=="number"||ot.test(t);function Vv(t,e,n,r,i,o){i?(t.opacity=Mt(0,n.opacity??1,$v(r)),t.opacityExit=Mt(e.opacity??1,0,Uv(r))):o&&(t.opacity=Mt(e.opacity??1,n.opacity??1,r));for(let s=0;s<jv;s++){const a=`border${Bf[s]}Radius`;let l=jf(e,a),f=jf(n,a);if(l===void 0&&f===void 0)continue;l||(l=0),f||(f=0),l===0||f===0||Lf(l)===Lf(f)?(t[a]=Math.max(Mt(Ff(l),Ff(f),r),0),(xe.test(f)||xe.test(l))&&(t[a]+="%")):t[a]=f}(e.rotate||n.rotate)&&(t.rotate=Mt(e.rotate||0,n.rotate||0,r))}function jf(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const $v=Vf(0,.5,Il),Uv=Vf(.5,.95,ue);function Vf(t,e,n){return r=>r<t?0:r>e?1:n(er(t,e,r))}function $f(t,e){t.min=e.min,t.max=e.max}function de(t,e){$f(t.x,e.x),$f(t.y,e.y)}function Uf(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function zf(t,e,n,r,i){return t-=e,t=ni(t,1/n,r),i!==void 0&&(t=ni(t,1/i,r)),t}function zv(t,e=0,n=1,r=.5,i,o=t,s=t){if(xe.test(e)&&(e=parseFloat(e),e=Mt(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=Mt(o.min,o.max,r);t===o&&(a-=e),t.min=zf(t.min,e,n,a,i),t.max=zf(t.max,e,n,a,i)}function Wf(t,e,[n,r,i],o,s){zv(t,e[n],e[r],e[i],e.scale,o,s)}const Wv=["x","scaleX","originX"],qv=["y","scaleY","originY"];function qf(t,e,n,r){Wf(t.x,e,Wv,n?n.x:void 0,r?r.x:void 0),Wf(t.y,e,qv,n?n.y:void 0,r?r.y:void 0)}function Hf(t){return t.translate===0&&t.scale===1}function Gf(t){return Hf(t.x)&&Hf(t.y)}function Kf(t,e){return t.min===e.min&&t.max===e.max}function Hv(t,e){return Kf(t.x,e.x)&&Kf(t.y,e.y)}function Yf(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Xf(t,e){return Yf(t.x,e.x)&&Yf(t.y,e.y)}function Jf(t){return ee(t.x)/ee(t.y)}function Zf(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Gv{constructor(){this.members=[]}add(e){xo(this.members,e),e.scheduleRender()}remove(e){if(So(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(e,n){const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,n&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:r}=e;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Kv(t,e,n){let r="";const i=t.x.translate/e.x,o=t.y.translate/e.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(e.x!==1||e.y!==1)&&(r+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:f,rotate:c,rotateX:h,rotateY:m,skewX:y,skewY:b}=n;f&&(r=`perspective(${f}px) ${r}`),c&&(r+=`rotate(${c}deg) `),h&&(r+=`rotateX(${h}deg) `),m&&(r+=`rotateY(${m}deg) `),y&&(r+=`skewX(${y}deg) `),b&&(r+=`skewY(${b}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Os=["","X","Y","Z"],Yv=1e3;let Xv=0;function Is(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function Qf(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=hf(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",Ot,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&Qf(r)}function td({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Xv++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Qv),this.nodes.forEach(rw),this.nodes.forEach(iw),this.nodes.forEach(tw)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Fv)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Ao),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Iu(s)&&!zg(s),this.instance=s;const{layoutId:a,layout:l,visualElement:f}=this.options;if(f&&!f.current&&f.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const m=()=>this.root.updateBlockedByResize=!1;Ot.read(()=>{h=window.innerWidth}),t(s,()=>{const y=window.innerWidth;y!==h&&(h=y,this.root.updateBlockedByResize=!0,c&&c(),c=Lv(m,250),ii.hasAnimatedSinceResize&&(ii.hasAnimatedSinceResize=!1,this.nodes.forEach(rd)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&f&&(a||l)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||f.getDefaultTransition()||lw,{onLayoutAnimationStart:w,onLayoutAnimationComplete:T}=f.getProps(),x=!this.targetLayout||!Xf(this.targetLayout,y),v=!h&&m;if(this.options.layoutRoot||this.resumeFrom||v||h&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const E={...es(b,"layout"),onPlay:w,onComplete:T};(f.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E),this.setAnimationOrigin(c,v)}else h||rd(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),$e(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(ow),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Qf(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const f=this.getTransformTemplate();this.prevTransformTemplateValue=f?f(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ed);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(nd);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nw),this.nodes.forEach(Jv),this.nodes.forEach(Zv)):this.nodes.forEach(nd),this.clearAllSnapshots();const a=ie.now();Xt.delta=Me(0,1e3/60,a-Xt.timestamp),Xt.timestamp=a,Xt.isProcessing=!0,Po.update.process(Xt),Po.preRender.process(Xt),Po.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,is.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ew),this.sharedNodes.forEach(sw)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ot.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ot.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!ee(this.snapshot.measuredBox.x)&&!ee(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Lt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&this.instance){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Gf(this.projectionDelta),l=this.getTransformTemplate(),f=l?l(this.latestValues,""):void 0,c=f!==this.prevTransformTemplateValue;s&&this.instance&&(a||Je(this.latestValues)||c)&&(i(this.instance,f),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),uw(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var f;const{visualElement:s}=this.options;if(!s)return Lt();const a=s.measureViewportBox();if(!(((f=this.scroll)==null?void 0:f.wasRoot)||this.path.some(fw))){const{scroll:c}=this.root;c&&(An(a.x,c.offset.x),An(a.y,c.offset.y))}return a}removeElementScroll(s){var l;const a=Lt();if(de(a,s),(l=this.scroll)!=null&&l.wasRoot)return a;for(let f=0;f<this.path.length;f++){const c=this.path[f],{scroll:h,options:m}=c;c!==this.root&&h&&m.layoutScroll&&(h.wasRoot&&de(a,s),An(a.x,h.offset.x),An(a.y,h.offset.y))}return a}applyTransform(s,a=!1){const l=Lt();de(l,s);for(let f=0;f<this.path.length;f++){const c=this.path[f];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&Cn(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),Je(c.latestValues)&&Cn(l,c.latestValues)}return Je(this.latestValues)&&Cn(l,this.latestValues),l}removeTransform(s){const a=Lt();de(a,s);for(let l=0;l<this.path.length;l++){const f=this.path[l];if(!f.instance||!Je(f.latestValues))continue;ws(f.latestValues)&&f.updateSnapshot();const c=Lt(),h=f.measurePageBox();de(c,h),qf(a,f.latestValues,f.snapshot?f.snapshot.layoutBox:void 0,c)}return Je(this.latestValues)&&qf(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var m;const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(s||l&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!(!this.layout||!(c||h))){if(this.resolvedRelativeTargetAt=Xt.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),mr(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),de(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Lt(),this.targetWithTransforms=Lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),gv(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):de(this.target,this.layout.layoutBox),tf(this.target,this.targetDelta)):de(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Lt(),this.relativeTargetOrigin=Lt(),mr(this.relativeTargetOrigin,this.target,y.target),de(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||ws(this.parent.latestValues)||Ju(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var b;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let l=!0;if((this.isProjectionDirty||(b=this.parent)!=null&&b.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===Xt.timestamp&&(l=!1),l)return;const{layout:f,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||c))return;de(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;k0(this.layoutCorrected,this.treeScale,this.path,a),s.layout&&!s.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(s.target=s.layout.layoutBox,s.targetWithTransforms=Lt());const{target:y}=s;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Uf(this.prevProjectionDelta.x,this.projectionDelta.x),Uf(this.prevProjectionDelta.y,this.projectionDelta.y)),pr(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!Zf(this.projectionDelta.x,this.prevProjectionDelta.x)||!Zf(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Tn(),this.projectionDelta=Tn(),this.projectionDeltaWithTransform=Tn()}setAnimationOrigin(s,a=!1){const l=this.snapshot,f=l?l.latestValues:{},c={...this.latestValues},h=Tn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=Lt(),y=l?l.source:void 0,b=this.layout?this.layout.source:void 0,w=y!==b,T=this.getStack(),x=!T||T.members.length<=1,v=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(cw));this.animationProgress=0;let E;this.mixTargetDelta=M=>{const O=M/1e3;id(h.x,s.x,O),id(h.y,s.y,O),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(mr(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),aw(this.relativeTarget,this.relativeTargetOrigin,m,O),E&&Hv(this.relativeTarget,E)&&(this.isProjectionDirty=!1),E||(E=Lt()),de(E,this.relativeTarget)),w&&(this.animationValues=c,Vv(c,f,this.latestValues,O,v,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,l,f;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(f=(l=this.resumingFrom)==null?void 0:l.currentAnimation)==null||f.stop(),this.pendingAnimation&&($e(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ot.update(()=>{ii.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=xn(0)),this.currentAnimation=Dv(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:c=>{this.mixTargetDelta(c),s.onUpdate&&s.onUpdate(c)},onStop:()=>{},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Yv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:c}=s;if(!(!a||!l||!f)){if(this!==s&&this.layout&&f&&ld(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||Lt();const h=ee(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+h;const m=ee(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+m}de(a,l),Cn(a,c),pr(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Gv),this.sharedNodes.get(s).add(a);const f=a.options.initialPromotionConfig;a.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())==null?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())==null?void 0:a.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const f=this.getStack();f&&f.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const f={};l.z&&Is("z",s,f,this.animationValues);for(let c=0;c<Os.length;c++)Is(`rotate${Os[c]}`,s,f,this.animationValues),Is(`skew${Os[c]}`,s,f,this.animationValues);s.render();for(const c in f)s.setStaticValue(c,f[c]),this.animationValues&&(this.animationValues[c]=f[c]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=ei(a==null?void 0:a.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none";return}const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=ei(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Je(this.latestValues)&&(s.transform=l?l({},""):"none",this.hasProjected=!1);return}s.visibility="";const c=f.animationValues||f.latestValues;this.applyTransformsToTarget();let h=Kv(this.projectionDeltaWithTransform,this.treeScale,c);l&&(h=l(c,h)),s.transform=h;const{x:m,y}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${y.origin*100}% 0`,f.animationValues?s.opacity=f===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:s.opacity=f===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const b in ur){if(c[b]===void 0)continue;const{correct:w,applyTo:T,isCSSVariable:x}=ur[b],v=h==="none"?c[b]:w(c[b],f);if(T){const E=T.length;for(let M=0;M<E;M++)s[T[M]]=v}else x?this.options.visualElement.renderState.vars[b]=v:s[b]=v}this.options.layoutId&&(s.pointerEvents=f===this?ei(a==null?void 0:a.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)==null?void 0:a.stop()}),this.root.nodes.forEach(ed),this.root.sharedNodes.clear()}}}function Jv(t){t.updateLayout()}function Zv(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=t.layout,{animationType:o}=t.options,s=e.source!==t.layout.source;o==="size"?fe(h=>{const m=s?e.measuredBox[h]:e.layoutBox[h],y=ee(m);m.min=r[h].min,m.max=m.min+y}):ld(o,e.layoutBox,r)&&fe(h=>{const m=s?e.measuredBox[h]:e.layoutBox[h],y=ee(r[h]);m.max=m.min+y,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[h].max=t.relativeTarget[h].min+y)});const a=Tn();pr(a,r,e.layoutBox);const l=Tn();s?pr(l,t.applyTransform(i,!0),e.measuredBox):pr(l,r,e.layoutBox);const f=!Gf(a);let c=!1;if(!t.resumeFrom){const h=t.getClosestProjectingParent();if(h&&!h.resumeFrom){const{snapshot:m,layout:y}=h;if(m&&y){const b=Lt();mr(b,e.layoutBox,m.layoutBox);const w=Lt();mr(w,r,y.layoutBox),Xf(b,w)||(c=!0),h.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=b,t.relativeParent=h)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:l,layoutDelta:a,hasLayoutChanged:f,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function Qv(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function tw(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ew(t){t.clearSnapshot()}function ed(t){t.clearMeasurements()}function nd(t){t.isLayoutDirty=!1}function nw(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rd(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function rw(t){t.resolveTargetDelta()}function iw(t){t.calcProjection()}function ow(t){t.resetSkewAndRotation()}function sw(t){t.removeLeadSnapshot()}function id(t,e,n){t.translate=Mt(e.translate,0,n),t.scale=Mt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function od(t,e,n,r){t.min=Mt(e.min,n.min,r),t.max=Mt(e.max,n.max,r)}function aw(t,e,n,r){od(t.x,e.x,n.x,r),od(t.y,e.y,n.y,r)}function cw(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const lw={duration:.45,ease:[.4,0,.1,1]},sd=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),ad=sd("applewebkit/")&&!sd("chrome/")?Math.round:ue;function cd(t){t.min=ad(t.min),t.max=ad(t.max)}function uw(t){cd(t.x),cd(t.y)}function ld(t,e,n){return t==="position"||t==="preserve-aspect"&&!yv(Jf(e),Jf(n),.2)}function fw(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const dw=td({attachResizeListener:(t,e)=>fr(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Rs={current:void 0},ud=td({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Rs.current){const t=new dw({});t.mount(window),t.setOptions({layoutScroll:!0}),Rs.current=t}return Rs.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),hw={pan:{Feature:Iv},drag:{Feature:Ov,ProjectionNode:ud,MeasureLayout:Df}};function fd(t,e,n){const{props:r}=t;t.animationState&&r.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&Ot.postRender(()=>o(e,dr(e)))}class pw extends We{mount(){const{current:e}=this.node;e&&(this.unmount=Lg(e,(n,r)=>(fd(this.node,r,"Start"),i=>fd(this.node,i,"End"))))}unmount(){}}class mw extends We{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=tr(fr(this.node.current,"focus",()=>this.onFocus()),fr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function dd(t,e,n){const{props:r}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&r.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&Ot.postRender(()=>o(e,dr(e)))}class yw extends We{mount(){const{current:e}=this.node;e&&(this.unmount=Ug(e,(n,r)=>(dd(this.node,r,"Start"),(i,{success:o})=>dd(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ms=new WeakMap,Ns=new WeakMap,gw=t=>{const e=Ms.get(t.target);e&&e(t)},vw=t=>{t.forEach(gw)};function ww({root:t,...e}){const n=t||document;Ns.has(n)||Ns.set(n,{});const r=Ns.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(vw,{root:t,...e})),r[i]}function bw(t,e,n){const r=ww(e);return Ms.set(t,n),r.observe(t),()=>{Ms.delete(t),r.unobserve(t)}}const _w={some:0,all:1};class xw extends We{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=e,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:_w[i]},a=l=>{const{isIntersecting:f}=l;if(this.isInView===f||(this.isInView=f,o&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),m=f?c:h;m&&m(l)};return bw(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(Sw(e,n))&&this.startObserver()}unmount(){}}function Sw({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Ew={...uv,...{inView:{Feature:xw},tap:{Feature:yw},focus:{Feature:mw},hover:{Feature:pw}},...hw,...{layout:{ProjectionNode:ud,MeasureLayout:Df}}},De=C0(Ew,j0);/**
|
|
10
10
|
* @license lucide-react v0.435.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
@@ -16,27 +16,27 @@
|
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the ISC license.
|
|
18
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
19
|
-
*/var
|
|
19
|
+
*/var Cw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
20
20
|
* @license lucide-react v0.435.0 - ISC
|
|
21
21
|
*
|
|
22
22
|
* This source code is licensed under the ISC license.
|
|
23
23
|
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/const
|
|
24
|
+
*/const Tw=Ve(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},l)=>et("svg",{ref:l,...Cw,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:hd("lucide",i),...a},[...s.map(([f,c])=>et(f,c)),...Array.isArray(o)?o:[o]]));/**
|
|
25
25
|
* @license lucide-react v0.435.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
|
-
*/const Se=(t,e)=>{const n
|
|
29
|
+
*/const Se=(t,e)=>{const n=Ve(({className:r,...i},o)=>et(Tw,{ref:o,iconNode:e,className:hd(`lucide-${Aw(t)}`,r),...i}));return n.displayName=`${t}`,n};/**
|
|
30
30
|
* @license lucide-react v0.435.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/const
|
|
34
|
+
*/const Pw=Se("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
|
|
35
35
|
* @license lucide-react v0.435.0 - ISC
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the ISC license.
|
|
38
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
|
-
*/const
|
|
39
|
+
*/const kw=Se("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
40
40
|
* @license lucide-react v0.435.0 - ISC
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const
|
|
59
|
+
*/const Mw=Se("SendHorizontal",[["path",{d:"m3 3 3 9-3 9 19-9Z",key:"1aobqy"}],["path",{d:"M6 12h16",key:"s4cdu5"}]]);/**
|
|
60
60
|
* @license lucide-react v0.435.0 - ISC
|
|
61
61
|
*
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const
|
|
64
|
+
*/const Nw=Se("SmilePlus",[["path",{d:"M22 11v1a10 10 0 1 1-9-10",key:"ew0xw9"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}],["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}]]);/**
|
|
65
65
|
* @license lucide-react v0.435.0 - ISC
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the ISC license.
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const Fw=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Lw=({onClick:t,isOpen:e,unreadCount:n=0})=>{const[r,i]=gt(!1);ut(()=>{if(n>0&&!e){i(!0);const s=setTimeout(()=>i(!1),600),a=setInterval(()=>{i(!0),setTimeout(()=>i(!1),600)},1e4);return()=>{clearTimeout(s),clearInterval(a)}}else i(!1)},[n,e]);const o=n>0&&!e;return
|
|
79
|
+
*/const Fw=Se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Lw=({onClick:t,isOpen:e,unreadCount:n=0})=>{const[r,i]=gt(!1);ut(()=>{if(n>0&&!e){i(!0);const s=setTimeout(()=>i(!1),600),a=setInterval(()=>{i(!0),setTimeout(()=>i(!1),600)},1e4);return()=>{clearTimeout(s),clearInterval(a)}}else i(!1)},[n,e]);const o=n>0&&!e;return P("div",{className:"fixed",style:{zIndex:9998,bottom:30,right:30},children:[r&&o&&P(De.div,{className:"absolute inset-0 rounded-full",style:{background:"linear-gradient(135deg, #7289DA 0%, #5B6EAB 80%, #22252A 100%)"},initial:{scale:1,opacity:.6},animate:{scale:1.5,opacity:0},transition:{duration:.6,ease:"easeOut"}}),P(De.button,{onClick:t,className:"relative w-14 h-14 rounded-full shadow-lg flex items-center justify-center outline-none",style:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.25)",background:"linear-gradient(135deg, #7289DA 0%, #5B6EAB 80%, #22252A 100%)"},"aria-label":e?"Close chat":"Open chat",animate:{scale:[1,.9,1.05,1]},transition:{duration:.25,ease:"easeOut"},children:[P(cs,{mode:"wait",initial:!1,children:P(De.div,{initial:{rotate:-90,opacity:0,scale:.9},animate:{rotate:0,opacity:1,scale:1},exit:{rotate:90,opacity:0,scale:.9},transition:{duration:.18,ease:"easeInOut"},className:"flex items-center justify-center",whileHover:{scale:1.1},whileTap:{scale:.95},children:e?P(Fw,{size:24,color:"#FFFFFF"}):P(Iw,{size:22,fill:"#FFFFFF",color:"#FFFFFF"})},e?"close":"open")}),P(cs,{children:o&&P(De.div,{initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},transition:{duration:.2,ease:"easeOut"},className:"absolute flex items-center justify-center",style:{top:-4,right:-4,minWidth:22,height:22,borderRadius:11,backgroundColor:"#7289DA",border:"2px solid #FFFFFF",padding:"0 6px"},children:P("span",{style:{color:"#FFFFFF",fontSize:12,fontWeight:600,lineHeight:1},children:n>99?"99+":n})})})]})]})};/*! js-cookie v3.0.5 | MIT */function oi(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var jw={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function Ds(t,e){function n(i,o,s){if(!(typeof document>"u")){s=oi({},e,s),typeof s.expires=="number"&&(s.expires=new Date(Date.now()+s.expires*864e5)),s.expires&&(s.expires=s.expires.toUTCString()),i=encodeURIComponent(i).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var l in s)s[l]&&(a+="; "+l,s[l]!==!0&&(a+="="+s[l].split(";")[0]));return document.cookie=i+"="+t.write(o,i)+a}}function r(i){if(!(typeof document>"u"||arguments.length&&!i)){for(var o=document.cookie?document.cookie.split("; "):[],s={},a=0;a<o.length;a++){var l=o[a].split("="),f=l.slice(1).join("=");try{var c=decodeURIComponent(l[0]);if(s[c]=t.read(f,c),i===c)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",oi({},o,{expires:-1}))},withAttributes:function(i){return Ds(this.converter,oi({},this.attributes,i))},withConverter:function(i){return Ds(oi({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Qe=Ds(jw,{path:"/"});const Vw={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},pd=t=>{let e;const n=new Set,r=(c,h)=>{const m=typeof c=="function"?c(e):c;if(!Object.is(m,e)){const y=e;e=h??(typeof m!="object"||m===null)?m:Object.assign({},e,m),n.forEach(b=>b(e,y))}},i=()=>e,l={setState:r,getState:i,getInitialState:()=>f,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(Vw?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=e=t(r,i,l);return l},$w=t=>t?pd(t):pd;var gr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uw(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function zw(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}),n}var md={exports:{}},yd={};const gd=zw(Ym);var vd={exports:{}},wd={};/**
|
|
80
80
|
* @license React
|
|
81
81
|
* use-sync-external-store-shim.production.min.js
|
|
82
82
|
*
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the MIT license found in the
|
|
86
86
|
* LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/var
|
|
87
|
+
*/var kn=gd;function Ww(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var qw=typeof Object.is=="function"?Object.is:Ww,Hw=kn.useState,Gw=kn.useEffect,Kw=kn.useLayoutEffect,Yw=kn.useDebugValue;function Xw(t,e){var n=e(),r=Hw({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Kw(function(){i.value=n,i.getSnapshot=e,Bs(i)&&o({inst:i})},[t,n,e]),Gw(function(){return Bs(i)&&o({inst:i}),t(function(){Bs(i)&&o({inst:i})})},[t]),Yw(n),n}function Bs(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!qw(t,n)}catch{return!0}}function Jw(t,e){return e()}var Zw=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Jw:Xw;wd.useSyncExternalStore=kn.useSyncExternalStore!==void 0?kn.useSyncExternalStore:Zw,vd.exports=wd;var Qw=vd.exports;/**
|
|
88
88
|
* @license React
|
|
89
89
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
90
90
|
*
|
|
@@ -92,35 +92,33 @@
|
|
|
92
92
|
*
|
|
93
93
|
* This source code is licensed under the MIT license found in the
|
|
94
94
|
* LICENSE file in the root directory of this source tree.
|
|
95
|
-
*/var si=gd,tb=Qw;function eb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var nb=typeof Object.is=="function"?Object.is:eb,rb=tb.useSyncExternalStore,ib=si.useRef,ob=si.useEffect,sb=si.useMemo,ab=si.useDebugValue;yd.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=ib(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=sb(function(){function l(y){if(!f){if(f=!0,c=y,y=r(y),i!==void 0&&s.hasValue){var b=s.value;if(i(b,y))return h=b}return h=y}if(b=h,nb(c,y))return b;var w=r(y);return i!==void 0&&i(b,w)?b:(c=y,h=w)}var f=!1,c,h,m=n===void 0?null:n;return[function(){return l(e())},m===null?void 0:function(){return l(m())}]},[e,n,r,i]);var a=rb(t,o[0],o[1]);return ob(function(){s.hasValue=!0,s.value=a},[a]),ab(a),a},md.exports=yd;var cb=md.exports;const lb=Uw(cb),bd={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:ub}=gn,{useSyncExternalStoreWithSelector:fb}=lb;let _d=!1;const db=t=>t;function hb(t,e=db,n){(bd?"production":void 0)!=="production"&&n&&!_d&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),_d=!0);const r=fb(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return ub(r),r}const xd=t=>{(bd?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?Vw(t):t,n=(r,i)=>hb(e,r,i);return Object.assign(n,e),n},pb=t=>t?xd(t):xd;var Sd=Symbol.for("immer-nothing"),Ed=Symbol.for("immer-draftable"),ae=Symbol.for("immer-state");function ge(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var On=Object.getPrototypeOf;function In(t){return!!t&&!!t[ae]}function tn(t){var e;return t?Ad(t)||Array.isArray(t)||!!t[Ed]||!!((e=t.constructor)!=null&&e[Ed])||li(t)||ui(t):!1}var mb=Object.prototype.constructor.toString();function Ad(t){if(!t||typeof t!="object")return!1;const e=On(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===mb}function ai(t,e){ci(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function ci(t){const e=t[ae];return e?e.type_:Array.isArray(t)?1:li(t)?2:ui(t)?3:0}function Fs(t,e){return ci(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Td(t,e,n){const r=ci(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function yb(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function li(t){return t instanceof Map}function ui(t){return t instanceof Set}function en(t){return t.copy_||t.base_}function Ls(t,e){if(li(t))return new Map(t);if(ui(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Ad(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[ae];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(On(t),r)}else{const r=On(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function js(t,e=!1){return fi(t)||In(t)||!tn(t)||(ci(t)>1&&(t.set=t.add=t.clear=t.delete=gb),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>js(r,!0))),t}function gb(){ge(2)}function fi(t){return Object.isFrozen(t)}var vb={};function nn(t){const e=vb[t];return e||ge(0,t),e}var vr;function Pd(){return vr}function wb(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function kd(t,e){e&&(nn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function $s(t){Vs(t),t.drafts_.forEach(bb),t.drafts_=null}function Vs(t){t===vr&&(vr=t.parent_)}function Cd(t){return vr=wb(vr,t)}function bb(t){const e=t[ae];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Od(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[ae].modified_&&($s(e),ge(4)),tn(t)&&(t=di(e,t),e.parent_||hi(e,t)),e.patches_&&nn("Patches").generateReplacementPatches_(n[ae].base_,t,e.patches_,e.inversePatches_)):t=di(e,n,[]),$s(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Sd?t:void 0}function di(t,e,n){if(fi(e))return e;const r=e[ae];if(!r)return ai(e,(i,o)=>Id(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return hi(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),ai(o,(a,l)=>Id(t,r,i,a,l,n,s)),hi(t,i,!1),n&&t.patches_&&nn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Id(t,e,n,r,i,o,s){if(In(i)){const a=o&&e&&e.type_!==3&&!Fs(e.assigned_,r)?o.concat(r):void 0,l=di(t,i,a);if(Td(n,r,l),In(l))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(tn(i)&&!fi(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;di(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&hi(t,i)}}function hi(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&js(e,n)}function _b(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:Pd(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Us;n&&(i=[r],o=wr);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Us={get(t,e){if(e===ae)return t;const n=en(t);if(!Fs(n,e))return xb(t,n,e);const r=n[e];return t.finalized_||!tn(r)?r:r===zs(t.base_,e)?(qs(t),t.copy_[e]=Hs(r,t)):r},has(t,e){return e in en(t)},ownKeys(t){return Reflect.ownKeys(en(t))},set(t,e,n){const r=Rd(en(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=zs(en(t),e),o=i==null?void 0:i[ae];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(yb(n,i)&&(n!==void 0||Fs(t.base_,e)))return!0;qs(t),Ws(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return zs(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,qs(t),Ws(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=en(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){ge(11)},getPrototypeOf(t){return On(t.base_)},setPrototypeOf(){ge(12)}},wr={};ai(Us,(t,e)=>{wr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),wr.deleteProperty=function(t,e){return wr.set.call(this,t,e,void 0)},wr.set=function(t,e,n){return Us.set.call(this,t[0],e,n,t[0])};function zs(t,e){const n=t[ae];return(n?en(n):t)[e]}function xb(t,e,n){var i;const r=Rd(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function Rd(t,e){if(!(e in t))return;let n=On(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=On(n)}}function Ws(t){t.modified_||(t.modified_=!0,t.parent_&&Ws(t.parent_))}function qs(t){t.copy_||(t.copy_=Ls(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Sb=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(l=o,...f){return s.produce(l,c=>n.call(this,c,...f))}}typeof n!="function"&&ge(6),r!==void 0&&typeof r!="function"&&ge(7);let i;if(tn(e)){const o=Cd(this),s=Hs(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?$s(o):Vs(o)}return kd(o,r),Od(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===Sd&&(i=void 0),this.autoFreeze_&&js(i,!0),r){const o=[],s=[];nn("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else ge(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){tn(t)||ge(8),In(t)&&(t=Eb(t));const e=Cd(this),n=Hs(t,void 0);return n[ae].isManual_=!0,Vs(e),n}finishDraft(t,e){const n=t&&t[ae];(!n||!n.isManual_)&&ge(9);const{scope_:r}=n;return kd(r,e),Od(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=nn("Patches").applyPatches_;return In(t)?r(t,e):this.produce(t,i=>r(i,e))}};function Hs(t,e){const n=li(t)?nn("MapSet").proxyMap_(t,e):ui(t)?nn("MapSet").proxySet_(t,e):_b(t,e);return(e?e.scope_:Pd()).drafts_.push(n),n}function Eb(t){return In(t)||ge(10,t),Nd(t)}function Nd(t){if(!tn(t)||fi(t))return t;const e=t[ae];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Ls(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Ls(t,!0);return ai(n,(r,i)=>{Td(n,r,Nd(i))}),e&&(e.finalized_=!1),n}var ce=new Sb,Rn=ce.produce;ce.produceWithPatches.bind(ce),ce.setAutoFreeze.bind(ce),ce.setUseStrictShallowCopy.bind(ce),ce.applyPatches.bind(ce),ce.createDraft.bind(ce),ce.finishDraft.bind(ce);const pi={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Gs=new Map,mi=t=>{const e=Gs.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},Ab=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=Gs.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return Gs.set(n.name,i),{type:"tracked",store:t,...i}},Tb=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...l}=e;let f;try{f=(o??(pi?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!f)return(pi?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:c,...h}=Ab(a,f,l);let m=!0;i.setState=(w,P,x)=>{const v=n(w,P);if(!m)return v;const E=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(c==null||c.send(E,r()),v):(c==null||c.send({...E,type:`${a}/${E.type}`},{...mi(l.name),[a]:i.getState()}),v)};const y=(...w)=>{const P=m;m=!1,n(...w),m=P},b=t(i.setState,r,i);if(h.type==="untracked"?c==null||c.init(b):(h.stores[h.store]=i,c==null||c.init(Object.fromEntries(Object.entries(h.stores).map(([w,P])=>[w,w===h.store?b:P.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let w=!1;const P=i.dispatch;i.dispatch=(...x)=>{(pi?"production":void 0)!=="production"&&x[0].type==="__setState"&&!w&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),w=!0),P(...x)}}return c.subscribe(w=>{var P;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ks(w.payload,x=>{if(x.type==="__setState"){if(a===void 0){y(x.state);return}Object.keys(x.state).length!==1&&console.error(`
|
|
95
|
+
*/var si=gd,t1=Qw;function e1(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var n1=typeof Object.is=="function"?Object.is:e1,r1=t1.useSyncExternalStore,i1=si.useRef,o1=si.useEffect,s1=si.useMemo,a1=si.useDebugValue;yd.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=i1(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=s1(function(){function l(y){if(!f){if(f=!0,c=y,y=r(y),i!==void 0&&s.hasValue){var b=s.value;if(i(b,y))return h=b}return h=y}if(b=h,n1(c,y))return b;var w=r(y);return i!==void 0&&i(b,w)?b:(c=y,h=w)}var f=!1,c,h,m=n===void 0?null:n;return[function(){return l(e())},m===null?void 0:function(){return l(m())}]},[e,n,r,i]);var a=r1(t,o[0],o[1]);return o1(function(){s.hasValue=!0,s.value=a},[a]),a1(a),a},md.exports=yd;var c1=md.exports;const l1=Uw(c1),bd={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:u1}=gn,{useSyncExternalStoreWithSelector:f1}=l1;let _d=!1;const d1=t=>t;function h1(t,e=d1,n){(bd?"production":void 0)!=="production"&&n&&!_d&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),_d=!0);const r=f1(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return u1(r),r}const xd=t=>{(bd?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?$w(t):t,n=(r,i)=>h1(e,r,i);return Object.assign(n,e),n},p1=t=>t?xd(t):xd;var Sd=Symbol.for("immer-nothing"),Ed=Symbol.for("immer-draftable"),ae=Symbol.for("immer-state");function ge(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var On=Object.getPrototypeOf;function In(t){return!!t&&!!t[ae]}function tn(t){var e;return t?Ad(t)||Array.isArray(t)||!!t[Ed]||!!((e=t.constructor)!=null&&e[Ed])||li(t)||ui(t):!1}var m1=Object.prototype.constructor.toString();function Ad(t){if(!t||typeof t!="object")return!1;const e=On(t);if(e===null)return!0;const n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===m1}function ai(t,e){ci(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function ci(t){const e=t[ae];return e?e.type_:Array.isArray(t)?1:li(t)?2:ui(t)?3:0}function Fs(t,e){return ci(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Cd(t,e,n){const r=ci(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function y1(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function li(t){return t instanceof Map}function ui(t){return t instanceof Set}function en(t){return t.copy_||t.base_}function Ls(t,e){if(li(t))return new Map(t);if(ui(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Ad(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[ae];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],a=r[s];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(r[s]={configurable:!0,writable:!0,enumerable:a.enumerable,value:t[s]})}return Object.create(On(t),r)}else{const r=On(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function js(t,e=!1){return fi(t)||In(t)||!tn(t)||(ci(t)>1&&(t.set=t.add=t.clear=t.delete=g1),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>js(r,!0))),t}function g1(){ge(2)}function fi(t){return Object.isFrozen(t)}var v1={};function nn(t){const e=v1[t];return e||ge(0,t),e}var vr;function Td(){return vr}function w1(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Pd(t,e){e&&(nn("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Vs(t){$s(t),t.drafts_.forEach(b1),t.drafts_=null}function $s(t){t===vr&&(vr=t.parent_)}function kd(t){return vr=w1(vr,t)}function b1(t){const e=t[ae];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Od(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[ae].modified_&&(Vs(e),ge(4)),tn(t)&&(t=di(e,t),e.parent_||hi(e,t)),e.patches_&&nn("Patches").generateReplacementPatches_(n[ae].base_,t,e.patches_,e.inversePatches_)):t=di(e,n,[]),Vs(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Sd?t:void 0}function di(t,e,n){if(fi(e))return e;const r=e[ae];if(!r)return ai(e,(i,o)=>Id(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return hi(t,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,s=!1;r.type_===3&&(o=new Set(i),i.clear(),s=!0),ai(o,(a,l)=>Id(t,r,i,a,l,n,s)),hi(t,i,!1),n&&t.patches_&&nn("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Id(t,e,n,r,i,o,s){if(In(i)){const a=o&&e&&e.type_!==3&&!Fs(e.assigned_,r)?o.concat(r):void 0,l=di(t,i,a);if(Cd(n,r,l),In(l))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(tn(i)&&!fi(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;di(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&hi(t,i)}}function hi(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&js(e,n)}function _1(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:Td(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Us;n&&(i=[r],o=wr);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Us={get(t,e){if(e===ae)return t;const n=en(t);if(!Fs(n,e))return x1(t,n,e);const r=n[e];return t.finalized_||!tn(r)?r:r===zs(t.base_,e)?(qs(t),t.copy_[e]=Hs(r,t)):r},has(t,e){return e in en(t)},ownKeys(t){return Reflect.ownKeys(en(t))},set(t,e,n){const r=Rd(en(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=zs(en(t),e),o=i==null?void 0:i[ae];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(y1(n,i)&&(n!==void 0||Fs(t.base_,e)))return!0;qs(t),Ws(t)}return t.copy_[e]===n&&(n!==void 0||e in t.copy_)||Number.isNaN(n)&&Number.isNaN(t.copy_[e])||(t.copy_[e]=n,t.assigned_[e]=!0),!0},deleteProperty(t,e){return zs(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,qs(t),Ws(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=en(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){ge(11)},getPrototypeOf(t){return On(t.base_)},setPrototypeOf(){ge(12)}},wr={};ai(Us,(t,e)=>{wr[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),wr.deleteProperty=function(t,e){return wr.set.call(this,t,e,void 0)},wr.set=function(t,e,n){return Us.set.call(this,t[0],e,n,t[0])};function zs(t,e){const n=t[ae];return(n?en(n):t)[e]}function x1(t,e,n){var i;const r=Rd(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function Rd(t,e){if(!(e in t))return;let n=On(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=On(n)}}function Ws(t){t.modified_||(t.modified_=!0,t.parent_&&Ws(t.parent_))}function qs(t){t.copy_||(t.copy_=Ls(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var S1=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,n,r)=>{if(typeof e=="function"&&typeof n!="function"){const o=n;n=e;const s=this;return function(l=o,...f){return s.produce(l,c=>n.call(this,c,...f))}}typeof n!="function"&&ge(6),r!==void 0&&typeof r!="function"&&ge(7);let i;if(tn(e)){const o=kd(this),s=Hs(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Vs(o):$s(o)}return Pd(o,r),Od(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===Sd&&(i=void 0),this.autoFreeze_&&js(i,!0),r){const o=[],s=[];nn("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else ge(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,l=>e(l,...a));let r,i;return[this.produce(e,n,(s,a)=>{r=s,i=a}),r,i]},typeof(t==null?void 0:t.autoFreeze)=="boolean"&&this.setAutoFreeze(t.autoFreeze),typeof(t==null?void 0:t.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(t.useStrictShallowCopy)}createDraft(t){tn(t)||ge(8),In(t)&&(t=E1(t));const e=kd(this),n=Hs(t,void 0);return n[ae].isManual_=!0,$s(e),n}finishDraft(t,e){const n=t&&t[ae];(!n||!n.isManual_)&&ge(9);const{scope_:r}=n;return Pd(r,e),Od(void 0,r)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}applyPatches(t,e){let n;for(n=e.length-1;n>=0;n--){const i=e[n];if(i.path.length===0&&i.op==="replace"){t=i.value;break}}n>-1&&(e=e.slice(n+1));const r=nn("Patches").applyPatches_;return In(t)?r(t,e):this.produce(t,i=>r(i,e))}};function Hs(t,e){const n=li(t)?nn("MapSet").proxyMap_(t,e):ui(t)?nn("MapSet").proxySet_(t,e):_1(t,e);return(e?e.scope_:Td()).drafts_.push(n),n}function E1(t){return In(t)||ge(10,t),Md(t)}function Md(t){if(!tn(t)||fi(t))return t;const e=t[ae];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Ls(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Ls(t,!0);return ai(n,(r,i)=>{Cd(n,r,Md(i))}),e&&(e.finalized_=!1),n}var ce=new S1,Rn=ce.produce;ce.produceWithPatches.bind(ce),ce.setAutoFreeze.bind(ce),ce.setUseStrictShallowCopy.bind(ce),ce.applyPatches.bind(ce),ce.createDraft.bind(ce),ce.finishDraft.bind(ce);const pi={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Gs=new Map,mi=t=>{const e=Gs.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},A1=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=Gs.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return Gs.set(n.name,i),{type:"tracked",store:t,...i}},C1=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...l}=e;let f;try{f=(o??(pi?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!f)return(pi?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:c,...h}=A1(a,f,l);let m=!0;i.setState=(w,T,x)=>{const v=n(w,T);if(!m)return v;const E=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(c==null||c.send(E,r()),v):(c==null||c.send({...E,type:`${a}/${E.type}`},{...mi(l.name),[a]:i.getState()}),v)};const y=(...w)=>{const T=m;m=!1,n(...w),m=T},b=t(i.setState,r,i);if(h.type==="untracked"?c==null||c.init(b):(h.stores[h.store]=i,c==null||c.init(Object.fromEntries(Object.entries(h.stores).map(([w,T])=>[w,w===h.store?b:T.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let w=!1;const T=i.dispatch;i.dispatch=(...x)=>{(pi?"production":void 0)!=="production"&&x[0].type==="__setState"&&!w&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),w=!0),T(...x)}}return c.subscribe(w=>{var T;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ks(w.payload,x=>{if(x.type==="__setState"){if(a===void 0){y(x.state);return}Object.keys(x.state).length!==1&&console.error(`
|
|
96
96
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
97
97
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
98
98
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
99
|
-
`);const v=x.state[a];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&y(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(x)});case"DISPATCH":switch(w.payload.type){case"RESET":return y(b),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(mi(l.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(mi(l.name));case"ROLLBACK":return Ks(w.state,x=>{if(a===void 0){y(x),c==null||c.init(i.getState());return}y(x[a]),c==null||c.init(mi(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ks(w.state,x=>{if(a===void 0){y(x);return}JSON.stringify(i.getState())!==JSON.stringify(x[a])&&y(x[a])});case"IMPORT_STATE":{const{nextLiftedState:x}=w.payload,v=(P=x.computedStates.slice(-1)[0])==null?void 0:P.state;if(!v)return;y(a===void 0?v:v[a]),c==null||c.send(null,x);return}case"PAUSE_RECORDING":return m=!m}return}}),b},Ks=(t,e)=>{let n;try{n=JSON.parse(t)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&e(n)};function Pb(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var o;const s=l=>l===null?null:JSON.parse(l,void 0),a=(o=n.getItem(i))!=null?o:null;return a instanceof Promise?a.then(s):s(a)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const br=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return br(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return br(r)(n)}}}},kb=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:P=>P,version:0,merge:(P,x)=>({...x,...P}),...e},s=!1;const a=new Set,l=new Set;let f;try{f=o.getStorage()}catch{}if(!f)return t((...P)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...P)},r,i);const c=br(o.serialize),h=()=>{const P=o.partialize({...r()});let x;const v=c({state:P,version:o.version}).then(E=>f.setItem(o.name,E)).catch(E=>{x=E});if(x)throw x;return v},m=i.setState;i.setState=(P,x)=>{m(P,x),h()};const y=t((...P)=>{n(...P),h()},r,i);let b;const w=()=>{var P;if(!f)return;s=!1,a.forEach(v=>v(r()));const x=((P=o.onRehydrateStorage)==null?void 0:P.call(o,r()))||void 0;return br(f.getItem.bind(f))(o.name).then(v=>{if(v)return o.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var E;return b=o.merge(v,(E=r())!=null?E:y),n(b,!0),h()}).then(()=>{x==null||x(b,void 0),s=!0,l.forEach(v=>v(b))}).catch(v=>{x==null||x(void 0,v)})};return i.persist={setOptions:P=>{o={...o,...P},P.getStorage&&(f=P.getStorage())},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>s,onHydrate:P=>(a.add(P),()=>{a.delete(P)}),onFinishHydration:P=>(l.add(P),()=>{l.delete(P)})},w(),b||y},Cb=(t,e)=>(n,r,i)=>{let o={storage:Pb(()=>localStorage),partialize:w=>w,version:0,merge:(w,P)=>({...P,...w}),...e},s=!1;const a=new Set,l=new Set;let f=o.storage;if(!f)return t((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const c=()=>{const w=o.partialize({...r()});return f.setItem(o.name,{state:w,version:o.version})},h=i.setState;i.setState=(w,P)=>{h(w,P),c()};const m=t((...w)=>{n(...w),c()},r,i);i.getInitialState=()=>m;let y;const b=()=>{var w,P;if(!f)return;s=!1,a.forEach(v=>{var E;return v((E=r())!=null?E:m)});const x=((P=o.onRehydrateStorage)==null?void 0:P.call(o,(w=r())!=null?w:m))||void 0;return br(f.getItem.bind(f))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return[!0,o.migrate(v.state,v.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var E;const[N,O]=v;if(y=o.merge(O,(E=r())!=null?E:m),n(y,!0),N)return c()}).then(()=>{x==null||x(y,void 0),y=r(),s=!0,l.forEach(v=>v(y))}).catch(v=>{x==null||x(void 0,v)})};return i.persist={setOptions:w=>{o={...o,...w},w.storage&&(f=w.storage)},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>b(),hasHydrated:()=>s,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},o.skipHydration||b(),y||m},Ob=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((pi?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),kb(t,e)):Cb(t,e);function yi(t){const e=t.content.slice(0,50);return t.support?`${t.date}-${t.authorName}-${e}`:`${t.date}-customer-${e}`}function Md(t,e){const n=new Map;return t.forEach(r=>{const i=yi(r);n.set(i,r)}),e.forEach(r=>{const i=yi(r);n.set(i,r)}),Array.from(n.values()).sort((r,i)=>r.date-i.date)}function Ib(t,e){const n=yi(e);return t.some(r=>yi(r)===n)}const Dd=460,Rb=750,Nb="https://api.deskcord.chat";function Mb(){var n,r,i,o;const t=(r=(n=window.deskcord)==null?void 0:n.settings)==null?void 0:r.app_id,e=((o=(i=window.deskcord)==null?void 0:i.settings)==null?void 0:o.domain)??Nb;if(!t)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return{app_id:t,domain:e}}const le=Mb();function ne(...t){}async function Db(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${le.domain}/conversations/unread-count`,{method:"GET",headers:e});return n.ok?(await n.json()).unreadCount:(ne(`Failed to fetch unread count: ${n.status}`),null)}catch{return null}}async function Bb(t,e){const n=new Headers;n.append("Content-Type","application/json"),n.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${le.domain}/conversations/mark-read`,{method:"POST",headers:n,body:JSON.stringify({timestamp:e})});return r.ok?(await r.json()).success:(ne(`Failed to mark as read: ${r.status}`),!1)}catch{return!1}}const Bd="deskcord_last_read",Fd="deskcord_unread_count",Fb=()=>{try{const t=localStorage.getItem(Bd);if(!t)return null;const e=parseInt(t,10);return isNaN(e)?null:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading last read timestamp"),null}},Ld=t=>{try{localStorage.setItem(Bd,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing last read timestamp")}},gi=()=>{try{const t=localStorage.getItem(Fd);if(!t)return 0;const e=parseInt(t,10);return isNaN(e)?0:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading unread count"),0}},_r=t=>{try{localStorage.setItem(Fd,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing unread count")}},Mt=pb(Tb(Ob((t,e)=>({_REHYDRATED_:!1,token:"",isNetworkInitialized:!1,isChatOpen:!1,isChatVisible:!1,isConversationOpen:!0,conversations:[],email:"",username:"",openConversationId:null,guildSettings:{iconURL:"",header_title:"",header_subtitle:"",lastUpdate:null},fullScreen:!1,isLoading:!1,networkError:null,currentConversationLastFetchedAt:null,pastConversationsLastFetchedAt:null,unreadCount:0,lastReadMessageDate:null,setRehydrated:n=>t(()=>({_REHYDRATED_:n})),setFullScreen:n=>t(()=>({fullScreen:n})),setToken:n=>t(()=>({token:n})),toggleChatOpen:()=>t(n=>({isChatOpen:!n.isChatOpen})),setNetworkInitialized:n=>t(()=>({isNetworkInitialized:n})),setChatVisible:n=>t(()=>({isChatVisible:n})),setChatOpen:n=>t(()=>({isChatOpen:n})),setOpenConversationId:n=>t(()=>({openConversationId:n})),setConversations:n=>t(()=>({conversations:n})),setGuildSettings:n=>t(r=>({guildSettings:{...r.guildSettings,...n}})),setConversationOpen:(n,r)=>t(i=>({conversations:i.conversations.map(o=>o.threadId===n?{...o,status:r?"open":"closed"}:o)})),setConversationCSMember:(n,r)=>t(Rn(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(Rn(i=>{const o=i.conversations.find(s=>s.threadId===n);o?o.messages.push(r):(i.conversations.push({threadId:n,lastMessageDate:Date.now(),firstMessageDate:Date.now(),status:"open",messages:[r]}),i.openConversationId=n)})),updateMessage:(n,r,i)=>t(Rn(o=>{const s=o.conversations.findIndex(a=>a.threadId===n);if(s!==-1){const a=o.conversations[s].messages.findIndex(l=>l.date===r);o.conversations[s].messages[a]=i}})),removeMessage:(n,r)=>t(Rn(i=>{const o=i.conversations.findIndex(s=>s.threadId===n);o!==-1&&(i.conversations[o].messages=i.conversations[o].messages.filter(s=>s.date!==r))})),tempConversationToThread:n=>t(r=>({...r,openConversationId:n,conversations:r.conversations.map(i=>i.threadId==="TEMP"?{...i,threadId:n}:i)})),setEmail:n=>t(()=>({email:n})),setUsername:n=>t(()=>({username:n})),getConversation:()=>{const{conversations:n,openConversationId:r}=e();return r?n.find(i=>i.threadId===r)??null:null},setLoading:n=>t(()=>({isLoading:n})),setNetworkError:n=>t(()=>({networkError:n})),setCurrentConversationLastFetchedAt:n=>t(()=>({currentConversationLastFetchedAt:n})),setPastConversationsLastFetchedAt:n=>t(()=>({pastConversationsLastFetchedAt:n})),smartMergeCurrentConversation:n=>t(Rn(r=>{const i=r.conversations.findIndex(o=>o.threadId===n.threadId);if(i!==-1){const o=r.conversations[i],s=Md(o.messages,n.messages);r.conversations[i]={...n,messages:s}}else r.conversations.push(n);r.currentConversationLastFetchedAt=Date.now()})),smartMergePastConversations:n=>t(Rn(r=>{n.forEach(i=>{const o=r.conversations.findIndex(s=>s.threadId===i.threadId);if(o!==-1){const s=r.conversations[o],a=Md(s.messages,i.messages);r.conversations[o]={...i,messages:a}}else r.conversations.push(i)}),r.pastConversationsLastFetchedAt=Date.now()})),incrementUnreadCount:()=>t(n=>{const r=n.unreadCount+1;return _r(r),{unreadCount:r}}),markMessagesAsRead:()=>t(()=>{const n=Date.now();return _r(0),Ld(n),{unreadCount:0,lastReadMessageDate:n}}),setUnreadCount:n=>t(()=>(_r(n),{unreadCount:n})),syncUnreadCountFromServer:async()=>{const n=Qe.get("discord-widget");if(!n){const r=gi();t(()=>({unreadCount:r}));return}try{const r=await Db(n);if(r!==null)ne(`Synced unread count from server: ${r}`),_r(r),t(()=>({unreadCount:r}));else{ne("Server unavailable, using cached unread count");const i=gi();t(()=>({unreadCount:i}))}}catch{const i=gi();t(()=>({unreadCount:i}))}},markMessagesAsReadWithSync:async()=>{const n=Date.now();_r(0),Ld(n),t(()=>({unreadCount:0,lastReadMessageDate:n}));const r=Qe.get("discord-widget");if(r)try{const i=await Bb(r,n);ne(i?"Successfully synced mark-read with server":"Failed to sync mark-read with server (will retry on next load)")}catch{}},initializeUnreadState:()=>{const n=gi(),r=Fb();t(()=>({unreadCount:n,lastReadMessageDate:r}))}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:Lb(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function Lb(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}async function jb({content:t}){const e=Mt.getState().username,n=Qe.get("discord-widget"),r=JSON.stringify({name:e,content:t}),i=new Headers;i.append("Content-Type","application/json"),i.append("Authorization",`Bearer ${n}`);const o={method:"POST",headers:i,body:r};return await(await fetch(`${le.domain}/conversations/sendMessage`,o)).json()}var Nn=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(Nn||{});const xr="System",$b={content:"This conversation has been closed by the support.",support:!0,authorName:xr,date:Date.now()},Vb={content:"",support:!0,authorName:xr,date:Date.now(),customRenderer:Nn.IntroduceYourself};function Ub(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:xr,date:Date.now(),ephemeral:!0}}function zb(t){return{content:"",support:!0,authorName:xr,date:Date.now(),customRenderer:Nn.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function Wb(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const qb=$e(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const l=it(null),f=it(null),{addMessage:c,getConversation:h,removeMessage:m,updateMessage:y}=Mt(),b=h();Jn(a,()=>({upload:async()=>{if(f.current)try{const N=new FormData;N.append("file",f.current),o==null||o(f.current),P(f.current);const O=await fetch(n.url,{method:n.method,headers:n.headers,body:N}),j=await O.json();i==null||i(O),x(f.current),w(j)}catch(N){s==null||s(N),v(f.current)}},clear:()=>{f.current=null,l.current&&(l.current.value=""),r==null||r(null)}}));function w(N){b&&c(b.threadId,Wb(N.attachments))}function P(N){b&&c(b.threadId,zb({fileName:N.name,status:"uploading",size:N.size}))}function x(N){var j;if(!b)return;const O=(j=h())==null?void 0:j.messages.find(B=>{var F,L;return((L=(F=B.customRendererProps)==null?void 0:F.file)==null?void 0:L.fileName)===N.name});O&&m(b.threadId,O.date)}function v(N){var j,B;if(!b)return;const O=(j=h())==null?void 0:j.messages.find(F=>{var L,Y;return((Y=(L=F.customRendererProps)==null?void 0:L.file)==null?void 0:Y.fileName)===N.name});(B=O==null?void 0:O.customRendererProps)!=null&&B.file&&y(b.threadId,O.date,{...O,customRendererProps:{...O.customRendererProps,file:{...O.customRendererProps.file,status:"error"}}})}return k(kt,{children:[k("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var N;return(N=l.current)==null?void 0:N.click()},children:k(Rw,{size:16})}),k("input",{type:"file",accept:t,ref:l,style:{display:"none"},onChange:N=>{var j;const O=(j=N.target.files)==null?void 0:j[0];O&&O.size<=e?(f.current=O,r==null||r(O)):(f.current=null,r==null||r(null))}})]})}),Hb=({size:t})=>k("svg",{className:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:t||16,height:t||16,fill:"currentColor",viewBox:"0 0 16 16",children:k("path",{d:"M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 3.178 4.995.002.002.26.41a.5.5 0 0 0 .886-.083l6-15Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"})}),Gb=({onPickEmoji:t})=>k("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:k("div",{className:"grid grid-cols-8 gap-2",children:Kb.map((e,n)=>k("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),Kb=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],Yb=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>k("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[k("div",{className:"flex justify-center absolute inset-0",children:k("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),k("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:k(Dw,{size:20})}),k("div",{className:"absolute bottom-0 left-0 right-0 bg-gray-800 bg-opacity-80 text-white text-sm px-2 py-1 truncate",children:e})]}),Xb=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:l,attachmentPreviews:f,disabled:c=!1}=t,{getConversation:h}=Mt(),m=h(),y=Qe.get("discord-widget"),b=it(null),P=(m==null?void 0:m.status)==="closed"||c,x=()=>{},v=F=>{i(o.filter(L=>(F==null?void 0:F.name)!==L.name))},E=F=>{F&&i([...o,F])},N=()=>{var F;(F=b.current)==null||F.upload()},O=()=>{o.length&&N(),r()},j=F=>{F.key==="Enter"&&(F.shiftKey?(F.preventDefault(),n(`${e}
|
|
100
|
-
`)):(F.preventDefault(),O()))};return k("div",{className:"relative border-t border-t-gray-200",children:[s&&k(Gb,{onPickEmoji:a}),(()=>{if(!(o!=null&&o.length))return null;const F=o.map((L,Y)=>{if(!f[L.name])return null;const{url:Z,width:nt,height:st}=f[L.name];return k(Yb,{onDelete:()=>{var _t;i(o.filter(dt=>dt.name!==L.name)),(_t=b.current)==null||_t.clear()},fileName:L.name,width:nt,height:st,imageUrl:Z},`attachment-preview-${Y}`)});return k("div",{className:"m-2",children:F})})(),k("textarea",{id:"hs-textarea-ex-1",disabled:P,value:e,onChange:F=>n(F.target.value),onKeyDown:j,className:"p-4 pb-12 block w-full border-t border-gray-200 text-base md:text-sm outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-900 dark:border-neutral-700 dark:text-neutral-400 dark:placeholder-neutral-500 resize-none",placeholder:c?"Please introduce yourself first...":"Ask us anything!","data-hs-textarea-auto-height":""}),k("div",{className:"absolute bottom-px inset-x-px p-2 rounded-b-md bg-white dark:bg-neutral-900",children:k("div",{className:"flex justify-between items-center",children:[k("div",{className:"flex items-center",children:k("div",{className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800",children:k(qb,{ref:b,accept:"image/*",maxSize:10*1024*1024,uploadConfig:{url:`${le.domain}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${y}`}},onUploadComplete:x,onUploadStart:v,onFileSelect:E})})}),k("div",{className:"flex items-center gap-x-1",children:[k("button",{type:"button",disabled:P,onClick:P?void 0:()=>l(!s),className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 disabled:opacity-50 disabled:pointer-events-none",children:k(Mw,{size:16})}),k("button",{type:"button",disabled:P,onClick:()=>O(),style:{background:P?"#9CA3AF":"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:`inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-white
|
|
101
|
-
transform transition-transform duration-150
|
|
102
|
-
hover:scale-105 active:scale-95 disabled:opacity-50 disabled:pointer-events-none disabled:transform-none`,children:k(Hb,{size:16})})]})]})})]})},jd=t=>{const e=Date.now(),n=Math.floor((e-t)/1e3);return n<60?"Just now":n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`},$d="carousel",Vd="controller",Jb="navigation",Zb="no-scroll",Ys="portal",Qb="root",Ud="toolbar",Xs="loading",Js="error",Zs="complete",t_="placeholder",e_=t=>`active-slide-${t}`,zd="flex_center",n_="no_scroll",Wd="no_scroll_padding",r_="slide_wrapper",rn="prev",on="next",qd="swipe",Mn="close",Hd="onPointerDown",Gd="onPointerMove",Kd="onPointerUp",Yd="onPointerLeave",Xd="onPointerCancel",Jd="onKeyDown",i_="onKeyUp",Zd="onWheel",o_="Escape",s_="ArrowLeft",a_="ArrowRight",c_="button",Qs="icon",Qd="contain",th="cover",l_="Unknown action type",eh="yarl__";function Be(...t){return[...t].filter(Boolean).join(" ")}function St(t){return`${eh}${t}`}function oe(t){return`--${eh}${t}`}function Sr(t,e){return`${t}${e?`_${e}`:""}`}function ta(t){return e=>Sr(t,e)}function u_(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function nh(...t){return()=>{t.forEach(e=>{e()})}}function sn(t,e,n){return()=>{const r=Ft(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function rh(){return typeof window<"u"}function f_(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function ih(t){return t.type===void 0||t.type==="image"}function d_(t,e){return t.imageFit===th||t.imageFit!==Qd&&e===th}function vi(t){return typeof t=="string"?Number.parseInt(t,10):t}function wi(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=vi(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function h_(t,e){const n=wi(e),r=n.percent!==void 0?t.width/100*n.percent:n.pixel;return{width:Math.max(t.width-2*r,0),height:Math.max(t.height-2*r,0)}}function oh(t,e){return e>0?(t%e+e)%e:0}function sh(t){return t.length>0}function ah(t,e){return t[oh(e,t.length)]}function ea(t,e){return sh(t)?ah(t,e):void 0}function p_(t){return ih(t)?t.src:void 0}function m_(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const y_=Number(ul.split(".")[0])>=19;function g_(t){return{inert:y_?t:t?"":void 0}}const na={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Mn]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Qd,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function an(t,e){return{name:t,component:e}}function Gt(t,e){return{module:t,children:e}}function ch(t,e,n){return t.module.name===e?n(t):t.children?[Gt(t.module,t.children.flatMap(r=>{var i;return(i=ch(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function Dn(t,e,n){return t.flatMap(r=>{var i;return(i=ch(r,e,n))!==null&&i!==void 0?i:[]})}function v_(t,e=[],n=[]){let r=t;const i=y=>{const b=[...r];for(;b.length>0;){const w=b.pop();if((w==null?void 0:w.module.name)===y)return!0;w!=null&&w.children&&b.push(...w.children)}return!1},o=(y,b)=>{if(y===""){r=[Gt(b,r)];return}r=Dn(r,y,w=>[Gt(b,[w])])},s=(y,b)=>{r=Dn(r,y,w=>[Gt(w.module,[Gt(b,w.children)])])},a=(y,b,w)=>{r=Dn(r,y,P=>{var x;return[Gt(P.module,[...w?[Gt(b)]:[],...(x=P.children)!==null&&x!==void 0?x:[],...w?[]:[Gt(b)]])]})},l=(y,b,w)=>{r=Dn(r,y,P=>[...w?[Gt(b)]:[],P,...w?[]:[Gt(b)]])},f=y=>{s(Vd,y)},c=(y,b)=>{r=Dn(r,y,w=>[Gt(b,w.children)])},h=y=>{r=Dn(r,y,b=>b.children)},m=y=>{n.push(y)};return e.forEach(y=>{y({contains:i,addParent:o,append:s,addChild:a,addSibling:l,addModule:f,replace:c,remove:h,augment:m})}),{config:r,augmentation:y=>n.reduce((b,w)=>w(b),y)}}const lh=te(null),ra=sn("useDocument","DocumentContext",lh);function w_({nodeRef:t,children:e}){const n=Ht(()=>{const r=o=>{var s;return((s=o||t.current)===null||s===void 0?void 0:s.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:o=>{var s;return((s=r(o))===null||s===void 0?void 0:s.defaultView)||window}}},[t]);return et(lh.Provider,{value:n},e)}const uh=te(null),bi=sn("useEvents","EventsContext",uh);function b_({children:t}){const[e]=gt({});ut(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=Ht(()=>{const r=(s,a)=>{var l;(l=e[s])===null||l===void 0||l.splice(0,e[s].length,...e[s].filter(f=>f!==a))};return{publish:(...[s,a])=>{var l;(l=e[s])===null||l===void 0||l.forEach(f=>f(a))},subscribe:(s,a)=>(e[s]||(e[s]=[]),e[s].push(a),()=>r(s,a)),unsubscribe:r}},[e]);return et(uh.Provider,{value:n},t)}const fh=te(null),Er=sn("useLightboxProps","LightboxPropsContext",fh);function __({children:t,...e}){return et(fh.Provider,{value:e},t)}const dh=te(null),_i=sn("useLightboxState","LightboxStateContext",dh),hh=te(null),x_=sn("useLightboxDispatch","LightboxDispatchContext",hh);function S_(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=oh(i,n.length),s=ea(n,o),a=r||e.duration?{increment:r,duration:e.duration,easing:e.easing}:void 0;return{slides:n,currentIndex:o,globalIndex:i,currentSlide:s,animation:a}}case"update":return e.slides!==t.slides||e.index!==t.currentIndex?{slides:e.slides,currentIndex:e.index,globalIndex:e.index,currentSlide:ea(e.slides,e.index)}:t;default:throw new Error(l_)}}function E_({slides:t,index:e,children:n}){const[r,i]=Xn(S_,{slides:t,currentIndex:e,globalIndex:e,currentSlide:ea(t,e)});ut(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=Ht(()=>({...r,state:r,dispatch:i}),[r,i]);return et(hh.Provider,{value:i},et(dh.Provider,{value:o},n))}const ph=te(null),xi=sn("useTimeouts","TimeoutsContext",ph);function A_({children:t}){const[e]=gt([]);ut(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=Ht(()=>{const r=s=>{e.splice(0,e.length,...e.filter(a=>a!==s))};return{setTimeout:(s,a)=>{const l=window.setTimeout(()=>{r(l),s()},a);return e.push(l),l},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[e]);return et(ph.Provider,{value:n},t)}const mh=$e(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},l){const{styles:f,labels:c}=Er(),h=u_(c,e);return et("button",{ref:l,type:"button",title:h,"aria-label":h,className:Be(St(c_),n),onClick:o,style:{...s,...f.button},...a},i?i():et(r,{className:St(Qs),style:f.icon}))});function T_(t,e){const n=r=>et("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},e);return n.displayName=t,n}function Ar(t,e){return T_(t,et("g",{fill:"currentColor"},et("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const P_=Ar("Close",et("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),k_=Ar("Previous",et("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),C_=Ar("Next",et("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),O_=Ar("Loading",et(kt,null,Array.from({length:8}).map((t,e,n)=>et("line",{key:e,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(e+1),transform:`rotate(${360/n.length*e}, 12, 12)`})))),I_=Ar("Error",et("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Tr=rh()?Re:ut;function yh(){const[t,e]=gt(!1);return ut(()=>{var n,r;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");e(i==null?void 0:i.matches);const o=s=>e(s.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",o),()=>{var s;return(s=i==null?void 0:i.removeEventListener)===null||s===void 0?void 0:s.call(i,"change",o)}},[]),t}function R_(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(vi);s.length===6?(e=s[4],n=s[5]):s.length===16&&(e=s[12],n=s[13],r=s[14])}return{x:e,y:n,z:r}}function gh(t,e){const n=it(),r=it(),i=yh();return Tr(()=>{var o,s,a;if(t.current&&n.current!==void 0&&!i){const{keyframes:l,duration:f,easing:c,onfinish:h}=e(n.current,t.current.getBoundingClientRect(),R_(t.current))||{};if(l&&f){(o=r.current)===null||o===void 0||o.cancel(),r.current=void 0;try{r.current=(a=(s=t.current).animate)===null||a===void 0?void 0:a.call(s,l,{duration:f,easing:c})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,h==null||h()})}}n.current=void 0}),{prepareAnimation:o=>{n.current=o},isAnimationPlaying:()=>{var o;return((o=r.current)===null||o===void 0?void 0:o.playState)==="running"}}}function vh(){const t=it(null),e=it(),[n,r]=gt();return{setContainerRef:Ct(o=>{t.current=o,e.current&&(e.current.disconnect(),e.current=void 0);const s=()=>{if(o){const a=window.getComputedStyle(o),l=f=>parseFloat(f)||0;r({width:Math.round(o.clientWidth-l(a.paddingLeft)-l(a.paddingRight)),height:Math.round(o.clientHeight-l(a.paddingTop)-l(a.paddingBottom))})}else r(void 0)};s(),o&&typeof ResizeObserver<"u"&&(e.current=new ResizeObserver(s),e.current.observe(o))},[]),containerRef:t,containerRect:n}}function Si(){const t=it(),{setTimeout:e,clearTimeout:n}=xi();return Ct((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function Ut(t){const e=it(t);return Tr(()=>{e.current=t}),Ct((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function wh(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function ia(t,e){return Ht(()=>t==null&&e==null?null:n=>{wh(t,n),wh(e,n)},[t,e])}function N_(t,e=!1){const n=it();Tr(()=>{e&&n.current&&(n.current=!1,t())},[e,t]);const r=Ct(()=>{n.current=!0},[]),i=Ct(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function oa(){const[t,e]=gt(!1);return Tr(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function M_(){const[t]=gt({}),e=Ct((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=Ht(()=>({onPointerDown:i=>e(Hd,i),onPointerMove:i=>e(Gd,i),onPointerUp:i=>e(Kd,i),onPointerLeave:i=>e(Yd,i),onPointerCancel:i=>e(Xd,i),onKeyDown:i=>e(Jd,i),onKeyUp:i=>e(i_,i),onWheel:i=>e(Zd,i)}),[e]),r=Ct((i,o)=>(t[i]||(t[i]=[]),t[i].unshift(o),()=>{const s=t[i];s&&s.splice(0,s.length,...s.filter(a=>a!==o))}),[t]);return{registerSensors:n,subscribeSensors:r}}function bh(t,e){const n=it(0),r=Si(),i=Ut((...o)=>{n.current=Date.now(),t(o)});return Ct((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const sa=ta("slide"),aa=ta("slide_image");function D_({slide:t,offset:e,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:a,onError:l,style:f}){var c,h,m,y,b,w,P;const[x,v]=gt(Xs),{publish:E}=bi(),{setTimeout:N}=xi(),O=it(null);ut(()=>{e===0&&E(e_(x))},[e,x,E]);const j=Ut(G=>{("decode"in G?G.decode():Promise.resolve()).catch(()=>{}).then(()=>{G.parentNode&&(v(Zs),N(()=>{a==null||a(G)},0))})}),B=Ct(G=>{O.current=G,G!=null&&G.complete&&j(G)},[j]),F=Ct(G=>{j(G.currentTarget)},[j]),L=Ut(()=>{v(Js),l==null||l()}),Y=d_(t,i),Z=(G,S)=>Number.isFinite(G)?G:S,nt=Z(Math.max(...((h=(c=t.srcSet)===null||c===void 0?void 0:c.map(G=>G.width))!==null&&h!==void 0?h:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((m=O.current)===null||m===void 0?void 0:m.naturalWidth)||0),st=Z(Math.max(...((b=(y=t.srcSet)===null||y===void 0?void 0:y.map(G=>G.height))!==null&&b!==void 0?b:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((w=O.current)===null||w===void 0?void 0:w.naturalHeight)||0),_t=nt&&st?{maxWidth:`min(${nt}px, 100%)`,maxHeight:`min(${st}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},dt=(P=t.srcSet)===null||P===void 0?void 0:P.sort((G,S)=>G.width-S.width).map(G=>`${G.src} ${G.width}w`).join(", "),It=()=>r&&!Y&&t.width&&t.height?r.height/t.height*t.width:Number.MAX_VALUE,at=dt&&r&&rh()?`${Math.round(Math.min(It(),r.width))}px`:void 0,{style:pt,className:z,...H}=o||{};return et(kt,null,et("img",{ref:B,onLoad:F,onError:L,onClick:s,draggable:!1,className:Be(St(aa()),Y&&St(aa("cover")),x!==Zs&&St(aa("loading")),z),style:{..._t,...f,...pt},...H,alt:t.alt,sizes:at,srcSet:dt,src:t.src}),x!==Zs&&et("div",{className:St(sa(t_))},x===Xs&&(n!=null&&n.iconLoading?n.iconLoading():et(O_,{className:Be(St(Qs),St(sa(Xs)))})),x===Js&&(n!=null&&n.iconError?n.iconError():et(I_,{className:Be(St(Qs),St(sa(Js)))}))))}const B_=$e(function({className:e,children:n,...r},i){const o=it(null);return et(w_,{nodeRef:o},et("div",{ref:ia(i,o),className:Be(St("root"),e),...r},n))});var Qt;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(Qt||(Qt={}));function F_(t,e,n,r,i){ut(()=>nh(t(Hd,e),t(Gd,n),t(Kd,r),t(Yd,r),t(Xd,r)),[t,e,n,r,i])}var ve;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(ve||(ve={}));const ca=30;function L_(t,e,n,r,i,o,s,a,l,f,c,h,m,y){const b=it(0),w=it([]),P=it(),x=it(0),v=it(ve.NONE),E=Ct(L=>{P.current===L.pointerId&&(P.current=void 0,v.current=ve.NONE);const Y=w.current;Y.splice(0,Y.length,...Y.filter(Z=>Z.pointerId!==L.pointerId))},[]),N=Ct(L=>{E(L),L.persist(),w.current.push(L)},[E]),O=Ut(L=>{N(L)}),j=(L,Y)=>f&&L>Y||l&&L<-Y,B=Ut(L=>{if(w.current.find(Y=>Y.pointerId===L.pointerId)&&P.current===L.pointerId){const Y=Date.now()-x.current,Z=b.current;v.current===ve.SWIPE?Math.abs(Z)>.3*n||Math.abs(Z)>5&&Y<r?s(Z,Y):a(Z):v.current===ve.PULL&&(j(Z,2*ca)?m(Z,Y):y(Z)),b.current=0,v.current=ve.NONE}E(L)}),F=Ut(L=>{const Y=w.current.find(Z=>Z.pointerId===L.pointerId);if(Y){const Z=P.current===L.pointerId;if(L.buttons===0){Z&&b.current!==0?B(L):E(Y);return}const nt=L.clientX-Y.clientX,st=L.clientY-Y.clientY;if(P.current===void 0){const _t=dt=>{N(L),P.current=L.pointerId,x.current=Date.now(),v.current=dt};Math.abs(nt)>Math.abs(st)&&Math.abs(nt)>ca&&e(nt)?(_t(ve.SWIPE),i()):Math.abs(st)>Math.abs(nt)&&j(st,ca)&&(_t(ve.PULL),c())}else Z&&(v.current===ve.SWIPE?(b.current=nt,o(nt)):v.current===ve.PULL&&(b.current=st,h(st)))}});F_(t,O,F,B)}function j_({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=it(null),r=Ut(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&t||!o&&e||i.ctrlKey)&&i.preventDefault()});return Ct(i=>{var o;i?i.addEventListener("wheel",r,{passive:!1}):(o=n.current)===null||o===void 0||o.removeEventListener("wheel",r),n.current=i},[r])}function $_(t,e,n,r,i,o,s,a,l){const f=it(0),c=it(0),h=it(),m=it(),y=it(0),b=it(),w=it(0),{setTimeout:P,clearTimeout:x}=xi(),v=Ct(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),E=Ct(()=>{m.current&&(x(m.current),m.current=void 0)},[x]),N=Ut(()=>{t!==Qt.SWIPE&&(f.current=0,w.current=0,v(),E())});ut(N,[t,N]);const O=Ut(B=>{m.current=void 0,f.current===B&&l(f.current)}),j=Ut(B=>{if(B.ctrlKey||Math.abs(B.deltaY)>Math.abs(B.deltaX))return;const F=L=>{y.current=L,x(b.current),b.current=L>0?P(()=>{y.current=0,b.current=void 0},300):void 0};if(t===Qt.NONE){if(Math.abs(B.deltaX)<=1.2*Math.abs(y.current)){F(B.deltaX);return}if(!n(-B.deltaX))return;if(c.current+=B.deltaX,v(),Math.abs(c.current)>30)c.current=0,F(0),w.current=Date.now(),o();else{const L=c.current;h.current=P(()=>{h.current=void 0,L===c.current&&(c.current=0)},i)}}else if(t===Qt.SWIPE){let L=f.current-B.deltaX;if(L=Math.min(Math.abs(L),r)*Math.sign(L),f.current=L,s(L),E(),Math.abs(L)>.2*r){F(B.deltaX),a(L,Date.now()-w.current);return}m.current=P(()=>O(L),2*i)}else F(B.deltaX)});ut(()=>e(Zd,j),[e,j])}const _h=ta("container"),xh=te(null),Pr=sn("useController","ControllerContext",xh);function V_({children:t,...e}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:a,render:l}=e,{closeOnPullUp:f,closeOnPullDown:c,preventDefaultWheelX:h,preventDefaultWheelY:m}=o,[y,b]=gt(),w=_i(),P=x_(),[x,v]=gt(Qt.NONE),E=it(0),N=it(0),O=it(1),{registerSensors:j,subscribeSensors:B}=M_(),{subscribe:F,publish:L}=bi(),Y=Si(),Z=Si(),nt=Si(),{containerRef:st,setContainerRef:_t,containerRect:dt}=vh(),It=ia(j_({preventDefaultWheelX:h,preventDefaultWheelY:m}),_t),at=it(null),pt=ia(at,void 0),{getOwnerDocument:z}=ra(),H=oa(),G=J=>(H?-1:1)*(typeof J=="number"?J:1),S=Ut(()=>{var J;return(J=st.current)===null||J===void 0?void 0:J.focus()}),M=Ut(()=>e),_=Ut(()=>w),A=Ct(J=>L(rn,J),[L]),I=Ct(J=>L(on,J),[L]),W=Ct(()=>L(Mn),[L]),$=J=>!(r.finite&&(G(J)>0&&w.currentIndex===0||G(J)<0&&w.currentIndex===w.slides.length-1)),q=J=>{var vt;E.current=J,(vt=st.current)===null||vt===void 0||vt.style.setProperty(oe("swipe_offset"),`${Math.round(J)}px`)},K=J=>{var vt,Et;N.current=J,O.current=(()=>{const X=c&&J>0?J:f&&J<0?-J:0;return Math.min(Math.max(f_(1-X/60*(1-.5),2),.5),1)})(),(vt=st.current)===null||vt===void 0||vt.style.setProperty(oe("pull_offset"),`${Math.round(J)}px`),(Et=st.current)===null||Et===void 0||Et.style.setProperty(oe("pull_opacity"),`${O.current}`)},{prepareAnimation:rt}=gh(at,(J,vt,Et)=>{if(at.current&&dt)return{keyframes:[{transform:`translate(0, ${J.rect.y-vt.y+Et.y}px)`,opacity:J.opacity},{transform:"translate(0, 0)",opacity:1}],duration:J.duration,easing:i.easing.fade}}),ht=(J,vt)=>{if(f||c){K(J);let Et=0;at.current&&(Et=i.fade*(vt?2:1),rt({rect:at.current.getBoundingClientRect(),opacity:O.current,duration:Et})),nt(()=>{K(0),v(Qt.NONE)},Et),v(Qt.ANIMATION),vt||W()}},{prepareAnimation:wt,isAnimationPlaying:Pt}=gh(at,(J,vt,Et)=>{var C;if(at.current&&dt&&(!((C=w.animation)===null||C===void 0)&&C.duration)){const R=wi(r.spacing),X=(R.percent?R.percent*dt.width/100:R.pixel)||0;return{keyframes:[{transform:`translate(${G(w.globalIndex-J.index)*(dt.width+X)+J.rect.x-vt.x+Et.x}px, 0)`},{transform:"translate(0, 0)"}],duration:w.animation.duration,easing:w.animation.easing}}}),$t=Ut(J=>{var vt,Et;const C=J.offset||0,R=C?i.swipe:(vt=i.navigation)!==null&&vt!==void 0?vt:i.swipe,X=!C&&!Pt()?i.easing.navigation:i.easing.swipe;let{direction:tt}=J;const Q=(Et=J.count)!==null&&Et!==void 0?Et:1;let ct=Qt.ANIMATION,p=R*Q;if(!tt){const d=dt==null?void 0:dt.width,g=J.duration||0,T=d?R/d*Math.abs(C):R;Q!==0?(g<T?p=p/T*Math.max(g,T/5):d&&(p=R/d*(d-Math.abs(C))),tt=G(C)>0?rn:on):p=R/2}let u=0;tt===rn?$(G(1))?u=-Q:(ct=Qt.NONE,p=R):tt===on&&($(G(-1))?u=Q:(ct=Qt.NONE,p=R)),p=Math.round(p),Z(()=>{q(0),v(Qt.NONE)},p),at.current&&wt({rect:at.current.getBoundingClientRect(),index:w.globalIndex}),v(ct),L(qd,{type:"swipe",increment:u,duration:p,easing:X})});ut(()=>{var J,vt;!((J=w.animation)===null||J===void 0)&&J.increment&&(!((vt=w.animation)===null||vt===void 0)&&vt.duration)&&Y(()=>P({type:"swipe",increment:0}),w.animation.duration)},[w.animation,P,Y]);const Yt=[B,$,(dt==null?void 0:dt.width)||0,i.swipe,()=>v(Qt.SWIPE),J=>q(J),(J,vt)=>$t({offset:J,duration:vt,count:1}),J=>$t({offset:J,count:0})],Jt=[()=>{c&&v(Qt.PULL)},J=>K(J),J=>ht(J),J=>ht(J,!0)];L_(...Yt,f,c,...Jt),$_(x,...Yt);const qt=Ut(()=>{o.focus&&z().querySelector(`.${St(Ys)} .${St(_h())}`)&&S()});ut(qt,[qt]);const U=Ut(()=>{var J;(J=s.view)===null||J===void 0||J.call(s,{index:w.currentIndex})});ut(U,[w.globalIndex,U]),ut(()=>nh(F(rn,J=>$t({direction:rn,...J})),F(on,J=>$t({direction:on,...J})),F(qd,J=>P(J))),[F,$t,P]);const me=Ht(()=>({prev:A,next:I,close:W,focus:S,slideRect:dt?h_(dt,r.padding):{width:0,height:0},containerRect:dt||{width:0,height:0},subscribeSensors:B,containerRef:st,setCarouselRef:pt,toolbarWidth:y,setToolbarWidth:b}),[A,I,W,S,B,dt,st,pt,y,b,r.padding]);return Jn(o.ref,()=>({prev:A,next:I,close:W,focus:S,getLightboxProps:M,getLightboxState:_}),[A,I,W,S,M,_]),et("div",{ref:It,className:Be(St(_h()),St(zd)),style:{...x===Qt.SWIPE?{[oe("swipe_offset")]:`${Math.round(E.current)}px`}:null,...x===Qt.PULL?{[oe("pull_offset")]:`${Math.round(N.current)}px`,[oe("pull_opacity")]:`${O.current}`}:null,...o.touchAction!=="none"?{[oe("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...j},dt&&et(xh.Provider,{value:me},t,(n=l.controls)===null||n===void 0?void 0:n.call(l)))}const U_=an(Vd,V_);function cn(t){return Sr($d,t)}function Sh(t){return Sr("slide",t)}function z_({slide:t,offset:e}){const n=it(null),{currentIndex:r}=_i(),{slideRect:i,close:o,focus:s}=Pr(),{render:a,carousel:{imageFit:l,imageProps:f},on:{click:c},controller:{closeOnBackdropClick:h},styles:{slide:m}}=Er(),{getOwnerDocument:y}=ra(),b=e!==0;ut(()=>{var x;b&&(!((x=n.current)===null||x===void 0)&&x.contains(y().activeElement))&&s()},[b,s,y]);const w=()=>{var x,v,E,N;let O=(x=a.slide)===null||x===void 0?void 0:x.call(a,{slide:t,offset:e,rect:i});return!O&&ih(t)&&(O=et(D_,{slide:t,offset:e,render:a,rect:i,imageFit:l,imageProps:f,onClick:b?void 0:()=>c==null?void 0:c({index:r})})),O?et(kt,null,(v=a.slideHeader)===null||v===void 0?void 0:v.call(a,{slide:t}),((E=a.slideContainer)!==null&&E!==void 0?E:({children:j})=>j)({slide:t,children:O}),(N=a.slideFooter)===null||N===void 0?void 0:N.call(a,{slide:t})):null},P=x=>{const v=n.current,E=x.target instanceof HTMLElement?x.target:void 0;h&&E&&v&&(E===v||Array.from(v.children).find(N=>N===E)&&E.classList.contains(St(r_)))&&o()};return et("div",{ref:n,className:Be(St(Sh()),!b&&St(Sh("current")),St(zd)),...g_(b),onClick:P,style:m},w())}function W_(){const t=Er().styles.slide;return et("div",{className:St("slide"),style:t})}function q_({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=_i(),{setCarouselRef:i}=Pr(),o=wi(t.spacing),s=wi(t.padding),a=m_(t,e,1),l=[];if(sh(e))for(let f=n-a;f<=n+a;f+=1){const c=ah(e,f),h=r-n+f,m=t.finite&&(f<0||f>e.length-1);l.push(m?{key:h}:{key:[`${h}`,p_(c)].filter(Boolean).join("|"),offset:f-n,slide:c})}return et("div",{ref:i,className:Be(St(cn()),l.length>0&&St(cn("with_slides"))),style:{[`${oe(cn("slides_count"))}`]:l.length,[`${oe(cn("spacing_px"))}`]:o.pixel||0,[`${oe(cn("spacing_percent"))}`]:o.percent||0,[`${oe(cn("padding_px"))}`]:s.pixel||0,[`${oe(cn("padding_percent"))}`]:s.percent||0}},l.map(({key:f,slide:c,offset:h})=>c?et(z_,{key:f,slide:c,offset:h}):et(W_,{key:f})))}const H_=an($d,q_);function Eh(){const{carousel:t}=Er(),{slides:e,currentIndex:n}=_i(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function G_(t){var e;const n=oa(),{publish:r}=bi(),{animation:i}=Er(),{prevDisabled:o,nextDisabled:s}=Eh(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,l=bh(()=>r(rn),a),f=bh(()=>r(on),a),c=Ut(h=>{switch(h.key){case o_:r(Mn);break;case s_:(n?s:o)||(n?f:l)();break;case a_:(n?o:s)||(n?l:f)();break}});ut(()=>t(Jd,c),[t,c])}function Ah({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return et(mh,{label:t,icon:e,renderIcon:n,className:St(`navigation_${r}`),disabled:o,onClick:i,style:s,...N_(Pr().focus,o)})}function K_({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=Pr(),{prevDisabled:l,nextDisabled:f}=Eh();return G_(a),et(kt,null,t?t():et(Ah,{label:"Previous",action:rn,icon:k_,renderIcon:n,style:i.navigationPrev,disabled:l,onClick:o}),e?e():et(Ah,{label:"Next",action:on,icon:C_,renderIcon:r,style:i.navigationNext,disabled:f,onClick:s}))}const Y_=an(Jb,K_),Th=St(n_),X_=St(Wd);function J_(t){return"style"in t}function Ph(t,e,n){const r=window.getComputedStyle(t),i=n?"padding-left":"padding-right",o=n?r.paddingLeft:r.paddingRight,s=t.style.getPropertyValue(i);return t.style.setProperty(i,`${(vi(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function Z_({noScroll:{disabled:t},children:e}){const n=oa(),{getOwnerDocument:r,getOwnerWindow:i}=ra();return ut(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:l}=r(),f=Math.round(s.innerWidth-l.clientWidth);if(f>0){o.push(Ph(a,f,n));const c=a.getElementsByTagName("*");for(let h=0;h<c.length;h+=1){const m=c[h];J_(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(X_)&&o.push(Ph(m,f,n))}}return a.classList.add(Th),()=>{a.classList.remove(Th),o.forEach(c=>c())}},[n,t,r,i]),et(kt,null,e)}const Q_=an(Zb,Z_);function kh(t){return Sr(Ys,t)}function Ch(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function t1({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,l]=gt(!1),[f,c]=gt(!1),h=it([]),m=it(null),{setTimeout:y}=xi(),{subscribe:b}=bi(),P=yh()?0:e.fade;ut(()=>(l(!0),()=>{l(!1),c(!1)}),[]);const x=Ut(()=>{h.current.forEach(O=>O()),h.current=[]}),v=Ut(()=>{var O;c(!1),x(),(O=i.exiting)===null||O===void 0||O.call(i),y(()=>{var j;(j=i.exited)===null||j===void 0||j.call(i),s()},P)});ut(()=>b(Mn,v),[b,v]);const E=Ut(O=>{var j,B,F;O.scrollTop,c(!0),(j=i.entering)===null||j===void 0||j.call(i);const L=(F=(B=O.parentNode)===null||B===void 0?void 0:B.children)!==null&&F!==void 0?F:[];for(let Y=0;Y<L.length;Y+=1){const Z=L[Y];["TEMPLATE","SCRIPT","STYLE"].indexOf(Z.tagName)===-1&&Z!==O&&(h.current.push(Ch(Z,"inert","")),h.current.push(Ch(Z,"aria-hidden","true")))}h.current.push(()=>{var Y,Z;(Z=(Y=m.current)===null||Y===void 0?void 0:Y.focus)===null||Z===void 0||Z.call(Y)}),y(()=>{var Y;(Y=i.entered)===null||Y===void 0||Y.call(i)},P)}),N=Ct(O=>{O?E(O):x()},[E,x]);return a?yo(et(B_,{ref:N,className:Be(r,St(kh()),St(Wd),f&&St(kh("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==na.animation.fade?{[oe("fade_animation_duration")]:`${P}ms`}:null,...e.easing.fade!==na.animation.easing.fade?{[oe("fade_animation_timing_function")]:e.easing.fade}:null,...n.root},onFocus:O=>{m.current||(m.current=O.relatedTarget)}},t),o.root||document.body):null}const e1=an(Ys,t1);function n1({children:t}){return et(kt,null,t)}const r1=an(Qb,n1);function i1(t){return Sr(Ud,t)}function o1({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=Pr(),{setContainerRef:s,containerRect:a}=vh();Tr(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const l=()=>e?e():et(mh,{key:Mn,label:"Close",icon:P_,renderIcon:n,onClick:i});return et("div",{ref:s,style:r.toolbar,className:St(i1())},t==null?void 0:t.map(f=>f===Mn?l():f))}const s1=an(Ud,o1);function Oh(t,e){var n;return et(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>Oh(r,e)))}function a1(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function c1({carousel:t,animation:e,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:a,slides:l,index:f,...c}){const{animation:h,carousel:m,render:y,toolbar:b,controller:w,noScroll:P,on:x,slides:v,index:E,plugins:N,...O}=na,{config:j,augmentation:B}=v_([Gt(e1,[Gt(Q_,[Gt(U_,[Gt(H_),Gt(s1),Gt(Y_)])])])],a||N),F=B({animation:a1(h,e),carousel:{...m,...t},render:{...y,...n},toolbar:{...b,...r},controller:{...w,...i},noScroll:{...P,...o},on:{...x,...s},...O,...c});return F.open?et(__,{...F},et(E_,{slides:l||v,index:vi(f||E)},et(A_,null,et(b_,null,Oh(Gt(r1,j),F))))):null}function Ih(t){var e;return t.contentType?t.contentType==="image/gif":((e=t.name)==null?void 0:e.toLowerCase().endsWith(".gif"))??!1}const Rh=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=Mt(),[r,i]=gt(!1),o=Ft(Am);function s(){if(o){const c=o.getElementById("deskcord-lightbox-portal");if(c)return c}const f=document.getElementById("deskcord-lightbox-portal");return f||document.body}const a=(e==null?void 0:e.filter(f=>!Ih(f)))??[];function l(){return a.length?k(c1,{open:r,portal:{root:s()},close:()=>{i(!1),n(!1)},slides:a.map(f=>({src:f.proxyURL}))}):null}return e!=null&&e.length?k("div",{children:[e.map((f,c)=>{const{proxyURL:h,width:m,height:y}=f;return Ih(f)?k("div",{children:k("img",{src:h,alt:"GIF",className:`rounded-lg w-[${m}px] h-[${y}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${c}`):k("div",{onClick:()=>{n(!0),i(!0)},className:"cursor-pointer",children:k("img",{src:h,alt:"Preview",className:`rounded-lg w-[${m}px] h-[${y}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${c}`)}),l()]},`conv-cus-attachment-${t}`):null},Nh=({imageUrls:t,messageIndexKey:e})=>t.length?k("div",{className:"flex flex-col gap-1 mt-1",children:t.map((n,r)=>k("div",{className:"inline-block",children:k("img",{src:n,alt:"Inline image",className:"rounded-lg max-w-[200px] max-h-[200px] object-contain",loading:"lazy"})},`inline-img-${e}-${r}`))}):null,l1=["tenor.com","giphy.com","imgur.com","gfycat.com","media.discordapp.net","cdn.discordapp.com","i.redd.it","i.imgur.com"],u1=[".gif",".jpg",".jpeg",".png",".webp",".apng"];function f1(t){try{const e=new URL(t),n=e.pathname.toLowerCase(),r=e.hostname.toLowerCase();for(const i of u1)if(n.endsWith(i))return!0;for(const i of l1)if(r===i||r.endsWith(`.${i}`))return!0;return!1}catch{return!1}}const d1=/https?:\/\/[^\s<>]+/gi;function Mh(t){if(!t)return{text:"",imageUrls:[]};const e=[];let n=t;const r=t.match(d1);if(r)for(const i of r)f1(i)&&(e.push(i),n=n.replace(i,""));return n=n.replace(/\s+/g," ").trim(),{text:n,imageUrls:e}}const h1=({renderTimestamp:t,message:e,indexKey:n})=>{function r(s,a){const l=/<\w?:\w+:\d+>/g,f=s.split(l),c=s.match(l)??[],h=[];for(let m=0;m<f.length;m++)if(h.push(f[m]),c[m]){const y=a[c[m]];y&&h.push(k("img",{src:y.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},m))}return h}const{text:i,imageUrls:o}=Mh(e.content??"");return k("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[i&&k("div",{style:{background:"linear-gradient(167deg, #27292A 0%, #404547 100%)"},className:"text-white text-sm min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:r(i,e.emojis??{})}),k(Nh,{imageUrls:o,messageIndexKey:n}),k("div",{className:"flex flex-1",children:k(Rh,{attachments:e.attachments,messageIndexKey:n})}),t&&k("div",{children:k("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",jd(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},p1=({message:t,indexKey:e})=>{const{text:n,imageUrls:r}=Mh(t.content??"");return k("li",{className:`flex flex-col items-end ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[n&&k("div",{className:"grow text-end",children:k("div",{style:{background:"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:"min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:k("p",{className:"text-center text-sm text-white",children:n})})}),k(Nh,{imageUrls:r,messageIndexKey:e}),t.attachments&&k("div",{className:"flex flex-1 justify-end",children:k(Rh,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`)},m1=({message:t,indexKey:e})=>k("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:k("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:k("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),y1=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=Mt(),[o,s]=gt(r),[a,l]=gt(n),[f,c]=gt(""),[h,m]=gt(!1),y=x=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(x),b=!!n&&!!r,w=x=>{if(x.preventDefault(),!!a.trim()){if(!y(o)){c("Please enter a valid email address");return}h||(m(!0),c(""),t(o),e(a))}};function P(){return k("form",{onSubmit:w,className:"w-full space-y-4",children:[k("div",{className:"mb-4",children:[k("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Let's get started"}),k("p",{className:"text-sm text-gray-600",children:"Tell us a bit about yourself so we can assist you better."})]}),k("div",{children:[k("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your name"}),k("div",{className:"relative",children:[k("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:k(Bw,{size:18,className:"text-gray-400"})}),k("input",{type:"text",id:"name",value:a,onChange:x=>l(x.target.value),name:"name",className:"py-2.5 px-4 ps-11 block w-full bg-white border border-gray-300 rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[#7289DA] focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed",placeholder:"John Smith",disabled:b,required:!0})]})]}),k("div",{children:[k("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email address"}),k("div",{className:"relative",children:[k("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:k(Ow,{size:18,className:"text-gray-400"})}),k("input",{type:"email",id:"email",value:o,onChange:x=>{s(x.target.value),f&&c("")},name:"email",className:`py-2.5 px-4 ps-11 block w-full bg-white rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed border ${f?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-[#7289DA]"}`,placeholder:"you@example.com",disabled:b,required:!0})]}),f&&k("p",{className:"text-red-600 text-sm mt-2 flex items-center gap-1",children:[k("span",{className:"inline-block w-1 h-1 bg-red-600 rounded-full"}),f]})]}),k("p",{className:"text-xs text-gray-500 text-center",children:"We'll never share your information"}),!n||!r?k("button",{type:"submit",className:"w-full py-2.5 px-4 bg-[#7289DA] hover:bg-[#5B6EAB] text-white font-medium text-sm rounded-lg transition-all duration-200 transform hover:shadow-md active:scale-95 focus:outline-none focus:ring-2 focus:ring-[#7289DA] focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",disabled:h,children:"Start Chatting"}):null]})}return k(kt,{children:[k("li",{className:`max-w-lg flex gap-x-2 sm:gap-x-4 me-11 ${i?"opacity-75":""}`,children:k("div",{className:"w-full rounded-xl p-5 bg-white shadow-lg border border-gray-100 overflow-hidden",children:P()})}),n&&r&&k("li",{className:"flex ms-auto my-4 animate-slide-in",style:{marginTop:"1rem"},children:k("div",{className:"grow",children:k("div",{style:{background:"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:"min-w-10 inline-block rounded-lg px-4 py-2 shadow-sm flex items-center gap-2",children:[k(kw,{size:16,className:"text-white flex-shrink-0"}),k("p",{className:"text-sm text-white font-medium",children:["Nice to meet you, ",k("span",{className:"font-semibold",children:n}),"! Feel free to ask us anything."]})]})})})]})};function g1(t,e){const n=it();ut(()=>{n.current=t},[t]),ut(()=>{function r(){var i;(i=n==null?void 0:n.current)==null||i.call(n)}if(e!==null){const i=setInterval(r,e);return()=>clearInterval(i)}},[e])}function v1(t,e=!1,n=1){const r=e?1e3:1024;if(Math.abs(t)<r)return t+" B";const i=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let o=-1;const s=10**n;do t/=r,++o;while(Math.round(Math.abs(t)*s)/s>=r&&o<i.length-1);return t.toFixed(n)+" "+i[o]}const w1=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=gt(!0),[s,a]=gt(0);return g1(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),k("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:k("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:k("div",{children:[k("div",{className:"mb-2 flex justify-between items-center",children:[k("div",{className:"flex items-center gap-x-3",children:[k("span",{className:`size-8 flex ${r?"text-red-500":"text-blue-600"} justify-center items-center border border-gray-200 rounded-lg dark:border-neutral-700 dark:text-neutral-500`,children:k(Cw,{})}),k("div",{children:[k("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),k("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:v1(n.size)})]})]}),r&&k("div",{className:"inline-flex items-center gap-x-2",children:k("span",{className:"relative",children:[k("svg",{className:"shrink-0 size-4 text-red-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:k("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})}),k("span",{className:"sr-only",children:"Danger"})]})})]}),k("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[k("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:k("div",{className:`flex flex-col justify-center rounded-full overflow-hidden ${r?"bg-red-500":"bg-blue-600"} text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500`,style:{width:`${s}%`}})}),k("div",{className:"w-6 text-end",children:k("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},b1=({conversation:t,open:e})=>{const n=it(!1),{isChatOpen:r}=Mt();ut(()=>{r?n.current=!0:n.current=!1},[r]);function i(l,f){const c=`${l.date}-${f}`;let h;if(typeof l.customRenderer<"u")switch(l.customRenderer){case Nn.IntroduceYourself:h=k(y1,{});break;case Nn.UploadFile:h=k(w1,{message:l,indexKey:c});break;default:h=a(l,c)}else l.authorName===xr?h=a(l,c):l.support?h=o(l,c):h=s(l,c);return r&&(l.pending??(l.support&&n.current))?k(De.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:h},c):k("li",{children:h},c)}function o(l,f){var y;const c=(y=t==null?void 0:t.messages)==null?void 0:y.filter(b=>b.support),h=c==null?void 0:c[c.length-1],m=l.date===(h==null?void 0:h.date);return k(h1,{renderTimestamp:m,message:l,indexKey:f})}function s(l,f){return k(p1,{message:l,indexKey:f})}function a(l,f){return k(m1,{message:l,indexKey:f})}return k("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((l,f)=>l.date-f.date).map(i),t&&!e&&i($b,1)]})},_1=()=>{const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,email:i,updateMessage:o,isChatOpen:s}=Mt(),a=!!(r&&i),l=it(!1);ut(()=>{s&&!l.current&&(l.current=!0),s||(l.current=!1)},[s]);const[f,c]=gt(!1),[h,m]=gt([]),[y,b]=gt({}),w=t(),P=(w==null?void 0:w.status)==="open",[x,v]=gt("");ut(()=>{const j={};h.forEach(B=>{const F=new FileReader;F.addEventListener("load",function(){const L=new Image;L.onload=()=>{j[B.name]={url:F.result,width:L.width,height:L.height,size:B.size},b(j)},L.src=F.result},!1),F.readAsDataURL(B)})},[h]);const E=j=>{v(B=>B+j)},N=async()=>{const j=Date.now(),B={support:!1,content:x,date:j,authorName:r,pending:!0};if(x.trim()!==""){v(""),e(w?w.threadId:"TEMP",B);const F=await jb({content:x});F&&((!w||w.threadId==="TEMP")&&n(F.threadId),o(F.threadId,j,{...B,pending:!1,date:F.date}))}},O=s&&!l.current;return k(kt,{children:[k("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col-reverse space-y-4 space-y-reverse",children:k(De.div,{initial:O?{opacity:0,x:20}:!1,animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:k(b1,{conversation:w,open:P})})}),k(Xb,{attachmentPreviews:y,files:h,setFiles:m,inputMessage:x,setInputMessage:v,showEmojiPicker:f,setShowEmojiPicker:c,addEmoji:E,sendMessage:N,disabled:!a})]})};function Dh(t,e){switch(t){case"online":return e==="text"?"text-teal-600":"bg-teal-400";case"idle":return e==="text"?"text-yellow-600":"bg-yellow-400";case"dnd":return e==="text"?"text-red-600":"bg-red-400";case"offline":case"invisible":return e==="text"?"text-black":"bg-gray-400";default:return e==="text"?"text-black":"bg-gray-400"}}function x1(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const Ee=Object.create(null);Ee.open="0",Ee.close="1",Ee.ping="2",Ee.pong="3",Ee.message="4",Ee.upgrade="5",Ee.noop="6";const Ei=Object.create(null);Object.keys(Ee).forEach(t=>{Ei[Ee[t]]=t});const la={type:"error",data:"parser error"},Bh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Fh=typeof ArrayBuffer=="function",Lh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,ua=({type:t,data:e},n,r)=>Bh&&e instanceof Blob?n?r(e):jh(e,r):Fh&&(e instanceof ArrayBuffer||Lh(e))?n?r(e):jh(new Blob([e]),r):r(Ee[t]+(e||"")),jh=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function $h(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let fa;function S1(t,e){if(Bh&&t.data instanceof Blob)return t.data.arrayBuffer().then($h).then(e);if(Fh&&(t.data instanceof ArrayBuffer||Lh(t.data)))return e($h(t.data));ua(t,!1,n=>{fa||(fa=new TextEncoder),e(fa.encode(n))})}const Vh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Vh.length;t++)kr[Vh.charCodeAt(t)]=t;const E1=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),c=new Uint8Array(f);for(r=0;r<n;r+=4)o=kr[t.charCodeAt(r)],s=kr[t.charCodeAt(r+1)],a=kr[t.charCodeAt(r+2)],l=kr[t.charCodeAt(r+3)],c[i++]=o<<2|s>>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return f},A1=typeof ArrayBuffer=="function",da=(t,e)=>{if(typeof t!="string")return{type:"message",data:Uh(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:T1(t.substring(1),e)}:Ei[n]?t.length>1?{type:Ei[n],data:t.substring(1)}:{type:Ei[n]}:la},T1=(t,e)=>{if(A1){const n=E1(t);return Uh(n,e)}else return{base64:!0,data:t}},Uh=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},zh="",P1=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{ua(o,!1,a=>{r[s]=a,++i===n&&e(r.join(zh))})})},k1=(t,e)=>{const n=t.split(zh),r=[];for(let i=0;i<n.length;i++){const o=da(n[i],e);if(r.push(o),o.type==="error")break}return r};function C1(){return new TransformStream({transform(t,e){S1(t,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let ha;function Ai(t){return t.reduce((e,n)=>e+n.length,0)}function Ti(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function O1(t,e){ha||(ha=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Ai(n)<1)break;const l=Ti(n,1);o=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Ai(n)<2)break;const l=Ti(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Ai(n)<8)break;const l=Ti(n,8),f=new DataView(l.buffer,l.byteOffset,l.length),c=f.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(la);break}i=c*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Ai(n)<i)break;const l=Ti(n,i);a.enqueue(da(o?l:ha.decode(l),e)),r=0}if(i===0||i>t){a.enqueue(la);break}}}})}const Wh=4;function zt(t){if(t)return I1(t)}function I1(t){for(var e in zt.prototype)t[e]=zt.prototype[e];return t}zt.prototype.on=zt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},zt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this},zt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this},zt.prototype.emitReserved=zt.prototype.emit,zt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},zt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const he=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function qh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const R1=he.setTimeout,N1=he.clearTimeout;function Pi(t,e){e.useNativeTimers?(t.setTimeoutFn=R1.bind(he),t.clearTimeoutFn=N1.bind(he)):(t.setTimeoutFn=he.setTimeout.bind(he),t.clearTimeoutFn=he.clearTimeout.bind(he))}const M1=1.33;function D1(t){return typeof t=="string"?B1(t):Math.ceil((t.byteLength||t.size)*M1)}function B1(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function F1(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function L1(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class j1 extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class pa extends zt{constructor(e){super(),this.writable=!1,Pi(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new j1(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=da(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=F1(e);return n.length?"?"+n:""}}const Hh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ma=64,$1={};let Gh=0,ki=0,Kh;function Yh(t){let e="";do e=Hh[t%ma]+e,t=Math.floor(t/ma);while(t>0);return e}function Xh(){const t=Yh(+new Date);return t!==Kh?(Gh=0,Kh=t):t+"."+Yh(Gh++)}for(;ki<ma;ki++)$1[Hh[ki]]=ki;let Jh=!1;try{Jh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const V1=Jh;function Zh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||V1))return new XMLHttpRequest}catch{}if(!e)try{return new he[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function EA(){}function U1(){}const z1=function(){return new Zh({xdomain:!1}).responseType!=null}();class W1 extends pa{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const n=e&&e.forceBase64;this.supportsBinary=z1&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};k1(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,P1(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Xh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ae(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class Ae extends zt{constructor(e,n){super(),Pi(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=qh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Zh(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ae.requestsCount++,Ae.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=U1,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ae.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ae.requestsCount=0,Ae.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Qh);else if(typeof addEventListener=="function"){const t="onpagehide"in he?"pagehide":"unload";addEventListener(t,Qh,!1)}}function Qh(){for(let t in Ae.requests)Ae.requests.hasOwnProperty(t)&&Ae.requests[t].abort()}var q1={},Ci={};Ci.byteLength=K1,Ci.toByteArray=X1,Ci.fromByteArray=Q1;for(var Te=[],pe=[],H1=typeof Uint8Array<"u"?Uint8Array:Array,ya="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn=0,G1=ya.length;Bn<G1;++Bn)Te[Bn]=ya[Bn],pe[ya.charCodeAt(Bn)]=Bn;pe[45]=62,pe[95]=63;function tp(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function K1(t){var e=tp(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Y1(t,e,n){return(e+n)*3/4-n}function X1(t){var e,n=tp(t),r=n[0],i=n[1],o=new H1(Y1(t,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)e=pe[t.charCodeAt(l)]<<18|pe[t.charCodeAt(l+1)]<<12|pe[t.charCodeAt(l+2)]<<6|pe[t.charCodeAt(l+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=pe[t.charCodeAt(l)]<<2|pe[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=pe[t.charCodeAt(l)]<<10|pe[t.charCodeAt(l+1)]<<4|pe[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function J1(t){return Te[t>>18&63]+Te[t>>12&63]+Te[t>>6&63]+Te[t&63]}function Z1(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(J1(r));return i.join("")}function Q1(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(Z1(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(Te[e>>2]+Te[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Te[e>>10]+Te[e>>4&63]+Te[e<<2&63]+"=")),i.join("")}var ga={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ga.read=function(t,e,n,r,i){var o,s,a=i*8-r-1,l=(1<<a)-1,f=l>>1,c=-7,h=n?i-1:0,m=n?-1:1,y=t[e+h];for(h+=m,o=y&(1<<-c)-1,y>>=-c,c+=a;c>0;o=o*256+t[e+h],h+=m,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=s*256+t[e+h],h+=m,c-=8);if(o===0)o=1-f;else{if(o===l)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-f}return(y?-1:1)*s*Math.pow(2,o-r)},ga.write=function(t,e,n,r,i,o){var s,a,l,f=o*8-i-1,c=(1<<f)-1,h=c>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=r?0:o-1,b=r?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?e+=m/l:e+=m*Math.pow(2,1-h),e*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*l-1)*Math.pow(2,i),s=s+h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+y]=a&255,y+=b,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[n+y]=s&255,y+=b,s/=256,f-=8);t[n+y-b]|=w*128};/*!
|
|
99
|
+
`);const v=x.state[a];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&y(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(x)});case"DISPATCH":switch(w.payload.type){case"RESET":return y(b),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(mi(l.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(mi(l.name));case"ROLLBACK":return Ks(w.state,x=>{if(a===void 0){y(x),c==null||c.init(i.getState());return}y(x[a]),c==null||c.init(mi(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ks(w.state,x=>{if(a===void 0){y(x);return}JSON.stringify(i.getState())!==JSON.stringify(x[a])&&y(x[a])});case"IMPORT_STATE":{const{nextLiftedState:x}=w.payload,v=(T=x.computedStates.slice(-1)[0])==null?void 0:T.state;if(!v)return;y(a===void 0?v:v[a]),c==null||c.send(null,x);return}case"PAUSE_RECORDING":return m=!m}return}}),b},Ks=(t,e)=>{let n;try{n=JSON.parse(t)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&e(n)};function T1(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var o;const s=l=>l===null?null:JSON.parse(l,void 0),a=(o=n.getItem(i))!=null?o:null;return a instanceof Promise?a.then(s):s(a)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const br=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return br(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return br(r)(n)}}}},P1=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:T=>T,version:0,merge:(T,x)=>({...x,...T}),...e},s=!1;const a=new Set,l=new Set;let f;try{f=o.getStorage()}catch{}if(!f)return t((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...T)},r,i);const c=br(o.serialize),h=()=>{const T=o.partialize({...r()});let x;const v=c({state:T,version:o.version}).then(E=>f.setItem(o.name,E)).catch(E=>{x=E});if(x)throw x;return v},m=i.setState;i.setState=(T,x)=>{m(T,x),h()};const y=t((...T)=>{n(...T),h()},r,i);let b;const w=()=>{var T;if(!f)return;s=!1,a.forEach(v=>v(r()));const x=((T=o.onRehydrateStorage)==null?void 0:T.call(o,r()))||void 0;return br(f.getItem.bind(f))(o.name).then(v=>{if(v)return o.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var E;return b=o.merge(v,(E=r())!=null?E:y),n(b,!0),h()}).then(()=>{x==null||x(b,void 0),s=!0,l.forEach(v=>v(b))}).catch(v=>{x==null||x(void 0,v)})};return i.persist={setOptions:T=>{o={...o,...T},T.getStorage&&(f=T.getStorage())},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>s,onHydrate:T=>(a.add(T),()=>{a.delete(T)}),onFinishHydration:T=>(l.add(T),()=>{l.delete(T)})},w(),b||y},k1=(t,e)=>(n,r,i)=>{let o={storage:T1(()=>localStorage),partialize:w=>w,version:0,merge:(w,T)=>({...T,...w}),...e},s=!1;const a=new Set,l=new Set;let f=o.storage;if(!f)return t((...w)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...w)},r,i);const c=()=>{const w=o.partialize({...r()});return f.setItem(o.name,{state:w,version:o.version})},h=i.setState;i.setState=(w,T)=>{h(w,T),c()};const m=t((...w)=>{n(...w),c()},r,i);i.getInitialState=()=>m;let y;const b=()=>{var w,T;if(!f)return;s=!1,a.forEach(v=>{var E;return v((E=r())!=null?E:m)});const x=((T=o.onRehydrateStorage)==null?void 0:T.call(o,(w=r())!=null?w:m))||void 0;return br(f.getItem.bind(f))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return[!0,o.migrate(v.state,v.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,v.state];return[!1,void 0]}).then(v=>{var E;const[M,O]=v;if(y=o.merge(O,(E=r())!=null?E:m),n(y,!0),M)return c()}).then(()=>{x==null||x(y,void 0),y=r(),s=!0,l.forEach(v=>v(y))}).catch(v=>{x==null||x(void 0,v)})};return i.persist={setOptions:w=>{o={...o,...w},w.storage&&(f=w.storage)},clearStorage:()=>{f==null||f.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>b(),hasHydrated:()=>s,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(l.add(w),()=>{l.delete(w)})},o.skipHydration||b(),y||m},O1=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((pi?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),P1(t,e)):k1(t,e);function yi(t){const e=t.content.slice(0,50);return t.support?`${t.date}-${t.authorName}-${e}`:`${t.date}-customer-${e}`}function Nd(t,e){const n=new Map;return t.forEach(r=>{const i=yi(r);n.set(i,r)}),e.forEach(r=>{const i=yi(r);n.set(i,r)}),Array.from(n.values()).sort((r,i)=>r.date-i.date)}function I1(t,e){const n=yi(e);return t.some(r=>yi(r)===n)}const Dd=460,R1=750,M1="https://api.deskcord.chat";function N1(){var n,r,i,o;const t=(r=(n=window.deskcord)==null?void 0:n.settings)==null?void 0:r.app_id,e=((o=(i=window.deskcord)==null?void 0:i.settings)==null?void 0:o.domain)??M1;if(!t)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return{app_id:t,domain:e}}const le=N1();function ne(...t){}async function D1(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${le.domain}/conversations/unread-count`,{method:"GET",headers:e});return n.ok?(await n.json()).unreadCount:(ne(`Failed to fetch unread count: ${n.status}`),null)}catch{return null}}async function B1(t,e){const n=new Headers;n.append("Content-Type","application/json"),n.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${le.domain}/conversations/mark-read`,{method:"POST",headers:n,body:JSON.stringify({timestamp:e})});return r.ok?(await r.json()).success:(ne(`Failed to mark as read: ${r.status}`),!1)}catch{return!1}}const Bd="deskcord_last_read",Fd="deskcord_unread_count",F1=()=>{try{const t=localStorage.getItem(Bd);if(!t)return null;const e=parseInt(t,10);return isNaN(e)?null:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading last read timestamp"),null}},Ld=t=>{try{localStorage.setItem(Bd,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing last read timestamp")}},gi=()=>{try{const t=localStorage.getItem(Fd);if(!t)return 0;const e=parseInt(t,10);return isNaN(e)?0:e}catch{return console.warn("[Deskcord] localStorage unavailable for reading unread count"),0}},_r=t=>{try{localStorage.setItem(Fd,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing unread count")}},Nt=p1(C1(O1((t,e)=>({_REHYDRATED_:!1,token:"",isNetworkInitialized:!1,isChatOpen:!1,isChatVisible:!1,isConversationOpen:!0,conversations:[],email:"",username:"",openConversationId:null,guildSettings:{iconURL:"",header_title:"",header_subtitle:"",lastUpdate:null},fullScreen:!1,isLoading:!1,networkError:null,currentConversationLastFetchedAt:null,pastConversationsLastFetchedAt:null,unreadCount:0,lastReadMessageDate:null,setRehydrated:n=>t(()=>({_REHYDRATED_:n})),setFullScreen:n=>t(()=>({fullScreen:n})),setToken:n=>t(()=>({token:n})),toggleChatOpen:()=>t(n=>({isChatOpen:!n.isChatOpen})),setNetworkInitialized:n=>t(()=>({isNetworkInitialized:n})),setChatVisible:n=>t(()=>({isChatVisible:n})),setChatOpen:n=>t(()=>({isChatOpen:n})),setOpenConversationId:n=>t(()=>({openConversationId:n})),setConversations:n=>t(()=>({conversations:n})),setGuildSettings:n=>t(r=>({guildSettings:{...r.guildSettings,...n}})),setConversationOpen:(n,r)=>t(i=>({conversations:i.conversations.map(o=>o.threadId===n?{...o,status:r?"open":"closed"}:o)})),setConversationCSMember:(n,r)=>t(Rn(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(Rn(i=>{const o=i.conversations.find(s=>s.threadId===n);o?o.messages.push(r):(i.conversations.push({threadId:n,lastMessageDate:Date.now(),firstMessageDate:Date.now(),status:"open",messages:[r]}),i.openConversationId=n)})),updateMessage:(n,r,i)=>t(Rn(o=>{const s=o.conversations.findIndex(a=>a.threadId===n);if(s!==-1){const a=o.conversations[s].messages.findIndex(l=>l.date===r);o.conversations[s].messages[a]=i}})),removeMessage:(n,r)=>t(Rn(i=>{const o=i.conversations.findIndex(s=>s.threadId===n);o!==-1&&(i.conversations[o].messages=i.conversations[o].messages.filter(s=>s.date!==r))})),tempConversationToThread:n=>t(r=>({...r,openConversationId:n,conversations:r.conversations.map(i=>i.threadId==="TEMP"?{...i,threadId:n}:i)})),setEmail:n=>t(()=>({email:n})),setUsername:n=>t(()=>({username:n})),getConversation:()=>{const{conversations:n,openConversationId:r}=e();return r?n.find(i=>i.threadId===r)??null:null},setLoading:n=>t(()=>({isLoading:n})),setNetworkError:n=>t(()=>({networkError:n})),setCurrentConversationLastFetchedAt:n=>t(()=>({currentConversationLastFetchedAt:n})),setPastConversationsLastFetchedAt:n=>t(()=>({pastConversationsLastFetchedAt:n})),smartMergeCurrentConversation:n=>t(Rn(r=>{const i=r.conversations.findIndex(o=>o.threadId===n.threadId);if(i!==-1){const o=r.conversations[i],s=Nd(o.messages,n.messages);r.conversations[i]={...n,messages:s}}else r.conversations.push(n);r.currentConversationLastFetchedAt=Date.now()})),smartMergePastConversations:n=>t(Rn(r=>{n.forEach(i=>{const o=r.conversations.findIndex(s=>s.threadId===i.threadId);if(o!==-1){const s=r.conversations[o],a=Nd(s.messages,i.messages);r.conversations[o]={...i,messages:a}}else r.conversations.push(i)}),r.pastConversationsLastFetchedAt=Date.now()})),incrementUnreadCount:()=>t(n=>{const r=n.unreadCount+1;return _r(r),{unreadCount:r}}),markMessagesAsRead:()=>t(()=>{const n=Date.now();return _r(0),Ld(n),{unreadCount:0,lastReadMessageDate:n}}),setUnreadCount:n=>t(()=>(_r(n),{unreadCount:n})),syncUnreadCountFromServer:async()=>{const n=Qe.get("discord-widget");if(!n){const r=gi();t(()=>({unreadCount:r}));return}try{const r=await D1(n);if(r!==null)ne(`Synced unread count from server: ${r}`),_r(r),t(()=>({unreadCount:r}));else{ne("Server unavailable, using cached unread count");const i=gi();t(()=>({unreadCount:i}))}}catch{const i=gi();t(()=>({unreadCount:i}))}},markMessagesAsReadWithSync:async()=>{const n=Date.now();_r(0),Ld(n),t(()=>({unreadCount:0,lastReadMessageDate:n}));const r=Qe.get("discord-widget");if(r)try{const i=await B1(r,n);ne(i?"Successfully synced mark-read with server":"Failed to sync mark-read with server (will retry on next load)")}catch{}},initializeUnreadState:()=>{const n=gi(),r=F1();t(()=>({unreadCount:n,lastReadMessageDate:r}))}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:L1(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function L1(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}async function j1({content:t}){const e=Nt.getState().username,n=Qe.get("discord-widget"),r=JSON.stringify({name:e,content:t}),i=new Headers;i.append("Content-Type","application/json"),i.append("Authorization",`Bearer ${n}`);const o={method:"POST",headers:i,body:r};return await(await fetch(`${le.domain}/conversations/sendMessage`,o)).json()}var Mn=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(Mn||{});const xr="System",V1={content:"This conversation has been closed by the support.",support:!0,authorName:xr,date:Date.now()},$1={content:"",support:!0,authorName:xr,date:Date.now(),customRenderer:Mn.IntroduceYourself};function U1(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:xr,date:Date.now(),ephemeral:!0}}function z1(t){return{content:"",support:!0,authorName:xr,date:Date.now(),customRenderer:Mn.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function W1(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const q1=Ve(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const l=it(null),f=it(null),{addMessage:c,getConversation:h,removeMessage:m,updateMessage:y}=Nt(),b=h();Jn(a,()=>({upload:async()=>{if(f.current)try{const M=new FormData;M.append("file",f.current),o==null||o(f.current),T(f.current);const O=await fetch(n.url,{method:n.method,headers:n.headers,body:M}),j=await O.json();i==null||i(O),x(f.current),w(j)}catch(M){s==null||s(M),v(f.current)}},clear:()=>{f.current=null,l.current&&(l.current.value=""),r==null||r(null)}}));function w(M){b&&c(b.threadId,W1(M.attachments))}function T(M){b&&c(b.threadId,z1({fileName:M.name,status:"uploading",size:M.size}))}function x(M){var j;if(!b)return;const O=(j=h())==null?void 0:j.messages.find(B=>{var F,L;return((L=(F=B.customRendererProps)==null?void 0:F.file)==null?void 0:L.fileName)===M.name});O&&m(b.threadId,O.date)}function v(M){var j,B;if(!b)return;const O=(j=h())==null?void 0:j.messages.find(F=>{var L,Y;return((Y=(L=F.customRendererProps)==null?void 0:L.file)==null?void 0:Y.fileName)===M.name});(B=O==null?void 0:O.customRendererProps)!=null&&B.file&&y(b.threadId,O.date,{...O,customRendererProps:{...O.customRendererProps,file:{...O.customRendererProps.file,status:"error"}}})}return P(Pt,{children:[P("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var M;return(M=l.current)==null?void 0:M.click()},children:P(Rw,{size:16})}),P("input",{type:"file",accept:t,ref:l,style:{display:"none"},onChange:M=>{var j;const O=(j=M.target.files)==null?void 0:j[0];O&&O.size<=e?(f.current=O,r==null||r(O)):(f.current=null,r==null||r(null))}})]})}),H1=({size:t})=>P("svg",{className:"shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:t||16,height:t||16,fill:"currentColor",viewBox:"0 0 16 16",children:P("path",{d:"M15.964.686a.5.5 0 0 0-.65-.65L.767 5.855H.766l-.452.18a.5.5 0 0 0-.082.887l.41.26.001.002 4.995 3.178 3.178 4.995.002.002.26.41a.5.5 0 0 0 .886-.083l6-15Zm-1.833 1.89L6.637 10.07l-.215-.338a.5.5 0 0 0-.154-.154l-.338-.215 7.494-7.494 1.178-.471-.47 1.178Z"})}),G1=({onPickEmoji:t})=>P("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:P("div",{className:"grid grid-cols-8 gap-2",children:K1.map((e,n)=>P("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),K1=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],Y1=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>P("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[P("div",{className:"flex justify-center absolute inset-0",children:P("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),P("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:P(Dw,{size:20})}),P("div",{className:"absolute bottom-0 left-0 right-0 bg-gray-800 bg-opacity-80 text-white text-sm px-2 py-1 truncate",children:e})]}),X1=({className:t})=>P("svg",{className:t,viewBox:"0 0 642 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:P("path",{d:"M23.9 73.2C19.4333 73.2 15.3667 72.0667 11.7 69.8C8.1 67.5333 5.23333 64.4333 3.1 60.5C1.03333 56.5 7.45058e-08 51.9667 7.45058e-08 46.9C7.45058e-08 41.7667 1.06667 37.2333 3.2 33.3C5.33333 29.3 8.23333 26.1667 11.9 23.9C15.6333 21.5667 19.7667 20.4 24.3 20.4C27.7667 20.4 30.8 21.0333 33.4 22.3C36 23.5 38.1333 25.2667 39.8 27.6V-2.86102e-06H54.8V72H41.5L39.8 65.5C38.8 66.9 37.5667 68.2 36.1 69.4C34.7 70.5333 33 71.4333 31 72.1C29 72.8333 26.6333 73.2 23.9 73.2ZM27.8 60.1C30.2667 60.1 32.4333 59.5333 34.3 58.4C36.2333 57.2667 37.7 55.7 38.7 53.7C39.7667 51.7 40.3 49.4 40.3 46.8C40.3 44.2 39.7667 41.9 38.7 39.9C37.7 37.9 36.2333 36.3333 34.3 35.2C32.4333 34.0667 30.2667 33.5 27.8 33.5C25.4 33.5 23.2333 34.0667 21.3 35.2C19.4333 36.3333 17.9667 37.9 16.9 39.9C15.8333 41.9 15.3 44.1667 15.3 46.7C15.3 49.3 15.8333 51.6333 16.9 53.7C17.9667 55.7 19.4333 57.2667 21.3 58.4C23.2333 59.5333 25.4 60.1 27.8 60.1ZM86.6086 73.2C81.4086 73.2 76.8419 72.1333 72.9086 70C68.9753 67.8 65.8753 64.7667 63.6086 60.9C61.4086 56.9667 60.3086 52.4667 60.3086 47.4C60.3086 42.2 61.4086 37.5667 63.6086 33.5C65.8086 29.4333 68.8753 26.2333 72.8086 23.9C76.7419 21.5667 81.3086 20.4 86.5086 20.4C91.5753 20.4 96.0086 21.5 99.8086 23.7C103.609 25.9 106.575 28.9 108.709 32.7C110.909 36.4333 112.009 40.7667 112.009 45.7C112.009 46.3667 111.975 47.1333 111.909 48C111.909 48.8 111.842 49.6333 111.709 50.5H71.0086V41.8H96.7086C96.5753 39 95.5419 36.7667 93.6086 35.1C91.7419 33.3667 89.4086 32.5 86.6086 32.5C84.4753 32.5 82.5419 33 80.8086 34C79.0753 35 77.6753 36.5 76.6086 38.5C75.6086 40.5 75.1086 43.0333 75.1086 46.1V49.1C75.1086 51.4333 75.5419 53.5 76.4086 55.3C77.3419 57.1 78.6419 58.5 80.3086 59.5C82.0419 60.5 84.0753 61 86.4086 61C88.6086 61 90.4086 60.5667 91.8086 59.7C93.2753 58.7667 94.4086 57.6 95.2086 56.2H110.509C109.575 59.4 107.975 62.3 105.709 64.9C103.442 67.4333 100.675 69.4667 97.4086 71C94.1419 72.4667 90.5419 73.2 86.6086 73.2ZM138.039 73.2C133.306 73.2 129.206 72.4667 125.739 71C122.339 69.4667 119.639 67.4 117.639 64.8C115.706 62.2 114.606 59.2667 114.339 56H129.239C129.506 57.1333 129.972 58.1667 130.639 59.1C131.372 59.9667 132.339 60.6667 133.539 61.2C134.806 61.6667 136.206 61.9 137.739 61.9C139.406 61.9 140.739 61.7 141.739 61.3C142.806 60.8333 143.606 60.2333 144.139 59.5C144.672 58.7667 144.939 58 144.939 57.2C144.939 55.9333 144.539 54.9667 143.739 54.3C143.006 53.6333 141.906 53.1 140.439 52.7C138.972 52.2333 137.206 51.8 135.139 51.4C132.739 50.8667 130.339 50.2667 127.939 49.6C125.606 48.8667 123.506 47.9667 121.639 46.9C119.839 45.8333 118.372 44.4667 117.239 42.8C116.172 41.0667 115.639 38.9667 115.639 36.5C115.639 33.5 116.472 30.8 118.139 28.4C119.806 25.9333 122.206 24 125.339 22.6C128.472 21.1333 132.272 20.4 136.739 20.4C143.072 20.4 148.039 21.8 151.639 24.6C155.239 27.4 157.372 31.1667 158.039 35.9H144.039C143.639 34.5667 142.806 33.5667 141.539 32.9C140.272 32.1667 138.672 31.8 136.739 31.8C134.539 31.8 132.872 32.1667 131.739 32.9C130.606 33.6333 130.039 34.6 130.039 35.8C130.039 36.6 130.406 37.3333 131.139 38C131.939 38.6 133.072 39.1333 134.539 39.6C136.006 40.0667 137.806 40.5333 139.939 41C144.006 41.8667 147.506 42.8 150.439 43.8C153.439 44.8 155.772 46.2667 157.439 48.2C159.106 50.0667 159.906 52.8 159.839 56.4C159.906 59.6667 159.039 62.5667 157.239 65.1C155.506 67.6333 153.006 69.6333 149.739 71.1C146.472 72.5 142.572 73.2 138.039 73.2ZM198.643 72L177.843 44.4L196.343 21.6H214.043L189.143 50.8V38.8L217.243 72H198.643ZM165.043 72V-2.86102e-06H180.043V72H165.043ZM239.509 73.2C234.309 73.2 229.709 72.0667 225.709 69.8C221.776 67.5333 218.676 64.4333 216.409 60.5C214.209 56.5667 213.109 52.0667 213.109 47C213.109 41.8 214.209 37.2333 216.409 33.3C218.676 29.3 221.776 26.1667 225.709 23.9C229.709 21.5667 234.309 20.4 239.509 20.4C246.109 20.4 251.643 22.1333 256.109 25.6C260.643 29.0667 263.509 33.9 264.709 40.1H248.809C248.209 37.9667 247.076 36.3 245.409 35.1C243.743 33.9 241.743 33.3 239.409 33.3C237.209 33.3 235.276 33.8667 233.609 35C232.009 36.0667 230.743 37.6333 229.809 39.7C228.876 41.7 228.409 44.0667 228.409 46.8C228.409 48.8667 228.676 50.7333 229.209 52.4C229.743 54.0667 230.476 55.5 231.409 56.7C232.409 57.9 233.576 58.8333 234.909 59.5C236.243 60.1 237.743 60.4 239.409 60.4C241.009 60.4 242.409 60.1333 243.609 59.6C244.876 59.0667 245.943 58.3 246.809 57.3C247.743 56.3 248.409 55.0667 248.809 53.6H264.709C263.509 59.6 260.643 64.3667 256.109 67.9C251.576 71.4333 246.043 73.2 239.509 73.2ZM294.528 73.2C289.661 73.2 285.295 72.0667 281.428 69.8C277.561 67.5333 274.495 64.4333 272.228 60.5C269.961 56.5 268.828 51.9667 268.828 46.9C268.828 41.7 269.961 37.1333 272.228 33.2C274.495 29.2 277.561 26.0667 281.428 23.8C285.361 21.5333 289.728 20.4 294.528 20.4C299.461 20.4 303.861 21.5333 307.728 23.8C311.595 26.0667 314.661 29.2 316.928 33.2C319.195 37.1333 320.328 41.6667 320.328 46.8C320.328 51.9333 319.195 56.5 316.928 60.5C314.661 64.4333 311.595 67.5333 307.728 69.8C303.861 72.0667 299.461 73.2 294.528 73.2ZM294.528 60.2C296.528 60.2 298.295 59.7 299.828 58.7C301.428 57.7 302.695 56.2 303.628 54.2C304.561 52.2 305.028 49.7333 305.028 46.8C305.028 43.8667 304.561 41.4 303.628 39.4C302.695 37.4 301.461 35.9 299.928 34.9C298.395 33.9 296.628 33.4 294.628 33.4C292.628 33.4 290.828 33.9 289.228 34.9C287.695 35.9 286.461 37.4 285.528 39.4C284.595 41.4 284.128 43.8667 284.128 46.8C284.128 49.7333 284.595 52.2 285.528 54.2C286.461 56.2 287.695 57.7 289.228 58.7C290.828 59.7 292.595 60.2 294.528 60.2ZM325.852 72V21.6H339.152L340.552 30.8C341.885 28.6667 343.452 26.8333 345.252 25.3C347.052 23.7667 349.118 22.5667 351.452 21.7C353.852 20.8333 356.418 20.4 359.152 20.4V36.3H354.152C352.152 36.3 350.318 36.5333 348.652 37C347.052 37.4 345.652 38.1 344.452 39.1C343.318 40.1 342.418 41.4667 341.752 43.2C341.152 44.8667 340.852 46.9667 340.852 49.5V72H325.852ZM383.853 73.2C379.386 73.2 375.32 72.0667 371.653 69.8C368.053 67.5333 365.186 64.4333 363.053 60.5C360.986 56.5 359.953 51.9667 359.953 46.9C359.953 41.7667 361.02 37.2333 363.153 33.3C365.286 29.3 368.186 26.1667 371.853 23.9C375.586 21.5667 379.72 20.4 384.253 20.4C387.72 20.4 390.753 21.0333 393.353 22.3C395.953 23.5 398.086 25.2667 399.753 27.6V-2.86102e-06H414.753V72H401.453L399.753 65.5C398.753 66.9 397.52 68.2 396.053 69.4C394.653 70.5333 392.953 71.4333 390.953 72.1C388.953 72.8333 386.586 73.2 383.853 73.2ZM387.753 60.1C390.22 60.1 392.386 59.5333 394.253 58.4C396.186 57.2667 397.653 55.7 398.653 53.7C399.72 51.7 400.253 49.4 400.253 46.8C400.253 44.2 399.72 41.9 398.653 39.9C397.653 37.9 396.186 36.3333 394.253 35.2C392.386 34.0667 390.22 33.5 387.753 33.5C385.353 33.5 383.186 34.0667 381.253 35.2C379.386 36.3333 377.92 37.9 376.853 39.9C375.786 41.9 375.253 44.1667 375.253 46.7C375.253 49.3 375.786 51.6333 376.853 53.7C377.92 55.7 379.386 57.2667 381.253 58.4C383.186 59.5333 385.353 60.1 387.753 60.1ZM428.762 72.5C426.028 72.5 423.795 71.7 422.062 70.1C420.395 68.4333 419.562 66.4333 419.562 64.1C419.562 61.7 420.395 59.7 422.062 58.1C423.795 56.4333 426.028 55.6 428.762 55.6C431.428 55.6 433.595 56.4333 435.262 58.1C436.928 59.7 437.762 61.7 437.762 64.1C437.762 66.4333 436.928 68.4333 435.262 70.1C433.595 71.7 431.428 72.5 428.762 72.5ZM467.42 73.2C462.22 73.2 457.62 72.0667 453.62 69.8C449.686 67.5333 446.586 64.4333 444.32 60.5C442.12 56.5667 441.02 52.0667 441.02 47C441.02 41.8 442.12 37.2333 444.32 33.3C446.586 29.3 449.686 26.1667 453.62 23.9C457.62 21.5667 462.22 20.4 467.42 20.4C474.02 20.4 479.553 22.1333 484.02 25.6C488.553 29.0667 491.42 33.9 492.62 40.1H476.72C476.12 37.9667 474.986 36.3 473.32 35.1C471.653 33.9 469.653 33.3 467.32 33.3C465.12 33.3 463.186 33.8667 461.52 35C459.92 36.0667 458.653 37.6333 457.72 39.7C456.786 41.7 456.32 44.0667 456.32 46.8C456.32 48.8667 456.586 50.7333 457.12 52.4C457.653 54.0667 458.386 55.5 459.32 56.7C460.32 57.9 461.486 58.8333 462.82 59.5C464.153 60.1 465.653 60.4 467.32 60.4C468.92 60.4 470.32 60.1333 471.52 59.6C472.786 59.0667 473.853 58.3 474.72 57.3C475.653 56.3 476.32 55.0667 476.72 53.6H492.62C491.42 59.6 488.553 64.3667 484.02 67.9C479.486 71.4333 473.953 73.2 467.42 73.2ZM498.238 72V-2.86102e-06H513.238V28.8C514.838 26.2667 517.005 24.2333 519.738 22.7C522.472 21.1667 525.672 20.4 529.338 20.4C533.605 20.4 537.172 21.3 540.038 23.1C542.905 24.9 545.072 27.5333 546.538 31C548.005 34.4 548.738 38.5333 548.738 43.4V72H533.838V44.8C533.838 41.0667 533.038 38.1667 531.438 36.1C529.905 34.0333 527.438 33 524.038 33C522.038 33 520.205 33.5 518.538 34.5C516.872 35.5 515.572 36.9333 514.638 38.8C513.705 40.6 513.238 42.7667 513.238 45.3V72H498.238ZM572.427 73.2C568.227 73.2 564.727 72.5333 561.927 71.2C559.193 69.8667 557.16 68.0667 555.827 65.8C554.56 63.4667 553.927 60.9 553.927 58.1C553.927 55.1 554.66 52.4667 556.127 50.2C557.66 47.8667 560.027 46.0333 563.227 44.7C566.427 43.3 570.46 42.6 575.327 42.6H587.527C587.527 40.3333 587.227 38.4667 586.627 37C586.093 35.5333 585.193 34.4333 583.927 33.7C582.66 32.9667 580.927 32.6 578.727 32.6C576.393 32.6 574.427 33.0667 572.827 34C571.227 34.9333 570.227 36.4 569.827 38.4H555.427C555.76 34.8 556.927 31.6667 558.927 29C560.993 26.3333 563.727 24.2333 567.127 22.7C570.527 21.1667 574.427 20.4 578.827 20.4C583.627 20.4 587.793 21.2 591.327 22.8C594.86 24.3333 597.593 26.6 599.527 29.6C601.527 32.6 602.527 36.3333 602.527 40.8V72H590.027L588.227 64.7C587.493 65.9667 586.627 67.1333 585.627 68.2C584.627 69.2 583.46 70.1 582.127 70.9C580.793 71.6333 579.327 72.2 577.727 72.6C576.127 73 574.36 73.2 572.427 73.2ZM576.127 61.8C577.727 61.8 579.127 61.5333 580.327 61C581.527 60.4667 582.56 59.7333 583.427 58.8C584.293 57.8667 584.993 56.8 585.527 55.6C586.127 54.3333 586.56 52.9667 586.827 51.5V51.4H577.127C575.46 51.4 574.06 51.6333 572.927 52.1C571.86 52.5 571.06 53.1 570.527 53.9C569.993 54.7 569.727 55.6333 569.727 56.7C569.727 57.8333 569.993 58.8 570.527 59.6C571.127 60.3333 571.893 60.9 572.827 61.3C573.827 61.6333 574.927 61.8 576.127 61.8ZM632.299 72C628.633 72 625.399 71.4333 622.599 70.3C619.799 69.1 617.633 67.1667 616.099 64.5C614.566 61.8333 613.799 58.2 613.799 53.6V34.1H605.199V21.6H613.799L615.399 7.4H628.799V21.6H641.699V34.1H628.799V53.8C628.799 55.8 629.233 57.2333 630.099 58.1C631.033 58.9 632.599 59.3 634.799 59.3H641.699V72H632.299Z",fill:"currentColor"})}),J1=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:l,attachmentPreviews:f,disabled:c=!1}=t,{getConversation:h}=Nt(),m=h(),y=Qe.get("discord-widget"),b=it(null),T=(m==null?void 0:m.status)==="closed"||c,x=()=>{},v=F=>{i(o.filter(L=>(F==null?void 0:F.name)!==L.name))},E=F=>{F&&i([...o,F])},M=()=>{var F;(F=b.current)==null||F.upload()},O=()=>{o.length&&M(),r()},j=F=>{F.key==="Enter"&&(F.shiftKey?(F.preventDefault(),n(`${e}
|
|
100
|
+
`)):(F.preventDefault(),O()))};return P("div",{className:"relative border-t border-t-gray-200",children:[s&&P(G1,{onPickEmoji:a}),(()=>{if(!(o!=null&&o.length))return null;const F=o.map((L,Y)=>{if(!f[L.name])return null;const{url:Z,width:nt,height:st}=f[L.name];return P(Y1,{onDelete:()=>{var _t;i(o.filter(dt=>dt.name!==L.name)),(_t=b.current)==null||_t.clear()},fileName:L.name,width:nt,height:st,imageUrl:Z},`attachment-preview-${Y}`)});return P("div",{className:"m-2",children:F})})(),P("div",{className:"flex items-start gap-2 p-2 bg-white dark:bg-neutral-900",children:[P("textarea",{id:"hs-textarea-ex-1",disabled:T,value:e,onChange:F=>n(F.target.value),onKeyDown:j,className:"flex-1 p-3 block text-base md:text-sm outline-none disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-800 dark:text-neutral-400 dark:placeholder-neutral-500 resize-none min-h-[55px] max-h-[200px] overflow-y-auto",placeholder:c?"Please introduce yourself first...":"Ask us anything!","data-hs-textarea-auto-height":""}),P("button",{type:"button",disabled:T,onClick:()=>O(),style:{background:T?"#9CA3AF":"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},"aria-label":"Send message",className:"inline-flex shrink-0 justify-center items-center w-[33px] h-[33px] rounded-lg text-white transform transition-transform duration-150 hover:scale-105 active:scale-95 disabled:opacity-50 disabled:pointer-events-none disabled:transform-none",children:P(H1,{size:16})})]}),P("div",{className:"flex items-center justify-between px-2 py-1.5 bg-white dark:bg-neutral-900",children:[P("div",{className:"flex items-center gap-1",children:[P("div",{className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 transition-colors duration-150",children:P(q1,{ref:b,accept:"image/*",maxSize:10*1024*1024,uploadConfig:{url:`${le.domain}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${y}`}},onUploadComplete:x,onUploadStart:v,onFileSelect:E})}),P("button",{type:"button",disabled:T,onClick:T?void 0:()=>l(!s),"aria-label":"Open emoji picker",className:"inline-flex shrink-0 justify-center items-center size-8 rounded-lg text-gray-500 hover:bg-gray-100 focus:z-10 focus:outline-none focus:bg-gray-100 dark:text-neutral-500 dark:hover:bg-neutral-800 dark:focus:bg-neutral-800 disabled:opacity-50 disabled:pointer-events-none transition-colors duration-150",children:P(Nw,{size:16})})]}),P("a",{href:"https://deskcord.chat",target:"_blank",rel:"noopener noreferrer","aria-label":"Powered by Deskcord",className:"flex items-center gap-1 text-[10px] text-gray-400 hover:text-gray-600 dark:text-neutral-600 dark:hover:text-neutral-400 transition-colors duration-200 no-underline",children:[P("span",{children:"Powered by"}),P(X1,{className:"h-[10px] w-auto"})]})]})]})},jd=t=>{const e=Date.now(),n=Math.floor((e-t)/1e3);return n<60?"Just now":n<3600?`${Math.floor(n/60)}m ago`:n<86400?`${Math.floor(n/3600)}h ago`:`${Math.floor(n/86400)}d ago`},Vd="carousel",$d="controller",Z1="navigation",Q1="no-scroll",Ys="portal",tb="root",Ud="toolbar",Xs="loading",Js="error",Zs="complete",eb="placeholder",nb=t=>`active-slide-${t}`,zd="flex_center",rb="no_scroll",Wd="no_scroll_padding",ib="slide_wrapper",rn="prev",on="next",qd="swipe",Nn="close",Hd="onPointerDown",Gd="onPointerMove",Kd="onPointerUp",Yd="onPointerLeave",Xd="onPointerCancel",Jd="onKeyDown",ob="onKeyUp",Zd="onWheel",sb="Escape",ab="ArrowLeft",cb="ArrowRight",lb="button",Qs="icon",Qd="contain",th="cover",ub="Unknown action type",eh="yarl__";function Be(...t){return[...t].filter(Boolean).join(" ")}function St(t){return`${eh}${t}`}function oe(t){return`--${eh}${t}`}function Sr(t,e){return`${t}${e?`_${e}`:""}`}function ta(t){return e=>Sr(t,e)}function fb(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function nh(...t){return()=>{t.forEach(e=>{e()})}}function sn(t,e,n){return()=>{const r=Ft(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function rh(){return typeof window<"u"}function db(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function ih(t){return t.type===void 0||t.type==="image"}function hb(t,e){return t.imageFit===th||t.imageFit!==Qd&&e===th}function vi(t){return typeof t=="string"?Number.parseInt(t,10):t}function wi(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=vi(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function pb(t,e){const n=wi(e),r=n.percent!==void 0?t.width/100*n.percent:n.pixel;return{width:Math.max(t.width-2*r,0),height:Math.max(t.height-2*r,0)}}function oh(t,e){return e>0?(t%e+e)%e:0}function sh(t){return t.length>0}function ah(t,e){return t[oh(e,t.length)]}function ea(t,e){return sh(t)?ah(t,e):void 0}function mb(t){return ih(t)?t.src:void 0}function yb(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const gb=Number(ul.split(".")[0])>=19;function vb(t){return{inert:gb?t:t?"":void 0}}const na={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[Nn]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Qd,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,preventDefaultWheelX:!0,preventDefaultWheelY:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function an(t,e){return{name:t,component:e}}function Gt(t,e){return{module:t,children:e}}function ch(t,e,n){return t.module.name===e?n(t):t.children?[Gt(t.module,t.children.flatMap(r=>{var i;return(i=ch(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function Dn(t,e,n){return t.flatMap(r=>{var i;return(i=ch(r,e,n))!==null&&i!==void 0?i:[]})}function wb(t,e=[],n=[]){let r=t;const i=y=>{const b=[...r];for(;b.length>0;){const w=b.pop();if((w==null?void 0:w.module.name)===y)return!0;w!=null&&w.children&&b.push(...w.children)}return!1},o=(y,b)=>{if(y===""){r=[Gt(b,r)];return}r=Dn(r,y,w=>[Gt(b,[w])])},s=(y,b)=>{r=Dn(r,y,w=>[Gt(w.module,[Gt(b,w.children)])])},a=(y,b,w)=>{r=Dn(r,y,T=>{var x;return[Gt(T.module,[...w?[Gt(b)]:[],...(x=T.children)!==null&&x!==void 0?x:[],...w?[]:[Gt(b)]])]})},l=(y,b,w)=>{r=Dn(r,y,T=>[...w?[Gt(b)]:[],T,...w?[]:[Gt(b)]])},f=y=>{s($d,y)},c=(y,b)=>{r=Dn(r,y,w=>[Gt(b,w.children)])},h=y=>{r=Dn(r,y,b=>b.children)},m=y=>{n.push(y)};return e.forEach(y=>{y({contains:i,addParent:o,append:s,addChild:a,addSibling:l,addModule:f,replace:c,remove:h,augment:m})}),{config:r,augmentation:y=>n.reduce((b,w)=>w(b),y)}}const lh=te(null),ra=sn("useDocument","DocumentContext",lh);function bb({nodeRef:t,children:e}){const n=Ht(()=>{const r=o=>{var s;return((s=o||t.current)===null||s===void 0?void 0:s.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:o=>{var s;return((s=r(o))===null||s===void 0?void 0:s.defaultView)||window}}},[t]);return et(lh.Provider,{value:n},e)}const uh=te(null),bi=sn("useEvents","EventsContext",uh);function _b({children:t}){const[e]=gt({});ut(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=Ht(()=>{const r=(s,a)=>{var l;(l=e[s])===null||l===void 0||l.splice(0,e[s].length,...e[s].filter(f=>f!==a))};return{publish:(...[s,a])=>{var l;(l=e[s])===null||l===void 0||l.forEach(f=>f(a))},subscribe:(s,a)=>(e[s]||(e[s]=[]),e[s].push(a),()=>r(s,a)),unsubscribe:r}},[e]);return et(uh.Provider,{value:n},t)}const fh=te(null),Er=sn("useLightboxProps","LightboxPropsContext",fh);function xb({children:t,...e}){return et(fh.Provider,{value:e},t)}const dh=te(null),_i=sn("useLightboxState","LightboxStateContext",dh),hh=te(null),Sb=sn("useLightboxDispatch","LightboxDispatchContext",hh);function Eb(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=oh(i,n.length),s=ea(n,o),a=r||e.duration?{increment:r,duration:e.duration,easing:e.easing}:void 0;return{slides:n,currentIndex:o,globalIndex:i,currentSlide:s,animation:a}}case"update":return e.slides!==t.slides||e.index!==t.currentIndex?{slides:e.slides,currentIndex:e.index,globalIndex:e.index,currentSlide:ea(e.slides,e.index)}:t;default:throw new Error(ub)}}function Ab({slides:t,index:e,children:n}){const[r,i]=Xn(Eb,{slides:t,currentIndex:e,globalIndex:e,currentSlide:ea(t,e)});ut(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=Ht(()=>({...r,state:r,dispatch:i}),[r,i]);return et(hh.Provider,{value:i},et(dh.Provider,{value:o},n))}const ph=te(null),xi=sn("useTimeouts","TimeoutsContext",ph);function Cb({children:t}){const[e]=gt([]);ut(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=Ht(()=>{const r=s=>{e.splice(0,e.length,...e.filter(a=>a!==s))};return{setTimeout:(s,a)=>{const l=window.setTimeout(()=>{r(l),s()},a);return e.push(l),l},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[e]);return et(ph.Provider,{value:n},t)}const mh=Ve(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},l){const{styles:f,labels:c}=Er(),h=fb(c,e);return et("button",{ref:l,type:"button",title:h,"aria-label":h,className:Be(St(lb),n),onClick:o,style:{...s,...f.button},...a},i?i():et(r,{className:St(Qs),style:f.icon}))});function Tb(t,e){const n=r=>et("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},e);return n.displayName=t,n}function Ar(t,e){return Tb(t,et("g",{fill:"currentColor"},et("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const Pb=Ar("Close",et("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),kb=Ar("Previous",et("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),Ob=Ar("Next",et("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Ib=Ar("Loading",et(Pt,null,Array.from({length:8}).map((t,e,n)=>et("line",{key:e,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(e+1),transform:`rotate(${360/n.length*e}, 12, 12)`})))),Rb=Ar("Error",et("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),Cr=rh()?Re:ut;function yh(){const[t,e]=gt(!1);return ut(()=>{var n,r;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");e(i==null?void 0:i.matches);const o=s=>e(s.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",o),()=>{var s;return(s=i==null?void 0:i.removeEventListener)===null||s===void 0?void 0:s.call(i,"change",o)}},[]),t}function Mb(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(vi);s.length===6?(e=s[4],n=s[5]):s.length===16&&(e=s[12],n=s[13],r=s[14])}return{x:e,y:n,z:r}}function gh(t,e){const n=it(),r=it(),i=yh();return Cr(()=>{var o,s,a;if(t.current&&n.current!==void 0&&!i){const{keyframes:l,duration:f,easing:c,onfinish:h}=e(n.current,t.current.getBoundingClientRect(),Mb(t.current))||{};if(l&&f){(o=r.current)===null||o===void 0||o.cancel(),r.current=void 0;try{r.current=(a=(s=t.current).animate)===null||a===void 0?void 0:a.call(s,l,{duration:f,easing:c})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,h==null||h()})}}n.current=void 0}),{prepareAnimation:o=>{n.current=o},isAnimationPlaying:()=>{var o;return((o=r.current)===null||o===void 0?void 0:o.playState)==="running"}}}function vh(){const t=it(null),e=it(),[n,r]=gt();return{setContainerRef:kt(o=>{t.current=o,e.current&&(e.current.disconnect(),e.current=void 0);const s=()=>{if(o){const a=window.getComputedStyle(o),l=f=>parseFloat(f)||0;r({width:Math.round(o.clientWidth-l(a.paddingLeft)-l(a.paddingRight)),height:Math.round(o.clientHeight-l(a.paddingTop)-l(a.paddingBottom))})}else r(void 0)};s(),o&&typeof ResizeObserver<"u"&&(e.current=new ResizeObserver(s),e.current.observe(o))},[]),containerRef:t,containerRect:n}}function Si(){const t=it(),{setTimeout:e,clearTimeout:n}=xi();return kt((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function Ut(t){const e=it(t);return Cr(()=>{e.current=t}),kt((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function wh(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function ia(t,e){return Ht(()=>t==null&&e==null?null:n=>{wh(t,n),wh(e,n)},[t,e])}function Nb(t,e=!1){const n=it();Cr(()=>{e&&n.current&&(n.current=!1,t())},[e,t]);const r=kt(()=>{n.current=!0},[]),i=kt(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function oa(){const[t,e]=gt(!1);return Cr(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function Db(){const[t]=gt({}),e=kt((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=Ht(()=>({onPointerDown:i=>e(Hd,i),onPointerMove:i=>e(Gd,i),onPointerUp:i=>e(Kd,i),onPointerLeave:i=>e(Yd,i),onPointerCancel:i=>e(Xd,i),onKeyDown:i=>e(Jd,i),onKeyUp:i=>e(ob,i),onWheel:i=>e(Zd,i)}),[e]),r=kt((i,o)=>(t[i]||(t[i]=[]),t[i].unshift(o),()=>{const s=t[i];s&&s.splice(0,s.length,...s.filter(a=>a!==o))}),[t]);return{registerSensors:n,subscribeSensors:r}}function bh(t,e){const n=it(0),r=Si(),i=Ut((...o)=>{n.current=Date.now(),t(o)});return kt((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const sa=ta("slide"),aa=ta("slide_image");function Bb({slide:t,offset:e,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:a,onError:l,style:f}){var c,h,m,y,b,w,T;const[x,v]=gt(Xs),{publish:E}=bi(),{setTimeout:M}=xi(),O=it(null);ut(()=>{e===0&&E(nb(x))},[e,x,E]);const j=Ut(G=>{("decode"in G?G.decode():Promise.resolve()).catch(()=>{}).then(()=>{G.parentNode&&(v(Zs),M(()=>{a==null||a(G)},0))})}),B=kt(G=>{O.current=G,G!=null&&G.complete&&j(G)},[j]),F=kt(G=>{j(G.currentTarget)},[j]),L=Ut(()=>{v(Js),l==null||l()}),Y=hb(t,i),Z=(G,S)=>Number.isFinite(G)?G:S,nt=Z(Math.max(...((h=(c=t.srcSet)===null||c===void 0?void 0:c.map(G=>G.width))!==null&&h!==void 0?h:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((m=O.current)===null||m===void 0?void 0:m.naturalWidth)||0),st=Z(Math.max(...((b=(y=t.srcSet)===null||y===void 0?void 0:y.map(G=>G.height))!==null&&b!==void 0?b:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((w=O.current)===null||w===void 0?void 0:w.naturalHeight)||0),_t=nt&&st?{maxWidth:`min(${nt}px, 100%)`,maxHeight:`min(${st}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},dt=(T=t.srcSet)===null||T===void 0?void 0:T.sort((G,S)=>G.width-S.width).map(G=>`${G.src} ${G.width}w`).join(", "),It=()=>r&&!Y&&t.width&&t.height?r.height/t.height*t.width:Number.MAX_VALUE,at=dt&&r&&rh()?`${Math.round(Math.min(It(),r.width))}px`:void 0,{style:pt,className:z,...H}=o||{};return et(Pt,null,et("img",{ref:B,onLoad:F,onError:L,onClick:s,draggable:!1,className:Be(St(aa()),Y&&St(aa("cover")),x!==Zs&&St(aa("loading")),z),style:{..._t,...f,...pt},...H,alt:t.alt,sizes:at,srcSet:dt,src:t.src}),x!==Zs&&et("div",{className:St(sa(eb))},x===Xs&&(n!=null&&n.iconLoading?n.iconLoading():et(Ib,{className:Be(St(Qs),St(sa(Xs)))})),x===Js&&(n!=null&&n.iconError?n.iconError():et(Rb,{className:Be(St(Qs),St(sa(Js)))}))))}const Fb=Ve(function({className:e,children:n,...r},i){const o=it(null);return et(bb,{nodeRef:o},et("div",{ref:ia(i,o),className:Be(St("root"),e),...r},n))});var Qt;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(Qt||(Qt={}));function Lb(t,e,n,r,i){ut(()=>nh(t(Hd,e),t(Gd,n),t(Kd,r),t(Yd,r),t(Xd,r)),[t,e,n,r,i])}var ve;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(ve||(ve={}));const ca=30;function jb(t,e,n,r,i,o,s,a,l,f,c,h,m,y){const b=it(0),w=it([]),T=it(),x=it(0),v=it(ve.NONE),E=kt(L=>{T.current===L.pointerId&&(T.current=void 0,v.current=ve.NONE);const Y=w.current;Y.splice(0,Y.length,...Y.filter(Z=>Z.pointerId!==L.pointerId))},[]),M=kt(L=>{E(L),L.persist(),w.current.push(L)},[E]),O=Ut(L=>{M(L)}),j=(L,Y)=>f&&L>Y||l&&L<-Y,B=Ut(L=>{if(w.current.find(Y=>Y.pointerId===L.pointerId)&&T.current===L.pointerId){const Y=Date.now()-x.current,Z=b.current;v.current===ve.SWIPE?Math.abs(Z)>.3*n||Math.abs(Z)>5&&Y<r?s(Z,Y):a(Z):v.current===ve.PULL&&(j(Z,2*ca)?m(Z,Y):y(Z)),b.current=0,v.current=ve.NONE}E(L)}),F=Ut(L=>{const Y=w.current.find(Z=>Z.pointerId===L.pointerId);if(Y){const Z=T.current===L.pointerId;if(L.buttons===0){Z&&b.current!==0?B(L):E(Y);return}const nt=L.clientX-Y.clientX,st=L.clientY-Y.clientY;if(T.current===void 0){const _t=dt=>{M(L),T.current=L.pointerId,x.current=Date.now(),v.current=dt};Math.abs(nt)>Math.abs(st)&&Math.abs(nt)>ca&&e(nt)?(_t(ve.SWIPE),i()):Math.abs(st)>Math.abs(nt)&&j(st,ca)&&(_t(ve.PULL),c())}else Z&&(v.current===ve.SWIPE?(b.current=nt,o(nt)):v.current===ve.PULL&&(b.current=st,h(st)))}});Lb(t,O,F,B)}function Vb({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=it(null),r=Ut(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&t||!o&&e||i.ctrlKey)&&i.preventDefault()});return kt(i=>{var o;i?i.addEventListener("wheel",r,{passive:!1}):(o=n.current)===null||o===void 0||o.removeEventListener("wheel",r),n.current=i},[r])}function $b(t,e,n,r,i,o,s,a,l){const f=it(0),c=it(0),h=it(),m=it(),y=it(0),b=it(),w=it(0),{setTimeout:T,clearTimeout:x}=xi(),v=kt(()=>{h.current&&(x(h.current),h.current=void 0)},[x]),E=kt(()=>{m.current&&(x(m.current),m.current=void 0)},[x]),M=Ut(()=>{t!==Qt.SWIPE&&(f.current=0,w.current=0,v(),E())});ut(M,[t,M]);const O=Ut(B=>{m.current=void 0,f.current===B&&l(f.current)}),j=Ut(B=>{if(B.ctrlKey||Math.abs(B.deltaY)>Math.abs(B.deltaX))return;const F=L=>{y.current=L,x(b.current),b.current=L>0?T(()=>{y.current=0,b.current=void 0},300):void 0};if(t===Qt.NONE){if(Math.abs(B.deltaX)<=1.2*Math.abs(y.current)){F(B.deltaX);return}if(!n(-B.deltaX))return;if(c.current+=B.deltaX,v(),Math.abs(c.current)>30)c.current=0,F(0),w.current=Date.now(),o();else{const L=c.current;h.current=T(()=>{h.current=void 0,L===c.current&&(c.current=0)},i)}}else if(t===Qt.SWIPE){let L=f.current-B.deltaX;if(L=Math.min(Math.abs(L),r)*Math.sign(L),f.current=L,s(L),E(),Math.abs(L)>.2*r){F(B.deltaX),a(L,Date.now()-w.current);return}m.current=T(()=>O(L),2*i)}else F(B.deltaX)});ut(()=>e(Zd,j),[e,j])}const _h=ta("container"),xh=te(null),Tr=sn("useController","ControllerContext",xh);function Ub({children:t,...e}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:a,render:l}=e,{closeOnPullUp:f,closeOnPullDown:c,preventDefaultWheelX:h,preventDefaultWheelY:m}=o,[y,b]=gt(),w=_i(),T=Sb(),[x,v]=gt(Qt.NONE),E=it(0),M=it(0),O=it(1),{registerSensors:j,subscribeSensors:B}=Db(),{subscribe:F,publish:L}=bi(),Y=Si(),Z=Si(),nt=Si(),{containerRef:st,setContainerRef:_t,containerRect:dt}=vh(),It=ia(Vb({preventDefaultWheelX:h,preventDefaultWheelY:m}),_t),at=it(null),pt=ia(at,void 0),{getOwnerDocument:z}=ra(),H=oa(),G=J=>(H?-1:1)*(typeof J=="number"?J:1),S=Ut(()=>{var J;return(J=st.current)===null||J===void 0?void 0:J.focus()}),N=Ut(()=>e),_=Ut(()=>w),A=kt(J=>L(rn,J),[L]),I=kt(J=>L(on,J),[L]),W=kt(()=>L(Nn),[L]),V=J=>!(r.finite&&(G(J)>0&&w.currentIndex===0||G(J)<0&&w.currentIndex===w.slides.length-1)),q=J=>{var vt;E.current=J,(vt=st.current)===null||vt===void 0||vt.style.setProperty(oe("swipe_offset"),`${Math.round(J)}px`)},K=J=>{var vt,Et;M.current=J,O.current=(()=>{const X=c&&J>0?J:f&&J<0?-J:0;return Math.min(Math.max(db(1-X/60*(1-.5),2),.5),1)})(),(vt=st.current)===null||vt===void 0||vt.style.setProperty(oe("pull_offset"),`${Math.round(J)}px`),(Et=st.current)===null||Et===void 0||Et.style.setProperty(oe("pull_opacity"),`${O.current}`)},{prepareAnimation:rt}=gh(at,(J,vt,Et)=>{if(at.current&&dt)return{keyframes:[{transform:`translate(0, ${J.rect.y-vt.y+Et.y}px)`,opacity:J.opacity},{transform:"translate(0, 0)",opacity:1}],duration:J.duration,easing:i.easing.fade}}),ht=(J,vt)=>{if(f||c){K(J);let Et=0;at.current&&(Et=i.fade*(vt?2:1),rt({rect:at.current.getBoundingClientRect(),opacity:O.current,duration:Et})),nt(()=>{K(0),v(Qt.NONE)},Et),v(Qt.ANIMATION),vt||W()}},{prepareAnimation:wt,isAnimationPlaying:Tt}=gh(at,(J,vt,Et)=>{var k;if(at.current&&dt&&(!((k=w.animation)===null||k===void 0)&&k.duration)){const R=wi(r.spacing),X=(R.percent?R.percent*dt.width/100:R.pixel)||0;return{keyframes:[{transform:`translate(${G(w.globalIndex-J.index)*(dt.width+X)+J.rect.x-vt.x+Et.x}px, 0)`},{transform:"translate(0, 0)"}],duration:w.animation.duration,easing:w.animation.easing}}}),Vt=Ut(J=>{var vt,Et;const k=J.offset||0,R=k?i.swipe:(vt=i.navigation)!==null&&vt!==void 0?vt:i.swipe,X=!k&&!Tt()?i.easing.navigation:i.easing.swipe;let{direction:tt}=J;const Q=(Et=J.count)!==null&&Et!==void 0?Et:1;let ct=Qt.ANIMATION,p=R*Q;if(!tt){const d=dt==null?void 0:dt.width,g=J.duration||0,C=d?R/d*Math.abs(k):R;Q!==0?(g<C?p=p/C*Math.max(g,C/5):d&&(p=R/d*(d-Math.abs(k))),tt=G(k)>0?rn:on):p=R/2}let u=0;tt===rn?V(G(1))?u=-Q:(ct=Qt.NONE,p=R):tt===on&&(V(G(-1))?u=Q:(ct=Qt.NONE,p=R)),p=Math.round(p),Z(()=>{q(0),v(Qt.NONE)},p),at.current&&wt({rect:at.current.getBoundingClientRect(),index:w.globalIndex}),v(ct),L(qd,{type:"swipe",increment:u,duration:p,easing:X})});ut(()=>{var J,vt;!((J=w.animation)===null||J===void 0)&&J.increment&&(!((vt=w.animation)===null||vt===void 0)&&vt.duration)&&Y(()=>T({type:"swipe",increment:0}),w.animation.duration)},[w.animation,T,Y]);const Yt=[B,V,(dt==null?void 0:dt.width)||0,i.swipe,()=>v(Qt.SWIPE),J=>q(J),(J,vt)=>Vt({offset:J,duration:vt,count:1}),J=>Vt({offset:J,count:0})],Jt=[()=>{c&&v(Qt.PULL)},J=>K(J),J=>ht(J),J=>ht(J,!0)];jb(...Yt,f,c,...Jt),$b(x,...Yt);const qt=Ut(()=>{o.focus&&z().querySelector(`.${St(Ys)} .${St(_h())}`)&&S()});ut(qt,[qt]);const U=Ut(()=>{var J;(J=s.view)===null||J===void 0||J.call(s,{index:w.currentIndex})});ut(U,[w.globalIndex,U]),ut(()=>nh(F(rn,J=>Vt({direction:rn,...J})),F(on,J=>Vt({direction:on,...J})),F(qd,J=>T(J))),[F,Vt,T]);const me=Ht(()=>({prev:A,next:I,close:W,focus:S,slideRect:dt?pb(dt,r.padding):{width:0,height:0},containerRect:dt||{width:0,height:0},subscribeSensors:B,containerRef:st,setCarouselRef:pt,toolbarWidth:y,setToolbarWidth:b}),[A,I,W,S,B,dt,st,pt,y,b,r.padding]);return Jn(o.ref,()=>({prev:A,next:I,close:W,focus:S,getLightboxProps:N,getLightboxState:_}),[A,I,W,S,N,_]),et("div",{ref:It,className:Be(St(_h()),St(zd)),style:{...x===Qt.SWIPE?{[oe("swipe_offset")]:`${Math.round(E.current)}px`}:null,...x===Qt.PULL?{[oe("pull_offset")]:`${Math.round(M.current)}px`,[oe("pull_opacity")]:`${O.current}`}:null,...o.touchAction!=="none"?{[oe("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...j},dt&&et(xh.Provider,{value:me},t,(n=l.controls)===null||n===void 0?void 0:n.call(l)))}const zb=an($d,Ub);function cn(t){return Sr(Vd,t)}function Sh(t){return Sr("slide",t)}function Wb({slide:t,offset:e}){const n=it(null),{currentIndex:r}=_i(),{slideRect:i,close:o,focus:s}=Tr(),{render:a,carousel:{imageFit:l,imageProps:f},on:{click:c},controller:{closeOnBackdropClick:h},styles:{slide:m}}=Er(),{getOwnerDocument:y}=ra(),b=e!==0;ut(()=>{var x;b&&(!((x=n.current)===null||x===void 0)&&x.contains(y().activeElement))&&s()},[b,s,y]);const w=()=>{var x,v,E,M;let O=(x=a.slide)===null||x===void 0?void 0:x.call(a,{slide:t,offset:e,rect:i});return!O&&ih(t)&&(O=et(Bb,{slide:t,offset:e,render:a,rect:i,imageFit:l,imageProps:f,onClick:b?void 0:()=>c==null?void 0:c({index:r})})),O?et(Pt,null,(v=a.slideHeader)===null||v===void 0?void 0:v.call(a,{slide:t}),((E=a.slideContainer)!==null&&E!==void 0?E:({children:j})=>j)({slide:t,children:O}),(M=a.slideFooter)===null||M===void 0?void 0:M.call(a,{slide:t})):null},T=x=>{const v=n.current,E=x.target instanceof HTMLElement?x.target:void 0;h&&E&&v&&(E===v||Array.from(v.children).find(M=>M===E)&&E.classList.contains(St(ib)))&&o()};return et("div",{ref:n,className:Be(St(Sh()),!b&&St(Sh("current")),St(zd)),...vb(b),onClick:T,style:m},w())}function qb(){const t=Er().styles.slide;return et("div",{className:St("slide"),style:t})}function Hb({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=_i(),{setCarouselRef:i}=Tr(),o=wi(t.spacing),s=wi(t.padding),a=yb(t,e,1),l=[];if(sh(e))for(let f=n-a;f<=n+a;f+=1){const c=ah(e,f),h=r-n+f,m=t.finite&&(f<0||f>e.length-1);l.push(m?{key:h}:{key:[`${h}`,mb(c)].filter(Boolean).join("|"),offset:f-n,slide:c})}return et("div",{ref:i,className:Be(St(cn()),l.length>0&&St(cn("with_slides"))),style:{[`${oe(cn("slides_count"))}`]:l.length,[`${oe(cn("spacing_px"))}`]:o.pixel||0,[`${oe(cn("spacing_percent"))}`]:o.percent||0,[`${oe(cn("padding_px"))}`]:s.pixel||0,[`${oe(cn("padding_percent"))}`]:s.percent||0}},l.map(({key:f,slide:c,offset:h})=>c?et(Wb,{key:f,slide:c,offset:h}):et(qb,{key:f})))}const Gb=an(Vd,Hb);function Eh(){const{carousel:t}=Er(),{slides:e,currentIndex:n}=_i(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function Kb(t){var e;const n=oa(),{publish:r}=bi(),{animation:i}=Er(),{prevDisabled:o,nextDisabled:s}=Eh(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,l=bh(()=>r(rn),a),f=bh(()=>r(on),a),c=Ut(h=>{switch(h.key){case sb:r(Nn);break;case ab:(n?s:o)||(n?f:l)();break;case cb:(n?o:s)||(n?l:f)();break}});ut(()=>t(Jd,c),[t,c])}function Ah({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return et(mh,{label:t,icon:e,renderIcon:n,className:St(`navigation_${r}`),disabled:o,onClick:i,style:s,...Nb(Tr().focus,o)})}function Yb({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=Tr(),{prevDisabled:l,nextDisabled:f}=Eh();return Kb(a),et(Pt,null,t?t():et(Ah,{label:"Previous",action:rn,icon:kb,renderIcon:n,style:i.navigationPrev,disabled:l,onClick:o}),e?e():et(Ah,{label:"Next",action:on,icon:Ob,renderIcon:r,style:i.navigationNext,disabled:f,onClick:s}))}const Xb=an(Z1,Yb),Ch=St(rb),Jb=St(Wd);function Zb(t){return"style"in t}function Th(t,e,n){const r=window.getComputedStyle(t),i=n?"padding-left":"padding-right",o=n?r.paddingLeft:r.paddingRight,s=t.style.getPropertyValue(i);return t.style.setProperty(i,`${(vi(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function Qb({noScroll:{disabled:t},children:e}){const n=oa(),{getOwnerDocument:r,getOwnerWindow:i}=ra();return ut(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:l}=r(),f=Math.round(s.innerWidth-l.clientWidth);if(f>0){o.push(Th(a,f,n));const c=a.getElementsByTagName("*");for(let h=0;h<c.length;h+=1){const m=c[h];Zb(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(Jb)&&o.push(Th(m,f,n))}}return a.classList.add(Ch),()=>{a.classList.remove(Ch),o.forEach(c=>c())}},[n,t,r,i]),et(Pt,null,e)}const t_=an(Q1,Qb);function Ph(t){return Sr(Ys,t)}function kh(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function e_({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,l]=gt(!1),[f,c]=gt(!1),h=it([]),m=it(null),{setTimeout:y}=xi(),{subscribe:b}=bi(),T=yh()?0:e.fade;ut(()=>(l(!0),()=>{l(!1),c(!1)}),[]);const x=Ut(()=>{h.current.forEach(O=>O()),h.current=[]}),v=Ut(()=>{var O;c(!1),x(),(O=i.exiting)===null||O===void 0||O.call(i),y(()=>{var j;(j=i.exited)===null||j===void 0||j.call(i),s()},T)});ut(()=>b(Nn,v),[b,v]);const E=Ut(O=>{var j,B,F;O.scrollTop,c(!0),(j=i.entering)===null||j===void 0||j.call(i);const L=(F=(B=O.parentNode)===null||B===void 0?void 0:B.children)!==null&&F!==void 0?F:[];for(let Y=0;Y<L.length;Y+=1){const Z=L[Y];["TEMPLATE","SCRIPT","STYLE"].indexOf(Z.tagName)===-1&&Z!==O&&(h.current.push(kh(Z,"inert","")),h.current.push(kh(Z,"aria-hidden","true")))}h.current.push(()=>{var Y,Z;(Z=(Y=m.current)===null||Y===void 0?void 0:Y.focus)===null||Z===void 0||Z.call(Y)}),y(()=>{var Y;(Y=i.entered)===null||Y===void 0||Y.call(i)},T)}),M=kt(O=>{O?E(O):x()},[E,x]);return a?yo(et(Fb,{ref:M,className:Be(r,St(Ph()),St(Wd),f&&St(Ph("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==na.animation.fade?{[oe("fade_animation_duration")]:`${T}ms`}:null,...e.easing.fade!==na.animation.easing.fade?{[oe("fade_animation_timing_function")]:e.easing.fade}:null,...n.root},onFocus:O=>{m.current||(m.current=O.relatedTarget)}},t),o.root||document.body):null}const n_=an(Ys,e_);function r_({children:t}){return et(Pt,null,t)}const i_=an(tb,r_);function o_(t){return Sr(Ud,t)}function s_({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=Tr(),{setContainerRef:s,containerRect:a}=vh();Cr(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const l=()=>e?e():et(mh,{key:Nn,label:"Close",icon:Pb,renderIcon:n,onClick:i});return et("div",{ref:s,style:r.toolbar,className:St(o_())},t==null?void 0:t.map(f=>f===Nn?l():f))}const a_=an(Ud,s_);function Oh(t,e){var n;return et(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>Oh(r,e)))}function c_(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function l_({carousel:t,animation:e,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:a,slides:l,index:f,...c}){const{animation:h,carousel:m,render:y,toolbar:b,controller:w,noScroll:T,on:x,slides:v,index:E,plugins:M,...O}=na,{config:j,augmentation:B}=wb([Gt(n_,[Gt(t_,[Gt(zb,[Gt(Gb),Gt(a_),Gt(Xb)])])])],a||M),F=B({animation:c_(h,e),carousel:{...m,...t},render:{...y,...n},toolbar:{...b,...r},controller:{...w,...i},noScroll:{...T,...o},on:{...x,...s},...O,...c});return F.open?et(xb,{...F},et(Ab,{slides:l||v,index:vi(f||E)},et(Cb,null,et(_b,null,Oh(Gt(i_,j),F))))):null}function Ih(t){var e;return t.contentType?t.contentType==="image/gif":((e=t.name)==null?void 0:e.toLowerCase().endsWith(".gif"))??!1}const Rh=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=Nt(),[r,i]=gt(!1),o=Ft(Am);function s(){if(o){const c=o.getElementById("deskcord-lightbox-portal");if(c)return c}const f=document.getElementById("deskcord-lightbox-portal");return f||document.body}const a=(e==null?void 0:e.filter(f=>!Ih(f)))??[];function l(){return a.length?P(l_,{open:r,portal:{root:s()},close:()=>{i(!1),n(!1)},slides:a.map(f=>({src:f.proxyURL}))}):null}return e!=null&&e.length?P("div",{children:[e.map((f,c)=>{const{proxyURL:h,width:m,height:y}=f;return Ih(f)?P("div",{children:P("img",{src:h,alt:"GIF",className:`rounded-lg w-[${m}px] h-[${y}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${c}`):P("div",{onClick:()=>{n(!0),i(!0)},className:"cursor-pointer",children:P("img",{src:h,alt:"Preview",className:`rounded-lg w-[${m}px] h-[${y}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${c}`)}),l()]},`conv-cus-attachment-${t}`):null},Mh=({imageUrls:t,messageIndexKey:e})=>t.length?P("div",{className:"flex flex-col gap-1 mt-1",children:t.map((n,r)=>P("div",{className:"inline-block",children:P("img",{src:n,alt:"Inline image",className:"rounded-lg max-w-[200px] max-h-[200px] object-contain",loading:"lazy"})},`inline-img-${e}-${r}`))}):null,u_=["tenor.com","giphy.com","imgur.com","gfycat.com","media.discordapp.net","cdn.discordapp.com","i.redd.it","i.imgur.com"],f_=[".gif",".jpg",".jpeg",".png",".webp",".apng"];function d_(t){try{const e=new URL(t),n=e.pathname.toLowerCase(),r=e.hostname.toLowerCase();for(const i of f_)if(n.endsWith(i))return!0;for(const i of u_)if(r===i||r.endsWith(`.${i}`))return!0;return!1}catch{return!1}}const h_=/https?:\/\/[^\s<>]+/gi;function Nh(t){if(!t)return{text:"",imageUrls:[]};const e=[];let n=t;const r=t.match(h_);if(r)for(const i of r)d_(i)&&(e.push(i),n=n.replace(i,""));return n=n.replace(/\s+/g," ").trim(),{text:n,imageUrls:e}}const p_=({renderTimestamp:t,message:e,indexKey:n})=>{function r(s,a){const l=/<\w?:\w+:\d+>/g,f=s.split(l),c=s.match(l)??[],h=[];for(let m=0;m<f.length;m++)if(h.push(f[m]),c[m]){const y=a[c[m]];y&&h.push(P("img",{src:y.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},m))}return h}const{text:i,imageUrls:o}=Nh(e.content??"");return P("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[i&&P("div",{style:{background:"linear-gradient(167deg, #27292A 0%, #404547 100%)"},className:"text-white text-sm min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:r(i,e.emojis??{})}),P(Mh,{imageUrls:o,messageIndexKey:n}),P("div",{className:"flex flex-1",children:P(Rh,{attachments:e.attachments,messageIndexKey:n})}),t&&P("div",{children:P("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",jd(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},m_=({message:t,indexKey:e})=>{const{text:n,imageUrls:r}=Nh(t.content??"");return P("li",{className:`flex flex-col items-end ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[n&&P("div",{className:"grow",children:P("div",{style:{background:"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:"min-w-10 inline-block rounded-lg px-3 py-2 shadow-sm",children:P("p",{className:"text-left text-sm text-white",children:n})})}),P(Mh,{imageUrls:r,messageIndexKey:e}),t.attachments&&P("div",{className:"flex flex-1 justify-end",children:P(Rh,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`)},y_=({message:t,indexKey:e})=>P("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:P("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:P("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),g_=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=Nt(),[o,s]=gt(r),[a,l]=gt(n),[f,c]=gt(""),[h,m]=gt(!1),y=x=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(x),b=!!n&&!!r,w=x=>{if(x.preventDefault(),!!a.trim()){if(!y(o)){c("Please enter a valid email address");return}h||(m(!0),c(""),t(o),e(a))}};function T(){return P("form",{onSubmit:w,className:"w-full space-y-4",children:[P("div",{className:"mb-4",children:[P("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Let's get started"}),P("p",{className:"text-sm text-gray-600",children:"Tell us a bit about yourself so we can assist you better."})]}),P("div",{children:[P("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your name"}),P("div",{className:"relative",children:[P("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:P(Bw,{size:18,className:"text-gray-400"})}),P("input",{type:"text",id:"name",value:a,onChange:x=>l(x.target.value),name:"name",className:"py-2.5 px-4 ps-11 block w-full bg-white border border-gray-300 rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-[#7289DA] focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed",placeholder:"John Smith",disabled:b,required:!0})]})]}),P("div",{children:[P("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email address"}),P("div",{className:"relative",children:[P("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:P(Ow,{size:18,className:"text-gray-400"})}),P("input",{type:"email",id:"email",value:o,onChange:x=>{s(x.target.value),f&&c("")},name:"email",className:`py-2.5 px-4 ps-11 block w-full bg-white rounded-lg text-base md:text-sm text-gray-900 placeholder-gray-500 transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-opacity-50 focus:border-transparent disabled:bg-gray-100 disabled:text-gray-500 disabled:cursor-not-allowed border ${f?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-[#7289DA]"}`,placeholder:"you@example.com",disabled:b,required:!0})]}),f&&P("p",{className:"text-red-600 text-sm mt-2 flex items-center gap-1",children:[P("span",{className:"inline-block w-1 h-1 bg-red-600 rounded-full"}),f]})]}),P("p",{className:"text-xs text-gray-500 text-center",children:"We'll never share your information"}),!n||!r?P("button",{type:"submit",className:"w-full py-2.5 px-4 bg-[#7289DA] hover:bg-[#5B6EAB] text-white font-medium text-sm rounded-lg transition-all duration-200 transform hover:shadow-md active:scale-95 focus:outline-none focus:ring-2 focus:ring-[#7289DA] focus:ring-opacity-50 disabled:opacity-50 disabled:cursor-not-allowed",disabled:h,children:"Start Chatting"}):null]})}return P(Pt,{children:[P("li",{className:`max-w-lg flex gap-x-2 sm:gap-x-4 me-11 ${i?"opacity-75":""}`,children:P("div",{className:"w-full rounded-xl p-5 bg-white shadow-lg border border-gray-100 overflow-hidden",children:T()})}),n&&r&&P("li",{className:"flex ms-auto my-4 animate-slide-in",style:{marginTop:"1rem"},children:P("div",{className:"grow",children:P("div",{style:{background:"linear-gradient(167deg, #7289DA 0%, #5B6EAB 100%)"},className:"min-w-10 inline-block rounded-lg px-4 py-2 shadow-sm flex items-center gap-2",children:[P(Pw,{size:16,className:"text-white flex-shrink-0"}),P("p",{className:"text-sm text-white font-medium",children:["Nice to meet you, ",P("span",{className:"font-semibold",children:n}),"! Feel free to ask us anything."]})]})})})]})};function v_(t,e){const n=it();ut(()=>{n.current=t},[t]),ut(()=>{function r(){var i;(i=n==null?void 0:n.current)==null||i.call(n)}if(e!==null){const i=setInterval(r,e);return()=>clearInterval(i)}},[e])}function w_(t,e=!1,n=1){const r=e?1e3:1024;if(Math.abs(t)<r)return t+" B";const i=e?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let o=-1;const s=10**n;do t/=r,++o;while(Math.round(Math.abs(t)*s)/s>=r&&o<i.length-1);return t.toFixed(n)+" "+i[o]}const b_=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=gt(!0),[s,a]=gt(0);return v_(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),P("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:P("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:P("div",{children:[P("div",{className:"mb-2 flex justify-between items-center",children:[P("div",{className:"flex items-center gap-x-3",children:[P("span",{className:`size-8 flex ${r?"text-red-500":"text-blue-600"} justify-center items-center border border-gray-200 rounded-lg dark:border-neutral-700 dark:text-neutral-500`,children:P(kw,{})}),P("div",{children:[P("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),P("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:w_(n.size)})]})]}),r&&P("div",{className:"inline-flex items-center gap-x-2",children:P("span",{className:"relative",children:[P("svg",{className:"shrink-0 size-4 text-red-500",xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",children:P("path",{d:"M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z"})}),P("span",{className:"sr-only",children:"Danger"})]})})]}),P("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[P("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:P("div",{className:`flex flex-col justify-center rounded-full overflow-hidden ${r?"bg-red-500":"bg-blue-600"} text-xs text-white text-center whitespace-nowrap transition duration-500 dark:bg-blue-500`,style:{width:`${s}%`}})}),P("div",{className:"w-6 text-end",children:P("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},__=({conversation:t,open:e})=>{const n=it(!1),{isChatOpen:r}=Nt();ut(()=>{r?n.current=!0:n.current=!1},[r]);function i(l,f){const c=`${l.date}-${f}`;let h;if(typeof l.customRenderer<"u")switch(l.customRenderer){case Mn.IntroduceYourself:h=P(g_,{});break;case Mn.UploadFile:h=P(b_,{message:l,indexKey:c});break;default:h=a(l,c)}else l.authorName===xr?h=a(l,c):l.support?h=o(l,c):h=s(l,c);return r&&(l.pending??(l.support&&n.current))?P(De.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:h},c):P("li",{children:h},c)}function o(l,f){var y;const c=(y=t==null?void 0:t.messages)==null?void 0:y.filter(b=>b.support),h=c==null?void 0:c[c.length-1],m=l.date===(h==null?void 0:h.date);return P(p_,{renderTimestamp:m,message:l,indexKey:f})}function s(l,f){return P(m_,{message:l,indexKey:f})}function a(l,f){return P(y_,{message:l,indexKey:f})}return P("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((l,f)=>l.date-f.date).map(i),t&&!e&&i(V1,1)]})},x_=()=>{const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,email:i,updateMessage:o,isChatOpen:s}=Nt(),a=!!(r&&i),l=it(!1);ut(()=>{s&&!l.current&&(l.current=!0),s||(l.current=!1)},[s]);const[f,c]=gt(!1),[h,m]=gt([]),[y,b]=gt({}),w=t(),T=(w==null?void 0:w.status)==="open",[x,v]=gt("");ut(()=>{const j={};h.forEach(B=>{const F=new FileReader;F.addEventListener("load",function(){const L=new Image;L.onload=()=>{j[B.name]={url:F.result,width:L.width,height:L.height,size:B.size},b(j)},L.src=F.result},!1),F.readAsDataURL(B)})},[h]);const E=j=>{v(B=>B+j)},M=async()=>{const j=Date.now(),B={support:!1,content:x,date:j,authorName:r,pending:!0};if(x.trim()!==""){v(""),e(w?w.threadId:"TEMP",B);const F=await j1({content:x});F&&((!w||w.threadId==="TEMP")&&n(F.threadId),o(F.threadId,j,{...B,pending:!1,date:F.date}))}},O=s&&!l.current;return P(Pt,{children:[P("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col-reverse space-y-4 space-y-reverse",children:P(De.div,{initial:O?{opacity:0,x:20}:!1,animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:P(__,{conversation:w,open:T})})}),P(J1,{attachmentPreviews:y,files:h,setFiles:m,inputMessage:x,setInputMessage:v,showEmojiPicker:f,setShowEmojiPicker:c,addEmoji:E,sendMessage:M,disabled:!a})]})};function Dh(t,e){switch(t){case"online":return e==="text"?"text-teal-600":"bg-teal-400";case"idle":return e==="text"?"text-yellow-600":"bg-yellow-400";case"dnd":return e==="text"?"text-red-600":"bg-red-400";case"offline":case"invisible":return e==="text"?"text-black":"bg-gray-400";default:return e==="text"?"text-black":"bg-gray-400"}}function S_(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const Ee=Object.create(null);Ee.open="0",Ee.close="1",Ee.ping="2",Ee.pong="3",Ee.message="4",Ee.upgrade="5",Ee.noop="6";const Ei=Object.create(null);Object.keys(Ee).forEach(t=>{Ei[Ee[t]]=t});const la={type:"error",data:"parser error"},Bh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Fh=typeof ArrayBuffer=="function",Lh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,ua=({type:t,data:e},n,r)=>Bh&&e instanceof Blob?n?r(e):jh(e,r):Fh&&(e instanceof ArrayBuffer||Lh(e))?n?r(e):jh(new Blob([e]),r):r(Ee[t]+(e||"")),jh=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function Vh(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let fa;function E_(t,e){if(Bh&&t.data instanceof Blob)return t.data.arrayBuffer().then(Vh).then(e);if(Fh&&(t.data instanceof ArrayBuffer||Lh(t.data)))return e(Vh(t.data));ua(t,!1,n=>{fa||(fa=new TextEncoder),e(fa.encode(n))})}const $h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<$h.length;t++)Pr[$h.charCodeAt(t)]=t;const A_=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),c=new Uint8Array(f);for(r=0;r<n;r+=4)o=Pr[t.charCodeAt(r)],s=Pr[t.charCodeAt(r+1)],a=Pr[t.charCodeAt(r+2)],l=Pr[t.charCodeAt(r+3)],c[i++]=o<<2|s>>4,c[i++]=(s&15)<<4|a>>2,c[i++]=(a&3)<<6|l&63;return f},C_=typeof ArrayBuffer=="function",da=(t,e)=>{if(typeof t!="string")return{type:"message",data:Uh(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:T_(t.substring(1),e)}:Ei[n]?t.length>1?{type:Ei[n],data:t.substring(1)}:{type:Ei[n]}:la},T_=(t,e)=>{if(C_){const n=A_(t);return Uh(n,e)}else return{base64:!0,data:t}},Uh=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},zh="",P_=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{ua(o,!1,a=>{r[s]=a,++i===n&&e(r.join(zh))})})},k_=(t,e)=>{const n=t.split(zh),r=[];for(let i=0;i<n.length;i++){const o=da(n[i],e);if(r.push(o),o.type==="error")break}return r};function O_(){return new TransformStream({transform(t,e){E_(t,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}t.data&&typeof t.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(n)})}})}let ha;function Ai(t){return t.reduce((e,n)=>e+n.length,0)}function Ci(t,e){if(t[0].length===e)return t.shift();const n=new Uint8Array(e);let r=0;for(let i=0;i<e;i++)n[i]=t[0][r++],r===t[0].length&&(t.shift(),r=0);return t.length&&r<t[0].length&&(t[0]=t[0].slice(r)),n}function I_(t,e){ha||(ha=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,a){for(n.push(s);;){if(r===0){if(Ai(n)<1)break;const l=Ci(n,1);o=(l[0]&128)===128,i=l[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Ai(n)<2)break;const l=Ci(n,2);i=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(Ai(n)<8)break;const l=Ci(n,8),f=new DataView(l.buffer,l.byteOffset,l.length),c=f.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(la);break}i=c*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Ai(n)<i)break;const l=Ci(n,i);a.enqueue(da(o?l:ha.decode(l),e)),r=0}if(i===0||i>t){a.enqueue(la);break}}}})}const Wh=4;function zt(t){if(t)return R_(t)}function R_(t){for(var e in zt.prototype)t[e]=zt.prototype[e];return t}zt.prototype.on=zt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},zt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===e||r.fn===e){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+t],this},zt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,e)}return this},zt.prototype.emitReserved=zt.prototype.emit,zt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},zt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const he=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function qh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const M_=he.setTimeout,N_=he.clearTimeout;function Ti(t,e){e.useNativeTimers?(t.setTimeoutFn=M_.bind(he),t.clearTimeoutFn=N_.bind(he)):(t.setTimeoutFn=he.setTimeout.bind(he),t.clearTimeoutFn=he.clearTimeout.bind(he))}const D_=1.33;function B_(t){return typeof t=="string"?F_(t):Math.ceil((t.byteLength||t.size)*D_)}function F_(t){let e=0,n=0;for(let r=0,i=t.length;r<i;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}function L_(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function j_(t){let e={},n=t.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class V_ extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class pa extends zt{constructor(e){super(),this.writable=!1,Ti(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new V_(e,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=da(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const n=L_(e);return n.length?"?"+n:""}}const Hh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ma=64,$_={};let Gh=0,Pi=0,Kh;function Yh(t){let e="";do e=Hh[t%ma]+e,t=Math.floor(t/ma);while(t>0);return e}function Xh(){const t=Yh(+new Date);return t!==Kh?(Gh=0,Kh=t):t+"."+Yh(Gh++)}for(;Pi<ma;Pi++)$_[Hh[Pi]]=Pi;let Jh=!1;try{Jh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const U_=Jh;function Zh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||U_))return new XMLHttpRequest}catch{}if(!e)try{return new he[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function A6(){}function z_(){}const W_=function(){return new Zh({xdomain:!1}).responseType!=null}();class q_ extends pa{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const n=e&&e.forceBase64;this.supportsBinary=W_&&!n,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const n=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};k_(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,P_(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Xh()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new Ae(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class Ae extends zt{constructor(e,n){super(),Ti(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.data=n.data!==void 0?n.data:null,this.create()}create(){var e;const n=qh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new Zh(n);try{r.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(r.timeout=this.opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(r)),r.readyState===4&&(r.status===200||r.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof r.status=="number"?r.status:0)},0))},r.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=Ae.requestsCount++,Ae.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=z_,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ae.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(Ae.requestsCount=0,Ae.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Qh);else if(typeof addEventListener=="function"){const t="onpagehide"in he?"pagehide":"unload";addEventListener(t,Qh,!1)}}function Qh(){for(let t in Ae.requests)Ae.requests.hasOwnProperty(t)&&Ae.requests[t].abort()}var H_={},ki={};ki.byteLength=Y_,ki.toByteArray=J_,ki.fromByteArray=t2;for(var Ce=[],pe=[],G_=typeof Uint8Array<"u"?Uint8Array:Array,ya="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Bn=0,K_=ya.length;Bn<K_;++Bn)Ce[Bn]=ya[Bn],pe[ya.charCodeAt(Bn)]=Bn;pe[45]=62,pe[95]=63;function tp(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var r=n===e?0:4-n%4;return[n,r]}function Y_(t){var e=tp(t),n=e[0],r=e[1];return(n+r)*3/4-r}function X_(t,e,n){return(e+n)*3/4-n}function J_(t){var e,n=tp(t),r=n[0],i=n[1],o=new G_(X_(t,r,i)),s=0,a=i>0?r-4:r,l;for(l=0;l<a;l+=4)e=pe[t.charCodeAt(l)]<<18|pe[t.charCodeAt(l+1)]<<12|pe[t.charCodeAt(l+2)]<<6|pe[t.charCodeAt(l+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=pe[t.charCodeAt(l)]<<2|pe[t.charCodeAt(l+1)]>>4,o[s++]=e&255),i===1&&(e=pe[t.charCodeAt(l)]<<10|pe[t.charCodeAt(l+1)]<<4|pe[t.charCodeAt(l+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Z_(t){return Ce[t>>18&63]+Ce[t>>12&63]+Ce[t>>6&63]+Ce[t&63]}function Q_(t,e,n){for(var r,i=[],o=e;o<n;o+=3)r=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(t[o+2]&255),i.push(Z_(r));return i.join("")}function t2(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(Q_(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(Ce[e>>2]+Ce[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(Ce[e>>10]+Ce[e>>4&63]+Ce[e<<2&63]+"=")),i.join("")}var ga={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ga.read=function(t,e,n,r,i){var o,s,a=i*8-r-1,l=(1<<a)-1,f=l>>1,c=-7,h=n?i-1:0,m=n?-1:1,y=t[e+h];for(h+=m,o=y&(1<<-c)-1,y>>=-c,c+=a;c>0;o=o*256+t[e+h],h+=m,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=r;c>0;s=s*256+t[e+h],h+=m,c-=8);if(o===0)o=1-f;else{if(o===l)return s?NaN:(y?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-f}return(y?-1:1)*s*Math.pow(2,o-r)},ga.write=function(t,e,n,r,i,o){var s,a,l,f=o*8-i-1,c=(1<<f)-1,h=c>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=r?0:o-1,b=r?1:-1,w=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+h>=1?e+=m/l:e+=m*Math.pow(2,1-h),e*l>=2&&(s++,l/=2),s+h>=c?(a=0,s=c):s+h>=1?(a=(e*l-1)*Math.pow(2,i),s=s+h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[n+y]=a&255,y+=b,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[n+y]=s&255,y+=b,s/=256,f-=8);t[n+y-b]|=w*128};/*!
|
|
103
101
|
* The buffer module from node.js, for the browser.
|
|
104
102
|
*
|
|
105
103
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
106
104
|
* @license MIT
|
|
107
|
-
*/(function(t){const e=Ci,n=ga,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=O,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;c.TYPED_ARRAY_SUPPORT=l(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const p=new o(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,o.prototype),Object.setPrototypeOf(p,u),p.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function f(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const u=new o(p);return Object.setPrototypeOf(u,c.prototype),u}function c(p,u,d){if(typeof p=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(p)}return h(p,u,d)}c.poolSize=8192;function h(p,u,d){if(typeof p=="string")return w(p,u);if(s.isView(p))return x(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(R(p,s)||p&&R(p.buffer,s)||typeof a<"u"&&(R(p,a)||p&&R(p.buffer,a)))return v(p,u,d);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return c.from(g,u,d);const T=E(p);if(T)return T;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return c.from(p[Symbol.toPrimitive]("string"),u,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}c.from=function(p,u,d){return h(p,u,d)},Object.setPrototypeOf(c.prototype,o.prototype),Object.setPrototypeOf(c,o);function m(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function y(p,u,d){return m(p),p<=0?f(p):u!==void 0?typeof d=="string"?f(p).fill(u,d):f(p).fill(u):f(p)}c.alloc=function(p,u,d){return y(p,u,d)};function b(p){return m(p),f(p<0?0:N(p)|0)}c.allocUnsafe=function(p){return b(p)},c.allocUnsafeSlow=function(p){return b(p)};function w(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!c.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const d=j(p,u)|0;let g=f(d);const T=g.write(p,u);return T!==d&&(g=g.slice(0,T)),g}function P(p){const u=p.length<0?0:N(p.length)|0,d=f(u);for(let g=0;g<u;g+=1)d[g]=p[g]&255;return d}function x(p){if(R(p,o)){const u=new o(p);return v(u.buffer,u.byteOffset,u.byteLength)}return P(p)}function v(p,u,d){if(u<0||p.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<u+(d||0))throw new RangeError('"length" is outside of buffer bounds');let g;return u===void 0&&d===void 0?g=new o(p):d===void 0?g=new o(p,u):g=new o(p,u,d),Object.setPrototypeOf(g,c.prototype),g}function E(p){if(c.isBuffer(p)){const u=N(p.length)|0,d=f(u);return d.length===0||p.copy(d,0,0,u),d}if(p.length!==void 0)return typeof p.length!="number"||X(p.length)?f(0):P(p);if(p.type==="Buffer"&&Array.isArray(p.data))return P(p.data)}function N(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function O(p){return+p!=p&&(p=0),c.alloc(+p)}c.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==c.prototype},c.compare=function(u,d){if(R(u,o)&&(u=c.from(u,u.offset,u.byteLength)),R(d,o)&&(d=c.from(d,d.offset,d.byteLength)),!c.isBuffer(u)||!c.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===d)return 0;let g=u.length,T=d.length;for(let D=0,V=Math.min(g,T);D<V;++D)if(u[D]!==d[D]){g=u[D],T=d[D];break}return g<T?-1:T<g?1:0},c.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(u,d){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return c.alloc(0);let g;if(d===void 0)for(d=0,g=0;g<u.length;++g)d+=u[g].length;const T=c.allocUnsafe(d);let D=0;for(g=0;g<u.length;++g){let V=u[g];if(R(V,o))D+V.length>T.length?(c.isBuffer(V)||(V=c.from(V)),V.copy(T,D)):o.prototype.set.call(T,V,D);else if(c.isBuffer(V))V.copy(T,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=V.length}return T};function j(p,u){if(c.isBuffer(p))return p.length;if(s.isView(p)||R(p,s))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const d=p.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&d===0)return 0;let T=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return me(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Et(p).length;default:if(T)return g?-1:me(p).length;u=(""+u).toLowerCase(),T=!0}}c.byteLength=j;function B(p,u,d){let g=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,u>>>=0,d<=u))return"";for(p||(p="utf8");;)switch(p){case"hex":return S(this,u,d);case"utf8":case"utf-8":return at(this,u,d);case"ascii":return H(this,u,d);case"latin1":case"binary":return G(this,u,d);case"base64":return It(this,u,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,u,d);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}c.prototype._isBuffer=!0;function F(p,u,d){const g=p[u];p[u]=p[d],p[d]=g}c.prototype.swap16=function(){const u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<u;d+=2)F(this,d,d+1);return this},c.prototype.swap32=function(){const u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<u;d+=4)F(this,d,d+3),F(this,d+1,d+2);return this},c.prototype.swap64=function(){const u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<u;d+=8)F(this,d,d+7),F(this,d+1,d+6),F(this,d+2,d+5),F(this,d+3,d+4);return this},c.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?at(this,0,u):B.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(u){if(!c.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:c.compare(this,u)===0},c.prototype.inspect=function(){let u="";const d=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(u+=" ... "),"<Buffer "+u+">"},r&&(c.prototype[r]=c.prototype.inspect),c.prototype.compare=function(u,d,g,T,D){if(R(u,o)&&(u=c.from(u,u.offset,u.byteLength)),!c.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(d===void 0&&(d=0),g===void 0&&(g=u?u.length:0),T===void 0&&(T=0),D===void 0&&(D=this.length),d<0||g>u.length||T<0||D>this.length)throw new RangeError("out of range index");if(T>=D&&d>=g)return 0;if(T>=D)return-1;if(d>=g)return 1;if(d>>>=0,g>>>=0,T>>>=0,D>>>=0,this===u)return 0;let V=D-T,lt=g-d;const bt=Math.min(V,lt),xt=this.slice(T,D),Bt=u.slice(d,g);for(let Tt=0;Tt<bt;++Tt)if(xt[Tt]!==Bt[Tt]){V=xt[Tt],lt=Bt[Tt];break}return V<lt?-1:lt<V?1:0};function L(p,u,d,g,T){if(p.length===0)return-1;if(typeof d=="string"?(g=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,X(d)&&(d=T?0:p.length-1),d<0&&(d=p.length+d),d>=p.length){if(T)return-1;d=p.length-1}else if(d<0)if(T)d=0;else return-1;if(typeof u=="string"&&(u=c.from(u,g)),c.isBuffer(u))return u.length===0?-1:Y(p,u,d,g,T);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?T?o.prototype.indexOf.call(p,u,d):o.prototype.lastIndexOf.call(p,u,d):Y(p,[u],d,g,T);throw new TypeError("val must be string, number or Buffer")}function Y(p,u,d,g,T){let D=1,V=p.length,lt=u.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||u.length<2)return-1;D=2,V/=2,lt/=2,d/=2}function bt(Bt,Tt){return D===1?Bt[Tt]:Bt.readUInt16BE(Tt*D)}let xt;if(T){let Bt=-1;for(xt=d;xt<V;xt++)if(bt(p,xt)===bt(u,Bt===-1?0:xt-Bt)){if(Bt===-1&&(Bt=xt),xt-Bt+1===lt)return Bt*D}else Bt!==-1&&(xt-=xt-Bt),Bt=-1}else for(d+lt>V&&(d=V-lt),xt=d;xt>=0;xt--){let Bt=!0;for(let Tt=0;Tt<lt;Tt++)if(bt(p,xt+Tt)!==bt(u,Tt)){Bt=!1;break}if(Bt)return xt}return-1}c.prototype.includes=function(u,d,g){return this.indexOf(u,d,g)!==-1},c.prototype.indexOf=function(u,d,g){return L(this,u,d,g,!0)},c.prototype.lastIndexOf=function(u,d,g){return L(this,u,d,g,!1)};function Z(p,u,d,g){d=Number(d)||0;const T=p.length-d;g?(g=Number(g),g>T&&(g=T)):g=T;const D=u.length;g>D/2&&(g=D/2);let V;for(V=0;V<g;++V){const lt=parseInt(u.substr(V*2,2),16);if(X(lt))return V;p[d+V]=lt}return V}function nt(p,u,d,g){return C(me(u,p.length-d),p,d,g)}function st(p,u,d,g){return C(J(u),p,d,g)}function _t(p,u,d,g){return C(Et(u),p,d,g)}function dt(p,u,d,g){return C(vt(u,p.length-d),p,d,g)}c.prototype.write=function(u,d,g,T){if(d===void 0)T="utf8",g=this.length,d=0;else if(g===void 0&&typeof d=="string")T=d,g=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(g)?(g=g>>>0,T===void 0&&(T="utf8")):(T=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const D=this.length-d;if((g===void 0||g>D)&&(g=D),u.length>0&&(g<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");T||(T="utf8");let V=!1;for(;;)switch(T){case"hex":return Z(this,u,d,g);case"utf8":case"utf-8":return nt(this,u,d,g);case"ascii":case"latin1":case"binary":return st(this,u,d,g);case"base64":return _t(this,u,d,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,u,d,g);default:if(V)throw new TypeError("Unknown encoding: "+T);T=(""+T).toLowerCase(),V=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function It(p,u,d){return u===0&&d===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(u,d))}function at(p,u,d){d=Math.min(p.length,d);const g=[];let T=u;for(;T<d;){const D=p[T];let V=null,lt=D>239?4:D>223?3:D>191?2:1;if(T+lt<=d){let bt,xt,Bt,Tt;switch(lt){case 1:D<128&&(V=D);break;case 2:bt=p[T+1],(bt&192)===128&&(Tt=(D&31)<<6|bt&63,Tt>127&&(V=Tt));break;case 3:bt=p[T+1],xt=p[T+2],(bt&192)===128&&(xt&192)===128&&(Tt=(D&15)<<12|(bt&63)<<6|xt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(V=Tt));break;case 4:bt=p[T+1],xt=p[T+2],Bt=p[T+3],(bt&192)===128&&(xt&192)===128&&(Bt&192)===128&&(Tt=(D&15)<<18|(bt&63)<<12|(xt&63)<<6|Bt&63,Tt>65535&&Tt<1114112&&(V=Tt))}}V===null?(V=65533,lt=1):V>65535&&(V-=65536,g.push(V>>>10&1023|55296),V=56320|V&1023),g.push(V),T+=lt}return z(g)}const pt=4096;function z(p){const u=p.length;if(u<=pt)return String.fromCharCode.apply(String,p);let d="",g=0;for(;g<u;)d+=String.fromCharCode.apply(String,p.slice(g,g+=pt));return d}function H(p,u,d){let g="";d=Math.min(p.length,d);for(let T=u;T<d;++T)g+=String.fromCharCode(p[T]&127);return g}function G(p,u,d){let g="";d=Math.min(p.length,d);for(let T=u;T<d;++T)g+=String.fromCharCode(p[T]);return g}function S(p,u,d){const g=p.length;(!u||u<0)&&(u=0),(!d||d<0||d>g)&&(d=g);let T="";for(let D=u;D<d;++D)T+=tt[p[D]];return T}function M(p,u,d){const g=p.slice(u,d);let T="";for(let D=0;D<g.length-1;D+=2)T+=String.fromCharCode(g[D]+g[D+1]*256);return T}c.prototype.slice=function(u,d){const g=this.length;u=~~u,d=d===void 0?g:~~d,u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),d<0?(d+=g,d<0&&(d=0)):d>g&&(d=g),d<u&&(d=u);const T=this.subarray(u,d);return Object.setPrototypeOf(T,c.prototype),T};function _(p,u,d){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+u>d)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(u,d,g){u=u>>>0,d=d>>>0,g||_(u,d,this.length);let T=this[u],D=1,V=0;for(;++V<d&&(D*=256);)T+=this[u+V]*D;return T},c.prototype.readUintBE=c.prototype.readUIntBE=function(u,d,g){u=u>>>0,d=d>>>0,g||_(u,d,this.length);let T=this[u+--d],D=1;for(;d>0&&(D*=256);)T+=this[u+--d]*D;return T},c.prototype.readUint8=c.prototype.readUInt8=function(u,d){return u=u>>>0,d||_(u,1,this.length),this[u]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(u,d){return u=u>>>0,d||_(u,2,this.length),this[u]|this[u+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(u,d){return u=u>>>0,d||_(u,2,this.length),this[u]<<8|this[u+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(u,d){return u=u>>>0,d||_(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(u,d){return u=u>>>0,d||_(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},c.prototype.readBigUInt64LE=Q(function(u){u=u>>>0,Yt(u,"offset");const d=this[u],g=this[u+7];(d===void 0||g===void 0)&&Jt(u,this.length-8);const T=d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,D=this[++u]+this[++u]*2**8+this[++u]*2**16+g*2**24;return BigInt(T)+(BigInt(D)<<BigInt(32))}),c.prototype.readBigUInt64BE=Q(function(u){u=u>>>0,Yt(u,"offset");const d=this[u],g=this[u+7];(d===void 0||g===void 0)&&Jt(u,this.length-8);const T=d*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],D=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g;return(BigInt(T)<<BigInt(32))+BigInt(D)}),c.prototype.readIntLE=function(u,d,g){u=u>>>0,d=d>>>0,g||_(u,d,this.length);let T=this[u],D=1,V=0;for(;++V<d&&(D*=256);)T+=this[u+V]*D;return D*=128,T>=D&&(T-=Math.pow(2,8*d)),T},c.prototype.readIntBE=function(u,d,g){u=u>>>0,d=d>>>0,g||_(u,d,this.length);let T=d,D=1,V=this[u+--T];for(;T>0&&(D*=256);)V+=this[u+--T]*D;return D*=128,V>=D&&(V-=Math.pow(2,8*d)),V},c.prototype.readInt8=function(u,d){return u=u>>>0,d||_(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},c.prototype.readInt16LE=function(u,d){u=u>>>0,d||_(u,2,this.length);const g=this[u]|this[u+1]<<8;return g&32768?g|4294901760:g},c.prototype.readInt16BE=function(u,d){u=u>>>0,d||_(u,2,this.length);const g=this[u+1]|this[u]<<8;return g&32768?g|4294901760:g},c.prototype.readInt32LE=function(u,d){return u=u>>>0,d||_(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},c.prototype.readInt32BE=function(u,d){return u=u>>>0,d||_(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},c.prototype.readBigInt64LE=Q(function(u){u=u>>>0,Yt(u,"offset");const d=this[u],g=this[u+7];(d===void 0||g===void 0)&&Jt(u,this.length-8);const T=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(g<<24);return(BigInt(T)<<BigInt(32))+BigInt(d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),c.prototype.readBigInt64BE=Q(function(u){u=u>>>0,Yt(u,"offset");const d=this[u],g=this[u+7];(d===void 0||g===void 0)&&Jt(u,this.length-8);const T=(d<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(T)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g)}),c.prototype.readFloatLE=function(u,d){return u=u>>>0,d||_(u,4,this.length),n.read(this,u,!0,23,4)},c.prototype.readFloatBE=function(u,d){return u=u>>>0,d||_(u,4,this.length),n.read(this,u,!1,23,4)},c.prototype.readDoubleLE=function(u,d){return u=u>>>0,d||_(u,8,this.length),n.read(this,u,!0,52,8)},c.prototype.readDoubleBE=function(u,d){return u=u>>>0,d||_(u,8,this.length),n.read(this,u,!1,52,8)};function A(p,u,d,g,T,D){if(!c.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>T||u<D)throw new RangeError('"value" argument is out of bounds');if(d+g>p.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(u,d,g,T){if(u=+u,d=d>>>0,g=g>>>0,!T){const lt=Math.pow(2,8*g)-1;A(this,u,d,g,lt,0)}let D=1,V=0;for(this[d]=u&255;++V<g&&(D*=256);)this[d+V]=u/D&255;return d+g},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(u,d,g,T){if(u=+u,d=d>>>0,g=g>>>0,!T){const lt=Math.pow(2,8*g)-1;A(this,u,d,g,lt,0)}let D=g-1,V=1;for(this[d+D]=u&255;--D>=0&&(V*=256);)this[d+D]=u/V&255;return d+g},c.prototype.writeUint8=c.prototype.writeUInt8=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,1,255,0),this[d]=u&255,d+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,2,65535,0),this[d]=u&255,this[d+1]=u>>>8,d+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,2,65535,0),this[d]=u>>>8,this[d+1]=u&255,d+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,4,4294967295,0),this[d+3]=u>>>24,this[d+2]=u>>>16,this[d+1]=u>>>8,this[d]=u&255,d+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,4,4294967295,0),this[d]=u>>>24,this[d+1]=u>>>16,this[d+2]=u>>>8,this[d+3]=u&255,d+4};function I(p,u,d,g,T){$t(u,g,T,p,d,7);let D=Number(u&BigInt(4294967295));p[d++]=D,D=D>>8,p[d++]=D,D=D>>8,p[d++]=D,D=D>>8,p[d++]=D;let V=Number(u>>BigInt(32)&BigInt(4294967295));return p[d++]=V,V=V>>8,p[d++]=V,V=V>>8,p[d++]=V,V=V>>8,p[d++]=V,d}function W(p,u,d,g,T){$t(u,g,T,p,d,7);let D=Number(u&BigInt(4294967295));p[d+7]=D,D=D>>8,p[d+6]=D,D=D>>8,p[d+5]=D,D=D>>8,p[d+4]=D;let V=Number(u>>BigInt(32)&BigInt(4294967295));return p[d+3]=V,V=V>>8,p[d+2]=V,V=V>>8,p[d+1]=V,V=V>>8,p[d]=V,d+8}c.prototype.writeBigUInt64LE=Q(function(u,d=0){return I(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(u,d=0){return W(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(u,d,g,T){if(u=+u,d=d>>>0,!T){const bt=Math.pow(2,8*g-1);A(this,u,d,g,bt-1,-bt)}let D=0,V=1,lt=0;for(this[d]=u&255;++D<g&&(V*=256);)u<0&<===0&&this[d+D-1]!==0&&(lt=1),this[d+D]=(u/V>>0)-lt&255;return d+g},c.prototype.writeIntBE=function(u,d,g,T){if(u=+u,d=d>>>0,!T){const bt=Math.pow(2,8*g-1);A(this,u,d,g,bt-1,-bt)}let D=g-1,V=1,lt=0;for(this[d+D]=u&255;--D>=0&&(V*=256);)u<0&<===0&&this[d+D+1]!==0&&(lt=1),this[d+D]=(u/V>>0)-lt&255;return d+g},c.prototype.writeInt8=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,1,127,-128),u<0&&(u=255+u+1),this[d]=u&255,d+1},c.prototype.writeInt16LE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,2,32767,-32768),this[d]=u&255,this[d+1]=u>>>8,d+2},c.prototype.writeInt16BE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,2,32767,-32768),this[d]=u>>>8,this[d+1]=u&255,d+2},c.prototype.writeInt32LE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,4,2147483647,-2147483648),this[d]=u&255,this[d+1]=u>>>8,this[d+2]=u>>>16,this[d+3]=u>>>24,d+4},c.prototype.writeInt32BE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[d]=u>>>24,this[d+1]=u>>>16,this[d+2]=u>>>8,this[d+3]=u&255,d+4},c.prototype.writeBigInt64LE=Q(function(u,d=0){return I(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(u,d=0){return W(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function $(p,u,d,g,T,D){if(d+g>p.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function q(p,u,d,g,T){return u=+u,d=d>>>0,T||$(p,u,d,4),n.write(p,u,d,g,23,4),d+4}c.prototype.writeFloatLE=function(u,d,g){return q(this,u,d,!0,g)},c.prototype.writeFloatBE=function(u,d,g){return q(this,u,d,!1,g)};function K(p,u,d,g,T){return u=+u,d=d>>>0,T||$(p,u,d,8),n.write(p,u,d,g,52,8),d+8}c.prototype.writeDoubleLE=function(u,d,g){return K(this,u,d,!0,g)},c.prototype.writeDoubleBE=function(u,d,g){return K(this,u,d,!1,g)},c.prototype.copy=function(u,d,g,T){if(!c.isBuffer(u))throw new TypeError("argument should be a Buffer");if(g||(g=0),!T&&T!==0&&(T=this.length),d>=u.length&&(d=u.length),d||(d=0),T>0&&T<g&&(T=g),T===g||u.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("sourceEnd out of bounds");T>this.length&&(T=this.length),u.length-d<T-g&&(T=u.length-d+g);const D=T-g;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,g,T):o.prototype.set.call(u,this.subarray(g,T),d),D},c.prototype.fill=function(u,d,g,T){if(typeof u=="string"){if(typeof d=="string"?(T=d,d=0,g=this.length):typeof g=="string"&&(T=g,g=this.length),T!==void 0&&typeof T!="string")throw new TypeError("encoding must be a string");if(typeof T=="string"&&!c.isEncoding(T))throw new TypeError("Unknown encoding: "+T);if(u.length===1){const V=u.charCodeAt(0);(T==="utf8"&&V<128||T==="latin1")&&(u=V)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(d<0||this.length<d||this.length<g)throw new RangeError("Out of range index");if(g<=d)return this;d=d>>>0,g=g===void 0?this.length:g>>>0,u||(u=0);let D;if(typeof u=="number")for(D=d;D<g;++D)this[D]=u;else{const V=c.isBuffer(u)?u:c.from(u,T),lt=V.length;if(lt===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(D=0;D<g-d;++D)this[D+d]=V[D%lt]}return this};const rt={};function ht(p,u,d){rt[p]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(T){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:T,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}ht("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ht("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),ht("ERR_OUT_OF_RANGE",function(p,u,d){let g=`The value of "${p}" is out of range.`,T=d;return Number.isInteger(d)&&Math.abs(d)>2**32?T=wt(String(d)):typeof d=="bigint"&&(T=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(T=wt(T)),T+="n"),g+=` It must be ${u}. Received ${T}`,g},RangeError);function wt(p){let u="",d=p.length;const g=p[0]==="-"?1:0;for(;d>=g+4;d-=3)u=`_${p.slice(d-3,d)}${u}`;return`${p.slice(0,d)}${u}`}function Pt(p,u,d){Yt(u,"offset"),(p[u]===void 0||p[u+d]===void 0)&&Jt(u,p.length-(d+1))}function $t(p,u,d,g,T,D){if(p>d||p<u){const V=typeof u=="bigint"?"n":"";let lt;throw u===0||u===BigInt(0)?lt=`>= 0${V} and < 2${V} ** ${(D+1)*8}${V}`:lt=`>= -(2${V} ** ${(D+1)*8-1}${V}) and < 2 ** ${(D+1)*8-1}${V}`,new rt.ERR_OUT_OF_RANGE("value",lt,p)}Pt(g,T,D)}function Yt(p,u){if(typeof p!="number")throw new rt.ERR_INVALID_ARG_TYPE(u,"number",p)}function Jt(p,u,d){throw Math.floor(p)!==p?(Yt(p,d),new rt.ERR_OUT_OF_RANGE("offset","an integer",p)):u<0?new rt.ERR_BUFFER_OUT_OF_BOUNDS:new rt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,p)}const qt=/[^+/0-9A-Za-z-_]/g;function U(p){if(p=p.split("=")[0],p=p.trim().replace(qt,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function me(p,u){u=u||1/0;let d;const g=p.length;let T=null;const D=[];for(let V=0;V<g;++V){if(d=p.charCodeAt(V),d>55295&&d<57344){if(!T){if(d>56319){(u-=3)>-1&&D.push(239,191,189);continue}else if(V+1===g){(u-=3)>-1&&D.push(239,191,189);continue}T=d;continue}if(d<56320){(u-=3)>-1&&D.push(239,191,189),T=d;continue}d=(T-55296<<10|d-56320)+65536}else T&&(u-=3)>-1&&D.push(239,191,189);if(T=null,d<128){if((u-=1)<0)break;D.push(d)}else if(d<2048){if((u-=2)<0)break;D.push(d>>6|192,d&63|128)}else if(d<65536){if((u-=3)<0)break;D.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((u-=4)<0)break;D.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return D}function J(p){const u=[];for(let d=0;d<p.length;++d)u.push(p.charCodeAt(d)&255);return u}function vt(p,u){let d,g,T;const D=[];for(let V=0;V<p.length&&!((u-=2)<0);++V)d=p.charCodeAt(V),g=d>>8,T=d%256,D.push(T),D.push(g);return D}function Et(p){return e.toByteArray(U(p))}function C(p,u,d,g){let T;for(T=0;T<g&&!(T+d>=u.length||T>=p.length);++T)u[T+d]=p[T];return T}function R(p,u){return p instanceof u||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===u.name}function X(p){return p!==p}const tt=function(){const p="0123456789abcdef",u=new Array(256);for(let d=0;d<16;++d){const g=d*16;for(let T=0;T<16;++T)u[g+T]=p[d]+p[T]}return u}();function Q(p){return typeof BigInt>"u"?ct:p}function ct(){throw new Error("BigInt not supported")}})(q1);const va=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Oi=he.WebSocket||he.MozWebSocket,ep=!0,tx="arraybuffer",np=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class ex extends pa{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=np?{}:qh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ep&&!np?n?new Oi(e,n):new Oi(e):new Oi(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;ua(r,this.supportsBinary,o=>{const s={};try{ep&&this.ws.send(o)}catch{}i&&va(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Xh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Oi}}class nx extends pa{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=O1(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=C1();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;this.writer.write(r).then(()=>{i&&va(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const rx={websocket:ex,webtransport:nx,polling:W1},ix=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ox=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wa(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=ix.exec(t||""),o={},s=14;for(;s--;)o[ox[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=sx(o,o.path),o.queryKey=ax(o,o.query),o}function sx(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function ax(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let rp=class qn extends zt{constructor(e,n={}){super(),this.binaryType=tx,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=wa(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=wa(n.host).host),Pi(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=L1(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=Wh,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new rx[e](r)}open(){let e;if(this.opts.rememberUpgrade&&qn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;qn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;qn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=h=>{const m=new Error("probe error: "+h);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function a(){s("transport closed")}function l(){s("socket closed")}function f(h){n&&h.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",f)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",f),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",qn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=D1(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){qn.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}};rp.protocol=Wh;function cx(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=wa(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const lx=typeof ArrayBuffer=="function",ux=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,ip=Object.prototype.toString,fx=typeof Blob=="function"||typeof Blob<"u"&&ip.call(Blob)==="[object BlobConstructor]",dx=typeof File=="function"||typeof File<"u"&&ip.call(File)==="[object FileConstructor]";function ba(t){return lx&&(t instanceof ArrayBuffer||ux(t))||fx&&t instanceof Blob||dx&&t instanceof File}function Ii(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Ii(t[n]))return!0;return!1}if(ba(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ii(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Ii(t[n]))return!0;return!1}function hx(t){const e=[],n=t.data,r=t;return r.data=_a(n,e),r.attachments=e.length,{packet:r,buffers:e}}function _a(t,e){if(!t)return t;if(ba(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=_a(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=_a(t[r],e));return n}return t}function px(t,e){return t.data=xa(t.data,e),delete t.attachments,t}function xa(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=xa(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=xa(t[n],e));return t}const mx=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],yx=5;var yt;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(yt||(yt={}));class gx{constructor(e){this.replacer=e}encode(e){return(e.type===yt.EVENT||e.type===yt.ACK)&&Ii(e)?this.encodeAsBinary({type:e.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===yt.BINARY_EVENT||e.type===yt.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=hx(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function op(t){return Object.prototype.toString.call(t)==="[object Object]"}class Sa extends zt{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===yt.BINARY_EVENT;r||n.type===yt.BINARY_ACK?(n.type=r?yt.EVENT:yt.ACK,this.reconstructor=new vx(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(ba(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(yt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===yt.BINARY_EVENT||r.type===yt.BINARY_ACK){const o=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const s=e.substring(o,n);if(s!=Number(s)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(e.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(o,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=e.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===e.length)break}r.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){const o=this.tryParse(e.substr(n));if(Sa.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case yt.CONNECT:return op(n);case yt.DISCONNECT:return n===void 0;case yt.CONNECT_ERROR:return typeof n=="string"||op(n);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&mx.indexOf(n[0])===-1);case yt.ACK:case yt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class vx{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=px(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const wx=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sa,Encoder:gx,get PacketType(){return yt},protocol:yx},Symbol.toStringTag,{value:"Module"}));function we(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const bx=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class sp extends zt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[we(e,"open",this.onopen.bind(this)),we(e,"packet",this.onpacket.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(bx.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:yt.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:yt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case yt.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case yt.EVENT:case yt.BINARY_EVENT:this.onevent(e);break;case yt.ACK:case yt.BINARY_ACK:this.onack(e);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:yt.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:yt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function Fn(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Fn.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0},Fn.prototype.reset=function(){this.attempts=0},Fn.prototype.setMin=function(t){this.ms=t},Fn.prototype.setMax=function(t){this.max=t},Fn.prototype.setJitter=function(t){this.jitter=t};class Ea extends zt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Pi(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Fn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||wx;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new rp(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=we(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=we(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(we(e,"ping",this.onping.bind(this)),we(e,"data",this.ondata.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this)),we(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){va(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new sp(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Cr={};function Ri(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=cx(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Cr[i]&&o in Cr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new Ea(r,e):(Cr[i]||(Cr[i]=new Ea(r,e)),l=Cr[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(Ri,{Manager:Ea,Socket:sp,io:Ri,connect:Ri});function _x(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ap={exports:{}},jt=ap.exports={},Pe,ke;function Aa(){throw new Error("setTimeout has not been defined")}function Ta(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Pe=setTimeout:Pe=Aa}catch{Pe=Aa}try{typeof clearTimeout=="function"?ke=clearTimeout:ke=Ta}catch{ke=Ta}})();function cp(t){if(Pe===setTimeout)return setTimeout(t,0);if((Pe===Aa||!Pe)&&setTimeout)return Pe=setTimeout,setTimeout(t,0);try{return Pe(t,0)}catch{try{return Pe.call(null,t,0)}catch{return Pe.call(this,t,0)}}}function xx(t){if(ke===clearTimeout)return clearTimeout(t);if((ke===Ta||!ke)&&clearTimeout)return ke=clearTimeout,clearTimeout(t);try{return ke(t)}catch{try{return ke.call(null,t)}catch{return ke.call(this,t)}}}var Fe=[],Ln=!1,ln,Ni=-1;function Sx(){!Ln||!ln||(Ln=!1,ln.length?Fe=ln.concat(Fe):Ni=-1,Fe.length&&lp())}function lp(){if(!Ln){var t=cp(Sx);Ln=!0;for(var e=Fe.length;e;){for(ln=Fe,Fe=[];++Ni<e;)ln&&ln[Ni].run();Ni=-1,e=Fe.length}ln=null,Ln=!1,xx(t)}}jt.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Fe.push(new up(t,e)),Fe.length===1&&!Ln&&cp(lp)};function up(t,e){this.fun=t,this.array=e}up.prototype.run=function(){this.fun.apply(null,this.array)},jt.title="browser",jt.browser=!0,jt.env={},jt.argv=[],jt.version="",jt.versions={};function Le(){}jt.on=Le,jt.addListener=Le,jt.once=Le,jt.off=Le,jt.removeListener=Le,jt.removeAllListeners=Le,jt.emit=Le,jt.prependListener=Le,jt.prependOnceListener=Le,jt.listeners=function(t){return[]},jt.binding=function(t){throw new Error("process.binding is not supported")},jt.cwd=function(){return"/"},jt.chdir=function(t){throw new Error("process.chdir is not supported")},jt.umask=function(){return 0};var Ex=ap.exports;const Wt=_x(Ex);var un={},fp={},Pa=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0},Ax=Pa,ka=function(){return Ax()&&!!Symbol.toStringTag},dp=Object,Tx=Error,Px=EvalError,kx=RangeError,Cx=ReferenceError,hp=SyntaxError,Mi=TypeError,Ox=URIError,Ix=Math.abs,Rx=Math.floor,Nx=Math.max,Mx=Math.min,Dx=Math.pow,Bx=Object.getOwnPropertyDescriptor,Di=Bx;if(Di)try{Di([],"length")}catch{Di=null}var Or=Di,Bi=Object.defineProperty||!1;if(Bi)try{Bi({},"a",{value:1})}catch{Bi=!1}var Fi=Bi,Ca,pp;function Fx(){if(pp)return Ca;pp=1;var t=typeof Symbol<"u"&&Symbol,e=Pa;return Ca=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Ca}var Oa,mp;function Lx(){if(mp)return Oa;mp=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,r="[object Function]",i=function(l,f){for(var c=[],h=0;h<l.length;h+=1)c[h]=l[h];for(var m=0;m<f.length;m+=1)c[m+l.length]=f[m];return c},o=function(l,f){for(var c=[],h=f,m=0;h<l.length;h+=1,m+=1)c[m]=l[h];return c},s=function(a,l){for(var f="",c=0;c<a.length;c+=1)f+=a[c],c+1<a.length&&(f+=l);return f};return Oa=function(l){var f=this;if(typeof f!="function"||e.apply(f)!==r)throw new TypeError(t+f);for(var c=o(arguments,1),h,m=function(){if(this instanceof h){var x=f.apply(this,i(c,arguments));return Object(x)===x?x:this}return f.apply(l,i(c,arguments))},y=n(0,f.length-c.length),b=[],w=0;w<y;w++)b[w]="$"+w;if(h=Function("binder","return function ("+s(b,",")+"){ return binder.apply(this,arguments); }")(m),f.prototype){var P=function(){};P.prototype=f.prototype,h.prototype=new P,P.prototype=null}return h},Oa}var Ia,yp;function Ir(){if(yp)return Ia;yp=1;var t=Lx();return Ia=Function.prototype.bind||t,Ia}var Ra,gp;function Na(){return gp||(gp=1,Ra=Function.prototype.call),Ra}var Ma,vp;function Da(){return vp||(vp=1,Ma=Function.prototype.apply),Ma}var jx=typeof Reflect<"u"&&Reflect&&Reflect.apply,$x=Ir(),Vx=Da(),Ux=Na(),zx=jx,wp=zx||$x.call(Ux,Vx),Wx=Ir(),qx=Mi,Hx=Na(),Gx=wp,Ba=function(e){if(e.length<1||typeof e[0]!="function")throw new qx("a function is required");return Gx(Wx,Hx,e)},Fa,bp;function Kx(){if(bp)return Fa;bp=1;var t=Ba,e=Or,n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&e&&e(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return Fa=r&&typeof r.get=="function"?t([r.get]):typeof o=="function"?function(a){return o(a==null?a:i(a))}:!1,Fa}var La,_p;function Yx(){if(_p)return La;_p=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=Ir();return La=n.call(t,e),La}var mt,xp=dp,Xx=Tx,Jx=Px,Zx=kx,Qx=Cx,jn=hp,$n=Mi,tS=Ox,eS=Ix,nS=Rx,rS=Nx,iS=Mx,oS=Dx,Sp=Function,ja=function(t){try{return Sp('"use strict"; return ('+t+").constructor;")()}catch{}},Rr=Or,sS=Fi,$a=function(){throw new $n},aS=Rr?function(){try{return arguments.callee,$a}catch{try{return Rr(arguments,"callee").get}catch{return $a}}}():$a,Vn=Fx()(),cS=Kx(),Kt=typeof Reflect=="function"&&Reflect.getPrototypeOf||xp.getPrototypeOf||cS,Ep=Da(),Nr=Na(),Un={},lS=typeof Uint8Array>"u"||!Kt?mt:Kt(Uint8Array),fn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?mt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?mt:ArrayBuffer,"%ArrayIteratorPrototype%":Vn&&Kt?Kt([][Symbol.iterator]()):mt,"%AsyncFromSyncIteratorPrototype%":mt,"%AsyncFunction%":Un,"%AsyncGenerator%":Un,"%AsyncGeneratorFunction%":Un,"%AsyncIteratorPrototype%":Un,"%Atomics%":typeof Atomics>"u"?mt:Atomics,"%BigInt%":typeof BigInt>"u"?mt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?mt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?mt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?mt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Xx,"%eval%":eval,"%EvalError%":Jx,"%Float32Array%":typeof Float32Array>"u"?mt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?mt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?mt:FinalizationRegistry,"%Function%":Sp,"%GeneratorFunction%":Un,"%Int8Array%":typeof Int8Array>"u"?mt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?mt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?mt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Vn&&Kt?Kt(Kt([][Symbol.iterator]())):mt,"%JSON%":typeof JSON=="object"?JSON:mt,"%Map%":typeof Map>"u"?mt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Vn||!Kt?mt:Kt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":xp,"%Object.getOwnPropertyDescriptor%":Rr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?mt:Promise,"%Proxy%":typeof Proxy>"u"?mt:Proxy,"%RangeError%":Zx,"%ReferenceError%":Qx,"%Reflect%":typeof Reflect>"u"?mt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?mt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Vn||!Kt?mt:Kt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?mt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Vn&&Kt?Kt(""[Symbol.iterator]()):mt,"%Symbol%":Vn?Symbol:mt,"%SyntaxError%":jn,"%ThrowTypeError%":aS,"%TypedArray%":lS,"%TypeError%":$n,"%Uint8Array%":typeof Uint8Array>"u"?mt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?mt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?mt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?mt:Uint32Array,"%URIError%":tS,"%WeakMap%":typeof WeakMap>"u"?mt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?mt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?mt:WeakSet,"%Function.prototype.call%":Nr,"%Function.prototype.apply%":Ep,"%Object.defineProperty%":sS,"%Math.abs%":eS,"%Math.floor%":nS,"%Math.max%":rS,"%Math.min%":iS,"%Math.pow%":oS};if(Kt)try{null.error}catch(t){var uS=Kt(Kt(t));fn["%Error.prototype%"]=uS}var fS=function t(e){var n;if(e==="%AsyncFunction%")n=ja("async function () {}");else if(e==="%GeneratorFunction%")n=ja("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=ja("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Kt&&(n=Kt(i.prototype))}return fn[e]=n,n},Ap={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Mr=Ir(),Li=Yx(),dS=Mr.call(Nr,Array.prototype.concat),hS=Mr.call(Ep,Array.prototype.splice),Tp=Mr.call(Nr,String.prototype.replace),ji=Mr.call(Nr,String.prototype.slice),pS=Mr.call(Nr,RegExp.prototype.exec),mS=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,yS=/\\(\\)?/g,gS=function(e){var n=ji(e,0,1),r=ji(e,-1);if(n==="%"&&r!=="%")throw new jn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new jn("invalid intrinsic syntax, expected opening `%`");var i=[];return Tp(e,mS,function(o,s,a,l){i[i.length]=a?Tp(l,yS,"$1"):s||o}),i},vS=function(e,n){var r=e,i;if(Li(Ap,r)&&(i=Ap[r],r="%"+i[0]+"%"),Li(fn,r)){var o=fn[r];if(o===Un&&(o=fS(r)),typeof o>"u"&&!n)throw new $n("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new jn("intrinsic "+e+" does not exist!")},Va=function(e,n){if(typeof e!="string"||e.length===0)throw new $n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new $n('"allowMissing" argument must be a boolean');if(pS(/^%?[^%]*%?$/,e)===null)throw new jn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=gS(e),i=r.length>0?r[0]:"",o=vS("%"+i+"%",n),s=o.name,a=o.value,l=!1,f=o.alias;f&&(i=f[0],hS(r,dS([0,1],f)));for(var c=1,h=!0;c<r.length;c+=1){var m=r[c],y=ji(m,0,1),b=ji(m,-1);if((y==='"'||y==="'"||y==="`"||b==='"'||b==="'"||b==="`")&&y!==b)throw new jn("property names with quotes must have matching quotes");if((m==="constructor"||!h)&&(l=!0),i+="."+m,s="%"+i+"%",Li(fn,s))a=fn[s];else if(a!=null){if(!(m in a)){if(!n)throw new $n("base intrinsic for "+e+" exists, but the property is not available.");return}if(Rr&&c+1>=r.length){var w=Rr(a,m);h=!!w,h&&"get"in w&&!("originalValue"in w.get)?a=w.get:a=a[m]}else h=Li(a,m),a=a[m];h&&!l&&(fn[s]=a)}}return a},Pp=Va,kp=Ba,wS=kp([Pp("%String.prototype.indexOf%")]),Ua=function(e,n){var r=Pp(e,!!n);return typeof r=="function"&&wS(e,".prototype.")>-1?kp([r]):r},bS=ka(),_S=Ua,za=_S("Object.prototype.toString"),$i=function(e){return bS&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:za(e)==="[object Arguments]"},Cp=function(e){return $i(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&za(e)!=="[object Array]"&&"callee"in e&&za(e.callee)==="[object Function]"},xS=function(){return $i(arguments)}();$i.isLegacyArguments=Cp;var SS=xS?$i:Cp,ES=Object.prototype.toString,AS=Function.prototype.toString,TS=/^\s*(?:function)?\*/,Op=ka(),Wa=Object.getPrototypeOf,PS=function(){if(!Op)return!1;try{return Function("return function*() {}")()}catch{}},qa,kS=function(e){if(typeof e!="function")return!1;if(TS.test(AS.call(e)))return!0;if(!Op){var n=ES.call(e);return n==="[object GeneratorFunction]"}if(!Wa)return!1;if(typeof qa>"u"){var r=PS();qa=r?Wa(r):!1}return Wa(e)===qa},Ip=Function.prototype.toString,zn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ha,Vi;if(typeof zn=="function"&&typeof Object.defineProperty=="function")try{Ha=Object.defineProperty({},"length",{get:function(){throw Vi}}),Vi={},zn(function(){throw 42},null,Ha)}catch(t){t!==Vi&&(zn=null)}else zn=null;var CS=/^\s*class\b/,Ga=function(e){try{var n=Ip.call(e);return CS.test(n)}catch{return!1}},Ka=function(e){try{return Ga(e)?!1:(Ip.call(e),!0)}catch{return!1}},Ui=Object.prototype.toString,OS="[object Object]",IS="[object Function]",RS="[object GeneratorFunction]",NS="[object HTMLAllCollection]",MS="[object HTML document.all class]",DS="[object HTMLCollection]",BS=typeof Symbol=="function"&&!!Symbol.toStringTag,FS=!(0 in[,]),Ya=function(){return!1};if(typeof document=="object"){var LS=document.all;Ui.call(LS)===Ui.call(document.all)&&(Ya=function(e){if((FS||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=Ui.call(e);return(n===NS||n===MS||n===DS||n===OS)&&e("")==null}catch{}return!1})}var jS=zn?function(e){if(Ya(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{zn(e,null,Ha)}catch(n){if(n!==Vi)return!1}return!Ga(e)&&Ka(e)}:function(e){if(Ya(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(BS)return Ka(e);if(Ga(e))return!1;var n=Ui.call(e);return n!==IS&&n!==RS&&!/^\[object HTML/.test(n)?!1:Ka(e)},$S=jS,VS=Object.prototype.toString,Rp=Object.prototype.hasOwnProperty,US=function(e,n,r){for(var i=0,o=e.length;i<o;i++)Rp.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},zS=function(e,n,r){for(var i=0,o=e.length;i<o;i++)r==null?n(e.charAt(i),i,e):n.call(r,e.charAt(i),i,e)},WS=function(e,n,r){for(var i in e)Rp.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},qS=function(e,n,r){if(!$S(n))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),VS.call(e)==="[object Array]"?US(e,n,i):typeof e=="string"?zS(e,n,i):WS(e,n,i)},HS=qS,GS=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Xa=GS,KS=typeof globalThis>"u"?gr:globalThis,YS=function(){for(var e=[],n=0;n<Xa.length;n++)typeof KS[Xa[n]]=="function"&&(e[e.length]=Xa[n]);return e},Np={exports:{}},Mp=Fi,XS=hp,Wn=Mi,Dp=Or,Bp=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Wn("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Wn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Wn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Wn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Wn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Wn("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Dp&&Dp(e,n);if(Mp)Mp(e,n,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:r,writable:o===null&&l?l.writable:!o});else if(a||!i&&!o&&!s)e[n]=r;else throw new XS("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ja=Fi,Fp=function(){return!!Ja};Fp.hasArrayLengthDefineBug=function(){if(!Ja)return null;try{return Ja([],"length",{value:1}).length!==1}catch{return!0}};var Lp=Fp,JS=Va,jp=Bp,ZS=Lp(),$p=Or,Vp=Mi,QS=JS("%Math.floor%"),tE=function(e,n){if(typeof e!="function")throw new Vp("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||QS(n)!==n)throw new Vp("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&$p){var s=$p(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!r)&&(ZS?jp(e,"length",n,!0,!0):jp(e,"length",n)),e},eE=Ir(),nE=Da(),rE=wp,iE=function(){return rE(eE,nE,arguments)};(function(t){var e=tE,n=Fi,r=Ba,i=iE;t.exports=function(s){var a=r(arguments),l=s.length-(arguments.length-1);return e(a,1+(l>0?l:0),!0)},n?n(t.exports,"apply",{value:i}):t.exports.apply=i})(Np);var zi=Np.exports,Wi=HS,oE=YS,Up=zi,Za=Ua,qi=Or,sE=Za("Object.prototype.toString"),zp=ka(),Wp=typeof globalThis>"u"?gr:globalThis,Qa=oE(),tc=Za("String.prototype.slice"),ec=Object.getPrototypeOf,aE=Za("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r<e.length;r+=1)if(e[r]===n)return r;return-1},Hi={__proto__:null};zp&&qi&&ec?Wi(Qa,function(t){var e=new Wp[t];if(Symbol.toStringTag in e){var n=ec(e),r=qi(n,Symbol.toStringTag);if(!r){var i=ec(n);r=qi(i,Symbol.toStringTag)}Hi["$"+t]=Up(r.get)}}):Wi(Qa,function(t){var e=new Wp[t],n=e.slice||e.set;n&&(Hi["$"+t]=Up(n))});var cE=function(e){var n=!1;return Wi(Hi,function(r,i){if(!n)try{"$"+r(e)===i&&(n=tc(i,1))}catch{}}),n},lE=function(e){var n=!1;return Wi(Hi,function(r,i){if(!n)try{r(e),n=tc(i,1)}catch{}}),n},qp=function(e){if(!e||typeof e!="object")return!1;if(!zp){var n=tc(sE(e),8,-1);return aE(Qa,n)>-1?n:n!=="Object"?!1:lE(e)}return qi?cE(e):null},uE=qp,fE=function(e){return!!uE(e)};(function(t){var e=SS,n=kS,r=qp,i=fE;function o(U){return U.call.bind(U)}var s=typeof BigInt<"u",a=typeof Symbol<"u",l=o(Object.prototype.toString),f=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),h=o(Boolean.prototype.valueOf);if(s)var m=o(BigInt.prototype.valueOf);if(a)var y=o(Symbol.prototype.valueOf);function b(U,me){if(typeof U!="object")return!1;try{return me(U),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=n,t.isTypedArray=i;function w(U){return typeof Promise<"u"&&U instanceof Promise||U!==null&&typeof U=="object"&&typeof U.then=="function"&&typeof U.catch=="function"}t.isPromise=w;function P(U){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(U):i(U)||M(U)}t.isArrayBufferView=P;function x(U){return r(U)==="Uint8Array"}t.isUint8Array=x;function v(U){return r(U)==="Uint8ClampedArray"}t.isUint8ClampedArray=v;function E(U){return r(U)==="Uint16Array"}t.isUint16Array=E;function N(U){return r(U)==="Uint32Array"}t.isUint32Array=N;function O(U){return r(U)==="Int8Array"}t.isInt8Array=O;function j(U){return r(U)==="Int16Array"}t.isInt16Array=j;function B(U){return r(U)==="Int32Array"}t.isInt32Array=B;function F(U){return r(U)==="Float32Array"}t.isFloat32Array=F;function L(U){return r(U)==="Float64Array"}t.isFloat64Array=L;function Y(U){return r(U)==="BigInt64Array"}t.isBigInt64Array=Y;function Z(U){return r(U)==="BigUint64Array"}t.isBigUint64Array=Z;function nt(U){return l(U)==="[object Map]"}nt.working=typeof Map<"u"&&nt(new Map);function st(U){return typeof Map>"u"?!1:nt.working?nt(U):U instanceof Map}t.isMap=st;function _t(U){return l(U)==="[object Set]"}_t.working=typeof Set<"u"&&_t(new Set);function dt(U){return typeof Set>"u"?!1:_t.working?_t(U):U instanceof Set}t.isSet=dt;function It(U){return l(U)==="[object WeakMap]"}It.working=typeof WeakMap<"u"&&It(new WeakMap);function at(U){return typeof WeakMap>"u"?!1:It.working?It(U):U instanceof WeakMap}t.isWeakMap=at;function pt(U){return l(U)==="[object WeakSet]"}pt.working=typeof WeakSet<"u"&&pt(new WeakSet);function z(U){return pt(U)}t.isWeakSet=z;function H(U){return l(U)==="[object ArrayBuffer]"}H.working=typeof ArrayBuffer<"u"&&H(new ArrayBuffer);function G(U){return typeof ArrayBuffer>"u"?!1:H.working?H(U):U instanceof ArrayBuffer}t.isArrayBuffer=G;function S(U){return l(U)==="[object DataView]"}S.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&S(new DataView(new ArrayBuffer(1),0,1));function M(U){return typeof DataView>"u"?!1:S.working?S(U):U instanceof DataView}t.isDataView=M;var _=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function A(U){return l(U)==="[object SharedArrayBuffer]"}function I(U){return typeof _>"u"?!1:(typeof A.working>"u"&&(A.working=A(new _)),A.working?A(U):U instanceof _)}t.isSharedArrayBuffer=I;function W(U){return l(U)==="[object AsyncFunction]"}t.isAsyncFunction=W;function $(U){return l(U)==="[object Map Iterator]"}t.isMapIterator=$;function q(U){return l(U)==="[object Set Iterator]"}t.isSetIterator=q;function K(U){return l(U)==="[object Generator]"}t.isGeneratorObject=K;function rt(U){return l(U)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=rt;function ht(U){return b(U,f)}t.isNumberObject=ht;function wt(U){return b(U,c)}t.isStringObject=wt;function Pt(U){return b(U,h)}t.isBooleanObject=Pt;function $t(U){return s&&b(U,m)}t.isBigIntObject=$t;function Yt(U){return a&&b(U,y)}t.isSymbolObject=Yt;function Jt(U){return ht(U)||wt(U)||Pt(U)||$t(U)||Yt(U)}t.isBoxedPrimitive=Jt;function qt(U){return typeof Uint8Array<"u"&&(G(U)||I(U))}t.isAnyArrayBuffer=qt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(U){Object.defineProperty(t,U,{enumerable:!1,value:function(){throw new Error(U+" is not supported in userland")}})})})(fp);var dE=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},nc={exports:{}};typeof Object.create=="function"?nc.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:nc.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}};var hE=nc.exports;(function(t){var e=Object.getOwnPropertyDescriptors||function(M){for(var _=Object.keys(M),A={},I=0;I<_.length;I++)A[_[I]]=Object.getOwnPropertyDescriptor(M,_[I]);return A},n=/%[sdj%]/g;t.format=function(S){if(!O(S)){for(var M=[],_=0;_<arguments.length;_++)M.push(s(arguments[_]));return M.join(" ")}for(var _=1,A=arguments,I=A.length,W=String(S).replace(n,function(q){if(q==="%%")return"%";if(_>=I)return q;switch(q){case"%s":return String(A[_++]);case"%d":return Number(A[_++]);case"%j":try{return JSON.stringify(A[_++])}catch{return"[Circular]"}default:return q}}),$=A[_];_<I;$=A[++_])v($)||!L($)?W+=" "+$:W+=" "+s($);return W},t.deprecate=function(S,M){if(typeof Wt<"u"&&Wt.noDeprecation===!0)return S;if(typeof Wt>"u")return function(){return t.deprecate(S,M).apply(this,arguments)};var _=!1;function A(){if(!_){if(Wt.throwDeprecation)throw new Error(M);Wt.traceDeprecation?console.trace(M):console.error(M),_=!0}return S.apply(this,arguments)}return A};var r={},i=/^$/;if(Wt.env.NODE_DEBUG){var o=Wt.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}t.debuglog=function(S){if(S=S.toUpperCase(),!r[S])if(i.test(S)){var M=Wt.pid;r[S]=function(){var _=t.format.apply(t,arguments);console.error("%s %d: %s",S,M,_)}}else r[S]=function(){};return r[S]};function s(S,M){var _={seen:[],stylize:l};return arguments.length>=3&&(_.depth=arguments[2]),arguments.length>=4&&(_.colors=arguments[3]),x(M)?_.showHidden=M:M&&t._extend(_,M),B(_.showHidden)&&(_.showHidden=!1),B(_.depth)&&(_.depth=2),B(_.colors)&&(_.colors=!1),B(_.customInspect)&&(_.customInspect=!0),_.colors&&(_.stylize=a),c(_,S,_.depth)}t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(S,M){var _=s.styles[M];return _?"\x1B["+s.colors[_][0]+"m"+S+"\x1B["+s.colors[_][1]+"m":S}function l(S,M){return S}function f(S){var M={};return S.forEach(function(_,A){M[_]=!0}),M}function c(S,M,_){if(S.customInspect&&M&&nt(M.inspect)&&M.inspect!==t.inspect&&!(M.constructor&&M.constructor.prototype===M)){var A=M.inspect(_,S);return O(A)||(A=c(S,A,_)),A}var I=h(S,M);if(I)return I;var W=Object.keys(M),$=f(W);if(S.showHidden&&(W=Object.getOwnPropertyNames(M)),Z(M)&&(W.indexOf("message")>=0||W.indexOf("description")>=0))return m(M);if(W.length===0){if(nt(M)){var q=M.name?": "+M.name:"";return S.stylize("[Function"+q+"]","special")}if(F(M))return S.stylize(RegExp.prototype.toString.call(M),"regexp");if(Y(M))return S.stylize(Date.prototype.toString.call(M),"date");if(Z(M))return m(M)}var K="",rt=!1,ht=["{","}"];if(P(M)&&(rt=!0,ht=["[","]"]),nt(M)){var wt=M.name?": "+M.name:"";K=" [Function"+wt+"]"}if(F(M)&&(K=" "+RegExp.prototype.toString.call(M)),Y(M)&&(K=" "+Date.prototype.toUTCString.call(M)),Z(M)&&(K=" "+m(M)),W.length===0&&(!rt||M.length==0))return ht[0]+K+ht[1];if(_<0)return F(M)?S.stylize(RegExp.prototype.toString.call(M),"regexp"):S.stylize("[Object]","special");S.seen.push(M);var Pt;return rt?Pt=y(S,M,_,$,W):Pt=W.map(function($t){return b(S,M,_,$,$t,rt)}),S.seen.pop(),w(Pt,K,ht)}function h(S,M){if(B(M))return S.stylize("undefined","undefined");if(O(M)){var _="'"+JSON.stringify(M).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return S.stylize(_,"string")}if(N(M))return S.stylize(""+M,"number");if(x(M))return S.stylize(""+M,"boolean");if(v(M))return S.stylize("null","null")}function m(S){return"["+Error.prototype.toString.call(S)+"]"}function y(S,M,_,A,I){for(var W=[],$=0,q=M.length;$<q;++$)pt(M,String($))?W.push(b(S,M,_,A,String($),!0)):W.push("");return I.forEach(function(K){K.match(/^\d+$/)||W.push(b(S,M,_,A,K,!0))}),W}function b(S,M,_,A,I,W){var $,q,K;if(K=Object.getOwnPropertyDescriptor(M,I)||{value:M[I]},K.get?K.set?q=S.stylize("[Getter/Setter]","special"):q=S.stylize("[Getter]","special"):K.set&&(q=S.stylize("[Setter]","special")),pt(A,I)||($="["+I+"]"),q||(S.seen.indexOf(K.value)<0?(v(_)?q=c(S,K.value,null):q=c(S,K.value,_-1),q.indexOf(`
|
|
105
|
+
*/(function(t){const e=ki,n=ga,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=O,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;c.TYPED_ARRAY_SUPPORT=l(),!c.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const p=new o(1),u={foo:function(){return 42}};return Object.setPrototypeOf(u,o.prototype),Object.setPrototypeOf(p,u),p.foo()===42}catch{return!1}}Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}});function f(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const u=new o(p);return Object.setPrototypeOf(u,c.prototype),u}function c(p,u,d){if(typeof p=="number"){if(typeof u=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(p)}return h(p,u,d)}c.poolSize=8192;function h(p,u,d){if(typeof p=="string")return w(p,u);if(s.isView(p))return x(p);if(p==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p);if(R(p,s)||p&&R(p.buffer,s)||typeof a<"u"&&(R(p,a)||p&&R(p.buffer,a)))return v(p,u,d);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=p.valueOf&&p.valueOf();if(g!=null&&g!==p)return c.from(g,u,d);const C=E(p);if(C)return C;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return c.from(p[Symbol.toPrimitive]("string"),u,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof p)}c.from=function(p,u,d){return h(p,u,d)},Object.setPrototypeOf(c.prototype,o.prototype),Object.setPrototypeOf(c,o);function m(p){if(typeof p!="number")throw new TypeError('"size" argument must be of type number');if(p<0)throw new RangeError('The value "'+p+'" is invalid for option "size"')}function y(p,u,d){return m(p),p<=0?f(p):u!==void 0?typeof d=="string"?f(p).fill(u,d):f(p).fill(u):f(p)}c.alloc=function(p,u,d){return y(p,u,d)};function b(p){return m(p),f(p<0?0:M(p)|0)}c.allocUnsafe=function(p){return b(p)},c.allocUnsafeSlow=function(p){return b(p)};function w(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!c.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const d=j(p,u)|0;let g=f(d);const C=g.write(p,u);return C!==d&&(g=g.slice(0,C)),g}function T(p){const u=p.length<0?0:M(p.length)|0,d=f(u);for(let g=0;g<u;g+=1)d[g]=p[g]&255;return d}function x(p){if(R(p,o)){const u=new o(p);return v(u.buffer,u.byteOffset,u.byteLength)}return T(p)}function v(p,u,d){if(u<0||p.byteLength<u)throw new RangeError('"offset" is outside of buffer bounds');if(p.byteLength<u+(d||0))throw new RangeError('"length" is outside of buffer bounds');let g;return u===void 0&&d===void 0?g=new o(p):d===void 0?g=new o(p,u):g=new o(p,u,d),Object.setPrototypeOf(g,c.prototype),g}function E(p){if(c.isBuffer(p)){const u=M(p.length)|0,d=f(u);return d.length===0||p.copy(d,0,0,u),d}if(p.length!==void 0)return typeof p.length!="number"||X(p.length)?f(0):T(p);if(p.type==="Buffer"&&Array.isArray(p.data))return T(p.data)}function M(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function O(p){return+p!=p&&(p=0),c.alloc(+p)}c.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==c.prototype},c.compare=function(u,d){if(R(u,o)&&(u=c.from(u,u.offset,u.byteLength)),R(d,o)&&(d=c.from(d,d.offset,d.byteLength)),!c.isBuffer(u)||!c.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===d)return 0;let g=u.length,C=d.length;for(let D=0,$=Math.min(g,C);D<$;++D)if(u[D]!==d[D]){g=u[D],C=d[D];break}return g<C?-1:C<g?1:0},c.isEncoding=function(u){switch(String(u).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(u,d){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return c.alloc(0);let g;if(d===void 0)for(d=0,g=0;g<u.length;++g)d+=u[g].length;const C=c.allocUnsafe(d);let D=0;for(g=0;g<u.length;++g){let $=u[g];if(R($,o))D+$.length>C.length?(c.isBuffer($)||($=c.from($)),$.copy(C,D)):o.prototype.set.call(C,$,D);else if(c.isBuffer($))$.copy(C,D);else throw new TypeError('"list" argument must be an Array of Buffers');D+=$.length}return C};function j(p,u){if(c.isBuffer(p))return p.length;if(s.isView(p)||R(p,s))return p.byteLength;if(typeof p!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof p);const d=p.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&d===0)return 0;let C=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return me(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Et(p).length;default:if(C)return g?-1:me(p).length;u=(""+u).toLowerCase(),C=!0}}c.byteLength=j;function B(p,u,d){let g=!1;if((u===void 0||u<0)&&(u=0),u>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,u>>>=0,d<=u))return"";for(p||(p="utf8");;)switch(p){case"hex":return S(this,u,d);case"utf8":case"utf-8":return at(this,u,d);case"ascii":return H(this,u,d);case"latin1":case"binary":return G(this,u,d);case"base64":return It(this,u,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,u,d);default:if(g)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),g=!0}}c.prototype._isBuffer=!0;function F(p,u,d){const g=p[u];p[u]=p[d],p[d]=g}c.prototype.swap16=function(){const u=this.length;if(u%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<u;d+=2)F(this,d,d+1);return this},c.prototype.swap32=function(){const u=this.length;if(u%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<u;d+=4)F(this,d,d+3),F(this,d+1,d+2);return this},c.prototype.swap64=function(){const u=this.length;if(u%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<u;d+=8)F(this,d,d+7),F(this,d+1,d+6),F(this,d+2,d+5),F(this,d+3,d+4);return this},c.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?at(this,0,u):B.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(u){if(!c.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:c.compare(this,u)===0},c.prototype.inspect=function(){let u="";const d=t.INSPECT_MAX_BYTES;return u=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(u+=" ... "),"<Buffer "+u+">"},r&&(c.prototype[r]=c.prototype.inspect),c.prototype.compare=function(u,d,g,C,D){if(R(u,o)&&(u=c.from(u,u.offset,u.byteLength)),!c.isBuffer(u))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof u);if(d===void 0&&(d=0),g===void 0&&(g=u?u.length:0),C===void 0&&(C=0),D===void 0&&(D=this.length),d<0||g>u.length||C<0||D>this.length)throw new RangeError("out of range index");if(C>=D&&d>=g)return 0;if(C>=D)return-1;if(d>=g)return 1;if(d>>>=0,g>>>=0,C>>>=0,D>>>=0,this===u)return 0;let $=D-C,lt=g-d;const bt=Math.min($,lt),xt=this.slice(C,D),Bt=u.slice(d,g);for(let Ct=0;Ct<bt;++Ct)if(xt[Ct]!==Bt[Ct]){$=xt[Ct],lt=Bt[Ct];break}return $<lt?-1:lt<$?1:0};function L(p,u,d,g,C){if(p.length===0)return-1;if(typeof d=="string"?(g=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,X(d)&&(d=C?0:p.length-1),d<0&&(d=p.length+d),d>=p.length){if(C)return-1;d=p.length-1}else if(d<0)if(C)d=0;else return-1;if(typeof u=="string"&&(u=c.from(u,g)),c.isBuffer(u))return u.length===0?-1:Y(p,u,d,g,C);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?C?o.prototype.indexOf.call(p,u,d):o.prototype.lastIndexOf.call(p,u,d):Y(p,[u],d,g,C);throw new TypeError("val must be string, number or Buffer")}function Y(p,u,d,g,C){let D=1,$=p.length,lt=u.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(p.length<2||u.length<2)return-1;D=2,$/=2,lt/=2,d/=2}function bt(Bt,Ct){return D===1?Bt[Ct]:Bt.readUInt16BE(Ct*D)}let xt;if(C){let Bt=-1;for(xt=d;xt<$;xt++)if(bt(p,xt)===bt(u,Bt===-1?0:xt-Bt)){if(Bt===-1&&(Bt=xt),xt-Bt+1===lt)return Bt*D}else Bt!==-1&&(xt-=xt-Bt),Bt=-1}else for(d+lt>$&&(d=$-lt),xt=d;xt>=0;xt--){let Bt=!0;for(let Ct=0;Ct<lt;Ct++)if(bt(p,xt+Ct)!==bt(u,Ct)){Bt=!1;break}if(Bt)return xt}return-1}c.prototype.includes=function(u,d,g){return this.indexOf(u,d,g)!==-1},c.prototype.indexOf=function(u,d,g){return L(this,u,d,g,!0)},c.prototype.lastIndexOf=function(u,d,g){return L(this,u,d,g,!1)};function Z(p,u,d,g){d=Number(d)||0;const C=p.length-d;g?(g=Number(g),g>C&&(g=C)):g=C;const D=u.length;g>D/2&&(g=D/2);let $;for($=0;$<g;++$){const lt=parseInt(u.substr($*2,2),16);if(X(lt))return $;p[d+$]=lt}return $}function nt(p,u,d,g){return k(me(u,p.length-d),p,d,g)}function st(p,u,d,g){return k(J(u),p,d,g)}function _t(p,u,d,g){return k(Et(u),p,d,g)}function dt(p,u,d,g){return k(vt(u,p.length-d),p,d,g)}c.prototype.write=function(u,d,g,C){if(d===void 0)C="utf8",g=this.length,d=0;else if(g===void 0&&typeof d=="string")C=d,g=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(g)?(g=g>>>0,C===void 0&&(C="utf8")):(C=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const D=this.length-d;if((g===void 0||g>D)&&(g=D),u.length>0&&(g<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");C||(C="utf8");let $=!1;for(;;)switch(C){case"hex":return Z(this,u,d,g);case"utf8":case"utf-8":return nt(this,u,d,g);case"ascii":case"latin1":case"binary":return st(this,u,d,g);case"base64":return _t(this,u,d,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return dt(this,u,d,g);default:if($)throw new TypeError("Unknown encoding: "+C);C=(""+C).toLowerCase(),$=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function It(p,u,d){return u===0&&d===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(u,d))}function at(p,u,d){d=Math.min(p.length,d);const g=[];let C=u;for(;C<d;){const D=p[C];let $=null,lt=D>239?4:D>223?3:D>191?2:1;if(C+lt<=d){let bt,xt,Bt,Ct;switch(lt){case 1:D<128&&($=D);break;case 2:bt=p[C+1],(bt&192)===128&&(Ct=(D&31)<<6|bt&63,Ct>127&&($=Ct));break;case 3:bt=p[C+1],xt=p[C+2],(bt&192)===128&&(xt&192)===128&&(Ct=(D&15)<<12|(bt&63)<<6|xt&63,Ct>2047&&(Ct<55296||Ct>57343)&&($=Ct));break;case 4:bt=p[C+1],xt=p[C+2],Bt=p[C+3],(bt&192)===128&&(xt&192)===128&&(Bt&192)===128&&(Ct=(D&15)<<18|(bt&63)<<12|(xt&63)<<6|Bt&63,Ct>65535&&Ct<1114112&&($=Ct))}}$===null?($=65533,lt=1):$>65535&&($-=65536,g.push($>>>10&1023|55296),$=56320|$&1023),g.push($),C+=lt}return z(g)}const pt=4096;function z(p){const u=p.length;if(u<=pt)return String.fromCharCode.apply(String,p);let d="",g=0;for(;g<u;)d+=String.fromCharCode.apply(String,p.slice(g,g+=pt));return d}function H(p,u,d){let g="";d=Math.min(p.length,d);for(let C=u;C<d;++C)g+=String.fromCharCode(p[C]&127);return g}function G(p,u,d){let g="";d=Math.min(p.length,d);for(let C=u;C<d;++C)g+=String.fromCharCode(p[C]);return g}function S(p,u,d){const g=p.length;(!u||u<0)&&(u=0),(!d||d<0||d>g)&&(d=g);let C="";for(let D=u;D<d;++D)C+=tt[p[D]];return C}function N(p,u,d){const g=p.slice(u,d);let C="";for(let D=0;D<g.length-1;D+=2)C+=String.fromCharCode(g[D]+g[D+1]*256);return C}c.prototype.slice=function(u,d){const g=this.length;u=~~u,d=d===void 0?g:~~d,u<0?(u+=g,u<0&&(u=0)):u>g&&(u=g),d<0?(d+=g,d<0&&(d=0)):d>g&&(d=g),d<u&&(d=u);const C=this.subarray(u,d);return Object.setPrototypeOf(C,c.prototype),C};function _(p,u,d){if(p%1!==0||p<0)throw new RangeError("offset is not uint");if(p+u>d)throw new RangeError("Trying to access beyond buffer length")}c.prototype.readUintLE=c.prototype.readUIntLE=function(u,d,g){u=u>>>0,d=d>>>0,g||_(u,d,this.length);let C=this[u],D=1,$=0;for(;++$<d&&(D*=256);)C+=this[u+$]*D;return C},c.prototype.readUintBE=c.prototype.readUIntBE=function(u,d,g){u=u>>>0,d=d>>>0,g||_(u,d,this.length);let C=this[u+--d],D=1;for(;d>0&&(D*=256);)C+=this[u+--d]*D;return C},c.prototype.readUint8=c.prototype.readUInt8=function(u,d){return u=u>>>0,d||_(u,1,this.length),this[u]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(u,d){return u=u>>>0,d||_(u,2,this.length),this[u]|this[u+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(u,d){return u=u>>>0,d||_(u,2,this.length),this[u]<<8|this[u+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(u,d){return u=u>>>0,d||_(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(u,d){return u=u>>>0,d||_(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},c.prototype.readBigUInt64LE=Q(function(u){u=u>>>0,Yt(u,"offset");const d=this[u],g=this[u+7];(d===void 0||g===void 0)&&Jt(u,this.length-8);const C=d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,D=this[++u]+this[++u]*2**8+this[++u]*2**16+g*2**24;return BigInt(C)+(BigInt(D)<<BigInt(32))}),c.prototype.readBigUInt64BE=Q(function(u){u=u>>>0,Yt(u,"offset");const d=this[u],g=this[u+7];(d===void 0||g===void 0)&&Jt(u,this.length-8);const C=d*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],D=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g;return(BigInt(C)<<BigInt(32))+BigInt(D)}),c.prototype.readIntLE=function(u,d,g){u=u>>>0,d=d>>>0,g||_(u,d,this.length);let C=this[u],D=1,$=0;for(;++$<d&&(D*=256);)C+=this[u+$]*D;return D*=128,C>=D&&(C-=Math.pow(2,8*d)),C},c.prototype.readIntBE=function(u,d,g){u=u>>>0,d=d>>>0,g||_(u,d,this.length);let C=d,D=1,$=this[u+--C];for(;C>0&&(D*=256);)$+=this[u+--C]*D;return D*=128,$>=D&&($-=Math.pow(2,8*d)),$},c.prototype.readInt8=function(u,d){return u=u>>>0,d||_(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},c.prototype.readInt16LE=function(u,d){u=u>>>0,d||_(u,2,this.length);const g=this[u]|this[u+1]<<8;return g&32768?g|4294901760:g},c.prototype.readInt16BE=function(u,d){u=u>>>0,d||_(u,2,this.length);const g=this[u+1]|this[u]<<8;return g&32768?g|4294901760:g},c.prototype.readInt32LE=function(u,d){return u=u>>>0,d||_(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},c.prototype.readInt32BE=function(u,d){return u=u>>>0,d||_(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},c.prototype.readBigInt64LE=Q(function(u){u=u>>>0,Yt(u,"offset");const d=this[u],g=this[u+7];(d===void 0||g===void 0)&&Jt(u,this.length-8);const C=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(g<<24);return(BigInt(C)<<BigInt(32))+BigInt(d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),c.prototype.readBigInt64BE=Q(function(u){u=u>>>0,Yt(u,"offset");const d=this[u],g=this[u+7];(d===void 0||g===void 0)&&Jt(u,this.length-8);const C=(d<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(C)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+g)}),c.prototype.readFloatLE=function(u,d){return u=u>>>0,d||_(u,4,this.length),n.read(this,u,!0,23,4)},c.prototype.readFloatBE=function(u,d){return u=u>>>0,d||_(u,4,this.length),n.read(this,u,!1,23,4)},c.prototype.readDoubleLE=function(u,d){return u=u>>>0,d||_(u,8,this.length),n.read(this,u,!0,52,8)},c.prototype.readDoubleBE=function(u,d){return u=u>>>0,d||_(u,8,this.length),n.read(this,u,!1,52,8)};function A(p,u,d,g,C,D){if(!c.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>C||u<D)throw new RangeError('"value" argument is out of bounds');if(d+g>p.length)throw new RangeError("Index out of range")}c.prototype.writeUintLE=c.prototype.writeUIntLE=function(u,d,g,C){if(u=+u,d=d>>>0,g=g>>>0,!C){const lt=Math.pow(2,8*g)-1;A(this,u,d,g,lt,0)}let D=1,$=0;for(this[d]=u&255;++$<g&&(D*=256);)this[d+$]=u/D&255;return d+g},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(u,d,g,C){if(u=+u,d=d>>>0,g=g>>>0,!C){const lt=Math.pow(2,8*g)-1;A(this,u,d,g,lt,0)}let D=g-1,$=1;for(this[d+D]=u&255;--D>=0&&($*=256);)this[d+D]=u/$&255;return d+g},c.prototype.writeUint8=c.prototype.writeUInt8=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,1,255,0),this[d]=u&255,d+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,2,65535,0),this[d]=u&255,this[d+1]=u>>>8,d+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,2,65535,0),this[d]=u>>>8,this[d+1]=u&255,d+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,4,4294967295,0),this[d+3]=u>>>24,this[d+2]=u>>>16,this[d+1]=u>>>8,this[d]=u&255,d+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,4,4294967295,0),this[d]=u>>>24,this[d+1]=u>>>16,this[d+2]=u>>>8,this[d+3]=u&255,d+4};function I(p,u,d,g,C){Vt(u,g,C,p,d,7);let D=Number(u&BigInt(4294967295));p[d++]=D,D=D>>8,p[d++]=D,D=D>>8,p[d++]=D,D=D>>8,p[d++]=D;let $=Number(u>>BigInt(32)&BigInt(4294967295));return p[d++]=$,$=$>>8,p[d++]=$,$=$>>8,p[d++]=$,$=$>>8,p[d++]=$,d}function W(p,u,d,g,C){Vt(u,g,C,p,d,7);let D=Number(u&BigInt(4294967295));p[d+7]=D,D=D>>8,p[d+6]=D,D=D>>8,p[d+5]=D,D=D>>8,p[d+4]=D;let $=Number(u>>BigInt(32)&BigInt(4294967295));return p[d+3]=$,$=$>>8,p[d+2]=$,$=$>>8,p[d+1]=$,$=$>>8,p[d]=$,d+8}c.prototype.writeBigUInt64LE=Q(function(u,d=0){return I(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(u,d=0){return W(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(u,d,g,C){if(u=+u,d=d>>>0,!C){const bt=Math.pow(2,8*g-1);A(this,u,d,g,bt-1,-bt)}let D=0,$=1,lt=0;for(this[d]=u&255;++D<g&&($*=256);)u<0&<===0&&this[d+D-1]!==0&&(lt=1),this[d+D]=(u/$>>0)-lt&255;return d+g},c.prototype.writeIntBE=function(u,d,g,C){if(u=+u,d=d>>>0,!C){const bt=Math.pow(2,8*g-1);A(this,u,d,g,bt-1,-bt)}let D=g-1,$=1,lt=0;for(this[d+D]=u&255;--D>=0&&($*=256);)u<0&<===0&&this[d+D+1]!==0&&(lt=1),this[d+D]=(u/$>>0)-lt&255;return d+g},c.prototype.writeInt8=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,1,127,-128),u<0&&(u=255+u+1),this[d]=u&255,d+1},c.prototype.writeInt16LE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,2,32767,-32768),this[d]=u&255,this[d+1]=u>>>8,d+2},c.prototype.writeInt16BE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,2,32767,-32768),this[d]=u>>>8,this[d+1]=u&255,d+2},c.prototype.writeInt32LE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,4,2147483647,-2147483648),this[d]=u&255,this[d+1]=u>>>8,this[d+2]=u>>>16,this[d+3]=u>>>24,d+4},c.prototype.writeInt32BE=function(u,d,g){return u=+u,d=d>>>0,g||A(this,u,d,4,2147483647,-2147483648),u<0&&(u=4294967295+u+1),this[d]=u>>>24,this[d+1]=u>>>16,this[d+2]=u>>>8,this[d+3]=u&255,d+4},c.prototype.writeBigInt64LE=Q(function(u,d=0){return I(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(u,d=0){return W(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function V(p,u,d,g,C,D){if(d+g>p.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function q(p,u,d,g,C){return u=+u,d=d>>>0,C||V(p,u,d,4),n.write(p,u,d,g,23,4),d+4}c.prototype.writeFloatLE=function(u,d,g){return q(this,u,d,!0,g)},c.prototype.writeFloatBE=function(u,d,g){return q(this,u,d,!1,g)};function K(p,u,d,g,C){return u=+u,d=d>>>0,C||V(p,u,d,8),n.write(p,u,d,g,52,8),d+8}c.prototype.writeDoubleLE=function(u,d,g){return K(this,u,d,!0,g)},c.prototype.writeDoubleBE=function(u,d,g){return K(this,u,d,!1,g)},c.prototype.copy=function(u,d,g,C){if(!c.isBuffer(u))throw new TypeError("argument should be a Buffer");if(g||(g=0),!C&&C!==0&&(C=this.length),d>=u.length&&(d=u.length),d||(d=0),C>0&&C<g&&(C=g),C===g||u.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(C<0)throw new RangeError("sourceEnd out of bounds");C>this.length&&(C=this.length),u.length-d<C-g&&(C=u.length-d+g);const D=C-g;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,g,C):o.prototype.set.call(u,this.subarray(g,C),d),D},c.prototype.fill=function(u,d,g,C){if(typeof u=="string"){if(typeof d=="string"?(C=d,d=0,g=this.length):typeof g=="string"&&(C=g,g=this.length),C!==void 0&&typeof C!="string")throw new TypeError("encoding must be a string");if(typeof C=="string"&&!c.isEncoding(C))throw new TypeError("Unknown encoding: "+C);if(u.length===1){const $=u.charCodeAt(0);(C==="utf8"&&$<128||C==="latin1")&&(u=$)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(d<0||this.length<d||this.length<g)throw new RangeError("Out of range index");if(g<=d)return this;d=d>>>0,g=g===void 0?this.length:g>>>0,u||(u=0);let D;if(typeof u=="number")for(D=d;D<g;++D)this[D]=u;else{const $=c.isBuffer(u)?u:c.from(u,C),lt=$.length;if(lt===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(D=0;D<g-d;++D)this[D+d]=$[D%lt]}return this};const rt={};function ht(p,u,d){rt[p]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:u.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${p}]`,this.stack,delete this.name}get code(){return p}set code(C){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:C,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}ht("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ht("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),ht("ERR_OUT_OF_RANGE",function(p,u,d){let g=`The value of "${p}" is out of range.`,C=d;return Number.isInteger(d)&&Math.abs(d)>2**32?C=wt(String(d)):typeof d=="bigint"&&(C=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(C=wt(C)),C+="n"),g+=` It must be ${u}. Received ${C}`,g},RangeError);function wt(p){let u="",d=p.length;const g=p[0]==="-"?1:0;for(;d>=g+4;d-=3)u=`_${p.slice(d-3,d)}${u}`;return`${p.slice(0,d)}${u}`}function Tt(p,u,d){Yt(u,"offset"),(p[u]===void 0||p[u+d]===void 0)&&Jt(u,p.length-(d+1))}function Vt(p,u,d,g,C,D){if(p>d||p<u){const $=typeof u=="bigint"?"n":"";let lt;throw u===0||u===BigInt(0)?lt=`>= 0${$} and < 2${$} ** ${(D+1)*8}${$}`:lt=`>= -(2${$} ** ${(D+1)*8-1}${$}) and < 2 ** ${(D+1)*8-1}${$}`,new rt.ERR_OUT_OF_RANGE("value",lt,p)}Tt(g,C,D)}function Yt(p,u){if(typeof p!="number")throw new rt.ERR_INVALID_ARG_TYPE(u,"number",p)}function Jt(p,u,d){throw Math.floor(p)!==p?(Yt(p,d),new rt.ERR_OUT_OF_RANGE("offset","an integer",p)):u<0?new rt.ERR_BUFFER_OUT_OF_BOUNDS:new rt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,p)}const qt=/[^+/0-9A-Za-z-_]/g;function U(p){if(p=p.split("=")[0],p=p.trim().replace(qt,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function me(p,u){u=u||1/0;let d;const g=p.length;let C=null;const D=[];for(let $=0;$<g;++$){if(d=p.charCodeAt($),d>55295&&d<57344){if(!C){if(d>56319){(u-=3)>-1&&D.push(239,191,189);continue}else if($+1===g){(u-=3)>-1&&D.push(239,191,189);continue}C=d;continue}if(d<56320){(u-=3)>-1&&D.push(239,191,189),C=d;continue}d=(C-55296<<10|d-56320)+65536}else C&&(u-=3)>-1&&D.push(239,191,189);if(C=null,d<128){if((u-=1)<0)break;D.push(d)}else if(d<2048){if((u-=2)<0)break;D.push(d>>6|192,d&63|128)}else if(d<65536){if((u-=3)<0)break;D.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((u-=4)<0)break;D.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return D}function J(p){const u=[];for(let d=0;d<p.length;++d)u.push(p.charCodeAt(d)&255);return u}function vt(p,u){let d,g,C;const D=[];for(let $=0;$<p.length&&!((u-=2)<0);++$)d=p.charCodeAt($),g=d>>8,C=d%256,D.push(C),D.push(g);return D}function Et(p){return e.toByteArray(U(p))}function k(p,u,d,g){let C;for(C=0;C<g&&!(C+d>=u.length||C>=p.length);++C)u[C+d]=p[C];return C}function R(p,u){return p instanceof u||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===u.name}function X(p){return p!==p}const tt=function(){const p="0123456789abcdef",u=new Array(256);for(let d=0;d<16;++d){const g=d*16;for(let C=0;C<16;++C)u[g+C]=p[d]+p[C]}return u}();function Q(p){return typeof BigInt>"u"?ct:p}function ct(){throw new Error("BigInt not supported")}})(H_);const va=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Oi=he.WebSocket||he.MozWebSocket,ep=!0,e2="arraybuffer",np=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class n2 extends pa{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=np?{}:qh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ep&&!np?n?new Oi(e,n):new Oi(e):new Oi(e,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;ua(r,this.supportsBinary,o=>{const s={};try{ep&&this.ws.send(o)}catch{}i&&va(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Xh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Oi}}class r2 extends pa{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const n=I_(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=O_();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),o())}).catch(a=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this.writer.write(s).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let n=0;n<e.length;n++){const r=e[n],i=n===e.length-1;this.writer.write(r).then(()=>{i&&va(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const i2={websocket:n2,webtransport:r2,polling:q_},o2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,s2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function wa(t){if(t.length>2e3)throw"URI too long";const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let i=o2.exec(t||""),o={},s=14;for(;s--;)o[s2[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=a2(o,o.path),o.queryKey=c2(o,o.query),o}function a2(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function c2(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let rp=class qn extends zt{constructor(e,n={}){super(),this.binaryType=e2,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=wa(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=wa(n.host).host),Ti(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=j_(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const n=Object.assign({},this.opts.query);n.EIO=Wh,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new i2[e](r)}open(){let e;if(this.opts.rememberUpgrade&&qn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(e){let n=this.createTransport(e),r=!1;qn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",h=>{if(!r)if(h.type==="pong"&&h.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;qn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,c(),n.close(),n=null)}const s=h=>{const m=new Error("probe error: "+h);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function a(){s("transport closed")}function l(){s("socket closed")}function f(h){n&&h.name!==n.name&&o()}const c=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",f)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",f),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",qn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e<n;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=e.data,this.onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=B_(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:e,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}onError(e){qn.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const i=e.length;for(;r<i;r++)~this.transports.indexOf(e[r])&&n.push(e[r]);return n}};rp.protocol=Wh;function l2(t,e="",n){let r=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),r=wa(t)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+e,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const u2=typeof ArrayBuffer=="function",f2=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,ip=Object.prototype.toString,d2=typeof Blob=="function"||typeof Blob<"u"&&ip.call(Blob)==="[object BlobConstructor]",h2=typeof File=="function"||typeof File<"u"&&ip.call(File)==="[object FileConstructor]";function ba(t){return u2&&(t instanceof ArrayBuffer||f2(t))||d2&&t instanceof Blob||h2&&t instanceof File}function Ii(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(Ii(t[n]))return!0;return!1}if(ba(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ii(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&Ii(t[n]))return!0;return!1}function p2(t){const e=[],n=t.data,r=t;return r.data=_a(n,e),r.attachments=e.length,{packet:r,buffers:e}}function _a(t,e){if(!t)return t;if(ba(t)){const n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=_a(t[r],e);return n}else if(typeof t=="object"&&!(t instanceof Date)){const n={};for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=_a(t[r],e));return n}return t}function m2(t,e){return t.data=xa(t.data,e),delete t.attachments,t}function xa(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let n=0;n<t.length;n++)t[n]=xa(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=xa(t[n],e));return t}const y2=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],g2=5;var yt;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(yt||(yt={}));class v2{constructor(e){this.replacer=e}encode(e){return(e.type===yt.EVENT||e.type===yt.ACK)&&Ii(e)?this.encodeAsBinary({type:e.type===yt.EVENT?yt.BINARY_EVENT:yt.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===yt.BINARY_EVENT||e.type===yt.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){const n=p2(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function op(t){return Object.prototype.toString.call(t)==="[object Object]"}class Sa extends zt{constructor(e){super(),this.reviver=e}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);const r=n.type===yt.BINARY_EVENT;r||n.type===yt.BINARY_ACK?(n.type=r?yt.EVENT:yt.ACK,this.reconstructor=new w2(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(ba(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0;const r={type:Number(e.charAt(0))};if(yt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===yt.BINARY_EVENT||r.type===yt.BINARY_ACK){const o=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);const s=e.substring(o,n);if(s!=Number(s)||e.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(e.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););r.nsp=e.substring(o,n)}else r.nsp="/";const i=e.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=e.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===e.length)break}r.id=Number(e.substring(o,n+1))}if(e.charAt(++n)){const o=this.tryParse(e.substr(n));if(Sa.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case yt.CONNECT:return op(n);case yt.DISCONNECT:return n===void 0;case yt.CONNECT_ERROR:return typeof n=="string"||op(n);case yt.EVENT:case yt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&y2.indexOf(n[0])===-1);case yt.ACK:case yt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class w2{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const n=m2(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const b2=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sa,Encoder:v2,get PacketType(){return yt},protocol:g2},Symbol.toStringTag,{value:"Module"}));function we(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const _2=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class sp extends zt{constructor(e,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[we(e,"open",this.onopen.bind(this)),we(e,"packet",this.onpacket.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){if(_2.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:yt.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const s=this.ids++,a=n.pop();this._registerAckCallback(s,a),r.id=s}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(e,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[e]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},i),s=(...a)=>{this.io.clearTimeoutFn(o),n.apply(this,a)};s.withError=!0,this.acks[e]=s}emitWithAck(e,...n){return new Promise((r,i)=>{const o=(s,a)=>s?i(s):r(a);o.withError=!0,n.push(o),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...o)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:yt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(r=>String(r.id)===e)){const r=this.acks[e];delete this.acks[e],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case yt.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case yt.EVENT:case yt.BINARY_EVENT:this.onevent(e);break;case yt.ACK:case yt.BINARY_ACK:this.onack(e);break;case yt.DISCONNECT:this.ondisconnect();break;case yt.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:yt.ACK,id:e,data:i}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:yt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(e===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,e.data)}}}function Fn(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}Fn.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0},Fn.prototype.reset=function(){this.attempts=0},Fn.prototype.setMin=function(t){this.ms=t},Fn.prototype.setMax=function(t){this.max=t},Fn.prototype.setJitter=function(t){this.jitter=t};class Ea extends zt{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Ti(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Fn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const i=n.parser||b2;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new rp(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=we(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=we(n,"error",o);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(i),this.subs.push(s),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(we(e,"ping",this.onping.bind(this)),we(e,"data",this.ondata.bind(this)),we(e,"error",this.onerror.bind(this)),we(e,"close",this.onclose.bind(this)),we(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){va(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new sp(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;r<n.length;r++)this.engine.write(n[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const kr={};function Ri(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=l2(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=kr[i]&&o in kr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new Ea(r,e):(kr[i]||(kr[i]=new Ea(r,e)),l=kr[i]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(Ri,{Manager:Ea,Socket:sp,io:Ri,connect:Ri});function x2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ap={exports:{}},jt=ap.exports={},Te,Pe;function Aa(){throw new Error("setTimeout has not been defined")}function Ca(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Te=setTimeout:Te=Aa}catch{Te=Aa}try{typeof clearTimeout=="function"?Pe=clearTimeout:Pe=Ca}catch{Pe=Ca}})();function cp(t){if(Te===setTimeout)return setTimeout(t,0);if((Te===Aa||!Te)&&setTimeout)return Te=setTimeout,setTimeout(t,0);try{return Te(t,0)}catch{try{return Te.call(null,t,0)}catch{return Te.call(this,t,0)}}}function S2(t){if(Pe===clearTimeout)return clearTimeout(t);if((Pe===Ca||!Pe)&&clearTimeout)return Pe=clearTimeout,clearTimeout(t);try{return Pe(t)}catch{try{return Pe.call(null,t)}catch{return Pe.call(this,t)}}}var Fe=[],Ln=!1,ln,Mi=-1;function E2(){!Ln||!ln||(Ln=!1,ln.length?Fe=ln.concat(Fe):Mi=-1,Fe.length&&lp())}function lp(){if(!Ln){var t=cp(E2);Ln=!0;for(var e=Fe.length;e;){for(ln=Fe,Fe=[];++Mi<e;)ln&&ln[Mi].run();Mi=-1,e=Fe.length}ln=null,Ln=!1,S2(t)}}jt.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];Fe.push(new up(t,e)),Fe.length===1&&!Ln&&cp(lp)};function up(t,e){this.fun=t,this.array=e}up.prototype.run=function(){this.fun.apply(null,this.array)},jt.title="browser",jt.browser=!0,jt.env={},jt.argv=[],jt.version="",jt.versions={};function Le(){}jt.on=Le,jt.addListener=Le,jt.once=Le,jt.off=Le,jt.removeListener=Le,jt.removeAllListeners=Le,jt.emit=Le,jt.prependListener=Le,jt.prependOnceListener=Le,jt.listeners=function(t){return[]},jt.binding=function(t){throw new Error("process.binding is not supported")},jt.cwd=function(){return"/"},jt.chdir=function(t){throw new Error("process.chdir is not supported")},jt.umask=function(){return 0};var A2=ap.exports;const Wt=x2(A2);var un={},fp={},Ta=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;e[n]=i;for(var o in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==n||!Object.prototype.propertyIsEnumerable.call(e,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(e,n);if(a.value!==i||a.enumerable!==!0)return!1}return!0},C2=Ta,Pa=function(){return C2()&&!!Symbol.toStringTag},dp=Object,T2=Error,P2=EvalError,k2=RangeError,O2=ReferenceError,hp=SyntaxError,Ni=TypeError,I2=URIError,R2=Math.abs,M2=Math.floor,N2=Math.max,D2=Math.min,B2=Math.pow,F2=Object.getOwnPropertyDescriptor,Di=F2;if(Di)try{Di([],"length")}catch{Di=null}var Or=Di,Bi=Object.defineProperty||!1;if(Bi)try{Bi({},"a",{value:1})}catch{Bi=!1}var Fi=Bi,ka,pp;function L2(){if(pp)return ka;pp=1;var t=typeof Symbol<"u"&&Symbol,e=Ta;return ka=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},ka}var Oa,mp;function j2(){if(mp)return Oa;mp=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,n=Math.max,r="[object Function]",i=function(l,f){for(var c=[],h=0;h<l.length;h+=1)c[h]=l[h];for(var m=0;m<f.length;m+=1)c[m+l.length]=f[m];return c},o=function(l,f){for(var c=[],h=f,m=0;h<l.length;h+=1,m+=1)c[m]=l[h];return c},s=function(a,l){for(var f="",c=0;c<a.length;c+=1)f+=a[c],c+1<a.length&&(f+=l);return f};return Oa=function(l){var f=this;if(typeof f!="function"||e.apply(f)!==r)throw new TypeError(t+f);for(var c=o(arguments,1),h,m=function(){if(this instanceof h){var x=f.apply(this,i(c,arguments));return Object(x)===x?x:this}return f.apply(l,i(c,arguments))},y=n(0,f.length-c.length),b=[],w=0;w<y;w++)b[w]="$"+w;if(h=Function("binder","return function ("+s(b,",")+"){ return binder.apply(this,arguments); }")(m),f.prototype){var T=function(){};T.prototype=f.prototype,h.prototype=new T,T.prototype=null}return h},Oa}var Ia,yp;function Ir(){if(yp)return Ia;yp=1;var t=j2();return Ia=Function.prototype.bind||t,Ia}var Ra,gp;function Ma(){return gp||(gp=1,Ra=Function.prototype.call),Ra}var Na,vp;function Da(){return vp||(vp=1,Na=Function.prototype.apply),Na}var V2=typeof Reflect<"u"&&Reflect&&Reflect.apply,$2=Ir(),U2=Da(),z2=Ma(),W2=V2,wp=W2||$2.call(z2,U2),q2=Ir(),H2=Ni,G2=Ma(),K2=wp,Ba=function(e){if(e.length<1||typeof e[0]!="function")throw new H2("a function is required");return K2(q2,G2,e)},Fa,bp;function Y2(){if(bp)return Fa;bp=1;var t=Ba,e=Or,n;try{n=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var r=!!n&&e&&e(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return Fa=r&&typeof r.get=="function"?t([r.get]):typeof o=="function"?function(a){return o(a==null?a:i(a))}:!1,Fa}var La,_p;function X2(){if(_p)return La;_p=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,n=Ir();return La=n.call(t,e),La}var mt,xp=dp,J2=T2,Z2=P2,Q2=k2,tx=O2,jn=hp,Vn=Ni,ex=I2,nx=R2,rx=M2,ix=N2,ox=D2,sx=B2,Sp=Function,ja=function(t){try{return Sp('"use strict"; return ('+t+").constructor;")()}catch{}},Rr=Or,ax=Fi,Va=function(){throw new Vn},cx=Rr?function(){try{return arguments.callee,Va}catch{try{return Rr(arguments,"callee").get}catch{return Va}}}():Va,$n=L2()(),lx=Y2(),Kt=typeof Reflect=="function"&&Reflect.getPrototypeOf||xp.getPrototypeOf||lx,Ep=Da(),Mr=Ma(),Un={},ux=typeof Uint8Array>"u"||!Kt?mt:Kt(Uint8Array),fn={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?mt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?mt:ArrayBuffer,"%ArrayIteratorPrototype%":$n&&Kt?Kt([][Symbol.iterator]()):mt,"%AsyncFromSyncIteratorPrototype%":mt,"%AsyncFunction%":Un,"%AsyncGenerator%":Un,"%AsyncGeneratorFunction%":Un,"%AsyncIteratorPrototype%":Un,"%Atomics%":typeof Atomics>"u"?mt:Atomics,"%BigInt%":typeof BigInt>"u"?mt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?mt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?mt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?mt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":J2,"%eval%":eval,"%EvalError%":Z2,"%Float32Array%":typeof Float32Array>"u"?mt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?mt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?mt:FinalizationRegistry,"%Function%":Sp,"%GeneratorFunction%":Un,"%Int8Array%":typeof Int8Array>"u"?mt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?mt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?mt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$n&&Kt?Kt(Kt([][Symbol.iterator]())):mt,"%JSON%":typeof JSON=="object"?JSON:mt,"%Map%":typeof Map>"u"?mt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$n||!Kt?mt:Kt(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":xp,"%Object.getOwnPropertyDescriptor%":Rr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?mt:Promise,"%Proxy%":typeof Proxy>"u"?mt:Proxy,"%RangeError%":Q2,"%ReferenceError%":tx,"%Reflect%":typeof Reflect>"u"?mt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?mt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$n||!Kt?mt:Kt(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?mt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$n&&Kt?Kt(""[Symbol.iterator]()):mt,"%Symbol%":$n?Symbol:mt,"%SyntaxError%":jn,"%ThrowTypeError%":cx,"%TypedArray%":ux,"%TypeError%":Vn,"%Uint8Array%":typeof Uint8Array>"u"?mt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?mt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?mt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?mt:Uint32Array,"%URIError%":ex,"%WeakMap%":typeof WeakMap>"u"?mt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?mt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?mt:WeakSet,"%Function.prototype.call%":Mr,"%Function.prototype.apply%":Ep,"%Object.defineProperty%":ax,"%Math.abs%":nx,"%Math.floor%":rx,"%Math.max%":ix,"%Math.min%":ox,"%Math.pow%":sx};if(Kt)try{null.error}catch(t){var fx=Kt(Kt(t));fn["%Error.prototype%"]=fx}var dx=function t(e){var n;if(e==="%AsyncFunction%")n=ja("async function () {}");else if(e==="%GeneratorFunction%")n=ja("function* () {}");else if(e==="%AsyncGeneratorFunction%")n=ja("async function* () {}");else if(e==="%AsyncGenerator%"){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&Kt&&(n=Kt(i.prototype))}return fn[e]=n,n},Ap={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Nr=Ir(),Li=X2(),hx=Nr.call(Mr,Array.prototype.concat),px=Nr.call(Ep,Array.prototype.splice),Cp=Nr.call(Mr,String.prototype.replace),ji=Nr.call(Mr,String.prototype.slice),mx=Nr.call(Mr,RegExp.prototype.exec),yx=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,gx=/\\(\\)?/g,vx=function(e){var n=ji(e,0,1),r=ji(e,-1);if(n==="%"&&r!=="%")throw new jn("invalid intrinsic syntax, expected closing `%`");if(r==="%"&&n!=="%")throw new jn("invalid intrinsic syntax, expected opening `%`");var i=[];return Cp(e,yx,function(o,s,a,l){i[i.length]=a?Cp(l,gx,"$1"):s||o}),i},wx=function(e,n){var r=e,i;if(Li(Ap,r)&&(i=Ap[r],r="%"+i[0]+"%"),Li(fn,r)){var o=fn[r];if(o===Un&&(o=dx(r)),typeof o>"u"&&!n)throw new Vn("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:r,value:o}}throw new jn("intrinsic "+e+" does not exist!")},$a=function(e,n){if(typeof e!="string"||e.length===0)throw new Vn("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof n!="boolean")throw new Vn('"allowMissing" argument must be a boolean');if(mx(/^%?[^%]*%?$/,e)===null)throw new jn("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=vx(e),i=r.length>0?r[0]:"",o=wx("%"+i+"%",n),s=o.name,a=o.value,l=!1,f=o.alias;f&&(i=f[0],px(r,hx([0,1],f)));for(var c=1,h=!0;c<r.length;c+=1){var m=r[c],y=ji(m,0,1),b=ji(m,-1);if((y==='"'||y==="'"||y==="`"||b==='"'||b==="'"||b==="`")&&y!==b)throw new jn("property names with quotes must have matching quotes");if((m==="constructor"||!h)&&(l=!0),i+="."+m,s="%"+i+"%",Li(fn,s))a=fn[s];else if(a!=null){if(!(m in a)){if(!n)throw new Vn("base intrinsic for "+e+" exists, but the property is not available.");return}if(Rr&&c+1>=r.length){var w=Rr(a,m);h=!!w,h&&"get"in w&&!("originalValue"in w.get)?a=w.get:a=a[m]}else h=Li(a,m),a=a[m];h&&!l&&(fn[s]=a)}}return a},Tp=$a,Pp=Ba,bx=Pp([Tp("%String.prototype.indexOf%")]),Ua=function(e,n){var r=Tp(e,!!n);return typeof r=="function"&&bx(e,".prototype.")>-1?Pp([r]):r},_x=Pa(),xx=Ua,za=xx("Object.prototype.toString"),Vi=function(e){return _x&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:za(e)==="[object Arguments]"},kp=function(e){return Vi(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&za(e)!=="[object Array]"&&"callee"in e&&za(e.callee)==="[object Function]"},Sx=function(){return Vi(arguments)}();Vi.isLegacyArguments=kp;var Ex=Sx?Vi:kp,Ax=Object.prototype.toString,Cx=Function.prototype.toString,Tx=/^\s*(?:function)?\*/,Op=Pa(),Wa=Object.getPrototypeOf,Px=function(){if(!Op)return!1;try{return Function("return function*() {}")()}catch{}},qa,kx=function(e){if(typeof e!="function")return!1;if(Tx.test(Cx.call(e)))return!0;if(!Op){var n=Ax.call(e);return n==="[object GeneratorFunction]"}if(!Wa)return!1;if(typeof qa>"u"){var r=Px();qa=r?Wa(r):!1}return Wa(e)===qa},Ip=Function.prototype.toString,zn=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ha,$i;if(typeof zn=="function"&&typeof Object.defineProperty=="function")try{Ha=Object.defineProperty({},"length",{get:function(){throw $i}}),$i={},zn(function(){throw 42},null,Ha)}catch(t){t!==$i&&(zn=null)}else zn=null;var Ox=/^\s*class\b/,Ga=function(e){try{var n=Ip.call(e);return Ox.test(n)}catch{return!1}},Ka=function(e){try{return Ga(e)?!1:(Ip.call(e),!0)}catch{return!1}},Ui=Object.prototype.toString,Ix="[object Object]",Rx="[object Function]",Mx="[object GeneratorFunction]",Nx="[object HTMLAllCollection]",Dx="[object HTML document.all class]",Bx="[object HTMLCollection]",Fx=typeof Symbol=="function"&&!!Symbol.toStringTag,Lx=!(0 in[,]),Ya=function(){return!1};if(typeof document=="object"){var jx=document.all;Ui.call(jx)===Ui.call(document.all)&&(Ya=function(e){if((Lx||!e)&&(typeof e>"u"||typeof e=="object"))try{var n=Ui.call(e);return(n===Nx||n===Dx||n===Bx||n===Ix)&&e("")==null}catch{}return!1})}var Vx=zn?function(e){if(Ya(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{zn(e,null,Ha)}catch(n){if(n!==$i)return!1}return!Ga(e)&&Ka(e)}:function(e){if(Ya(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(Fx)return Ka(e);if(Ga(e))return!1;var n=Ui.call(e);return n!==Rx&&n!==Mx&&!/^\[object HTML/.test(n)?!1:Ka(e)},$x=Vx,Ux=Object.prototype.toString,Rp=Object.prototype.hasOwnProperty,zx=function(e,n,r){for(var i=0,o=e.length;i<o;i++)Rp.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},Wx=function(e,n,r){for(var i=0,o=e.length;i<o;i++)r==null?n(e.charAt(i),i,e):n.call(r,e.charAt(i),i,e)},qx=function(e,n,r){for(var i in e)Rp.call(e,i)&&(r==null?n(e[i],i,e):n.call(r,e[i],i,e))},Hx=function(e,n,r){if(!$x(n))throw new TypeError("iterator must be a function");var i;arguments.length>=3&&(i=r),Ux.call(e)==="[object Array]"?zx(e,n,i):typeof e=="string"?Wx(e,n,i):qx(e,n,i)},Gx=Hx,Kx=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"],Xa=Kx,Yx=typeof globalThis>"u"?gr:globalThis,Xx=function(){for(var e=[],n=0;n<Xa.length;n++)typeof Yx[Xa[n]]=="function"&&(e[e.length]=Xa[n]);return e},Mp={exports:{}},Np=Fi,Jx=hp,Wn=Ni,Dp=Or,Bp=function(e,n,r){if(!e||typeof e!="object"&&typeof e!="function")throw new Wn("`obj` must be an object or a function`");if(typeof n!="string"&&typeof n!="symbol")throw new Wn("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Wn("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Wn("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Wn("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Wn("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,a=arguments.length>6?arguments[6]:!1,l=!!Dp&&Dp(e,n);if(Np)Np(e,n,{configurable:s===null&&l?l.configurable:!s,enumerable:i===null&&l?l.enumerable:!i,value:r,writable:o===null&&l?l.writable:!o});else if(a||!i&&!o&&!s)e[n]=r;else throw new Jx("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Ja=Fi,Fp=function(){return!!Ja};Fp.hasArrayLengthDefineBug=function(){if(!Ja)return null;try{return Ja([],"length",{value:1}).length!==1}catch{return!0}};var Lp=Fp,Zx=$a,jp=Bp,Qx=Lp(),Vp=Or,$p=Ni,t3=Zx("%Math.floor%"),e3=function(e,n){if(typeof e!="function")throw new $p("`fn` is not a function");if(typeof n!="number"||n<0||n>4294967295||t3(n)!==n)throw new $p("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],i=!0,o=!0;if("length"in e&&Vp){var s=Vp(e,"length");s&&!s.configurable&&(i=!1),s&&!s.writable&&(o=!1)}return(i||o||!r)&&(Qx?jp(e,"length",n,!0,!0):jp(e,"length",n)),e},n3=Ir(),r3=Da(),i3=wp,o3=function(){return i3(n3,r3,arguments)};(function(t){var e=e3,n=Fi,r=Ba,i=o3;t.exports=function(s){var a=r(arguments),l=s.length-(arguments.length-1);return e(a,1+(l>0?l:0),!0)},n?n(t.exports,"apply",{value:i}):t.exports.apply=i})(Mp);var zi=Mp.exports,Wi=Gx,s3=Xx,Up=zi,Za=Ua,qi=Or,a3=Za("Object.prototype.toString"),zp=Pa(),Wp=typeof globalThis>"u"?gr:globalThis,Qa=s3(),tc=Za("String.prototype.slice"),ec=Object.getPrototypeOf,c3=Za("Array.prototype.indexOf",!0)||function(e,n){for(var r=0;r<e.length;r+=1)if(e[r]===n)return r;return-1},Hi={__proto__:null};zp&&qi&&ec?Wi(Qa,function(t){var e=new Wp[t];if(Symbol.toStringTag in e){var n=ec(e),r=qi(n,Symbol.toStringTag);if(!r){var i=ec(n);r=qi(i,Symbol.toStringTag)}Hi["$"+t]=Up(r.get)}}):Wi(Qa,function(t){var e=new Wp[t],n=e.slice||e.set;n&&(Hi["$"+t]=Up(n))});var l3=function(e){var n=!1;return Wi(Hi,function(r,i){if(!n)try{"$"+r(e)===i&&(n=tc(i,1))}catch{}}),n},u3=function(e){var n=!1;return Wi(Hi,function(r,i){if(!n)try{r(e),n=tc(i,1)}catch{}}),n},qp=function(e){if(!e||typeof e!="object")return!1;if(!zp){var n=tc(a3(e),8,-1);return c3(Qa,n)>-1?n:n!=="Object"?!1:u3(e)}return qi?l3(e):null},f3=qp,d3=function(e){return!!f3(e)};(function(t){var e=Ex,n=kx,r=qp,i=d3;function o(U){return U.call.bind(U)}var s=typeof BigInt<"u",a=typeof Symbol<"u",l=o(Object.prototype.toString),f=o(Number.prototype.valueOf),c=o(String.prototype.valueOf),h=o(Boolean.prototype.valueOf);if(s)var m=o(BigInt.prototype.valueOf);if(a)var y=o(Symbol.prototype.valueOf);function b(U,me){if(typeof U!="object")return!1;try{return me(U),!0}catch{return!1}}t.isArgumentsObject=e,t.isGeneratorFunction=n,t.isTypedArray=i;function w(U){return typeof Promise<"u"&&U instanceof Promise||U!==null&&typeof U=="object"&&typeof U.then=="function"&&typeof U.catch=="function"}t.isPromise=w;function T(U){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(U):i(U)||N(U)}t.isArrayBufferView=T;function x(U){return r(U)==="Uint8Array"}t.isUint8Array=x;function v(U){return r(U)==="Uint8ClampedArray"}t.isUint8ClampedArray=v;function E(U){return r(U)==="Uint16Array"}t.isUint16Array=E;function M(U){return r(U)==="Uint32Array"}t.isUint32Array=M;function O(U){return r(U)==="Int8Array"}t.isInt8Array=O;function j(U){return r(U)==="Int16Array"}t.isInt16Array=j;function B(U){return r(U)==="Int32Array"}t.isInt32Array=B;function F(U){return r(U)==="Float32Array"}t.isFloat32Array=F;function L(U){return r(U)==="Float64Array"}t.isFloat64Array=L;function Y(U){return r(U)==="BigInt64Array"}t.isBigInt64Array=Y;function Z(U){return r(U)==="BigUint64Array"}t.isBigUint64Array=Z;function nt(U){return l(U)==="[object Map]"}nt.working=typeof Map<"u"&&nt(new Map);function st(U){return typeof Map>"u"?!1:nt.working?nt(U):U instanceof Map}t.isMap=st;function _t(U){return l(U)==="[object Set]"}_t.working=typeof Set<"u"&&_t(new Set);function dt(U){return typeof Set>"u"?!1:_t.working?_t(U):U instanceof Set}t.isSet=dt;function It(U){return l(U)==="[object WeakMap]"}It.working=typeof WeakMap<"u"&&It(new WeakMap);function at(U){return typeof WeakMap>"u"?!1:It.working?It(U):U instanceof WeakMap}t.isWeakMap=at;function pt(U){return l(U)==="[object WeakSet]"}pt.working=typeof WeakSet<"u"&&pt(new WeakSet);function z(U){return pt(U)}t.isWeakSet=z;function H(U){return l(U)==="[object ArrayBuffer]"}H.working=typeof ArrayBuffer<"u"&&H(new ArrayBuffer);function G(U){return typeof ArrayBuffer>"u"?!1:H.working?H(U):U instanceof ArrayBuffer}t.isArrayBuffer=G;function S(U){return l(U)==="[object DataView]"}S.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&S(new DataView(new ArrayBuffer(1),0,1));function N(U){return typeof DataView>"u"?!1:S.working?S(U):U instanceof DataView}t.isDataView=N;var _=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function A(U){return l(U)==="[object SharedArrayBuffer]"}function I(U){return typeof _>"u"?!1:(typeof A.working>"u"&&(A.working=A(new _)),A.working?A(U):U instanceof _)}t.isSharedArrayBuffer=I;function W(U){return l(U)==="[object AsyncFunction]"}t.isAsyncFunction=W;function V(U){return l(U)==="[object Map Iterator]"}t.isMapIterator=V;function q(U){return l(U)==="[object Set Iterator]"}t.isSetIterator=q;function K(U){return l(U)==="[object Generator]"}t.isGeneratorObject=K;function rt(U){return l(U)==="[object WebAssembly.Module]"}t.isWebAssemblyCompiledModule=rt;function ht(U){return b(U,f)}t.isNumberObject=ht;function wt(U){return b(U,c)}t.isStringObject=wt;function Tt(U){return b(U,h)}t.isBooleanObject=Tt;function Vt(U){return s&&b(U,m)}t.isBigIntObject=Vt;function Yt(U){return a&&b(U,y)}t.isSymbolObject=Yt;function Jt(U){return ht(U)||wt(U)||Tt(U)||Vt(U)||Yt(U)}t.isBoxedPrimitive=Jt;function qt(U){return typeof Uint8Array<"u"&&(G(U)||I(U))}t.isAnyArrayBuffer=qt,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(U){Object.defineProperty(t,U,{enumerable:!1,value:function(){throw new Error(U+" is not supported in userland")}})})})(fp);var h3=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"},nc={exports:{}};typeof Object.create=="function"?nc.exports=function(e,n){n&&(e.super_=n,e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:nc.exports=function(e,n){if(n){e.super_=n;var r=function(){};r.prototype=n.prototype,e.prototype=new r,e.prototype.constructor=e}};var p3=nc.exports;(function(t){var e=Object.getOwnPropertyDescriptors||function(N){for(var _=Object.keys(N),A={},I=0;I<_.length;I++)A[_[I]]=Object.getOwnPropertyDescriptor(N,_[I]);return A},n=/%[sdj%]/g;t.format=function(S){if(!O(S)){for(var N=[],_=0;_<arguments.length;_++)N.push(s(arguments[_]));return N.join(" ")}for(var _=1,A=arguments,I=A.length,W=String(S).replace(n,function(q){if(q==="%%")return"%";if(_>=I)return q;switch(q){case"%s":return String(A[_++]);case"%d":return Number(A[_++]);case"%j":try{return JSON.stringify(A[_++])}catch{return"[Circular]"}default:return q}}),V=A[_];_<I;V=A[++_])v(V)||!L(V)?W+=" "+V:W+=" "+s(V);return W},t.deprecate=function(S,N){if(typeof Wt<"u"&&Wt.noDeprecation===!0)return S;if(typeof Wt>"u")return function(){return t.deprecate(S,N).apply(this,arguments)};var _=!1;function A(){if(!_){if(Wt.throwDeprecation)throw new Error(N);Wt.traceDeprecation?console.trace(N):console.error(N),_=!0}return S.apply(this,arguments)}return A};var r={},i=/^$/;if(Wt.env.NODE_DEBUG){var o=Wt.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}t.debuglog=function(S){if(S=S.toUpperCase(),!r[S])if(i.test(S)){var N=Wt.pid;r[S]=function(){var _=t.format.apply(t,arguments);console.error("%s %d: %s",S,N,_)}}else r[S]=function(){};return r[S]};function s(S,N){var _={seen:[],stylize:l};return arguments.length>=3&&(_.depth=arguments[2]),arguments.length>=4&&(_.colors=arguments[3]),x(N)?_.showHidden=N:N&&t._extend(_,N),B(_.showHidden)&&(_.showHidden=!1),B(_.depth)&&(_.depth=2),B(_.colors)&&(_.colors=!1),B(_.customInspect)&&(_.customInspect=!0),_.colors&&(_.stylize=a),c(_,S,_.depth)}t.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function a(S,N){var _=s.styles[N];return _?"\x1B["+s.colors[_][0]+"m"+S+"\x1B["+s.colors[_][1]+"m":S}function l(S,N){return S}function f(S){var N={};return S.forEach(function(_,A){N[_]=!0}),N}function c(S,N,_){if(S.customInspect&&N&&nt(N.inspect)&&N.inspect!==t.inspect&&!(N.constructor&&N.constructor.prototype===N)){var A=N.inspect(_,S);return O(A)||(A=c(S,A,_)),A}var I=h(S,N);if(I)return I;var W=Object.keys(N),V=f(W);if(S.showHidden&&(W=Object.getOwnPropertyNames(N)),Z(N)&&(W.indexOf("message")>=0||W.indexOf("description")>=0))return m(N);if(W.length===0){if(nt(N)){var q=N.name?": "+N.name:"";return S.stylize("[Function"+q+"]","special")}if(F(N))return S.stylize(RegExp.prototype.toString.call(N),"regexp");if(Y(N))return S.stylize(Date.prototype.toString.call(N),"date");if(Z(N))return m(N)}var K="",rt=!1,ht=["{","}"];if(T(N)&&(rt=!0,ht=["[","]"]),nt(N)){var wt=N.name?": "+N.name:"";K=" [Function"+wt+"]"}if(F(N)&&(K=" "+RegExp.prototype.toString.call(N)),Y(N)&&(K=" "+Date.prototype.toUTCString.call(N)),Z(N)&&(K=" "+m(N)),W.length===0&&(!rt||N.length==0))return ht[0]+K+ht[1];if(_<0)return F(N)?S.stylize(RegExp.prototype.toString.call(N),"regexp"):S.stylize("[Object]","special");S.seen.push(N);var Tt;return rt?Tt=y(S,N,_,V,W):Tt=W.map(function(Vt){return b(S,N,_,V,Vt,rt)}),S.seen.pop(),w(Tt,K,ht)}function h(S,N){if(B(N))return S.stylize("undefined","undefined");if(O(N)){var _="'"+JSON.stringify(N).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return S.stylize(_,"string")}if(M(N))return S.stylize(""+N,"number");if(x(N))return S.stylize(""+N,"boolean");if(v(N))return S.stylize("null","null")}function m(S){return"["+Error.prototype.toString.call(S)+"]"}function y(S,N,_,A,I){for(var W=[],V=0,q=N.length;V<q;++V)pt(N,String(V))?W.push(b(S,N,_,A,String(V),!0)):W.push("");return I.forEach(function(K){K.match(/^\d+$/)||W.push(b(S,N,_,A,K,!0))}),W}function b(S,N,_,A,I,W){var V,q,K;if(K=Object.getOwnPropertyDescriptor(N,I)||{value:N[I]},K.get?K.set?q=S.stylize("[Getter/Setter]","special"):q=S.stylize("[Getter]","special"):K.set&&(q=S.stylize("[Setter]","special")),pt(A,I)||(V="["+I+"]"),q||(S.seen.indexOf(K.value)<0?(v(_)?q=c(S,K.value,null):q=c(S,K.value,_-1),q.indexOf(`
|
|
108
106
|
`)>-1&&(W?q=q.split(`
|
|
109
107
|
`).map(function(rt){return" "+rt}).join(`
|
|
110
108
|
`).slice(2):q=`
|
|
111
109
|
`+q.split(`
|
|
112
110
|
`).map(function(rt){return" "+rt}).join(`
|
|
113
|
-
`))):q=S.stylize("[Circular]","special")),B(
|
|
114
|
-
`)>=0,I+W.replace(/\u001b\[\d\d?m/g,"").length+1},0);return A>60?_[0]+(
|
|
111
|
+
`))):q=S.stylize("[Circular]","special")),B(V)){if(W&&I.match(/^\d+$/))return q;V=JSON.stringify(""+I),V.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(V=V.slice(1,-1),V=S.stylize(V,"name")):(V=V.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),V=S.stylize(V,"string"))}return V+": "+q}function w(S,N,_){var A=S.reduce(function(I,W){return W.indexOf(`
|
|
112
|
+
`)>=0,I+W.replace(/\u001b\[\d\d?m/g,"").length+1},0);return A>60?_[0]+(N===""?"":N+`
|
|
115
113
|
`)+" "+S.join(`,
|
|
116
|
-
`)+" "+_[1]:_[0]+M+" "+S.join(", ")+" "+_[1]}t.types=fp;function P(S){return Array.isArray(S)}t.isArray=P;function x(S){return typeof S=="boolean"}t.isBoolean=x;function v(S){return S===null}t.isNull=v;function E(S){return S==null}t.isNullOrUndefined=E;function N(S){return typeof S=="number"}t.isNumber=N;function O(S){return typeof S=="string"}t.isString=O;function j(S){return typeof S=="symbol"}t.isSymbol=j;function B(S){return S===void 0}t.isUndefined=B;function F(S){return L(S)&&_t(S)==="[object RegExp]"}t.isRegExp=F,t.types.isRegExp=F;function L(S){return typeof S=="object"&&S!==null}t.isObject=L;function Y(S){return L(S)&&_t(S)==="[object Date]"}t.isDate=Y,t.types.isDate=Y;function Z(S){return L(S)&&(_t(S)==="[object Error]"||S instanceof Error)}t.isError=Z,t.types.isNativeError=Z;function nt(S){return typeof S=="function"}t.isFunction=nt;function st(S){return S===null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||typeof S=="symbol"||typeof S>"u"}t.isPrimitive=st,t.isBuffer=dE;function _t(S){return Object.prototype.toString.call(S)}function dt(S){return S<10?"0"+S.toString(10):S.toString(10)}var It=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function at(){var S=new Date,M=[dt(S.getHours()),dt(S.getMinutes()),dt(S.getSeconds())].join(":");return[S.getDate(),It[S.getMonth()],M].join(" ")}t.log=function(){console.log("%s - %s",at(),t.format.apply(t,arguments))},t.inherits=hE,t._extend=function(S,M){if(!M||!L(M))return S;for(var _=Object.keys(M),A=_.length;A--;)S[_[A]]=M[_[A]];return S};function pt(S,M){return Object.prototype.hasOwnProperty.call(S,M)}var z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(M){if(typeof M!="function")throw new TypeError('The "original" argument must be of type Function');if(z&&M[z]){var _=M[z];if(typeof _!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(_,z,{value:_,enumerable:!1,writable:!1,configurable:!0}),_}function _(){for(var A,I,W=new Promise(function(K,rt){A=K,I=rt}),$=[],q=0;q<arguments.length;q++)$.push(arguments[q]);$.push(function(K,rt){K?I(K):A(rt)});try{M.apply(this,$)}catch(K){I(K)}return W}return Object.setPrototypeOf(_,Object.getPrototypeOf(M)),z&&Object.defineProperty(_,z,{value:_,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(_,e(M))},t.promisify.custom=z;function H(S,M){if(!S){var _=new Error("Promise was rejected with a falsy value");_.reason=S,S=_}return M(S)}function G(S){if(typeof S!="function")throw new TypeError('The "original" argument must be of type Function');function M(){for(var _=[],A=0;A<arguments.length;A++)_.push(arguments[A]);var I=_.pop();if(typeof I!="function")throw new TypeError("The last argument must be of type Function");var W=this,$=function(){return I.apply(W,arguments)};S.apply(this,_).then(function(q){Wt.nextTick($.bind(null,null,q))},function(q){Wt.nextTick(H.bind(null,q,$))})}return Object.setPrototypeOf(M,Object.getPrototypeOf(S)),Object.defineProperties(M,e(S)),M}t.callbackify=G})(un);var rc={exports:{}},ic={},Hp;function Gp(){if(Hp)return ic;Hp=1;function t(v){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},t(v)}function e(v,E,N){return Object.defineProperty(v,"prototype",{writable:!1}),v}function n(v,E){if(!(v instanceof E))throw new TypeError("Cannot call a class as a function")}function r(v,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(E&&E.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),Object.defineProperty(v,"prototype",{writable:!1}),E&&i(v,E)}function i(v,E){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,j){return O.__proto__=j,O},i(v,E)}function o(v){var E=l();return function(){var O=f(v),j;if(E){var B=f(this).constructor;j=Reflect.construct(O,arguments,B)}else j=O.apply(this,arguments);return s(this,j)}}function s(v,E){if(E&&(t(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(v)}function a(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function f(v){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(N){return N.__proto__||Object.getPrototypeOf(N)},f(v)}var c={},h,m;function y(v,E,N){N||(N=Error);function O(B,F,L){return typeof E=="string"?E:E(B,F,L)}var j=function(B){r(L,B);var F=o(L);function L(Y,Z,nt){var st;return n(this,L),st=F.call(this,O(Y,Z,nt)),st.code=v,st}return e(L)}(N);c[v]=j}function b(v,E){if(Array.isArray(v)){var N=v.length;return v=v.map(function(O){return String(O)}),N>2?"one of ".concat(E," ").concat(v.slice(0,N-1).join(", "),", or ")+v[N-1]:N===2?"one of ".concat(E," ").concat(v[0]," or ").concat(v[1]):"of ".concat(E," ").concat(v[0])}else return"of ".concat(E," ").concat(String(v))}function w(v,E,N){return v.substr(0,E.length)===E}function P(v,E,N){return(N===void 0||N>v.length)&&(N=v.length),v.substring(N-E.length,N)===E}function x(v,E,N){return typeof N!="number"&&(N=0),N+E.length>v.length?!1:v.indexOf(E,N)!==-1}return y("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),y("ERR_INVALID_ARG_TYPE",function(v,E,N){h===void 0&&(h=gc()),h(typeof v=="string","'name' must be a string");var O;typeof E=="string"&&w(E,"not ")?(O="must not be",E=E.replace(/^not /,"")):O="must be";var j;if(P(v," argument"))j="The ".concat(v," ").concat(O," ").concat(b(E,"type"));else{var B=x(v,".")?"property":"argument";j='The "'.concat(v,'" ').concat(B," ").concat(O," ").concat(b(E,"type"))}return j+=". Received type ".concat(t(N)),j},TypeError),y("ERR_INVALID_ARG_VALUE",function(v,E){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";m===void 0&&(m=un);var O=m.inspect(E);return O.length>128&&(O="".concat(O.slice(0,128),"...")),"The argument '".concat(v,"' ").concat(N,". Received ").concat(O)},TypeError),y("ERR_INVALID_RETURN_VALUE",function(v,E,N){var O;return N&&N.constructor&&N.constructor.name?O="instance of ".concat(N.constructor.name):O="type ".concat(t(N)),"Expected ".concat(v,' to be returned from the "').concat(E,'"')+" function but got ".concat(O,".")},TypeError),y("ERR_MISSING_ARGS",function(){for(var v=arguments.length,E=new Array(v),N=0;N<v;N++)E[N]=arguments[N];h===void 0&&(h=gc()),h(E.length>0,"At least one arg needs to be specified");var O="The ",j=E.length;switch(E=E.map(function(B){return'"'.concat(B,'"')}),j){case 1:O+="".concat(E[0]," argument");break;case 2:O+="".concat(E[0]," and ").concat(E[1]," arguments");break;default:O+=E.slice(0,j-1).join(", "),O+=", and ".concat(E[j-1]," arguments");break}return"".concat(O," must be specified")},TypeError),ic.codes=c,ic}var oc,Kp;function pE(){if(Kp)return oc;Kp=1;function t(z,H){var G=Object.keys(z);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(z);H&&(S=S.filter(function(M){return Object.getOwnPropertyDescriptor(z,M).enumerable})),G.push.apply(G,S)}return G}function e(z){for(var H=1;H<arguments.length;H++){var G=arguments[H]!=null?arguments[H]:{};H%2?t(Object(G),!0).forEach(function(S){n(z,S,G[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(G)):t(Object(G)).forEach(function(S){Object.defineProperty(z,S,Object.getOwnPropertyDescriptor(G,S))})}return z}function n(z,H,G){return H=s(H),H in z?Object.defineProperty(z,H,{value:G,enumerable:!0,configurable:!0,writable:!0}):z[H]=G,z}function r(z,H){if(!(z instanceof H))throw new TypeError("Cannot call a class as a function")}function i(z,H){for(var G=0;G<H.length;G++){var S=H[G];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(z,s(S.key),S)}}function o(z,H,G){return H&&i(z.prototype,H),Object.defineProperty(z,"prototype",{writable:!1}),z}function s(z){var H=a(z,"string");return v(H)==="symbol"?H:String(H)}function a(z,H){if(v(z)!=="object"||z===null)return z;var G=z[Symbol.toPrimitive];if(G!==void 0){var S=G.call(z,H||"default");if(v(S)!=="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(H==="string"?String:Number)(z)}function l(z,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(H&&H.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),H&&P(z,H)}function f(z){var H=b();return function(){var S=x(z),M;if(H){var _=x(this).constructor;M=Reflect.construct(S,arguments,_)}else M=S.apply(this,arguments);return c(this,M)}}function c(z,H){if(H&&(v(H)==="object"||typeof H=="function"))return H;if(H!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(z)}function h(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function m(z){var H=typeof Map=="function"?new Map:void 0;return m=function(S){if(S===null||!w(S))return S;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(typeof H<"u"){if(H.has(S))return H.get(S);H.set(S,M)}function M(){return y(S,arguments,x(this).constructor)}return M.prototype=Object.create(S.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),P(M,S)},m(z)}function y(z,H,G){return b()?y=Reflect.construct.bind():y=function(M,_,A){var I=[null];I.push.apply(I,_);var W=Function.bind.apply(M,I),$=new W;return A&&P($,A.prototype),$},y.apply(null,arguments)}function b(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function w(z){return Function.toString.call(z).indexOf("[native code]")!==-1}function P(z,H){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,M){return S.__proto__=M,S},P(z,H)}function x(z){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},x(z)}function v(z){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},v(z)}var E=un,N=E.inspect,O=Gp(),j=O.codes.ERR_INVALID_ARG_TYPE;function B(z,H,G){return(G===void 0||G>z.length)&&(G=z.length),z.substring(G-H.length,G)===H}function F(z,H){if(H=Math.floor(H),z.length==0||H==0)return"";var G=z.length*H;for(H=Math.floor(Math.log(H)/Math.log(2));H;)z+=z,H--;return z+=z.substring(0,G-z.length),z}var L="",Y="",Z="",nt="",st={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},_t=10;function dt(z){var H=Object.keys(z),G=Object.create(Object.getPrototypeOf(z));return H.forEach(function(S){G[S]=z[S]}),Object.defineProperty(G,"message",{value:z.message}),G}function It(z){return N(z,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function at(z,H,G){var S="",M="",_=0,A="",I=!1,W=It(z),$=W.split(`
|
|
114
|
+
`)+" "+_[1]:_[0]+N+" "+S.join(", ")+" "+_[1]}t.types=fp;function T(S){return Array.isArray(S)}t.isArray=T;function x(S){return typeof S=="boolean"}t.isBoolean=x;function v(S){return S===null}t.isNull=v;function E(S){return S==null}t.isNullOrUndefined=E;function M(S){return typeof S=="number"}t.isNumber=M;function O(S){return typeof S=="string"}t.isString=O;function j(S){return typeof S=="symbol"}t.isSymbol=j;function B(S){return S===void 0}t.isUndefined=B;function F(S){return L(S)&&_t(S)==="[object RegExp]"}t.isRegExp=F,t.types.isRegExp=F;function L(S){return typeof S=="object"&&S!==null}t.isObject=L;function Y(S){return L(S)&&_t(S)==="[object Date]"}t.isDate=Y,t.types.isDate=Y;function Z(S){return L(S)&&(_t(S)==="[object Error]"||S instanceof Error)}t.isError=Z,t.types.isNativeError=Z;function nt(S){return typeof S=="function"}t.isFunction=nt;function st(S){return S===null||typeof S=="boolean"||typeof S=="number"||typeof S=="string"||typeof S=="symbol"||typeof S>"u"}t.isPrimitive=st,t.isBuffer=h3;function _t(S){return Object.prototype.toString.call(S)}function dt(S){return S<10?"0"+S.toString(10):S.toString(10)}var It=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function at(){var S=new Date,N=[dt(S.getHours()),dt(S.getMinutes()),dt(S.getSeconds())].join(":");return[S.getDate(),It[S.getMonth()],N].join(" ")}t.log=function(){console.log("%s - %s",at(),t.format.apply(t,arguments))},t.inherits=p3,t._extend=function(S,N){if(!N||!L(N))return S;for(var _=Object.keys(N),A=_.length;A--;)S[_[A]]=N[_[A]];return S};function pt(S,N){return Object.prototype.hasOwnProperty.call(S,N)}var z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;t.promisify=function(N){if(typeof N!="function")throw new TypeError('The "original" argument must be of type Function');if(z&&N[z]){var _=N[z];if(typeof _!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(_,z,{value:_,enumerable:!1,writable:!1,configurable:!0}),_}function _(){for(var A,I,W=new Promise(function(K,rt){A=K,I=rt}),V=[],q=0;q<arguments.length;q++)V.push(arguments[q]);V.push(function(K,rt){K?I(K):A(rt)});try{N.apply(this,V)}catch(K){I(K)}return W}return Object.setPrototypeOf(_,Object.getPrototypeOf(N)),z&&Object.defineProperty(_,z,{value:_,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(_,e(N))},t.promisify.custom=z;function H(S,N){if(!S){var _=new Error("Promise was rejected with a falsy value");_.reason=S,S=_}return N(S)}function G(S){if(typeof S!="function")throw new TypeError('The "original" argument must be of type Function');function N(){for(var _=[],A=0;A<arguments.length;A++)_.push(arguments[A]);var I=_.pop();if(typeof I!="function")throw new TypeError("The last argument must be of type Function");var W=this,V=function(){return I.apply(W,arguments)};S.apply(this,_).then(function(q){Wt.nextTick(V.bind(null,null,q))},function(q){Wt.nextTick(H.bind(null,q,V))})}return Object.setPrototypeOf(N,Object.getPrototypeOf(S)),Object.defineProperties(N,e(S)),N}t.callbackify=G})(un);var rc={exports:{}},ic={},Hp;function Gp(){if(Hp)return ic;Hp=1;function t(v){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},t(v)}function e(v,E,M){return Object.defineProperty(v,"prototype",{writable:!1}),v}function n(v,E){if(!(v instanceof E))throw new TypeError("Cannot call a class as a function")}function r(v,E){if(typeof E!="function"&&E!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(E&&E.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),Object.defineProperty(v,"prototype",{writable:!1}),E&&i(v,E)}function i(v,E){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,j){return O.__proto__=j,O},i(v,E)}function o(v){var E=l();return function(){var O=f(v),j;if(E){var B=f(this).constructor;j=Reflect.construct(O,arguments,B)}else j=O.apply(this,arguments);return s(this,j)}}function s(v,E){if(E&&(t(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(v)}function a(v){if(v===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return v}function l(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function f(v){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(M){return M.__proto__||Object.getPrototypeOf(M)},f(v)}var c={},h,m;function y(v,E,M){M||(M=Error);function O(B,F,L){return typeof E=="string"?E:E(B,F,L)}var j=function(B){r(L,B);var F=o(L);function L(Y,Z,nt){var st;return n(this,L),st=F.call(this,O(Y,Z,nt)),st.code=v,st}return e(L)}(M);c[v]=j}function b(v,E){if(Array.isArray(v)){var M=v.length;return v=v.map(function(O){return String(O)}),M>2?"one of ".concat(E," ").concat(v.slice(0,M-1).join(", "),", or ")+v[M-1]:M===2?"one of ".concat(E," ").concat(v[0]," or ").concat(v[1]):"of ".concat(E," ").concat(v[0])}else return"of ".concat(E," ").concat(String(v))}function w(v,E,M){return v.substr(0,E.length)===E}function T(v,E,M){return(M===void 0||M>v.length)&&(M=v.length),v.substring(M-E.length,M)===E}function x(v,E,M){return typeof M!="number"&&(M=0),M+E.length>v.length?!1:v.indexOf(E,M)!==-1}return y("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),y("ERR_INVALID_ARG_TYPE",function(v,E,M){h===void 0&&(h=gc()),h(typeof v=="string","'name' must be a string");var O;typeof E=="string"&&w(E,"not ")?(O="must not be",E=E.replace(/^not /,"")):O="must be";var j;if(T(v," argument"))j="The ".concat(v," ").concat(O," ").concat(b(E,"type"));else{var B=x(v,".")?"property":"argument";j='The "'.concat(v,'" ').concat(B," ").concat(O," ").concat(b(E,"type"))}return j+=". Received type ".concat(t(M)),j},TypeError),y("ERR_INVALID_ARG_VALUE",function(v,E){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";m===void 0&&(m=un);var O=m.inspect(E);return O.length>128&&(O="".concat(O.slice(0,128),"...")),"The argument '".concat(v,"' ").concat(M,". Received ").concat(O)},TypeError),y("ERR_INVALID_RETURN_VALUE",function(v,E,M){var O;return M&&M.constructor&&M.constructor.name?O="instance of ".concat(M.constructor.name):O="type ".concat(t(M)),"Expected ".concat(v,' to be returned from the "').concat(E,'"')+" function but got ".concat(O,".")},TypeError),y("ERR_MISSING_ARGS",function(){for(var v=arguments.length,E=new Array(v),M=0;M<v;M++)E[M]=arguments[M];h===void 0&&(h=gc()),h(E.length>0,"At least one arg needs to be specified");var O="The ",j=E.length;switch(E=E.map(function(B){return'"'.concat(B,'"')}),j){case 1:O+="".concat(E[0]," argument");break;case 2:O+="".concat(E[0]," and ").concat(E[1]," arguments");break;default:O+=E.slice(0,j-1).join(", "),O+=", and ".concat(E[j-1]," arguments");break}return"".concat(O," must be specified")},TypeError),ic.codes=c,ic}var oc,Kp;function m3(){if(Kp)return oc;Kp=1;function t(z,H){var G=Object.keys(z);if(Object.getOwnPropertySymbols){var S=Object.getOwnPropertySymbols(z);H&&(S=S.filter(function(N){return Object.getOwnPropertyDescriptor(z,N).enumerable})),G.push.apply(G,S)}return G}function e(z){for(var H=1;H<arguments.length;H++){var G=arguments[H]!=null?arguments[H]:{};H%2?t(Object(G),!0).forEach(function(S){n(z,S,G[S])}):Object.getOwnPropertyDescriptors?Object.defineProperties(z,Object.getOwnPropertyDescriptors(G)):t(Object(G)).forEach(function(S){Object.defineProperty(z,S,Object.getOwnPropertyDescriptor(G,S))})}return z}function n(z,H,G){return H=s(H),H in z?Object.defineProperty(z,H,{value:G,enumerable:!0,configurable:!0,writable:!0}):z[H]=G,z}function r(z,H){if(!(z instanceof H))throw new TypeError("Cannot call a class as a function")}function i(z,H){for(var G=0;G<H.length;G++){var S=H[G];S.enumerable=S.enumerable||!1,S.configurable=!0,"value"in S&&(S.writable=!0),Object.defineProperty(z,s(S.key),S)}}function o(z,H,G){return H&&i(z.prototype,H),Object.defineProperty(z,"prototype",{writable:!1}),z}function s(z){var H=a(z,"string");return v(H)==="symbol"?H:String(H)}function a(z,H){if(v(z)!=="object"||z===null)return z;var G=z[Symbol.toPrimitive];if(G!==void 0){var S=G.call(z,H||"default");if(v(S)!=="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(H==="string"?String:Number)(z)}function l(z,H){if(typeof H!="function"&&H!==null)throw new TypeError("Super expression must either be null or a function");z.prototype=Object.create(H&&H.prototype,{constructor:{value:z,writable:!0,configurable:!0}}),Object.defineProperty(z,"prototype",{writable:!1}),H&&T(z,H)}function f(z){var H=b();return function(){var S=x(z),N;if(H){var _=x(this).constructor;N=Reflect.construct(S,arguments,_)}else N=S.apply(this,arguments);return c(this,N)}}function c(z,H){if(H&&(v(H)==="object"||typeof H=="function"))return H;if(H!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return h(z)}function h(z){if(z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return z}function m(z){var H=typeof Map=="function"?new Map:void 0;return m=function(S){if(S===null||!w(S))return S;if(typeof S!="function")throw new TypeError("Super expression must either be null or a function");if(typeof H<"u"){if(H.has(S))return H.get(S);H.set(S,N)}function N(){return y(S,arguments,x(this).constructor)}return N.prototype=Object.create(S.prototype,{constructor:{value:N,enumerable:!1,writable:!0,configurable:!0}}),T(N,S)},m(z)}function y(z,H,G){return b()?y=Reflect.construct.bind():y=function(N,_,A){var I=[null];I.push.apply(I,_);var W=Function.bind.apply(N,I),V=new W;return A&&T(V,A.prototype),V},y.apply(null,arguments)}function b(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function w(z){return Function.toString.call(z).indexOf("[native code]")!==-1}function T(z,H){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(S,N){return S.__proto__=N,S},T(z,H)}function x(z){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(G){return G.__proto__||Object.getPrototypeOf(G)},x(z)}function v(z){"@babel/helpers - typeof";return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},v(z)}var E=un,M=E.inspect,O=Gp(),j=O.codes.ERR_INVALID_ARG_TYPE;function B(z,H,G){return(G===void 0||G>z.length)&&(G=z.length),z.substring(G-H.length,G)===H}function F(z,H){if(H=Math.floor(H),z.length==0||H==0)return"";var G=z.length*H;for(H=Math.floor(Math.log(H)/Math.log(2));H;)z+=z,H--;return z+=z.substring(0,G-z.length),z}var L="",Y="",Z="",nt="",st={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},_t=10;function dt(z){var H=Object.keys(z),G=Object.create(Object.getPrototypeOf(z));return H.forEach(function(S){G[S]=z[S]}),Object.defineProperty(G,"message",{value:z.message}),G}function It(z){return M(z,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function at(z,H,G){var S="",N="",_=0,A="",I=!1,W=It(z),V=W.split(`
|
|
117
115
|
`),q=It(H).split(`
|
|
118
|
-
`),K=0,rt="";if(G==="strictEqual"&&v(z)==="object"&&v(H)==="object"&&z!==null&&H!==null&&(G="strictEqualObject")
|
|
116
|
+
`),K=0,rt="";if(G==="strictEqual"&&v(z)==="object"&&v(H)==="object"&&z!==null&&H!==null&&(G="strictEqualObject"),V.length===1&&q.length===1&&V[0]!==q[0]){var ht=V[0].length+q[0].length;if(ht<=_t){if((v(z)!=="object"||z===null)&&(v(H)!=="object"||H===null)&&(z!==0||H!==0))return"".concat(st[G],`
|
|
119
117
|
|
|
120
|
-
`)+"".concat(
|
|
121
|
-
`)}else if(G!=="strictEqualObject"){var wt=Wt.stderr&&Wt.stderr.isTTY?Wt.stderr.columns:80;if(ht<wt){for(
|
|
122
|
-
`.concat(F(" ",K),"^"),K=0)}}}for(var
|
|
123
|
-
`.concat(
|
|
118
|
+
`)+"".concat(V[0]," !== ").concat(q[0],`
|
|
119
|
+
`)}else if(G!=="strictEqualObject"){var wt=Wt.stderr&&Wt.stderr.isTTY?Wt.stderr.columns:80;if(ht<wt){for(;V[0][K]===q[0][K];)K++;K>2&&(rt=`
|
|
120
|
+
`.concat(F(" ",K),"^"),K=0)}}}for(var Tt=V[V.length-1],Vt=q[q.length-1];Tt===Vt&&(K++<2?A=`
|
|
121
|
+
`.concat(Tt).concat(A):S=Tt,V.pop(),q.pop(),!(V.length===0||q.length===0));)Tt=V[V.length-1],Vt=q[q.length-1];var Yt=Math.max(V.length,q.length);if(Yt===0){var Jt=W.split(`
|
|
124
122
|
`);if(Jt.length>30)for(Jt[26]="".concat(L,"...").concat(nt);Jt.length>27;)Jt.pop();return"".concat(st.notIdentical,`
|
|
125
123
|
|
|
126
124
|
`).concat(Jt.join(`
|
|
@@ -128,57 +126,57 @@
|
|
|
128
126
|
`)}K>3&&(A=`
|
|
129
127
|
`.concat(L,"...").concat(nt).concat(A),I=!0),S!==""&&(A=`
|
|
130
128
|
`.concat(S).concat(A),S="");var qt=0,U=st[G]+`
|
|
131
|
-
`.concat(Y,"+ actual").concat(nt," ").concat(Z,"- expected").concat(nt),me=" ".concat(L,"...").concat(nt," Lines skipped");for(K=0;K<Yt;K++){var J=K-_;if(
|
|
132
|
-
`.concat(L,"...").concat(nt),I=!0):J>3&&(
|
|
133
|
-
`.concat(q[K-2]),qt++),
|
|
129
|
+
`.concat(Y,"+ actual").concat(nt," ").concat(Z,"- expected").concat(nt),me=" ".concat(L,"...").concat(nt," Lines skipped");for(K=0;K<Yt;K++){var J=K-_;if(V.length<K+1)J>1&&K>2&&(J>4?(N+=`
|
|
130
|
+
`.concat(L,"...").concat(nt),I=!0):J>3&&(N+=`
|
|
131
|
+
`.concat(q[K-2]),qt++),N+=`
|
|
134
132
|
`.concat(q[K-1]),qt++),_=K,S+=`
|
|
135
|
-
`.concat(Z,"-").concat(nt," ").concat(q[K]),qt++;else if(q.length<K+1)J>1&&K>2&&(J>4?(
|
|
136
|
-
`.concat(L,"...").concat(nt),I=!0):J>3&&(
|
|
137
|
-
`.concat(
|
|
138
|
-
`.concat(
|
|
139
|
-
`.concat(Y,"+").concat(nt," ").concat(
|
|
140
|
-
`.concat(L,"...").concat(nt),I=!0):J>3&&(
|
|
141
|
-
`.concat(
|
|
142
|
-
`.concat(
|
|
133
|
+
`.concat(Z,"-").concat(nt," ").concat(q[K]),qt++;else if(q.length<K+1)J>1&&K>2&&(J>4?(N+=`
|
|
134
|
+
`.concat(L,"...").concat(nt),I=!0):J>3&&(N+=`
|
|
135
|
+
`.concat(V[K-2]),qt++),N+=`
|
|
136
|
+
`.concat(V[K-1]),qt++),_=K,N+=`
|
|
137
|
+
`.concat(Y,"+").concat(nt," ").concat(V[K]),qt++;else{var vt=q[K],Et=V[K],k=Et!==vt&&(!B(Et,",")||Et.slice(0,-1)!==vt);k&&B(vt,",")&&vt.slice(0,-1)===Et&&(k=!1,Et+=","),k?(J>1&&K>2&&(J>4?(N+=`
|
|
138
|
+
`.concat(L,"...").concat(nt),I=!0):J>3&&(N+=`
|
|
139
|
+
`.concat(V[K-2]),qt++),N+=`
|
|
140
|
+
`.concat(V[K-1]),qt++),_=K,N+=`
|
|
143
141
|
`.concat(Y,"+").concat(nt," ").concat(Et),S+=`
|
|
144
|
-
`.concat(Z,"-").concat(nt," ").concat(vt),qt+=2):(
|
|
142
|
+
`.concat(Z,"-").concat(nt," ").concat(vt),qt+=2):(N+=S,S="",(J===1||K===0)&&(N+=`
|
|
145
143
|
`.concat(Et),qt++))}if(qt>20&&K<Yt-2)return"".concat(U).concat(me,`
|
|
146
|
-
`).concat(
|
|
144
|
+
`).concat(N,`
|
|
147
145
|
`).concat(L,"...").concat(nt).concat(S,`
|
|
148
146
|
`)+"".concat(L,"...").concat(nt)}return"".concat(U).concat(I?me:"",`
|
|
149
|
-
`).concat(
|
|
150
|
-
`);if(I==="notStrictEqual"&&v(
|
|
147
|
+
`).concat(N).concat(S).concat(A).concat(rt)}var pt=function(z,H){l(S,z);var G=f(S);function S(N){var _;if(r(this,S),v(N)!=="object"||N===null)throw new j("options","Object",N);var A=N.message,I=N.operator,W=N.stackStartFn,V=N.actual,q=N.expected,K=Error.stackTraceLimit;if(Error.stackTraceLimit=0,A!=null)_=G.call(this,String(A));else if(Wt.stderr&&Wt.stderr.isTTY&&(Wt.stderr&&Wt.stderr.getColorDepth&&Wt.stderr.getColorDepth()!==1?(L="\x1B[34m",Y="\x1B[32m",nt="\x1B[39m",Z="\x1B[31m"):(L="",Y="",nt="",Z="")),v(V)==="object"&&V!==null&&v(q)==="object"&&q!==null&&"stack"in V&&V instanceof Error&&"stack"in q&&q instanceof Error&&(V=dt(V),q=dt(q)),I==="deepStrictEqual"||I==="strictEqual")_=G.call(this,at(V,q,I));else if(I==="notDeepStrictEqual"||I==="notStrictEqual"){var rt=st[I],ht=It(V).split(`
|
|
148
|
+
`);if(I==="notStrictEqual"&&v(V)==="object"&&V!==null&&(rt=st.notStrictEqualObject),ht.length>30)for(ht[26]="".concat(L,"...").concat(nt);ht.length>27;)ht.pop();ht.length===1?_=G.call(this,"".concat(rt," ").concat(ht[0])):_=G.call(this,"".concat(rt,`
|
|
151
149
|
|
|
152
150
|
`).concat(ht.join(`
|
|
153
151
|
`),`
|
|
154
|
-
`))}else{var wt=It(
|
|
152
|
+
`))}else{var wt=It(V),Tt="",Vt=st[I];I==="notDeepEqual"||I==="notEqual"?(wt="".concat(st[I],`
|
|
155
153
|
|
|
156
|
-
`).concat(wt),wt.length>1024&&(wt="".concat(wt.slice(0,1021),"..."))):(
|
|
154
|
+
`).concat(wt),wt.length>1024&&(wt="".concat(wt.slice(0,1021),"..."))):(Tt="".concat(It(q)),wt.length>512&&(wt="".concat(wt.slice(0,509),"...")),Tt.length>512&&(Tt="".concat(Tt.slice(0,509),"...")),I==="deepEqual"||I==="equal"?wt="".concat(Vt,`
|
|
157
155
|
|
|
158
156
|
`).concat(wt,`
|
|
159
157
|
|
|
160
158
|
should equal
|
|
161
159
|
|
|
162
|
-
`):
|
|
163
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(
|
|
160
|
+
`):Tt=" ".concat(I," ").concat(Tt)),_=G.call(this,"".concat(wt).concat(Tt))}return Error.stackTraceLimit=K,_.generatedMessage=!A,Object.defineProperty(h(_),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),_.code="ERR_ASSERTION",_.actual=V,_.expected=q,_.operator=I,Error.captureStackTrace&&Error.captureStackTrace(h(_),W),_.stack,_.name="AssertionError",c(_)}return o(S,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:H,value:function(_,A){return M(this,e(e({},A),{},{customInspect:!1,depth:0}))}}]),S}(m(Error),M.custom);return oc=pt,oc}var Yp=Object.prototype.toString,Xp=function(e){var n=Yp.call(e),r=n==="[object Arguments]";return r||(r=n!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Yp.call(e.callee)==="[object Function]"),r},sc,Jp;function y3(){if(Jp)return sc;Jp=1;var t;if(!Object.keys){var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Xp,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),s=i.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(m){var y=m.constructor;return y&&y.prototype===m},f={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var m in window)try{if(!f["$"+m]&&e.call(window,m)&&window[m]!==null&&typeof window[m]=="object")try{l(window[m])}catch{return!0}}catch{return!0}return!1}(),h=function(m){if(typeof window>"u"||!c)return l(m);try{return l(m)}catch{return!1}};t=function(y){var b=y!==null&&typeof y=="object",w=n.call(y)==="[object Function]",T=r(y),x=b&&n.call(y)==="[object String]",v=[];if(!b&&!w&&!T)throw new TypeError("Object.keys called on a non-object");var E=s&&w;if(x&&y.length>0&&!e.call(y,0))for(var M=0;M<y.length;++M)v.push(String(M));if(T&&y.length>0)for(var O=0;O<y.length;++O)v.push(String(O));else for(var j in y)!(E&&j==="prototype")&&e.call(y,j)&&v.push(String(j));if(o)for(var B=h(y),F=0;F<a.length;++F)!(B&&a[F]==="constructor")&&e.call(y,a[F])&&v.push(a[F]);return v}}return sc=t,sc}var g3=Array.prototype.slice,v3=Xp,Zp=Object.keys,Gi=Zp?function(e){return Zp(e)}:y3(),Qp=Object.keys;Gi.shim=function(){if(Object.keys){var e=function(){var n=Object.keys(arguments);return n&&n.length===arguments.length}(1,2);e||(Object.keys=function(r){return v3(r)?Qp(g3.call(r)):Qp(r)})}else Object.keys=Gi;return Object.keys||Gi};var tm=Gi,w3=tm,em=Ta(),nm=Ua,Ki=dp,b3=nm("Array.prototype.push"),rm=nm("Object.prototype.propertyIsEnumerable"),_3=em?Ki.getOwnPropertySymbols:null,x3=function(e,n){if(e==null)throw new TypeError("target must be an object");var r=Ki(e);if(arguments.length===1)return r;for(var i=1;i<arguments.length;++i){var o=Ki(arguments[i]),s=w3(o),a=em&&(Ki.getOwnPropertySymbols||_3);if(a)for(var l=a(o),f=0;f<l.length;++f){var c=l[f];rm(o,c)&&b3(s,c)}for(var h=0;h<s.length;++h){var m=s[h];if(rm(o,m)){var y=o[m];r[m]=y}}}return r},ac=x3,S3=function(){if(!Object.assign)return!1;for(var t="abcdefghijklmnopqrst",e=t.split(""),n={},r=0;r<e.length;++r)n[e[r]]=e[r];var i=Object.assign({},n),o="";for(var s in i)o+=s;return t!==o},E3=function(){if(!Object.assign||!Object.preventExtensions)return!1;var t=Object.preventExtensions({1:2});try{Object.assign(t,"xy")}catch{return t[1]==="y"}return!1},A3=function(){return!Object.assign||S3()||E3()?ac:Object.assign},im=function(t){return t!==t},om=function(e,n){return e===0&&n===0?1/e===1/n:!!(e===n||im(e)&&im(n))},C3=om,cc=function(){return typeof Object.is=="function"?Object.is:C3},sm=$a,am=zi,T3=am(sm("String.prototype.indexOf")),P3=function(e,n){var r=sm(e,!!n);return typeof r=="function"&&T3(e,".prototype.")>-1?am(r):r},lc,cm;function Yi(){if(cm)return lc;cm=1;var t=tm,e=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",n=Object.prototype.toString,r=Array.prototype.concat,i=Bp,o=function(f){return typeof f=="function"&&n.call(f)==="[object Function]"},s=Lp(),a=function(f,c,h,m){if(c in f){if(m===!0){if(f[c]===h)return}else if(!o(m)||!m())return}s?i(f,c,h,!0):i(f,c,h)},l=function(f,c){var h=arguments.length>2?arguments[2]:{},m=t(c);e&&(m=r.call(m,Object.getOwnPropertySymbols(c)));for(var y=0;y<m.length;y+=1)a(f,m[y],c[m[y]],h[m[y]])};return l.supportsDescriptors=!!s,lc=l,lc}var uc,lm;function k3(){if(lm)return uc;lm=1;var t=cc,e=Yi();return uc=function(){var r=t();return e(Object,{is:r},{is:function(){return Object.is!==r}}),r},uc}var fc,um;function O3(){if(um)return fc;um=1;var t=Yi(),e=zi,n=om,r=cc,i=k3(),o=e(r(),Object);return t(o,{getPolyfill:r,implementation:n,shim:i}),fc=o,fc}var dc,fm;function dm(){return fm||(fm=1,dc=function(e){return e!==e}),dc}var hc,hm;function pm(){if(hm)return hc;hm=1;var t=dm();return hc=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:t},hc}var pc,mm;function I3(){if(mm)return pc;mm=1;var t=Yi(),e=pm();return pc=function(){var r=e();return t(Number,{isNaN:r},{isNaN:function(){return Number.isNaN!==r}}),r},pc}var mc,ym;function R3(){if(ym)return mc;ym=1;var t=zi,e=Yi(),n=dm(),r=pm(),i=I3(),o=t(r(),Number);return e(o,{getPolyfill:r,implementation:n,shim:i}),mc=o,mc}var yc,gm;function M3(){if(gm)return yc;gm=1;function t(k,R){return o(k)||i(k,R)||n(k,R)||e()}function e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
161
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(k,R){if(k){if(typeof k=="string")return r(k,R);var X=Object.prototype.toString.call(k).slice(8,-1);if(X==="Object"&&k.constructor&&(X=k.constructor.name),X==="Map"||X==="Set")return Array.from(k);if(X==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(X))return r(k,R)}}function r(k,R){(R==null||R>k.length)&&(R=k.length);for(var X=0,tt=new Array(R);X<R;X++)tt[X]=k[X];return tt}function i(k,R){var X=k==null?null:typeof Symbol<"u"&&k[Symbol.iterator]||k["@@iterator"];if(X!=null){var tt,Q,ct,p,u=[],d=!0,g=!1;try{if(ct=(X=X.call(k)).next,R!==0)for(;!(d=(tt=ct.call(X)).done)&&(u.push(tt.value),u.length!==R);d=!0);}catch(C){g=!0,Q=C}finally{try{if(!d&&X.return!=null&&(p=X.return(),Object(p)!==p))return}finally{if(g)throw Q}}return u}}function o(k){if(Array.isArray(k))return k}function s(k){"@babel/helpers - typeof";return s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},s(k)}var a=/a/g.flags!==void 0,l=function(R){var X=[];return R.forEach(function(tt){return X.push(tt)}),X},f=function(R){var X=[];return R.forEach(function(tt,Q){return X.push([Q,tt])}),X},c=Object.is?Object.is:O3(),h=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},m=Number.isNaN?Number.isNaN:R3();function y(k){return k.call.bind(k)}var b=y(Object.prototype.hasOwnProperty),w=y(Object.prototype.propertyIsEnumerable),T=y(Object.prototype.toString),x=un.types,v=x.isAnyArrayBuffer,E=x.isArrayBufferView,M=x.isDate,O=x.isMap,j=x.isRegExp,B=x.isSet,F=x.isNativeError,L=x.isBoxedPrimitive,Y=x.isNumberObject,Z=x.isStringObject,nt=x.isBooleanObject,st=x.isBigIntObject,_t=x.isSymbolObject,dt=x.isFloat32Array,It=x.isFloat64Array;function at(k){if(k.length===0||k.length>10)return!0;for(var R=0;R<k.length;R++){var X=k.charCodeAt(R);if(X<48||X>57)return!0}return k.length===10&&k>=Math.pow(2,32)}function pt(k){return Object.keys(k).filter(at).concat(h(k).filter(Object.prototype.propertyIsEnumerable.bind(k)))}/*!
|
|
164
162
|
* The buffer module from node.js, for the browser.
|
|
165
163
|
*
|
|
166
164
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
167
165
|
* @license MIT
|
|
168
|
-
*/function z(C,R){if(C===R)return 0;for(var X=C.length,tt=R.length,Q=0,ct=Math.min(X,tt);Q<ct;++Q)if(C[Q]!==R[Q]){X=C[Q],tt=R[Q];break}return X<tt?-1:tt<X?1:0}var H=!0,G=!1,S=0,M=1,_=2,A=3;function I(C,R){return a?C.source===R.source&&C.flags===R.flags:RegExp.prototype.toString.call(C)===RegExp.prototype.toString.call(R)}function W(C,R){if(C.byteLength!==R.byteLength)return!1;for(var X=0;X<C.byteLength;X++)if(C[X]!==R[X])return!1;return!0}function $(C,R){return C.byteLength!==R.byteLength?!1:z(new Uint8Array(C.buffer,C.byteOffset,C.byteLength),new Uint8Array(R.buffer,R.byteOffset,R.byteLength))===0}function q(C,R){return C.byteLength===R.byteLength&&z(new Uint8Array(C),new Uint8Array(R))===0}function K(C,R){return Y(C)?Y(R)&&c(Number.prototype.valueOf.call(C),Number.prototype.valueOf.call(R)):Z(C)?Z(R)&&String.prototype.valueOf.call(C)===String.prototype.valueOf.call(R):nt(C)?nt(R)&&Boolean.prototype.valueOf.call(C)===Boolean.prototype.valueOf.call(R):st(C)?st(R)&&BigInt.prototype.valueOf.call(C)===BigInt.prototype.valueOf.call(R):_t(R)&&Symbol.prototype.valueOf.call(C)===Symbol.prototype.valueOf.call(R)}function rt(C,R,X,tt){if(C===R)return C!==0?!0:X?c(C,R):!0;if(X){if(s(C)!=="object")return typeof C=="number"&&m(C)&&m(R);if(s(R)!=="object"||C===null||R===null||Object.getPrototypeOf(C)!==Object.getPrototypeOf(R))return!1}else{if(C===null||s(C)!=="object")return R===null||s(R)!=="object"?C==R:!1;if(R===null||s(R)!=="object")return!1}var Q=P(C),ct=P(R);if(Q!==ct)return!1;if(Array.isArray(C)){if(C.length!==R.length)return!1;var p=pt(C),u=pt(R);return p.length!==u.length?!1:wt(C,R,X,tt,M,p)}if(Q==="[object Object]"&&(!O(C)&&O(R)||!B(C)&&B(R)))return!1;if(N(C)){if(!N(R)||Date.prototype.getTime.call(C)!==Date.prototype.getTime.call(R))return!1}else if(j(C)){if(!j(R)||!I(C,R))return!1}else if(F(C)||C instanceof Error){if(C.message!==R.message||C.name!==R.name)return!1}else if(E(C)){if(!X&&(dt(C)||It(C))){if(!W(C,R))return!1}else if(!$(C,R))return!1;var d=pt(C),g=pt(R);return d.length!==g.length?!1:wt(C,R,X,tt,S,d)}else{if(B(C))return!B(R)||C.size!==R.size?!1:wt(C,R,X,tt,_);if(O(C))return!O(R)||C.size!==R.size?!1:wt(C,R,X,tt,A);if(v(C)){if(!q(C,R))return!1}else if(L(C)&&!K(C,R))return!1}return wt(C,R,X,tt,S)}function ht(C,R){return R.filter(function(X){return w(C,X)})}function wt(C,R,X,tt,Q,ct){if(arguments.length===5){ct=Object.keys(C);var p=Object.keys(R);if(ct.length!==p.length)return!1}for(var u=0;u<ct.length;u++)if(!b(R,ct[u]))return!1;if(X&&arguments.length===5){var d=h(C);if(d.length!==0){var g=0;for(u=0;u<d.length;u++){var T=d[u];if(w(C,T)){if(!w(R,T))return!1;ct.push(T),g++}else if(w(R,T))return!1}var D=h(R);if(d.length!==D.length&&ht(R,D).length!==g)return!1}else{var V=h(R);if(V.length!==0&&ht(R,V).length!==0)return!1}}if(ct.length===0&&(Q===S||Q===M&&C.length===0||C.size===0))return!0;if(tt===void 0)tt={val1:new Map,val2:new Map,position:0};else{var lt=tt.val1.get(C);if(lt!==void 0){var bt=tt.val2.get(R);if(bt!==void 0)return lt===bt}tt.position++}tt.val1.set(C,tt.position),tt.val2.set(R,tt.position);var xt=J(C,R,X,ct,tt,Q);return tt.val1.delete(C),tt.val2.delete(R),xt}function Pt(C,R,X,tt){for(var Q=l(C),ct=0;ct<Q.length;ct++){var p=Q[ct];if(rt(R,p,X,tt))return C.delete(p),!0}return!1}function $t(C){switch(s(C)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":C=+C;case"number":if(m(C))return!1}return!0}function Yt(C,R,X){var tt=$t(X);return tt??(R.has(tt)&&!C.has(tt))}function Jt(C,R,X,tt,Q){var ct=$t(X);if(ct!=null)return ct;var p=R.get(ct);return p===void 0&&!R.has(ct)||!rt(tt,p,!1,Q)?!1:!C.has(ct)&&rt(tt,p,!1,Q)}function qt(C,R,X,tt){for(var Q=null,ct=l(C),p=0;p<ct.length;p++){var u=ct[p];if(s(u)==="object"&&u!==null)Q===null&&(Q=new Set),Q.add(u);else if(!R.has(u)){if(X||!Yt(C,R,u))return!1;Q===null&&(Q=new Set),Q.add(u)}}if(Q!==null){for(var d=l(R),g=0;g<d.length;g++){var T=d[g];if(s(T)==="object"&&T!==null){if(!Pt(Q,T,X,tt))return!1}else if(!X&&!C.has(T)&&!Pt(Q,T,X,tt))return!1}return Q.size===0}return!0}function U(C,R,X,tt,Q,ct){for(var p=l(C),u=0;u<p.length;u++){var d=p[u];if(rt(X,d,Q,ct)&&rt(tt,R.get(d),Q,ct))return C.delete(d),!0}return!1}function me(C,R,X,tt){for(var Q=null,ct=f(C),p=0;p<ct.length;p++){var u=t(ct[p],2),d=u[0],g=u[1];if(s(d)==="object"&&d!==null)Q===null&&(Q=new Set),Q.add(d);else{var T=R.get(d);if(T===void 0&&!R.has(d)||!rt(g,T,X,tt)){if(X||!Jt(C,R,d,g,tt))return!1;Q===null&&(Q=new Set),Q.add(d)}}}if(Q!==null){for(var D=f(R),V=0;V<D.length;V++){var lt=t(D[V],2),bt=lt[0],xt=lt[1];if(s(bt)==="object"&&bt!==null){if(!U(Q,C,bt,xt,X,tt))return!1}else if(!X&&(!C.has(bt)||!rt(C.get(bt),xt,!1,tt))&&!U(Q,C,bt,xt,!1,tt))return!1}return Q.size===0}return!0}function J(C,R,X,tt,Q,ct){var p=0;if(ct===_){if(!qt(C,R,X,Q))return!1}else if(ct===A){if(!me(C,R,X,Q))return!1}else if(ct===M)for(;p<C.length;p++)if(b(C,p)){if(!b(R,p)||!rt(C[p],R[p],X,Q))return!1}else{if(b(R,p))return!1;for(var u=Object.keys(C);p<u.length;p++){var d=u[p];if(!b(R,d)||!rt(C[d],R[d],X,Q))return!1}return u.length===Object.keys(R).length}for(p=0;p<tt.length;p++){var g=tt[p];if(!rt(C[g],R[g],X,Q))return!1}return!0}function vt(C,R){return rt(C,R,G)}function Et(C,R){return rt(C,R,H)}return yc={isDeepEqual:vt,isDeepStrictEqual:Et},yc}var vm;function gc(){if(vm)return rc.exports;vm=1;function t(_){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},t(_)}function e(_,A,I){return Object.defineProperty(_,"prototype",{writable:!1}),_}function n(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}var r=Gp(),i=r.codes,o=i.ERR_AMBIGUOUS_ARGUMENT,s=i.ERR_INVALID_ARG_TYPE,a=i.ERR_INVALID_ARG_VALUE,l=i.ERR_INVALID_RETURN_VALUE,f=i.ERR_MISSING_ARGS,c=pE(),h=un,m=h.inspect,y=un.types,b=y.isPromise,w=y.isRegExp,P=EE(),x=cc(),v=PE("RegExp.prototype.test"),E,N;function O(){var _=RE();E=_.isDeepEqual,N=_.isDeepStrictEqual}var j=!1,B=rc.exports=nt,F={};function L(_){throw _.message instanceof Error?_.message:new c(_)}function Y(_,A,I,W,$){var q=arguments.length,K;if(q===0)K="Failed";else if(q===1)I=_,_=void 0;else{if(j===!1){j=!0;var rt=Wt.emitWarning?Wt.emitWarning:console.warn.bind(console);rt("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}q===2&&(W="!=")}if(I instanceof Error)throw I;var ht={actual:_,expected:A,operator:W===void 0?"fail":W,stackStartFn:$||Y};I!==void 0&&(ht.message=I);var wt=new c(ht);throw K&&(wt.message=K,wt.generatedMessage=!0),wt}B.fail=Y,B.AssertionError=c;function Z(_,A,I,W){if(!I){var $=!1;if(A===0)$=!0,W="No value argument passed to `assert.ok()`";else if(W instanceof Error)throw W;var q=new c({actual:I,expected:!0,message:W,operator:"==",stackStartFn:_});throw q.generatedMessage=$,q}}function nt(){for(var _=arguments.length,A=new Array(_),I=0;I<_;I++)A[I]=arguments[I];Z.apply(void 0,[nt,A.length].concat(A))}B.ok=nt,B.equal=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");A!=I&&L({actual:A,expected:I,message:W,operator:"==",stackStartFn:_})},B.notEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");A==I&&L({actual:A,expected:I,message:W,operator:"!=",stackStartFn:_})},B.deepEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");E===void 0&&O(),E(A,I)||L({actual:A,expected:I,message:W,operator:"deepEqual",stackStartFn:_})},B.notDeepEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");E===void 0&&O(),E(A,I)&&L({actual:A,expected:I,message:W,operator:"notDeepEqual",stackStartFn:_})},B.deepStrictEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");E===void 0&&O(),N(A,I)||L({actual:A,expected:I,message:W,operator:"deepStrictEqual",stackStartFn:_})},B.notDeepStrictEqual=st;function st(_,A,I){if(arguments.length<2)throw new f("actual","expected");E===void 0&&O(),N(_,A)&&L({actual:_,expected:A,message:I,operator:"notDeepStrictEqual",stackStartFn:st})}B.strictEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");x(A,I)||L({actual:A,expected:I,message:W,operator:"strictEqual",stackStartFn:_})},B.notStrictEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");x(A,I)&&L({actual:A,expected:I,message:W,operator:"notStrictEqual",stackStartFn:_})};var _t=e(function _(A,I,W){var $=this;n(this,_),I.forEach(function(q){q in A&&(W!==void 0&&typeof W[q]=="string"&&w(A[q])&&v(A[q],W[q])?$[q]=W[q]:$[q]=A[q])})});function dt(_,A,I,W,$,q){if(!(I in _)||!N(_[I],A[I])){if(!W){var K=new _t(_,$),rt=new _t(A,$,_),ht=new c({actual:K,expected:rt,operator:"deepStrictEqual",stackStartFn:q});throw ht.actual=_,ht.expected=A,ht.operator=q.name,ht}L({actual:_,expected:A,message:W,operator:q.name,stackStartFn:q})}}function It(_,A,I,W){if(typeof A!="function"){if(w(A))return v(A,_);if(arguments.length===2)throw new s("expected",["Function","RegExp"],A);if(t(_)!=="object"||_===null){var $=new c({actual:_,expected:A,message:I,operator:"deepStrictEqual",stackStartFn:W});throw $.operator=W.name,$}var q=Object.keys(A);if(A instanceof Error)q.push("name","message");else if(q.length===0)throw new a("error",A,"may not be an empty object");return E===void 0&&O(),q.forEach(function(K){typeof _[K]=="string"&&w(A[K])&&v(A[K],_[K])||dt(_,A,K,I,q,W)}),!0}return A.prototype!==void 0&&_ instanceof A?!0:Error.isPrototypeOf(A)?!1:A.call({},_)===!0}function at(_){if(typeof _!="function")throw new s("fn","Function",_);try{_()}catch(A){return A}return F}function pt(_){return b(_)||_!==null&&t(_)==="object"&&typeof _.then=="function"&&typeof _.catch=="function"}function z(_){return Promise.resolve().then(function(){var A;if(typeof _=="function"){if(A=_(),!pt(A))throw new l("instance of Promise","promiseFn",A)}else if(pt(_))A=_;else throw new s("promiseFn",["Function","Promise"],_);return Promise.resolve().then(function(){return A}).then(function(){return F}).catch(function(I){return I})})}function H(_,A,I,W){if(typeof I=="string"){if(arguments.length===4)throw new s("error",["Object","Error","Function","RegExp"],I);if(t(A)==="object"&&A!==null){if(A.message===I)throw new o("error/message",'The error message "'.concat(A.message,'" is identical to the message.'))}else if(A===I)throw new o("error/message",'The error "'.concat(A,'" is identical to the message.'));W=I,I=void 0}else if(I!=null&&t(I)!=="object"&&typeof I!="function")throw new s("error",["Object","Error","Function","RegExp"],I);if(A===F){var $="";I&&I.name&&($+=" (".concat(I.name,")")),$+=W?": ".concat(W):".";var q=_.name==="rejects"?"rejection":"exception";L({actual:void 0,expected:I,operator:_.name,message:"Missing expected ".concat(q).concat($),stackStartFn:_})}if(I&&!It(A,I,W,_))throw A}function G(_,A,I,W){if(A!==F){if(typeof I=="string"&&(W=I,I=void 0),!I||It(A,I)){var $=W?": ".concat(W):".",q=_.name==="doesNotReject"?"rejection":"exception";L({actual:A,expected:I,operator:_.name,message:"Got unwanted ".concat(q).concat($,`
|
|
169
|
-
`)+'Actual message: "'.concat(A&&A.message,'"'),stackStartFn:_})}throw A}}B.throws=function _(A){for(var I=arguments.length,W=new Array(I>1?I-1:0)
|
|
166
|
+
*/function z(k,R){if(k===R)return 0;for(var X=k.length,tt=R.length,Q=0,ct=Math.min(X,tt);Q<ct;++Q)if(k[Q]!==R[Q]){X=k[Q],tt=R[Q];break}return X<tt?-1:tt<X?1:0}var H=!0,G=!1,S=0,N=1,_=2,A=3;function I(k,R){return a?k.source===R.source&&k.flags===R.flags:RegExp.prototype.toString.call(k)===RegExp.prototype.toString.call(R)}function W(k,R){if(k.byteLength!==R.byteLength)return!1;for(var X=0;X<k.byteLength;X++)if(k[X]!==R[X])return!1;return!0}function V(k,R){return k.byteLength!==R.byteLength?!1:z(new Uint8Array(k.buffer,k.byteOffset,k.byteLength),new Uint8Array(R.buffer,R.byteOffset,R.byteLength))===0}function q(k,R){return k.byteLength===R.byteLength&&z(new Uint8Array(k),new Uint8Array(R))===0}function K(k,R){return Y(k)?Y(R)&&c(Number.prototype.valueOf.call(k),Number.prototype.valueOf.call(R)):Z(k)?Z(R)&&String.prototype.valueOf.call(k)===String.prototype.valueOf.call(R):nt(k)?nt(R)&&Boolean.prototype.valueOf.call(k)===Boolean.prototype.valueOf.call(R):st(k)?st(R)&&BigInt.prototype.valueOf.call(k)===BigInt.prototype.valueOf.call(R):_t(R)&&Symbol.prototype.valueOf.call(k)===Symbol.prototype.valueOf.call(R)}function rt(k,R,X,tt){if(k===R)return k!==0?!0:X?c(k,R):!0;if(X){if(s(k)!=="object")return typeof k=="number"&&m(k)&&m(R);if(s(R)!=="object"||k===null||R===null||Object.getPrototypeOf(k)!==Object.getPrototypeOf(R))return!1}else{if(k===null||s(k)!=="object")return R===null||s(R)!=="object"?k==R:!1;if(R===null||s(R)!=="object")return!1}var Q=T(k),ct=T(R);if(Q!==ct)return!1;if(Array.isArray(k)){if(k.length!==R.length)return!1;var p=pt(k),u=pt(R);return p.length!==u.length?!1:wt(k,R,X,tt,N,p)}if(Q==="[object Object]"&&(!O(k)&&O(R)||!B(k)&&B(R)))return!1;if(M(k)){if(!M(R)||Date.prototype.getTime.call(k)!==Date.prototype.getTime.call(R))return!1}else if(j(k)){if(!j(R)||!I(k,R))return!1}else if(F(k)||k instanceof Error){if(k.message!==R.message||k.name!==R.name)return!1}else if(E(k)){if(!X&&(dt(k)||It(k))){if(!W(k,R))return!1}else if(!V(k,R))return!1;var d=pt(k),g=pt(R);return d.length!==g.length?!1:wt(k,R,X,tt,S,d)}else{if(B(k))return!B(R)||k.size!==R.size?!1:wt(k,R,X,tt,_);if(O(k))return!O(R)||k.size!==R.size?!1:wt(k,R,X,tt,A);if(v(k)){if(!q(k,R))return!1}else if(L(k)&&!K(k,R))return!1}return wt(k,R,X,tt,S)}function ht(k,R){return R.filter(function(X){return w(k,X)})}function wt(k,R,X,tt,Q,ct){if(arguments.length===5){ct=Object.keys(k);var p=Object.keys(R);if(ct.length!==p.length)return!1}for(var u=0;u<ct.length;u++)if(!b(R,ct[u]))return!1;if(X&&arguments.length===5){var d=h(k);if(d.length!==0){var g=0;for(u=0;u<d.length;u++){var C=d[u];if(w(k,C)){if(!w(R,C))return!1;ct.push(C),g++}else if(w(R,C))return!1}var D=h(R);if(d.length!==D.length&&ht(R,D).length!==g)return!1}else{var $=h(R);if($.length!==0&&ht(R,$).length!==0)return!1}}if(ct.length===0&&(Q===S||Q===N&&k.length===0||k.size===0))return!0;if(tt===void 0)tt={val1:new Map,val2:new Map,position:0};else{var lt=tt.val1.get(k);if(lt!==void 0){var bt=tt.val2.get(R);if(bt!==void 0)return lt===bt}tt.position++}tt.val1.set(k,tt.position),tt.val2.set(R,tt.position);var xt=J(k,R,X,ct,tt,Q);return tt.val1.delete(k),tt.val2.delete(R),xt}function Tt(k,R,X,tt){for(var Q=l(k),ct=0;ct<Q.length;ct++){var p=Q[ct];if(rt(R,p,X,tt))return k.delete(p),!0}return!1}function Vt(k){switch(s(k)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":k=+k;case"number":if(m(k))return!1}return!0}function Yt(k,R,X){var tt=Vt(X);return tt??(R.has(tt)&&!k.has(tt))}function Jt(k,R,X,tt,Q){var ct=Vt(X);if(ct!=null)return ct;var p=R.get(ct);return p===void 0&&!R.has(ct)||!rt(tt,p,!1,Q)?!1:!k.has(ct)&&rt(tt,p,!1,Q)}function qt(k,R,X,tt){for(var Q=null,ct=l(k),p=0;p<ct.length;p++){var u=ct[p];if(s(u)==="object"&&u!==null)Q===null&&(Q=new Set),Q.add(u);else if(!R.has(u)){if(X||!Yt(k,R,u))return!1;Q===null&&(Q=new Set),Q.add(u)}}if(Q!==null){for(var d=l(R),g=0;g<d.length;g++){var C=d[g];if(s(C)==="object"&&C!==null){if(!Tt(Q,C,X,tt))return!1}else if(!X&&!k.has(C)&&!Tt(Q,C,X,tt))return!1}return Q.size===0}return!0}function U(k,R,X,tt,Q,ct){for(var p=l(k),u=0;u<p.length;u++){var d=p[u];if(rt(X,d,Q,ct)&&rt(tt,R.get(d),Q,ct))return k.delete(d),!0}return!1}function me(k,R,X,tt){for(var Q=null,ct=f(k),p=0;p<ct.length;p++){var u=t(ct[p],2),d=u[0],g=u[1];if(s(d)==="object"&&d!==null)Q===null&&(Q=new Set),Q.add(d);else{var C=R.get(d);if(C===void 0&&!R.has(d)||!rt(g,C,X,tt)){if(X||!Jt(k,R,d,g,tt))return!1;Q===null&&(Q=new Set),Q.add(d)}}}if(Q!==null){for(var D=f(R),$=0;$<D.length;$++){var lt=t(D[$],2),bt=lt[0],xt=lt[1];if(s(bt)==="object"&&bt!==null){if(!U(Q,k,bt,xt,X,tt))return!1}else if(!X&&(!k.has(bt)||!rt(k.get(bt),xt,!1,tt))&&!U(Q,k,bt,xt,!1,tt))return!1}return Q.size===0}return!0}function J(k,R,X,tt,Q,ct){var p=0;if(ct===_){if(!qt(k,R,X,Q))return!1}else if(ct===A){if(!me(k,R,X,Q))return!1}else if(ct===N)for(;p<k.length;p++)if(b(k,p)){if(!b(R,p)||!rt(k[p],R[p],X,Q))return!1}else{if(b(R,p))return!1;for(var u=Object.keys(k);p<u.length;p++){var d=u[p];if(!b(R,d)||!rt(k[d],R[d],X,Q))return!1}return u.length===Object.keys(R).length}for(p=0;p<tt.length;p++){var g=tt[p];if(!rt(k[g],R[g],X,Q))return!1}return!0}function vt(k,R){return rt(k,R,G)}function Et(k,R){return rt(k,R,H)}return yc={isDeepEqual:vt,isDeepStrictEqual:Et},yc}var vm;function gc(){if(vm)return rc.exports;vm=1;function t(_){"@babel/helpers - typeof";return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(A){return typeof A}:function(A){return A&&typeof Symbol=="function"&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A},t(_)}function e(_,A,I){return Object.defineProperty(_,"prototype",{writable:!1}),_}function n(_,A){if(!(_ instanceof A))throw new TypeError("Cannot call a class as a function")}var r=Gp(),i=r.codes,o=i.ERR_AMBIGUOUS_ARGUMENT,s=i.ERR_INVALID_ARG_TYPE,a=i.ERR_INVALID_ARG_VALUE,l=i.ERR_INVALID_RETURN_VALUE,f=i.ERR_MISSING_ARGS,c=m3(),h=un,m=h.inspect,y=un.types,b=y.isPromise,w=y.isRegExp,T=A3(),x=cc(),v=P3("RegExp.prototype.test"),E,M;function O(){var _=M3();E=_.isDeepEqual,M=_.isDeepStrictEqual}var j=!1,B=rc.exports=nt,F={};function L(_){throw _.message instanceof Error?_.message:new c(_)}function Y(_,A,I,W,V){var q=arguments.length,K;if(q===0)K="Failed";else if(q===1)I=_,_=void 0;else{if(j===!1){j=!0;var rt=Wt.emitWarning?Wt.emitWarning:console.warn.bind(console);rt("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}q===2&&(W="!=")}if(I instanceof Error)throw I;var ht={actual:_,expected:A,operator:W===void 0?"fail":W,stackStartFn:V||Y};I!==void 0&&(ht.message=I);var wt=new c(ht);throw K&&(wt.message=K,wt.generatedMessage=!0),wt}B.fail=Y,B.AssertionError=c;function Z(_,A,I,W){if(!I){var V=!1;if(A===0)V=!0,W="No value argument passed to `assert.ok()`";else if(W instanceof Error)throw W;var q=new c({actual:I,expected:!0,message:W,operator:"==",stackStartFn:_});throw q.generatedMessage=V,q}}function nt(){for(var _=arguments.length,A=new Array(_),I=0;I<_;I++)A[I]=arguments[I];Z.apply(void 0,[nt,A.length].concat(A))}B.ok=nt,B.equal=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");A!=I&&L({actual:A,expected:I,message:W,operator:"==",stackStartFn:_})},B.notEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");A==I&&L({actual:A,expected:I,message:W,operator:"!=",stackStartFn:_})},B.deepEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");E===void 0&&O(),E(A,I)||L({actual:A,expected:I,message:W,operator:"deepEqual",stackStartFn:_})},B.notDeepEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");E===void 0&&O(),E(A,I)&&L({actual:A,expected:I,message:W,operator:"notDeepEqual",stackStartFn:_})},B.deepStrictEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");E===void 0&&O(),M(A,I)||L({actual:A,expected:I,message:W,operator:"deepStrictEqual",stackStartFn:_})},B.notDeepStrictEqual=st;function st(_,A,I){if(arguments.length<2)throw new f("actual","expected");E===void 0&&O(),M(_,A)&&L({actual:_,expected:A,message:I,operator:"notDeepStrictEqual",stackStartFn:st})}B.strictEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");x(A,I)||L({actual:A,expected:I,message:W,operator:"strictEqual",stackStartFn:_})},B.notStrictEqual=function _(A,I,W){if(arguments.length<2)throw new f("actual","expected");x(A,I)&&L({actual:A,expected:I,message:W,operator:"notStrictEqual",stackStartFn:_})};var _t=e(function _(A,I,W){var V=this;n(this,_),I.forEach(function(q){q in A&&(W!==void 0&&typeof W[q]=="string"&&w(A[q])&&v(A[q],W[q])?V[q]=W[q]:V[q]=A[q])})});function dt(_,A,I,W,V,q){if(!(I in _)||!M(_[I],A[I])){if(!W){var K=new _t(_,V),rt=new _t(A,V,_),ht=new c({actual:K,expected:rt,operator:"deepStrictEqual",stackStartFn:q});throw ht.actual=_,ht.expected=A,ht.operator=q.name,ht}L({actual:_,expected:A,message:W,operator:q.name,stackStartFn:q})}}function It(_,A,I,W){if(typeof A!="function"){if(w(A))return v(A,_);if(arguments.length===2)throw new s("expected",["Function","RegExp"],A);if(t(_)!=="object"||_===null){var V=new c({actual:_,expected:A,message:I,operator:"deepStrictEqual",stackStartFn:W});throw V.operator=W.name,V}var q=Object.keys(A);if(A instanceof Error)q.push("name","message");else if(q.length===0)throw new a("error",A,"may not be an empty object");return E===void 0&&O(),q.forEach(function(K){typeof _[K]=="string"&&w(A[K])&&v(A[K],_[K])||dt(_,A,K,I,q,W)}),!0}return A.prototype!==void 0&&_ instanceof A?!0:Error.isPrototypeOf(A)?!1:A.call({},_)===!0}function at(_){if(typeof _!="function")throw new s("fn","Function",_);try{_()}catch(A){return A}return F}function pt(_){return b(_)||_!==null&&t(_)==="object"&&typeof _.then=="function"&&typeof _.catch=="function"}function z(_){return Promise.resolve().then(function(){var A;if(typeof _=="function"){if(A=_(),!pt(A))throw new l("instance of Promise","promiseFn",A)}else if(pt(_))A=_;else throw new s("promiseFn",["Function","Promise"],_);return Promise.resolve().then(function(){return A}).then(function(){return F}).catch(function(I){return I})})}function H(_,A,I,W){if(typeof I=="string"){if(arguments.length===4)throw new s("error",["Object","Error","Function","RegExp"],I);if(t(A)==="object"&&A!==null){if(A.message===I)throw new o("error/message",'The error message "'.concat(A.message,'" is identical to the message.'))}else if(A===I)throw new o("error/message",'The error "'.concat(A,'" is identical to the message.'));W=I,I=void 0}else if(I!=null&&t(I)!=="object"&&typeof I!="function")throw new s("error",["Object","Error","Function","RegExp"],I);if(A===F){var V="";I&&I.name&&(V+=" (".concat(I.name,")")),V+=W?": ".concat(W):".";var q=_.name==="rejects"?"rejection":"exception";L({actual:void 0,expected:I,operator:_.name,message:"Missing expected ".concat(q).concat(V),stackStartFn:_})}if(I&&!It(A,I,W,_))throw A}function G(_,A,I,W){if(A!==F){if(typeof I=="string"&&(W=I,I=void 0),!I||It(A,I)){var V=W?": ".concat(W):".",q=_.name==="doesNotReject"?"rejection":"exception";L({actual:A,expected:I,operator:_.name,message:"Got unwanted ".concat(q).concat(V,`
|
|
167
|
+
`)+'Actual message: "'.concat(A&&A.message,'"'),stackStartFn:_})}throw A}}B.throws=function _(A){for(var I=arguments.length,W=new Array(I>1?I-1:0),V=1;V<I;V++)W[V-1]=arguments[V];H.apply(void 0,[_,at(A)].concat(W))},B.rejects=function _(A){for(var I=arguments.length,W=new Array(I>1?I-1:0),V=1;V<I;V++)W[V-1]=arguments[V];return z(A).then(function(q){return H.apply(void 0,[_,q].concat(W))})},B.doesNotThrow=function _(A){for(var I=arguments.length,W=new Array(I>1?I-1:0),V=1;V<I;V++)W[V-1]=arguments[V];G.apply(void 0,[_,at(A)].concat(W))},B.doesNotReject=function _(A){for(var I=arguments.length,W=new Array(I>1?I-1:0),V=1;V<I;V++)W[V-1]=arguments[V];return z(A).then(function(q){return G.apply(void 0,[_,q].concat(W))})},B.ifError=function _(A){if(A!=null){var I="ifError got unwanted exception: ";t(A)==="object"&&typeof A.message=="string"?A.message.length===0&&A.constructor?I+=A.constructor.name:I+=A.message:I+=m(A);var W=new c({actual:A,expected:null,operator:"ifError",message:I,stackStartFn:_}),V=A.stack;if(typeof V=="string"){var q=V.split(`
|
|
170
168
|
`);q.shift();for(var K=W.stack.split(`
|
|
171
169
|
`),rt=0;rt<q.length;rt++){var ht=K.indexOf(q[rt]);if(ht!==-1){K=K.slice(0,ht);break}}W.stack="".concat(K.join(`
|
|
172
170
|
`),`
|
|
173
171
|
`).concat(q.join(`
|
|
174
|
-
`))}throw W}};function S(_,A,I,W
|
|
172
|
+
`))}throw W}};function S(_,A,I,W,V){if(!w(A))throw new s("regexp","RegExp",A);var q=V==="match";if(typeof _!="string"||v(A,_)!==q){if(I instanceof Error)throw I;var K=!I;I=I||(typeof _!="string"?'The "string" argument must be of type string. Received type '+"".concat(t(_)," (").concat(m(_),")"):(q?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(m(A),`. Input:
|
|
175
173
|
|
|
176
174
|
`).concat(m(_),`
|
|
177
|
-
`));var rt=new c({actual:_,expected:A,message:I,operator
|
|
178
|
-
`)}function
|
|
179
|
-
hover:scale-105 active:scale-95`,children:[
|
|
175
|
+
`));var rt=new c({actual:_,expected:A,message:I,operator:V,stackStartFn:W});throw rt.generatedMessage=K,rt}}B.match=function _(A,I,W){S(A,I,W,_,"match")},B.doesNotMatch=function _(A,I,W){S(A,I,W,_,"doesNotMatch")};function N(){for(var _=arguments.length,A=new Array(_),I=0;I<_;I++)A[I]=arguments[I];Z.apply(void 0,[N,A.length].concat(A))}return B.strict=T(N,B,{equal:B.strictEqual,deepEqual:B.deepStrictEqual,notEqual:B.notStrictEqual,notDeepEqual:B.notDeepStrictEqual}),B.strict.strict=B.strict,rc.exports}var vc=un,N3=gc();function wm(){return new Date().getTime()}var D3=Array.prototype.slice,re,wc={};typeof gr<"u"&&gr.console?re=gr.console:typeof window<"u"&&window.console?re=window.console:re={};for(var bm=[[F3,"log"],[L3,"info"],[j3,"warn"],[V3,"error"],[$3,"time"],[U3,"timeEnd"],[z3,"trace"],[W3,"dir"],[q3,"assert"]],bc=0;bc<bm.length;bc++){var _m=bm[bc],B3=_m[0],xm=_m[1];re[xm]||(re[xm]=B3)}var je=re;function F3(){}function L3(){re.log.apply(re,arguments)}function j3(){re.log.apply(re,arguments)}function V3(){re.warn.apply(re,arguments)}function $3(t){wc[t]=wm()}function U3(t){var e=wc[t];if(!e)throw new Error("No such label: "+t);delete wc[t];var n=wm()-e;re.log(t+": "+n+"ms")}function z3(){var t=new Error;t.name="Trace",t.message=vc.format.apply(null,arguments),re.error(t.stack)}function W3(t){re.log(vc.inspect(t)+`
|
|
176
|
+
`)}function q3(t){if(!t){var e=D3.call(arguments,1);N3.ok(!1,vc.format.apply(null,e))}}function H3(t){je.log("onNewSupportMessage",t);const{conversations:e,addMessage:n,isChatOpen:r,incrementUnreadCount:i}=Nt.getState(),o={support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,emojis:t.message.emojis},s=e.find(a=>a.threadId===t.threadId);if(s&&I1(s.messages,o)){je.log("Duplicate message detected, skipping:",t.threadId);return}n(t.threadId,o),r||i()}function G3(t){const e=Nt.getState().setConversationOpen;e(t.threadId,!1)}function K3(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=Nt.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,U1(t.csMember.displayName))}function Y3(t){je.log("✨ onUpdatedSupportMessage",t);const{conversations:e,updateMessage:n}=Nt.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){je.log("⚠️ Conversation not found for update:",t.threadId);return}if(!r.messages.some(o=>o.date===t.message.date)){je.log("⚠️ Message not found for update:",t.message.date);return}n(t.threadId,t.message.date,{support:!0,content:t.message.content,authorName:t.message.authorName,date:t.message.date,attachments:t.message.attachments,edited:!0,emojis:t.message.emojis})}function X3(t){je.log("✨ onDeletedSupportMessage",t);const{conversations:e,removeMessage:n}=Nt.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){je.log("⚠️ Conversation not found for deletion:",t.threadId);return}if(!r.messages.some(o=>o.date===t.messageDate)){je.log("⚠️ Message not found for deletion:",t.messageDate);return}n(t.threadId,t.messageDate)}function J3(){return new Promise(t=>{const e=Ri(le.domain,{path:"/socket"});e.on("connect",async()=>(je.log("⚡ socket connected"),e.on("new-support-message",H3),e.on("updated-support-message",Y3),e.on("deleted-support-message",X3),e.on("thread-closed",G3),e.on("thread-assigned",K3),t(e)))})}async function Z3({name:t,email:e}){const n=JSON.stringify({guildId:le.app_id,name:t,email:e}),r=new Headers;r.append("Content-Type","application/json");const i={method:"POST",headers:r,body:n},s=await(await fetch(`${le.domain}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(Qe.set("discord-widget",s.token),Nt.getState().setToken(s.token)),s}async function Q3(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${le.domain}/conversations/current`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).currentConversation??null}catch(n){return console.error("Error fetching current conversation",n),null}}async function t6(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${le.domain}/conversations/past`,{method:"GET",headers:e});return n.status!==200?null:(await n.json()).pastConversations??null}catch(n){return console.error("Error fetching past conversations",n),null}}async function e6(t){const e=await J3();return e.emit("identify",{jwt:t}),e}async function n6(t){const{smartMergeCurrentConversation:e,setConversationOpen:n,conversations:r}=Nt.getState();try{const i=await Q3(t);if(i)ne("✅ Found current conversation:",i.threadId),e(i);else{ne("ℹ️ No current conversation found");const o=r.find(s=>s.status==="open"&&s.threadId!=="TEMP");o&&(ne("ℹ️ Closing stale conversation:",o.threadId),n(o.threadId,!1))}}catch{Nt.getState().setNetworkError("Failed to load conversation")}}async function r6(t){const{pastConversationsLastFetchedAt:e,smartMergePastConversations:n,setLoading:r,setNetworkError:i}=Nt.getState(),o=5*60*1e3;if(!e||Date.now()-e>o)try{r(!0);const a=await t6(t);a&&a.length>0?(ne(`✅ Loaded ${a.length} past conversations`),n(a)):ne("ℹ️ No past conversations found")}catch{i("Failed to load conversation history")}finally{r(!1)}}async function i6(){const{username:t,email:e,setNetworkError:n,setLoading:r}=Nt.getState();try{r(!0),n(null);let i=Qe.get("discord-widget");i?ne("ℹ️ Returning user - JWT found in cookies"):(ne("ℹ️ New user - obtaining JWT token..."),i=(await Z3({name:t,email:e})).token,ne("✅ JWT token obtained")),await e6(i),await n6(i),ne("✅ Network initialization complete")}catch(i){n(i instanceof Error?i.message:"Network initialization failed")}finally{r(!1)}}const o6=()=>{const{conversations:t,setOpenConversationId:e,pastConversationsLastFetchedAt:n}=Nt(),r=t.filter(a=>a.status==="open").length;ut(()=>{const a=Qe.get("discord-widget");if(!a)return;const l=5*60*1e3;(!n||Date.now()-n>l)&&r6(a)},[n]);function i(){return r!==0?null:P(De.button,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},onClick:()=>e("TEMP"),style:{background:"linear-gradient(135deg, #7289DA, #5B6EAB)"},type:"button",className:"flex justify-center items-center w-full h-16 border-t border-gray-200",children:P("div",{className:`flex flex-row items-center transform transition-transform duration-150
|
|
177
|
+
hover:scale-105 active:scale-95`,children:[P("span",{className:"text-sm text-slate-50 pr-3",children:"Send us a new message"}),P(Mw,{color:"#FFFFFF",size:18,strokeWidth:1})]})})}function o(a,l,f){var m,y,b;const c=a.messages[a.messages.length-1],h=a.status==="open";return P("div",{className:`flex flex-row items-center px-3 py-4 hover:bg-gray-200 cursor-pointer ${f?"":"border-b border-gray-200 "}`,onClick:()=>e(a.threadId),children:[P("div",{className:"relative inline-block mr-3",children:[P("img",{className:"inline-block size-[32px] rounded-full",src:((m=a==null?void 0:a.csMember)==null?void 0:m.displayAvatarURL)??"http://placehold.co/250x250"}),((y=a==null?void 0:a.csMember)==null?void 0:y.status)&&P("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-2 ring-white dark:ring-neutral-900 ${Dh(a.csMember.status,"bg")}`})]}),P("div",{className:"flex flex-1 flex-col",children:[P("p",{className:`text-sm/3 ${h?"font-semibold":""}`,children:(b=a==null?void 0:a.csMember)==null?void 0:b.displayName}),P("p",{className:"text-xs text-gray-500 line-clamp-1",children:c.content})]}),P("div",{className:"ml-2",children:P("p",{className:"text-xs text-gray-500",children:jd(c.date)})})]},`conversation-${l}`)}function s(){const a=[...t].filter(c=>c.status==="open"),l=[...t].filter(c=>c.status==="closed"),f=c=>c.sort((h,m)=>m.lastMessageDate-h.lastMessageDate).map((h,m)=>h.messages.length?o(h,m,m+1===c.length):null);return P(De.div,{initial:{opacity:0,x:-30},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col flex-1 p-2 overflow-y-auto",children:[a.length>0&&P("div",{className:"mb-2",children:[P("span",{className:"text-sm",children:"Current conversation"}),f(a)]}),l.length>0&&P(Pt,{children:[P("span",{className:"text-sm",children:"Closed messages"}),f(l)]})]})}return P("div",{className:"flex flex-col flex-1 overflow-auto",children:[s(),i()]})},Sm=({IconComponent:t,onClick:e})=>P("button",{onClick:e,className:`flex mr-2 items-center justify-center w-8 h-8
|
|
180
178
|
transform transition-transform duration-150
|
|
181
|
-
hover:scale-110 active:scale-95`,children:
|
|
179
|
+
hover:scale-110 active:scale-95`,children:P(t,{})}),s6=({size:t})=>P("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||26,height:t||26,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-x",children:[P("path",{d:"M18 6 6 18"}),P("path",{d:"m6 6 12 12"})]}),a6=({size:t})=>P("svg",{xmlns:"http://www.w3.org/2000/svg",width:t||24,height:t||24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-chevron-left",children:P("path",{d:"m15 18-6-6 6-6"})}),Em={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},c6=()=>{var h,m,y,b,w,T;const{setChatOpen:t,setOpenConversationId:e,guildSettings:n,conversations:r,openConversationId:i}=Nt(),o=r.find(x=>x.status==="open"),s=!!i,a=r.length===1&&r[0].status==="closed",l=r.length>1,f=s&&(a||l),c=i&&(o!=null&&o.csMember)&&((h=o==null?void 0:o.csMember)==null?void 0:h.displayName)!=="Customer support"?{title:(m=o==null?void 0:o.csMember)==null?void 0:m.displayName,subtitle:(y=o==null?void 0:o.csMember)!=null&&y.status?S_((b=o==null?void 0:o.csMember)==null?void 0:b.status):null,avatar:(w=o==null?void 0:o.csMember)==null?void 0:w.displayAvatarURL,status:(T=o==null?void 0:o.csMember)==null?void 0:T.status}:{title:(n==null?void 0:n.header_title)??Em.title,subtitle:(n==null?void 0:n.header_subtitle)??Em.subtitle,avatar:(n==null?void 0:n.iconURL)||"https://i.imgur.com/ecjl5HR.png"};return P("div",{style:{background:"linear-gradient(135deg, #7289DA, #5B6EAB)",boxShadow:"0 4px 4px rgba(0, 0, 0, 0.1)"},className:"flex flex-row items-center py-5 px-4 text-white",children:[f&&P(Sm,{onClick:()=>e(null),IconComponent:a6}),P("div",{className:"relative inline-block mr-3",children:[P("img",{className:"inline-block w-[40px] rounded-full",src:c.avatar}),c.status&&P("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-2 ring-white dark:ring-neutral-900 ${Dh(c.status,"bg")}`})]}),P("div",{className:"flex-1 flex-col",children:[P("p",{className:"text-lg/5 font-regular",children:c.title}),c.subtitle&&P("p",{className:"flex-1 text-xs/4 line-clamp-2",children:c.subtitle})]}),P(Sm,{onClick:()=>t(!1),IconComponent:s6})]})};function l6(){const[t,e]=gt({width:null,height:null});return Re(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),t}const u6=()=>{const t=l6();return!t.width||!t.height?!1:t.width>t.height?t.width<=Dd||t.height<=R1:t.width<=Dd},f6=()=>{const{openConversationId:t,conversations:e,isChatVisible:n}=Nt(),r=u6(),i=!t&&e.length,o={position:"fixed",inset:"0px",width:"100%",height:"100%",zIndex:9999,transformOrigin:"bottom right"},s={position:"fixed",bottom:"110px",right:"30px",width:"400px",height:"700px",maxWidth:"calc(100% - 60px)",maxHeight:"calc(100% - 124px)",zIndex:9999,transformOrigin:"bottom right"};return P(cs,{children:n&&P(De.div,{initial:{opacity:0,scale:.8,y:r?0:20},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.8,y:r?0:20},transition:r?{duration:.2,ease:"easeInOut"}:{type:"spring",stiffness:500,damping:28,mass:.8},style:r?o:s,children:P("div",{className:`flex flex-col h-full bg-white shadow-xl overflow-hidden ${r?"":"rounded-xl"}`,children:[P(c6,{}),i?P(o6,{}):P(x_,{})]})},"chatbox")})};async function d6(){const{setGuildSettings:t,guildSettings:e}=Nt.getState();if(e.lastUpdate)return;const n=new Headers;n.append("Content-Type","application/json");try{const i=await(await fetch(`${le.domain}/guildSettings/${le.app_id}`,{method:"GET",headers:n})).json();t(i)}catch{}}async function h6(){const t=new Headers;t.append("Content-Type","application/json");try{return(await(await fetch(`${le.domain}/guildSettings/status/${le.app_id}`,{method:"GET",headers:t})).json()).active}catch{return!1}}function p6(t,e){const n=it(document.title),r=it(null),i=it(!1);ut(()=>{n.current||(n.current=document.title)},[]),ut(()=>{if(r.current!==null&&(clearInterval(r.current),r.current=null),e&&t>0){const o=()=>{const s=t>1?"s":"";return`(${t}) New message${s} - ${n.current}`};document.title=o(),i.current=!0,r.current=window.setInterval(()=>{i.current?(document.title=n.current,i.current=!1):(document.title=o(),i.current=!0)},5e3)}else document.title=n.current,i.current=!1;return()=>{r.current!==null&&(clearInterval(r.current),r.current=null),document.title=n.current}},[t,e]),ut(()=>{if(e&&t>0&&i.current){const o=t>1?"s":"";document.title=`(${t}) New message${o} - ${n.current}`}},[t,e])}function m6(){const{isChatOpen:t,setChatVisible:e,toggleChatOpen:n,isNetworkInitialized:r,setNetworkInitialized:i,username:o,email:s,addMessage:a,conversations:l,_REHYDRATED_:f,networkError:c,isLoading:h,unreadCount:m,markMessagesAsReadWithSync:y,syncUnreadCountFromServer:b,initializeUnreadState:w}=Nt(),[T,x]=gt(!1);p6(m,m>0&&!t),ut(()=>{t&&m>0&&y()},[t,m,y]),ut(()=>{(async()=>{const O=await h6();x(O)})()},[]),ut(()=>{w()},[w]);const v=kt(()=>(!o||!s)&&!l.filter(j=>j.messages.filter(B=>B.customRenderer===Mn.IntroduceYourself)).length?(a("TEMP",$1),!0):!1,[o,s,a,l]);return ut(()=>{f&&(async()=>(await d6(),!v()&&(o||s)&&!r&&(i6(),i(!0),b())))()},[r,i,v,b,o,s,f]),ut(()=>{if(t)e(!0);else{const O=setTimeout(()=>e(!1),300);return()=>clearTimeout(O)}},[t,e]),T?P(Pt,{children:[P(Lw,{onClick:()=>n(),isOpen:t,unreadCount:m}),P(f6,{}),P(()=>c?P("div",{style:{position:"fixed",bottom:"90px",right:"20px",backgroundColor:"#EF4444",color:"white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,maxWidth:"300px",fontSize:"14px"},children:[P("strong",{children:"Connection Error"}),P("p",{style:{margin:"4px 0 0 0",fontSize:"12px"},children:c})]}):null,{}),P(()=>!h||!t?null:P("div",{style:{position:"fixed",bottom:"90px",right:"20px",backgroundColor:"#7289DA",color:"white",padding:"8px 12px",borderRadius:"8px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:9999,fontSize:"12px"},children:"Loading..."}),{}),P("div",{id:"deskcord-lightbox-portal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:2147482e3,pointerEvents:"none"}})]}):null}const y6=()=>{const t=it(null),[e,n]=gt(null),[r,i]=gt(null);return ut(()=>{if(!t.current)return;let o=t.current.shadowRoot;o||(o=t.current.attachShadow({mode:"open"}));let s=o.querySelector("#deskcord-shadow-container");s||(s=document.createElement("div"),s.id="deskcord-shadow-container",s.style.cssText=`
|
|
182
180
|
all: initial;
|
|
183
181
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
184
182
|
font-size: 16px;
|
|
@@ -197,6 +195,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
197
195
|
height: 0;
|
|
198
196
|
z-index: 2147483647;
|
|
199
197
|
pointer-events: none;
|
|
198
|
+
overflow-x: hidden;
|
|
200
199
|
}
|
|
201
200
|
|
|
202
201
|
/* Allow pointer events on actual widget elements */
|
|
@@ -215,4 +214,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
215
214
|
-webkit-font-smoothing: antialiased;
|
|
216
215
|
-moz-osx-font-smoothing: grayscale;
|
|
217
216
|
}
|
|
218
|
-
`,o.insertBefore(f,o.firstChild)),n(o),i(s),()=>{}},[]),
|
|
217
|
+
`,o.insertBefore(f,o.firstChild)),n(o),i(s),()=>{}},[]),P(Pt,{children:[P("div",{ref:t,id:"deskcord-shadow-host",style:{position:"fixed",top:0,left:0,width:0,height:0,overflow:"visible",zIndex:2147483647,pointerEvents:"none"}}),e&&r&&gn.createPortal(P(g6,{value:e,children:P(m6,{})}),r)]})},Am=gn.createContext(null),g6=({value:t,children:e})=>P(Am.Provider,{value:t,children:e});window.deskcord?window.deskcord.openChatbox=()=>{Nt.getState().setChatOpen(!0)}:window.deskcord={settings:{app_id:""},openChatbox:()=>{}};let Dr=document.getElementById("deskcord-root");Dr||(Dr=document.createElement("div"),Dr.id="deskcord-root",document.body.appendChild(Dr)),gn.render(P(gn.StrictMode,{children:P(y6,{})}),Dr)})();
|