deskcord 0.4.8 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/deskcord.min.js +25 -25
- package/package.json +1 -1
package/dist/deskcord.min.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";var wn,$,Os,_e,Fs,Vs,si,Us,ai,ci,li,$s,vn={},zs=[],kh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,or=Array.isArray;function ne(t,e){for(var n in e)t[n]=e[n];return t}function ui(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function B(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?wn.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 _n(t,s,r,i,null)}function _n(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??++Os,__i:-1,__u:0};return i==null&&$.vnode!=null&&$.vnode(o),o}function js(){return{current:null}}function Z(t){return t.children}function Rt(t,e){this.props=t,this.context=e}function Ve(t,e){if(e==null)return t.__?Ve(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"?Ve(t):null}function Hs(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 Hs(t)}}function di(t){(!t.__d&&(t.__d=!0)&&_e.push(t)&&!sr.__r++||Fs!==$.debounceRendering)&&((Fs=$.debounceRendering)||Vs)(sr)}function sr(){var t,e,n,r,i,o,s,a;for(_e.sort(si);t=_e.shift();)t.__d&&(e=_e.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=ne({},i)).__v=i.__v+1,$.vnode&&$.vnode(r),hi(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Ve(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Gs(s,r,a),r.__e!=o&&Hs(r)),_e.length>e&&_e.sort(si));sr.__r=0}function Ws(t,e,n,r,i,o,s,a,c,h,l){var f,m,g,v,w,E,_=r&&r.__k||zs,C=e.length;for(c=Th(n,e,_,c,C),f=0;f<C;f++)(g=n.__k[f])!=null&&(m=g.__i===-1?vn:_[g.__i]||vn,g.__i=f,E=hi(t,g,m,i,o,s,a,c,h,l),v=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&fi(m.ref,null,g),l.push(g.ref,g.__c||v,g)),w==null&&v!=null&&(w=v),4&g.__u||m.__k===g.__k?c=Ks(g,c,t):typeof g.type=="function"&&E!==void 0?c=E:v&&(c=v.nextSibling),g.__u&=-7);return n.__e=w,c}function Th(t,e,n,r,i){var o,s,a,c,h,l=n.length,f=l,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?_n(null,s,null,null,null):or(s)?_n(Z,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?_n(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(h=s.__i=Ah(s,n,c,f))!==-1&&(f--,(a=n[h])&&(a.__u|=2)),a==null||a.__v===null?(h==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):h!=c&&(h==c-1?m--:h==c+1?m++:(h>c?m--:m++,s.__u|=4))):t.__k[o]=null;if(f)for(o=0;o<l;o++)(a=n[o])!=null&&!(2&a.__u)&&(a.__e==r&&(r=Ve(a)),Xs(a,a));return r}function Ks(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=Ks(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Ve(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function re(t,e){return e=e||[],t==null||typeof t=="boolean"||(or(t)?t.some(function(n){re(n,e)}):e.push(t)),e}function Ah(t,e,n,r){var i,o,s=t.key,a=t.type,c=e[n];if(c===null||c&&s==c.key&&a===c.type&&!(2&c.__u))return n;if(r>(c!=null&&!(2&c.__u)?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((c=e[i])&&!(2&c.__u)&&s==c.key&&a===c.type)return i;i--}if(o<e.length){if((c=e[o])&&!(2&c.__u)&&s==c.key&&a===c.type)return o;o++}}return-1}function qs(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||kh.test(e)?n:n+"px"}function ar(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||qs(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||qs(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(Us,"$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=ai,t.addEventListener(e,o?li:ci,o)):t.removeEventListener(e,o?li:ci,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 Ys(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ai++;else if(e.t<n.u)return;return n($.event?$.event(e):e)}}}function hi(t,e,n,r,i,o,s,a,c,h){var l,f,m,g,v,w,E,_,C,k,I,T,M,N,A,R,L,O=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=e.__e=n.__e]),(l=$.__b)&&l(e);t:if(typeof O=="function")try{if(_=e.props,C="prototype"in O&&O.prototype.render,k=(l=O.contextType)&&r[l.__c],I=l?k?k.props.value:l.__:r,n.__c?E=(f=e.__c=n.__c).__=f.__E:(C?e.__c=f=new O(_,I):(e.__c=f=new Rt(_,I),f.constructor=O,f.render=Ih),k&&k.sub(f),f.props=_,f.state||(f.state={}),f.context=I,f.__n=r,m=f.__d=!0,f.__h=[],f._sb=[]),C&&f.__s==null&&(f.__s=f.state),C&&O.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ne({},f.__s)),ne(f.__s,O.getDerivedStateFromProps(_,f.__s))),g=f.props,v=f.state,f.__v=e,m)C&&O.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),C&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(C&&O.getDerivedStateFromProps==null&&_!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(_,I),!f.__e&&(f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(_,f.__s,I)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(f.props=_,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(et){et&&(et.__=e)}),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[],f.__h.length&&s.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(_,f.__s,I),C&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,v,w)})}if(f.context=I,f.props=_,f.__P=t,f.__e=!1,M=$.__r,N=0,C){for(f.state=f.__s,f.__d=!1,M&&M(e),l=f.render(f.props,f.state,f.context),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[]}else do f.__d=!1,M&&M(e),l=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++N<25);f.state=f.__s,f.getChildContext!=null&&(r=ne(ne({},r),f.getChildContext())),C&&!m&&f.getSnapshotBeforeUpdate!=null&&(w=f.getSnapshotBeforeUpdate(g,v)),a=Ws(t,or(R=l!=null&&l.type===Z&&l.key==null?l.props.children:l)?R:[R],e,n,r,i,o,s,a,c,h),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),E&&(f.__E=f.__=null)}catch(et){if(e.__v=null,c||o!=null)if(et.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(L=o.length;L--;)ui(o[L]);else e.__e=n.__e,e.__k=n.__k;$.__e(et,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Ph(n.__e,e,n,r,i,o,s,c,h);return(l=$.diffed)&&l(e),128&e.__u?void 0:a}function Gs(t,e,n){for(var r=0;r<n.length;r++)fi(n[r],n[++r],n[++r]);$.__c&&$.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){$.__e(o,i.__v)}})}function Ph(t,e,n,r,i,o,s,a,c){var h,l,f,m,g,v,w,E=n.props,_=e.props,C=e.type;if(C=="svg"?i="http://www.w3.org/2000/svg":C=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(h=0;h<o.length;h++)if((g=o[h])&&"setAttribute"in g==!!C&&(C?g.localName==C:g.nodeType==3)){t=g,o[h]=null;break}}if(t==null){if(C==null)return document.createTextNode(_);t=document.createElementNS(i,C,_.is&&_),a&&($.__m&&$.__m(e,o),a=!1),o=null}if(C===null)E===_||a&&t.data===_||(t.data=_);else{if(o=o&&wn.call(t.childNodes),E=n.props||vn,!a&&o!=null)for(E={},h=0;h<t.attributes.length;h++)E[(g=t.attributes[h]).name]=g.value;for(h in E)if(g=E[h],h!="children"){if(h=="dangerouslySetInnerHTML")f=g;else if(!(h in _)){if(h=="value"&&"defaultValue"in _||h=="checked"&&"defaultChecked"in _)continue;ar(t,h,null,g,i)}}for(h in _)g=_[h],h=="children"?m=g:h=="dangerouslySetInnerHTML"?l=g:h=="value"?v=g:h=="checked"?w=g:a&&typeof g!="function"||E[h]===g||ar(t,h,g,E[h],i);if(l)a||f&&(l.__html===f.__html||l.__html===t.innerHTML)||(t.innerHTML=l.__html),e.__k=[];else if(f&&(t.innerHTML=""),Ws(t,or(m)?m:[m],e,n,r,C=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ve(n,0),a,c),o!=null)for(h=o.length;h--;)ui(o[h]);a||(h="value",C=="progress"&&v==null?t.removeAttribute("value"):v!==void 0&&(v!==t[h]||C=="progress"&&!v||C=="option"&&v!==E[h])&&ar(t,h,v,E[h],i),h="checked",w!==void 0&&w!==t[h]&&ar(t,h,w,E[h],i))}return t}function fi(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){$.__e(i,n)}}function Xs(t,e,n){var r,i;if($.unmount&&$.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||fi(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){$.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Xs(r[i],e,n||typeof t.type!="function");n||ui(t.__e),t.__c=t.__=t.__e=void 0}function Ih(t,e,n){return this.constructor(t,n)}function xn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),$.__&&$.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],hi(e,t=(!r&&n||e).__k=B(Z,null,[t]),i||vn,vn,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?wn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Gs(o,t,s)}function Zs(t,e){xn(t,e,Zs)}function Mh(t,e,n){var r,i,o,s,a=ne({},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?wn.call(arguments,2):n),_n(t.type,a,r||t.key,i||t.ref,null)}function kt(t,e){var n={__c:e="__cC"+$s++,__: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,di(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}wn=zs.slice,$={__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}},Os=0,Rt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ne({},this.state),typeof t=="function"&&(t=t(ne({},n),this.props)),t&&ne(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),di(this))},Rt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),di(this))},Rt.prototype.render=Z,_e=[],Vs=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,si=function(t,e){return t.__v.__b-e.__v.__b},sr.__r=0,Us=/(PointerCapture)$|Capture$/i,ai=0,ci=Ys(!1),li=Ys(!0),$s=0;var Rh=0;function x(t,e,n,r,i,o){e||(e={});var s,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?s=e[a]:c[a]=e[a];var h={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Rh,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return $.vnode&&$.vnode(h),h}var ie,Y,pi,Js,Ue=0,Qs=[],rt=$,ta=rt.__b,ea=rt.__r,na=rt.diffed,ra=rt.__c,ia=rt.unmount,oa=rt.__;function xe(t,e){rt.__h&&rt.__h(Y,t,Ue||e),Ue=0;var n=Y.__H||(Y.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function j(t){return Ue=1,bn(aa,t)}function bn(t,e,n){var r=xe(ie++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):aa(void 0,e),function(a){var c=r.__N?r.__N[0]:r.__[0],h=r.t(c,a);c!==h&&(r.__N=[h,r.__[1]],r.__c.setState({}))}],r.__c=Y,!Y.u)){var i=function(a,c,h){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(m){return!!m.__c});if(l.every(function(m){return!m.__N}))return!o||o.call(this,a,c,h);var f=r.__c.props!==a;return l.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(f=!0)}}),o&&o.call(this,a,c,h)||f};Y.u=!0;var o=Y.shouldComponentUpdate,s=Y.componentWillUpdate;Y.componentWillUpdate=function(a,c,h){if(this.__e){var l=o;o=void 0,i(a,c,h),o=l}s&&s.call(this,a,c,h)},Y.shouldComponentUpdate=i}return r.__N||r.__}function U(t,e){var n=xe(ie++,3);!rt.__s&&yi(n.__H,e)&&(n.__=t,n.i=e,Y.__H.__h.push(n))}function oe(t,e){var n=xe(ie++,4);!rt.__s&&yi(n.__H,e)&&(n.__=t,n.i=e,Y.__h.push(n))}function F(t){return Ue=5,vt(function(){return{current:t}},[])}function Cn(t,e,n){Ue=6,oe(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 vt(t,e){var n=xe(ie++,7);return yi(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Q(t,e){return Ue=8,vt(function(){return t},e)}function ut(t){var e=Y.context[t.__c],n=xe(ie++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(Y)),e.props.value):t.__}function mi(t,e){rt.useDebugValue&&rt.useDebugValue(e?e(t):t)}function Nh(t){var e=xe(ie++,10),n=j();return e.__=t,Y.componentDidCatch||(Y.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function $e(){var t=xe(ie++,11);if(!t.__){for(var e=Y.__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 Dh(){for(var t;t=Qs.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(cr),t.__H.__h.forEach(gi),t.__H.__h=[]}catch(e){t.__H.__h=[],rt.__e(e,t.__v)}}rt.__b=function(t){Y=null,ta&&ta(t)},rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),oa&&oa(t,e)},rt.__r=function(t){ea&&ea(t),ie=0;var e=(Y=t.__c).__H;e&&(pi===Y?(e.__h=[],Y.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(cr),e.__h.forEach(gi),e.__h=[],ie=0)),pi=Y},rt.diffed=function(t){na&&na(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(Qs.push(e)!==1&&Js===rt.requestAnimationFrame||((Js=rt.requestAnimationFrame)||Lh)(Dh)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),pi=Y=null},rt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(cr),n.__h=n.__h.filter(function(r){return!r.__||gi(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],rt.__e(r,n.__v)}}),ra&&ra(t,e)},rt.unmount=function(t){ia&&ia(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{cr(r)}catch(i){e=i}}),n.__H=void 0,e&&rt.__e(e,n.__v))};var sa=typeof requestAnimationFrame=="function";function Lh(t){var e,n=function(){clearTimeout(r),sa&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);sa&&(e=requestAnimationFrame(n))}function cr(t){var e=Y,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Y=e}function gi(t){var e=Y;t.__c=t.__(),Y=e}function yi(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function aa(t,e){return typeof e=="function"?e(t):e}function ca(t,e){for(var n in e)t[n]=e[n];return t}function wi(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 vi(t,e){var n=e(),r=j({t:{__:n,u:e}}),i=r[0].t,o=r[1];return oe(function(){i.__=n,i.u=e,_i(i)&&o({t:i})},[t,n,e]),U(function(){return _i(i)&&o({t:i}),t(function(){_i(i)&&o({t:i})})},[t]),n}function _i(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 xi(t){t()}function bi(t){return t}function Ci(){return[!1,xi]}var En=oe;function lr(t,e){this.props=t,this.context=e}function la(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:wi(this.props,i)}function r(i){return this.shouldComponentUpdate=n,B(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(lr.prototype=new Rt).isPureReactComponent=!0,lr.prototype.shouldComponentUpdate=function(t,e){return wi(this.props,t)||wi(this.state,e)};var ua=$.__b;$.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),ua&&ua(t)};var Bh=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function he(t){function e(n){var r=ca({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=Bh,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var da=function(t,e){return t==null?null:re(re(t).map(e))},Ei={map:da,forEach:da,count:function(t){return t?re(t).length:0},only:function(t){var e=re(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:re},Oh=$.__e;$.__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)}Oh(t,e,n,r)};var ha=$.unmount;function fa(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=ca({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return fa(r,e,n)})),t}function pa(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return pa(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 Sn(){this.__u=0,this.o=null,this.__b=null}function ma(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function ga(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 B(n,o)}return i.displayName="Lazy",i.__f=!0,i}function ze(){this.i=null,this.l=null}$.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ha&&ha(t)},(Sn.prototype=new Rt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=ma(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 c=r.state.__a;r.__v.__k[0]=pa(c,c.__c.__P,c.__c.__O)}var h;for(r.setState({__a:r.__b=null});h=r.o.pop();)h.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Sn.prototype.componentWillUnmount=function(){this.o=[]},Sn.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]=fa(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&B(Z,null,t.fallback);return i&&(i.__u&=-33),[B(Z,null,e.__a?null:t.children),i]};var ya=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 Fh(t){return this.getChildContext=function(){return t.context},t.children}function Vh(t){var e=this,n=t.h;e.componentWillUnmount=function(){xn(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)}}),xn(B(Fh,{context:e.context},t.__v),e.v)}function Si(t,e){var n=B(Vh,{__v:t,h:e});return n.containerInfo=e,n}(ze.prototype=new Rt).__a=function(t){var e=this,n=ma(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),ya(e,t,r)):i()};n?n(o):o()}},ze.prototype.render=function(t){this.i=null,this.l=new Map;var e=re(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},ze.prototype.componentDidUpdate=ze.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){ya(t,n,e)})};var wa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Uh=/^(?: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]/,$h=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,zh=/[A-Z0-9]/g,jh=typeof document<"u",Hh=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function va(t,e,n){return e.__k==null&&(e.textContent=""),xn(t,e),typeof n=="function"&&n(),t?t.__c:null}function _a(t,e,n){return Zs(t,e),typeof n=="function"&&n(),t?t.__c:null}Rt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Rt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var xa=$.event;function Wh(){}function Kh(){return this.cancelBubble}function qh(){return this.defaultPrevented}$.event=function(t){return xa&&(t=xa(t)),t.persist=Wh,t.isPropagationStopped=Kh,t.isDefaultPrevented=qh,t.nativeEvent=t};var ki,Yh={enumerable:!1,configurable:!0,get:function(){return this.class}},ba=$.vnode;$.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||jh&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":c==="translate"&&a==="no"?a=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||Hh(n.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":$h.test(s)&&(s=c):c=s="oninput":o&&Uh.test(s)?s=s.replace(zh,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&i[s=c]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=re(n.children).forEach(function(h){h.props.selected=i.value.indexOf(h.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=re(n.children).forEach(function(h){h.props.selected=i.multiple?i.defaultValue.indexOf(h.props.value)!=-1:i.defaultValue==h.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Yh)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=wa,ba&&ba(t)};var Ca=$.__r;$.__r=function(t){Ca&&Ca(t),ki=t.__c};var Ea=$.diffed;$.diffed=function(t){Ea&&Ea(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),ki=null};var Sa={ReactCurrentDispatcher:{current:{readContext:function(t){return ki.__n[t.__c].props.value},useCallback:Q,useContext:ut,useDebugValue:mi,useDeferredValue:bi,useEffect:U,useId:$e,useImperativeHandle:Cn,useInsertionEffect:En,useLayoutEffect:oe,useMemo:vt,useReducer:bn,useRef:F,useState:j,useSyncExternalStore:vi,useTransition:Ci}}},ka="18.3.1";function Ta(t){return B.bind(null,t)}function je(t){return!!t&&t.$$typeof===wa}function Aa(t){return je(t)&&t.type===Z}function Pa(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Ti(t){return je(t)?Mh.apply(null,arguments):t}function Ia(t){return!!t.__k&&(xn(null,t),!0)}function Ma(t){return t&&(t.base||t.nodeType===1&&t)||null}var Ra=function(t,e){return t(e)},Na=function(t,e){return t(e)},Da=Z,La=je,He={useState:j,useId:$e,useReducer:bn,useEffect:U,useLayoutEffect:oe,useInsertionEffect:En,useTransition:Ci,useDeferredValue:bi,useSyncExternalStore:vi,startTransition:xi,useRef:F,useImperativeHandle:Cn,useMemo:vt,useCallback:Q,useContext:ut,useDebugValue:mi,version:"18.3.1",Children:Ei,render:va,hydrate:_a,unmountComponentAtNode:Ia,createPortal:Si,createElement:B,createContext:kt,createFactory:Ta,cloneElement:Ti,createRef:js,Fragment:Z,isValidElement:je,isElement:La,isFragment:Aa,isMemo:Pa,findDOMNode:Ma,Component:Rt,PureComponent:lr,memo:la,forwardRef:he,flushSync:Na,unstable_batchedUpdates:Ra,StrictMode:Da,Suspense:Sn,SuspenseList:ze,lazy:ga,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Sa};const Gh=Object.freeze(Object.defineProperty({__proto__:null,Children:Ei,Component:Rt,Fragment:Z,PureComponent:lr,StrictMode:Da,Suspense:Sn,SuspenseList:ze,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Sa,cloneElement:Ti,createContext:kt,createElement:B,createFactory:Ta,createPortal:Si,createRef:js,default:He,findDOMNode:Ma,flushSync:Na,forwardRef:he,hydrate:_a,isElement:La,isFragment:Aa,isMemo:Pa,isValidElement:je,lazy:ga,memo:la,render:va,startTransition:xi,unmountComponentAtNode:Ia,unstable_batchedUpdates:Ra,useCallback:Q,useContext:ut,useDebugValue:mi,useDeferredValue:bi,useEffect:U,useErrorBoundary:Nh,useId:$e,useImperativeHandle:Cn,useInsertionEffect:En,useLayoutEffect:oe,useMemo:vt,useReducer:bn,useRef:F,useState:j,useSyncExternalStore:vi,useTransition:Ci,version:ka},Symbol.toStringTag,{value:"Module"})),Xh='*,: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}}',Zh=".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}}",Ai=kt({});function Pi(t){const e=F(null);return e.current===null&&(e.current=t()),e.current}const Ii=typeof window<"u",Ba=Ii?oe:U,ur=kt(null);function Mi(t,e){t.indexOf(e)===-1&&t.push(e)}function Ri(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const se=(t,e,n)=>n>e?e:n<t?t:n;let dr=()=>{};const ae={},Oa=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function Fa(t){return typeof t=="object"&&t!==null}const Va=t=>/^0[^.\s]+$/u.test(t);function Ni(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ft=t=>t,Jh=(t,e)=>n=>e(t(n)),kn=(...t)=>t.reduce(Jh),Tn=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Di{constructor(){this.subscriptions=[]}add(e){return Mi(this.subscriptions,e),()=>Ri(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 Gt=t=>t*1e3,Xt=t=>t/1e3;function Ua(t,e){return e?t*(1e3/e):0}const $a=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Qh=1e-7,tf=12;function ef(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=$a(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>Qh&&++a<tf);return s}function An(t,e,n,r){if(t===e&&n===r)return Ft;const i=o=>ef(o,0,1,t,n);return o=>o===0||o===1?o:$a(i(o),e,r)}const za=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,ja=t=>e=>1-t(1-e),Ha=An(.33,1.53,.69,.99),Li=ja(Ha),Wa=za(Li),Ka=t=>(t*=2)<1?.5*Li(t):.5*(2-Math.pow(2,-10*(t-1))),Bi=t=>1-Math.sin(Math.acos(t)),qa=ja(Bi),Ya=za(Bi),nf=An(.42,0,1,1),rf=An(0,0,.58,1),Ga=An(.42,0,.58,1),of=t=>Array.isArray(t)&&typeof t[0]!="number",Xa=t=>Array.isArray(t)&&typeof t[0]=="number",Za={linear:Ft,easeIn:nf,easeInOut:Ga,easeOut:rf,circIn:Bi,circInOut:Ya,circOut:qa,backIn:Li,backInOut:Wa,backOut:Ha,anticipate:Ka},sf=t=>typeof t=="string",Ja=t=>{if(Xa(t)){dr(t.length===4);const[e,n,r,i]=t;return An(e,n,r,i)}else if(sf(t))return dr(Za[t]!==void 0),Za[t];return t},hr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],Qa={value:null,addProjectionMetrics:null};function af(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},c=0;function h(f){s.has(f)&&(l.schedule(f),t()),c++,f(a)}const l={schedule:(f,m=!1,g=!1)=>{const w=g&&i?n:r;return m&&s.add(f),w.has(f)||w.add(f),f},cancel:f=>{r.delete(f),s.delete(f)},process:f=>{if(a=f,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(h),e&&Qa.value&&Qa.value.frameloop[e].push(c),c=0,n.clear(),i=!1,o&&(o=!1,l.process(f))}};return l}const cf=40;function tc(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=hr.reduce((k,I)=>(k[I]=af(o,e?I:void 0),k),{}),{setup:a,read:c,resolveKeyframes:h,preUpdate:l,update:f,preRender:m,render:g,postRender:v}=s,w=()=>{const k=ae.useManualTiming?i.timestamp:performance.now();n=!1,ae.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(k-i.timestamp,cf),1)),i.timestamp=k,i.isProcessing=!0,a.process(i),c.process(i),h.process(i),l.process(i),f.process(i),m.process(i),g.process(i),v.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(w))},E=()=>{n=!0,r=!0,i.isProcessing||t(w)};return{schedule:hr.reduce((k,I)=>{const T=s[I];return k[I]=(M,N=!1,A=!1)=>(n||E(),T.schedule(M,N,A)),k},{}),cancel:k=>{for(let I=0;I<hr.length;I++)s[hr[I]].cancel(k)},state:i,steps:s}}const{schedule:tt,cancel:fe,state:Ct,steps:Oi}=tc(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ft,!0);let fr;function lf(){fr=void 0}const Pt={now:()=>(fr===void 0&&Pt.set(Ct.isProcessing||ae.useManualTiming?Ct.timestamp:performance.now()),fr),set:t=>{fr=t,queueMicrotask(lf)}},ec=t=>e=>typeof e=="string"&&e.startsWith(t),Fi=ec("--"),uf=ec("var(--"),Vi=t=>uf(t)?df.test(t.split("/*")[0].trim()):!1,df=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,We={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Pn={...We,transform:t=>se(0,1,t)},pr={...We,default:1},In=t=>Math.round(t*1e5)/1e5,Ui=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function hf(t){return t==null}const ff=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,$i=(t,e)=>n=>!!(typeof n=="string"&&ff.test(n)&&n.startsWith(t)||e&&!hf(n)&&Object.prototype.hasOwnProperty.call(n,e)),nc=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match(Ui);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},pf=t=>se(0,255,t),zi={...We,transform:t=>Math.round(pf(t))},be={test:$i("rgb","red"),parse:nc("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+zi.transform(t)+", "+zi.transform(e)+", "+zi.transform(n)+", "+In(Pn.transform(r))+")"};function mf(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 ji={test:$i("#"),parse:mf,transform:be.transform},Mn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),pe=Mn("deg"),Zt=Mn("%"),V=Mn("px"),gf=Mn("vh"),yf=Mn("vw"),rc={...Zt,parse:t=>Zt.parse(t)/100,transform:t=>Zt.transform(t*100)},Ke={test:$i("hsl","hue"),parse:nc("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Zt.transform(In(e))+", "+Zt.transform(In(n))+", "+In(Pn.transform(r))+")"},pt={test:t=>be.test(t)||ji.test(t)||Ke.test(t),parse:t=>be.test(t)?be.parse(t):Ke.test(t)?Ke.parse(t):ji.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?be.transform(t):Ke.transform(t),getAnimatableNone:t=>{const e=pt.parse(t);return e.alpha=0,pt.transform(e)}},wf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function vf(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(Ui))==null?void 0:e.length)||0)+(((n=t.match(wf))==null?void 0:n.length)||0)>0}const ic="number",oc="color",_f="var",xf="var(",sc="${}",bf=/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 Rn(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(bf,c=>(pt.test(c)?(r.color.push(o),i.push(oc),n.push(pt.parse(c))):c.startsWith(xf)?(r.var.push(o),i.push(_f),n.push(c)):(r.number.push(o),i.push(ic),n.push(parseFloat(c))),++o,sc)).split(sc);return{values:n,split:a,indexes:r,types:i}}function ac(t){return Rn(t).values}function cc(t){const{split:e,types:n}=Rn(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===ic?o+=In(i[s]):a===oc?o+=pt.transform(i[s]):o+=i[s]}return o}}const Cf=t=>typeof t=="number"?0:pt.test(t)?pt.getAnimatableNone(t):t;function Ef(t){const e=ac(t);return cc(t)(e.map(Cf))}const me={test:vf,parse:ac,createTransformer:cc,getAnimatableNone:Ef};function Hi(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 Sf({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,c=2*n-a;i=Hi(c,a,t+1/3),o=Hi(c,a,t),s=Hi(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function mr(t,e){return n=>n>0?e:t}const it=(t,e,n)=>t+(e-t)*n,Wi=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},kf=[ji,be,Ke],Tf=t=>kf.find(e=>e.test(t));function lc(t){const e=Tf(t);if(!e)return!1;let n=e.parse(t);return e===Ke&&(n=Sf(n)),n}const uc=(t,e)=>{const n=lc(t),r=lc(e);if(!n||!r)return mr(t,e);const i={...n};return o=>(i.red=Wi(n.red,r.red,o),i.green=Wi(n.green,r.green,o),i.blue=Wi(n.blue,r.blue,o),i.alpha=it(n.alpha,r.alpha,o),be.transform(i))},Ki=new Set(["none","hidden"]);function Af(t,e){return Ki.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Pf(t,e){return n=>it(t,e,n)}function qi(t){return typeof t=="number"?Pf:typeof t=="string"?Vi(t)?mr:pt.test(t)?uc:Rf:Array.isArray(t)?dc:typeof t=="object"?pt.test(t)?uc:If:mr}function dc(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>qi(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function If(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=qi(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Mf(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 Rf=(t,e)=>{const n=me.createTransformer(e),r=Rn(t),i=Rn(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?Ki.has(t)&&!i.values.length||Ki.has(e)&&!r.values.length?Af(t,e):kn(dc(Mf(r,i),i.values),n):mr(t,e)};function hc(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?it(t,e,n):qi(t)(t,e)}const Nf=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>tt.update(e,n),stop:()=>fe(e),now:()=>Ct.isProcessing?Ct.timestamp:Pt.now()}},fc=(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 Yi(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 Df(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(Yi(r),gr);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:Xt(i)}}const Lf=5;function pc(t,e,n){const r=Math.max(e-Lf,0);return Ua(n-t(r),e-r)}const at={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},Gi=.001;function Bf({duration:t=at.duration,bounce:e=at.bounce,velocity:n=at.velocity,mass:r=at.mass}){let i,o,s=1-e;s=se(at.minDamping,at.maxDamping,s),t=se(at.minDuration,at.maxDuration,Xt(t)),s<1?(i=h=>{const l=h*s,f=l*t,m=l-n,g=Xi(h,s),v=Math.exp(-f);return Gi-m/g*v},o=h=>{const f=h*s*t,m=f*n+n,g=Math.pow(s,2)*Math.pow(h,2)*t,v=Math.exp(-f),w=Xi(Math.pow(h,2),s);return(-i(h)+Gi>0?-1:1)*((m-g)*v)/w}):(i=h=>{const l=Math.exp(-h*t),f=(h-n)*t+1;return-Gi+l*f},o=h=>{const l=Math.exp(-h*t),f=(n-h)*(t*t);return l*f});const a=5/t,c=Ff(i,o,a);if(t=Gt(t),isNaN(c))return{stiffness:at.stiffness,damping:at.damping,duration:t};{const h=Math.pow(c,2)*r;return{stiffness:h,damping:s*2*Math.sqrt(r*h),duration:t}}}const Of=12;function Ff(t,e,n){let r=n;for(let i=1;i<Of;i++)r=r-t(r)/e(r);return r}function Xi(t,e){return t*Math.sqrt(1-e*e)}const Vf=["duration","bounce"],Uf=["stiffness","damping","mass"];function mc(t,e){return e.some(n=>t[n]!==void 0)}function $f(t){let e={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...t};if(!mc(t,Uf)&&mc(t,Vf))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*se(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:at.mass,stiffness:i,damping:o}}else{const n=Bf(t);e={...e,...n,mass:at.mass},e.isResolvedFromDuration=!0}return e}function yr(t=at.visualDuration,e=at.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:c,damping:h,mass:l,duration:f,velocity:m,isResolvedFromDuration:g}=$f({...n,velocity:-Xt(n.velocity||0)}),v=m||0,w=h/(2*Math.sqrt(c*l)),E=s-o,_=Xt(Math.sqrt(c/l)),C=Math.abs(E)<5;r||(r=C?at.restSpeed.granular:at.restSpeed.default),i||(i=C?at.restDelta.granular:at.restDelta.default);let k;if(w<1){const T=Xi(_,w);k=M=>{const N=Math.exp(-w*_*M);return s-N*((v+w*_*E)/T*Math.sin(T*M)+E*Math.cos(T*M))}}else if(w===1)k=T=>s-Math.exp(-_*T)*(E+(v+_*E)*T);else{const T=_*Math.sqrt(w*w-1);k=M=>{const N=Math.exp(-w*_*M),A=Math.min(T*M,300);return s-N*((v+w*_*E)*Math.sinh(A)+T*E*Math.cosh(A))/T}}const I={calculatedDuration:g&&f||null,next:T=>{const M=k(T);if(g)a.done=T>=f;else{let N=T===0?v:0;w<1&&(N=T===0?Gt(v):pc(k,T,M));const A=Math.abs(N)<=r,R=Math.abs(s-M)<=i;a.done=A&&R}return a.value=a.done?s:M,a},toString:()=>{const T=Math.min(Yi(I),gr),M=fc(N=>I.next(T*N).value,T,30);return T+"ms "+M},toTransition:()=>{}};return I}yr.applyToOptions=t=>{const e=Df(t,100,yr);return t.ease=e.ease,t.duration=Gt(e.duration),t.type="keyframes",t};function Zi({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:h=.5,restSpeed:l}){const f=t[0],m={done:!1,value:f},g=A=>a!==void 0&&A<a||c!==void 0&&A>c,v=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let w=n*e;const E=f+w,_=s===void 0?E:s(E);_!==E&&(w=_-f);const C=A=>-w*Math.exp(-A/r),k=A=>_+C(A),I=A=>{const R=C(A),L=k(A);m.done=Math.abs(R)<=h,m.value=m.done?_:L};let T,M;const N=A=>{g(m.value)&&(T=A,M=yr({keyframes:[m.value,v(m.value)],velocity:pc(k,A,m.value),damping:i,stiffness:o,restDelta:h,restSpeed:l}))};return N(0),{calculatedDuration:null,next:A=>{let R=!1;return!M&&T===void 0&&(R=!0,I(A),N(A)),T!==void 0&&A>=T?M.next(A-T):(!R&&I(A),m)}}}function zf(t,e,n){const r=[],i=n||ae.mix||hc,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const c=Array.isArray(e)?e[s]||Ft:e;a=kn(c,a)}r.push(a)}return r}function jf(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(dr(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=zf(e,r,i),c=a.length,h=l=>{if(s&&l<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(l<t[f+1]);f++);const m=Tn(t[f],t[f+1],l);return a[f](m)};return n?l=>h(se(t[0],t[o-1],l)):h}function Hf(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Tn(0,e,r);t.push(it(n,1,i))}}function Wf(t){const e=[0];return Hf(e,t.length-1),e}function Kf(t,e){return t.map(n=>n*e)}function qf(t,e){return t.map(()=>e||Ga).splice(0,t.length-1)}function Nn({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=of(r)?r.map(Ja):Ja(r),o={done:!1,value:e[0]},s=Kf(n&&n.length===e.length?n:Wf(e),t),a=jf(s,e,{ease:Array.isArray(i)?i:qf(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const Yf=t=>t!==null;function Ji(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(Yf),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const Gf={decay:Zi,inertia:Zi,tween:Nn,keyframes:Nn,spring:yr};function gc(t){typeof t.type=="string"&&(t.type=Gf[t.type])}class Qi{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 Xf=t=>t/100;class to extends Qi{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!==Pt.now()&&this.tick(Pt.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;gc(e);const{type:n=Nn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const c=n||Nn;c!==Nn&&typeof a[0]!="number"&&(this.mixKeyframes=kn(Xf,hc(a[0],a[1])),a=[0,100]);const h=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-s})),h.calculatedDuration===null&&(h.calculatedDuration=Yi(h));const{calculatedDuration:l}=h;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}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:c}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:l,repeat:f,repeatType:m,repeatDelay:g,type:v,onUpdate:w,finalKeyframe:E}=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 _=this.currentTime-h*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?_<0:_>i;this.currentTime=Math.max(_,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let k=this.currentTime,I=r;if(f){const A=Math.min(this.currentTime,i)/a;let R=Math.floor(A),L=A%1;!L&&A>=1&&(L=1),L===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(m==="reverse"?(L=1-L,g&&(L-=g/a)):m==="mirror"&&(I=s)),k=se(0,1,L)*a}const T=C?{done:!1,value:l[0]}:I.next(k);o&&(T.value=o(T.value));let{done:M}=T;!C&&c!==null&&(M=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&M);return N&&v!==Zi&&(T.value=Ji(l,this.options,E,this.speed)),w&&w(T.value),N&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return Xt(this.calculatedDuration)}get time(){return Xt(this.currentTime)}set time(e){var n;e=Gt(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(Pt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Xt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Nf,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(Pt.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 Zf(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ce=t=>t*180/Math.PI,eo=t=>{const e=Ce(Math.atan2(t[1],t[0]));return no(e)},Jf={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:eo,rotateZ:eo,skewX:t=>Ce(Math.atan(t[1])),skewY:t=>Ce(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},no=t=>(t=t%360,t<0&&(t+=360),t),yc=eo,wc=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),vc=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Qf={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:wc,scaleY:vc,scale:t=>(wc(t)+vc(t))/2,rotateX:t=>no(Ce(Math.atan2(t[6],t[5]))),rotateY:t=>no(Ce(Math.atan2(-t[2],t[0]))),rotateZ:yc,rotate:yc,skewX:t=>Ce(Math.atan(t[4])),skewY:t=>Ce(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function ro(t){return t.includes("scale")?1:0}function io(t,e){if(!t||t==="none")return ro(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=Qf,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=Jf,i=a}if(!i)return ro(e);const o=r[e],s=i[1].split(",").map(ep);return typeof o=="function"?o(s):s[o]}const tp=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return io(n,e)};function ep(t){return parseFloat(t.trim())}const qe=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ye=new Set(qe),_c=t=>t===We||t===V,np=new Set(["x","y","z"]),rp=qe.filter(t=>!np.has(t));function ip(t){const e=[];return rp.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Ee={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})=>io(e,"x"),y:(t,{transform:e})=>io(e,"y")};Ee.translateX=Ee.x,Ee.translateY=Ee.y;const Se=new Set;let oo=!1,so=!1,ao=!1;function xc(){if(so){const t=Array.from(Se).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=ip(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)})}so=!1,oo=!1,Se.forEach(t=>t.complete(ao)),Se.clear()}function bc(){Se.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(so=!0)})}function op(){ao=!0,bc(),xc(),ao=!1}class co{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?(Se.add(this),oo||(oo=!0,tt.read(bc),tt.resolveKeyframes(xc))):(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])}Zf(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Se.delete(this)}cancel(){this.state==="scheduled"&&(Se.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const sp=t=>t.startsWith("--");function ap(t,e,n){sp(e)?t.style.setProperty(e,n):t.style[e]=n}const cp=Ni(()=>window.ScrollTimeline!==void 0),lp={};function up(t,e){const n=Ni(t);return()=>lp[e]??n()}const Cc=up(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dn=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Ec={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dn([0,.65,.55,1]),circOut:Dn([.55,0,1,.45]),backIn:Dn([.31,.01,.66,-.59]),backOut:Dn([.33,1.53,.69,.99])};function Sc(t,e){if(t)return typeof t=="function"?Cc()?fc(t,e):"ease-out":Xa(t)?Dn(t):Array.isArray(t)?t.map(n=>Sc(n,e)||Ec.easeOut):Ec[t]}function dp(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:c}={},h=void 0){const l={[e]:n};c&&(l.offset=c);const f=Sc(a,i);Array.isArray(f)&&(l.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return h&&(m.pseudoElement=h),t.animate(l,m)}function kc(t){return typeof t=="function"&&"applyToOptions"in t}function hp({type:t,...e}){return kc(t)&&Cc()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class fp extends Qi{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:c}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,dr(typeof e.type!="string");const h=hp(e);this.animation=dp(n,r,i,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=Ji(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):ap(n,r,l),this.animation.cancel()}c==null||c(),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 Xt(Number(e))}get time(){return Xt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Gt(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&&cp()?(this.animation.timeline=e,Ft):n(this)}}const Tc={anticipate:Ka,backInOut:Wa,circInOut:Ya};function pp(t){return t in Tc}function mp(t){typeof t.ease=="string"&&pp(t.ease)&&(t.ease=Tc[t.ease])}const Ac=10;class gp extends fp{constructor(e){mp(e),gc(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 to({...s,autoplay:!1}),c=Gt(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-Ac).value,a.sample(c).value,Ac),a.stop()}}const Pc=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(me.test(t)||t==="0")&&!t.startsWith("url("));function yp(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 wp(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=Pc(i,e),a=Pc(o,e);return!s||!a?!1:yp(t)||(n==="spring"||kc(n))&&r}function lo(t){t.duration=0,t.type}const vp=new Set(["opacity","clipPath","filter","transform"]),_p=Ni(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function xp(t){var l;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;if(!(((l=e==null?void 0:e.owner)==null?void 0:l.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:h}=e.owner.getProps();return _p()&&n&&vp.has(n)&&(n!=="transform"||!h)&&!c&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const bp=40;class Cp extends Qi{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:c,motionValue:h,element:l,...f}){var v;super(),this.stop=()=>{var w,E;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(E=this.keyframeResolver)==null||E.cancel()},this.createdAt=Pt.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:c,motionValue:h,element:l,...f},g=(l==null?void 0:l.KeyframeResolver)||co;this.keyframeResolver=new g(a,(w,E,_)=>this.onKeyframesResolved(w,E,m,!_),c,h,l),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:c,isHandoff:h,onUpdate:l}=r;this.resolvedAt=Pt.now(),wp(e,o,s,a)||((ae.instantAnimations||!c)&&(l==null||l(Ji(e,r,n))),e[0]=e[e.length-1],lo(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>bp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},g=!h&&xp(m)?new gp({...m,element:m.motionValue.owner.current}):new to(m);g.finished.then(()=>this.notifyFinished()).catch(Ft),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}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(),op()),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 Ep=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Sp(t){const e=Ep.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function Ic(t,e,n=1){const[r,i]=Sp(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return Oa(s)?parseFloat(s):s}return Vi(i)?Ic(i,e,n+1):i}function uo(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Mc=new Set(["width","height","top","left","right","bottom",...qe]),kp={test:t=>t==="auto",parse:t=>t},Rc=t=>e=>e.test(t),Nc=[We,V,Zt,pe,yf,gf,kp],Dc=t=>Nc.find(Rc(t));function Tp(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Va(t):!0}const Ap=new Set(["brightness","contrast","saturate","opacity"]);function Pp(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match(Ui)||[];if(!r)return t;const i=n.replace(r,"");let o=Ap.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Ip=/\b([a-z-]*)\(.*?\)/gu,ho={...me,getAnimatableNone:t=>{const e=t.match(Ip);return e?e.map(Pp).join(" "):t}},Lc={...We,transform:Math.round},fo={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...{rotate:pe,rotateX:pe,rotateY:pe,rotateZ:pe,scale:pr,scaleX:pr,scaleY:pr,scaleZ:pr,skew:pe,skewX:pe,skewY:pe,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Pn,originX:rc,originY:rc,originZ:V},zIndex:Lc,fillOpacity:Pn,strokeOpacity:Pn,numOctaves:Lc},Mp={...fo,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:ho,WebkitFilter:ho},Bc=t=>Mp[t];function Oc(t,e){let n=Bc(t);return n!==ho&&(n=me),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Rp=new Set(["auto","none","0"]);function Np(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!Rp.has(o)&&Rn(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=Oc(n,i)}class Dp extends co{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 c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),Vi(h))){const l=Ic(h,n.current);l!==void 0&&(e[c]=l),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Mc.has(r)||e.length!==2)return;const[i,o]=e,s=Dc(i),a=Dc(o);if(s!==a)if(_c(s)&&_c(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else Ee[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Tp(e[i]))&&r.push(i);r.length&&Np(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=Ee[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]=Ee[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(([c,h])=>{e.getValue(c).set(h)}),this.resolveNoneKeyframes()}}function Lp(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 Fc=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function Vc(t){return Fa(t)&&"offsetHeight"in t}const Uc=30,Bp=t=>!isNaN(parseFloat(t));class Op{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Pt.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=Pt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Bp(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 Di);const r=this.events[e].add(n);return e==="change"?()=>{r(),tt.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=Pt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Uc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Uc);return Ua(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 Ge(t,e){return new Op(t,e)}const{schedule:po,cancel:t_}=tc(queueMicrotask,!1),Ht={x:!1,y:!1};function $c(){return Ht.x||Ht.y}function Fp(t){return t==="x"||t==="y"?Ht[t]?null:(Ht[t]=!0,()=>{Ht[t]=!1}):Ht.x||Ht.y?null:(Ht.x=Ht.y=!0,()=>{Ht.x=Ht.y=!1})}function zc(t,e){const n=Lp(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function jc(t){return!(t.pointerType==="touch"||$c())}function Vp(t,e,n={}){const[r,i,o]=zc(t,n),s=a=>{if(!jc(a))return;const{target:c}=a,h=e(c,a);if(typeof h!="function"||!c)return;const l=f=>{jc(f)&&(h(f),c.removeEventListener("pointerleave",l))};c.addEventListener("pointerleave",l,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const Hc=(t,e)=>e?t===e?!0:Hc(t,e.parentElement):!1,mo=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Up=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function $p(t){return Up.has(t.tagName)||t.tabIndex!==-1}const wr=new WeakSet;function Wc(t){return e=>{e.key==="Enter"&&t(e)}}function go(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const zp=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Wc(()=>{if(wr.has(n))return;go(n,"down");const i=Wc(()=>{go(n,"up")}),o=()=>go(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 Kc(t){return mo(t)&&!$c()}function jp(t,e,n={}){const[r,i,o]=zc(t,n),s=a=>{const c=a.currentTarget;if(!Kc(a))return;wr.add(c);const h=e(c,a),l=(g,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),wr.has(c)&&wr.delete(c),Kc(g)&&typeof h=="function"&&h(g,{success:v})},f=g=>{l(g,c===window||c===document||n.useGlobalTarget||Hc(c,g.target))},m=g=>{l(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),Vc(a)&&(a.addEventListener("focus",h=>zp(h,i)),!$p(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function qc(t){return Fa(t)&&"ownerSVGElement"in t}function Hp(t){return qc(t)&&t.tagName==="svg"}const Et=t=>!!(t&&t.getVelocity),Wp=[...Nc,pt,me],Kp=t=>Wp.find(Rc(t)),yo=kt({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class qp extends Rt{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=Vc(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 Yp({children:t,isPresent:e,anchorX:n,root:r}){const i=$e(),o=F(null),s=F({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=ut(yo);return En(()=>{const{width:c,height:h,top:l,left:f,right:m}=s.current;if(e||!o.current||!c||!h)return;const g=n==="left"?`left: ${f}`:`right: ${m}`;o.current.dataset.motionPopId=i;const v=document.createElement("style");a&&(v.nonce=a);const w=r??document.head;return w.appendChild(v),v.sheet&&v.sheet.insertRule(`
|
|
1
|
+
(function(){"use strict";var wn,$,Us,xe,$s,zs,ai,js,ci,li,ui,Ws,vn={},Hs=[],Mh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,or=Array.isArray;function ne(t,e){for(var n in e)t[n]=e[n];return t}function di(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function B(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?wn.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 _n(t,s,r,i,null)}function _n(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??++Us,__i:-1,__u:0};return i==null&&$.vnode!=null&&$.vnode(o),o}function Ks(){return{current:null}}function Z(t){return t.children}function Mt(t,e){this.props=t,this.context=e}function Ue(t,e){if(e==null)return t.__?Ue(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"?Ue(t):null}function qs(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 qs(t)}}function hi(t){(!t.__d&&(t.__d=!0)&&xe.push(t)&&!sr.__r++||$s!==$.debounceRendering)&&(($s=$.debounceRendering)||zs)(sr)}function sr(){var t,e,n,r,i,o,s,a;for(xe.sort(ai);t=xe.shift();)t.__d&&(e=xe.length,r=void 0,o=(i=(n=t).__v).__e,s=[],a=[],n.__P&&((r=ne({},i)).__v=i.__v+1,$.vnode&&$.vnode(r),fi(n.__P,r,i,n.__n,n.__P.namespaceURI,32&i.__u?[o]:null,s,o??Ue(i),!!(32&i.__u),a),r.__v=i.__v,r.__.__k[r.__i]=r,Js(s,r,a),r.__e!=o&&qs(r)),xe.length>e&&xe.sort(ai));sr.__r=0}function Ys(t,e,n,r,i,o,s,a,c,h,l){var f,m,g,_,w,E,x=r&&r.__k||Hs,C=e.length;for(c=Rh(n,e,x,c,C),f=0;f<C;f++)(g=n.__k[f])!=null&&(m=g.__i===-1?vn:x[g.__i]||vn,g.__i=f,E=fi(t,g,m,i,o,s,a,c,h,l),_=g.__e,g.ref&&m.ref!=g.ref&&(m.ref&&pi(m.ref,null,g),l.push(g.ref,g.__c||_,g)),w==null&&_!=null&&(w=_),4&g.__u||m.__k===g.__k?c=Gs(g,c,t):typeof g.type=="function"&&E!==void 0?c=E:_&&(c=_.nextSibling),g.__u&=-7);return n.__e=w,c}function Rh(t,e,n,r,i){var o,s,a,c,h,l=n.length,f=l,m=0;for(t.__k=new Array(i),o=0;o<i;o++)(s=e[o])!=null&&typeof s!="boolean"&&typeof s!="function"?(c=o+m,(s=t.__k[o]=typeof s=="string"||typeof s=="number"||typeof s=="bigint"||s.constructor==String?_n(null,s,null,null,null):or(s)?_n(Z,{children:s},null,null,null):s.constructor===void 0&&s.__b>0?_n(s.type,s.props,s.key,s.ref?s.ref:null,s.__v):s).__=t,s.__b=t.__b+1,a=null,(h=s.__i=Nh(s,n,c,f))!==-1&&(f--,(a=n[h])&&(a.__u|=2)),a==null||a.__v===null?(h==-1&&m--,typeof s.type!="function"&&(s.__u|=4)):h!=c&&(h==c-1?m--:h==c+1?m++:(h>c?m--:m++,s.__u|=4))):t.__k[o]=null;if(f)for(o=0;o<l;o++)(a=n[o])!=null&&!(2&a.__u)&&(a.__e==r&&(r=Ue(a)),Qs(a,a));return r}function Gs(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=Gs(r[i],e,n));return e}t.__e!=e&&(e&&t.type&&!n.contains(e)&&(e=Ue(t)),n.insertBefore(t.__e,e||null),e=t.__e);do e=e&&e.nextSibling;while(e!=null&&e.nodeType==8);return e}function re(t,e){return e=e||[],t==null||typeof t=="boolean"||(or(t)?t.some(function(n){re(n,e)}):e.push(t)),e}function Nh(t,e,n,r){var i,o,s=t.key,a=t.type,c=e[n];if(c===null||c&&s==c.key&&a===c.type&&!(2&c.__u))return n;if(r>(c!=null&&!(2&c.__u)?1:0))for(i=n-1,o=n+1;i>=0||o<e.length;){if(i>=0){if((c=e[i])&&!(2&c.__u)&&s==c.key&&a===c.type)return i;i--}if(o<e.length){if((c=e[o])&&!(2&c.__u)&&s==c.key&&a===c.type)return o;o++}}return-1}function Xs(t,e,n){e[0]=="-"?t.setProperty(e,n??""):t[e]=n==null?"":typeof n!="number"||Mh.test(e)?n:n+"px"}function ar(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||Xs(t.style,e,"");if(n)for(e in n)r&&n[e]===r[e]||Xs(t.style,e,n[e])}else if(e[0]=="o"&&e[1]=="n")o=e!=(e=e.replace(js,"$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=ci,t.addEventListener(e,o?ui:li,o)):t.removeEventListener(e,o?ui:li,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 Zs(t){return function(e){if(this.l){var n=this.l[e.type+t];if(e.t==null)e.t=ci++;else if(e.t<n.u)return;return n($.event?$.event(e):e)}}}function fi(t,e,n,r,i,o,s,a,c,h){var l,f,m,g,_,w,E,x,C,k,M,T,I,N,A,R,D,O=e.type;if(e.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),o=[a=e.__e=n.__e]),(l=$.__b)&&l(e);t:if(typeof O=="function")try{if(x=e.props,C="prototype"in O&&O.prototype.render,k=(l=O.contextType)&&r[l.__c],M=l?k?k.props.value:l.__:r,n.__c?E=(f=e.__c=n.__c).__=f.__E:(C?e.__c=f=new O(x,M):(e.__c=f=new Mt(x,M),f.constructor=O,f.render=Lh),k&&k.sub(f),f.props=x,f.state||(f.state={}),f.context=M,f.__n=r,m=f.__d=!0,f.__h=[],f._sb=[]),C&&f.__s==null&&(f.__s=f.state),C&&O.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=ne({},f.__s)),ne(f.__s,O.getDerivedStateFromProps(x,f.__s))),g=f.props,_=f.state,f.__v=e,m)C&&O.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),C&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(C&&O.getDerivedStateFromProps==null&&x!==g&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(x,M),!f.__e&&(f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(x,f.__s,M)===!1||e.__v==n.__v)){for(e.__v!=n.__v&&(f.props=x,f.state=f.__s,f.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(et){et&&(et.__=e)}),T=0;T<f._sb.length;T++)f.__h.push(f._sb[T]);f._sb=[],f.__h.length&&s.push(f);break t}f.componentWillUpdate!=null&&f.componentWillUpdate(x,f.__s,M),C&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(g,_,w)})}if(f.context=M,f.props=x,f.__P=t,f.__e=!1,I=$.__r,N=0,C){for(f.state=f.__s,f.__d=!1,I&&I(e),l=f.render(f.props,f.state,f.context),A=0;A<f._sb.length;A++)f.__h.push(f._sb[A]);f._sb=[]}else do f.__d=!1,I&&I(e),l=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++N<25);f.state=f.__s,f.getChildContext!=null&&(r=ne(ne({},r),f.getChildContext())),C&&!m&&f.getSnapshotBeforeUpdate!=null&&(w=f.getSnapshotBeforeUpdate(g,_)),a=Ys(t,or(R=l!=null&&l.type===Z&&l.key==null?l.props.children:l)?R:[R],e,n,r,i,o,s,a,c,h),f.base=e.__e,e.__u&=-161,f.__h.length&&s.push(f),E&&(f.__E=f.__=null)}catch(et){if(e.__v=null,c||o!=null)if(et.then){for(e.__u|=c?160:128;a&&a.nodeType==8&&a.nextSibling;)a=a.nextSibling;o[o.indexOf(a)]=null,e.__e=a}else for(D=o.length;D--;)di(o[D]);else e.__e=n.__e,e.__k=n.__k;$.__e(et,e,n)}else o==null&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):a=e.__e=Dh(n.__e,e,n,r,i,o,s,c,h);return(l=$.diffed)&&l(e),128&e.__u?void 0:a}function Js(t,e,n){for(var r=0;r<n.length;r++)pi(n[r],n[++r],n[++r]);$.__c&&$.__c(e,t),t.some(function(i){try{t=i.__h,i.__h=[],t.some(function(o){o.call(i)})}catch(o){$.__e(o,i.__v)}})}function Dh(t,e,n,r,i,o,s,a,c){var h,l,f,m,g,_,w,E=n.props,x=e.props,C=e.type;if(C=="svg"?i="http://www.w3.org/2000/svg":C=="math"?i="http://www.w3.org/1998/Math/MathML":i||(i="http://www.w3.org/1999/xhtml"),o!=null){for(h=0;h<o.length;h++)if((g=o[h])&&"setAttribute"in g==!!C&&(C?g.localName==C:g.nodeType==3)){t=g,o[h]=null;break}}if(t==null){if(C==null)return document.createTextNode(x);t=document.createElementNS(i,C,x.is&&x),a&&($.__m&&$.__m(e,o),a=!1),o=null}if(C===null)E===x||a&&t.data===x||(t.data=x);else{if(o=o&&wn.call(t.childNodes),E=n.props||vn,!a&&o!=null)for(E={},h=0;h<t.attributes.length;h++)E[(g=t.attributes[h]).name]=g.value;for(h in E)if(g=E[h],h!="children"){if(h=="dangerouslySetInnerHTML")f=g;else if(!(h in x)){if(h=="value"&&"defaultValue"in x||h=="checked"&&"defaultChecked"in x)continue;ar(t,h,null,g,i)}}for(h in x)g=x[h],h=="children"?m=g:h=="dangerouslySetInnerHTML"?l=g:h=="value"?_=g:h=="checked"?w=g:a&&typeof g!="function"||E[h]===g||ar(t,h,g,E[h],i);if(l)a||f&&(l.__html===f.__html||l.__html===t.innerHTML)||(t.innerHTML=l.__html),e.__k=[];else if(f&&(t.innerHTML=""),Ys(t,or(m)?m:[m],e,n,r,C=="foreignObject"?"http://www.w3.org/1999/xhtml":i,o,s,o?o[0]:n.__k&&Ue(n,0),a,c),o!=null)for(h=o.length;h--;)di(o[h]);a||(h="value",C=="progress"&&_==null?t.removeAttribute("value"):_!==void 0&&(_!==t[h]||C=="progress"&&!_||C=="option"&&_!==E[h])&&ar(t,h,_,E[h],i),h="checked",w!==void 0&&w!==t[h]&&ar(t,h,w,E[h],i))}return t}function pi(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){$.__e(i,n)}}function Qs(t,e,n){var r,i;if($.unmount&&$.unmount(t),(r=t.ref)&&(r.current&&r.current!==t.__e||pi(r,null,e)),(r=t.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){$.__e(o,e)}r.base=r.__P=null}if(r=t.__k)for(i=0;i<r.length;i++)r[i]&&Qs(r[i],e,n||typeof t.type!="function");n||di(t.__e),t.__c=t.__=t.__e=void 0}function Lh(t,e,n){return this.constructor(t,n)}function xn(t,e,n){var r,i,o,s;e==document&&(e=document.documentElement),$.__&&$.__(t,e),i=(r=typeof n=="function")?null:n&&n.__k||e.__k,o=[],s=[],fi(e,t=(!r&&n||e).__k=B(Z,null,[t]),i||vn,vn,e.namespaceURI,!r&&n?[n]:i?null:e.firstChild?wn.call(e.childNodes):null,o,!r&&n?n:i?i.__e:e.firstChild,r,s),Js(o,t,s)}function ta(t,e){xn(t,e,ta)}function Bh(t,e,n){var r,i,o,s,a=ne({},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?wn.call(arguments,2):n),_n(t.type,a,r||t.key,i||t.ref,null)}function kt(t,e){var n={__c:e="__cC"+Ws++,__: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,hi(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}wn=Hs.slice,$={__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}},Us=0,Mt.prototype.setState=function(t,e){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=ne({},this.state),typeof t=="function"&&(t=t(ne({},n),this.props)),t&&ne(n,t),t!=null&&this.__v&&(e&&this._sb.push(e),hi(this))},Mt.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),hi(this))},Mt.prototype.render=Z,xe=[],zs=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,ai=function(t,e){return t.__v.__b-e.__v.__b},sr.__r=0,js=/(PointerCapture)$|Capture$/i,ci=0,li=Zs(!1),ui=Zs(!0),Ws=0;var Oh=0;function v(t,e,n,r,i,o){e||(e={});var s,a,c=e;if("ref"in c)for(a in c={},e)a=="ref"?s=e[a]:c[a]=e[a];var h={type:t,props:c,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Oh,__i:-1,__u:0,__source:i,__self:o};if(typeof t=="function"&&(s=t.defaultProps))for(a in s)c[a]===void 0&&(c[a]=s[a]);return $.vnode&&$.vnode(h),h}var ie,G,mi,ea,$e=0,na=[],rt=$,ra=rt.__b,ia=rt.__r,oa=rt.diffed,sa=rt.__c,aa=rt.unmount,ca=rt.__;function be(t,e){rt.__h&&rt.__h(G,t,$e||e),$e=0;var n=G.__H||(G.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function j(t){return $e=1,bn(ua,t)}function bn(t,e,n){var r=be(ie++,2);if(r.t=t,!r.__c&&(r.__=[n?n(e):ua(void 0,e),function(a){var c=r.__N?r.__N[0]:r.__[0],h=r.t(c,a);c!==h&&(r.__N=[h,r.__[1]],r.__c.setState({}))}],r.__c=G,!G.u)){var i=function(a,c,h){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(m){return!!m.__c});if(l.every(function(m){return!m.__N}))return!o||o.call(this,a,c,h);var f=r.__c.props!==a;return l.forEach(function(m){if(m.__N){var g=m.__[0];m.__=m.__N,m.__N=void 0,g!==m.__[0]&&(f=!0)}}),o&&o.call(this,a,c,h)||f};G.u=!0;var o=G.shouldComponentUpdate,s=G.componentWillUpdate;G.componentWillUpdate=function(a,c,h){if(this.__e){var l=o;o=void 0,i(a,c,h),o=l}s&&s.call(this,a,c,h)},G.shouldComponentUpdate=i}return r.__N||r.__}function U(t,e){var n=be(ie++,3);!rt.__s&&wi(n.__H,e)&&(n.__=t,n.i=e,G.__H.__h.push(n))}function oe(t,e){var n=be(ie++,4);!rt.__s&&wi(n.__H,e)&&(n.__=t,n.i=e,G.__h.push(n))}function F(t){return $e=5,vt(function(){return{current:t}},[])}function Cn(t,e,n){$e=6,oe(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 vt(t,e){var n=be(ie++,7);return wi(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function Q(t,e){return $e=8,vt(function(){return t},e)}function ut(t){var e=G.context[t.__c],n=be(ie++,9);return n.c=t,e?(n.__==null&&(n.__=!0,e.sub(G)),e.props.value):t.__}function gi(t,e){rt.useDebugValue&&rt.useDebugValue(e?e(t):t)}function Fh(t){var e=be(ie++,10),n=j();return e.__=t,G.componentDidCatch||(G.componentDidCatch=function(r,i){e.__&&e.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}function ze(){var t=be(ie++,11);if(!t.__){for(var e=G.__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 Vh(){for(var t;t=na.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(cr),t.__H.__h.forEach(yi),t.__H.__h=[]}catch(e){t.__H.__h=[],rt.__e(e,t.__v)}}rt.__b=function(t){G=null,ra&&ra(t)},rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ca&&ca(t,e)},rt.__r=function(t){ia&&ia(t),ie=0;var e=(G=t.__c).__H;e&&(mi===G?(e.__h=[],G.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(cr),e.__h.forEach(yi),e.__h=[],ie=0)),mi=G},rt.diffed=function(t){oa&&oa(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(na.push(e)!==1&&ea===rt.requestAnimationFrame||((ea=rt.requestAnimationFrame)||Uh)(Vh)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),mi=G=null},rt.__c=function(t,e){e.some(function(n){try{n.__h.forEach(cr),n.__h=n.__h.filter(function(r){return!r.__||yi(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],rt.__e(r,n.__v)}}),sa&&sa(t,e)},rt.unmount=function(t){aa&&aa(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{cr(r)}catch(i){e=i}}),n.__H=void 0,e&&rt.__e(e,n.__v))};var la=typeof requestAnimationFrame=="function";function Uh(t){var e,n=function(){clearTimeout(r),la&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);la&&(e=requestAnimationFrame(n))}function cr(t){var e=G,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),G=e}function yi(t){var e=G;t.__c=t.__(),G=e}function wi(t,e){return!t||t.length!==e.length||e.some(function(n,r){return n!==t[r]})}function ua(t,e){return typeof e=="function"?e(t):e}function da(t,e){for(var n in e)t[n]=e[n];return t}function vi(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 _i(t,e){var n=e(),r=j({t:{__:n,u:e}}),i=r[0].t,o=r[1];return oe(function(){i.__=n,i.u=e,xi(i)&&o({t:i})},[t,n,e]),U(function(){return xi(i)&&o({t:i}),t(function(){xi(i)&&o({t:i})})},[t]),n}function xi(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 bi(t){t()}function Ci(t){return t}function Ei(){return[!1,bi]}var En=oe;function lr(t,e){this.props=t,this.context=e}function ha(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:vi(this.props,i)}function r(i){return this.shouldComponentUpdate=n,B(t,i)}return r.displayName="Memo("+(t.displayName||t.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(lr.prototype=new Mt).isPureReactComponent=!0,lr.prototype.shouldComponentUpdate=function(t,e){return vi(this.props,t)||vi(this.state,e)};var fa=$.__b;$.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),fa&&fa(t)};var $h=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function he(t){function e(n){var r=da({},n);return delete r.ref,t(r,n.ref||null)}return e.$$typeof=$h,e.render=e,e.prototype.isReactComponent=e.__f=!0,e.displayName="ForwardRef("+(t.displayName||t.name)+")",e}var pa=function(t,e){return t==null?null:re(re(t).map(e))},Si={map:pa,forEach:pa,count:function(t){return t?re(t).length:0},only:function(t){var e=re(t);if(e.length!==1)throw"Children.only";return e[0]},toArray:re},zh=$.__e;$.__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)}zh(t,e,n,r)};var ma=$.unmount;function ga(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=da({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return ga(r,e,n)})),t}function ya(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return ya(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 Sn(){this.__u=0,this.o=null,this.__b=null}function wa(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function va(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 B(n,o)}return i.displayName="Lazy",i.__f=!0,i}function je(){this.i=null,this.l=null}$.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),ma&&ma(t)},(Sn.prototype=new Mt).__c=function(t,e){var n=e.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=wa(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 c=r.state.__a;r.__v.__k[0]=ya(c,c.__c.__P,c.__c.__O)}var h;for(r.setState({__a:r.__b=null});h=r.o.pop();)h.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(s,s)},Sn.prototype.componentWillUnmount=function(){this.o=[]},Sn.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]=ga(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&B(Z,null,t.fallback);return i&&(i.__u&=-33),[B(Z,null,e.__a?null:t.children),i]};var _a=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 jh(t){return this.getChildContext=function(){return t.context},t.children}function Wh(t){var e=this,n=t.h;e.componentWillUnmount=function(){xn(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)}}),xn(B(jh,{context:e.context},t.__v),e.v)}function ki(t,e){var n=B(Wh,{__v:t,h:e});return n.containerInfo=e,n}(je.prototype=new Mt).__a=function(t){var e=this,n=wa(e.__v),r=e.l.get(t);return r[0]++,function(i){var o=function(){e.props.revealOrder?(r.push(i),_a(e,t,r)):i()};n?n(o):o()}},je.prototype.render=function(t){this.i=null,this.l=new Map;var e=re(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},je.prototype.componentDidUpdate=je.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){_a(t,n,e)})};var xa=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Hh=/^(?: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]/,Kh=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,qh=/[A-Z0-9]/g,Yh=typeof document<"u",Gh=function(t){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(t)};function ba(t,e,n){return e.__k==null&&(e.textContent=""),xn(t,e),typeof n=="function"&&n(),t?t.__c:null}function Ca(t,e,n){return ta(t,e),typeof n=="function"&&n(),t?t.__c:null}Mt.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(Mt.prototype,t,{configurable:!0,get:function(){return this["UNSAFE_"+t]},set:function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})});var Ea=$.event;function Xh(){}function Zh(){return this.cancelBubble}function Jh(){return this.defaultPrevented}$.event=function(t){return Ea&&(t=Ea(t)),t.persist=Xh,t.isPropagationStopped=Zh,t.isDefaultPrevented=Jh,t.nativeEvent=t};var Ti,Qh={enumerable:!1,configurable:!0,get:function(){return this.class}},Sa=$.vnode;$.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||Yh&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var c=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":c==="translate"&&a==="no"?a=!1:c[0]==="o"&&c[1]==="n"?c==="ondoubleclick"?s="ondblclick":c!=="onchange"||r!=="input"&&r!=="textarea"||Gh(n.type)?c==="onfocus"?s="onfocusin":c==="onblur"?s="onfocusout":Kh.test(s)&&(s=c):c=s="oninput":o&&Hh.test(s)?s=s.replace(qh,"-$&").toLowerCase():a===null&&(a=void 0),c==="oninput"&&i[s=c]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=re(n.children).forEach(function(h){h.props.selected=i.value.indexOf(h.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=re(n.children).forEach(function(h){h.props.selected=i.multiple?i.defaultValue.indexOf(h.props.value)!=-1:i.defaultValue==h.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",Qh)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),e.props=i}(t),t.$$typeof=xa,Sa&&Sa(t)};var ka=$.__r;$.__r=function(t){ka&&ka(t),Ti=t.__c};var Ta=$.diffed;$.diffed=function(t){Ta&&Ta(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),Ti=null};var Aa={ReactCurrentDispatcher:{current:{readContext:function(t){return Ti.__n[t.__c].props.value},useCallback:Q,useContext:ut,useDebugValue:gi,useDeferredValue:Ci,useEffect:U,useId:ze,useImperativeHandle:Cn,useInsertionEffect:En,useLayoutEffect:oe,useMemo:vt,useReducer:bn,useRef:F,useState:j,useSyncExternalStore:_i,useTransition:Ei}}},Pa="18.3.1";function Ia(t){return B.bind(null,t)}function We(t){return!!t&&t.$$typeof===xa}function Ma(t){return We(t)&&t.type===Z}function Ra(t){return!!t&&!!t.displayName&&(typeof t.displayName=="string"||t.displayName instanceof String)&&t.displayName.startsWith("Memo(")}function Ai(t){return We(t)?Bh.apply(null,arguments):t}function Na(t){return!!t.__k&&(xn(null,t),!0)}function Da(t){return t&&(t.base||t.nodeType===1&&t)||null}var La=function(t,e){return t(e)},Ba=function(t,e){return t(e)},Oa=Z,Fa=We,He={useState:j,useId:ze,useReducer:bn,useEffect:U,useLayoutEffect:oe,useInsertionEffect:En,useTransition:Ei,useDeferredValue:Ci,useSyncExternalStore:_i,startTransition:bi,useRef:F,useImperativeHandle:Cn,useMemo:vt,useCallback:Q,useContext:ut,useDebugValue:gi,version:"18.3.1",Children:Si,render:ba,hydrate:Ca,unmountComponentAtNode:Na,createPortal:ki,createElement:B,createContext:kt,createFactory:Ia,cloneElement:Ai,createRef:Ks,Fragment:Z,isValidElement:We,isElement:Fa,isFragment:Ma,isMemo:Ra,findDOMNode:Da,Component:Mt,PureComponent:lr,memo:ha,forwardRef:he,flushSync:Ba,unstable_batchedUpdates:La,StrictMode:Oa,Suspense:Sn,SuspenseList:je,lazy:va,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Aa};const tf=Object.freeze(Object.defineProperty({__proto__:null,Children:Si,Component:Mt,Fragment:Z,PureComponent:lr,StrictMode:Oa,Suspense:Sn,SuspenseList:je,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Aa,cloneElement:Ai,createContext:kt,createElement:B,createFactory:Ia,createPortal:ki,createRef:Ks,default:He,findDOMNode:Da,flushSync:Ba,forwardRef:he,hydrate:Ca,isElement:Fa,isFragment:Ma,isMemo:Ra,isValidElement:We,lazy:va,memo:ha,render:ba,startTransition:bi,unmountComponentAtNode:Na,unstable_batchedUpdates:La,useCallback:Q,useContext:ut,useDebugValue:gi,useDeferredValue:Ci,useEffect:U,useErrorBoundary:Fh,useId:ze,useImperativeHandle:Cn,useInsertionEffect:En,useLayoutEffect:oe,useMemo:vt,useReducer:bn,useRef:F,useState:j,useSyncExternalStore:_i,useTransition:Ei,version:Pa},Symbol.toStringTag,{value:"Module"})),ef='*,: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-\\[22\\%\\]{bottom:22%}.bottom-full{bottom:100%}.end-0{inset-inline-end:0px}.left-0{left:0}.left-1\\/2{left:50%}.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-9{width:2.25rem;height:2.25rem}.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-9{height:2.25rem}.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-56{width:14rem}.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-0{min-width:0px}.min-w-10{min-width:2.5rem}.max-w-\\[100px\\]{max-width:100px}.max-w-\\[200px\\]{max-width:200px}.max-w-\\[240px\\]{max-width:240px}.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}.-translate-x-1\\/2{--tw-translate-x: -50%;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))}.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-3{gap:.75rem}.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-\\[3px\\]{border-radius:3px}.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-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / 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}.px-\\[3px\\]{padding-left:3px;padding-right:3px}.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}.pl-3{padding-left:.75rem}.pr-3{padding-right:.75rem}.pr-8{padding-right:2rem}.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-\\[7px\\]{font-size:7px}.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-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.lowercase{text-transform:lowercase}.leading-\\[11px\\]{line-height:11px}.tracking-tight{letter-spacing:-.025em}.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-300{--tw-text-opacity: 1;color:rgb(209 213 219 / 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-300{--tw-text-opacity: 1;color:rgb(252 165 165 / 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\\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / 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-red-500:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / 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-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-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}}',nf=".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}}",Pi=kt({});function Ii(t){const e=F(null);return e.current===null&&(e.current=t()),e.current}const Mi=typeof window<"u",Va=Mi?oe:U,ur=kt(null);function Ri(t,e){t.indexOf(e)===-1&&t.push(e)}function Ni(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const se=(t,e,n)=>n>e?e:n<t?t:n;let dr=()=>{};const ae={},Ua=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t);function $a(t){return typeof t=="object"&&t!==null}const za=t=>/^0[^.\s]+$/u.test(t);function Di(t){let e;return()=>(e===void 0&&(e=t()),e)}const Ft=t=>t,rf=(t,e)=>n=>e(t(n)),kn=(...t)=>t.reduce(rf),Tn=(t,e,n)=>{const r=e-t;return r===0?1:(n-t)/r};class Li{constructor(){this.subscriptions=[]}add(e){return Ri(this.subscriptions,e),()=>Ni(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 Gt=t=>t*1e3,Xt=t=>t/1e3;function ja(t,e){return e?t*(1e3/e):0}const Wa=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,of=1e-7,sf=12;function af(t,e,n,r,i){let o,s,a=0;do s=e+(n-e)/2,o=Wa(s,r,i)-t,o>0?n=s:e=s;while(Math.abs(o)>of&&++a<sf);return s}function An(t,e,n,r){if(t===e&&n===r)return Ft;const i=o=>af(o,0,1,t,n);return o=>o===0||o===1?o:Wa(i(o),e,r)}const Ha=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ka=t=>e=>1-t(1-e),qa=An(.33,1.53,.69,.99),Bi=Ka(qa),Ya=Ha(Bi),Ga=t=>(t*=2)<1?.5*Bi(t):.5*(2-Math.pow(2,-10*(t-1))),Oi=t=>1-Math.sin(Math.acos(t)),Xa=Ka(Oi),Za=Ha(Oi),cf=An(.42,0,1,1),lf=An(0,0,.58,1),Ja=An(.42,0,.58,1),uf=t=>Array.isArray(t)&&typeof t[0]!="number",Qa=t=>Array.isArray(t)&&typeof t[0]=="number",tc={linear:Ft,easeIn:cf,easeInOut:Ja,easeOut:lf,circIn:Oi,circInOut:Za,circOut:Xa,backIn:Bi,backInOut:Ya,backOut:qa,anticipate:Ga},df=t=>typeof t=="string",ec=t=>{if(Qa(t)){dr(t.length===4);const[e,n,r,i]=t;return An(e,n,r,i)}else if(df(t))return dr(tc[t]!==void 0),tc[t];return t},hr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],nc={value:null,addProjectionMetrics:null};function hf(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},c=0;function h(f){s.has(f)&&(l.schedule(f),t()),c++,f(a)}const l={schedule:(f,m=!1,g=!1)=>{const w=g&&i?n:r;return m&&s.add(f),w.has(f)||w.add(f),f},cancel:f=>{r.delete(f),s.delete(f)},process:f=>{if(a=f,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(h),e&&nc.value&&nc.value.frameloop[e].push(c),c=0,n.clear(),i=!1,o&&(o=!1,l.process(f))}};return l}const ff=40;function rc(t,e){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,s=hr.reduce((k,M)=>(k[M]=hf(o,e?M:void 0),k),{}),{setup:a,read:c,resolveKeyframes:h,preUpdate:l,update:f,preRender:m,render:g,postRender:_}=s,w=()=>{const k=ae.useManualTiming?i.timestamp:performance.now();n=!1,ae.useManualTiming||(i.delta=r?1e3/60:Math.max(Math.min(k-i.timestamp,ff),1)),i.timestamp=k,i.isProcessing=!0,a.process(i),c.process(i),h.process(i),l.process(i),f.process(i),m.process(i),g.process(i),_.process(i),i.isProcessing=!1,n&&e&&(r=!1,t(w))},E=()=>{n=!0,r=!0,i.isProcessing||t(w)};return{schedule:hr.reduce((k,M)=>{const T=s[M];return k[M]=(I,N=!1,A=!1)=>(n||E(),T.schedule(I,N,A)),k},{}),cancel:k=>{for(let M=0;M<hr.length;M++)s[hr[M]].cancel(k)},state:i,steps:s}}const{schedule:tt,cancel:fe,state:Ct,steps:Fi}=rc(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ft,!0);let fr;function pf(){fr=void 0}const Pt={now:()=>(fr===void 0&&Pt.set(Ct.isProcessing||ae.useManualTiming?Ct.timestamp:performance.now()),fr),set:t=>{fr=t,queueMicrotask(pf)}},ic=t=>e=>typeof e=="string"&&e.startsWith(t),Vi=ic("--"),mf=ic("var(--"),Ui=t=>mf(t)?gf.test(t.split("/*")[0].trim()):!1,gf=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ke={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Pn={...Ke,transform:t=>se(0,1,t)},pr={...Ke,default:1},In=t=>Math.round(t*1e5)/1e5,$i=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function yf(t){return t==null}const wf=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,zi=(t,e)=>n=>!!(typeof n=="string"&&wf.test(n)&&n.startsWith(t)||e&&!yf(n)&&Object.prototype.hasOwnProperty.call(n,e)),oc=(t,e,n)=>r=>{if(typeof r!="string")return r;const[i,o,s,a]=r.match($i);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},vf=t=>se(0,255,t),ji={...Ke,transform:t=>Math.round(vf(t))},Ce={test:zi("rgb","red"),parse:oc("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:r=1})=>"rgba("+ji.transform(t)+", "+ji.transform(e)+", "+ji.transform(n)+", "+In(Pn.transform(r))+")"};function _f(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 Wi={test:zi("#"),parse:_f,transform:Ce.transform},Mn=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),pe=Mn("deg"),Zt=Mn("%"),V=Mn("px"),xf=Mn("vh"),bf=Mn("vw"),sc={...Zt,parse:t=>Zt.parse(t)/100,transform:t=>Zt.transform(t*100)},qe={test:zi("hsl","hue"),parse:oc("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:r=1})=>"hsla("+Math.round(t)+", "+Zt.transform(In(e))+", "+Zt.transform(In(n))+", "+In(Pn.transform(r))+")"},pt={test:t=>Ce.test(t)||Wi.test(t)||qe.test(t),parse:t=>Ce.test(t)?Ce.parse(t):qe.test(t)?qe.parse(t):Wi.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Ce.transform(t):qe.transform(t),getAnimatableNone:t=>{const e=pt.parse(t);return e.alpha=0,pt.transform(e)}},Cf=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function Ef(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match($i))==null?void 0:e.length)||0)+(((n=t.match(Cf))==null?void 0:n.length)||0)>0}const ac="number",cc="color",Sf="var",kf="var(",lc="${}",Tf=/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 Rn(t){const e=t.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(Tf,c=>(pt.test(c)?(r.color.push(o),i.push(cc),n.push(pt.parse(c))):c.startsWith(kf)?(r.var.push(o),i.push(Sf),n.push(c)):(r.number.push(o),i.push(ac),n.push(parseFloat(c))),++o,lc)).split(lc);return{values:n,split:a,indexes:r,types:i}}function uc(t){return Rn(t).values}function dc(t){const{split:e,types:n}=Rn(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===ac?o+=In(i[s]):a===cc?o+=pt.transform(i[s]):o+=i[s]}return o}}const Af=t=>typeof t=="number"?0:pt.test(t)?pt.getAnimatableNone(t):t;function Pf(t){const e=uc(t);return dc(t)(e.map(Af))}const me={test:Ef,parse:uc,createTransformer:dc,getAnimatableNone:Pf};function Hi(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 If({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,c=2*n-a;i=Hi(c,a,t+1/3),o=Hi(c,a,t),s=Hi(c,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}function mr(t,e){return n=>n>0?e:t}const it=(t,e,n)=>t+(e-t)*n,Ki=(t,e,n)=>{const r=t*t,i=n*(e*e-r)+r;return i<0?0:Math.sqrt(i)},Mf=[Wi,Ce,qe],Rf=t=>Mf.find(e=>e.test(t));function hc(t){const e=Rf(t);if(!e)return!1;let n=e.parse(t);return e===qe&&(n=If(n)),n}const fc=(t,e)=>{const n=hc(t),r=hc(e);if(!n||!r)return mr(t,e);const i={...n};return o=>(i.red=Ki(n.red,r.red,o),i.green=Ki(n.green,r.green,o),i.blue=Ki(n.blue,r.blue,o),i.alpha=it(n.alpha,r.alpha,o),Ce.transform(i))},qi=new Set(["none","hidden"]);function Nf(t,e){return qi.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function Df(t,e){return n=>it(t,e,n)}function Yi(t){return typeof t=="number"?Df:typeof t=="string"?Ui(t)?mr:pt.test(t)?fc:Of:Array.isArray(t)?pc:typeof t=="object"?pt.test(t)?fc:Lf:mr}function pc(t,e){const n=[...t],r=n.length,i=t.map((o,s)=>Yi(o)(o,e[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function Lf(t,e){const n={...t,...e},r={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(r[i]=Yi(t[i])(t[i],e[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function Bf(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 Of=(t,e)=>{const n=me.createTransformer(e),r=Rn(t),i=Rn(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?qi.has(t)&&!i.values.length||qi.has(e)&&!r.values.length?Nf(t,e):kn(pc(Bf(r,i),i.values),n):mr(t,e)};function mc(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?it(t,e,n):Yi(t)(t,e)}const Ff=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>tt.update(e,n),stop:()=>fe(e),now:()=>Ct.isProcessing?Ct.timestamp:Pt.now()}},gc=(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 Gi(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 Vf(t,e=100,n){const r=n({...t,keyframes:[0,e]}),i=Math.min(Gi(r),gr);return{type:"keyframes",ease:o=>r.next(i*o).value/e,duration:Xt(i)}}const Uf=5;function yc(t,e,n){const r=Math.max(e-Uf,0);return ja(n-t(r),e-r)}const at={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},Xi=.001;function $f({duration:t=at.duration,bounce:e=at.bounce,velocity:n=at.velocity,mass:r=at.mass}){let i,o,s=1-e;s=se(at.minDamping,at.maxDamping,s),t=se(at.minDuration,at.maxDuration,Xt(t)),s<1?(i=h=>{const l=h*s,f=l*t,m=l-n,g=Zi(h,s),_=Math.exp(-f);return Xi-m/g*_},o=h=>{const f=h*s*t,m=f*n+n,g=Math.pow(s,2)*Math.pow(h,2)*t,_=Math.exp(-f),w=Zi(Math.pow(h,2),s);return(-i(h)+Xi>0?-1:1)*((m-g)*_)/w}):(i=h=>{const l=Math.exp(-h*t),f=(h-n)*t+1;return-Xi+l*f},o=h=>{const l=Math.exp(-h*t),f=(n-h)*(t*t);return l*f});const a=5/t,c=jf(i,o,a);if(t=Gt(t),isNaN(c))return{stiffness:at.stiffness,damping:at.damping,duration:t};{const h=Math.pow(c,2)*r;return{stiffness:h,damping:s*2*Math.sqrt(r*h),duration:t}}}const zf=12;function jf(t,e,n){let r=n;for(let i=1;i<zf;i++)r=r-t(r)/e(r);return r}function Zi(t,e){return t*Math.sqrt(1-e*e)}const Wf=["duration","bounce"],Hf=["stiffness","damping","mass"];function wc(t,e){return e.some(n=>t[n]!==void 0)}function Kf(t){let e={velocity:at.velocity,stiffness:at.stiffness,damping:at.damping,mass:at.mass,isResolvedFromDuration:!1,...t};if(!wc(t,Hf)&&wc(t,Wf))if(t.visualDuration){const n=t.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*se(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:at.mass,stiffness:i,damping:o}}else{const n=$f(t);e={...e,...n,mass:at.mass},e.isResolvedFromDuration=!0}return e}function yr(t=at.visualDuration,e=at.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:c,damping:h,mass:l,duration:f,velocity:m,isResolvedFromDuration:g}=Kf({...n,velocity:-Xt(n.velocity||0)}),_=m||0,w=h/(2*Math.sqrt(c*l)),E=s-o,x=Xt(Math.sqrt(c/l)),C=Math.abs(E)<5;r||(r=C?at.restSpeed.granular:at.restSpeed.default),i||(i=C?at.restDelta.granular:at.restDelta.default);let k;if(w<1){const T=Zi(x,w);k=I=>{const N=Math.exp(-w*x*I);return s-N*((_+w*x*E)/T*Math.sin(T*I)+E*Math.cos(T*I))}}else if(w===1)k=T=>s-Math.exp(-x*T)*(E+(_+x*E)*T);else{const T=x*Math.sqrt(w*w-1);k=I=>{const N=Math.exp(-w*x*I),A=Math.min(T*I,300);return s-N*((_+w*x*E)*Math.sinh(A)+T*E*Math.cosh(A))/T}}const M={calculatedDuration:g&&f||null,next:T=>{const I=k(T);if(g)a.done=T>=f;else{let N=T===0?_:0;w<1&&(N=T===0?Gt(_):yc(k,T,I));const A=Math.abs(N)<=r,R=Math.abs(s-I)<=i;a.done=A&&R}return a.value=a.done?s:I,a},toString:()=>{const T=Math.min(Gi(M),gr),I=gc(N=>M.next(T*N).value,T,30);return T+"ms "+I},toTransition:()=>{}};return M}yr.applyToOptions=t=>{const e=Vf(t,100,yr);return t.ease=e.ease,t.duration=Gt(e.duration),t.type="keyframes",t};function Ji({keyframes:t,velocity:e=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:c,restDelta:h=.5,restSpeed:l}){const f=t[0],m={done:!1,value:f},g=A=>a!==void 0&&A<a||c!==void 0&&A>c,_=A=>a===void 0?c:c===void 0||Math.abs(a-A)<Math.abs(c-A)?a:c;let w=n*e;const E=f+w,x=s===void 0?E:s(E);x!==E&&(w=x-f);const C=A=>-w*Math.exp(-A/r),k=A=>x+C(A),M=A=>{const R=C(A),D=k(A);m.done=Math.abs(R)<=h,m.value=m.done?x:D};let T,I;const N=A=>{g(m.value)&&(T=A,I=yr({keyframes:[m.value,_(m.value)],velocity:yc(k,A,m.value),damping:i,stiffness:o,restDelta:h,restSpeed:l}))};return N(0),{calculatedDuration:null,next:A=>{let R=!1;return!I&&T===void 0&&(R=!0,M(A),N(A)),T!==void 0&&A>=T?I.next(A-T):(!R&&M(A),m)}}}function qf(t,e,n){const r=[],i=n||ae.mix||mc,o=t.length-1;for(let s=0;s<o;s++){let a=i(t[s],t[s+1]);if(e){const c=Array.isArray(e)?e[s]||Ft:e;a=kn(c,a)}r.push(a)}return r}function Yf(t,e,{clamp:n=!0,ease:r,mixer:i}={}){const o=t.length;if(dr(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=qf(e,r,i),c=a.length,h=l=>{if(s&&l<t[0])return e[0];let f=0;if(c>1)for(;f<t.length-2&&!(l<t[f+1]);f++);const m=Tn(t[f],t[f+1],l);return a[f](m)};return n?l=>h(se(t[0],t[o-1],l)):h}function Gf(t,e){const n=t[t.length-1];for(let r=1;r<=e;r++){const i=Tn(0,e,r);t.push(it(n,1,i))}}function Xf(t){const e=[0];return Gf(e,t.length-1),e}function Zf(t,e){return t.map(n=>n*e)}function Jf(t,e){return t.map(()=>e||Ja).splice(0,t.length-1)}function Nn({duration:t=300,keyframes:e,times:n,ease:r="easeInOut"}){const i=uf(r)?r.map(ec):ec(r),o={done:!1,value:e[0]},s=Zf(n&&n.length===e.length?n:Xf(e),t),a=Yf(s,e,{ease:Array.isArray(i)?i:Jf(e,i)});return{calculatedDuration:t,next:c=>(o.value=a(c),o.done=c>=t,o)}}const Qf=t=>t!==null;function Qi(t,{repeat:e,repeatType:n="loop"},r,i=1){const o=t.filter(Qf),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||r===void 0?o[a]:r}const tp={decay:Ji,inertia:Ji,tween:Nn,keyframes:Nn,spring:yr};function vc(t){typeof t.type=="string"&&(t.type=tp[t.type])}class to{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 ep=t=>t/100;class eo extends to{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!==Pt.now()&&this.tick(Pt.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;vc(e);const{type:n=Nn,repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=e;let{keyframes:a}=e;const c=n||Nn;c!==Nn&&typeof a[0]!="number"&&(this.mixKeyframes=kn(ep,mc(a[0],a[1])),a=[0,100]);const h=c({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=c({...e,keyframes:[...a].reverse(),velocity:-s})),h.calculatedDuration===null&&(h.calculatedDuration=Gi(h));const{calculatedDuration:l}=h;this.calculatedDuration=l,this.resolvedDuration=l+i,this.totalDuration=this.resolvedDuration*(r+1)-i,this.generator=h}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:c}=this;if(this.startTime===null)return r.next(0);const{delay:h=0,keyframes:l,repeat:f,repeatType:m,repeatDelay:g,type:_,onUpdate:w,finalKeyframe:E}=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-h*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?x<0:x>i;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let k=this.currentTime,M=r;if(f){const A=Math.min(this.currentTime,i)/a;let R=Math.floor(A),D=A%1;!D&&A>=1&&(D=1),D===1&&R--,R=Math.min(R,f+1),!!(R%2)&&(m==="reverse"?(D=1-D,g&&(D-=g/a)):m==="mirror"&&(M=s)),k=se(0,1,D)*a}const T=C?{done:!1,value:l[0]}:M.next(k);o&&(T.value=o(T.value));let{done:I}=T;!C&&c!==null&&(I=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return N&&_!==Ji&&(T.value=Qi(l,this.options,E,this.speed)),w&&w(T.value),N&&this.finish(),T}then(e,n){return this.finished.then(e,n)}get duration(){return Xt(this.calculatedDuration)}get time(){return Xt(this.currentTime)}set time(e){var n;e=Gt(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(Pt.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=Xt(this.currentTime))}play(){var i,o;if(this.isStopped)return;const{driver:e=Ff,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(Pt.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 np(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Ee=t=>t*180/Math.PI,no=t=>{const e=Ee(Math.atan2(t[1],t[0]));return ro(e)},rp={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:no,rotateZ:no,skewX:t=>Ee(Math.atan(t[1])),skewY:t=>Ee(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ro=t=>(t=t%360,t<0&&(t+=360),t),_c=no,xc=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),bc=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),ip={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:xc,scaleY:bc,scale:t=>(xc(t)+bc(t))/2,rotateX:t=>ro(Ee(Math.atan2(t[6],t[5]))),rotateY:t=>ro(Ee(Math.atan2(-t[2],t[0]))),rotateZ:_c,rotate:_c,skewX:t=>Ee(Math.atan(t[4])),skewY:t=>Ee(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function io(t){return t.includes("scale")?1:0}function oo(t,e){if(!t||t==="none")return io(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=ip,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=rp,i=a}if(!i)return io(e);const o=r[e],s=i[1].split(",").map(sp);return typeof o=="function"?o(s):s[o]}const op=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return oo(n,e)};function sp(t){return parseFloat(t.trim())}const Ye=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ge=new Set(Ye),Cc=t=>t===Ke||t===V,ap=new Set(["x","y","z"]),cp=Ye.filter(t=>!ap.has(t));function lp(t){const e=[];return cp.forEach(n=>{const r=t.getValue(n);r!==void 0&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),e}const Se={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})=>oo(e,"x"),y:(t,{transform:e})=>oo(e,"y")};Se.translateX=Se.x,Se.translateY=Se.y;const ke=new Set;let so=!1,ao=!1,co=!1;function Ec(){if(ao){const t=Array.from(ke).filter(r=>r.needsMeasurement),e=new Set(t.map(r=>r.element)),n=new Map;e.forEach(r=>{const i=lp(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)})}ao=!1,so=!1,ke.forEach(t=>t.complete(co)),ke.clear()}function Sc(){ke.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(ao=!0)})}function up(){co=!0,Sc(),Ec(),co=!1}class lo{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?(ke.add(this),so||(so=!0,tt.read(Sc),tt.resolveKeyframes(Ec))):(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])}np(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ke.delete(this)}cancel(){this.state==="scheduled"&&(ke.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const dp=t=>t.startsWith("--");function hp(t,e,n){dp(e)?t.style.setProperty(e,n):t.style[e]=n}const fp=Di(()=>window.ScrollTimeline!==void 0),pp={};function mp(t,e){const n=Di(t);return()=>pp[e]??n()}const kc=mp(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Dn=([t,e,n,r])=>`cubic-bezier(${t}, ${e}, ${n}, ${r})`,Tc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dn([0,.65,.55,1]),circOut:Dn([.55,0,1,.45]),backIn:Dn([.31,.01,.66,-.59]),backOut:Dn([.33,1.53,.69,.99])};function Ac(t,e){if(t)return typeof t=="function"?kc()?gc(t,e):"ease-out":Qa(t)?Dn(t):Array.isArray(t)?t.map(n=>Ac(n,e)||Tc.easeOut):Tc[t]}function gp(t,e,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a="easeOut",times:c}={},h=void 0){const l={[e]:n};c&&(l.offset=c);const f=Ac(a,i);Array.isArray(f)&&(l.easing=f);const m={delay:r,duration:i,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"};return h&&(m.pseudoElement=h),t.animate(l,m)}function Pc(t){return typeof t=="function"&&"applyToOptions"in t}function yp({type:t,...e}){return Pc(t)&&kc()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class wp extends to{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:c}=e;this.isPseudoElement=!!o,this.allowFlatten=s,this.options=e,dr(typeof e.type!="string");const h=yp(e);this.animation=gp(n,r,i,h,o),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const l=Qi(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(l):hp(n,r,l),this.animation.cancel()}c==null||c(),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 Xt(Number(e))}get time(){return Xt(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=Gt(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&&fp()?(this.animation.timeline=e,Ft):n(this)}}const Ic={anticipate:Ga,backInOut:Ya,circInOut:Za};function vp(t){return t in Ic}function _p(t){typeof t.ease=="string"&&vp(t.ease)&&(t.ease=Ic[t.ease])}const Mc=10;class xp extends wp{constructor(e){_p(e),vc(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 eo({...s,autoplay:!1}),c=Gt(this.finishedTime??this.time);n.setWithVelocity(a.sample(c-Mc).value,a.sample(c).value,Mc),a.stop()}}const Rc=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(me.test(t)||t==="0")&&!t.startsWith("url("));function bp(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 Cp(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=Rc(i,e),a=Rc(o,e);return!s||!a?!1:bp(t)||(n==="spring"||Pc(n))&&r}function uo(t){t.duration=0,t.type}const Ep=new Set(["opacity","clipPath","filter","transform"]),Sp=Di(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function kp(t){var l;const{motionValue:e,name:n,repeatDelay:r,repeatType:i,damping:o,type:s}=t;if(!(((l=e==null?void 0:e.owner)==null?void 0:l.current)instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:h}=e.owner.getProps();return Sp()&&n&&Ep.has(n)&&(n!=="transform"||!h)&&!c&&!r&&i!=="mirror"&&o!==0&&s!=="inertia"}const Tp=40;class Ap extends to{constructor({autoplay:e=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",keyframes:a,name:c,motionValue:h,element:l,...f}){var _;super(),this.stop=()=>{var w,E;this._animation&&(this._animation.stop(),(w=this.stopTimeline)==null||w.call(this)),(E=this.keyframeResolver)==null||E.cancel()},this.createdAt=Pt.now();const m={autoplay:e,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,name:c,motionValue:h,element:l,...f},g=(l==null?void 0:l.KeyframeResolver)||lo;this.keyframeResolver=new g(a,(w,E,x)=>this.onKeyframesResolved(w,E,m,!x),c,h,l),(_=this.keyframeResolver)==null||_.scheduleResolve()}onKeyframesResolved(e,n,r,i){this.keyframeResolver=void 0;const{name:o,type:s,velocity:a,delay:c,isHandoff:h,onUpdate:l}=r;this.resolvedAt=Pt.now(),Cp(e,o,s,a)||((ae.instantAnimations||!c)&&(l==null||l(Qi(e,r,n))),e[0]=e[e.length-1],uo(r),r.repeat=0);const m={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Tp?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...r,keyframes:e},g=!h&&kp(m)?new xp({...m,element:m.motionValue.owner.current}):new eo(m);g.finished.then(()=>this.notifyFinished()).catch(Ft),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}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(),up()),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 Pp=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ip(t){const e=Pp.exec(t);if(!e)return[,];const[,n,r,i]=e;return[`--${n??r}`,i]}function Nc(t,e,n=1){const[r,i]=Ip(t);if(!r)return;const o=window.getComputedStyle(e).getPropertyValue(r);if(o){const s=o.trim();return Ua(s)?parseFloat(s):s}return Ui(i)?Nc(i,e,n+1):i}function ho(t,e){return(t==null?void 0:t[e])??(t==null?void 0:t.default)??t}const Dc=new Set(["width","height","top","left","right","bottom",...Ye]),Mp={test:t=>t==="auto",parse:t=>t},Lc=t=>e=>e.test(t),Bc=[Ke,V,Zt,pe,bf,xf,Mp],Oc=t=>Bc.find(Lc(t));function Rp(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||za(t):!0}const Np=new Set(["brightness","contrast","saturate","opacity"]);function Dp(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[r]=n.match($i)||[];if(!r)return t;const i=n.replace(r,"");let o=Np.has(e)?1:0;return r!==n&&(o*=100),e+"("+o+i+")"}const Lp=/\b([a-z-]*)\(.*?\)/gu,fo={...me,getAnimatableNone:t=>{const e=t.match(Lp);return e?e.map(Dp).join(" "):t}},Fc={...Ke,transform:Math.round},po={borderWidth:V,borderTopWidth:V,borderRightWidth:V,borderBottomWidth:V,borderLeftWidth:V,borderRadius:V,radius:V,borderTopLeftRadius:V,borderTopRightRadius:V,borderBottomRightRadius:V,borderBottomLeftRadius:V,width:V,maxWidth:V,height:V,maxHeight:V,top:V,right:V,bottom:V,left:V,padding:V,paddingTop:V,paddingRight:V,paddingBottom:V,paddingLeft:V,margin:V,marginTop:V,marginRight:V,marginBottom:V,marginLeft:V,backgroundPositionX:V,backgroundPositionY:V,...{rotate:pe,rotateX:pe,rotateY:pe,rotateZ:pe,scale:pr,scaleX:pr,scaleY:pr,scaleZ:pr,skew:pe,skewX:pe,skewY:pe,distance:V,translateX:V,translateY:V,translateZ:V,x:V,y:V,z:V,perspective:V,transformPerspective:V,opacity:Pn,originX:sc,originY:sc,originZ:V},zIndex:Fc,fillOpacity:Pn,strokeOpacity:Pn,numOctaves:Fc},Bp={...po,color:pt,backgroundColor:pt,outlineColor:pt,fill:pt,stroke:pt,borderColor:pt,borderTopColor:pt,borderRightColor:pt,borderBottomColor:pt,borderLeftColor:pt,filter:fo,WebkitFilter:fo},Vc=t=>Bp[t];function Uc(t,e){let n=Vc(t);return n!==fo&&(n=me),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Op=new Set(["auto","none","0"]);function Fp(t,e,n){let r=0,i;for(;r<t.length&&!i;){const o=t[r];typeof o=="string"&&!Op.has(o)&&Rn(o).values.length&&(i=t[r]),r++}if(i&&n)for(const o of e)t[o]=Uc(n,i)}class Vp extends lo{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 c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),Ui(h))){const l=Nc(h,n.current);l!==void 0&&(e[c]=l),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Dc.has(r)||e.length!==2)return;const[i,o]=e,s=Oc(i),a=Oc(o);if(s!==a)if(Cc(s)&&Cc(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else Se[r]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,r=[];for(let i=0;i<e.length;i++)(e[i]===null||Rp(e[i]))&&r.push(i);r.length&&Fp(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=Se[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]=Se[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(([c,h])=>{e.getValue(c).set(h)}),this.resolveNoneKeyframes()}}function Up(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 $c=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function zc(t){return $a(t)&&"offsetHeight"in t}const jc=30,$p=t=>!isNaN(parseFloat(t));class zp{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=r=>{var o;const i=Pt.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=Pt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=$p(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 Li);const r=this.events[e].add(n);return e==="change"?()=>{r(),tt.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=Pt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>jc)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,jc);return ja(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 Xe(t,e){return new zp(t,e)}const{schedule:mo,cancel:s_}=rc(queueMicrotask,!1),Wt={x:!1,y:!1};function Wc(){return Wt.x||Wt.y}function jp(t){return t==="x"||t==="y"?Wt[t]?null:(Wt[t]=!0,()=>{Wt[t]=!1}):Wt.x||Wt.y?null:(Wt.x=Wt.y=!0,()=>{Wt.x=Wt.y=!1})}function Hc(t,e){const n=Up(t),r=new AbortController,i={passive:!0,...e,signal:r.signal};return[n,i,()=>r.abort()]}function Kc(t){return!(t.pointerType==="touch"||Wc())}function Wp(t,e,n={}){const[r,i,o]=Hc(t,n),s=a=>{if(!Kc(a))return;const{target:c}=a,h=e(c,a);if(typeof h!="function"||!c)return;const l=f=>{Kc(f)&&(h(f),c.removeEventListener("pointerleave",l))};c.addEventListener("pointerleave",l,i)};return r.forEach(a=>{a.addEventListener("pointerenter",s,i)}),o}const qc=(t,e)=>e?t===e?!0:qc(t,e.parentElement):!1,go=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Hp=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Kp(t){return Hp.has(t.tagName)||t.tabIndex!==-1}const wr=new WeakSet;function Yc(t){return e=>{e.key==="Enter"&&t(e)}}function yo(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const qp=(t,e)=>{const n=t.currentTarget;if(!n)return;const r=Yc(()=>{if(wr.has(n))return;yo(n,"down");const i=Yc(()=>{yo(n,"up")}),o=()=>yo(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 Gc(t){return go(t)&&!Wc()}function Yp(t,e,n={}){const[r,i,o]=Hc(t,n),s=a=>{const c=a.currentTarget;if(!Gc(a))return;wr.add(c);const h=e(c,a),l=(g,_)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",m),wr.has(c)&&wr.delete(c),Gc(g)&&typeof h=="function"&&h(g,{success:_})},f=g=>{l(g,c===window||c===document||n.useGlobalTarget||qc(c,g.target))},m=g=>{l(g,!1)};window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",m,i)};return r.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",s,i),zc(a)&&(a.addEventListener("focus",h=>qp(h,i)),!Kp(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Xc(t){return $a(t)&&"ownerSVGElement"in t}function Gp(t){return Xc(t)&&t.tagName==="svg"}const Et=t=>!!(t&&t.getVelocity),Xp=[...Bc,pt,me],Zp=t=>Xp.find(Lc(t)),wo=kt({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class Jp extends Mt{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(n&&e.isPresent&&!this.props.isPresent){const r=n.offsetParent,i=zc(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 Qp({children:t,isPresent:e,anchorX:n,root:r}){const i=ze(),o=F(null),s=F({width:0,height:0,top:0,left:0,right:0}),{nonce:a}=ut(wo);return En(()=>{const{width:c,height:h,top:l,left:f,right:m}=s.current;if(e||!o.current||!c||!h)return;const g=n==="left"?`left: ${f}`:`right: ${m}`;o.current.dataset.motionPopId=i;const _=document.createElement("style");a&&(_.nonce=a);const w=r??document.head;return w.appendChild(_),_.sheet&&_.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${i}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${c}px !important;
|
|
@@ -6,77 +6,77 @@
|
|
|
6
6
|
${g}px !important;
|
|
7
7
|
top: ${l}px !important;
|
|
8
8
|
}
|
|
9
|
-
`),()=>{w.contains(v)&&w.removeChild(v)}},[e]),x(qp,{isPresent:e,childRef:o,sizeRef:s,children:Ti(t,{ref:o})})}const Gp=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:c})=>{const h=Pi(Xp),l=$e();let f=!0,m=vt(()=>(f=!1,{id:l,initial:e,isPresent:n,custom:i,onExitComplete:g=>{h.set(g,!0);for(const v of h.values())if(!v)return;r&&r()},register:g=>(h.set(g,!1),()=>h.delete(g))}),[n,h,r]);return o&&f&&(m={...m}),vt(()=>{h.forEach((g,v)=>h.set(v,!1))},[n]),U(()=>{!n&&!h.size&&r&&r()},[n]),s==="popLayout"&&(t=x(Yp,{isPresent:n,anchorX:a,root:c,children:t})),x(ur.Provider,{value:m,children:t})};function Xp(){return new Map}function Yc(t=!0){const e=ut(ur);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=$e();U(()=>{if(t)return i(o)},[t]);const s=Q(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const vr=t=>t.key||"";function Gc(t){const e=[];return Ei.forEach(t,n=>{je(n)&&e.push(n)}),e}const wo=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:c})=>{const[h,l]=Yc(s),f=vt(()=>Gc(t),[t]),m=s&&!h?[]:f.map(vr),g=F(!0),v=F(f),w=Pi(()=>new Map),[E,_]=j(f),[C,k]=j(f);Ba(()=>{g.current=!1,v.current=f;for(let M=0;M<C.length;M++){const N=vr(C[M]);m.includes(N)?w.delete(N):w.get(N)!==!0&&w.set(N,!1)}},[C,m.length,m.join("-")]);const I=[];if(f!==E){let M=[...f];for(let N=0;N<C.length;N++){const A=C[N],R=vr(A);m.includes(R)||(M.splice(N,0,A),I.push(A))}return o==="wait"&&I.length&&(M=I),k(Gc(M)),_(f),null}const{forceRender:T}=ut(Ai);return x(Z,{children:C.map(M=>{const N=vr(M),A=s&&!h?!1:f===C||m.includes(N),R=()=>{if(w.has(N))w.set(N,!0);else return;let L=!0;w.forEach(O=>{O||(L=!1)}),L&&(T==null||T(),k(v.current),s&&(l==null||l()),r&&r())};return x(Gp,{isPresent:A,initial:!g.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:c,onExitComplete:A?void 0:R,anchorX:a,children:M},N)})})},Xc=kt({strict:!1}),Zc={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"]},Xe={};for(const t in Zc)Xe[t]={isEnabled:e=>Zc[t].some(n=>!!e[n])};function Zp(t){for(const e in t)Xe[e]={...Xe[e],...t[e]}}const Jp=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 _r(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Jp.has(t)}let Jc=t=>!_r(t);function Qp(t){typeof t=="function"&&(Jc=e=>e.startsWith("on")?!_r(e):t(e))}try{Qp(require("@emotion/is-prop-valid").default)}catch{}function tm(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(Jc(i)||n===!0&&_r(i)||!e&&!_r(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const xr=kt({});function br(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ln(t){return typeof t=="string"||Array.isArray(t)}const vo=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_o=["initial",...vo];function Cr(t){return br(t.animate)||_o.some(e=>Ln(t[e]))}function Qc(t){return!!(Cr(t)||t.variants)}function em(t,e){if(Cr(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Ln(n)?n:void 0,animate:Ln(r)?r:void 0}}return t.inherit!==!1?e:{}}function nm(t){const{initial:e,animate:n}=em(t,ut(xr));return vt(()=>({initial:e,animate:n}),[tl(e),tl(n)])}function tl(t){return Array.isArray(t)?t.join(" "):t}const Bn={};function rm(t){for(const e in t)Bn[e]=t[e],Fi(e)&&(Bn[e].isCSSVariable=!0)}function el(t,{layout:e,layoutId:n}){return Ye.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Bn[t]||t==="opacity")}const im={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},om=qe.length;function sm(t,e,n){let r="",i=!0;for(let o=0;o<om;o++){const s=qe[o],a=t[s];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(s.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const h=Fc(a,fo[s]);if(!c){i=!1;const l=im[s]||s;r+=`${l}(${h}) `}n&&(e[s]=h)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function xo(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const c in e){const h=e[c];if(Ye.has(c)){s=!0;continue}else if(Fi(c)){i[c]=h;continue}else{const l=Fc(h,fo[c]);c.startsWith("origin")?(a=!0,o[c]=l):r[c]=l}}if(e.transform||(s||n?r.transform=sm(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:h="50%",originZ:l=0}=o;r.transformOrigin=`${c} ${h} ${l}`}}const bo=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function nl(t,e,n){for(const r in e)!Et(e[r])&&!el(r,n)&&(t[r]=e[r])}function am({transformTemplate:t},e){return vt(()=>{const n=bo();return xo(n,e,t),Object.assign({},n.vars,n.style)},[e])}function cm(t,e){const n=t.style||{},r={};return nl(r,n,t),Object.assign(r,am(t,e)),r}function lm(t,e){const n={},r=cm(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 um={offset:"stroke-dashoffset",array:"stroke-dasharray"},dm={offset:"strokeDashoffset",array:"strokeDasharray"};function hm(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?um:dm;t[o.offset]=V.transform(-r);const s=V.transform(e),a=V.transform(n);t[o.array]=`${s} ${a}`}function rl(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},c,h,l){if(xo(t,a,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m}=t;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(l==null?void 0:l.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&hm(f,i,o,s,!1)}const il=()=>({...bo(),attrs:{}}),ol=t=>typeof t=="string"&&t.toLowerCase()==="svg";function fm(t,e,n,r){const i=vt(()=>{const o=il();return rl(o,e,ol(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};nl(o,t.style,t),i.style={...o,...i.style}}return i}const pm=["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 Co(t){return typeof t!="string"||t.includes("-")?!1:!!(pm.indexOf(t)>-1||/[A-Z]/u.test(t))}function mm(t,e,n,{latestValues:r},i,o=!1){const a=(Co(t)?fm:lm)(e,r,i,t),c=tm(e,typeof t=="string",o),h=t!==Z?{...c,...a,ref:n}:{},{children:l}=e,f=vt(()=>Et(l)?l.get():l,[l]);return B(t,{...h,children:f})}function sl(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function Eo(t,e,n,r){if(typeof e=="function"){const[i,o]=sl(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]=sl(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function Er(t){return Et(t)?t.get():t}function gm({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:ym(n,r,i,t),renderState:e()}}function ym(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=Er(o[m]);let{initial:s,animate:a}=t;const c=Cr(t),h=Qc(t);e&&h&&!c&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||s===!1;const f=l?a:s;if(f&&typeof f!="boolean"&&!br(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const v=Eo(t,m[g]);if(v){const{transitionEnd:w,transition:E,..._}=v;for(const C in _){let k=_[C];if(Array.isArray(k)){const I=l?k.length-1:0;k=k[I]}k!==null&&(i[C]=k)}for(const C in w)i[C]=w[C]}}}return i}const al=t=>(e,n)=>{const r=ut(xr),i=ut(ur),o=()=>gm(t,e,r,i);return n?o():Pi(o)};function So(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Et(r[s])||e.style&&Et(e.style[s])||el(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const wm=al({scrapeMotionValuesFromProps:So,createRenderState:bo});function cl(t,e,n){const r=So(t,e,n);for(const i in t)if(Et(t[i])||Et(e[i])){const o=qe.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const vm=al({scrapeMotionValuesFromProps:cl,createRenderState:il}),_m=Symbol.for("motionComponentSymbol");function Ze(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function xm(t,e,n){return Q(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Ze(n)&&(n.current=r))},[e])}const ko=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),ll="data-"+ko("framerAppearId"),ul=kt({});function bm(t,e,n,r,i){var w,E;const{visualElement:o}=ut(xr),s=ut(Xc),a=ut(ur),c=ut(yo).reducedMotion,h=F(null);r=r||s.renderer,!h.current&&r&&(h.current=r(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const l=h.current,f=ut(ul);l&&!l.projection&&i&&(l.type==="html"||l.type==="svg")&&Cm(h.current,n,i,f);const m=F(!1);En(()=>{l&&m.current&&l.update(n,a)});const g=n[ll],v=F(!!g&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,g))&&((E=window.MotionHasOptimisedAnimation)==null?void 0:E.call(window,g)));return Ba(()=>{l&&(m.current=!0,window.MotionIsMounted=!0,l.updateFeatures(),l.scheduleRenderMicrotask(),v.current&&l.animationState&&l.animationState.animateChanges())}),U(()=>{l&&(!v.current&&l.animationState&&l.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var _;(_=window.MotionHandoffMarkAsComplete)==null||_.call(window,g)}),v.current=!1),l.enteringChildren=void 0)}),l}function Cm(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:h,layoutCrossfade:l}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:dl(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&Ze(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:l,layoutScroll:c,layoutRoot:h})}function dl(t){if(t)return t.options.allowProjection!==!1?t.projection:dl(t.parent)}function To(t,{forwardMotionProps:e=!1}={},n,r){n&&Zp(n);const i=Co(t)?vm:wm;function o(a,c){let h;const l={...ut(yo),...a,layoutId:Em(a)},{isStatic:f}=l,m=nm(a),g=i(a,f);if(!f&&Ii){Sm();const v=km(l);h=v.MeasureLayout,m.visualElement=bm(t,g,l,r,v.ProjectionNode)}return x(xr.Provider,{value:m,children:[h&&m.visualElement?x(h,{visualElement:m.visualElement,...l}):null,mm(t,a,xm(g,m.visualElement,c),g,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=he(o);return s[_m]=t,s}function Em({layoutId:t}){const e=ut(Ai).id;return e&&t!==void 0?e+"-"+t:t}function Sm(t,e){ut(Xc).strict}function km(t){const{drag:e,layout:n}=Xe;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 Tm(t,e){if(typeof Proxy>"u")return To;const n=new Map,r=(o,s)=>To(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,To(s,void 0,t,e)),n.get(s))})}function hl({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Am({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Pm(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 Ao(t){return t===void 0||t===1}function Po({scale:t,scaleX:e,scaleY:n}){return!Ao(t)||!Ao(e)||!Ao(n)}function ke(t){return Po(t)||fl(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function fl(t){return pl(t.x)||pl(t.y)}function pl(t){return t&&t!=="0%"}function Sr(t,e,n){const r=t-n,i=e*r;return n+i}function ml(t,e,n,r,i){return i!==void 0&&(t=Sr(t,i,r)),Sr(t,n,r)+e}function Io(t,e=0,n=1,r,i){t.min=ml(t.min,e,n,r,i),t.max=ml(t.max,e,n,r,i)}function gl(t,{x:e,y:n}){Io(t.x,e.translate,e.scale,e.originPoint),Io(t.y,n.translate,n.scale,n.originPoint)}const yl=.999999999999,wl=1.0000000000001;function Im(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:c}=o.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qe(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(e.x*=s.x.scale,e.y*=s.y.scale,gl(t,s)),r&&ke(o.latestValues)&&Qe(t,o.latestValues))}e.x<wl&&e.x>yl&&(e.x=1),e.y<wl&&e.y>yl&&(e.y=1)}function Je(t,e){t.min=t.min+e,t.max=t.max+e}function vl(t,e,n,r,i=.5){const o=it(t.min,t.max,i);Io(t,e,n,o,r)}function Qe(t,e){vl(t.x,e.x,e.scaleX,e.scale,e.originX),vl(t.y,e.y,e.scaleY,e.scale,e.originY)}function _l(t,e){return hl(Pm(t.getBoundingClientRect(),e))}function Mm(t,e,n){const r=_l(t,n),{scroll:i}=e;return i&&(Je(r.x,i.offset.x),Je(r.y,i.offset.y)),r}const xl=()=>({translate:0,scale:1,origin:0,originPoint:0}),tn=()=>({x:xl(),y:xl()}),bl=()=>({min:0,max:0}),dt=()=>({x:bl(),y:bl()}),Mo={current:null},Cl={current:!1};function Rm(){if(Cl.current=!0,!!Ii)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mo.current=t.matches;t.addEventListener("change",e),e()}else Mo.current=!1}const Nm=new WeakMap;function Dm(t,e,n){for(const r in e){const i=e[r],o=n[r];if(Et(i))t.addValue(r,i);else if(Et(o))t.addValue(r,Ge(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,Ge(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const El=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Lm{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=co,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=Pt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,tt.render(this.render,!1,!0))};const{latestValues:c,renderState:h}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=h,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=Cr(n),this.isVariantNode=Qc(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&Et(g)&&g.set(c[m])}}mount(e){var n;this.current=e,Nm.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)),Cl.current||Rm(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Mo.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),fe(this.notifyUpdate),fe(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=Ye.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&tt.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 Xe){const n=Xe[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):dt()}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<El.length;r++){const i=El[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=Dm(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=Ge(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"&&(Oa(r)||Va(r))?r=parseFloat(r):!Kp(r)&&me.test(n)&&(r=Oc(e,n)),this.setBaseTarget(e,Et(r)?r.get():r)),Et(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=Eo(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&&!Et(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 Di),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){po.render(this.render)}}class Sl extends Lm{constructor(){super(...arguments),this.KeyframeResolver=Dp}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;Et(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function kl(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 Bm(t){return window.getComputedStyle(t)}class Om extends Sl{constructor(){super(...arguments),this.type="html",this.renderInstance=kl}readValueFromInstance(e,n){var r;if(Ye.has(n))return(r=this.projection)!=null&&r.isProjecting?ro(n):tp(e,n);{const i=Bm(e),o=(Fi(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return _l(e,n)}build(e,n,r){xo(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return So(e,n,r)}}const Tl=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 Fm(t,e,n,r){kl(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Tl.has(i)?i:ko(i),e.attrs[i])}class Vm extends Sl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=dt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ye.has(n)){const r=Bc(n);return r&&r.default||0}return n=Tl.has(n)?n:ko(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return cl(e,n,r)}build(e,n,r){rl(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){Fm(e,n,r,i)}mount(e){this.isSVGTag=ol(e.tagName),super.mount(e)}}const Um=(t,e)=>Co(t)?new Vm(e):new Om(e,{allowProjection:t!==Z});function en(t,e,n){const r=t.getProps();return Eo(r,e,n!==void 0?n:r.custom,t)}const Ro=t=>Array.isArray(t);function $m(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Ge(n))}function zm(t){return Ro(t)?t[t.length-1]||0:t}function jm(t,e){const n=en(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=zm(o[s]);$m(t,s,a)}}function Hm(t){return!!(Et(t)&&t.add)}function No(t,e){const n=t.getValue("willChange");if(Hm(n))return n.add(e);if(!n&&ae.WillChange){const r=new ae.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Al(t){return t.props[ll]}const Wm=t=>t!==null;function Km(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(Wm),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const qm={type:"spring",stiffness:500,damping:25,restSpeed:10},Ym=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),Gm={type:"keyframes",duration:.8},Xm={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Zm=(t,{keyframes:e})=>e.length>2?Gm:Ye.has(t)?t.startsWith("scale")?Ym(e[1]):qm:Xm;function Jm({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:h,...l}){return!!Object.keys(l).length}const Do=(t,e,n,r={},i,o)=>s=>{const a=uo(r,t)||{},c=a.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Gt(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,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};Jm(a)||Object.assign(l,Zm(t,l)),l.duration&&(l.duration=Gt(l.duration)),l.repeatDelay&&(l.repeatDelay=Gt(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(lo(l),l.delay===0&&(f=!0)),(ae.instantAnimations||ae.skipAnimations)&&(f=!0,lo(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const m=Km(l.keyframes,a);if(m!==void 0){tt.update(()=>{l.onUpdate(m),l.onComplete()});return}}return a.isSync?new to(l):new Cp(l)};function Qm({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Pl(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;r&&(o=r);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const l in a){const f=t.getValue(l,t.latestValues[l]??null),m=a[l];if(m===void 0||h&&Qm(h,l))continue;const g={delay:n,...uo(o||{},l)},v=f.get();if(v!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===v&&!g.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const _=Al(t);if(_){const C=window.MotionHandoffAnimation(_,l,tt);C!==null&&(g.startTime=C,w=!0)}}No(t,l),f.start(Do(l,f,m,t.shouldReduceMotion&&Mc.has(l)?{type:!1}:g,t,w));const E=f.animation;E&&c.push(E)}return s&&Promise.all(c).then(()=>{tt.update(()=>{s&&jm(t,s)})}),c}function Il(t,e,n,r=0,i=1){const o=Array.from(t).sort((h,l)=>h.sortNodePosition(l)).indexOf(e),s=t.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function Lo(t,e,n={}){var c;const r=en(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Pl(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(h=0)=>{const{delayChildren:l=0,staggerChildren:f,staggerDirection:m}=i;return t0(t,e,h,l,f,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[h,l]=a==="beforeChildren"?[o,s]:[s,o];return h().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function t0(t,e,n=0,r=0,i=0,o=1,s){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Lo(c,e,{...s,delay:n+(typeof r=="function"?0:r)+Il(t.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function e0(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Lo(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Lo(t,e,n);else{const i=typeof e=="function"?en(t,e,n.custom):e;r=Promise.all(Pl(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function Ml(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 n0=_o.length;function Rl(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Rl(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<n0;n++){const r=_o[n],i=t.props[r];(Ln(i)||i===!1)&&(e[r]=i)}return e}const r0=[...vo].reverse(),i0=vo.length;function o0(t){return e=>Promise.all(e.map(({animation:n,options:r})=>e0(t,n,r)))}function s0(t){let e=o0(t),n=Nl(),r=!0;const i=c=>(h,l)=>{var m;const f=en(t,l,c==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:g,transitionEnd:v,...w}=f;h={...h,...w,...v}}return h};function o(c){e=c(t)}function s(c){const{props:h}=t,l=Rl(t.parent)||{},f=[],m=new Set;let g={},v=1/0;for(let E=0;E<i0;E++){const _=r0[E],C=n[_],k=h[_]!==void 0?h[_]:l[_],I=Ln(k),T=_===c?C.isActive:null;T===!1&&(v=E);let M=k===l[_]&&k!==h[_]&&I;if(M&&r&&t.manuallyAnimateOnMount&&(M=!1),C.protectedKeys={...g},!C.isActive&&T===null||!k&&!C.prevProp||br(k)||typeof k=="boolean")continue;const N=a0(C.prevProp,k);let A=N||_===c&&C.isActive&&!M&&I||E>v&&I,R=!1;const L=Array.isArray(k)?k:[k];let O=L.reduce(i(_),{});T===!1&&(O={});const{prevResolvedValues:et={}}=C,ht={...et,...O},Mt=K=>{A=!0,m.has(K)&&(R=!0,m.delete(K)),C.needsAnimating[K]=!0;const wt=t.getValue(K);wt&&(wt.liveStyle=!1)};for(const K in ht){const wt=O[K],Bt=et[K];if(g.hasOwnProperty(K))continue;let jt=!1;Ro(wt)&&Ro(Bt)?jt=!Ml(wt,Bt):jt=wt!==Bt,jt?wt!=null?Mt(K):m.add(K):wt!==void 0&&m.has(K)?Mt(K):C.protectedKeys[K]=!0}C.prevProp=k,C.prevResolvedValues=O,C.isActive&&(g={...g,...O}),r&&t.blockInitialAnimation&&(A=!1);const G=M&&N;A&&(!G||R)&&f.push(...L.map(K=>{const wt={type:_};if(typeof K=="string"&&r&&!G&&t.manuallyAnimateOnMount&&t.parent){const{parent:Bt}=t,jt=en(Bt,K);if(Bt.enteringChildren&&jt){const{delayChildren:W}=jt.transition||{};wt.delay=Il(Bt.enteringChildren,t,W)}}return{animation:K,options:wt}}))}if(m.size){const E={};if(typeof h.initial!="boolean"){const _=en(t,Array.isArray(h.initial)?h.initial[0]:h.initial);_&&_.transition&&(E.transition=_.transition)}m.forEach(_=>{const C=t.getBaseTarget(_),k=t.getValue(_);k&&(k.liveStyle=!0),E[_]=C??null}),f.push({animation:E})}let w=!!f.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,w?e(f):Promise.resolve()}function a(c,h){var f;if(n[c].isActive===h)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(c,h)}),n[c].isActive=h;const l=s(c);for(const m in n)n[m].protectedKeys={};return l}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Nl(),r=!0}}}function a0(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Ml(e,t):!1}function Te(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nl(){return{animate:Te(!0),whileInView:Te(),whileHover:Te(),whileTap:Te(),whileDrag:Te(),whileFocus:Te(),exit:Te()}}class ge{constructor(e){this.isMounted=!1,this.node=e}update(){}}class c0 extends ge{constructor(e){super(e),e.animationState||(e.animationState=s0(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();br(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 l0=0;class u0 extends ge{constructor(){super(...arguments),this.id=l0++}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 d0={animation:{Feature:c0},exit:{Feature:u0}};function On(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function Fn(t){return{point:{x:t.pageX,y:t.pageY}}}const h0=t=>e=>mo(e)&&t(e,Fn(e));function Vn(t,e,n,r){return On(t,e,h0(n),r)}const Dl=1e-4,f0=1-Dl,p0=1+Dl,Ll=.01,m0=0-Ll,g0=0+Ll;function Tt(t){return t.max-t.min}function y0(t,e,n){return Math.abs(t-e)<=n}function Bl(t,e,n,r=.5){t.origin=r,t.originPoint=it(e.min,e.max,t.origin),t.scale=Tt(n)/Tt(e),t.translate=it(n.min,n.max,t.origin)-t.originPoint,(t.scale>=f0&&t.scale<=p0||isNaN(t.scale))&&(t.scale=1),(t.translate>=m0&&t.translate<=g0||isNaN(t.translate))&&(t.translate=0)}function Un(t,e,n,r){Bl(t.x,e.x,n.x,r?r.originX:void 0),Bl(t.y,e.y,n.y,r?r.originY:void 0)}function Ol(t,e,n){t.min=n.min+e.min,t.max=t.min+Tt(e)}function w0(t,e,n){Ol(t.x,e.x,n.x),Ol(t.y,e.y,n.y)}function Fl(t,e,n){t.min=e.min-n.min,t.max=t.min+Tt(e)}function $n(t,e,n){Fl(t.x,e.x,n.x),Fl(t.y,e.y,n.y)}function Vt(t){return[t("x"),t("y")]}const Vl=({current:t})=>t?t.ownerDocument.defaultView:null,Ul=(t,e)=>Math.abs(t-e);function v0(t,e){const n=Ul(t.x,e.x),r=Ul(t.y,e.y);return Math.sqrt(n**2+r**2)}class $l{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=Oo(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,v=v0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!v)return;const{point:w}=m,{timestamp:E}=Ct;this.history.push({...w,timestamp:E});const{onStart:_,onMove:C}=this.handlers;g||(_&&_(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Bo(g,this.transformPagePoint),tt.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:v,onSessionEnd:w,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const _=Oo(m.type==="pointercancel"?this.lastMoveEventInfo:Bo(g,this.transformPagePoint),this.history);this.startEvent&&v&&v(m,_),w&&w(m,_)},!mo(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=Fn(e),c=Bo(a,this.transformPagePoint),{point:h}=c,{timestamp:l}=Ct;this.history=[{...h,timestamp:l}];const{onSessionStart:f}=n;f&&f(e,Oo(c,this.history)),this.removeListeners=kn(Vn(this.contextWindow,"pointermove",this.handlePointerMove),Vn(this.contextWindow,"pointerup",this.handlePointerUp),Vn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),fe(this.updatePoint)}}function Bo(t,e){return e?{point:e(t.point)}:t}function zl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Oo({point:t},e){return{point:t,delta:zl(t,jl(e)),offset:zl(t,_0(e)),velocity:x0(e,.1)}}function _0(t){return t[0]}function jl(t){return t[t.length-1]}function x0(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=jl(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Gt(e)));)n--;if(!r)return{x:0,y:0};const o=Xt(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 b0(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?it(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?it(n,t,r.max):Math.min(t,n)),t}function Hl(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 C0(t,{top:e,left:n,bottom:r,right:i}){return{x:Hl(t.x,n,i),y:Hl(t.y,e,r)}}function Wl(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 E0(t,e){return{x:Wl(t.x,e.x),y:Wl(t.y,e.y)}}function S0(t,e){let n=.5;const r=Tt(t),i=Tt(e);return i>r?n=Tn(e.min,e.max-r,t.min):r>i&&(n=Tn(t.min,t.max-i,e.min)),se(0,1,n)}function k0(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 Fo=.35;function T0(t=Fo){return t===!1?t=0:t===!0&&(t=Fo),{x:Kl(t,"left","right"),y:Kl(t,"top","bottom")}}function Kl(t,e,n){return{min:ql(t,e),max:ql(t,n)}}function ql(t,e){return typeof t=="number"?t:t[e]||0}const A0=new WeakMap;class P0{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=dt(),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=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fn(f).point)},s=(f,m)=>{const{drag:g,dragPropagation:v,onDragStart:w}=this.getProps();if(g&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Fp(g),!this.openDragLock))return;this.latestPointerEvent=f,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),Vt(_=>{let C=this.getAxisMotionValue(_).get()||0;if(Zt.test(C)){const{projection:k}=this.visualElement;if(k&&k.layout){const I=k.layout.layoutBox[_];I&&(C=Tt(I)*(parseFloat(C)/100))}}this.originPoint[_]=C}),w&&tt.postRender(()=>w(f,m)),No(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:v,onDirectionLock:w,onDrag:E}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:_}=m;if(v&&this.currentDirection===null){this.currentDirection=I0(_),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,_),this.updateAxis("y",m.point,_),this.visualElement.render(),E&&E(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Vt(f=>{var m;return this.getAnimationState(f)==="paused"&&((m=this.getAxisMotionValue(f).animation)==null?void 0:m.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new $l(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:r,contextWindow:Vl(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&&tt.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||!kr(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=b0(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&&Ze(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=C0(r.layoutBox,e):this.constraints=!1,this.elastic=T0(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Vt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=k0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Ze(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Mm(r,i.root,this.visualElement.getTransformPagePoint());let s=E0(i.layout.layoutBox,o);if(n){const a=n(Am(s));this.hasMutatedConstraints=!!a,a&&(s=hl(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},h=Vt(l=>{if(!kr(l,n,this.currentDirection))return;let f=c&&c[l]||{};s&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,v={type:"inertia",velocity:r?e[l]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,v)});return Promise.all(h).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return No(this.visualElement,e),r.start(Do(e,r,0,n,this.visualElement,!1))}stopAnimation(){Vt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Vt(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){Vt(n=>{const{drag:r}=this.getProps();if(!kr(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]-it(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Ze(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Vt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();i[s]=S0({min:c,max:c},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(),Vt(s=>{if(!kr(s,e,null))return;const a=this.getAxisMotionValue(s),{min:c,max:h}=this.constraints[s];a.set(it(c,h,i[s]))})}addListeners(){if(!this.visualElement.current)return;A0.set(this.visualElement,this);const e=this.visualElement.current,n=Vn(e,"pointerdown",c=>{const{drag:h,dragListener:l=!0}=this.getProps();h&&l&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Ze(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),tt.read(r);const s=On(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h})=>{this.isDragging&&h&&(Vt(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=c[l].translate,f.set(f.get()+c[l].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=Fo,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function kr(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function I0(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class M0 extends ge{constructor(e){super(e),this.removeGroupControls=Ft,this.removeListeners=Ft,this.controls=new P0(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ft}unmount(){this.removeGroupControls(),this.removeListeners()}}const Yl=t=>(e,n)=>{t&&tt.postRender(()=>t(e,n))};class R0 extends ge{constructor(){super(...arguments),this.removePointerDownListener=Ft}onPointerDown(e){this.session=new $l(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Vl(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Yl(e),onStart:Yl(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&tt.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Vn(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 Tr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Gl(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zn={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=Gl(t,e.target.x),r=Gl(t,e.target.y);return`${n}% ${r}%`}},N0={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=me.parse(t);if(i.length>5)return r;const o=me.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=c;const h=it(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=h),typeof i[3+s]=="number"&&(i[3+s]/=h),o(i)}};let Vo=!1;class D0 extends Rt{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;rm(L0),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Vo&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Tr.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,Vo=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||tt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),po.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Vo=!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 Xl(t){const[e,n]=Yc(),r=ut(Ai);return x(D0,{...t,layoutGroup:r,switchLayoutGroup:ut(ul),isPresent:e,safeToRemove:n})}const L0={borderRadius:{...zn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zn,borderTopRightRadius:zn,borderBottomLeftRadius:zn,borderBottomRightRadius:zn,boxShadow:N0};function B0(t,e,n){const r=Et(t)?t:Ge(t);return r.start(Do("",r,e,n)),r.animation}const O0=(t,e)=>t.depth-e.depth;class F0{constructor(){this.children=[],this.isDirty=!1}add(e){Mi(this.children,e),this.isDirty=!0}remove(e){Ri(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(O0),this.isDirty=!1,this.children.forEach(e)}}function V0(t,e){const n=Pt.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(fe(r),t(o-e))};return tt.setup(r,!0),()=>fe(r)}const Zl=["TopLeft","TopRight","BottomLeft","BottomRight"],U0=Zl.length,Jl=t=>typeof t=="string"?parseFloat(t):t,Ql=t=>typeof t=="number"||V.test(t);function $0(t,e,n,r,i,o){i?(t.opacity=it(0,n.opacity??1,z0(r)),t.opacityExit=it(e.opacity??1,0,j0(r))):o&&(t.opacity=it(e.opacity??1,n.opacity??1,r));for(let s=0;s<U0;s++){const a=`border${Zl[s]}Radius`;let c=tu(e,a),h=tu(n,a);if(c===void 0&&h===void 0)continue;c||(c=0),h||(h=0),c===0||h===0||Ql(c)===Ql(h)?(t[a]=Math.max(it(Jl(c),Jl(h),r),0),(Zt.test(h)||Zt.test(c))&&(t[a]+="%")):t[a]=h}(e.rotate||n.rotate)&&(t.rotate=it(e.rotate||0,n.rotate||0,r))}function tu(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const z0=eu(0,.5,qa),j0=eu(.5,.95,Ft);function eu(t,e,n){return r=>r<t?0:r>e?1:n(Tn(t,e,r))}function nu(t,e){t.min=e.min,t.max=e.max}function Ut(t,e){nu(t.x,e.x),nu(t.y,e.y)}function ru(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function iu(t,e,n,r,i){return t-=e,t=Sr(t,1/n,r),i!==void 0&&(t=Sr(t,1/i,r)),t}function H0(t,e=0,n=1,r=.5,i,o=t,s=t){if(Zt.test(e)&&(e=parseFloat(e),e=it(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=it(o.min,o.max,r);t===o&&(a-=e),t.min=iu(t.min,e,n,a,i),t.max=iu(t.max,e,n,a,i)}function ou(t,e,[n,r,i],o,s){H0(t,e[n],e[r],e[i],e.scale,o,s)}const W0=["x","scaleX","originX"],K0=["y","scaleY","originY"];function su(t,e,n,r){ou(t.x,e,W0,n?n.x:void 0,r?r.x:void 0),ou(t.y,e,K0,n?n.y:void 0,r?r.y:void 0)}function au(t){return t.translate===0&&t.scale===1}function cu(t){return au(t.x)&&au(t.y)}function lu(t,e){return t.min===e.min&&t.max===e.max}function q0(t,e){return lu(t.x,e.x)&&lu(t.y,e.y)}function uu(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function du(t,e){return uu(t.x,e.x)&&uu(t.y,e.y)}function hu(t){return Tt(t.x)/Tt(t.y)}function fu(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Y0{constructor(){this.members=[]}add(e){Mi(this.members,e),e.scheduleRender()}remove(e){if(Ri(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 G0(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:h,rotate:l,rotateX:f,rotateY:m,skewX:g,skewY:v}=n;h&&(r=`perspective(${h}px) ${r}`),l&&(r+=`rotate(${l}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),v&&(r+=`skewY(${v}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const Uo=["","X","Y","Z"],X0=1e3;let Z0=0;function $o(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function pu(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Al(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",tt,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&pu(r)}function mu({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=Z0++,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(tg),this.nodes.forEach(ig),this.nodes.forEach(og),this.nodes.forEach(eg)},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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new F0)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Di),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=qc(s)&&!Hp(s),this.instance=s;const{layoutId:a,layout:c,visualElement:h}=this.options;if(h&&!h.current&&h.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let l,f=0;const m=()=>this.root.updateBlockedByResize=!1;tt.read(()=>{f=window.innerWidth}),t(s,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,l&&l(),l=V0(m,250),Tr.hasAnimatedSinceResize&&(Tr.hasAnimatedSinceResize=!1,this.nodes.forEach(wu)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&h&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||h.getDefaultTransition()||ug,{onLayoutAnimationStart:w,onLayoutAnimationComplete:E}=h.getProps(),_=!this.targetLayout||!du(this.targetLayout,g),C=!f&&m;if(this.options.layoutRoot||this.resumeFrom||C||f&&(_||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...uo(v,"layout"),onPlay:w,onComplete:E};(h.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(l,C)}else f||wu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}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(),fe(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(sg),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&&pu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const f=this.path[l];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(gu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(yu);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(rg),this.nodes.forEach(J0),this.nodes.forEach(Q0)):this.nodes.forEach(yu),this.clearAllSnapshots();const a=Pt.now();Ct.delta=se(0,1e3/60,a-Ct.timestamp),Ct.timestamp=a,Ct.isProcessing=!0,Oi.update.process(Ct),Oi.preRender.process(Ct),Oi.render.process(Ct),Ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,po.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ng),this.sharedNodes.forEach(ag)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Tt(this.snapshot.measuredBox.x)&&!Tt(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=dt(),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 c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!cu(this.projectionDelta),c=this.getTransformTemplate(),h=c?c(this.latestValues,""):void 0,l=h!==this.prevTransformTemplateValue;s&&this.instance&&(a||ke(this.latestValues)||l)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),dg(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:s}=this.options;if(!s)return dt();const a=s.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(hg))){const{scroll:l}=this.root;l&&(Je(a.x,l.offset.x),Je(a.y,l.offset.y))}return a}removeElementScroll(s){var c;const a=dt();if(Ut(a,s),(c=this.scroll)!=null&&c.wasRoot)return a;for(let h=0;h<this.path.length;h++){const l=this.path[h],{scroll:f,options:m}=l;l!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&Ut(a,s),Je(a.x,f.offset.x),Je(a.y,f.offset.y))}return a}applyTransform(s,a=!1){const c=dt();Ut(c,s);for(let h=0;h<this.path.length;h++){const l=this.path[h];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&Qe(c,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),ke(l.latestValues)&&Qe(c,l.latestValues)}return ke(this.latestValues)&&Qe(c,this.latestValues),c}removeTransform(s){const a=dt();Ut(a,s);for(let c=0;c<this.path.length;c++){const h=this.path[c];if(!h.instance||!ke(h.latestValues))continue;Po(h.latestValues)&&h.updateSnapshot();const l=dt(),f=h.measurePageBox();Ut(l,f),su(a,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,l)}return ke(this.latestValues)&&su(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!==Ct.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 c=!!this.resumingFrom||this!==a;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:f}=this.options;if(!(!this.layout||!(l||f))){if(this.resolvedRelativeTargetAt=Ct.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=dt(),this.relativeTargetOrigin=dt(),$n(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Ut(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=dt(),this.targetWithTransforms=dt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),w0(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ut(this.target,this.layout.layoutBox),gl(this.target,this.targetDelta)):Ut(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=dt(),this.relativeTargetOrigin=dt(),$n(this.relativeTargetOrigin,this.target,g.target),Ut(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Po(this.parent.latestValues)||fl(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 v;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ct.timestamp&&(c=!1),c)return;const{layout:h,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||l))return;Ut(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Im(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=dt());const{target:g}=s;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(ru(this.prevProjectionDelta.x,this.projectionDelta.x),ru(this.prevProjectionDelta.y,this.projectionDelta.y)),Un(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!fu(this.projectionDelta.x,this.prevProjectionDelta.x)||!fu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const c=this.getStack();c&&c.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 c=this.snapshot,h=c?c.latestValues:{},l={...this.latestValues},f=tn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=dt(),g=c?c.source:void 0,v=this.layout?this.layout.source:void 0,w=g!==v,E=this.getStack(),_=!E||E.members.length<=1,C=!!(w&&!_&&this.options.crossfade===!0&&!this.path.some(lg));this.animationProgress=0;let k;this.mixTargetDelta=I=>{const T=I/1e3;vu(f.x,s.x,T),vu(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($n(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),cg(this.relativeTarget,this.relativeTargetOrigin,m,T),k&&q0(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=dt()),Ut(k,this.relativeTarget)),w&&(this.animationValues=l,$0(l,h,this.latestValues,T,C,_)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,c,h;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(h=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||h.stop(),this.pendingAnimation&&(fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tt.update(()=>{Tr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ge(0)),this.currentAnimation=B0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},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(X0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:h,latestValues:l}=s;if(!(!a||!c||!h)){if(this!==s&&this.layout&&h&&Eu(this.options.animationType,this.layout.layoutBox,h.layoutBox)){c=this.target||dt();const f=Tt(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const m=Tt(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+m}Ut(a,c),Qe(a,l),Un(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Y0),this.sharedNodes.get(s).add(a);const h=a.options.initialPromotionConfig;a.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.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:c}={}){const h=this.getStack();h&&h.promote(this,c),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:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const h={};c.z&&$o("z",s,h,this.animationValues);for(let l=0;l<Uo.length;l++)$o(`rotate${Uo[l]}`,s,h,this.animationValues),$o(`skew${Uo[l]}`,s,h,this.animationValues);s.render();for(const l in h)s.setStaticValue(l,h[l]),this.animationValues&&(this.animationValues[l]=h[l]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Er(a==null?void 0:a.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Er(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!ke(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const l=h.animationValues||h.latestValues;this.applyTransformsToTarget();let f=G0(this.projectionDeltaWithTransform,this.treeScale,l);c&&(f=c(l,f)),s.transform=f;const{x:m,y:g}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,h.animationValues?s.opacity=h===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:s.opacity=h===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const v in Bn){if(l[v]===void 0)continue;const{correct:w,applyTo:E,isCSSVariable:_}=Bn[v],C=f==="none"?l[v]:w(l[v],h);if(E){const k=E.length;for(let I=0;I<k;I++)s[E[I]]=C}else _?this.options.visualElement.renderState.vars[v]=C:s[v]=C}this.options.layoutId&&(s.pointerEvents=h===this?Er(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(gu),this.root.sharedNodes.clear()}}}function J0(t){t.updateLayout()}function Q0(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"?Vt(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Tt(m);m.min=r[f].min,m.max=m.min+g}):Eu(o,e.layoutBox,r)&&Vt(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Tt(r[f]);m.max=m.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+g)});const a=tn();Un(a,r,e.layoutBox);const c=tn();s?Un(c,t.applyTransform(i,!0),e.measuredBox):Un(c,r,e.layoutBox);const h=!cu(a);let l=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:g}=f;if(m&&g){const v=dt();$n(v,e.layoutBox,m.layoutBox);const w=dt();$n(w,r,g.layoutBox),du(v,w)||(l=!0),f.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=v,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:h,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function tg(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 eg(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ng(t){t.clearSnapshot()}function gu(t){t.clearMeasurements()}function yu(t){t.isLayoutDirty=!1}function rg(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function wu(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ig(t){t.resolveTargetDelta()}function og(t){t.calcProjection()}function sg(t){t.resetSkewAndRotation()}function ag(t){t.removeLeadSnapshot()}function vu(t,e,n){t.translate=it(e.translate,0,n),t.scale=it(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _u(t,e,n,r){t.min=it(e.min,n.min,r),t.max=it(e.max,n.max,r)}function cg(t,e,n,r){_u(t.x,e.x,n.x,r),_u(t.y,e.y,n.y,r)}function lg(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const ug={duration:.45,ease:[.4,0,.1,1]},xu=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),bu=xu("applewebkit/")&&!xu("chrome/")?Math.round:Ft;function Cu(t){t.min=bu(t.min),t.max=bu(t.max)}function dg(t){Cu(t.x),Cu(t.y)}function Eu(t,e,n){return t==="position"||t==="preserve-aspect"&&!y0(hu(e),hu(n),.2)}function hg(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const fg=mu({attachResizeListener:(t,e)=>On(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),zo={current:void 0},Su=mu({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!zo.current){const t=new fg({});t.mount(window),t.setOptions({layoutScroll:!0}),zo.current=t}return zo.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),pg={pan:{Feature:R0},drag:{Feature:M0,ProjectionNode:Su,MeasureLayout:Xl}};function ku(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&&tt.postRender(()=>o(e,Fn(e)))}class mg extends ge{mount(){const{current:e}=this.node;e&&(this.unmount=Vp(e,(n,r)=>(ku(this.node,r,"Start"),i=>ku(this.node,i,"End"))))}unmount(){}}class gg extends ge{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=kn(On(this.node.current,"focus",()=>this.onFocus()),On(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Tu(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&&tt.postRender(()=>o(e,Fn(e)))}class yg extends ge{mount(){const{current:e}=this.node;e&&(this.unmount=jp(e,(n,r)=>(Tu(this.node,r,"Start"),(i,{success:o})=>Tu(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const jo=new WeakMap,Ho=new WeakMap,wg=t=>{const e=jo.get(t.target);e&&e(t)},vg=t=>{t.forEach(wg)};function _g({root:t,...e}){const n=t||document;Ho.has(n)||Ho.set(n,{});const r=Ho.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(vg,{root:t,...e})),r[i]}function xg(t,e,n){const r=_g(e);return jo.set(t,n),r.observe(t),()=>{jo.delete(t),r.unobserve(t)}}const bg={some:0,all:1};class Cg extends ge{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:bg[i]},a=c=>{const{isIntersecting:h}=c;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),m=h?l:f;m&&m(c)};return xg(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(Eg(e,n))&&this.startObserver()}unmount(){}}function Eg({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Sg={...d0,...{inView:{Feature:Cg},tap:{Feature:yg},focus:{Feature:gg},hover:{Feature:mg}},...pg,...{layout:{ProjectionNode:Su,MeasureLayout:Xl}}},ce=Tm(Sg,Um);/**
|
|
9
|
+
`),()=>{w.contains(_)&&w.removeChild(_)}},[e]),v(Jp,{isPresent:e,childRef:o,sizeRef:s,children:Ai(t,{ref:o})})}const tm=({children:t,initial:e,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:a,root:c})=>{const h=Ii(em),l=ze();let f=!0,m=vt(()=>(f=!1,{id:l,initial:e,isPresent:n,custom:i,onExitComplete:g=>{h.set(g,!0);for(const _ of h.values())if(!_)return;r&&r()},register:g=>(h.set(g,!1),()=>h.delete(g))}),[n,h,r]);return o&&f&&(m={...m}),vt(()=>{h.forEach((g,_)=>h.set(_,!1))},[n]),U(()=>{!n&&!h.size&&r&&r()},[n]),s==="popLayout"&&(t=v(Qp,{isPresent:n,anchorX:a,root:c,children:t})),v(ur.Provider,{value:m,children:t})};function em(){return new Map}function Zc(t=!0){const e=ut(ur);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,o=ze();U(()=>{if(t)return i(o)},[t]);const s=Q(()=>t&&r&&r(o),[o,r,t]);return!n&&r?[!1,s]:[!0]}const vr=t=>t.key||"";function Jc(t){const e=[];return Si.forEach(t,n=>{We(n)&&e.push(n)}),e}const vo=({children:t,custom:e,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:s=!1,anchorX:a="left",root:c})=>{const[h,l]=Zc(s),f=vt(()=>Jc(t),[t]),m=s&&!h?[]:f.map(vr),g=F(!0),_=F(f),w=Ii(()=>new Map),[E,x]=j(f),[C,k]=j(f);Va(()=>{g.current=!1,_.current=f;for(let I=0;I<C.length;I++){const N=vr(C[I]);m.includes(N)?w.delete(N):w.get(N)!==!0&&w.set(N,!1)}},[C,m.length,m.join("-")]);const M=[];if(f!==E){let I=[...f];for(let N=0;N<C.length;N++){const A=C[N],R=vr(A);m.includes(R)||(I.splice(N,0,A),M.push(A))}return o==="wait"&&M.length&&(I=M),k(Jc(I)),x(f),null}const{forceRender:T}=ut(Pi);return v(Z,{children:C.map(I=>{const N=vr(I),A=s&&!h?!1:f===C||m.includes(N),R=()=>{if(w.has(N))w.set(N,!0);else return;let D=!0;w.forEach(O=>{O||(D=!1)}),D&&(T==null||T(),k(_.current),s&&(l==null||l()),r&&r())};return v(tm,{isPresent:A,initial:!g.current||n?void 0:!1,custom:e,presenceAffectsLayout:i,mode:o,root:c,onExitComplete:A?void 0:R,anchorX:a,children:I},N)})})},Qc=kt({strict:!1}),tl={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"]},Ze={};for(const t in tl)Ze[t]={isEnabled:e=>tl[t].some(n=>!!e[n])};function nm(t){for(const e in t)Ze[e]={...Ze[e],...t[e]}}const rm=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 _r(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||rm.has(t)}let el=t=>!_r(t);function im(t){typeof t=="function"&&(el=e=>e.startsWith("on")?!_r(e):t(e))}try{im(require("@emotion/is-prop-valid").default)}catch{}function om(t,e,n){const r={};for(const i in t)i==="values"&&typeof t.values=="object"||(el(i)||n===!0&&_r(i)||!e&&!_r(i)||t.draggable&&i.startsWith("onDrag"))&&(r[i]=t[i]);return r}const xr=kt({});function br(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Ln(t){return typeof t=="string"||Array.isArray(t)}const _o=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],xo=["initial",..._o];function Cr(t){return br(t.animate)||xo.some(e=>Ln(t[e]))}function nl(t){return!!(Cr(t)||t.variants)}function sm(t,e){if(Cr(t)){const{initial:n,animate:r}=t;return{initial:n===!1||Ln(n)?n:void 0,animate:Ln(r)?r:void 0}}return t.inherit!==!1?e:{}}function am(t){const{initial:e,animate:n}=sm(t,ut(xr));return vt(()=>({initial:e,animate:n}),[rl(e),rl(n)])}function rl(t){return Array.isArray(t)?t.join(" "):t}const Bn={};function cm(t){for(const e in t)Bn[e]=t[e],Vi(e)&&(Bn[e].isCSSVariable=!0)}function il(t,{layout:e,layoutId:n}){return Ge.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Bn[t]||t==="opacity")}const lm={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},um=Ye.length;function dm(t,e,n){let r="",i=!0;for(let o=0;o<um;o++){const s=Ye[o],a=t[s];if(a===void 0)continue;let c=!0;if(typeof a=="number"?c=a===(s.startsWith("scale")?1:0):c=parseFloat(a)===0,!c||n){const h=$c(a,po[s]);if(!c){i=!1;const l=lm[s]||s;r+=`${l}(${h}) `}n&&(e[s]=h)}}return r=r.trim(),n?r=n(e,i?"":r):i&&(r="none"),r}function bo(t,e,n){const{style:r,vars:i,transformOrigin:o}=t;let s=!1,a=!1;for(const c in e){const h=e[c];if(Ge.has(c)){s=!0;continue}else if(Vi(c)){i[c]=h;continue}else{const l=$c(h,po[c]);c.startsWith("origin")?(a=!0,o[c]=l):r[c]=l}}if(e.transform||(s||n?r.transform=dm(e,t.transform,n):r.transform&&(r.transform="none")),a){const{originX:c="50%",originY:h="50%",originZ:l=0}=o;r.transformOrigin=`${c} ${h} ${l}`}}const Co=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function ol(t,e,n){for(const r in e)!Et(e[r])&&!il(r,n)&&(t[r]=e[r])}function hm({transformTemplate:t},e){return vt(()=>{const n=Co();return bo(n,e,t),Object.assign({},n.vars,n.style)},[e])}function fm(t,e){const n=t.style||{},r={};return ol(r,n,t),Object.assign(r,hm(t,e)),r}function pm(t,e){const n={},r=fm(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 mm={offset:"stroke-dashoffset",array:"stroke-dasharray"},gm={offset:"strokeDashoffset",array:"strokeDasharray"};function ym(t,e,n=1,r=0,i=!0){t.pathLength=1;const o=i?mm:gm;t[o.offset]=V.transform(-r);const s=V.transform(e),a=V.transform(n);t[o.array]=`${s} ${a}`}function sl(t,{attrX:e,attrY:n,attrScale:r,pathLength:i,pathSpacing:o=1,pathOffset:s=0,...a},c,h,l){if(bo(t,a,h),c){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:f,style:m}=t;f.transform&&(m.transform=f.transform,delete f.transform),(m.transform||f.transformOrigin)&&(m.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),m.transform&&(m.transformBox=(l==null?void 0:l.transformBox)??"fill-box",delete f.transformBox),e!==void 0&&(f.x=e),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),i!==void 0&&ym(f,i,o,s,!1)}const al=()=>({...Co(),attrs:{}}),cl=t=>typeof t=="string"&&t.toLowerCase()==="svg";function wm(t,e,n,r){const i=vt(()=>{const o=al();return sl(o,e,cl(r),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};ol(o,t.style,t),i.style={...o,...i.style}}return i}const vm=["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 Eo(t){return typeof t!="string"||t.includes("-")?!1:!!(vm.indexOf(t)>-1||/[A-Z]/u.test(t))}function _m(t,e,n,{latestValues:r},i,o=!1){const a=(Eo(t)?wm:pm)(e,r,i,t),c=om(e,typeof t=="string",o),h=t!==Z?{...c,...a,ref:n}:{},{children:l}=e,f=vt(()=>Et(l)?l.get():l,[l]);return B(t,{...h,children:f})}function ll(t){const e=[{},{}];return t==null||t.values.forEach((n,r)=>{e[0][r]=n.get(),e[1][r]=n.getVelocity()}),e}function So(t,e,n,r){if(typeof e=="function"){const[i,o]=ll(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]=ll(r);e=e(n!==void 0?n:t.custom,i,o)}return e}function Er(t){return Et(t)?t.get():t}function xm({scrapeMotionValuesFromProps:t,createRenderState:e},n,r,i){return{latestValues:bm(n,r,i,t),renderState:e()}}function bm(t,e,n,r){const i={},o=r(t,{});for(const m in o)i[m]=Er(o[m]);let{initial:s,animate:a}=t;const c=Cr(t),h=nl(t);e&&h&&!c&&t.inherit!==!1&&(s===void 0&&(s=e.initial),a===void 0&&(a=e.animate));let l=n?n.initial===!1:!1;l=l||s===!1;const f=l?a:s;if(f&&typeof f!="boolean"&&!br(f)){const m=Array.isArray(f)?f:[f];for(let g=0;g<m.length;g++){const _=So(t,m[g]);if(_){const{transitionEnd:w,transition:E,...x}=_;for(const C in x){let k=x[C];if(Array.isArray(k)){const M=l?k.length-1:0;k=k[M]}k!==null&&(i[C]=k)}for(const C in w)i[C]=w[C]}}}return i}const ul=t=>(e,n)=>{const r=ut(xr),i=ut(ur),o=()=>xm(t,e,r,i);return n?o():Ii(o)};function ko(t,e,n){var o;const{style:r}=t,i={};for(const s in r)(Et(r[s])||e.style&&Et(e.style[s])||il(s,t)||((o=n==null?void 0:n.getValue(s))==null?void 0:o.liveStyle)!==void 0)&&(i[s]=r[s]);return i}const Cm=ul({scrapeMotionValuesFromProps:ko,createRenderState:Co});function dl(t,e,n){const r=ko(t,e,n);for(const i in t)if(Et(t[i])||Et(e[i])){const o=Ye.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=t[i]}return r}const Em=ul({scrapeMotionValuesFromProps:dl,createRenderState:al}),Sm=Symbol.for("motionComponentSymbol");function Je(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function km(t,e,n){return Q(r=>{r&&t.onMount&&t.onMount(r),e&&(r?e.mount(r):e.unmount()),n&&(typeof n=="function"?n(r):Je(n)&&(n.current=r))},[e])}const To=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),hl="data-"+To("framerAppearId"),fl=kt({});function Tm(t,e,n,r,i){var w,E;const{visualElement:o}=ut(xr),s=ut(Qc),a=ut(ur),c=ut(wo).reducedMotion,h=F(null);r=r||s.renderer,!h.current&&r&&(h.current=r(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:c}));const l=h.current,f=ut(fl);l&&!l.projection&&i&&(l.type==="html"||l.type==="svg")&&Am(h.current,n,i,f);const m=F(!1);En(()=>{l&&m.current&&l.update(n,a)});const g=n[hl],_=F(!!g&&!((w=window.MotionHandoffIsComplete)!=null&&w.call(window,g))&&((E=window.MotionHasOptimisedAnimation)==null?void 0:E.call(window,g)));return Va(()=>{l&&(m.current=!0,window.MotionIsMounted=!0,l.updateFeatures(),l.scheduleRenderMicrotask(),_.current&&l.animationState&&l.animationState.animateChanges())}),U(()=>{l&&(!_.current&&l.animationState&&l.animationState.animateChanges(),_.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)==null||x.call(window,g)}),_.current=!1),l.enteringChildren=void 0)}),l}function Am(t,e,n,r){const{layoutId:i,layout:o,drag:s,dragConstraints:a,layoutScroll:c,layoutRoot:h,layoutCrossfade:l}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:pl(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!s||a&&Je(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,crossfade:l,layoutScroll:c,layoutRoot:h})}function pl(t){if(t)return t.options.allowProjection!==!1?t.projection:pl(t.parent)}function Ao(t,{forwardMotionProps:e=!1}={},n,r){n&&nm(n);const i=Eo(t)?Em:Cm;function o(a,c){let h;const l={...ut(wo),...a,layoutId:Pm(a)},{isStatic:f}=l,m=am(a),g=i(a,f);if(!f&&Mi){Im();const _=Mm(l);h=_.MeasureLayout,m.visualElement=Tm(t,g,l,r,_.ProjectionNode)}return v(xr.Provider,{value:m,children:[h&&m.visualElement?v(h,{visualElement:m.visualElement,...l}):null,_m(t,a,km(g,m.visualElement,c),g,f,e)]})}o.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const s=he(o);return s[Sm]=t,s}function Pm({layoutId:t}){const e=ut(Pi).id;return e&&t!==void 0?e+"-"+t:t}function Im(t,e){ut(Qc).strict}function Mm(t){const{drag:e,layout:n}=Ze;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 Rm(t,e){if(typeof Proxy>"u")return Ao;const n=new Map,r=(o,s)=>Ao(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,Ao(s,void 0,t,e)),n.get(s))})}function ml({top:t,left:e,right:n,bottom:r}){return{x:{min:e,max:n},y:{min:t,max:r}}}function Nm({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Dm(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 Po(t){return t===void 0||t===1}function Io({scale:t,scaleX:e,scaleY:n}){return!Po(t)||!Po(e)||!Po(n)}function Te(t){return Io(t)||gl(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function gl(t){return yl(t.x)||yl(t.y)}function yl(t){return t&&t!=="0%"}function Sr(t,e,n){const r=t-n,i=e*r;return n+i}function wl(t,e,n,r,i){return i!==void 0&&(t=Sr(t,i,r)),Sr(t,n,r)+e}function Mo(t,e=0,n=1,r,i){t.min=wl(t.min,e,n,r,i),t.max=wl(t.max,e,n,r,i)}function vl(t,{x:e,y:n}){Mo(t.x,e.translate,e.scale,e.originPoint),Mo(t.y,n.translate,n.scale,n.originPoint)}const _l=.999999999999,xl=1.0000000000001;function Lm(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:c}=o.options;c&&c.props.style&&c.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,vl(t,s)),r&&Te(o.latestValues)&&tn(t,o.latestValues))}e.x<xl&&e.x>_l&&(e.x=1),e.y<xl&&e.y>_l&&(e.y=1)}function Qe(t,e){t.min=t.min+e,t.max=t.max+e}function bl(t,e,n,r,i=.5){const o=it(t.min,t.max,i);Mo(t,e,n,o,r)}function tn(t,e){bl(t.x,e.x,e.scaleX,e.scale,e.originX),bl(t.y,e.y,e.scaleY,e.scale,e.originY)}function Cl(t,e){return ml(Dm(t.getBoundingClientRect(),e))}function Bm(t,e,n){const r=Cl(t,n),{scroll:i}=e;return i&&(Qe(r.x,i.offset.x),Qe(r.y,i.offset.y)),r}const El=()=>({translate:0,scale:1,origin:0,originPoint:0}),en=()=>({x:El(),y:El()}),Sl=()=>({min:0,max:0}),dt=()=>({x:Sl(),y:Sl()}),Ro={current:null},kl={current:!1};function Om(){if(kl.current=!0,!!Mi)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ro.current=t.matches;t.addEventListener("change",e),e()}else Ro.current=!1}const Fm=new WeakMap;function Vm(t,e,n){for(const r in e){const i=e[r],o=n[r];if(Et(i))t.addValue(r,i);else if(Et(o))t.addValue(r,Xe(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,Xe(s!==void 0?s:i,{owner:t}))}}for(const r in n)e[r]===void 0&&t.removeValue(r);return e}const Tl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Um{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=lo,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=Pt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,tt.render(this.render,!1,!0))};const{latestValues:c,renderState:h}=s;this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=h,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=Cr(n),this.isVariantNode=nl(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:l,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&Et(g)&&g.set(c[m])}}mount(e){var n;this.current=e,Fm.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)),kl.current||Om(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ro.current,(n=this.parent)==null||n.addChild(this),this.update(this.props,this.presenceContext)}unmount(){var e;this.projection&&this.projection.unmount(),fe(this.notifyUpdate),fe(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=Ge.has(e);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",s=>{this.latestValues[e]=s,this.props.onUpdate&&tt.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 Ze){const n=Ze[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):dt()}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<Tl.length;r++){const i=Tl[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=Vm(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=Xe(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"&&(Ua(r)||za(r))?r=parseFloat(r):!Zp(r)&&me.test(n)&&(r=Uc(e,n)),this.setBaseTarget(e,Et(r)?r.get():r)),Et(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=So(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&&!Et(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 Li),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){mo.render(this.render)}}class Al extends Um{constructor(){super(...arguments),this.KeyframeResolver=Vp}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;Et(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Pl(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 $m(t){return window.getComputedStyle(t)}class zm extends Al{constructor(){super(...arguments),this.type="html",this.renderInstance=Pl}readValueFromInstance(e,n){var r;if(Ge.has(n))return(r=this.projection)!=null&&r.isProjecting?io(n):op(e,n);{const i=$m(e),o=(Vi(n)?i.getPropertyValue(n):i[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Cl(e,n)}build(e,n,r){bo(e,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,n,r){return ko(e,n,r)}}const Il=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 jm(t,e,n,r){Pl(t,e,void 0,r);for(const i in e.attrs)t.setAttribute(Il.has(i)?i:To(i),e.attrs[i])}class Wm extends Al{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=dt}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Ge.has(n)){const r=Vc(n);return r&&r.default||0}return n=Il.has(n)?n:To(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,r){return dl(e,n,r)}build(e,n,r){sl(e,n,this.isSVGTag,r.transformTemplate,r.style)}renderInstance(e,n,r,i){jm(e,n,r,i)}mount(e){this.isSVGTag=cl(e.tagName),super.mount(e)}}const Hm=(t,e)=>Eo(t)?new Wm(e):new zm(e,{allowProjection:t!==Z});function nn(t,e,n){const r=t.getProps();return So(r,e,n!==void 0?n:r.custom,t)}const No=t=>Array.isArray(t);function Km(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Xe(n))}function qm(t){return No(t)?t[t.length-1]||0:t}function Ym(t,e){const n=nn(t,e);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=qm(o[s]);Km(t,s,a)}}function Gm(t){return!!(Et(t)&&t.add)}function Do(t,e){const n=t.getValue("willChange");if(Gm(n))return n.add(e);if(!n&&ae.WillChange){const r=new ae.WillChange("auto");t.addValue("willChange",r),r.add(e)}}function Ml(t){return t.props[hl]}const Xm=t=>t!==null;function Zm(t,{repeat:e,repeatType:n="loop"},r){const i=t.filter(Xm),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const Jm={type:"spring",stiffness:500,damping:25,restSpeed:10},Qm=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),t0={type:"keyframes",duration:.8},e0={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},n0=(t,{keyframes:e})=>e.length>2?t0:Ge.has(t)?t.startsWith("scale")?Qm(e[1]):Jm:e0;function r0({when:t,delay:e,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:c,elapsed:h,...l}){return!!Object.keys(l).length}const Lo=(t,e,n,r={},i,o)=>s=>{const a=ho(r,t)||{},c=a.delay||r.delay||0;let{elapsed:h=0}=r;h=h-Gt(c);const l={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-h,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};r0(a)||Object.assign(l,n0(t,l)),l.duration&&(l.duration=Gt(l.duration)),l.repeatDelay&&(l.repeatDelay=Gt(l.repeatDelay)),l.from!==void 0&&(l.keyframes[0]=l.from);let f=!1;if((l.type===!1||l.duration===0&&!l.repeatDelay)&&(uo(l),l.delay===0&&(f=!0)),(ae.instantAnimations||ae.skipAnimations)&&(f=!0,uo(l),l.delay=0),l.allowFlatten=!a.type&&!a.ease,f&&!o&&e.get()!==void 0){const m=Zm(l.keyframes,a);if(m!==void 0){tt.update(()=>{l.onUpdate(m),l.onComplete()});return}}return a.isSync?new eo(l):new Ap(l)};function i0({protectedKeys:t,needsAnimating:e},n){const r=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,r}function Rl(t,e,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:s,...a}=e;r&&(o=r);const c=[],h=i&&t.animationState&&t.animationState.getState()[i];for(const l in a){const f=t.getValue(l,t.latestValues[l]??null),m=a[l];if(m===void 0||h&&i0(h,l))continue;const g={delay:n,...ho(o||{},l)},_=f.get();if(_!==void 0&&!f.isAnimating&&!Array.isArray(m)&&m===_&&!g.velocity)continue;let w=!1;if(window.MotionHandoffAnimation){const x=Ml(t);if(x){const C=window.MotionHandoffAnimation(x,l,tt);C!==null&&(g.startTime=C,w=!0)}}Do(t,l),f.start(Lo(l,f,m,t.shouldReduceMotion&&Dc.has(l)?{type:!1}:g,t,w));const E=f.animation;E&&c.push(E)}return s&&Promise.all(c).then(()=>{tt.update(()=>{s&&Ym(t,s)})}),c}function Nl(t,e,n,r=0,i=1){const o=Array.from(t).sort((h,l)=>h.sortNodePosition(l)).indexOf(e),s=t.size,a=(s-1)*r;return typeof n=="function"?n(o,s):i===1?o*r:a-o*r}function Bo(t,e,n={}){var c;const r=nn(t,e,n.type==="exit"?(c=t.presenceContext)==null?void 0:c.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const o=r?()=>Promise.all(Rl(t,r,n)):()=>Promise.resolve(),s=t.variantChildren&&t.variantChildren.size?(h=0)=>{const{delayChildren:l=0,staggerChildren:f,staggerDirection:m}=i;return o0(t,e,h,l,f,m,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[h,l]=a==="beforeChildren"?[o,s]:[s,o];return h().then(()=>l())}else return Promise.all([o(),s(n.delay)])}function o0(t,e,n=0,r=0,i=0,o=1,s){const a=[];for(const c of t.variantChildren)c.notify("AnimationStart",e),a.push(Bo(c,e,{...s,delay:n+(typeof r=="function"?0:r)+Nl(t.variantChildren,c,r,i,o)}).then(()=>c.notify("AnimationComplete",e)));return Promise.all(a)}function s0(t,e,n={}){t.notify("AnimationStart",e);let r;if(Array.isArray(e)){const i=e.map(o=>Bo(t,o,n));r=Promise.all(i)}else if(typeof e=="string")r=Bo(t,e,n);else{const i=typeof e=="function"?nn(t,e,n.custom):e;r=Promise.all(Rl(t,i,n))}return r.then(()=>{t.notify("AnimationComplete",e)})}function Dl(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 a0=xo.length;function Ll(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ll(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<a0;n++){const r=xo[n],i=t.props[r];(Ln(i)||i===!1)&&(e[r]=i)}return e}const c0=[..._o].reverse(),l0=_o.length;function u0(t){return e=>Promise.all(e.map(({animation:n,options:r})=>s0(t,n,r)))}function d0(t){let e=u0(t),n=Bl(),r=!0;const i=c=>(h,l)=>{var m;const f=nn(t,l,c==="exit"?(m=t.presenceContext)==null?void 0:m.custom:void 0);if(f){const{transition:g,transitionEnd:_,...w}=f;h={...h,...w,..._}}return h};function o(c){e=c(t)}function s(c){const{props:h}=t,l=Ll(t.parent)||{},f=[],m=new Set;let g={},_=1/0;for(let E=0;E<l0;E++){const x=c0[E],C=n[x],k=h[x]!==void 0?h[x]:l[x],M=Ln(k),T=x===c?C.isActive:null;T===!1&&(_=E);let I=k===l[x]&&k!==h[x]&&M;if(I&&r&&t.manuallyAnimateOnMount&&(I=!1),C.protectedKeys={...g},!C.isActive&&T===null||!k&&!C.prevProp||br(k)||typeof k=="boolean")continue;const N=h0(C.prevProp,k);let A=N||x===c&&C.isActive&&!I&&M||E>_&&M,R=!1;const D=Array.isArray(k)?k:[k];let O=D.reduce(i(x),{});T===!1&&(O={});const{prevResolvedValues:et={}}=C,ht={...et,...O},Lt=K=>{A=!0,m.has(K)&&(R=!0,m.delete(K)),C.needsAnimating[K]=!0;const wt=t.getValue(K);wt&&(wt.liveStyle=!1)};for(const K in ht){const wt=O[K],Bt=et[K];if(g.hasOwnProperty(K))continue;let jt=!1;No(wt)&&No(Bt)?jt=!Dl(wt,Bt):jt=wt!==Bt,jt?wt!=null?Lt(K):m.add(K):wt!==void 0&&m.has(K)?Lt(K):C.protectedKeys[K]=!0}C.prevProp=k,C.prevResolvedValues=O,C.isActive&&(g={...g,...O}),r&&t.blockInitialAnimation&&(A=!1);const Y=I&&N;A&&(!Y||R)&&f.push(...D.map(K=>{const wt={type:x};if(typeof K=="string"&&r&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:Bt}=t,jt=nn(Bt,K);if(Bt.enteringChildren&&jt){const{delayChildren:H}=jt.transition||{};wt.delay=Nl(Bt.enteringChildren,t,H)}}return{animation:K,options:wt}}))}if(m.size){const E={};if(typeof h.initial!="boolean"){const x=nn(t,Array.isArray(h.initial)?h.initial[0]:h.initial);x&&x.transition&&(E.transition=x.transition)}m.forEach(x=>{const C=t.getBaseTarget(x),k=t.getValue(x);k&&(k.liveStyle=!0),E[x]=C??null}),f.push({animation:E})}let w=!!f.length;return r&&(h.initial===!1||h.initial===h.animate)&&!t.manuallyAnimateOnMount&&(w=!1),r=!1,w?e(f):Promise.resolve()}function a(c,h){var f;if(n[c].isActive===h)return Promise.resolve();(f=t.variantChildren)==null||f.forEach(m=>{var g;return(g=m.animationState)==null?void 0:g.setActive(c,h)}),n[c].isActive=h;const l=s(c);for(const m in n)n[m].protectedKeys={};return l}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=Bl(),r=!0}}}function h0(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Dl(e,t):!1}function Ae(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Bl(){return{animate:Ae(!0),whileInView:Ae(),whileHover:Ae(),whileTap:Ae(),whileDrag:Ae(),whileFocus:Ae(),exit:Ae()}}class ge{constructor(e){this.isMounted=!1,this.node=e}update(){}}class f0 extends ge{constructor(e){super(e),e.animationState||(e.animationState=d0(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();br(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 p0=0;class m0 extends ge{constructor(){super(...arguments),this.id=p0++}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 g0={animation:{Feature:f0},exit:{Feature:m0}};function On(t,e,n,r={passive:!0}){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n)}function Fn(t){return{point:{x:t.pageX,y:t.pageY}}}const y0=t=>e=>go(e)&&t(e,Fn(e));function Vn(t,e,n,r){return On(t,e,y0(n),r)}const Ol=1e-4,w0=1-Ol,v0=1+Ol,Fl=.01,_0=0-Fl,x0=0+Fl;function Tt(t){return t.max-t.min}function b0(t,e,n){return Math.abs(t-e)<=n}function Vl(t,e,n,r=.5){t.origin=r,t.originPoint=it(e.min,e.max,t.origin),t.scale=Tt(n)/Tt(e),t.translate=it(n.min,n.max,t.origin)-t.originPoint,(t.scale>=w0&&t.scale<=v0||isNaN(t.scale))&&(t.scale=1),(t.translate>=_0&&t.translate<=x0||isNaN(t.translate))&&(t.translate=0)}function Un(t,e,n,r){Vl(t.x,e.x,n.x,r?r.originX:void 0),Vl(t.y,e.y,n.y,r?r.originY:void 0)}function Ul(t,e,n){t.min=n.min+e.min,t.max=t.min+Tt(e)}function C0(t,e,n){Ul(t.x,e.x,n.x),Ul(t.y,e.y,n.y)}function $l(t,e,n){t.min=e.min-n.min,t.max=t.min+Tt(e)}function $n(t,e,n){$l(t.x,e.x,n.x),$l(t.y,e.y,n.y)}function Vt(t){return[t("x"),t("y")]}const zl=({current:t})=>t?t.ownerDocument.defaultView:null,jl=(t,e)=>Math.abs(t-e);function E0(t,e){const n=jl(t.x,e.x),r=jl(t.y,e.y);return Math.sqrt(n**2+r**2)}class Wl{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=Fo(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,_=E0(m.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!_)return;const{point:w}=m,{timestamp:E}=Ct;this.history.push({...w,timestamp:E});const{onStart:x,onMove:C}=this.handlers;g||(x&&x(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),C&&C(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=Oo(g,this.transformPagePoint),tt.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:_,onSessionEnd:w,resumeAnimation:E}=this.handlers;if(this.dragSnapToOrigin&&E&&E(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Fo(m.type==="pointercancel"?this.lastMoveEventInfo:Oo(g,this.transformPagePoint),this.history);this.startEvent&&_&&_(m,x),w&&w(m,x)},!go(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.distanceThreshold=s,this.contextWindow=i||window;const a=Fn(e),c=Oo(a,this.transformPagePoint),{point:h}=c,{timestamp:l}=Ct;this.history=[{...h,timestamp:l}];const{onSessionStart:f}=n;f&&f(e,Fo(c,this.history)),this.removeListeners=kn(Vn(this.contextWindow,"pointermove",this.handlePointerMove),Vn(this.contextWindow,"pointerup",this.handlePointerUp),Vn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),fe(this.updatePoint)}}function Oo(t,e){return e?{point:e(t.point)}:t}function Hl(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Fo({point:t},e){return{point:t,delta:Hl(t,Kl(e)),offset:Hl(t,S0(e)),velocity:k0(e,.1)}}function S0(t){return t[0]}function Kl(t){return t[t.length-1]}function k0(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,r=null;const i=Kl(t);for(;n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Gt(e)));)n--;if(!r)return{x:0,y:0};const o=Xt(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 T0(t,{min:e,max:n},r){return e!==void 0&&t<e?t=r?it(e,t,r.min):Math.max(t,e):n!==void 0&&t>n&&(t=r?it(n,t,r.max):Math.min(t,n)),t}function ql(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 A0(t,{top:e,left:n,bottom:r,right:i}){return{x:ql(t.x,n,i),y:ql(t.y,e,r)}}function Yl(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 P0(t,e){return{x:Yl(t.x,e.x),y:Yl(t.y,e.y)}}function I0(t,e){let n=.5;const r=Tt(t),i=Tt(e);return i>r?n=Tn(e.min,e.max-r,t.min):r>i&&(n=Tn(t.min,t.max-i,e.min)),se(0,1,n)}function M0(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 Vo=.35;function R0(t=Vo){return t===!1?t=0:t===!0&&(t=Vo),{x:Gl(t,"left","right"),y:Gl(t,"top","bottom")}}function Gl(t,e,n){return{min:Xl(t,e),max:Xl(t,n)}}function Xl(t,e){return typeof t=="number"?t:t[e]||0}const N0=new WeakMap;class D0{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=dt(),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=f=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fn(f).point)},s=(f,m)=>{const{drag:g,dragPropagation:_,onDragStart:w}=this.getProps();if(g&&!_&&(this.openDragLock&&this.openDragLock(),this.openDragLock=jp(g),!this.openDragLock))return;this.latestPointerEvent=f,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),Vt(x=>{let C=this.getAxisMotionValue(x).get()||0;if(Zt.test(C)){const{projection:k}=this.visualElement;if(k&&k.layout){const M=k.layout.layoutBox[x];M&&(C=Tt(M)*(parseFloat(C)/100))}}this.originPoint[x]=C}),w&&tt.postRender(()=>w(f,m)),Do(this.visualElement,"transform");const{animationState:E}=this.visualElement;E&&E.setActive("whileDrag",!0)},a=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m;const{dragPropagation:g,dragDirectionLock:_,onDirectionLock:w,onDrag:E}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:x}=m;if(_&&this.currentDirection===null){this.currentDirection=L0(x),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",m.point,x),this.updateAxis("y",m.point,x),this.visualElement.render(),E&&E(f,m)},c=(f,m)=>{this.latestPointerEvent=f,this.latestPanInfo=m,this.stop(f,m),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>Vt(f=>{var m;return this.getAnimationState(f)==="paused"&&((m=this.getAxisMotionValue(f).animation)==null?void 0:m.play())}),{dragSnapToOrigin:l}=this.getProps();this.panSession=new Wl(e,{onSessionStart:o,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:r,contextWindow:zl(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&&tt.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||!kr(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let s=this.originPoint[e]+r[e];this.constraints&&this.constraints[e]&&(s=T0(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&&Je(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&r?this.constraints=A0(r.layoutBox,e):this.constraints=!1,this.elastic=R0(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Vt(s=>{this.constraints!==!1&&this.getAxisMotionValue(s)&&(this.constraints[s]=M0(r.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!Je(e))return!1;const r=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=Bm(r,i.root,this.visualElement.getTransformPagePoint());let s=P0(i.layout.layoutBox,o);if(n){const a=n(Nm(s));this.hasMutatedConstraints=!!a,a&&(s=ml(a))}return s}startAnimation(e){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},h=Vt(l=>{if(!kr(l,n,this.currentDirection))return;let f=c&&c[l]||{};s&&(f={min:0,max:0});const m=i?200:1e6,g=i?40:1e7,_={type:"inertia",velocity:r?e[l]:0,bounceStiffness:m,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...o,...f};return this.startAxisValueAnimation(l,_)});return Promise.all(h).then(a)}startAxisValueAnimation(e,n){const r=this.getAxisMotionValue(e);return Do(this.visualElement,e),r.start(Lo(e,r,0,n,this.visualElement,!1))}stopAnimation(){Vt(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Vt(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){Vt(n=>{const{drag:r}=this.getProps();if(!kr(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]-it(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Je(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Vt(s=>{const a=this.getAxisMotionValue(s);if(a&&this.constraints!==!1){const c=a.get();i[s]=I0({min:c,max:c},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(),Vt(s=>{if(!kr(s,e,null))return;const a=this.getAxisMotionValue(s),{min:c,max:h}=this.constraints[s];a.set(it(c,h,i[s]))})}addListeners(){if(!this.visualElement.current)return;N0.set(this.visualElement,this);const e=this.visualElement.current,n=Vn(e,"pointerdown",c=>{const{drag:h,dragListener:l=!0}=this.getProps();h&&l&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Je(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),tt.read(r);const s=On(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h})=>{this.isDragging&&h&&(Vt(l=>{const f=this.getAxisMotionValue(l);f&&(this.originPoint[l]+=c[l].translate,f.set(f.get()+c[l].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=Vo,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function kr(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function L0(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class B0 extends ge{constructor(e){super(e),this.removeGroupControls=Ft,this.removeListeners=Ft,this.controls=new D0(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ft}unmount(){this.removeGroupControls(),this.removeListeners()}}const Zl=t=>(e,n)=>{t&&tt.postRender(()=>t(e,n))};class O0 extends ge{constructor(){super(...arguments),this.removePointerDownListener=Ft}onPointerDown(e){this.session=new Wl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:zl(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Zl(e),onStart:Zl(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&tt.postRender(()=>i(o,s))}}}mount(){this.removePointerDownListener=Vn(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 Tr={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Jl(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zn={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(V.test(t))t=parseFloat(t);else return t;const n=Jl(t,e.target.x),r=Jl(t,e.target.y);return`${n}% ${r}%`}},F0={correct:(t,{treeScale:e,projectionDelta:n})=>{const r=t,i=me.parse(t);if(i.length>5)return r;const o=me.createTransformer(t),s=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,c=n.y.scale*e.y;i[0+s]/=a,i[1+s]/=c;const h=it(a,c,.5);return typeof i[2+s]=="number"&&(i[2+s]/=h),typeof i[3+s]=="number"&&(i[3+s]/=h),o(i)}};let Uo=!1;class V0 extends Mt{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=e;cm(U0),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),Uo&&o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Tr.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,{projection:s}=r;return s&&(s.isPresent=o,Uo=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?s.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?s.promote():s.relegate()||tt.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),mo.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=e;Uo=!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 Ql(t){const[e,n]=Zc(),r=ut(Pi);return v(V0,{...t,layoutGroup:r,switchLayoutGroup:ut(fl),isPresent:e,safeToRemove:n})}const U0={borderRadius:{...zn,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zn,borderTopRightRadius:zn,borderBottomLeftRadius:zn,borderBottomRightRadius:zn,boxShadow:F0};function $0(t,e,n){const r=Et(t)?t:Xe(t);return r.start(Lo("",r,e,n)),r.animation}const z0=(t,e)=>t.depth-e.depth;class j0{constructor(){this.children=[],this.isDirty=!1}add(e){Ri(this.children,e),this.isDirty=!0}remove(e){Ni(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(z0),this.isDirty=!1,this.children.forEach(e)}}function W0(t,e){const n=Pt.now(),r=({timestamp:i})=>{const o=i-n;o>=e&&(fe(r),t(o-e))};return tt.setup(r,!0),()=>fe(r)}const tu=["TopLeft","TopRight","BottomLeft","BottomRight"],H0=tu.length,eu=t=>typeof t=="string"?parseFloat(t):t,nu=t=>typeof t=="number"||V.test(t);function K0(t,e,n,r,i,o){i?(t.opacity=it(0,n.opacity??1,q0(r)),t.opacityExit=it(e.opacity??1,0,Y0(r))):o&&(t.opacity=it(e.opacity??1,n.opacity??1,r));for(let s=0;s<H0;s++){const a=`border${tu[s]}Radius`;let c=ru(e,a),h=ru(n,a);if(c===void 0&&h===void 0)continue;c||(c=0),h||(h=0),c===0||h===0||nu(c)===nu(h)?(t[a]=Math.max(it(eu(c),eu(h),r),0),(Zt.test(h)||Zt.test(c))&&(t[a]+="%")):t[a]=h}(e.rotate||n.rotate)&&(t.rotate=it(e.rotate||0,n.rotate||0,r))}function ru(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const q0=iu(0,.5,Xa),Y0=iu(.5,.95,Ft);function iu(t,e,n){return r=>r<t?0:r>e?1:n(Tn(t,e,r))}function ou(t,e){t.min=e.min,t.max=e.max}function Ut(t,e){ou(t.x,e.x),ou(t.y,e.y)}function su(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function au(t,e,n,r,i){return t-=e,t=Sr(t,1/n,r),i!==void 0&&(t=Sr(t,1/i,r)),t}function G0(t,e=0,n=1,r=.5,i,o=t,s=t){if(Zt.test(e)&&(e=parseFloat(e),e=it(s.min,s.max,e/100)-s.min),typeof e!="number")return;let a=it(o.min,o.max,r);t===o&&(a-=e),t.min=au(t.min,e,n,a,i),t.max=au(t.max,e,n,a,i)}function cu(t,e,[n,r,i],o,s){G0(t,e[n],e[r],e[i],e.scale,o,s)}const X0=["x","scaleX","originX"],Z0=["y","scaleY","originY"];function lu(t,e,n,r){cu(t.x,e,X0,n?n.x:void 0,r?r.x:void 0),cu(t.y,e,Z0,n?n.y:void 0,r?r.y:void 0)}function uu(t){return t.translate===0&&t.scale===1}function du(t){return uu(t.x)&&uu(t.y)}function hu(t,e){return t.min===e.min&&t.max===e.max}function J0(t,e){return hu(t.x,e.x)&&hu(t.y,e.y)}function fu(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function pu(t,e){return fu(t.x,e.x)&&fu(t.y,e.y)}function mu(t){return Tt(t.x)/Tt(t.y)}function gu(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Q0{constructor(){this.members=[]}add(e){Ri(this.members,e),e.scheduleRender()}remove(e){if(Ni(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 tg(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:h,rotate:l,rotateX:f,rotateY:m,skewX:g,skewY:_}=n;h&&(r=`perspective(${h}px) ${r}`),l&&(r+=`rotate(${l}deg) `),f&&(r+=`rotateX(${f}deg) `),m&&(r+=`rotateY(${m}deg) `),g&&(r+=`skewX(${g}deg) `),_&&(r+=`skewY(${_}deg) `)}const a=t.x.scale*e.x,c=t.y.scale*e.y;return(a!==1||c!==1)&&(r+=`scale(${a}, ${c})`),r||"none"}const $o=["","X","Y","Z"],eg=1e3;let ng=0;function zo(t,e,n,r){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),r&&(r[t]=0))}function yu(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ml(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",tt,!(i||o))}const{parent:r}=t;r&&!r.hasCheckedOptimisedAppear&&yu(r)}function wu({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=e==null?void 0:e()){this.id=ng++,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(og),this.nodes.forEach(lg),this.nodes.forEach(ug),this.nodes.forEach(sg)},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 c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new j0)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Li),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const c=this.eventHandlers.get(s);c&&c.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s){if(this.instance)return;this.isSVG=Xc(s)&&!Gp(s),this.instance=s;const{layoutId:a,layout:c,visualElement:h}=this.options;if(h&&!h.current&&h.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(c||a)&&(this.isLayoutDirty=!0),t){let l,f=0;const m=()=>this.root.updateBlockedByResize=!1;tt.read(()=>{f=window.innerWidth}),t(s,()=>{const g=window.innerWidth;g!==f&&(f=g,this.root.updateBlockedByResize=!0,l&&l(),l=W0(m,250),Tr.hasAnimatedSinceResize&&(Tr.hasAnimatedSinceResize=!1,this.nodes.forEach(xu)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&h&&(a||c)&&this.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||mg,{onLayoutAnimationStart:w,onLayoutAnimationComplete:E}=h.getProps(),x=!this.targetLayout||!pu(this.targetLayout,g),C=!f&&m;if(this.options.layoutRoot||this.resumeFrom||C||f&&(x||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...ho(_,"layout"),onPlay:w,onComplete:E};(h.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(l,C)}else f||xu(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}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(),fe(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(dg),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&&yu(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let l=0;l<this.path.length;l++){const f=this.path[l];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:c}=this.options;if(a===void 0&&!c)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(vu);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(_u);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(cg),this.nodes.forEach(rg),this.nodes.forEach(ig)):this.nodes.forEach(_u),this.clearAllSnapshots();const a=Pt.now();Ct.delta=se(0,1e3/60,a-Ct.timestamp),Ct.timestamp=a,Ct.isProcessing=!0,Fi.update.process(Ct),Fi.preRender.process(Ct),Fi.render.process(Ct),Ct.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,mo.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ag),this.sharedNodes.forEach(hg)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,tt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){tt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Tt(this.snapshot.measuredBox.x)&&!Tt(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 c=0;c<this.path.length;c++)this.path[c].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=dt(),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 c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:s,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!du(this.projectionDelta),c=this.getTransformTemplate(),h=c?c(this.latestValues,""):void 0,l=h!==this.prevTransformTemplateValue;s&&this.instance&&(a||Te(this.latestValues)||l)&&(i(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let c=this.removeElementScroll(a);return s&&(c=this.removeTransform(c)),gg(c),{animationId:this.root.animationId,measuredBox:a,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:s}=this.options;if(!s)return dt();const a=s.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(yg))){const{scroll:l}=this.root;l&&(Qe(a.x,l.offset.x),Qe(a.y,l.offset.y))}return a}removeElementScroll(s){var c;const a=dt();if(Ut(a,s),(c=this.scroll)!=null&&c.wasRoot)return a;for(let h=0;h<this.path.length;h++){const l=this.path[h],{scroll:f,options:m}=l;l!==this.root&&f&&m.layoutScroll&&(f.wasRoot&&Ut(a,s),Qe(a.x,f.offset.x),Qe(a.y,f.offset.y))}return a}applyTransform(s,a=!1){const c=dt();Ut(c,s);for(let h=0;h<this.path.length;h++){const l=this.path[h];!a&&l.options.layoutScroll&&l.scroll&&l!==l.root&&tn(c,{x:-l.scroll.offset.x,y:-l.scroll.offset.y}),Te(l.latestValues)&&tn(c,l.latestValues)}return Te(this.latestValues)&&tn(c,this.latestValues),c}removeTransform(s){const a=dt();Ut(a,s);for(let c=0;c<this.path.length;c++){const h=this.path[c];if(!h.instance||!Te(h.latestValues))continue;Io(h.latestValues)&&h.updateSnapshot();const l=dt(),f=h.measurePageBox();Ut(l,f),lu(a,h.latestValues,h.snapshot?h.snapshot.layoutBox:void 0,l)}return Te(this.latestValues)&&lu(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!==Ct.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 c=!!this.resumingFrom||this!==a;if(!(s||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(m=this.parent)!=null&&m.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:l,layoutId:f}=this.options;if(!(!this.layout||!(l||f))){if(this.resolvedRelativeTargetAt=Ct.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=dt(),this.relativeTargetOrigin=dt(),$n(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),Ut(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=dt(),this.targetWithTransforms=dt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),C0(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Ut(this.target,this.layout.layoutBox),vl(this.target,this.targetDelta)):Ut(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=dt(),this.relativeTargetOrigin=dt(),$n(this.relativeTargetOrigin,this.target,g.target),Ut(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Io(this.parent.latestValues)||gl(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 _;const s=this.getLead(),a=!!this.resumingFrom||this!==s;let c=!0;if((this.isProjectionDirty||(_=this.parent)!=null&&_.isProjectionDirty)&&(c=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ct.timestamp&&(c=!1),c)return;const{layout:h,layoutId:l}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||l))return;Ut(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,m=this.treeScale.y;Lm(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=dt());const{target:g}=s;if(!g){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(su(this.prevProjectionDelta.x,this.projectionDelta.x),su(this.prevProjectionDelta.y,this.projectionDelta.y)),Un(this.projectionDelta,this.layoutCorrected,g,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==m||!gu(this.projectionDelta.x,this.prevProjectionDelta.x)||!gu(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){var a;if((a=this.options.visualElement)==null||a.scheduleRender(),s){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=en(),this.projectionDelta=en(),this.projectionDeltaWithTransform=en()}setAnimationOrigin(s,a=!1){const c=this.snapshot,h=c?c.latestValues:{},l={...this.latestValues},f=en();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const m=dt(),g=c?c.source:void 0,_=this.layout?this.layout.source:void 0,w=g!==_,E=this.getStack(),x=!E||E.members.length<=1,C=!!(w&&!x&&this.options.crossfade===!0&&!this.path.some(pg));this.animationProgress=0;let k;this.mixTargetDelta=M=>{const T=M/1e3;bu(f.x,s.x,T),bu(f.y,s.y,T),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($n(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fg(this.relativeTarget,this.relativeTargetOrigin,m,T),k&&J0(this.relativeTarget,k)&&(this.isProjectionDirty=!1),k||(k=dt()),Ut(k,this.relativeTarget)),w&&(this.animationValues=l,K0(l,h,this.latestValues,T,C,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=T},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){var a,c,h;this.notifyListeners("animationStart"),(a=this.currentAnimation)==null||a.stop(),(h=(c=this.resumingFrom)==null?void 0:c.currentAnimation)==null||h.stop(),this.pendingAnimation&&(fe(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=tt.update(()=>{Tr.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Xe(0)),this.currentAnimation=$0(this.motionValue,[0,1e3],{...s,velocity:0,isSync:!0,onUpdate:l=>{this.mixTargetDelta(l),s.onUpdate&&s.onUpdate(l)},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(eg),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:c,layout:h,latestValues:l}=s;if(!(!a||!c||!h)){if(this!==s&&this.layout&&h&&Tu(this.options.animationType,this.layout.layoutBox,h.layoutBox)){c=this.target||dt();const f=Tt(this.layout.layoutBox.x);c.x.min=s.target.x.min,c.x.max=c.x.min+f;const m=Tt(this.layout.layoutBox.y);c.y.min=s.target.y.min,c.y.max=c.y.min+m}Ut(a,c),tn(a,l),Un(this.projectionDeltaWithTransform,this.layoutCorrected,a,l)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new Q0),this.sharedNodes.get(s).add(a);const h=a.options.initialPromotionConfig;a.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.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:c}={}){const h=this.getStack();h&&h.promote(this,c),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:c}=s;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(a=!0),!a)return;const h={};c.z&&zo("z",s,h,this.animationValues);for(let l=0;l<$o.length;l++)zo(`rotate${$o[l]}`,s,h,this.animationValues),zo(`skew${$o[l]}`,s,h,this.animationValues);s.render();for(const l in h)s.setStaticValue(l,h[l]),this.animationValues&&(this.animationValues[l]=h[l]);s.scheduleRender()}applyProjectionStyles(s,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){s.visibility="hidden";return}const c=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,s.visibility="",s.opacity="",s.pointerEvents=Er(a==null?void 0:a.pointerEvents)||"",s.transform=c?c(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(s.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,s.pointerEvents=Er(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Te(this.latestValues)&&(s.transform=c?c({},""):"none",this.hasProjected=!1);return}s.visibility="";const l=h.animationValues||h.latestValues;this.applyTransformsToTarget();let f=tg(this.projectionDeltaWithTransform,this.treeScale,l);c&&(f=c(l,f)),s.transform=f;const{x:m,y:g}=this.projectionDelta;s.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,h.animationValues?s.opacity=h===this?l.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:l.opacityExit:s.opacity=h===this?l.opacity!==void 0?l.opacity:"":l.opacityExit!==void 0?l.opacityExit:0;for(const _ in Bn){if(l[_]===void 0)continue;const{correct:w,applyTo:E,isCSSVariable:x}=Bn[_],C=f==="none"?l[_]:w(l[_],h);if(E){const k=E.length;for(let M=0;M<k;M++)s[E[M]]=C}else x?this.options.visualElement.renderState.vars[_]=C:s[_]=C}this.options.layoutId&&(s.pointerEvents=h===this?Er(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(vu),this.root.sharedNodes.clear()}}}function rg(t){t.updateLayout()}function ig(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"?Vt(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Tt(m);m.min=r[f].min,m.max=m.min+g}):Tu(o,e.layoutBox,r)&&Vt(f=>{const m=s?e.measuredBox[f]:e.layoutBox[f],g=Tt(r[f]);m.max=m.min+g,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[f].max=t.relativeTarget[f].min+g)});const a=en();Un(a,r,e.layoutBox);const c=en();s?Un(c,t.applyTransform(i,!0),e.measuredBox):Un(c,r,e.layoutBox);const h=!du(a);let l=!1;if(!t.resumeFrom){const f=t.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:m,layout:g}=f;if(m&&g){const _=dt();$n(_,e.layoutBox,m.layoutBox);const w=dt();$n(w,r,g.layoutBox),pu(_,w)||(l=!0),f.options.layoutRoot&&(t.relativeTarget=w,t.relativeTargetOrigin=_,t.relativeParent=f)}}}t.notifyListeners("didUpdate",{layout:r,snapshot:e,delta:c,layoutDelta:a,hasLayoutChanged:h,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:r}=t.options;r&&r()}t.options.transition=void 0}function og(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 sg(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ag(t){t.clearSnapshot()}function vu(t){t.clearMeasurements()}function _u(t){t.isLayoutDirty=!1}function cg(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function xu(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function lg(t){t.resolveTargetDelta()}function ug(t){t.calcProjection()}function dg(t){t.resetSkewAndRotation()}function hg(t){t.removeLeadSnapshot()}function bu(t,e,n){t.translate=it(e.translate,0,n),t.scale=it(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Cu(t,e,n,r){t.min=it(e.min,n.min,r),t.max=it(e.max,n.max,r)}function fg(t,e,n,r){Cu(t.x,e.x,n.x,r),Cu(t.y,e.y,n.y,r)}function pg(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const mg={duration:.45,ease:[.4,0,.1,1]},Eu=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Su=Eu("applewebkit/")&&!Eu("chrome/")?Math.round:Ft;function ku(t){t.min=Su(t.min),t.max=Su(t.max)}function gg(t){ku(t.x),ku(t.y)}function Tu(t,e,n){return t==="position"||t==="preserve-aspect"&&!b0(mu(e),mu(n),.2)}function yg(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const wg=wu({attachResizeListener:(t,e)=>On(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),jo={current:void 0},Au=wu({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!jo.current){const t=new wg({});t.mount(window),t.setOptions({layoutScroll:!0}),jo.current=t}return jo.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),vg={pan:{Feature:O0},drag:{Feature:B0,ProjectionNode:Au,MeasureLayout:Ql}};function Pu(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&&tt.postRender(()=>o(e,Fn(e)))}class _g extends ge{mount(){const{current:e}=this.node;e&&(this.unmount=Wp(e,(n,r)=>(Pu(this.node,r,"Start"),i=>Pu(this.node,i,"End"))))}unmount(){}}class xg extends ge{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=kn(On(this.node.current,"focus",()=>this.onFocus()),On(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Iu(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&&tt.postRender(()=>o(e,Fn(e)))}class bg extends ge{mount(){const{current:e}=this.node;e&&(this.unmount=Yp(e,(n,r)=>(Iu(this.node,r,"Start"),(i,{success:o})=>Iu(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Wo=new WeakMap,Ho=new WeakMap,Cg=t=>{const e=Wo.get(t.target);e&&e(t)},Eg=t=>{t.forEach(Cg)};function Sg({root:t,...e}){const n=t||document;Ho.has(n)||Ho.set(n,{});const r=Ho.get(n),i=JSON.stringify(e);return r[i]||(r[i]=new IntersectionObserver(Eg,{root:t,...e})),r[i]}function kg(t,e,n){const r=Sg(e);return Wo.set(t,n),r.observe(t),()=>{Wo.delete(t),r.unobserve(t)}}const Tg={some:0,all:1};class Ag extends ge{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:Tg[i]},a=c=>{const{isIntersecting:h}=c;if(this.isInView===h||(this.isInView=h,o&&!h&&this.hasEnteredView))return;h&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",h);const{onViewportEnter:l,onViewportLeave:f}=this.node.getProps(),m=h?l:f;m&&m(c)};return kg(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(Pg(e,n))&&this.startObserver()}unmount(){}}function Pg({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const Ig={...g0,...{inView:{Feature:Ag},tap:{Feature:bg},focus:{Feature:xg},hover:{Feature:_g}},...vg,...{layout:{ProjectionNode:Au,MeasureLayout:Ql}}},ce=Rm(Ig,Hm);/**
|
|
10
10
|
* @license lucide-react v0.435.0 - ISC
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the ISC license.
|
|
13
13
|
* See the LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/const
|
|
14
|
+
*/const Mg=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Mu=(...t)=>t.filter((e,n,r)=>!!e&&r.indexOf(e)===n).join(" ");/**
|
|
15
15
|
* @license lucide-react v0.435.0 - ISC
|
|
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 Rg={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 Ng=he(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:s,...a},c)=>B("svg",{ref:c,...Rg,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:Mu("lucide",i),...a},[...s.map(([h,l])=>B(h,l)),...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 Jt=(t,e)=>{const n=he(({className:r,...i},o)=>B(
|
|
29
|
+
*/const Jt=(t,e)=>{const n=he(({className:r,...i},o)=>B(Ng,{ref:o,iconNode:e,className:Mu(`lucide-${Mg(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 Dg=Jt("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 Lg=Jt("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
|
|
40
40
|
* @license lucide-react v0.435.0 - ISC
|
|
41
41
|
*
|
|
42
42
|
* This source code is licensed under the ISC license.
|
|
43
43
|
* See the LICENSE file in the root directory of this source tree.
|
|
44
|
-
*/const
|
|
44
|
+
*/const Bg=Jt("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
45
45
|
* @license lucide-react v0.435.0 - ISC
|
|
46
46
|
*
|
|
47
47
|
* This source code is licensed under the ISC license.
|
|
48
48
|
* See the LICENSE file in the root directory of this source tree.
|
|
49
|
-
*/const
|
|
49
|
+
*/const Og=Jt("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
|
|
50
50
|
* @license lucide-react v0.435.0 - ISC
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the ISC license.
|
|
53
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const
|
|
54
|
+
*/const Fg=Jt("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
|
|
55
55
|
* @license lucide-react v0.435.0 - ISC
|
|
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 Vg=Jt("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 Ug=Jt("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.
|
|
68
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const
|
|
69
|
+
*/const Ru=Jt("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
70
70
|
* @license lucide-react v0.435.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/const
|
|
74
|
+
*/const $g=Jt("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
|
|
75
75
|
* @license lucide-react v0.435.0 - ISC
|
|
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
|
|
79
|
+
*/const zg=Jt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),jg=({onClick:t,isOpen:e,unreadCount:n=0})=>{const[r,i]=j(!1);U(()=>{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 v("div",{className:"fixed",style:{zIndex:9998,bottom:30,right:30},children:[r&&o&&v(ce.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"}}),v(ce.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:[v(vo,{mode:"wait",initial:!1,children:v(ce.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?v(zg,{size:24,color:"#FFFFFF"}):v(Og,{size:22,fill:"#FFFFFF",color:"#FFFFFF"})},e?"close":"open")}),v(vo,{children:o&&v(ce.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:v("span",{style:{color:"#FFFFFF",fontSize:12,fontWeight:600,lineHeight:1},children:n>99?"99+":n})})})]})]})};/*! js-cookie v3.0.5 | MIT */function Ar(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 Wg={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 Ko(t,e){function n(i,o,s){if(!(typeof document>"u")){s=Ar({},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 c in s)s[c]&&(a+="; "+c,s[c]!==!0&&(a+="="+s[c].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 c=o[a].split("="),h=c.slice(1).join("=");try{var l=decodeURIComponent(c[0]);if(s[l]=t.read(h,l),i===l)break}catch{}}return i?s[i]:s}}return Object.create({set:n,get:r,remove:function(i,o){n(i,"",Ar({},o,{expires:-1}))},withAttributes:function(i){return Ko(this.converter,Ar({},this.attributes,i))},withConverter:function(i){return Ko(Ar({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var Pe=Ko(Wg,{path:"/"});const Hg={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Nu=t=>{let e;const n=new Set,r=(l,f)=>{const m=typeof l=="function"?l(e):l;if(!Object.is(m,e)){const g=e;e=f??(typeof m!="object"||m===null)?m:Object.assign({},e,m),n.forEach(_=>_(e,g))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>h,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(Hg?"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()}},h=e=t(r,i,c);return c},Kg=t=>t?Nu(t):Nu;function qg(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Yg(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 Du={exports:{}},Lu={};const Bu=Yg(tf);var Ou={exports:{}},Fu={};/**
|
|
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 rn=Bu;function Gg(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Xg=typeof Object.is=="function"?Object.is:Gg,Zg=rn.useState,Jg=rn.useEffect,Qg=rn.useLayoutEffect,ty=rn.useDebugValue;function ey(t,e){var n=e(),r=Zg({inst:{value:n,getSnapshot:e}}),i=r[0].inst,o=r[1];return Qg(function(){i.value=n,i.getSnapshot=e,qo(i)&&o({inst:i})},[t,n,e]),Jg(function(){return qo(i)&&o({inst:i}),t(function(){qo(i)&&o({inst:i})})},[t]),ty(n),n}function qo(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Xg(t,n)}catch{return!0}}function ny(t,e){return e()}var ry=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ny:ey;Fu.useSyncExternalStore=rn.useSyncExternalStore!==void 0?rn.useSyncExternalStore:ry,Ou.exports=Fu;var iy=Ou.exports;/**
|
|
88
88
|
* @license React
|
|
89
89
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
90
90
|
*
|
|
@@ -92,27 +92,27 @@
|
|
|
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 Pr=Ru,ey=ty;function ny(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ry=typeof Object.is=="function"?Object.is:ny,iy=ey.useSyncExternalStore,oy=Pr.useRef,sy=Pr.useEffect,ay=Pr.useMemo,cy=Pr.useDebugValue;Mu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=oy(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=ay(function(){function c(g){if(!h){if(h=!0,l=g,g=r(g),i!==void 0&&s.hasValue){var v=s.value;if(i(v,g))return f=v}return f=g}if(v=f,ry(l,g))return v;var w=r(g);return i!==void 0&&i(v,w)?v:(l=g,f=w)}var h=!1,l,f,m=n===void 0?null:n;return[function(){return c(e())},m===null?void 0:function(){return c(m())}]},[e,n,r,i]);var a=iy(t,o[0],o[1]);return sy(function(){s.hasValue=!0,s.value=a},[a]),cy(a),a},Iu.exports=Mu;var ly=Iu.exports;const uy=jg(ly),Lu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:dy}=He,{useSyncExternalStoreWithSelector:hy}=uy;let Bu=!1;const fy=t=>t;function py(t,e=fy,n){(Lu?"production":void 0)!=="production"&&n&&!Bu&&(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"),Bu=!0);const r=hy(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return dy(r),r}const Ou=t=>{(Lu?"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"?zg(t):t,n=(r,i)=>py(e,r,i);return Object.assign(n,e),n},my=t=>t?Ou(t):Ou;var Fu=Symbol.for("immer-nothing"),Vu=Symbol.for("immer-draftable"),Nt=Symbol.for("immer-state");function Wt(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var rn=Object.getPrototypeOf;function on(t){return!!t&&!!t[Nt]}function Pe(t){var e;return t?Uu(t)||Array.isArray(t)||!!t[Vu]||!!((e=t.constructor)!=null&&e[Vu])||Rr(t)||Nr(t):!1}var gy=Object.prototype.constructor.toString();function Uu(t){if(!t||typeof t!="object")return!1;const e=rn(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)===gy}function Ir(t,e){Mr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Mr(t){const e=t[Nt];return e?e.type_:Array.isArray(t)?1:Rr(t)?2:Nr(t)?3:0}function qo(t,e){return Mr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function $u(t,e,n){const r=Mr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function yy(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Rr(t){return t instanceof Map}function Nr(t){return t instanceof Set}function Ie(t){return t.copy_||t.base_}function Yo(t,e){if(Rr(t))return new Map(t);if(Nr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Uu(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Nt];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(rn(t),r)}else{const r=rn(t);if(r!==null&&n)return{...t};const i=Object.create(r);return Object.assign(i,t)}}function Go(t,e=!1){return Dr(t)||on(t)||!Pe(t)||(Mr(t)>1&&(t.set=t.add=t.clear=t.delete=wy),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Go(r,!0))),t}function wy(){Wt(2)}function Dr(t){return Object.isFrozen(t)}var vy={};function Me(t){const e=vy[t];return e||Wt(0,t),e}var jn;function zu(){return jn}function _y(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ju(t,e){e&&(Me("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Xo(t){Zo(t),t.drafts_.forEach(xy),t.drafts_=null}function Zo(t){t===jn&&(jn=t.parent_)}function Hu(t){return jn=_y(jn,t)}function xy(t){const e=t[Nt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Wu(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Nt].modified_&&(Xo(e),Wt(4)),Pe(t)&&(t=Lr(e,t),e.parent_||Br(e,t)),e.patches_&&Me("Patches").generateReplacementPatches_(n[Nt].base_,t,e.patches_,e.inversePatches_)):t=Lr(e,n,[]),Xo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==Fu?t:void 0}function Lr(t,e,n){if(Dr(e))return e;const r=e[Nt];if(!r)return Ir(e,(i,o)=>Ku(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Br(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),Ir(o,(a,c)=>Ku(t,r,i,a,c,n,s)),Br(t,i,!1),n&&t.patches_&&Me("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Ku(t,e,n,r,i,o,s){if(on(i)){const a=o&&e&&e.type_!==3&&!qo(e.assigned_,r)?o.concat(r):void 0,c=Lr(t,i,a);if($u(n,r,c),on(c))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Pe(i)&&!Dr(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Lr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Br(t,i)}}function Br(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Go(e,n)}function by(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:zu(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Jo;n&&(i=[r],o=Hn);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Jo={get(t,e){if(e===Nt)return t;const n=Ie(t);if(!qo(n,e))return Cy(t,n,e);const r=n[e];return t.finalized_||!Pe(r)?r:r===Qo(t.base_,e)?(es(t),t.copy_[e]=ns(r,t)):r},has(t,e){return e in Ie(t)},ownKeys(t){return Reflect.ownKeys(Ie(t))},set(t,e,n){const r=qu(Ie(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=Qo(Ie(t),e),o=i==null?void 0:i[Nt];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(yy(n,i)&&(n!==void 0||qo(t.base_,e)))return!0;es(t),ts(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 Qo(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,es(t),ts(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Ie(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Wt(11)},getPrototypeOf(t){return rn(t.base_)},setPrototypeOf(){Wt(12)}},Hn={};Ir(Jo,(t,e)=>{Hn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Hn.deleteProperty=function(t,e){return Hn.set.call(this,t,e,void 0)},Hn.set=function(t,e,n){return Jo.set.call(this,t[0],e,n,t[0])};function Qo(t,e){const n=t[Nt];return(n?Ie(n):t)[e]}function Cy(t,e,n){var i;const r=qu(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function qu(t,e){if(!(e in t))return;let n=rn(t);for(;n;){const r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=rn(n)}}function ts(t){t.modified_||(t.modified_=!0,t.parent_&&ts(t.parent_))}function es(t){t.copy_||(t.copy_=Yo(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Ey=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(c=o,...h){return s.produce(c,l=>n.call(this,l,...h))}}typeof n!="function"&&Wt(6),r!==void 0&&typeof r!="function"&&Wt(7);let i;if(Pe(e)){const o=Hu(this),s=ns(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Xo(o):Zo(o)}return ju(o,r),Wu(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===Fu&&(i=void 0),this.autoFreeze_&&Go(i,!0),r){const o=[],s=[];Me("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else Wt(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,c=>e(c,...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){Pe(t)||Wt(8),on(t)&&(t=Sy(t));const e=Hu(this),n=ns(t,void 0);return n[Nt].isManual_=!0,Zo(e),n}finishDraft(t,e){const n=t&&t[Nt];(!n||!n.isManual_)&&Wt(9);const{scope_:r}=n;return ju(r,e),Wu(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=Me("Patches").applyPatches_;return on(t)?r(t,e):this.produce(t,i=>r(i,e))}};function ns(t,e){const n=Rr(t)?Me("MapSet").proxyMap_(t,e):Nr(t)?Me("MapSet").proxySet_(t,e):by(t,e);return(e?e.scope_:zu()).drafts_.push(n),n}function Sy(t){return on(t)||Wt(10,t),Yu(t)}function Yu(t){if(!Pe(t)||Dr(t))return t;const e=t[Nt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Yo(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Yo(t,!0);return Ir(n,(r,i)=>{$u(n,r,Yu(i))}),e&&(e.finalized_=!1),n}var Dt=new Ey,sn=Dt.produce;Dt.produceWithPatches.bind(Dt),Dt.setAutoFreeze.bind(Dt),Dt.setUseStrictShallowCopy.bind(Dt),Dt.applyPatches.bind(Dt),Dt.createDraft.bind(Dt),Dt.finishDraft.bind(Dt);const Or={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},rs=new Map,Fr=t=>{const e=rs.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},ky=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=rs.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return rs.set(n.name,i),{type:"tracked",store:t,...i}},Ty=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let h;try{h=(o??(Or?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!h)return(Or?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:l,...f}=ky(a,h,c);let m=!0;i.setState=(w,E,_)=>{const C=n(w,E);if(!m)return C;const k=_===void 0?{type:s||"anonymous"}:typeof _=="string"?{type:_}:_;return a===void 0?(l==null||l.send(k,r()),C):(l==null||l.send({...k,type:`${a}/${k.type}`},{...Fr(c.name),[a]:i.getState()}),C)};const g=(...w)=>{const E=m;m=!1,n(...w),m=E},v=t(i.setState,r,i);if(f.type==="untracked"?l==null||l.init(v):(f.stores[f.store]=i,l==null||l.init(Object.fromEntries(Object.entries(f.stores).map(([w,E])=>[w,w===f.store?v:E.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let w=!1;const E=i.dispatch;i.dispatch=(..._)=>{(Or?"production":void 0)!=="production"&&_[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),E(..._)}}return l.subscribe(w=>{var E;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return is(w.payload,_=>{if(_.type==="__setState"){if(a===void 0){g(_.state);return}Object.keys(_.state).length!==1&&console.error(`
|
|
95
|
+
*/var Pr=Bu,oy=iy;function sy(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ay=typeof Object.is=="function"?Object.is:sy,cy=oy.useSyncExternalStore,ly=Pr.useRef,uy=Pr.useEffect,dy=Pr.useMemo,hy=Pr.useDebugValue;Lu.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var o=ly(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=dy(function(){function c(g){if(!h){if(h=!0,l=g,g=r(g),i!==void 0&&s.hasValue){var _=s.value;if(i(_,g))return f=_}return f=g}if(_=f,ay(l,g))return _;var w=r(g);return i!==void 0&&i(_,w)?_:(l=g,f=w)}var h=!1,l,f,m=n===void 0?null:n;return[function(){return c(e())},m===null?void 0:function(){return c(m())}]},[e,n,r,i]);var a=cy(t,o[0],o[1]);return uy(function(){s.hasValue=!0,s.value=a},[a]),hy(a),a},Du.exports=Lu;var fy=Du.exports;const py=qg(fy),Vu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:my}=He,{useSyncExternalStoreWithSelector:gy}=py;let Uu=!1;const yy=t=>t;function wy(t,e=yy,n){(Vu?"production":void 0)!=="production"&&n&&!Uu&&(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"),Uu=!0);const r=gy(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return my(r),r}const $u=t=>{(Vu?"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"?Kg(t):t,n=(r,i)=>wy(e,r,i);return Object.assign(n,e),n},vy=t=>t?$u(t):$u;var zu=Symbol.for("immer-nothing"),ju=Symbol.for("immer-draftable"),Rt=Symbol.for("immer-state");function Ht(t,...e){throw new Error(`[Immer] minified error nr: ${t}. Full error at: https://bit.ly/3cXEKWf`)}var on=Object.getPrototypeOf;function sn(t){return!!t&&!!t[Rt]}function Ie(t){var e;return t?Wu(t)||Array.isArray(t)||!!t[ju]||!!((e=t.constructor)!=null&&e[ju])||Rr(t)||Nr(t):!1}var _y=Object.prototype.constructor.toString();function Wu(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)===_y}function Ir(t,e){Mr(t)===0?Reflect.ownKeys(t).forEach(n=>{e(n,t[n],t)}):t.forEach((n,r)=>e(r,n,t))}function Mr(t){const e=t[Rt];return e?e.type_:Array.isArray(t)?1:Rr(t)?2:Nr(t)?3:0}function Yo(t,e){return Mr(t)===2?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function Hu(t,e,n){const r=Mr(t);r===2?t.set(e,n):r===3?t.add(n):t[e]=n}function xy(t,e){return t===e?t!==0||1/t===1/e:t!==t&&e!==e}function Rr(t){return t instanceof Map}function Nr(t){return t instanceof Set}function Me(t){return t.copy_||t.base_}function Go(t,e){if(Rr(t))return new Map(t);if(Nr(t))return new Set(t);if(Array.isArray(t))return Array.prototype.slice.call(t);const n=Wu(t);if(e===!0||e==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(t);delete r[Rt];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 Xo(t,e=!1){return Dr(t)||sn(t)||!Ie(t)||(Mr(t)>1&&(t.set=t.add=t.clear=t.delete=by),Object.freeze(t),e&&Object.entries(t).forEach(([n,r])=>Xo(r,!0))),t}function by(){Ht(2)}function Dr(t){return Object.isFrozen(t)}var Cy={};function Re(t){const e=Cy[t];return e||Ht(0,t),e}var jn;function Ku(){return jn}function Ey(t,e){return{drafts_:[],parent_:t,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qu(t,e){e&&(Re("Patches"),t.patches_=[],t.inversePatches_=[],t.patchListener_=e)}function Zo(t){Jo(t),t.drafts_.forEach(Sy),t.drafts_=null}function Jo(t){t===jn&&(jn=t.parent_)}function Yu(t){return jn=Ey(jn,t)}function Sy(t){const e=t[Rt];e.type_===0||e.type_===1?e.revoke_():e.revoked_=!0}function Gu(t,e){e.unfinalizedDrafts_=e.drafts_.length;const n=e.drafts_[0];return t!==void 0&&t!==n?(n[Rt].modified_&&(Zo(e),Ht(4)),Ie(t)&&(t=Lr(e,t),e.parent_||Br(e,t)),e.patches_&&Re("Patches").generateReplacementPatches_(n[Rt].base_,t,e.patches_,e.inversePatches_)):t=Lr(e,n,[]),Zo(e),e.patches_&&e.patchListener_(e.patches_,e.inversePatches_),t!==zu?t:void 0}function Lr(t,e,n){if(Dr(e))return e;const r=e[Rt];if(!r)return Ir(e,(i,o)=>Xu(t,r,e,i,o,n)),e;if(r.scope_!==t)return e;if(!r.modified_)return Br(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),Ir(o,(a,c)=>Xu(t,r,i,a,c,n,s)),Br(t,i,!1),n&&t.patches_&&Re("Patches").generatePatches_(r,n,t.patches_,t.inversePatches_)}return r.copy_}function Xu(t,e,n,r,i,o,s){if(sn(i)){const a=o&&e&&e.type_!==3&&!Yo(e.assigned_,r)?o.concat(r):void 0,c=Lr(t,i,a);if(Hu(n,r,c),sn(c))t.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Ie(i)&&!Dr(i)){if(!t.immer_.autoFreeze_&&t.unfinalizedDrafts_<1)return;Lr(t,i),(!e||!e.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Br(t,i)}}function Br(t,e,n=!1){!t.parent_&&t.immer_.autoFreeze_&&t.canAutoFreeze_&&Xo(e,n)}function ky(t,e){const n=Array.isArray(t),r={type_:n?1:0,scope_:e?e.scope_:Ku(),modified_:!1,finalized_:!1,assigned_:{},parent_:e,base_:t,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Qo;n&&(i=[r],o=Wn);const{revoke:s,proxy:a}=Proxy.revocable(i,o);return r.draft_=a,r.revoke_=s,a}var Qo={get(t,e){if(e===Rt)return t;const n=Me(t);if(!Yo(n,e))return Ty(t,n,e);const r=n[e];return t.finalized_||!Ie(r)?r:r===ts(t.base_,e)?(ns(t),t.copy_[e]=rs(r,t)):r},has(t,e){return e in Me(t)},ownKeys(t){return Reflect.ownKeys(Me(t))},set(t,e,n){const r=Zu(Me(t),e);if(r!=null&&r.set)return r.set.call(t.draft_,n),!0;if(!t.modified_){const i=ts(Me(t),e),o=i==null?void 0:i[Rt];if(o&&o.base_===n)return t.copy_[e]=n,t.assigned_[e]=!1,!0;if(xy(n,i)&&(n!==void 0||Yo(t.base_,e)))return!0;ns(t),es(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 ts(t.base_,e)!==void 0||e in t.base_?(t.assigned_[e]=!1,ns(t),es(t)):delete t.assigned_[e],t.copy_&&delete t.copy_[e],!0},getOwnPropertyDescriptor(t,e){const n=Me(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r&&{writable:!0,configurable:t.type_!==1||e!=="length",enumerable:r.enumerable,value:n[e]}},defineProperty(){Ht(11)},getPrototypeOf(t){return on(t.base_)},setPrototypeOf(){Ht(12)}},Wn={};Ir(Qo,(t,e)=>{Wn[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}}),Wn.deleteProperty=function(t,e){return Wn.set.call(this,t,e,void 0)},Wn.set=function(t,e,n){return Qo.set.call(this,t[0],e,n,t[0])};function ts(t,e){const n=t[Rt];return(n?Me(n):t)[e]}function Ty(t,e,n){var i;const r=Zu(e,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(t.draft_):void 0}function Zu(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 es(t){t.modified_||(t.modified_=!0,t.parent_&&es(t.parent_))}function ns(t){t.copy_||(t.copy_=Go(t.base_,t.scope_.immer_.useStrictShallowCopy_))}var Ay=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(c=o,...h){return s.produce(c,l=>n.call(this,l,...h))}}typeof n!="function"&&Ht(6),r!==void 0&&typeof r!="function"&&Ht(7);let i;if(Ie(e)){const o=Yu(this),s=rs(e,void 0);let a=!0;try{i=n(s),a=!1}finally{a?Zo(o):Jo(o)}return qu(o,r),Gu(i,o)}else if(!e||typeof e!="object"){if(i=n(e),i===void 0&&(i=e),i===zu&&(i=void 0),this.autoFreeze_&&Xo(i,!0),r){const o=[],s=[];Re("Patches").generateReplacementPatches_(e,i,o,s),r(o,s)}return i}else Ht(1,e)},this.produceWithPatches=(e,n)=>{if(typeof e=="function")return(s,...a)=>this.produceWithPatches(s,c=>e(c,...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){Ie(t)||Ht(8),sn(t)&&(t=Py(t));const e=Yu(this),n=rs(t,void 0);return n[Rt].isManual_=!0,Jo(e),n}finishDraft(t,e){const n=t&&t[Rt];(!n||!n.isManual_)&&Ht(9);const{scope_:r}=n;return qu(r,e),Gu(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=Re("Patches").applyPatches_;return sn(t)?r(t,e):this.produce(t,i=>r(i,e))}};function rs(t,e){const n=Rr(t)?Re("MapSet").proxyMap_(t,e):Nr(t)?Re("MapSet").proxySet_(t,e):ky(t,e);return(e?e.scope_:Ku()).drafts_.push(n),n}function Py(t){return sn(t)||Ht(10,t),Ju(t)}function Ju(t){if(!Ie(t)||Dr(t))return t;const e=t[Rt];let n;if(e){if(!e.modified_)return e.base_;e.finalized_=!0,n=Go(t,e.scope_.immer_.useStrictShallowCopy_)}else n=Go(t,!0);return Ir(n,(r,i)=>{Hu(n,r,Ju(i))}),e&&(e.finalized_=!1),n}var Nt=new Ay,an=Nt.produce;Nt.produceWithPatches.bind(Nt),Nt.setAutoFreeze.bind(Nt),Nt.setUseStrictShallowCopy.bind(Nt),Nt.applyPatches.bind(Nt),Nt.createDraft.bind(Nt),Nt.finishDraft.bind(Nt);const Or={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},is=new Map,Fr=t=>{const e=is.get(t);return e?Object.fromEntries(Object.entries(e.stores).map(([n,r])=>[n,r.getState()])):{}},Iy=(t,e,n)=>{if(t===void 0)return{type:"untracked",connection:e.connect(n)};const r=is.get(n.name);if(r)return{type:"tracked",store:t,...r};const i={connection:e.connect(n),stores:{}};return is.set(n.name,i),{type:"tracked",store:t,...i}},My=(t,e={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...c}=e;let h;try{h=(o??(Or?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!h)return(Or?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),t(n,r,i);const{connection:l,...f}=Iy(a,h,c);let m=!0;i.setState=(w,E,x)=>{const C=n(w,E);if(!m)return C;const k=x===void 0?{type:s||"anonymous"}:typeof x=="string"?{type:x}:x;return a===void 0?(l==null||l.send(k,r()),C):(l==null||l.send({...k,type:`${a}/${k.type}`},{...Fr(c.name),[a]:i.getState()}),C)};const g=(...w)=>{const E=m;m=!1,n(...w),m=E},_=t(i.setState,r,i);if(f.type==="untracked"?l==null||l.init(_):(f.stores[f.store]=i,l==null||l.init(Object.fromEntries(Object.entries(f.stores).map(([w,E])=>[w,w===f.store?_:E.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let w=!1;const E=i.dispatch;i.dispatch=(...x)=>{(Or?"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),E(...x)}}return l.subscribe(w=>{var E;switch(w.type){case"ACTION":if(typeof w.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return os(w.payload,x=>{if(x.type==="__setState"){if(a===void 0){g(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 C=_.state[a];if(C==null)return;JSON.stringify(i.getState())!==JSON.stringify(C)&&g(C);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(_)});case"DISPATCH":switch(w.payload.type){case"RESET":return g(v),a===void 0?l==null?void 0:l.init(i.getState()):l==null?void 0:l.init(Fr(c.name));case"COMMIT":if(a===void 0){l==null||l.init(i.getState());return}return l==null?void 0:l.init(Fr(c.name));case"ROLLBACK":return is(w.state,_=>{if(a===void 0){g(_),l==null||l.init(i.getState());return}g(_[a]),l==null||l.init(Fr(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return is(w.state,_=>{if(a===void 0){g(_);return}JSON.stringify(i.getState())!==JSON.stringify(_[a])&&g(_[a])});case"IMPORT_STATE":{const{nextLiftedState:_}=w.payload,C=(E=_.computedStates.slice(-1)[0])==null?void 0:E.state;if(!C)return;g(a===void 0?C:C[a]),l==null||l.send(null,_);return}case"PAUSE_RECORDING":return m=!m}return}}),v},is=(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 Ay(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var o;const s=c=>c===null?null:JSON.parse(c,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 Wn=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return Wn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Wn(r)(n)}}}},Py=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:E=>E,version:0,merge:(E,_)=>({..._,...E}),...e},s=!1;const a=new Set,c=new Set;let h;try{h=o.getStorage()}catch{}if(!h)return t((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...E)},r,i);const l=Wn(o.serialize),f=()=>{const E=o.partialize({...r()});let _;const C=l({state:E,version:o.version}).then(k=>h.setItem(o.name,k)).catch(k=>{_=k});if(_)throw _;return C},m=i.setState;i.setState=(E,_)=>{m(E,_),f()};const g=t((...E)=>{n(...E),f()},r,i);let v;const w=()=>{var E;if(!h)return;s=!1,a.forEach(C=>C(r()));const _=((E=o.onRehydrateStorage)==null?void 0:E.call(o,r()))||void 0;return Wn(h.getItem.bind(h))(o.name).then(C=>{if(C)return o.deserialize(C)}).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==o.version){if(o.migrate)return o.migrate(C.state,C.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return C.state}).then(C=>{var k;return v=o.merge(C,(k=r())!=null?k:g),n(v,!0),f()}).then(()=>{_==null||_(v,void 0),s=!0,c.forEach(C=>C(v))}).catch(C=>{_==null||_(void 0,C)})};return i.persist={setOptions:E=>{o={...o,...E},E.getStorage&&(h=E.getStorage())},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>s,onHydrate:E=>(a.add(E),()=>{a.delete(E)}),onFinishHydration:E=>(c.add(E),()=>{c.delete(E)})},w(),v||g},Iy=(t,e)=>(n,r,i)=>{let o={storage:Ay(()=>localStorage),partialize:w=>w,version:0,merge:(w,E)=>({...E,...w}),...e},s=!1;const a=new Set,c=new Set;let h=o.storage;if(!h)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 l=()=>{const w=o.partialize({...r()});return h.setItem(o.name,{state:w,version:o.version})},f=i.setState;i.setState=(w,E)=>{f(w,E),l()};const m=t((...w)=>{n(...w),l()},r,i);i.getInitialState=()=>m;let g;const v=()=>{var w,E;if(!h)return;s=!1,a.forEach(C=>{var k;return C((k=r())!=null?k:m)});const _=((E=o.onRehydrateStorage)==null?void 0:E.call(o,(w=r())!=null?w:m))||void 0;return Wn(h.getItem.bind(h))(o.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==o.version){if(o.migrate)return[!0,o.migrate(C.state,C.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var k;const[I,T]=C;if(g=o.merge(T,(k=r())!=null?k:m),n(g,!0),I)return l()}).then(()=>{_==null||_(g,void 0),g=r(),s=!0,c.forEach(C=>C(g))}).catch(C=>{_==null||_(void 0,C)})};return i.persist={setOptions:w=>{o={...o,...w},w.storage&&(h=w.storage)},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>v(),hasHydrated:()=>s,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(c.add(w),()=>{c.delete(w)})},o.skipHydration||v(),g||m},My=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Or?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Py(t,e)):Iy(t,e);function Vr(t){const e=t.content.slice(0,50);return t.support?`${t.date}-${t.authorName}-${e}`:`${t.date}-customer-${e}`}function Gu(t,e){const n=new Map;return t.forEach(r=>{const i=Vr(r);n.set(i,r)}),e.forEach(r=>{const i=Vr(r);n.set(i,r)}),Array.from(n.values()).sort((r,i)=>r.date-i.date)}function Ry(t,e){const n=Vr(e);return t.some(r=>Vr(r)===n)}const Xu=460,Ny=750,Dy="https://api.deskcord.chat";function Ly(){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)??Dy;if(!t)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return{app_id:t,domain:e}}const Lt=Ly();function mt(...t){}async function By(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Lt.domain}/conversations/unread-count`,{method:"GET",headers:e});return n.ok?(await n.json()).unreadCount:(mt(`Failed to fetch unread count: ${n.status}`),null)}catch{return null}}async function Oy(t,e){const n=new Headers;n.append("Content-Type","application/json"),n.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${Lt.domain}/conversations/mark-read`,{method:"POST",headers:n,body:JSON.stringify({timestamp:e})});return r.ok?(await r.json()).success:(mt(`Failed to mark as read: ${r.status}`),!1)}catch{return!1}}const Zu="deskcord_last_read",Ju="deskcord_unread_count",Fy=()=>{try{const t=localStorage.getItem(Zu);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}},Qu=t=>{try{localStorage.setItem(Zu,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing last read timestamp")}},Ur=()=>{try{const t=localStorage.getItem(Ju);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}},Kn=t=>{try{localStorage.setItem(Ju,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing unread count")}},ot=my(Ty(My((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(sn(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(sn(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(sn(o=>{const s=o.conversations.findIndex(a=>a.threadId===n);if(s!==-1){const a=o.conversations[s].messages.findIndex(c=>c.date===r);o.conversations[s].messages[a]=i}})),removeMessage:(n,r)=>t(sn(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(sn(r=>{const i=r.conversations.findIndex(o=>o.threadId===n.threadId);if(i!==-1){const o=r.conversations[i],s=Gu(o.messages,n.messages);r.conversations[i]={...n,messages:s}}else r.conversations.push(n);r.currentConversationLastFetchedAt=Date.now()})),smartMergePastConversations:n=>t(sn(r=>{n.forEach(i=>{const o=r.conversations.findIndex(s=>s.threadId===i.threadId);if(o!==-1){const s=r.conversations[o],a=Gu(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 Kn(r),{unreadCount:r}}),markMessagesAsRead:()=>t(()=>{const n=Date.now();return Kn(0),Qu(n),{unreadCount:0,lastReadMessageDate:n}}),setUnreadCount:n=>t(()=>(Kn(n),{unreadCount:n})),syncUnreadCountFromServer:async()=>{const n=Ae.get("discord-widget");if(!n){const r=Ur();t(()=>({unreadCount:r}));return}try{const r=await By(n);if(r!==null)mt(`Synced unread count from server: ${r}`),Kn(r),t(()=>({unreadCount:r}));else{mt("Server unavailable, using cached unread count");const i=Ur();t(()=>({unreadCount:i}))}}catch{const i=Ur();t(()=>({unreadCount:i}))}},markMessagesAsReadWithSync:async()=>{const n=Date.now();Kn(0),Qu(n),t(()=>({unreadCount:0,lastReadMessageDate:n}));const r=Ae.get("discord-widget");if(r)try{const i=await Oy(r,n);mt(i?"Successfully synced mark-read with server":"Failed to sync mark-read with server (will retry on next load)")}catch{}},initializeUnreadState:()=>{const n=Ur(),r=Fy();t(()=>({unreadCount:n,lastReadMessageDate:r}))}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:Vy(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function Vy(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}async function Uy({content:t}){const e=ot.getState().username,n=Ae.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(`${Lt.domain}/conversations/sendMessage`,o)).json()}var an=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(an||{});const qn="System",$y={content:"This conversation has been closed by the support.",support:!0,authorName:qn,date:Date.now()},zy={content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:an.IntroduceYourself};function jy(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:qn,date:Date.now(),ephemeral:!0}}function Hy(t){return{content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:an.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function Wy(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const td=["image/png","image/jpeg","image/gif","image/webp"],Ky=he(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const c=F(null),h=F(null),{addMessage:l,getConversation:f,removeMessage:m,updateMessage:g}=ot(),v=f();Cn(a,()=>({upload:async()=>{if(h.current)try{const I=new FormData;I.append("file",h.current),o==null||o(h.current),E(h.current);const T=await fetch(n.url,{method:n.method,headers:n.headers,body:I}),M=await T.json();i==null||i(T),_(h.current),w(M)}catch(I){s==null||s(I),C(h.current)}},clear:()=>{h.current=null,c.current&&(c.current.value=""),r==null||r(null)}}));function w(I){v&&l(v.threadId,Wy(I.attachments))}function E(I){v&&l(v.threadId,Hy({fileName:I.name,status:"uploading",size:I.size}))}function _(I){var M;if(!v)return;const T=(M=f())==null?void 0:M.messages.find(N=>{var A,R;return((R=(A=N.customRendererProps)==null?void 0:A.file)==null?void 0:R.fileName)===I.name});T&&m(v.threadId,T.date)}function C(I){var M,N;if(!v)return;const T=(M=f())==null?void 0:M.messages.find(A=>{var R,L;return((L=(R=A.customRendererProps)==null?void 0:R.file)==null?void 0:L.fileName)===I.name});(N=T==null?void 0:T.customRendererProps)!=null&&N.file&&g(v.threadId,T.date,{...T,customRendererProps:{...T.customRendererProps,file:{...T.customRendererProps.file,status:"error"}}})}return x(Z,{children:[x("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var I;return(I=c.current)==null?void 0:I.click()},children:x(Ng,{size:16})}),x("input",{type:"file",accept:t,ref:c,style:{display:"none"},onChange:I=>{var M;const T=(M=I.target.files)==null?void 0:M[0];T&&T.size<=e&&td.includes(T.type)?(h.current=T,r==null||r(T)):(h.current=null,r==null||r(null))}})]})}),qy=({size:t})=>x("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:x("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"})}),Yy=({onPickEmoji:t})=>x("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:x("div",{className:"grid grid-cols-8 gap-2",children:Gy.map((e,n)=>x("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),Gy=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],Xy=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>x("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[x("div",{className:"flex justify-center absolute inset-0",children:x("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),x("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:x(Bg,{size:20})}),x("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})]}),Zy=({className:t})=>x("svg",{className:t,viewBox:"0 0 642 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:x("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"})}),Jy=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:c,attachmentPreviews:h,disabled:l=!1}=t,{getConversation:f}=ot(),m=f(),g=Ae.get("discord-widget"),v=F(null),w=(m==null?void 0:m.status)==="closed",E=w||l,_=()=>{},C=A=>{i(o.filter(R=>(A==null?void 0:A.name)!==R.name))},k=A=>{A&&i([...o,A])},I=()=>{var A;(A=v.current)==null||A.upload()},T=()=>{o.length&&I(),r()},M=A=>{A.key==="Enter"&&(A.shiftKey?(A.preventDefault(),n(`${e}
|
|
100
|
-
`)):(A.preventDefault(),T()))};return x("div",{className:`relative ${w?"":"border-t border-t-gray-200"}`,children:[!w&&s&&x(Yy,{onPickEmoji:a}),!w&&(()=>{if(!(o!=null&&o.length))return null;const A=o.map((R,L)=>{if(!h[R.name])return null;const{url:O,width:et,height:ht}=h[R.name];return x(Xy,{onDelete:()=>{var Mt;i(o.filter(G=>G.name!==R.name)),(Mt=v.current)==null||Mt.clear()},fileName:R.name,width:et,height:ht,imageUrl:O},`attachment-preview-${L}`)});return x("div",{className:"m-2",children:A})})(),!w&&x("div",{className:"flex items-start gap-2 p-2 bg-white dark:bg-neutral-900",children:[x("textarea",{id:"hs-textarea-ex-1",disabled:E,value:e,onChange:A=>n(A.target.value),onKeyDown:M,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:l?"Please introduce yourself first...":"Ask us anything!","data-hs-textarea-auto-height":""}),x("button",{type:"button",disabled:E,onClick:()=>T(),style:{background:E?"#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:x(qy,{size:16})})]}),x("div",{className:"flex items-center justify-between px-2 py-1.5 bg-white dark:bg-neutral-900",children:[x("div",{className:"flex items-center gap-1",children:!w&&x(Z,{children:[x("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:x(Ky,{ref:v,accept:td.join(","),maxSize:10*1024*1024,uploadConfig:{url:`${Lt.domain}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${g}`}},onUploadComplete:_,onUploadStart:C,onFileSelect:k})}),x("button",{type:"button",disabled:E,onClick:E?void 0:()=>c(!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:x(Lg,{size:16})})]})}),x("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:[x("span",{children:"Powered by"}),x(Zy,{className:"h-[10px] w-auto"})]})]})]})},ed=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`},nd="carousel",rd="controller",Qy="navigation",t1="no-scroll",os="portal",e1="root",id="toolbar",ss="loading",as="error",cs="complete",n1="placeholder",r1=t=>`active-slide-${t}`,od="flex_center",i1="no_scroll",sd="no_scroll_padding",o1="slide_wrapper",Re="prev",Ne="next",ad="swipe",cn="close",cd="onPointerDown",ld="onPointerMove",ud="onPointerUp",dd="onPointerLeave",hd="onPointerCancel",fd="onKeyDown",s1="onKeyUp",pd="onWheel",a1="Escape",c1="ArrowLeft",l1="ArrowRight",u1="button",ls="icon",md="contain",gd="cover",d1="Unknown action type",yd="yarl__";function le(...t){return[...t].filter(Boolean).join(" ")}function q(t){return`${yd}${t}`}function It(t){return`--${yd}${t}`}function Yn(t,e){return`${t}${e?`_${e}`:""}`}function us(t){return e=>Yn(t,e)}function h1(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function wd(...t){return()=>{t.forEach(e=>{e()})}}function De(t,e,n){return()=>{const r=ut(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function vd(){return typeof window<"u"}function f1(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function _d(t){return t.type===void 0||t.type==="image"}function p1(t,e){return t.imageFit===gd||t.imageFit!==md&&e===gd}function $r(t){return typeof t=="string"?Number.parseInt(t,10):t}function zr(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=$r(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function m1(t,e){const n=zr(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 xd(t,e){return e>0?(t%e+e)%e:0}function bd(t){return t.length>0}function Cd(t,e){return t[xd(e,t.length)]}function ds(t,e){return bd(t)?Cd(t,e):void 0}function g1(t){return _d(t)?t.src:void 0}function y1(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const w1=Number(ka.split(".")[0])>=19;function v1(t){return{inert:w1?t:t?"":void 0}}const hs={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[cn]},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:md,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 Le(t,e){return{name:t,component:e}}function xt(t,e){return{module:t,children:e}}function Ed(t,e,n){return t.module.name===e?n(t):t.children?[xt(t.module,t.children.flatMap(r=>{var i;return(i=Ed(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function ln(t,e,n){return t.flatMap(r=>{var i;return(i=Ed(r,e,n))!==null&&i!==void 0?i:[]})}function _1(t,e=[],n=[]){let r=t;const i=g=>{const v=[...r];for(;v.length>0;){const w=v.pop();if((w==null?void 0:w.module.name)===g)return!0;w!=null&&w.children&&v.push(...w.children)}return!1},o=(g,v)=>{if(g===""){r=[xt(v,r)];return}r=ln(r,g,w=>[xt(v,[w])])},s=(g,v)=>{r=ln(r,g,w=>[xt(w.module,[xt(v,w.children)])])},a=(g,v,w)=>{r=ln(r,g,E=>{var _;return[xt(E.module,[...w?[xt(v)]:[],...(_=E.children)!==null&&_!==void 0?_:[],...w?[]:[xt(v)]])]})},c=(g,v,w)=>{r=ln(r,g,E=>[...w?[xt(v)]:[],E,...w?[]:[xt(v)]])},h=g=>{s(rd,g)},l=(g,v)=>{r=ln(r,g,w=>[xt(v,w.children)])},f=g=>{r=ln(r,g,v=>v.children)},m=g=>{n.push(g)};return e.forEach(g=>{g({contains:i,addParent:o,append:s,addChild:a,addSibling:c,addModule:h,replace:l,remove:f,augment:m})}),{config:r,augmentation:g=>n.reduce((v,w)=>w(v),g)}}const Sd=kt(null),fs=De("useDocument","DocumentContext",Sd);function x1({nodeRef:t,children:e}){const n=vt(()=>{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 B(Sd.Provider,{value:n},e)}const kd=kt(null),jr=De("useEvents","EventsContext",kd);function b1({children:t}){const[e]=j({});U(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=vt(()=>{const r=(s,a)=>{var c;(c=e[s])===null||c===void 0||c.splice(0,e[s].length,...e[s].filter(h=>h!==a))};return{publish:(...[s,a])=>{var c;(c=e[s])===null||c===void 0||c.forEach(h=>h(a))},subscribe:(s,a)=>(e[s]||(e[s]=[]),e[s].push(a),()=>r(s,a)),unsubscribe:r}},[e]);return B(kd.Provider,{value:n},t)}const Td=kt(null),Gn=De("useLightboxProps","LightboxPropsContext",Td);function C1({children:t,...e}){return B(Td.Provider,{value:e},t)}const Ad=kt(null),Hr=De("useLightboxState","LightboxStateContext",Ad),Pd=kt(null),E1=De("useLightboxDispatch","LightboxDispatchContext",Pd);function S1(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=xd(i,n.length),s=ds(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:ds(e.slides,e.index)}:t;default:throw new Error(d1)}}function k1({slides:t,index:e,children:n}){const[r,i]=bn(S1,{slides:t,currentIndex:e,globalIndex:e,currentSlide:ds(t,e)});U(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=vt(()=>({...r,state:r,dispatch:i}),[r,i]);return B(Pd.Provider,{value:i},B(Ad.Provider,{value:o},n))}const Id=kt(null),Wr=De("useTimeouts","TimeoutsContext",Id);function T1({children:t}){const[e]=j([]);U(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=vt(()=>{const r=s=>{e.splice(0,e.length,...e.filter(a=>a!==s))};return{setTimeout:(s,a)=>{const c=window.setTimeout(()=>{r(c),s()},a);return e.push(c),c},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[e]);return B(Id.Provider,{value:n},t)}const Md=he(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},c){const{styles:h,labels:l}=Gn(),f=h1(l,e);return B("button",{ref:c,type:"button",title:f,"aria-label":f,className:le(q(u1),n),onClick:o,style:{...s,...h.button},...a},i?i():B(r,{className:q(ls),style:h.icon}))});function A1(t,e){const n=r=>B("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 Xn(t,e){return A1(t,B("g",{fill:"currentColor"},B("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const P1=Xn("Close",B("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"})),I1=Xn("Previous",B("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),M1=Xn("Next",B("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),R1=Xn("Loading",B(Z,null,Array.from({length:8}).map((t,e,n)=>B("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)`})))),N1=Xn("Error",B("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"})),Zn=vd()?oe:U;function Rd(){const[t,e]=j(!1);return U(()=>{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 D1(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map($r);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 Nd(t,e){const n=F(),r=F(),i=Rd();return Zn(()=>{var o,s,a;if(t.current&&n.current!==void 0&&!i){const{keyframes:c,duration:h,easing:l,onfinish:f}=e(n.current,t.current.getBoundingClientRect(),D1(t.current))||{};if(c&&h){(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,c,{duration:h,easing:l})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,f==null||f()})}}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 Dd(){const t=F(null),e=F(),[n,r]=j();return{setContainerRef:Q(o=>{t.current=o,e.current&&(e.current.disconnect(),e.current=void 0);const s=()=>{if(o){const a=window.getComputedStyle(o),c=h=>parseFloat(h)||0;r({width:Math.round(o.clientWidth-c(a.paddingLeft)-c(a.paddingRight)),height:Math.round(o.clientHeight-c(a.paddingTop)-c(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 Kr(){const t=F(),{setTimeout:e,clearTimeout:n}=Wr();return Q((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function gt(t){const e=F(t);return Zn(()=>{e.current=t}),Q((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Ld(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function ps(t,e){return vt(()=>t==null&&e==null?null:n=>{Ld(t,n),Ld(e,n)},[t,e])}function L1(t,e=!1){const n=F();Zn(()=>{e&&n.current&&(n.current=!1,t())},[e,t]);const r=Q(()=>{n.current=!0},[]),i=Q(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function ms(){const[t,e]=j(!1);return Zn(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function B1(){const[t]=j({}),e=Q((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=vt(()=>({onPointerDown:i=>e(cd,i),onPointerMove:i=>e(ld,i),onPointerUp:i=>e(ud,i),onPointerLeave:i=>e(dd,i),onPointerCancel:i=>e(hd,i),onKeyDown:i=>e(fd,i),onKeyUp:i=>e(s1,i),onWheel:i=>e(pd,i)}),[e]),r=Q((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 Bd(t,e){const n=F(0),r=Kr(),i=gt((...o)=>{n.current=Date.now(),t(o)});return Q((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const gs=us("slide"),ys=us("slide_image");function O1({slide:t,offset:e,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:a,onError:c,style:h}){var l,f,m,g,v,w,E;const[_,C]=j(ss),{publish:k}=jr(),{setTimeout:I}=Wr(),T=F(null);U(()=>{e===0&&k(r1(_))},[e,_,k]);const M=gt(W=>{("decode"in W?W.decode():Promise.resolve()).catch(()=>{}).then(()=>{W.parentNode&&(C(cs),I(()=>{a==null||a(W)},0))})}),N=Q(W=>{T.current=W,W!=null&&W.complete&&M(W)},[M]),A=Q(W=>{M(W.currentTarget)},[M]),R=gt(()=>{C(as),c==null||c()}),L=p1(t,i),O=(W,Yt)=>Number.isFinite(W)?W:Yt,et=O(Math.max(...((f=(l=t.srcSet)===null||l===void 0?void 0:l.map(W=>W.width))!==null&&f!==void 0?f:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((m=T.current)===null||m===void 0?void 0:m.naturalWidth)||0),ht=O(Math.max(...((v=(g=t.srcSet)===null||g===void 0?void 0:g.map(W=>W.height))!==null&&v!==void 0?v:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((w=T.current)===null||w===void 0?void 0:w.naturalHeight)||0),Mt=et&&ht?{maxWidth:`min(${et}px, 100%)`,maxHeight:`min(${ht}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},G=(E=t.srcSet)===null||E===void 0?void 0:E.sort((W,Yt)=>W.width-Yt.width).map(W=>`${W.src} ${W.width}w`).join(", "),hn=()=>r&&!L&&t.width&&t.height?r.height/t.height*t.width:Number.MAX_VALUE,K=G&&r&&vd()?`${Math.round(Math.min(hn(),r.width))}px`:void 0,{style:wt,className:Bt,...jt}=o||{};return B(Z,null,B("img",{ref:N,onLoad:A,onError:R,onClick:s,draggable:!1,className:le(q(ys()),L&&q(ys("cover")),_!==cs&&q(ys("loading")),Bt),style:{...Mt,...h,...wt},...jt,alt:t.alt,sizes:K,srcSet:G,src:t.src}),_!==cs&&B("div",{className:q(gs(n1))},_===ss&&(n!=null&&n.iconLoading?n.iconLoading():B(R1,{className:le(q(ls),q(gs(ss)))})),_===as&&(n!=null&&n.iconError?n.iconError():B(N1,{className:le(q(ls),q(gs(as)))}))))}const F1=he(function({className:e,children:n,...r},i){const o=F(null);return B(x1,{nodeRef:o},B("div",{ref:ps(i,o),className:le(q("root"),e),...r},n))});var St;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(St||(St={}));function V1(t,e,n,r,i){U(()=>wd(t(cd,e),t(ld,n),t(ud,r),t(dd,r),t(hd,r)),[t,e,n,r,i])}var Kt;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(Kt||(Kt={}));const ws=30;function U1(t,e,n,r,i,o,s,a,c,h,l,f,m,g){const v=F(0),w=F([]),E=F(),_=F(0),C=F(Kt.NONE),k=Q(R=>{E.current===R.pointerId&&(E.current=void 0,C.current=Kt.NONE);const L=w.current;L.splice(0,L.length,...L.filter(O=>O.pointerId!==R.pointerId))},[]),I=Q(R=>{k(R),R.persist(),w.current.push(R)},[k]),T=gt(R=>{I(R)}),M=(R,L)=>h&&R>L||c&&R<-L,N=gt(R=>{if(w.current.find(L=>L.pointerId===R.pointerId)&&E.current===R.pointerId){const L=Date.now()-_.current,O=v.current;C.current===Kt.SWIPE?Math.abs(O)>.3*n||Math.abs(O)>5&&L<r?s(O,L):a(O):C.current===Kt.PULL&&(M(O,2*ws)?m(O,L):g(O)),v.current=0,C.current=Kt.NONE}k(R)}),A=gt(R=>{const L=w.current.find(O=>O.pointerId===R.pointerId);if(L){const O=E.current===R.pointerId;if(R.buttons===0){O&&v.current!==0?N(R):k(L);return}const et=R.clientX-L.clientX,ht=R.clientY-L.clientY;if(E.current===void 0){const Mt=G=>{I(R),E.current=R.pointerId,_.current=Date.now(),C.current=G};Math.abs(et)>Math.abs(ht)&&Math.abs(et)>ws&&e(et)?(Mt(Kt.SWIPE),i()):Math.abs(ht)>Math.abs(et)&&M(ht,ws)&&(Mt(Kt.PULL),l())}else O&&(C.current===Kt.SWIPE?(v.current=et,o(et)):C.current===Kt.PULL&&(v.current=ht,f(ht)))}});V1(t,T,A,N)}function $1({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=F(null),r=gt(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&t||!o&&e||i.ctrlKey)&&i.preventDefault()});return Q(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 z1(t,e,n,r,i,o,s,a,c){const h=F(0),l=F(0),f=F(),m=F(),g=F(0),v=F(),w=F(0),{setTimeout:E,clearTimeout:_}=Wr(),C=Q(()=>{f.current&&(_(f.current),f.current=void 0)},[_]),k=Q(()=>{m.current&&(_(m.current),m.current=void 0)},[_]),I=gt(()=>{t!==St.SWIPE&&(h.current=0,w.current=0,C(),k())});U(I,[t,I]);const T=gt(N=>{m.current=void 0,h.current===N&&c(h.current)}),M=gt(N=>{if(N.ctrlKey||Math.abs(N.deltaY)>Math.abs(N.deltaX))return;const A=R=>{g.current=R,_(v.current),v.current=R>0?E(()=>{g.current=0,v.current=void 0},300):void 0};if(t===St.NONE){if(Math.abs(N.deltaX)<=1.2*Math.abs(g.current)){A(N.deltaX);return}if(!n(-N.deltaX))return;if(l.current+=N.deltaX,C(),Math.abs(l.current)>30)l.current=0,A(0),w.current=Date.now(),o();else{const R=l.current;f.current=E(()=>{f.current=void 0,R===l.current&&(l.current=0)},i)}}else if(t===St.SWIPE){let R=h.current-N.deltaX;if(R=Math.min(Math.abs(R),r)*Math.sign(R),h.current=R,s(R),k(),Math.abs(R)>.2*r){A(N.deltaX),a(R,Date.now()-w.current);return}m.current=E(()=>T(R),2*i)}else A(N.deltaX)});U(()=>e(pd,M),[e,M])}const Od=us("container"),Fd=kt(null),Jn=De("useController","ControllerContext",Fd);function j1({children:t,...e}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:a,render:c}=e,{closeOnPullUp:h,closeOnPullDown:l,preventDefaultWheelX:f,preventDefaultWheelY:m}=o,[g,v]=j(),w=Hr(),E=E1(),[_,C]=j(St.NONE),k=F(0),I=F(0),T=F(1),{registerSensors:M,subscribeSensors:N}=B1(),{subscribe:A,publish:R}=jr(),L=Kr(),O=Kr(),et=Kr(),{containerRef:ht,setContainerRef:Mt,containerRect:G}=Dd(),hn=ps($1({preventDefaultWheelX:f,preventDefaultWheelY:m}),Mt),K=F(null),wt=ps(K,void 0),{getOwnerDocument:Bt}=fs(),jt=ms(),W=D=>(jt?-1:1)*(typeof D=="number"?D:1),Yt=gt(()=>{var D;return(D=ht.current)===null||D===void 0?void 0:D.focus()}),ni=gt(()=>e),ft=gt(()=>w),_t=Q(D=>R(Re,D),[R]),Oe=Q(D=>R(Ne,D),[R]),ye=Q(()=>R(cn),[R]),fn=D=>!(r.finite&&(W(D)>0&&w.currentIndex===0||W(D)<0&&w.currentIndex===w.slides.length-1)),nr=D=>{var J;k.current=D,(J=ht.current)===null||J===void 0||J.style.setProperty(It("swipe_offset"),`${Math.round(D)}px`)},pn=D=>{var J,bt;I.current=D,T.current=(()=>{const de=l&&D>0?D:h&&D<0?-D:0;return Math.min(Math.max(f1(1-de/60*(1-.5),2),.5),1)})(),(J=ht.current)===null||J===void 0||J.style.setProperty(It("pull_offset"),`${Math.round(D)}px`),(bt=ht.current)===null||bt===void 0||bt.style.setProperty(It("pull_opacity"),`${T.current}`)},{prepareAnimation:we}=Nd(K,(D,J,bt)=>{if(K.current&&G)return{keyframes:[{transform:`translate(0, ${D.rect.y-J.y+bt.y}px)`,opacity:D.opacity},{transform:"translate(0, 0)",opacity:1}],duration:D.duration,easing:i.easing.fade}}),mn=(D,J)=>{if(h||l){pn(D);let bt=0;K.current&&(bt=i.fade*(J?2:1),we({rect:K.current.getBoundingClientRect(),opacity:T.current,duration:bt})),et(()=>{pn(0),C(St.NONE)},bt),C(St.ANIMATION),J||ye()}},{prepareAnimation:ri,isAnimationPlaying:Bs}=Nd(K,(D,J,bt)=>{var At;if(K.current&&G&&(!((At=w.animation)===null||At===void 0)&&At.duration)){const st=zr(r.spacing),de=(st.percent?st.percent*G.width/100:st.pixel)||0;return{keyframes:[{transform:`translate(${W(w.globalIndex-D.index)*(G.width+de)+D.rect.x-J.x+bt.x}px, 0)`},{transform:"translate(0, 0)"}],duration:w.animation.duration,easing:w.animation.easing}}}),ve=gt(D=>{var J,bt;const At=D.offset||0,st=At?i.swipe:(J=i.navigation)!==null&&J!==void 0?J:i.swipe,de=!At&&!Bs()?i.easing.navigation:i.easing.swipe;let{direction:gn}=D;const Ot=(bt=D.count)!==null&&bt!==void 0?bt:1;let ir=St.ANIMATION,p=st*Ot;if(!gn){const d=G==null?void 0:G.width,y=D.duration||0,b=d?st/d*Math.abs(At):st;Ot!==0?(y<b?p=p/b*Math.max(y,b/5):d&&(p=st/d*(d-Math.abs(At))),gn=W(At)>0?Re:Ne):p=st/2}let u=0;gn===Re?fn(W(1))?u=-Ot:(ir=St.NONE,p=st):gn===Ne&&(fn(W(-1))?u=Ot:(ir=St.NONE,p=st)),p=Math.round(p),O(()=>{nr(0),C(St.NONE)},p),K.current&&ri({rect:K.current.getBoundingClientRect(),index:w.globalIndex}),C(ir),R(ad,{type:"swipe",increment:u,duration:p,easing:de})});U(()=>{var D,J;!((D=w.animation)===null||D===void 0)&&D.increment&&(!((J=w.animation)===null||J===void 0)&&J.duration)&&L(()=>E({type:"swipe",increment:0}),w.animation.duration)},[w.animation,E,L]);const ue=[N,fn,(G==null?void 0:G.width)||0,i.swipe,()=>C(St.SWIPE),D=>nr(D),(D,J)=>ve({offset:D,duration:J,count:1}),D=>ve({offset:D,count:0})],Fe=[()=>{l&&C(St.PULL)},D=>pn(D),D=>mn(D),D=>mn(D,!0)];U1(...ue,h,l,...Fe),z1(_,...ue);const ii=gt(()=>{o.focus&&Bt().querySelector(`.${q(os)} .${q(Od())}`)&&Yt()});U(ii,[ii]);const oi=gt(()=>{var D;(D=s.view)===null||D===void 0||D.call(s,{index:w.currentIndex})});U(oi,[w.globalIndex,oi]),U(()=>wd(A(Re,D=>ve({direction:Re,...D})),A(Ne,D=>ve({direction:Ne,...D})),A(ad,D=>E(D))),[A,ve,E]);const rr=vt(()=>({prev:_t,next:Oe,close:ye,focus:Yt,slideRect:G?m1(G,r.padding):{width:0,height:0},containerRect:G||{width:0,height:0},subscribeSensors:N,containerRef:ht,setCarouselRef:wt,toolbarWidth:g,setToolbarWidth:v}),[_t,Oe,ye,Yt,N,G,ht,wt,g,v,r.padding]);return Cn(o.ref,()=>({prev:_t,next:Oe,close:ye,focus:Yt,getLightboxProps:ni,getLightboxState:ft}),[_t,Oe,ye,Yt,ni,ft]),B("div",{ref:hn,className:le(q(Od()),q(od)),style:{..._===St.SWIPE?{[It("swipe_offset")]:`${Math.round(k.current)}px`}:null,..._===St.PULL?{[It("pull_offset")]:`${Math.round(I.current)}px`,[It("pull_opacity")]:`${T.current}`}:null,...o.touchAction!=="none"?{[It("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...M},G&&B(Fd.Provider,{value:rr},t,(n=c.controls)===null||n===void 0?void 0:n.call(c)))}const H1=Le(rd,j1);function Be(t){return Yn(nd,t)}function Vd(t){return Yn("slide",t)}function W1({slide:t,offset:e}){const n=F(null),{currentIndex:r}=Hr(),{slideRect:i,close:o,focus:s}=Jn(),{render:a,carousel:{imageFit:c,imageProps:h},on:{click:l},controller:{closeOnBackdropClick:f},styles:{slide:m}}=Gn(),{getOwnerDocument:g}=fs(),v=e!==0;U(()=>{var _;v&&(!((_=n.current)===null||_===void 0)&&_.contains(g().activeElement))&&s()},[v,s,g]);const w=()=>{var _,C,k,I;let T=(_=a.slide)===null||_===void 0?void 0:_.call(a,{slide:t,offset:e,rect:i});return!T&&_d(t)&&(T=B(O1,{slide:t,offset:e,render:a,rect:i,imageFit:c,imageProps:h,onClick:v?void 0:()=>l==null?void 0:l({index:r})})),T?B(Z,null,(C=a.slideHeader)===null||C===void 0?void 0:C.call(a,{slide:t}),((k=a.slideContainer)!==null&&k!==void 0?k:({children:M})=>M)({slide:t,children:T}),(I=a.slideFooter)===null||I===void 0?void 0:I.call(a,{slide:t})):null},E=_=>{const C=n.current,k=_.target instanceof HTMLElement?_.target:void 0;f&&k&&C&&(k===C||Array.from(C.children).find(I=>I===k)&&k.classList.contains(q(o1)))&&o()};return B("div",{ref:n,className:le(q(Vd()),!v&&q(Vd("current")),q(od)),...v1(v),onClick:E,style:m},w())}function K1(){const t=Gn().styles.slide;return B("div",{className:q("slide"),style:t})}function q1({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=Hr(),{setCarouselRef:i}=Jn(),o=zr(t.spacing),s=zr(t.padding),a=y1(t,e,1),c=[];if(bd(e))for(let h=n-a;h<=n+a;h+=1){const l=Cd(e,h),f=r-n+h,m=t.finite&&(h<0||h>e.length-1);c.push(m?{key:f}:{key:[`${f}`,g1(l)].filter(Boolean).join("|"),offset:h-n,slide:l})}return B("div",{ref:i,className:le(q(Be()),c.length>0&&q(Be("with_slides"))),style:{[`${It(Be("slides_count"))}`]:c.length,[`${It(Be("spacing_px"))}`]:o.pixel||0,[`${It(Be("spacing_percent"))}`]:o.percent||0,[`${It(Be("padding_px"))}`]:s.pixel||0,[`${It(Be("padding_percent"))}`]:s.percent||0}},c.map(({key:h,slide:l,offset:f})=>l?B(W1,{key:h,slide:l,offset:f}):B(K1,{key:h})))}const Y1=Le(nd,q1);function Ud(){const{carousel:t}=Gn(),{slides:e,currentIndex:n}=Hr(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function G1(t){var e;const n=ms(),{publish:r}=jr(),{animation:i}=Gn(),{prevDisabled:o,nextDisabled:s}=Ud(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,c=Bd(()=>r(Re),a),h=Bd(()=>r(Ne),a),l=gt(f=>{switch(f.key){case a1:r(cn);break;case c1:(n?s:o)||(n?h:c)();break;case l1:(n?o:s)||(n?c:h)();break}});U(()=>t(fd,l),[t,l])}function $d({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return B(Md,{label:t,icon:e,renderIcon:n,className:q(`navigation_${r}`),disabled:o,onClick:i,style:s,...L1(Jn().focus,o)})}function X1({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=Jn(),{prevDisabled:c,nextDisabled:h}=Ud();return G1(a),B(Z,null,t?t():B($d,{label:"Previous",action:Re,icon:I1,renderIcon:n,style:i.navigationPrev,disabled:c,onClick:o}),e?e():B($d,{label:"Next",action:Ne,icon:M1,renderIcon:r,style:i.navigationNext,disabled:h,onClick:s}))}const Z1=Le(Qy,X1),zd=q(i1),J1=q(sd);function Q1(t){return"style"in t}function jd(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,`${($r(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function tw({noScroll:{disabled:t},children:e}){const n=ms(),{getOwnerDocument:r,getOwnerWindow:i}=fs();return U(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:c}=r(),h=Math.round(s.innerWidth-c.clientWidth);if(h>0){o.push(jd(a,h,n));const l=a.getElementsByTagName("*");for(let f=0;f<l.length;f+=1){const m=l[f];Q1(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(J1)&&o.push(jd(m,h,n))}}return a.classList.add(zd),()=>{a.classList.remove(zd),o.forEach(l=>l())}},[n,t,r,i]),B(Z,null,e)}const ew=Le(t1,tw);function Hd(t){return Yn(os,t)}function Wd(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function nw({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,c]=j(!1),[h,l]=j(!1),f=F([]),m=F(null),{setTimeout:g}=Wr(),{subscribe:v}=jr(),E=Rd()?0:e.fade;U(()=>(c(!0),()=>{c(!1),l(!1)}),[]);const _=gt(()=>{f.current.forEach(T=>T()),f.current=[]}),C=gt(()=>{var T;l(!1),_(),(T=i.exiting)===null||T===void 0||T.call(i),g(()=>{var M;(M=i.exited)===null||M===void 0||M.call(i),s()},E)});U(()=>v(cn,C),[v,C]);const k=gt(T=>{var M,N,A;T.scrollTop,l(!0),(M=i.entering)===null||M===void 0||M.call(i);const R=(A=(N=T.parentNode)===null||N===void 0?void 0:N.children)!==null&&A!==void 0?A:[];for(let L=0;L<R.length;L+=1){const O=R[L];["TEMPLATE","SCRIPT","STYLE"].indexOf(O.tagName)===-1&&O!==T&&(f.current.push(Wd(O,"inert","")),f.current.push(Wd(O,"aria-hidden","true")))}f.current.push(()=>{var L,O;(O=(L=m.current)===null||L===void 0?void 0:L.focus)===null||O===void 0||O.call(L)}),g(()=>{var L;(L=i.entered)===null||L===void 0||L.call(i)},E)}),I=Q(T=>{T?k(T):_()},[k,_]);return a?Si(B(F1,{ref:I,className:le(r,q(Hd()),q(sd),h&&q(Hd("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==hs.animation.fade?{[It("fade_animation_duration")]:`${E}ms`}:null,...e.easing.fade!==hs.animation.easing.fade?{[It("fade_animation_timing_function")]:e.easing.fade}:null,...n.root},onFocus:T=>{m.current||(m.current=T.relatedTarget)}},t),o.root||document.body):null}const rw=Le(os,nw);function iw({children:t}){return B(Z,null,t)}const ow=Le(e1,iw);function sw(t){return Yn(id,t)}function aw({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=Jn(),{setContainerRef:s,containerRect:a}=Dd();Zn(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const c=()=>e?e():B(Md,{key:cn,label:"Close",icon:P1,renderIcon:n,onClick:i});return B("div",{ref:s,style:r.toolbar,className:q(sw())},t==null?void 0:t.map(h=>h===cn?c():h))}const cw=Le(id,aw);function Kd(t,e){var n;return B(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>Kd(r,e)))}function lw(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function uw({carousel:t,animation:e,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:a,slides:c,index:h,...l}){const{animation:f,carousel:m,render:g,toolbar:v,controller:w,noScroll:E,on:_,slides:C,index:k,plugins:I,...T}=hs,{config:M,augmentation:N}=_1([xt(rw,[xt(ew,[xt(H1,[xt(Y1),xt(cw),xt(Z1)])])])],a||I),A=N({animation:lw(f,e),carousel:{...m,...t},render:{...g,...n},toolbar:{...v,...r},controller:{...w,...i},noScroll:{...E,...o},on:{..._,...s},...T,...l});return A.open?B(C1,{...A},B(k1,{slides:c||C,index:$r(h||k)},B(T1,null,B(b1,null,Kd(xt(ow,M),A))))):null}function qd(t){var e;return t.contentType?t.contentType==="image/gif":((e=t.name)==null?void 0:e.toLowerCase().endsWith(".gif"))??!1}const Yd=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=ot(),[r,i]=j(!1),o=ut(Sh);function s(){if(o){const l=o.getElementById("deskcord-lightbox-portal");if(l)return l}const h=document.getElementById("deskcord-lightbox-portal");return h||document.body}const a=(e==null?void 0:e.filter(h=>!qd(h)))??[];function c(){return a.length?x(uw,{open:r,portal:{root:s()},close:()=>{i(!1),n(!1)},slides:a.map(h=>({src:h.proxyURL}))}):null}return e!=null&&e.length?x("div",{children:[e.map((h,l)=>{const{proxyURL:f,width:m,height:g}=h;return qd(h)?x("div",{children:x("img",{src:f,alt:"GIF",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`):x("div",{onClick:()=>{n(!0),i(!0)},className:"cursor-pointer",children:x("img",{src:f,alt:"Preview",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`)}),c()]},`conv-cus-attachment-${t}`):null},Gd=({imageUrls:t,messageIndexKey:e})=>t.length?x("div",{className:"flex flex-col gap-1 mt-1",children:t.map((n,r)=>x("div",{className:"inline-block",children:x("img",{src:n,alt:"Inline image",className:"rounded-lg max-w-[200px] max-h-[200px] object-contain",loading:"lazy"})},`inline-img-${e}-${r}`))}):null,dw=["tenor.com","giphy.com","imgur.com","gfycat.com","media.discordapp.net","cdn.discordapp.com","i.redd.it","i.imgur.com"],hw=[".gif",".jpg",".jpeg",".png",".webp",".apng"];function fw(t){try{const e=new URL(t),n=e.pathname.toLowerCase(),r=e.hostname.toLowerCase();for(const i of hw)if(n.endsWith(i))return!0;for(const i of dw)if(r===i||r.endsWith(`.${i}`))return!0;return!1}catch{return!1}}const pw=/https?:\/\/[^\s<>]+/gi;function Xd(t){if(!t)return{text:"",imageUrls:[]};const e=[];let n=t;const r=t.match(pw);if(r)for(const i of r)fw(i)&&(e.push(i),n=n.replace(i,""));return n=n.replace(/\s+/g," ").trim(),{text:n,imageUrls:e}}const mw=({renderTimestamp:t,message:e,indexKey:n})=>{function r(s,a){const c=/<\w?:\w+:\d+>/g,h=s.split(c),l=s.match(c)??[],f=[];for(let m=0;m<h.length;m++)if(f.push(h[m]),l[m]){const g=a[l[m]];g&&f.push(x("img",{src:g.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},m))}return f}const{text:i,imageUrls:o}=Xd(e.content??"");return x("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[i&&x("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??{})}),x(Gd,{imageUrls:o,messageIndexKey:n}),x("div",{className:"flex flex-1",children:x(Yd,{attachments:e.attachments,messageIndexKey:n})}),t&&x("div",{children:x("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",ed(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},gw=({message:t,indexKey:e})=>{const{text:n,imageUrls:r}=Xd(t.content??"");return x("li",{className:`flex flex-col items-end ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[n&&x("div",{className:"grow",children:x("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:x("p",{className:"text-left text-sm text-white",children:n})})}),x(Gd,{imageUrls:r,messageIndexKey:e}),t.attachments&&x("div",{className:"flex flex-1 justify-end",children:x(Yd,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`)},yw=({message:t,indexKey:e})=>x("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:x("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:x("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),ww=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=ot(),[o,s]=j(r),[a,c]=j(n),[h,l]=j(""),[f,m]=j(!1),g=_=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(_),v=!!n&&!!r,w=_=>{if(_.preventDefault(),!!a.trim()){if(!g(o)){l("Please enter a valid email address");return}f||(m(!0),l(""),t(o),e(a))}};function E(){return x("form",{onSubmit:w,className:"w-full space-y-4",children:[x("div",{className:"mb-4",children:[x("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Let's get started"}),x("p",{className:"text-sm text-gray-600",children:"Tell us a bit about yourself so we can assist you better."})]}),x("div",{children:[x("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your name"}),x("div",{className:"relative",children:[x("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:x(Og,{size:18,className:"text-gray-400"})}),x("input",{type:"text",id:"name",value:a,onChange:_=>c(_.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:v,required:!0})]})]}),x("div",{children:[x("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email address"}),x("div",{className:"relative",children:[x("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:x(Mg,{size:18,className:"text-gray-400"})}),x("input",{type:"email",id:"email",value:o,onChange:_=>{s(_.target.value),h&&l("")},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 ${h?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-[#7289DA]"}`,placeholder:"you@example.com",disabled:v,required:!0})]}),h&&x("p",{className:"text-red-600 text-sm mt-2 flex items-center gap-1",children:[x("span",{className:"inline-block w-1 h-1 bg-red-600 rounded-full"}),h]})]}),x("p",{className:"text-xs text-gray-500 text-center",children:"We'll never share your information"}),!n||!r?x("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:f,children:"Start Chatting"}):null]})}return x(Z,{children:[x("li",{className:`max-w-lg flex gap-x-2 sm:gap-x-4 me-11 ${i?"opacity-75":""}`,children:x("div",{className:"w-full rounded-xl p-5 bg-white shadow-lg border border-gray-100 overflow-hidden",children:E()})}),n&&r&&x("li",{className:"flex ms-auto my-4 animate-slide-in",style:{marginTop:"1rem"},children:x("div",{className:"grow",children:x("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:[x(Pg,{size:16,className:"text-white flex-shrink-0"}),x("p",{className:"text-sm text-white font-medium",children:["Nice to meet you, ",x("span",{className:"font-semibold",children:n}),"! Feel free to ask us anything."]})]})})})]})};function vw(t,e){const n=F();U(()=>{n.current=t},[t]),U(()=>{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 xw=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=j(!0),[s,a]=j(0);return vw(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),x("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:x("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:x("div",{children:[x("div",{className:"mb-2 flex justify-between items-center",children:[x("div",{className:"flex items-center gap-x-3",children:[x("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:x(Ig,{})}),x("div",{children:[x("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),x("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:_w(n.size)})]})]}),r&&x("div",{className:"inline-flex items-center gap-x-2",children:x("span",{className:"relative",children:[x("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:x("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"})}),x("span",{className:"sr-only",children:"Danger"})]})})]}),x("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[x("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:x("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}%`}})}),x("div",{className:"w-6 text-end",children:x("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},bw=({conversation:t,open:e})=>{const n=F(!1),{isChatOpen:r}=ot();U(()=>{r?n.current=!0:n.current=!1},[r]);function i(c,h){const l=`${c.date}-${h}`;let f;if(typeof c.customRenderer<"u")switch(c.customRenderer){case an.IntroduceYourself:f=x(ww,{});break;case an.UploadFile:f=x(xw,{message:c,indexKey:l});break;default:f=a(c,l)}else c.authorName===qn?f=a(c,l):c.support?f=o(c,l):f=s(c,l);return r&&(c.pending??(c.support&&n.current))?x(ce.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:f},l):x("li",{children:f},l)}function o(c,h){var g;const l=(g=t==null?void 0:t.messages)==null?void 0:g.filter(v=>v.support),f=l==null?void 0:l[l.length-1],m=c.date===(f==null?void 0:f.date);return x(mw,{renderTimestamp:m,message:c,indexKey:h})}function s(c,h){return x(gw,{message:c,indexKey:h})}function a(c,h){return x(yw,{message:c,indexKey:h})}return x("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((c,h)=>c.date-h.date).map(i),t&&!e&&i($y,1)]})},Cw=()=>{const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,email:i,updateMessage:o,isChatOpen:s}=ot(),a=!!(r&&i),c=F(!1);U(()=>{s&&!c.current&&(c.current=!0),s||(c.current=!1)},[s]);const[h,l]=j(!1),[f,m]=j([]),[g,v]=j({}),w=t(),E=(w==null?void 0:w.status)==="open",[_,C]=j("");U(()=>{const M={};f.forEach(N=>{const A=new FileReader;A.addEventListener("load",function(){const R=new Image;R.onload=()=>{M[N.name]={url:A.result,width:R.width,height:R.height,size:N.size},v(M)},R.src=A.result},!1),A.readAsDataURL(N)})},[f]);const k=M=>{C(N=>N+M)},I=async()=>{const M=Date.now(),N={support:!1,content:_,date:M,authorName:r,pending:!0};if(_.trim()!==""){C(""),e(w?w.threadId:"TEMP",N);const A=await Uy({content:_});A&&((!w||w.threadId==="TEMP")&&n(A.threadId),o(A.threadId,M,{...N,pending:!1,date:A.date}))}},T=s&&!c.current;return x(Z,{children:[x("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col-reverse space-y-4 space-y-reverse",children:x(ce.div,{initial:T?{opacity:0,x:20}:!1,animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:x(bw,{conversation:w,open:E})})}),x(Jy,{attachmentPreviews:g,files:f,setFiles:m,inputMessage:_,setInputMessage:C,showEmojiPicker:h,setShowEmojiPicker:l,addEmoji:k,sendMessage:I,disabled:!a})]})};function Zd(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 Ew(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const Qt=Object.create(null);Qt.open="0",Qt.close="1",Qt.ping="2",Qt.pong="3",Qt.message="4",Qt.upgrade="5",Qt.noop="6";const qr=Object.create(null);Object.keys(Qt).forEach(t=>{qr[Qt[t]]=t});const vs={type:"error",data:"parser error"},Jd=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Qd=typeof ArrayBuffer=="function",th=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,_s=({type:t,data:e},n,r)=>Jd&&e instanceof Blob?n?r(e):eh(e,r):Qd&&(e instanceof ArrayBuffer||th(e))?n?r(e):eh(new Blob([e]),r):r(Qt[t]+(e||"")),eh=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function nh(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let xs;function Sw(t,e){if(Jd&&t.data instanceof Blob)return t.data.arrayBuffer().then(nh).then(e);if(Qd&&(t.data instanceof ArrayBuffer||th(t.data)))return e(nh(t.data));_s(t,!1,n=>{xs||(xs=new TextEncoder),e(xs.encode(n))})}const rh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<rh.length;t++)Qn[rh.charCodeAt(t)]=t;const kw=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const h=new ArrayBuffer(e),l=new Uint8Array(h);for(r=0;r<n;r+=4)o=Qn[t.charCodeAt(r)],s=Qn[t.charCodeAt(r+1)],a=Qn[t.charCodeAt(r+2)],c=Qn[t.charCodeAt(r+3)],l[i++]=o<<2|s>>4,l[i++]=(s&15)<<4|a>>2,l[i++]=(a&3)<<6|c&63;return h},Tw=typeof ArrayBuffer=="function",bs=(t,e)=>{if(typeof t!="string")return{type:"message",data:ih(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:Aw(t.substring(1),e)}:qr[n]?t.length>1?{type:qr[n],data:t.substring(1)}:{type:qr[n]}:vs},Aw=(t,e)=>{if(Tw){const n=kw(t);return ih(n,e)}else return{base64:!0,data:t}},ih=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},oh="",Pw=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{_s(o,!1,a=>{r[s]=a,++i===n&&e(r.join(oh))})})},Iw=(t,e)=>{const n=t.split(oh),r=[];for(let i=0;i<n.length;i++){const o=bs(n[i],e);if(r.push(o),o.type==="error")break}return r};function Mw(){return new TransformStream({transform(t,e){Sw(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 Cs;function Yr(t){return t.reduce((e,n)=>e+n.length,0)}function Gr(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 Rw(t,e){Cs||(Cs=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(Yr(n)<1)break;const c=Gr(n,1);o=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Yr(n)<2)break;const c=Gr(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Yr(n)<8)break;const c=Gr(n,8),h=new DataView(c.buffer,c.byteOffset,c.length),l=h.getUint32(0);if(l>Math.pow(2,21)-1){a.enqueue(vs);break}i=l*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Yr(n)<i)break;const c=Gr(n,i);a.enqueue(bs(o?c:Cs.decode(c),e)),r=0}if(i===0||i>t){a.enqueue(vs);break}}}})}const sh=4;function yt(t){if(t)return Nw(t)}function Nw(t){for(var e in yt.prototype)t[e]=yt.prototype[e];return t}yt.prototype.on=yt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},yt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},yt.prototype.off=yt.prototype.removeListener=yt.prototype.removeAllListeners=yt.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},yt.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},yt.prototype.emitReserved=yt.prototype.emit,yt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},yt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const $t=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function ah(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const Dw=$t.setTimeout,Lw=$t.clearTimeout;function Xr(t,e){e.useNativeTimers?(t.setTimeoutFn=Dw.bind($t),t.clearTimeoutFn=Lw.bind($t)):(t.setTimeoutFn=$t.setTimeout.bind($t),t.clearTimeoutFn=$t.clearTimeout.bind($t))}const Bw=1.33;function Ow(t){return typeof t=="string"?Fw(t):Math.ceil((t.byteLength||t.size)*Bw)}function Fw(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 Vw(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function Uw(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 $w extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class Es extends yt{constructor(e){super(),this.writable=!1,Xr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new $w(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=bs(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=Vw(e);return n.length?"?"+n:""}}const ch="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Ss=64,zw={};let lh=0,Zr=0,uh;function dh(t){let e="";do e=ch[t%Ss]+e,t=Math.floor(t/Ss);while(t>0);return e}function hh(){const t=dh(+new Date);return t!==uh?(lh=0,uh=t):t+"."+dh(lh++)}for(;Zr<Ss;Zr++)zw[ch[Zr]]=Zr;let fh=!1;try{fh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const jw=fh;function ph(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||jw))return new XMLHttpRequest}catch{}if(!e)try{return new $t[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function s_(){}function Hw(){}const Ww=function(){return new ph({xdomain:!1}).responseType!=null}();class Kw extends Es{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=Ww&&!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)};Iw(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,Pw(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]=hh()),!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 te(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 te extends yt{constructor(e,n){super(),Xr(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=ah(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new ph(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=te.requestsCount++,te.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=Hw,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete te.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(te.requestsCount=0,te.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mh);else if(typeof addEventListener=="function"){const t="onpagehide"in $t?"pagehide":"unload";addEventListener(t,mh,!1)}}function mh(){for(let t in te.requests)te.requests.hasOwnProperty(t)&&te.requests[t].abort()}var qw={},Jr={};Jr.byteLength=Xw,Jr.toByteArray=Jw,Jr.fromByteArray=ev;for(var ee=[],zt=[],Yw=typeof Uint8Array<"u"?Uint8Array:Array,ks="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",un=0,Gw=ks.length;un<Gw;++un)ee[un]=ks[un],zt[ks.charCodeAt(un)]=un;zt[45]=62,zt[95]=63;function gh(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 Xw(t){var e=gh(t),n=e[0],r=e[1];return(n+r)*3/4-r}function Zw(t,e,n){return(e+n)*3/4-n}function Jw(t){var e,n=gh(t),r=n[0],i=n[1],o=new Yw(Zw(t,r,i)),s=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)e=zt[t.charCodeAt(c)]<<18|zt[t.charCodeAt(c+1)]<<12|zt[t.charCodeAt(c+2)]<<6|zt[t.charCodeAt(c+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=zt[t.charCodeAt(c)]<<2|zt[t.charCodeAt(c+1)]>>4,o[s++]=e&255),i===1&&(e=zt[t.charCodeAt(c)]<<10|zt[t.charCodeAt(c+1)]<<4|zt[t.charCodeAt(c+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function Qw(t){return ee[t>>18&63]+ee[t>>12&63]+ee[t>>6&63]+ee[t&63]}function tv(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(Qw(r));return i.join("")}function ev(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(tv(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(ee[e>>2]+ee[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(ee[e>>10]+ee[e>>4&63]+ee[e<<2&63]+"=")),i.join("")}var Ts={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Ts.read=function(t,e,n,r,i){var o,s,a=i*8-r-1,c=(1<<a)-1,h=c>>1,l=-7,f=n?i-1:0,m=n?-1:1,g=t[e+f];for(f+=m,o=g&(1<<-l)-1,g>>=-l,l+=a;l>0;o=o*256+t[e+f],f+=m,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=s*256+t[e+f],f+=m,l-=8);if(o===0)o=1-h;else{if(o===c)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-h}return(g?-1:1)*s*Math.pow(2,o-r)},Ts.write=function(t,e,n,r,i,o){var s,a,c,h=o*8-i-1,l=(1<<h)-1,f=l>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-1,v=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=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?e+=m/c:e+=m*Math.pow(2,1-f),e*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+g]=a&255,g+=v,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[n+g]=s&255,g+=v,s/=256,h-=8);t[n+g-v]|=w*128};/*!
|
|
99
|
+
`);const C=x.state[a];if(C==null)return;JSON.stringify(i.getState())!==JSON.stringify(C)&&g(C);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(x)});case"DISPATCH":switch(w.payload.type){case"RESET":return g(_),a===void 0?l==null?void 0:l.init(i.getState()):l==null?void 0:l.init(Fr(c.name));case"COMMIT":if(a===void 0){l==null||l.init(i.getState());return}return l==null?void 0:l.init(Fr(c.name));case"ROLLBACK":return os(w.state,x=>{if(a===void 0){g(x),l==null||l.init(i.getState());return}g(x[a]),l==null||l.init(Fr(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return os(w.state,x=>{if(a===void 0){g(x);return}JSON.stringify(i.getState())!==JSON.stringify(x[a])&&g(x[a])});case"IMPORT_STATE":{const{nextLiftedState:x}=w.payload,C=(E=x.computedStates.slice(-1)[0])==null?void 0:E.state;if(!C)return;g(a===void 0?C:C[a]),l==null||l.send(null,x);return}case"PAUSE_RECORDING":return m=!m}return}}),_},os=(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 Ry(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var o;const s=c=>c===null?null:JSON.parse(c,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 Hn=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(r){return Hn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Hn(r)(n)}}}},Ny=(t,e)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:E=>E,version:0,merge:(E,x)=>({...x,...E}),...e},s=!1;const a=new Set,c=new Set;let h;try{h=o.getStorage()}catch{}if(!h)return t((...E)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...E)},r,i);const l=Hn(o.serialize),f=()=>{const E=o.partialize({...r()});let x;const C=l({state:E,version:o.version}).then(k=>h.setItem(o.name,k)).catch(k=>{x=k});if(x)throw x;return C},m=i.setState;i.setState=(E,x)=>{m(E,x),f()};const g=t((...E)=>{n(...E),f()},r,i);let _;const w=()=>{var E;if(!h)return;s=!1,a.forEach(C=>C(r()));const x=((E=o.onRehydrateStorage)==null?void 0:E.call(o,r()))||void 0;return Hn(h.getItem.bind(h))(o.name).then(C=>{if(C)return o.deserialize(C)}).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==o.version){if(o.migrate)return o.migrate(C.state,C.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return C.state}).then(C=>{var k;return _=o.merge(C,(k=r())!=null?k:g),n(_,!0),f()}).then(()=>{x==null||x(_,void 0),s=!0,c.forEach(C=>C(_))}).catch(C=>{x==null||x(void 0,C)})};return i.persist={setOptions:E=>{o={...o,...E},E.getStorage&&(h=E.getStorage())},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>w(),hasHydrated:()=>s,onHydrate:E=>(a.add(E),()=>{a.delete(E)}),onFinishHydration:E=>(c.add(E),()=>{c.delete(E)})},w(),_||g},Dy=(t,e)=>(n,r,i)=>{let o={storage:Ry(()=>localStorage),partialize:w=>w,version:0,merge:(w,E)=>({...E,...w}),...e},s=!1;const a=new Set,c=new Set;let h=o.storage;if(!h)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 l=()=>{const w=o.partialize({...r()});return h.setItem(o.name,{state:w,version:o.version})},f=i.setState;i.setState=(w,E)=>{f(w,E),l()};const m=t((...w)=>{n(...w),l()},r,i);i.getInitialState=()=>m;let g;const _=()=>{var w,E;if(!h)return;s=!1,a.forEach(C=>{var k;return C((k=r())!=null?k:m)});const x=((E=o.onRehydrateStorage)==null?void 0:E.call(o,(w=r())!=null?w:m))||void 0;return Hn(h.getItem.bind(h))(o.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==o.version){if(o.migrate)return[!0,o.migrate(C.state,C.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var k;const[M,T]=C;if(g=o.merge(T,(k=r())!=null?k:m),n(g,!0),M)return l()}).then(()=>{x==null||x(g,void 0),g=r(),s=!0,c.forEach(C=>C(g))}).catch(C=>{x==null||x(void 0,C)})};return i.persist={setOptions:w=>{o={...o,...w},w.storage&&(h=w.storage)},clearStorage:()=>{h==null||h.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>_(),hasHydrated:()=>s,onHydrate:w=>(a.add(w),()=>{a.delete(w)}),onFinishHydration:w=>(c.add(w),()=>{c.delete(w)})},o.skipHydration||_(),g||m},Ly=(t,e)=>"getStorage"in e||"serialize"in e||"deserialize"in e?((Or?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),Ny(t,e)):Dy(t,e);function Vr(t){const e=t.content.slice(0,50);return t.support?`${t.date}-${t.authorName}-${e}`:`${t.date}-customer-${e}`}function Qu(t,e){const n=new Map;return t.forEach(r=>{const i=Vr(r);n.set(i,r)}),e.forEach(r=>{const i=Vr(r);n.set(i,r)}),Array.from(n.values()).sort((r,i)=>r.date-i.date)}function By(t,e){const n=Vr(e);return t.some(r=>Vr(r)===n)}const td=460,Oy=750,Fy="https://api.deskcord.chat";function Vy(){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)??Fy;if(!t)throw new Error("Cannot initialize discord chat. Please check your installation and embed.");return{app_id:t,domain:e}}const Dt=Vy();function mt(...t){}async function Uy(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Dt.domain}/conversations/unread-count`,{method:"GET",headers:e});return n.ok?(await n.json()).unreadCount:(mt(`Failed to fetch unread count: ${n.status}`),null)}catch{return null}}async function $y(t,e){const n=new Headers;n.append("Content-Type","application/json"),n.append("Authorization",`Bearer ${t}`);try{const r=await fetch(`${Dt.domain}/conversations/mark-read`,{method:"POST",headers:n,body:JSON.stringify({timestamp:e})});return r.ok?(await r.json()).success:(mt(`Failed to mark as read: ${r.status}`),!1)}catch{return!1}}const ed="deskcord_last_read",nd="deskcord_unread_count",zy=()=>{try{const t=localStorage.getItem(ed);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}},rd=t=>{try{localStorage.setItem(ed,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing last read timestamp")}},Ur=()=>{try{const t=localStorage.getItem(nd);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}},Kn=t=>{try{localStorage.setItem(nd,t.toString())}catch{console.warn("[Deskcord] localStorage unavailable for writing unread count")}},ot=vy(My(Ly((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(an(i=>{const o=i.conversations.find(s=>s.threadId===n);o&&(o.csMember=r)})),addMessage:(n,r)=>t(an(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(an(o=>{const s=o.conversations.findIndex(a=>a.threadId===n);if(s!==-1){const a=o.conversations[s].messages.findIndex(c=>c.date===r);o.conversations[s].messages[a]=i}})),removeMessage:(n,r)=>t(an(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(an(r=>{const i=r.conversations.findIndex(o=>o.threadId===n.threadId);if(i!==-1){const o=r.conversations[i],s=Qu(o.messages,n.messages);r.conversations[i]={...n,messages:s}}else r.conversations.push(n);r.currentConversationLastFetchedAt=Date.now()})),smartMergePastConversations:n=>t(an(r=>{n.forEach(i=>{const o=r.conversations.findIndex(s=>s.threadId===i.threadId);if(o!==-1){const s=r.conversations[o],a=Qu(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 Kn(r),{unreadCount:r}}),markMessagesAsRead:()=>t(()=>{const n=Date.now();return Kn(0),rd(n),{unreadCount:0,lastReadMessageDate:n}}),setUnreadCount:n=>t(()=>(Kn(n),{unreadCount:n})),syncUnreadCountFromServer:async()=>{const n=Pe.get("discord-widget");if(!n){const r=Ur();t(()=>({unreadCount:r}));return}try{const r=await Uy(n);if(r!==null)mt(`Synced unread count from server: ${r}`),Kn(r),t(()=>({unreadCount:r}));else{mt("Server unavailable, using cached unread count");const i=Ur();t(()=>({unreadCount:i}))}}catch{const i=Ur();t(()=>({unreadCount:i}))}},markMessagesAsReadWithSync:async()=>{const n=Date.now();Kn(0),rd(n),t(()=>({unreadCount:0,lastReadMessageDate:n}));const r=Pe.get("discord-widget");if(r)try{const i=await $y(r,n);mt(i?"Successfully synced mark-read with server":"Failed to sync mark-read with server (will retry on next load)")}catch{}},initializeUnreadState:()=>{const n=Ur(),r=zy();t(()=>({unreadCount:n,lastReadMessageDate:r}))}}),{name:"discord-widget-storage",partialize:t=>({token:t.token,username:t.username,email:t.email,openConversationId:t.openConversationId,conversations:jy(t.conversations),guildSettings:t.guildSettings}),onRehydrateStorage:t=>()=>t.setRehydrated(!0)}),{enabled:!1}));function jy(t){return t.map(e=>({...e,messages:e.messages.filter(n=>!n.ephemeral&&!n.pending)}))}async function Wy({content:t}){const e=ot.getState().username,n=Pe.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(`${Dt.domain}/conversations/sendMessage`,o)).json()}var cn=(t=>(t[t.IntroduceYourself=0]="IntroduceYourself",t[t.UploadFile=1]="UploadFile",t))(cn||{});const qn="System",Hy={content:"This conversation has been closed by the support.",support:!0,authorName:qn,date:Date.now()},Ky={content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:cn.IntroduceYourself};function qy(t){return{content:`You are now chatting with ${t}.`,support:!0,authorName:qn,date:Date.now(),ephemeral:!0}}function Yy(t){return{content:"",support:!0,authorName:qn,date:Date.now(),customRenderer:cn.UploadFile,customRendererProps:{file:t},ephemeral:!0}}function Gy(t){return{content:"",support:!1,authorName:"",date:Date.now(),ephemeral:!0,attachments:t}}const id=["image/png","image/jpeg","image/gif","image/webp","application/pdf"],Xy=he(({accept:t,maxSize:e,uploadConfig:n,onFileSelect:r,onUploadComplete:i,onUploadStart:o,onError:s},a)=>{const c=F(null),h=F(null),{addMessage:l,getConversation:f,removeMessage:m,updateMessage:g}=ot(),_=f();Cn(a,()=>({upload:async()=>{if(h.current)try{const M=new FormData;M.append("file",h.current),o==null||o(h.current),E(h.current);const T=await fetch(n.url,{method:n.method,headers:n.headers,body:M}),I=await T.json();i==null||i(T),x(h.current),w(I)}catch(M){s==null||s(M),C(h.current)}},clear:()=>{h.current=null,c.current&&(c.current.value=""),r==null||r(null)}}));function w(M){_&&l(_.threadId,Gy(M.attachments))}function E(M){_&&l(_.threadId,Yy({fileName:M.name,status:"uploading",size:M.size}))}function x(M){var I;if(!_)return;const T=(I=f())==null?void 0:I.messages.find(N=>{var A,R;return((R=(A=N.customRendererProps)==null?void 0:A.file)==null?void 0:R.fileName)===M.name});T&&m(_.threadId,T.date)}function C(M){var I,N;if(!_)return;const T=(I=f())==null?void 0:I.messages.find(A=>{var R,D;return((D=(R=A.customRendererProps)==null?void 0:R.file)==null?void 0:D.fileName)===M.name});(N=T==null?void 0:T.customRendererProps)!=null&&N.file&&g(_.threadId,T.date,{...T,customRendererProps:{...T.customRendererProps,file:{...T.customRendererProps.file,status:"error"}}})}return v(Z,{children:[v("button",{className:"text-gray-500 hover:text-blue-500","aria-label":"Upload file",onClick:()=>{var M;return(M=c.current)==null?void 0:M.click()},children:v(Fg,{size:16})}),v("input",{type:"file",accept:t,ref:c,style:{display:"none"},onChange:M=>{var I;const T=(I=M.target.files)==null?void 0:I[0];T&&T.size<=e&&id.includes(T.type)?(h.current=T,r==null||r(T)):(h.current=null,r==null||r(null))}})]})}),Zy=({size:t})=>v("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:v("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"})}),Jy=({onPickEmoji:t})=>v("div",{className:"mb-2 p-2 bg-white max-h-40 overflow-y-auto",children:v("div",{className:"grid grid-cols-8 gap-2",children:Qy.map((e,n)=>v("button",{className:"text-2xl hover:bg-gray-100 rounded",onClick:()=>t(e),children:e},n))})}),Qy=["😀","😃","😄","😁","😆","😅","😂","🤣","😊","😇","🙂","🙃","😉","😌","😍","🥰","😘","😗","😙","😚","😋","😛","😝","😜","🤪","🤨","🧐","🤓","😎","🤩","🥳","😏","😒","😞","😔","😟","😕","🙁","☹️","😣","😖","😫","😩","🥺","😢","😭","😤","😠","😡","🤬","🤯","😳","🥵","🥶","😱","😨","😰","😥","😓","🤗","🤔","🤭","🤫","🤥","😶","😐","😑","😬","🙄","😯","😦","😧","😮","😲","🥱","😴","🤤","😪","😵","🤐","🥴","🤢","🤮","🤧","😷","🤒","🤕"],t1=({imageUrl:t,fileName:e,onDelete:n,width:r,height:i})=>v("div",{className:"relative w-32 h-32 rounded-lg overflow-hidden bg-gray-100 border border-gray-200",children:[v("div",{className:"flex justify-center absolute inset-0",children:v("img",{src:t,alt:"Preview",className:`w-[${r}px] h-[${i}px] max-w-[100px] max-h-[100px] aspect-auto`})}),v("button",{onClick:n,className:"absolute top-1 right-1 bg-gray-600 p-1 rounded-lg text-red-400 hover:text-white transition",children:v(Ru,{size:20})}),v("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})]}),ss=({extension:t,className:e="",iconColorClassName:n="text-gray-300 dark:text-neutral-600"})=>{const r=t==null?void 0:t.slice(0,4).toUpperCase();return v("span",{className:`relative inline-flex shrink-0 items-center justify-center ${e}`,children:[v(Lg,{className:`w-full h-full ${n}`,strokeWidth:1.5}),r&&v("span",{className:"absolute left-1/2 bottom-[22%] -translate-x-1/2 rounded-[3px] bg-blue-600 px-[3px] leading-[11px] text-[7px] font-bold tracking-tight text-white",children:r})]})};function $r(t){const e=t.lastIndexOf(".");return e<=0||e===t.length-1?"":t.slice(e+1).toLowerCase()}function as(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 e1=({fileName:t,size:e,onDelete:n})=>v("div",{className:"relative flex items-center gap-3 w-56 rounded-lg border border-gray-200 bg-gray-50 pl-3 pr-8 py-2",children:[v(ss,{extension:$r(t),className:"w-8 h-9"}),v("div",{className:"min-w-0",children:[v("p",{className:"text-sm font-medium text-gray-800 truncate",children:t}),v("p",{className:"text-xs text-gray-500",children:as(e)})]}),v("button",{onClick:n,"aria-label":"Remove attachment",className:"absolute top-1 right-1 p-1 rounded-lg text-gray-400 hover:text-red-500 transition",children:v(Ru,{size:16})})]}),n1=({className:t})=>v("svg",{className:t,viewBox:"0 0 642 74",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:v("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"})}),r1=t=>{const{inputMessage:e,setInputMessage:n,sendMessage:r,setFiles:i,files:o,showEmojiPicker:s,addEmoji:a,setShowEmojiPicker:c,attachmentPreviews:h,disabled:l=!1}=t,{getConversation:f}=ot(),m=f(),g=Pe.get("discord-widget"),_=F(null),w=(m==null?void 0:m.status)==="closed",E=w||l,x=()=>{},C=A=>{i(o.filter(R=>(A==null?void 0:A.name)!==R.name))},k=A=>{A&&i([...o,A])},M=()=>{var A;(A=_.current)==null||A.upload()},T=()=>{o.length&&M(),r()},I=A=>{A.key==="Enter"&&(A.shiftKey?(A.preventDefault(),n(`${e}
|
|
100
|
+
`)):(A.preventDefault(),T()))};return v("div",{className:`relative ${w?"":"border-t border-t-gray-200"}`,children:[!w&&s&&v(Jy,{onPickEmoji:a}),!w&&(()=>{if(!(o!=null&&o.length))return null;const A=o.map((R,D)=>{if(!h[R.name])return null;const O=()=>{var Y;i(o.filter(ye=>ye.name!==R.name)),(Y=_.current)==null||Y.clear()};if(!R.type.startsWith("image/"))return v(e1,{onDelete:O,fileName:R.name,size:R.size},`attachment-preview-${D}`);const{url:et,width:ht,height:Lt}=h[R.name];return v(t1,{onDelete:O,fileName:R.name,width:ht,height:Lt,imageUrl:et},`attachment-preview-${D}`)});return v("div",{className:"m-2",children:A})})(),!w&&v("div",{className:"flex items-start gap-2 p-2 bg-white dark:bg-neutral-900",children:[v("textarea",{id:"hs-textarea-ex-1",disabled:E,value:e,onChange:A=>n(A.target.value),onKeyDown:I,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:l?"Please introduce yourself first...":"Ask us anything!","data-hs-textarea-auto-height":""}),v("button",{type:"button",disabled:E,onClick:()=>T(),style:{background:E?"#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:v(Zy,{size:16})})]}),v("div",{className:"flex items-center justify-between px-2 py-1.5 bg-white dark:bg-neutral-900",children:[v("div",{className:"flex items-center gap-1",children:!w&&v(Z,{children:[v("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:v(Xy,{ref:_,accept:id.join(","),maxSize:10*1024*1024,uploadConfig:{url:`${Dt.domain}/conversations/uploadAttachment`,method:"POST",headers:{Authorization:`Bearer ${g}`}},onUploadComplete:x,onUploadStart:C,onFileSelect:k})}),v("button",{type:"button",disabled:E,onClick:E?void 0:()=>c(!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:v(Ug,{size:16})})]})}),v("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:[v("span",{children:"Powered by"}),v(n1,{className:"h-[10px] w-auto"})]})]})]})},od=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`},sd="carousel",ad="controller",i1="navigation",o1="no-scroll",cs="portal",s1="root",cd="toolbar",ls="loading",us="error",ds="complete",a1="placeholder",c1=t=>`active-slide-${t}`,ld="flex_center",l1="no_scroll",ud="no_scroll_padding",u1="slide_wrapper",Ne="prev",De="next",dd="swipe",ln="close",hd="onPointerDown",fd="onPointerMove",pd="onPointerUp",md="onPointerLeave",gd="onPointerCancel",yd="onKeyDown",d1="onKeyUp",wd="onWheel",h1="Escape",f1="ArrowLeft",p1="ArrowRight",m1="button",hs="icon",vd="contain",_d="cover",g1="Unknown action type",xd="yarl__";function le(...t){return[...t].filter(Boolean).join(" ")}function q(t){return`${xd}${t}`}function It(t){return`--${xd}${t}`}function Yn(t,e){return`${t}${e?`_${e}`:""}`}function fs(t){return e=>Yn(t,e)}function y1(t,e){var n;return(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e}function bd(...t){return()=>{t.forEach(e=>{e()})}}function Le(t,e,n){return()=>{const r=ut(n);if(!r)throw new Error(`${t} must be used within a ${e}.Provider`);return r}}function Cd(){return typeof window<"u"}function w1(t,e=0){const n=10**e;return Math.round((t+Number.EPSILON)*n)/n}function Ed(t){return t.type===void 0||t.type==="image"}function v1(t,e){return t.imageFit===_d||t.imageFit!==vd&&e===_d}function zr(t){return typeof t=="string"?Number.parseInt(t,10):t}function jr(t){if(typeof t=="number")return{pixel:t};if(typeof t=="string"){const e=zr(t);return t.endsWith("%")?{percent:e}:{pixel:e}}return{pixel:0}}function _1(t,e){const n=jr(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 Sd(t,e){return e>0?(t%e+e)%e:0}function kd(t){return t.length>0}function Td(t,e){return t[Sd(e,t.length)]}function ps(t,e){return kd(t)?Td(t,e):void 0}function x1(t){return Ed(t)?t.src:void 0}function b1(t,e,n=0){return Math.min(t.preload,Math.max(t.finite?e.length-1:Math.floor(e.length/2),n))}const C1=Number(Pa.split(".")[0])>=19;function E1(t){return{inert:C1?t:t?"":void 0}}const ms={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[ln]},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:vd,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 Be(t,e){return{name:t,component:e}}function xt(t,e){return{module:t,children:e}}function Ad(t,e,n){return t.module.name===e?n(t):t.children?[xt(t.module,t.children.flatMap(r=>{var i;return(i=Ad(r,e,n))!==null&&i!==void 0?i:[]}))]:[t]}function un(t,e,n){return t.flatMap(r=>{var i;return(i=Ad(r,e,n))!==null&&i!==void 0?i:[]})}function S1(t,e=[],n=[]){let r=t;const i=g=>{const _=[...r];for(;_.length>0;){const w=_.pop();if((w==null?void 0:w.module.name)===g)return!0;w!=null&&w.children&&_.push(...w.children)}return!1},o=(g,_)=>{if(g===""){r=[xt(_,r)];return}r=un(r,g,w=>[xt(_,[w])])},s=(g,_)=>{r=un(r,g,w=>[xt(w.module,[xt(_,w.children)])])},a=(g,_,w)=>{r=un(r,g,E=>{var x;return[xt(E.module,[...w?[xt(_)]:[],...(x=E.children)!==null&&x!==void 0?x:[],...w?[]:[xt(_)]])]})},c=(g,_,w)=>{r=un(r,g,E=>[...w?[xt(_)]:[],E,...w?[]:[xt(_)]])},h=g=>{s(ad,g)},l=(g,_)=>{r=un(r,g,w=>[xt(_,w.children)])},f=g=>{r=un(r,g,_=>_.children)},m=g=>{n.push(g)};return e.forEach(g=>{g({contains:i,addParent:o,append:s,addChild:a,addSibling:c,addModule:h,replace:l,remove:f,augment:m})}),{config:r,augmentation:g=>n.reduce((_,w)=>w(_),g)}}const Pd=kt(null),gs=Le("useDocument","DocumentContext",Pd);function k1({nodeRef:t,children:e}){const n=vt(()=>{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 B(Pd.Provider,{value:n},e)}const Id=kt(null),Wr=Le("useEvents","EventsContext",Id);function T1({children:t}){const[e]=j({});U(()=>()=>{Object.keys(e).forEach(r=>delete e[r])},[e]);const n=vt(()=>{const r=(s,a)=>{var c;(c=e[s])===null||c===void 0||c.splice(0,e[s].length,...e[s].filter(h=>h!==a))};return{publish:(...[s,a])=>{var c;(c=e[s])===null||c===void 0||c.forEach(h=>h(a))},subscribe:(s,a)=>(e[s]||(e[s]=[]),e[s].push(a),()=>r(s,a)),unsubscribe:r}},[e]);return B(Id.Provider,{value:n},t)}const Md=kt(null),Gn=Le("useLightboxProps","LightboxPropsContext",Md);function A1({children:t,...e}){return B(Md.Provider,{value:e},t)}const Rd=kt(null),Hr=Le("useLightboxState","LightboxStateContext",Rd),Nd=kt(null),P1=Le("useLightboxDispatch","LightboxDispatchContext",Nd);function I1(t,e){switch(e.type){case"swipe":{const{slides:n}=t,r=(e==null?void 0:e.increment)||0,i=t.globalIndex+r,o=Sd(i,n.length),s=ps(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:ps(e.slides,e.index)}:t;default:throw new Error(g1)}}function M1({slides:t,index:e,children:n}){const[r,i]=bn(I1,{slides:t,currentIndex:e,globalIndex:e,currentSlide:ps(t,e)});U(()=>{i({type:"update",slides:t,index:e})},[t,e]);const o=vt(()=>({...r,state:r,dispatch:i}),[r,i]);return B(Nd.Provider,{value:i},B(Rd.Provider,{value:o},n))}const Dd=kt(null),Kr=Le("useTimeouts","TimeoutsContext",Dd);function R1({children:t}){const[e]=j([]);U(()=>()=>{e.forEach(r=>window.clearTimeout(r)),e.splice(0,e.length)},[e]);const n=vt(()=>{const r=s=>{e.splice(0,e.length,...e.filter(a=>a!==s))};return{setTimeout:(s,a)=>{const c=window.setTimeout(()=>{r(c),s()},a);return e.push(c),c},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[e]);return B(Dd.Provider,{value:n},t)}const Ld=he(function({label:e,className:n,icon:r,renderIcon:i,onClick:o,style:s,...a},c){const{styles:h,labels:l}=Gn(),f=y1(l,e);return B("button",{ref:c,type:"button",title:f,"aria-label":f,className:le(q(m1),n),onClick:o,style:{...s,...h.button},...a},i?i():B(r,{className:q(hs),style:h.icon}))});function N1(t,e){const n=r=>B("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 Xn(t,e){return N1(t,B("g",{fill:"currentColor"},B("path",{d:"M0 0h24v24H0z",fill:"none"}),e))}const D1=Xn("Close",B("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"})),L1=Xn("Previous",B("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),B1=Xn("Next",B("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),O1=Xn("Loading",B(Z,null,Array.from({length:8}).map((t,e,n)=>B("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)`})))),F1=Xn("Error",B("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"})),Zn=Cd()?oe:U;function Bd(){const[t,e]=j(!1);return U(()=>{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 V1(t){let e=0,n=0,r=0;const o=window.getComputedStyle(t).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(zr);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 Od(t,e){const n=F(),r=F(),i=Bd();return Zn(()=>{var o,s,a;if(t.current&&n.current!==void 0&&!i){const{keyframes:c,duration:h,easing:l,onfinish:f}=e(n.current,t.current.getBoundingClientRect(),V1(t.current))||{};if(c&&h){(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,c,{duration:h,easing:l})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,f==null||f()})}}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 Fd(){const t=F(null),e=F(),[n,r]=j();return{setContainerRef:Q(o=>{t.current=o,e.current&&(e.current.disconnect(),e.current=void 0);const s=()=>{if(o){const a=window.getComputedStyle(o),c=h=>parseFloat(h)||0;r({width:Math.round(o.clientWidth-c(a.paddingLeft)-c(a.paddingRight)),height:Math.round(o.clientHeight-c(a.paddingTop)-c(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 qr(){const t=F(),{setTimeout:e,clearTimeout:n}=Kr();return Q((r,i)=>{n(t.current),t.current=e(r,i>0?i:0)},[e,n])}function gt(t){const e=F(t);return Zn(()=>{e.current=t}),Q((...n)=>{var r;return(r=e.current)===null||r===void 0?void 0:r.call(e,...n)},[])}function Vd(t,e){typeof t=="function"?t(e):t&&(t.current=e)}function ys(t,e){return vt(()=>t==null&&e==null?null:n=>{Vd(t,n),Vd(e,n)},[t,e])}function U1(t,e=!1){const n=F();Zn(()=>{e&&n.current&&(n.current=!1,t())},[e,t]);const r=Q(()=>{n.current=!0},[]),i=Q(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function ws(){const[t,e]=j(!1);return Zn(()=>{e(window.getComputedStyle(window.document.documentElement).direction==="rtl")},[]),t}function $1(){const[t]=j({}),e=Q((i,o)=>{var s;(s=t[i])===null||s===void 0||s.forEach(a=>{o.isPropagationStopped()||a(o)})},[t]),n=vt(()=>({onPointerDown:i=>e(hd,i),onPointerMove:i=>e(fd,i),onPointerUp:i=>e(pd,i),onPointerLeave:i=>e(md,i),onPointerCancel:i=>e(gd,i),onKeyDown:i=>e(yd,i),onKeyUp:i=>e(d1,i),onWheel:i=>e(wd,i)}),[e]),r=Q((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 Ud(t,e){const n=F(0),r=qr(),i=gt((...o)=>{n.current=Date.now(),t(o)});return Q((...o)=>{r(()=>{i(o)},e-(Date.now()-n.current))},[e,i,r])}const vs=fs("slide"),_s=fs("slide_image");function z1({slide:t,offset:e,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:a,onError:c,style:h}){var l,f,m,g,_,w,E;const[x,C]=j(ls),{publish:k}=Wr(),{setTimeout:M}=Kr(),T=F(null);U(()=>{e===0&&k(c1(x))},[e,x,k]);const I=gt(H=>{("decode"in H?H.decode():Promise.resolve()).catch(()=>{}).then(()=>{H.parentNode&&(C(ds),M(()=>{a==null||a(H)},0))})}),N=Q(H=>{T.current=H,H!=null&&H.complete&&I(H)},[I]),A=Q(H=>{I(H.currentTarget)},[I]),R=gt(()=>{C(us),c==null||c()}),D=v1(t,i),O=(H,Yt)=>Number.isFinite(H)?H:Yt,et=O(Math.max(...((f=(l=t.srcSet)===null||l===void 0?void 0:l.map(H=>H.width))!==null&&f!==void 0?f:[]).concat(t.width?[t.width]:[]).filter(Boolean)),((m=T.current)===null||m===void 0?void 0:m.naturalWidth)||0),ht=O(Math.max(...((_=(g=t.srcSet)===null||g===void 0?void 0:g.map(H=>H.height))!==null&&_!==void 0?_:[]).concat(t.height?[t.height]:[]).filter(Boolean)),((w=T.current)===null||w===void 0?void 0:w.naturalHeight)||0),Lt=et&&ht?{maxWidth:`min(${et}px, 100%)`,maxHeight:`min(${ht}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},Y=(E=t.srcSet)===null||E===void 0?void 0:E.sort((H,Yt)=>H.width-Yt.width).map(H=>`${H.src} ${H.width}w`).join(", "),ye=()=>r&&!D&&t.width&&t.height?r.height/t.height*t.width:Number.MAX_VALUE,K=Y&&r&&Cd()?`${Math.round(Math.min(ye(),r.width))}px`:void 0,{style:wt,className:Bt,...jt}=o||{};return B(Z,null,B("img",{ref:N,onLoad:A,onError:R,onClick:s,draggable:!1,className:le(q(_s()),D&&q(_s("cover")),x!==ds&&q(_s("loading")),Bt),style:{...Lt,...h,...wt},...jt,alt:t.alt,sizes:K,srcSet:Y,src:t.src}),x!==ds&&B("div",{className:q(vs(a1))},x===ls&&(n!=null&&n.iconLoading?n.iconLoading():B(O1,{className:le(q(hs),q(vs(ls)))})),x===us&&(n!=null&&n.iconError?n.iconError():B(F1,{className:le(q(hs),q(vs(us)))}))))}const j1=he(function({className:e,children:n,...r},i){const o=F(null);return B(k1,{nodeRef:o},B("div",{ref:ys(i,o),className:le(q("root"),e),...r},n))});var St;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL",t[t.ANIMATION=3]="ANIMATION"})(St||(St={}));function W1(t,e,n,r,i){U(()=>bd(t(hd,e),t(fd,n),t(pd,r),t(md,r),t(gd,r)),[t,e,n,r,i])}var Kt;(function(t){t[t.NONE=0]="NONE",t[t.SWIPE=1]="SWIPE",t[t.PULL=2]="PULL"})(Kt||(Kt={}));const xs=30;function H1(t,e,n,r,i,o,s,a,c,h,l,f,m,g){const _=F(0),w=F([]),E=F(),x=F(0),C=F(Kt.NONE),k=Q(R=>{E.current===R.pointerId&&(E.current=void 0,C.current=Kt.NONE);const D=w.current;D.splice(0,D.length,...D.filter(O=>O.pointerId!==R.pointerId))},[]),M=Q(R=>{k(R),R.persist(),w.current.push(R)},[k]),T=gt(R=>{M(R)}),I=(R,D)=>h&&R>D||c&&R<-D,N=gt(R=>{if(w.current.find(D=>D.pointerId===R.pointerId)&&E.current===R.pointerId){const D=Date.now()-x.current,O=_.current;C.current===Kt.SWIPE?Math.abs(O)>.3*n||Math.abs(O)>5&&D<r?s(O,D):a(O):C.current===Kt.PULL&&(I(O,2*xs)?m(O,D):g(O)),_.current=0,C.current=Kt.NONE}k(R)}),A=gt(R=>{const D=w.current.find(O=>O.pointerId===R.pointerId);if(D){const O=E.current===R.pointerId;if(R.buttons===0){O&&_.current!==0?N(R):k(D);return}const et=R.clientX-D.clientX,ht=R.clientY-D.clientY;if(E.current===void 0){const Lt=Y=>{M(R),E.current=R.pointerId,x.current=Date.now(),C.current=Y};Math.abs(et)>Math.abs(ht)&&Math.abs(et)>xs&&e(et)?(Lt(Kt.SWIPE),i()):Math.abs(ht)>Math.abs(et)&&I(ht,xs)&&(Lt(Kt.PULL),l())}else O&&(C.current===Kt.SWIPE?(_.current=et,o(et)):C.current===Kt.PULL&&(_.current=ht,f(ht)))}});W1(t,T,A,N)}function K1({preventDefaultWheelX:t,preventDefaultWheelY:e}){const n=F(null),r=gt(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&t||!o&&e||i.ctrlKey)&&i.preventDefault()});return Q(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 q1(t,e,n,r,i,o,s,a,c){const h=F(0),l=F(0),f=F(),m=F(),g=F(0),_=F(),w=F(0),{setTimeout:E,clearTimeout:x}=Kr(),C=Q(()=>{f.current&&(x(f.current),f.current=void 0)},[x]),k=Q(()=>{m.current&&(x(m.current),m.current=void 0)},[x]),M=gt(()=>{t!==St.SWIPE&&(h.current=0,w.current=0,C(),k())});U(M,[t,M]);const T=gt(N=>{m.current=void 0,h.current===N&&c(h.current)}),I=gt(N=>{if(N.ctrlKey||Math.abs(N.deltaY)>Math.abs(N.deltaX))return;const A=R=>{g.current=R,x(_.current),_.current=R>0?E(()=>{g.current=0,_.current=void 0},300):void 0};if(t===St.NONE){if(Math.abs(N.deltaX)<=1.2*Math.abs(g.current)){A(N.deltaX);return}if(!n(-N.deltaX))return;if(l.current+=N.deltaX,C(),Math.abs(l.current)>30)l.current=0,A(0),w.current=Date.now(),o();else{const R=l.current;f.current=E(()=>{f.current=void 0,R===l.current&&(l.current=0)},i)}}else if(t===St.SWIPE){let R=h.current-N.deltaX;if(R=Math.min(Math.abs(R),r)*Math.sign(R),h.current=R,s(R),k(),Math.abs(R)>.2*r){A(N.deltaX),a(R,Date.now()-w.current);return}m.current=E(()=>T(R),2*i)}else A(N.deltaX)});U(()=>e(wd,I),[e,I])}const $d=fs("container"),zd=kt(null),Jn=Le("useController","ControllerContext",zd);function Y1({children:t,...e}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:a,render:c}=e,{closeOnPullUp:h,closeOnPullDown:l,preventDefaultWheelX:f,preventDefaultWheelY:m}=o,[g,_]=j(),w=Hr(),E=P1(),[x,C]=j(St.NONE),k=F(0),M=F(0),T=F(1),{registerSensors:I,subscribeSensors:N}=$1(),{subscribe:A,publish:R}=Wr(),D=qr(),O=qr(),et=qr(),{containerRef:ht,setContainerRef:Lt,containerRect:Y}=Fd(),ye=ys(K1({preventDefaultWheelX:f,preventDefaultWheelY:m}),Lt),K=F(null),wt=ys(K,void 0),{getOwnerDocument:Bt}=gs(),jt=ws(),H=L=>(jt?-1:1)*(typeof L=="number"?L:1),Yt=gt(()=>{var L;return(L=ht.current)===null||L===void 0?void 0:L.focus()}),ri=gt(()=>e),ft=gt(()=>w),_t=Q(L=>R(Ne,L),[R]),Fe=Q(L=>R(De,L),[R]),we=Q(()=>R(ln),[R]),fn=L=>!(r.finite&&(H(L)>0&&w.currentIndex===0||H(L)<0&&w.currentIndex===w.slides.length-1)),nr=L=>{var J;k.current=L,(J=ht.current)===null||J===void 0||J.style.setProperty(It("swipe_offset"),`${Math.round(L)}px`)},pn=L=>{var J,bt;M.current=L,T.current=(()=>{const de=l&&L>0?L:h&&L<0?-L:0;return Math.min(Math.max(w1(1-de/60*(1-.5),2),.5),1)})(),(J=ht.current)===null||J===void 0||J.style.setProperty(It("pull_offset"),`${Math.round(L)}px`),(bt=ht.current)===null||bt===void 0||bt.style.setProperty(It("pull_opacity"),`${T.current}`)},{prepareAnimation:ve}=Od(K,(L,J,bt)=>{if(K.current&&Y)return{keyframes:[{transform:`translate(0, ${L.rect.y-J.y+bt.y}px)`,opacity:L.opacity},{transform:"translate(0, 0)",opacity:1}],duration:L.duration,easing:i.easing.fade}}),mn=(L,J)=>{if(h||l){pn(L);let bt=0;K.current&&(bt=i.fade*(J?2:1),ve({rect:K.current.getBoundingClientRect(),opacity:T.current,duration:bt})),et(()=>{pn(0),C(St.NONE)},bt),C(St.ANIMATION),J||we()}},{prepareAnimation:ii,isAnimationPlaying:Vs}=Od(K,(L,J,bt)=>{var At;if(K.current&&Y&&(!((At=w.animation)===null||At===void 0)&&At.duration)){const st=jr(r.spacing),de=(st.percent?st.percent*Y.width/100:st.pixel)||0;return{keyframes:[{transform:`translate(${H(w.globalIndex-L.index)*(Y.width+de)+L.rect.x-J.x+bt.x}px, 0)`},{transform:"translate(0, 0)"}],duration:w.animation.duration,easing:w.animation.easing}}}),_e=gt(L=>{var J,bt;const At=L.offset||0,st=At?i.swipe:(J=i.navigation)!==null&&J!==void 0?J:i.swipe,de=!At&&!Vs()?i.easing.navigation:i.easing.swipe;let{direction:gn}=L;const Ot=(bt=L.count)!==null&&bt!==void 0?bt:1;let ir=St.ANIMATION,p=st*Ot;if(!gn){const d=Y==null?void 0:Y.width,y=L.duration||0,b=d?st/d*Math.abs(At):st;Ot!==0?(y<b?p=p/b*Math.max(y,b/5):d&&(p=st/d*(d-Math.abs(At))),gn=H(At)>0?Ne:De):p=st/2}let u=0;gn===Ne?fn(H(1))?u=-Ot:(ir=St.NONE,p=st):gn===De&&(fn(H(-1))?u=Ot:(ir=St.NONE,p=st)),p=Math.round(p),O(()=>{nr(0),C(St.NONE)},p),K.current&&ii({rect:K.current.getBoundingClientRect(),index:w.globalIndex}),C(ir),R(dd,{type:"swipe",increment:u,duration:p,easing:de})});U(()=>{var L,J;!((L=w.animation)===null||L===void 0)&&L.increment&&(!((J=w.animation)===null||J===void 0)&&J.duration)&&D(()=>E({type:"swipe",increment:0}),w.animation.duration)},[w.animation,E,D]);const ue=[N,fn,(Y==null?void 0:Y.width)||0,i.swipe,()=>C(St.SWIPE),L=>nr(L),(L,J)=>_e({offset:L,duration:J,count:1}),L=>_e({offset:L,count:0})],Ve=[()=>{l&&C(St.PULL)},L=>pn(L),L=>mn(L),L=>mn(L,!0)];H1(...ue,h,l,...Ve),q1(x,...ue);const oi=gt(()=>{o.focus&&Bt().querySelector(`.${q(cs)} .${q($d())}`)&&Yt()});U(oi,[oi]);const si=gt(()=>{var L;(L=s.view)===null||L===void 0||L.call(s,{index:w.currentIndex})});U(si,[w.globalIndex,si]),U(()=>bd(A(Ne,L=>_e({direction:Ne,...L})),A(De,L=>_e({direction:De,...L})),A(dd,L=>E(L))),[A,_e,E]);const rr=vt(()=>({prev:_t,next:Fe,close:we,focus:Yt,slideRect:Y?_1(Y,r.padding):{width:0,height:0},containerRect:Y||{width:0,height:0},subscribeSensors:N,containerRef:ht,setCarouselRef:wt,toolbarWidth:g,setToolbarWidth:_}),[_t,Fe,we,Yt,N,Y,ht,wt,g,_,r.padding]);return Cn(o.ref,()=>({prev:_t,next:Fe,close:we,focus:Yt,getLightboxProps:ri,getLightboxState:ft}),[_t,Fe,we,Yt,ri,ft]),B("div",{ref:ye,className:le(q($d()),q(ld)),style:{...x===St.SWIPE?{[It("swipe_offset")]:`${Math.round(k.current)}px`}:null,...x===St.PULL?{[It("pull_offset")]:`${Math.round(M.current)}px`,[It("pull_opacity")]:`${T.current}`}:null,...o.touchAction!=="none"?{[It("controller_touch_action")]:o.touchAction}:null,...a.container},...o.aria?{role:"presentation","aria-live":"polite"}:null,tabIndex:-1,...I},Y&&B(zd.Provider,{value:rr},t,(n=c.controls)===null||n===void 0?void 0:n.call(c)))}const G1=Be(ad,Y1);function Oe(t){return Yn(sd,t)}function jd(t){return Yn("slide",t)}function X1({slide:t,offset:e}){const n=F(null),{currentIndex:r}=Hr(),{slideRect:i,close:o,focus:s}=Jn(),{render:a,carousel:{imageFit:c,imageProps:h},on:{click:l},controller:{closeOnBackdropClick:f},styles:{slide:m}}=Gn(),{getOwnerDocument:g}=gs(),_=e!==0;U(()=>{var x;_&&(!((x=n.current)===null||x===void 0)&&x.contains(g().activeElement))&&s()},[_,s,g]);const w=()=>{var x,C,k,M;let T=(x=a.slide)===null||x===void 0?void 0:x.call(a,{slide:t,offset:e,rect:i});return!T&&Ed(t)&&(T=B(z1,{slide:t,offset:e,render:a,rect:i,imageFit:c,imageProps:h,onClick:_?void 0:()=>l==null?void 0:l({index:r})})),T?B(Z,null,(C=a.slideHeader)===null||C===void 0?void 0:C.call(a,{slide:t}),((k=a.slideContainer)!==null&&k!==void 0?k:({children:I})=>I)({slide:t,children:T}),(M=a.slideFooter)===null||M===void 0?void 0:M.call(a,{slide:t})):null},E=x=>{const C=n.current,k=x.target instanceof HTMLElement?x.target:void 0;f&&k&&C&&(k===C||Array.from(C.children).find(M=>M===k)&&k.classList.contains(q(u1)))&&o()};return B("div",{ref:n,className:le(q(jd()),!_&&q(jd("current")),q(ld)),...E1(_),onClick:E,style:m},w())}function Z1(){const t=Gn().styles.slide;return B("div",{className:q("slide"),style:t})}function J1({carousel:t}){const{slides:e,currentIndex:n,globalIndex:r}=Hr(),{setCarouselRef:i}=Jn(),o=jr(t.spacing),s=jr(t.padding),a=b1(t,e,1),c=[];if(kd(e))for(let h=n-a;h<=n+a;h+=1){const l=Td(e,h),f=r-n+h,m=t.finite&&(h<0||h>e.length-1);c.push(m?{key:f}:{key:[`${f}`,x1(l)].filter(Boolean).join("|"),offset:h-n,slide:l})}return B("div",{ref:i,className:le(q(Oe()),c.length>0&&q(Oe("with_slides"))),style:{[`${It(Oe("slides_count"))}`]:c.length,[`${It(Oe("spacing_px"))}`]:o.pixel||0,[`${It(Oe("spacing_percent"))}`]:o.percent||0,[`${It(Oe("padding_px"))}`]:s.pixel||0,[`${It(Oe("padding_percent"))}`]:s.percent||0}},c.map(({key:h,slide:l,offset:f})=>l?B(X1,{key:h,slide:l,offset:f}):B(Z1,{key:h})))}const Q1=Be(sd,J1);function Wd(){const{carousel:t}=Gn(),{slides:e,currentIndex:n}=Hr(),r=e.length===0||t.finite&&n===0,i=e.length===0||t.finite&&n===e.length-1;return{prevDisabled:r,nextDisabled:i}}function tw(t){var e;const n=ws(),{publish:r}=Wr(),{animation:i}=Gn(),{prevDisabled:o,nextDisabled:s}=Wd(),a=((e=i.navigation)!==null&&e!==void 0?e:i.swipe)/2,c=Ud(()=>r(Ne),a),h=Ud(()=>r(De),a),l=gt(f=>{switch(f.key){case h1:r(ln);break;case f1:(n?s:o)||(n?h:c)();break;case p1:(n?o:s)||(n?c:h)();break}});U(()=>t(yd,l),[t,l])}function Hd({label:t,icon:e,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return B(Ld,{label:t,icon:e,renderIcon:n,className:q(`navigation_${r}`),disabled:o,onClick:i,style:s,...U1(Jn().focus,o)})}function ew({render:{buttonPrev:t,buttonNext:e,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:a}=Jn(),{prevDisabled:c,nextDisabled:h}=Wd();return tw(a),B(Z,null,t?t():B(Hd,{label:"Previous",action:Ne,icon:L1,renderIcon:n,style:i.navigationPrev,disabled:c,onClick:o}),e?e():B(Hd,{label:"Next",action:De,icon:B1,renderIcon:r,style:i.navigationNext,disabled:h,onClick:s}))}const nw=Be(i1,ew),Kd=q(l1),rw=q(ud);function iw(t){return"style"in t}function qd(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,`${(zr(o)||0)+e}px`),()=>{s?t.style.setProperty(i,s):t.style.removeProperty(i)}}function ow({noScroll:{disabled:t},children:e}){const n=ws(),{getOwnerDocument:r,getOwnerWindow:i}=gs();return U(()=>{if(t)return()=>{};const o=[],s=i(),{body:a,documentElement:c}=r(),h=Math.round(s.innerWidth-c.clientWidth);if(h>0){o.push(qd(a,h,n));const l=a.getElementsByTagName("*");for(let f=0;f<l.length;f+=1){const m=l[f];iw(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(rw)&&o.push(qd(m,h,n))}}return a.classList.add(Kd),()=>{a.classList.remove(Kd),o.forEach(l=>l())}},[n,t,r,i]),B(Z,null,e)}const sw=Be(o1,ow);function Yd(t){return Yn(cs,t)}function Gd(t,e,n){const r=t.getAttribute(e);return t.setAttribute(e,n),()=>{r?t.setAttribute(e,r):t.removeAttribute(e)}}function aw({children:t,animation:e,styles:n,className:r,on:i,portal:o,close:s}){const[a,c]=j(!1),[h,l]=j(!1),f=F([]),m=F(null),{setTimeout:g}=Kr(),{subscribe:_}=Wr(),E=Bd()?0:e.fade;U(()=>(c(!0),()=>{c(!1),l(!1)}),[]);const x=gt(()=>{f.current.forEach(T=>T()),f.current=[]}),C=gt(()=>{var T;l(!1),x(),(T=i.exiting)===null||T===void 0||T.call(i),g(()=>{var I;(I=i.exited)===null||I===void 0||I.call(i),s()},E)});U(()=>_(ln,C),[_,C]);const k=gt(T=>{var I,N,A;T.scrollTop,l(!0),(I=i.entering)===null||I===void 0||I.call(i);const R=(A=(N=T.parentNode)===null||N===void 0?void 0:N.children)!==null&&A!==void 0?A:[];for(let D=0;D<R.length;D+=1){const O=R[D];["TEMPLATE","SCRIPT","STYLE"].indexOf(O.tagName)===-1&&O!==T&&(f.current.push(Gd(O,"inert","")),f.current.push(Gd(O,"aria-hidden","true")))}f.current.push(()=>{var D,O;(O=(D=m.current)===null||D===void 0?void 0:D.focus)===null||O===void 0||O.call(D)}),g(()=>{var D;(D=i.entered)===null||D===void 0||D.call(i)},E)}),M=Q(T=>{T?k(T):x()},[k,x]);return a?ki(B(j1,{ref:M,className:le(r,q(Yd()),q(ud),h&&q(Yd("open"))),role:"presentation","aria-live":"polite",style:{...e.fade!==ms.animation.fade?{[It("fade_animation_duration")]:`${E}ms`}:null,...e.easing.fade!==ms.animation.easing.fade?{[It("fade_animation_timing_function")]:e.easing.fade}:null,...n.root},onFocus:T=>{m.current||(m.current=T.relatedTarget)}},t),o.root||document.body):null}const cw=Be(cs,aw);function lw({children:t}){return B(Z,null,t)}const uw=Be(s1,lw);function dw(t){return Yn(cd,t)}function hw({toolbar:{buttons:t},render:{buttonClose:e,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=Jn(),{setContainerRef:s,containerRect:a}=Fd();Zn(()=>{o(a==null?void 0:a.width)},[o,a==null?void 0:a.width]);const c=()=>e?e():B(Ld,{key:ln,label:"Close",icon:D1,renderIcon:n,onClick:i});return B("div",{ref:s,style:r.toolbar,className:q(dw())},t==null?void 0:t.map(h=>h===ln?c():h))}const fw=Be(cd,hw);function Xd(t,e){var n;return B(t.module.component,{key:t.module.name,...e},(n=t.children)===null||n===void 0?void 0:n.map(r=>Xd(r,e)))}function pw(t,e={}){const{easing:n,...r}=t,{easing:i,...o}=e;return{easing:{...n,...i},...r,...o}}function mw({carousel:t,animation:e,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:a,slides:c,index:h,...l}){const{animation:f,carousel:m,render:g,toolbar:_,controller:w,noScroll:E,on:x,slides:C,index:k,plugins:M,...T}=ms,{config:I,augmentation:N}=S1([xt(cw,[xt(sw,[xt(G1,[xt(Q1),xt(fw),xt(nw)])])])],a||M),A=N({animation:pw(f,e),carousel:{...m,...t},render:{...g,...n},toolbar:{..._,...r},controller:{...w,...i},noScroll:{...E,...o},on:{...x,...s},...T,...l});return A.open?B(A1,{...A},B(M1,{slides:c||C,index:zr(h||k)},B(R1,null,B(T1,null,Xd(xt(uw,I),A))))):null}const gw=({attachment:t})=>{const e=async n=>{n.preventDefault();try{const r=await fetch(t.url);if(!r.ok)throw new Error("Download failed");const i=await r.blob(),o=URL.createObjectURL(i),s=document.createElement("a");s.href=o,s.download=t.name,document.body.appendChild(s),s.click(),s.remove(),URL.revokeObjectURL(o)}catch{window.open(t.url,"_blank","noopener,noreferrer")}};return v("a",{href:t.url,onClick:e,className:"flex items-center gap-3 max-w-[240px] rounded-lg border border-gray-200 bg-white px-3 py-2 no-underline hover:bg-gray-50 transition-colors cursor-pointer dark:bg-neutral-800 dark:border-neutral-700 dark:hover:bg-neutral-700",children:[v(ss,{extension:$r(t.name),className:"w-8 h-9"}),v("div",{className:"min-w-0",children:[v("p",{className:"text-sm font-medium text-gray-800 dark:text-white truncate",children:t.name}),v("p",{className:"text-xs text-gray-500 dark:text-neutral-400",children:as(t.size)})]})]})},yw=["png","jpg","jpeg","gif","webp"];function Zd(t){return t.contentType?t.contentType.startsWith("image/"):yw.includes($r(t.name))}function Jd(t){var e;return t.contentType?t.contentType==="image/gif":((e=t.name)==null?void 0:e.toLowerCase().endsWith(".gif"))??!1}const Qd=({messageIndexKey:t,attachments:e})=>{const{setFullScreen:n}=ot(),[r,i]=j(!1),o=ut(Ih);function s(){if(o){const l=o.getElementById("deskcord-lightbox-portal");if(l)return l}const h=document.getElementById("deskcord-lightbox-portal");return h||document.body}const a=(e==null?void 0:e.filter(h=>Zd(h)&&!Jd(h)))??[];function c(){return a.length?v(mw,{open:r,portal:{root:s()},close:()=>{i(!1),n(!1)},slides:a.map(h=>({src:h.proxyURL}))}):null}return e!=null&&e.length?v("div",{children:[e.map((h,l)=>{const{proxyURL:f,width:m,height:g}=h;return Zd(h)?Jd(h)?v("div",{children:v("img",{src:f,alt:"GIF",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`):v("div",{onClick:()=>{n(!0),i(!0)},className:"cursor-pointer",children:v("img",{src:f,alt:"Preview",className:`rounded-lg w-[${m}px] h-[${g}px] max-w-[200px] max-h-[200px] aspect-auto`})},`conv-cus-attachment-${t}-${l}`):v("div",{className:"mt-1",children:v(gw,{attachment:h})},`conv-cus-attachment-${t}-${l}`)}),c()]},`conv-cus-attachment-${t}`):null},th=({imageUrls:t,messageIndexKey:e})=>t.length?v("div",{className:"flex flex-col gap-1 mt-1",children:t.map((n,r)=>v("div",{className:"inline-block",children:v("img",{src:n,alt:"Inline image",className:"rounded-lg max-w-[200px] max-h-[200px] object-contain",loading:"lazy"})},`inline-img-${e}-${r}`))}):null,ww=["tenor.com","giphy.com","imgur.com","gfycat.com","media.discordapp.net","cdn.discordapp.com","i.redd.it","i.imgur.com"],vw=[".gif",".jpg",".jpeg",".png",".webp",".apng"];function _w(t){try{const e=new URL(t),n=e.pathname.toLowerCase(),r=e.hostname.toLowerCase();for(const i of vw)if(n.endsWith(i))return!0;for(const i of ww)if(r===i||r.endsWith(`.${i}`))return!0;return!1}catch{return!1}}const xw=/https?:\/\/[^\s<>]+/gi;function eh(t){if(!t)return{text:"",imageUrls:[]};const e=[];let n=t;const r=t.match(xw);if(r)for(const i of r)_w(i)&&(e.push(i),n=n.replace(i,""));return n=n.replace(/\s+/g," ").trim(),{text:n,imageUrls:e}}const bw=({renderTimestamp:t,message:e,indexKey:n})=>{function r(s,a){const c=/<\w?:\w+:\d+>/g,h=s.split(c),l=s.match(c)??[],f=[];for(let m=0;m<h.length;m++)if(f.push(h[m]),l[m]){const g=a[l[m]];g&&f.push(v("img",{src:g.imageURL,alt:"",style:{display:"inline-block",width:"20px",height:"20px"}},m))}return f}const{text:i,imageUrls:o}=eh(e.content??"");return v("li",{className:"flex flex-col items-start max-w-lg gap-x-2 sm:gap-x-4 me-11",children:[i&&v("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??{})}),v(th,{imageUrls:o,messageIndexKey:n}),v("div",{className:"flex flex-1",children:v(Qd,{attachments:e.attachments,messageIndexKey:n})}),t&&v("div",{children:v("span",{className:"mt-1.5 flex items-center gap-x-1 text-xs text-gray-500",children:[e.authorName," · ",od(e.date)," ",e.edited?"(edited)":""]})})]},`conv-cs-${n}`)},Cw=({message:t,indexKey:e})=>{const{text:n,imageUrls:r}=eh(t.content??"");return v("li",{className:`flex flex-col items-end ms-auto my-[3px] ${t.pending?"opacity-80":""}`,children:[n&&v("div",{className:"grow",children:v("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:v("p",{className:"text-left text-sm text-white",children:n})})}),v(th,{imageUrls:r,messageIndexKey:e}),t.attachments&&v("div",{className:"flex flex-1 justify-end",children:v(Qd,{attachments:t.attachments,messageIndexKey:e})},`conv-cus-${e}-attachments`)]},`conv-cus-${e}`)},Ew=({message:t,indexKey:e})=>v("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4 me-11",children:v("div",{className:"bg-white border border-gray-200 rounded-2xl p-4 space-y-3 dark:bg-neutral-900 dark:border-neutral-700",children:v("p",{className:"mb-1.5 text-sm text-gray-800 dark:text-white",children:t.content})})},`conv-system-${e}`),Sw=()=>{const{setEmail:t,setUsername:e,username:n,email:r,token:i}=ot(),[o,s]=j(r),[a,c]=j(n),[h,l]=j(""),[f,m]=j(!1),g=x=>/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(x),_=!!n&&!!r,w=x=>{if(x.preventDefault(),!!a.trim()){if(!g(o)){l("Please enter a valid email address");return}f||(m(!0),l(""),t(o),e(a))}};function E(){return v("form",{onSubmit:w,className:"w-full space-y-4",children:[v("div",{className:"mb-4",children:[v("h3",{className:"text-base font-semibold text-gray-900 mb-1",children:"Let's get started"}),v("p",{className:"text-sm text-gray-600",children:"Tell us a bit about yourself so we can assist you better."})]}),v("div",{children:[v("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-2",children:"Your name"}),v("div",{className:"relative",children:[v("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:v($g,{size:18,className:"text-gray-400"})}),v("input",{type:"text",id:"name",value:a,onChange:x=>c(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:_,required:!0})]})]}),v("div",{children:[v("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-2",children:"Email address"}),v("div",{className:"relative",children:[v("div",{className:"absolute inset-y-0 start-0 flex items-center pointer-events-none z-20 ps-3.5",children:v(Bg,{size:18,className:"text-gray-400"})}),v("input",{type:"email",id:"email",value:o,onChange:x=>{s(x.target.value),h&&l("")},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 ${h?"border-red-500 focus:ring-red-500":"border-gray-300 focus:ring-[#7289DA]"}`,placeholder:"you@example.com",disabled:_,required:!0})]}),h&&v("p",{className:"text-red-600 text-sm mt-2 flex items-center gap-1",children:[v("span",{className:"inline-block w-1 h-1 bg-red-600 rounded-full"}),h]})]}),v("p",{className:"text-xs text-gray-500 text-center",children:"We'll never share your information"}),!n||!r?v("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:f,children:"Start Chatting"}):null]})}return v(Z,{children:[v("li",{className:`max-w-lg flex gap-x-2 sm:gap-x-4 me-11 ${i?"opacity-75":""}`,children:v("div",{className:"w-full rounded-xl p-5 bg-white shadow-lg border border-gray-100 overflow-hidden",children:E()})}),n&&r&&v("li",{className:"flex ms-auto my-4 animate-slide-in",style:{marginTop:"1rem"},children:v("div",{className:"grow",children:v("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:[v(Dg,{size:16,className:"text-white flex-shrink-0"}),v("p",{className:"text-sm text-white font-medium",children:["Nice to meet you, ",v("span",{className:"font-semibold",children:n}),"! Feel free to ask us anything."]})]})})})]})};function kw(t,e){const n=F();U(()=>{n.current=t},[t]),U(()=>{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])}const Tw=({indexKey:t,message:e})=>{const n=e.customRendererProps.file,r=n.status==="error",[i,o]=j(!0),[s,a]=j(0);return kw(()=>{s<88?a(s+2.5):o(!1)},i&&!r?250:null),v("li",{className:"max-w-lg flex gap-x-2 sm:gap-x-4",style:{marginTop:"20px",marginBottom:"20px"},children:v("div",{className:"w-full bg-white border border-gray-200 rounded-2xl p-4 space-y-4",children:v("div",{children:[v("div",{className:"mb-2 flex justify-between items-center",children:[v("div",{className:"flex items-center gap-x-3",children:[v(ss,{extension:$r(n.fileName),className:"size-9",iconColorClassName:r?"text-red-300":void 0}),v("div",{children:[v("p",{className:`text-sm ${r?"font-semibold text-red-500":"font-medium text-gray-800"}`,children:n.fileName}),v("p",{className:"text-xs text-gray-500 dark:text-neutral-500",children:as(n.size)})]})]}),r&&v("div",{className:"inline-flex items-center gap-x-2",children:v("span",{className:"relative",children:[v("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:v("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"})}),v("span",{className:"sr-only",children:"Danger"})]})})]}),v("div",{className:"flex items-center gap-x-3 whitespace-nowrap",children:[v("div",{className:"flex w-full h-2 bg-gray-200 rounded-full overflow-hidden dark:bg-neutral-700",role:"progressbar",children:v("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}%`}})}),v("div",{className:"w-6 text-end",children:v("span",{className:"text-sm text-gray-800 dark:text-white",children:[Math.round(s),"%"]})})]})]})})},`conv-fileupload-${t}`)},Aw=({conversation:t,open:e})=>{const n=F(!1),{isChatOpen:r}=ot();U(()=>{r?n.current=!0:n.current=!1},[r]);function i(c,h){const l=`${c.date}-${h}`;let f;if(typeof c.customRenderer<"u")switch(c.customRenderer){case cn.IntroduceYourself:f=v(Sw,{});break;case cn.UploadFile:f=v(Tw,{message:c,indexKey:l});break;default:f=a(c,l)}else c.authorName===qn?f=a(c,l):c.support?f=o(c,l):f=s(c,l);return r&&(c.pending??(c.support&&n.current))?v(ce.li,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:f},l):v("li",{children:f},l)}function o(c,h){var g;const l=(g=t==null?void 0:t.messages)==null?void 0:g.filter(_=>_.support),f=l==null?void 0:l[l.length-1],m=c.date===(f==null?void 0:f.date);return v(bw,{renderTimestamp:m,message:c,indexKey:h})}function s(c,h){return v(Cw,{message:c,indexKey:h})}function a(c,h){return v(Ew,{message:c,indexKey:h})}return v("ul",{className:"space-y-[3px]",children:[[...(t==null?void 0:t.messages)??[]].sort((c,h)=>c.date-h.date).map(i),t&&!e&&i(Hy,1)]})},Pw=()=>{const{getConversation:t,addMessage:e,tempConversationToThread:n,username:r,email:i,updateMessage:o,isChatOpen:s}=ot(),a=!!(r&&i),c=F(!1);U(()=>{s&&!c.current&&(c.current=!0),s||(c.current=!1)},[s]);const[h,l]=j(!1),[f,m]=j([]),[g,_]=j({}),w=t(),E=(w==null?void 0:w.status)==="open",[x,C]=j("");U(()=>{const I={};f.forEach(N=>{if(!N.type.startsWith("image/")){I[N.name]={url:"",width:0,height:0,size:N.size},_({...I});return}const A=new FileReader;A.addEventListener("load",function(){const R=new Image;R.onload=()=>{I[N.name]={url:A.result,width:R.width,height:R.height,size:N.size},_({...I})},R.src=A.result},!1),A.readAsDataURL(N)})},[f]);const k=I=>{C(N=>N+I)},M=async()=>{const I=Date.now(),N={support:!1,content:x,date:I,authorName:r,pending:!0};if(x.trim()!==""){C(""),e(w?w.threadId:"TEMP",N);const A=await Wy({content:x});A&&((!w||w.threadId==="TEMP")&&n(A.threadId),o(A.threadId,I,{...N,pending:!1,date:A.date}))}},T=s&&!c.current;return v(Z,{children:[v("div",{className:"flex-1 overflow-y-auto overflow-x-hidden p-4 flex flex-col-reverse space-y-4 space-y-reverse",children:v(ce.div,{initial:T?{opacity:0,x:20}:!1,animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:v(Aw,{conversation:w,open:E})})}),v(r1,{attachmentPreviews:g,files:f,setFiles:m,inputMessage:x,setInputMessage:C,showEmojiPicker:h,setShowEmojiPicker:l,addEmoji:k,sendMessage:M,disabled:!a})]})};function nh(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 Iw(t){switch(t){case"online":return"Online";case"idle":case"offline":case"invisible":return"Away";case"dnd":return"Unavailable";default:return"Away"}}const Qt=Object.create(null);Qt.open="0",Qt.close="1",Qt.ping="2",Qt.pong="3",Qt.message="4",Qt.upgrade="5",Qt.noop="6";const Yr=Object.create(null);Object.keys(Qt).forEach(t=>{Yr[Qt[t]]=t});const bs={type:"error",data:"parser error"},rh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ih=typeof ArrayBuffer=="function",oh=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Cs=({type:t,data:e},n,r)=>rh&&e instanceof Blob?n?r(e):sh(e,r):ih&&(e instanceof ArrayBuffer||oh(e))?n?r(e):sh(new Blob([e]),r):r(Qt[t]+(e||"")),sh=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function ah(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Es;function Mw(t,e){if(rh&&t.data instanceof Blob)return t.data.arrayBuffer().then(ah).then(e);if(ih&&(t.data instanceof ArrayBuffer||oh(t.data)))return e(ah(t.data));Cs(t,!1,n=>{Es||(Es=new TextEncoder),e(Es.encode(n))})}const ch="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qn=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<ch.length;t++)Qn[ch.charCodeAt(t)]=t;const Rw=t=>{let e=t.length*.75,n=t.length,r,i=0,o,s,a,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const h=new ArrayBuffer(e),l=new Uint8Array(h);for(r=0;r<n;r+=4)o=Qn[t.charCodeAt(r)],s=Qn[t.charCodeAt(r+1)],a=Qn[t.charCodeAt(r+2)],c=Qn[t.charCodeAt(r+3)],l[i++]=o<<2|s>>4,l[i++]=(s&15)<<4|a>>2,l[i++]=(a&3)<<6|c&63;return h},Nw=typeof ArrayBuffer=="function",Ss=(t,e)=>{if(typeof t!="string")return{type:"message",data:lh(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:Dw(t.substring(1),e)}:Yr[n]?t.length>1?{type:Yr[n],data:t.substring(1)}:{type:Yr[n]}:bs},Dw=(t,e)=>{if(Nw){const n=Rw(t);return lh(n,e)}else return{base64:!0,data:t}},lh=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},uh="",Lw=(t,e)=>{const n=t.length,r=new Array(n);let i=0;t.forEach((o,s)=>{Cs(o,!1,a=>{r[s]=a,++i===n&&e(r.join(uh))})})},Bw=(t,e)=>{const n=t.split(uh),r=[];for(let i=0;i<n.length;i++){const o=Ss(n[i],e);if(r.push(o),o.type==="error")break}return r};function Ow(){return new TransformStream({transform(t,e){Mw(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 ks;function Gr(t){return t.reduce((e,n)=>e+n.length,0)}function Xr(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 Fw(t,e){ks||(ks=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(Gr(n)<1)break;const c=Xr(n,1);o=(c[0]&128)===128,i=c[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Gr(n)<2)break;const c=Xr(n,2);i=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(Gr(n)<8)break;const c=Xr(n,8),h=new DataView(c.buffer,c.byteOffset,c.length),l=h.getUint32(0);if(l>Math.pow(2,21)-1){a.enqueue(bs);break}i=l*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Gr(n)<i)break;const c=Xr(n,i);a.enqueue(Ss(o?c:ks.decode(c),e)),r=0}if(i===0||i>t){a.enqueue(bs);break}}}})}const dh=4;function yt(t){if(t)return Vw(t)}function Vw(t){for(var e in yt.prototype)t[e]=yt.prototype[e];return t}yt.prototype.on=yt.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},yt.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},yt.prototype.off=yt.prototype.removeListener=yt.prototype.removeAllListeners=yt.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},yt.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},yt.prototype.emitReserved=yt.prototype.emit,yt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},yt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const $t=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function hh(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const Uw=$t.setTimeout,$w=$t.clearTimeout;function Zr(t,e){e.useNativeTimers?(t.setTimeoutFn=Uw.bind($t),t.clearTimeoutFn=$w.bind($t)):(t.setTimeoutFn=$t.setTimeout.bind($t),t.clearTimeoutFn=$t.clearTimeout.bind($t))}const zw=1.33;function jw(t){return typeof t=="string"?Ww(t):Math.ceil((t.byteLength||t.size)*zw)}function Ww(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 Hw(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function Kw(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 qw extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class Ts extends yt{constructor(e){super(),this.writable=!1,Zr(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new qw(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=Ss(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=Hw(e);return n.length?"?"+n:""}}const fh="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),As=64,Yw={};let ph=0,Jr=0,mh;function gh(t){let e="";do e=fh[t%As]+e,t=Math.floor(t/As);while(t>0);return e}function yh(){const t=gh(+new Date);return t!==mh?(ph=0,mh=t):t+"."+gh(ph++)}for(;Jr<As;Jr++)Yw[fh[Jr]]=Jr;let wh=!1;try{wh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Gw=wh;function vh(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Gw))return new XMLHttpRequest}catch{}if(!e)try{return new $t[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function h_(){}function Xw(){}const Zw=function(){return new vh({xdomain:!1}).responseType!=null}();class Jw extends Ts{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=Zw&&!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)};Bw(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,Lw(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]=yh()),!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 te(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 te extends yt{constructor(e,n){super(),Zr(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=hh(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this.opts.xd;const r=this.xhr=new vh(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=te.requestsCount++,te.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=Xw,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete te.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(te.requestsCount=0,te.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",_h);else if(typeof addEventListener=="function"){const t="onpagehide"in $t?"pagehide":"unload";addEventListener(t,_h,!1)}}function _h(){for(let t in te.requests)te.requests.hasOwnProperty(t)&&te.requests[t].abort()}var Qw={},Qr={};Qr.byteLength=nv,Qr.toByteArray=iv,Qr.fromByteArray=av;for(var ee=[],zt=[],tv=typeof Uint8Array<"u"?Uint8Array:Array,Ps="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",dn=0,ev=Ps.length;dn<ev;++dn)ee[dn]=Ps[dn],zt[Ps.charCodeAt(dn)]=dn;zt[45]=62,zt[95]=63;function xh(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 nv(t){var e=xh(t),n=e[0],r=e[1];return(n+r)*3/4-r}function rv(t,e,n){return(e+n)*3/4-n}function iv(t){var e,n=xh(t),r=n[0],i=n[1],o=new tv(rv(t,r,i)),s=0,a=i>0?r-4:r,c;for(c=0;c<a;c+=4)e=zt[t.charCodeAt(c)]<<18|zt[t.charCodeAt(c+1)]<<12|zt[t.charCodeAt(c+2)]<<6|zt[t.charCodeAt(c+3)],o[s++]=e>>16&255,o[s++]=e>>8&255,o[s++]=e&255;return i===2&&(e=zt[t.charCodeAt(c)]<<2|zt[t.charCodeAt(c+1)]>>4,o[s++]=e&255),i===1&&(e=zt[t.charCodeAt(c)]<<10|zt[t.charCodeAt(c+1)]<<4|zt[t.charCodeAt(c+2)]>>2,o[s++]=e>>8&255,o[s++]=e&255),o}function ov(t){return ee[t>>18&63]+ee[t>>12&63]+ee[t>>6&63]+ee[t&63]}function sv(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(ov(r));return i.join("")}function av(t){for(var e,n=t.length,r=n%3,i=[],o=16383,s=0,a=n-r;s<a;s+=o)i.push(sv(t,s,s+o>a?a:s+o));return r===1?(e=t[n-1],i.push(ee[e>>2]+ee[e<<4&63]+"==")):r===2&&(e=(t[n-2]<<8)+t[n-1],i.push(ee[e>>10]+ee[e>>4&63]+ee[e<<2&63]+"=")),i.join("")}var Is={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Is.read=function(t,e,n,r,i){var o,s,a=i*8-r-1,c=(1<<a)-1,h=c>>1,l=-7,f=n?i-1:0,m=n?-1:1,g=t[e+f];for(f+=m,o=g&(1<<-l)-1,g>>=-l,l+=a;l>0;o=o*256+t[e+f],f+=m,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=s*256+t[e+f],f+=m,l-=8);if(o===0)o=1-h;else{if(o===c)return s?NaN:(g?-1:1)*(1/0);s=s+Math.pow(2,r),o=o-h}return(g?-1:1)*s*Math.pow(2,o-r)},Is.write=function(t,e,n,r,i,o){var s,a,c,h=o*8-i-1,l=(1<<h)-1,f=l>>1,m=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=r?0:o-1,_=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=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),s+f>=1?e+=m/c:e+=m*Math.pow(2,1-f),e*c>=2&&(s++,c/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*c-1)*Math.pow(2,i),s=s+f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+g]=a&255,g+=_,a/=256,i-=8);for(s=s<<i|a,h+=i;h>0;t[n+g]=s&255,g+=_,s/=256,h-=8);t[n+g-_]|=w*128};/*!
|
|
101
101
|
* The buffer module from node.js, for the browser.
|
|
102
102
|
*
|
|
103
103
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
104
104
|
* @license MIT
|
|
105
|
-
*/(function(t){const e=Jr,n=Ts,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=T,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;l.TYPED_ARRAY_SUPPORT=c(),!l.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 c(){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(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function h(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const u=new o(p);return Object.setPrototypeOf(u,l.prototype),u}function l(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 v(p)}return f(p,u,d)}l.poolSize=8192;function f(p,u,d){if(typeof p=="string")return w(p,u);if(s.isView(p))return _(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(st(p,s)||p&&st(p.buffer,s)||typeof a<"u"&&(st(p,a)||p&&st(p.buffer,a)))return C(p,u,d);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return l.from(y,u,d);const b=k(p);if(b)return b;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return l.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)}l.from=function(p,u,d){return f(p,u,d)},Object.setPrototypeOf(l.prototype,o.prototype),Object.setPrototypeOf(l,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 g(p,u,d){return m(p),p<=0?h(p):u!==void 0?typeof d=="string"?h(p).fill(u,d):h(p).fill(u):h(p)}l.alloc=function(p,u,d){return g(p,u,d)};function v(p){return m(p),h(p<0?0:I(p)|0)}l.allocUnsafe=function(p){return v(p)},l.allocUnsafeSlow=function(p){return v(p)};function w(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!l.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const d=M(p,u)|0;let y=h(d);const b=y.write(p,u);return b!==d&&(y=y.slice(0,b)),y}function E(p){const u=p.length<0?0:I(p.length)|0,d=h(u);for(let y=0;y<u;y+=1)d[y]=p[y]&255;return d}function _(p){if(st(p,o)){const u=new o(p);return C(u.buffer,u.byteOffset,u.byteLength)}return E(p)}function C(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 y;return u===void 0&&d===void 0?y=new o(p):d===void 0?y=new o(p,u):y=new o(p,u,d),Object.setPrototypeOf(y,l.prototype),y}function k(p){if(l.isBuffer(p)){const u=I(p.length)|0,d=h(u);return d.length===0||p.copy(d,0,0,u),d}if(p.length!==void 0)return typeof p.length!="number"||de(p.length)?h(0):E(p);if(p.type==="Buffer"&&Array.isArray(p.data))return E(p.data)}function I(p){if(p>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return p|0}function T(p){return+p!=p&&(p=0),l.alloc(+p)}l.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==l.prototype},l.compare=function(u,d){if(st(u,o)&&(u=l.from(u,u.offset,u.byteLength)),st(d,o)&&(d=l.from(d,d.offset,d.byteLength)),!l.isBuffer(u)||!l.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===d)return 0;let y=u.length,b=d.length;for(let S=0,P=Math.min(y,b);S<P;++S)if(u[S]!==d[S]){y=u[S],b=d[S];break}return y<b?-1:b<y?1:0},l.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}},l.concat=function(u,d){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return l.alloc(0);let y;if(d===void 0)for(d=0,y=0;y<u.length;++y)d+=u[y].length;const b=l.allocUnsafe(d);let S=0;for(y=0;y<u.length;++y){let P=u[y];if(st(P,o))S+P.length>b.length?(l.isBuffer(P)||(P=l.from(P)),P.copy(b,S)):o.prototype.set.call(b,P,S);else if(l.isBuffer(P))P.copy(b,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=P.length}return b};function M(p,u){if(l.isBuffer(p))return p.length;if(s.isView(p)||st(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,y=arguments.length>2&&arguments[2]===!0;if(!y&&d===0)return 0;let b=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return rr(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return bt(p).length;default:if(b)return y?-1:rr(p).length;u=(""+u).toLowerCase(),b=!0}}l.byteLength=M;function N(p,u,d){let y=!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 Yt(this,u,d);case"utf8":case"utf-8":return K(this,u,d);case"ascii":return jt(this,u,d);case"latin1":case"binary":return W(this,u,d);case"base64":return hn(this,u,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ni(this,u,d);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}l.prototype._isBuffer=!0;function A(p,u,d){const y=p[u];p[u]=p[d],p[d]=y}l.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)A(this,d,d+1);return this},l.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)A(this,d,d+3),A(this,d+1,d+2);return this},l.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)A(this,d,d+7),A(this,d+1,d+6),A(this,d+2,d+5),A(this,d+3,d+4);return this},l.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?K(this,0,u):N.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(u){if(!l.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:l.compare(this,u)===0},l.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&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(u,d,y,b,S){if(st(u,o)&&(u=l.from(u,u.offset,u.byteLength)),!l.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),y===void 0&&(y=u?u.length:0),b===void 0&&(b=0),S===void 0&&(S=this.length),d<0||y>u.length||b<0||S>this.length)throw new RangeError("out of range index");if(b>=S&&d>=y)return 0;if(b>=S)return-1;if(d>=y)return 1;if(d>>>=0,y>>>=0,b>>>=0,S>>>=0,this===u)return 0;let P=S-b,z=y-d;const ct=Math.min(P,z),nt=this.slice(b,S),lt=u.slice(d,y);for(let X=0;X<ct;++X)if(nt[X]!==lt[X]){P=nt[X],z=lt[X];break}return P<z?-1:z<P?1:0};function R(p,u,d,y,b){if(p.length===0)return-1;if(typeof d=="string"?(y=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,de(d)&&(d=b?0:p.length-1),d<0&&(d=p.length+d),d>=p.length){if(b)return-1;d=p.length-1}else if(d<0)if(b)d=0;else return-1;if(typeof u=="string"&&(u=l.from(u,y)),l.isBuffer(u))return u.length===0?-1:L(p,u,d,y,b);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?b?o.prototype.indexOf.call(p,u,d):o.prototype.lastIndexOf.call(p,u,d):L(p,[u],d,y,b);throw new TypeError("val must be string, number or Buffer")}function L(p,u,d,y,b){let S=1,P=p.length,z=u.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||u.length<2)return-1;S=2,P/=2,z/=2,d/=2}function ct(lt,X){return S===1?lt[X]:lt.readUInt16BE(X*S)}let nt;if(b){let lt=-1;for(nt=d;nt<P;nt++)if(ct(p,nt)===ct(u,lt===-1?0:nt-lt)){if(lt===-1&&(lt=nt),nt-lt+1===z)return lt*S}else lt!==-1&&(nt-=nt-lt),lt=-1}else for(d+z>P&&(d=P-z),nt=d;nt>=0;nt--){let lt=!0;for(let X=0;X<z;X++)if(ct(p,nt+X)!==ct(u,X)){lt=!1;break}if(lt)return nt}return-1}l.prototype.includes=function(u,d,y){return this.indexOf(u,d,y)!==-1},l.prototype.indexOf=function(u,d,y){return R(this,u,d,y,!0)},l.prototype.lastIndexOf=function(u,d,y){return R(this,u,d,y,!1)};function O(p,u,d,y){d=Number(d)||0;const b=p.length-d;y?(y=Number(y),y>b&&(y=b)):y=b;const S=u.length;y>S/2&&(y=S/2);let P;for(P=0;P<y;++P){const z=parseInt(u.substr(P*2,2),16);if(de(z))return P;p[d+P]=z}return P}function et(p,u,d,y){return At(rr(u,p.length-d),p,d,y)}function ht(p,u,d,y){return At(D(u),p,d,y)}function Mt(p,u,d,y){return At(bt(u),p,d,y)}function G(p,u,d,y){return At(J(u,p.length-d),p,d,y)}l.prototype.write=function(u,d,y,b){if(d===void 0)b="utf8",y=this.length,d=0;else if(y===void 0&&typeof d=="string")b=d,y=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(y)?(y=y>>>0,b===void 0&&(b="utf8")):(b=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const S=this.length-d;if((y===void 0||y>S)&&(y=S),u.length>0&&(y<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");b||(b="utf8");let P=!1;for(;;)switch(b){case"hex":return O(this,u,d,y);case"utf8":case"utf-8":return et(this,u,d,y);case"ascii":case"latin1":case"binary":return ht(this,u,d,y);case"base64":return Mt(this,u,d,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,u,d,y);default:if(P)throw new TypeError("Unknown encoding: "+b);b=(""+b).toLowerCase(),P=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function hn(p,u,d){return u===0&&d===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(u,d))}function K(p,u,d){d=Math.min(p.length,d);const y=[];let b=u;for(;b<d;){const S=p[b];let P=null,z=S>239?4:S>223?3:S>191?2:1;if(b+z<=d){let ct,nt,lt,X;switch(z){case 1:S<128&&(P=S);break;case 2:ct=p[b+1],(ct&192)===128&&(X=(S&31)<<6|ct&63,X>127&&(P=X));break;case 3:ct=p[b+1],nt=p[b+2],(ct&192)===128&&(nt&192)===128&&(X=(S&15)<<12|(ct&63)<<6|nt&63,X>2047&&(X<55296||X>57343)&&(P=X));break;case 4:ct=p[b+1],nt=p[b+2],lt=p[b+3],(ct&192)===128&&(nt&192)===128&&(lt&192)===128&&(X=(S&15)<<18|(ct&63)<<12|(nt&63)<<6|lt&63,X>65535&&X<1114112&&(P=X))}}P===null?(P=65533,z=1):P>65535&&(P-=65536,y.push(P>>>10&1023|55296),P=56320|P&1023),y.push(P),b+=z}return Bt(y)}const wt=4096;function Bt(p){const u=p.length;if(u<=wt)return String.fromCharCode.apply(String,p);let d="",y=0;for(;y<u;)d+=String.fromCharCode.apply(String,p.slice(y,y+=wt));return d}function jt(p,u,d){let y="";d=Math.min(p.length,d);for(let b=u;b<d;++b)y+=String.fromCharCode(p[b]&127);return y}function W(p,u,d){let y="";d=Math.min(p.length,d);for(let b=u;b<d;++b)y+=String.fromCharCode(p[b]);return y}function Yt(p,u,d){const y=p.length;(!u||u<0)&&(u=0),(!d||d<0||d>y)&&(d=y);let b="";for(let S=u;S<d;++S)b+=gn[p[S]];return b}function ni(p,u,d){const y=p.slice(u,d);let b="";for(let S=0;S<y.length-1;S+=2)b+=String.fromCharCode(y[S]+y[S+1]*256);return b}l.prototype.slice=function(u,d){const y=this.length;u=~~u,d=d===void 0?y:~~d,u<0?(u+=y,u<0&&(u=0)):u>y&&(u=y),d<0?(d+=y,d<0&&(d=0)):d>y&&(d=y),d<u&&(d=u);const b=this.subarray(u,d);return Object.setPrototypeOf(b,l.prototype),b};function ft(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")}l.prototype.readUintLE=l.prototype.readUIntLE=function(u,d,y){u=u>>>0,d=d>>>0,y||ft(u,d,this.length);let b=this[u],S=1,P=0;for(;++P<d&&(S*=256);)b+=this[u+P]*S;return b},l.prototype.readUintBE=l.prototype.readUIntBE=function(u,d,y){u=u>>>0,d=d>>>0,y||ft(u,d,this.length);let b=this[u+--d],S=1;for(;d>0&&(S*=256);)b+=this[u+--d]*S;return b},l.prototype.readUint8=l.prototype.readUInt8=function(u,d){return u=u>>>0,d||ft(u,1,this.length),this[u]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(u,d){return u=u>>>0,d||ft(u,2,this.length),this[u]|this[u+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(u,d){return u=u>>>0,d||ft(u,2,this.length),this[u]<<8|this[u+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},l.prototype.readBigUInt64LE=Ot(function(u){u=u>>>0,ue(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Fe(u,this.length-8);const b=d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,S=this[++u]+this[++u]*2**8+this[++u]*2**16+y*2**24;return BigInt(b)+(BigInt(S)<<BigInt(32))}),l.prototype.readBigUInt64BE=Ot(function(u){u=u>>>0,ue(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Fe(u,this.length-8);const b=d*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],S=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+y;return(BigInt(b)<<BigInt(32))+BigInt(S)}),l.prototype.readIntLE=function(u,d,y){u=u>>>0,d=d>>>0,y||ft(u,d,this.length);let b=this[u],S=1,P=0;for(;++P<d&&(S*=256);)b+=this[u+P]*S;return S*=128,b>=S&&(b-=Math.pow(2,8*d)),b},l.prototype.readIntBE=function(u,d,y){u=u>>>0,d=d>>>0,y||ft(u,d,this.length);let b=d,S=1,P=this[u+--b];for(;b>0&&(S*=256);)P+=this[u+--b]*S;return S*=128,P>=S&&(P-=Math.pow(2,8*d)),P},l.prototype.readInt8=function(u,d){return u=u>>>0,d||ft(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},l.prototype.readInt16LE=function(u,d){u=u>>>0,d||ft(u,2,this.length);const y=this[u]|this[u+1]<<8;return y&32768?y|4294901760:y},l.prototype.readInt16BE=function(u,d){u=u>>>0,d||ft(u,2,this.length);const y=this[u+1]|this[u]<<8;return y&32768?y|4294901760:y},l.prototype.readInt32LE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},l.prototype.readInt32BE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},l.prototype.readBigInt64LE=Ot(function(u){u=u>>>0,ue(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Fe(u,this.length-8);const b=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(y<<24);return(BigInt(b)<<BigInt(32))+BigInt(d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),l.prototype.readBigInt64BE=Ot(function(u){u=u>>>0,ue(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Fe(u,this.length-8);const b=(d<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(b)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+y)}),l.prototype.readFloatLE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),n.read(this,u,!0,23,4)},l.prototype.readFloatBE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),n.read(this,u,!1,23,4)},l.prototype.readDoubleLE=function(u,d){return u=u>>>0,d||ft(u,8,this.length),n.read(this,u,!0,52,8)},l.prototype.readDoubleBE=function(u,d){return u=u>>>0,d||ft(u,8,this.length),n.read(this,u,!1,52,8)};function _t(p,u,d,y,b,S){if(!l.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>b||u<S)throw new RangeError('"value" argument is out of bounds');if(d+y>p.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(u,d,y,b){if(u=+u,d=d>>>0,y=y>>>0,!b){const z=Math.pow(2,8*y)-1;_t(this,u,d,y,z,0)}let S=1,P=0;for(this[d]=u&255;++P<y&&(S*=256);)this[d+P]=u/S&255;return d+y},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(u,d,y,b){if(u=+u,d=d>>>0,y=y>>>0,!b){const z=Math.pow(2,8*y)-1;_t(this,u,d,y,z,0)}let S=y-1,P=1;for(this[d+S]=u&255;--S>=0&&(P*=256);)this[d+S]=u/P&255;return d+y},l.prototype.writeUint8=l.prototype.writeUInt8=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,1,255,0),this[d]=u&255,d+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,2,65535,0),this[d]=u&255,this[d+1]=u>>>8,d+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,2,65535,0),this[d]=u>>>8,this[d+1]=u&255,d+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(u,d,y){return u=+u,d=d>>>0,y||_t(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},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(u,d,y){return u=+u,d=d>>>0,y||_t(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 Oe(p,u,d,y,b){ve(u,y,b,p,d,7);let S=Number(u&BigInt(4294967295));p[d++]=S,S=S>>8,p[d++]=S,S=S>>8,p[d++]=S,S=S>>8,p[d++]=S;let P=Number(u>>BigInt(32)&BigInt(4294967295));return p[d++]=P,P=P>>8,p[d++]=P,P=P>>8,p[d++]=P,P=P>>8,p[d++]=P,d}function ye(p,u,d,y,b){ve(u,y,b,p,d,7);let S=Number(u&BigInt(4294967295));p[d+7]=S,S=S>>8,p[d+6]=S,S=S>>8,p[d+5]=S,S=S>>8,p[d+4]=S;let P=Number(u>>BigInt(32)&BigInt(4294967295));return p[d+3]=P,P=P>>8,p[d+2]=P,P=P>>8,p[d+1]=P,P=P>>8,p[d]=P,d+8}l.prototype.writeBigUInt64LE=Ot(function(u,d=0){return Oe(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Ot(function(u,d=0){return ye(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(u,d,y,b){if(u=+u,d=d>>>0,!b){const ct=Math.pow(2,8*y-1);_t(this,u,d,y,ct-1,-ct)}let S=0,P=1,z=0;for(this[d]=u&255;++S<y&&(P*=256);)u<0&&z===0&&this[d+S-1]!==0&&(z=1),this[d+S]=(u/P>>0)-z&255;return d+y},l.prototype.writeIntBE=function(u,d,y,b){if(u=+u,d=d>>>0,!b){const ct=Math.pow(2,8*y-1);_t(this,u,d,y,ct-1,-ct)}let S=y-1,P=1,z=0;for(this[d+S]=u&255;--S>=0&&(P*=256);)u<0&&z===0&&this[d+S+1]!==0&&(z=1),this[d+S]=(u/P>>0)-z&255;return d+y},l.prototype.writeInt8=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,1,127,-128),u<0&&(u=255+u+1),this[d]=u&255,d+1},l.prototype.writeInt16LE=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,2,32767,-32768),this[d]=u&255,this[d+1]=u>>>8,d+2},l.prototype.writeInt16BE=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,2,32767,-32768),this[d]=u>>>8,this[d+1]=u&255,d+2},l.prototype.writeInt32LE=function(u,d,y){return u=+u,d=d>>>0,y||_t(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},l.prototype.writeInt32BE=function(u,d,y){return u=+u,d=d>>>0,y||_t(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},l.prototype.writeBigInt64LE=Ot(function(u,d=0){return Oe(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Ot(function(u,d=0){return ye(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fn(p,u,d,y,b,S){if(d+y>p.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function nr(p,u,d,y,b){return u=+u,d=d>>>0,b||fn(p,u,d,4),n.write(p,u,d,y,23,4),d+4}l.prototype.writeFloatLE=function(u,d,y){return nr(this,u,d,!0,y)},l.prototype.writeFloatBE=function(u,d,y){return nr(this,u,d,!1,y)};function pn(p,u,d,y,b){return u=+u,d=d>>>0,b||fn(p,u,d,8),n.write(p,u,d,y,52,8),d+8}l.prototype.writeDoubleLE=function(u,d,y){return pn(this,u,d,!0,y)},l.prototype.writeDoubleBE=function(u,d,y){return pn(this,u,d,!1,y)},l.prototype.copy=function(u,d,y,b){if(!l.isBuffer(u))throw new TypeError("argument should be a Buffer");if(y||(y=0),!b&&b!==0&&(b=this.length),d>=u.length&&(d=u.length),d||(d=0),b>0&&b<y&&(b=y),b===y||u.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("sourceEnd out of bounds");b>this.length&&(b=this.length),u.length-d<b-y&&(b=u.length-d+y);const S=b-y;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,y,b):o.prototype.set.call(u,this.subarray(y,b),d),S},l.prototype.fill=function(u,d,y,b){if(typeof u=="string"){if(typeof d=="string"?(b=d,d=0,y=this.length):typeof y=="string"&&(b=y,y=this.length),b!==void 0&&typeof b!="string")throw new TypeError("encoding must be a string");if(typeof b=="string"&&!l.isEncoding(b))throw new TypeError("Unknown encoding: "+b);if(u.length===1){const P=u.charCodeAt(0);(b==="utf8"&&P<128||b==="latin1")&&(u=P)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(d<0||this.length<d||this.length<y)throw new RangeError("Out of range index");if(y<=d)return this;d=d>>>0,y=y===void 0?this.length:y>>>0,u||(u=0);let S;if(typeof u=="number")for(S=d;S<y;++S)this[S]=u;else{const P=l.isBuffer(u)?u:l.from(u,b),z=P.length;if(z===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(S=0;S<y-d;++S)this[S+d]=P[S%z]}return this};const we={};function mn(p,u,d){we[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(b){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:b,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}mn("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),mn("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),mn("ERR_OUT_OF_RANGE",function(p,u,d){let y=`The value of "${p}" is out of range.`,b=d;return Number.isInteger(d)&&Math.abs(d)>2**32?b=ri(String(d)):typeof d=="bigint"&&(b=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(b=ri(b)),b+="n"),y+=` It must be ${u}. Received ${b}`,y},RangeError);function ri(p){let u="",d=p.length;const y=p[0]==="-"?1:0;for(;d>=y+4;d-=3)u=`_${p.slice(d-3,d)}${u}`;return`${p.slice(0,d)}${u}`}function Bs(p,u,d){ue(u,"offset"),(p[u]===void 0||p[u+d]===void 0)&&Fe(u,p.length-(d+1))}function ve(p,u,d,y,b,S){if(p>d||p<u){const P=typeof u=="bigint"?"n":"";let z;throw u===0||u===BigInt(0)?z=`>= 0${P} and < 2${P} ** ${(S+1)*8}${P}`:z=`>= -(2${P} ** ${(S+1)*8-1}${P}) and < 2 ** ${(S+1)*8-1}${P}`,new we.ERR_OUT_OF_RANGE("value",z,p)}Bs(y,b,S)}function ue(p,u){if(typeof p!="number")throw new we.ERR_INVALID_ARG_TYPE(u,"number",p)}function Fe(p,u,d){throw Math.floor(p)!==p?(ue(p,d),new we.ERR_OUT_OF_RANGE("offset","an integer",p)):u<0?new we.ERR_BUFFER_OUT_OF_BOUNDS:new we.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,p)}const ii=/[^+/0-9A-Za-z-_]/g;function oi(p){if(p=p.split("=")[0],p=p.trim().replace(ii,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function rr(p,u){u=u||1/0;let d;const y=p.length;let b=null;const S=[];for(let P=0;P<y;++P){if(d=p.charCodeAt(P),d>55295&&d<57344){if(!b){if(d>56319){(u-=3)>-1&&S.push(239,191,189);continue}else if(P+1===y){(u-=3)>-1&&S.push(239,191,189);continue}b=d;continue}if(d<56320){(u-=3)>-1&&S.push(239,191,189),b=d;continue}d=(b-55296<<10|d-56320)+65536}else b&&(u-=3)>-1&&S.push(239,191,189);if(b=null,d<128){if((u-=1)<0)break;S.push(d)}else if(d<2048){if((u-=2)<0)break;S.push(d>>6|192,d&63|128)}else if(d<65536){if((u-=3)<0)break;S.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((u-=4)<0)break;S.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return S}function D(p){const u=[];for(let d=0;d<p.length;++d)u.push(p.charCodeAt(d)&255);return u}function J(p,u){let d,y,b;const S=[];for(let P=0;P<p.length&&!((u-=2)<0);++P)d=p.charCodeAt(P),y=d>>8,b=d%256,S.push(b),S.push(y);return S}function bt(p){return e.toByteArray(oi(p))}function At(p,u,d,y){let b;for(b=0;b<y&&!(b+d>=u.length||b>=p.length);++b)u[b+d]=p[b];return b}function st(p,u){return p instanceof u||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===u.name}function de(p){return p!==p}const gn=function(){const p="0123456789abcdef",u=new Array(256);for(let d=0;d<16;++d){const y=d*16;for(let b=0;b<16;++b)u[y+b]=p[d]+p[b]}return u}();function Ot(p){return typeof BigInt>"u"?ir:p}function ir(){throw new Error("BigInt not supported")}})(qw);const As=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),Qr=$t.WebSocket||$t.MozWebSocket,yh=!0,nv="arraybuffer",wh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class rv extends Es{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=wh?{}:ah(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=yh&&!wh?n?new Qr(e,n):new Qr(e):new Qr(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;_s(r,this.supportsBinary,o=>{const s={};try{yh&&this.ws.send(o)}catch{}i&&As(()=>{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]=hh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!Qr}}class iv extends Es{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=Rw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=Mw();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),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&&As(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const ov={websocket:rv,webtransport:iv,polling:Kw},sv=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,av=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Ps(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=sv.exec(t||""),o={},s=14;for(;s--;)o[av[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=cv(o,o.path),o.queryKey=lv(o,o.query),o}function cv(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 lv(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let vh=class yn extends yt{constructor(e,n={}){super(),this.binaryType=nv,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Ps(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=Ps(n.host).host),Xr(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=Uw(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=sh,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 ov[e](r)}open(){let e;if(this.opts.rememberUpgrade&&yn.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;yn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(l(),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,l(),n.close(),n=null)}const s=f=>{const m=new Error("probe error: "+f);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function a(){s("transport closed")}function c(){s("socket closed")}function h(f){n&&f.name!==n.name&&o()}const l=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",c),this.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",c),this.once("upgrading",h),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",yn.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+=Ow(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){yn.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}};vh.protocol=sh;function uv(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=Ps(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 dv=typeof ArrayBuffer=="function",hv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,_h=Object.prototype.toString,fv=typeof Blob=="function"||typeof Blob<"u"&&_h.call(Blob)==="[object BlobConstructor]",pv=typeof File=="function"||typeof File<"u"&&_h.call(File)==="[object FileConstructor]";function Is(t){return dv&&(t instanceof ArrayBuffer||hv(t))||fv&&t instanceof Blob||pv&&t instanceof File}function ti(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(ti(t[n]))return!0;return!1}if(Is(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return ti(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ti(t[n]))return!0;return!1}function mv(t){const e=[],n=t.data,r=t;return r.data=Ms(n,e),r.attachments=e.length,{packet:r,buffers:e}}function Ms(t,e){if(!t)return t;if(Is(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]=Ms(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]=Ms(t[r],e));return n}return t}function gv(t,e){return t.data=Rs(t.data,e),delete t.attachments,t}function Rs(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]=Rs(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Rs(t[n],e));return t}const yv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],wv=5;var H;(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"})(H||(H={}));class vv{constructor(e){this.replacer=e}encode(e){return(e.type===H.EVENT||e.type===H.ACK)&&ti(e)?this.encodeAsBinary({type:e.type===H.EVENT?H.BINARY_EVENT:H.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===H.BINARY_EVENT||e.type===H.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=mv(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function xh(t){return Object.prototype.toString.call(t)==="[object Object]"}class Ns extends yt{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===H.BINARY_EVENT;r||n.type===H.BINARY_ACK?(n.type=r?H.EVENT:H.ACK,this.reconstructor=new _v(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Is(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(H[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===H.BINARY_EVENT||r.type===H.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(Ns.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 H.CONNECT:return xh(n);case H.DISCONNECT:return n===void 0;case H.CONNECT_ERROR:return typeof n=="string"||xh(n);case H.EVENT:case H.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&yv.indexOf(n[0])===-1);case H.ACK:case H.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class _v{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=gv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const xv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ns,Encoder:vv,get PacketType(){return H},protocol:wv},Symbol.toStringTag,{value:"Module"}));function qt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const bv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class bh extends yt{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=[qt(e,"open",this.onopen.bind(this)),qt(e,"packet",this.onpacket.bind(this)),qt(e,"error",this.onerror.bind(this)),qt(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(bv.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:H.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:H.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 H.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 H.EVENT:case H.BINARY_EVENT:this.onevent(e);break;case H.ACK:case H.BINARY_ACK:this.onack(e);break;case H.DISCONNECT:this.ondisconnect();break;case H.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:H.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:H.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 dn(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}dn.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},dn.prototype.reset=function(){this.attempts=0},dn.prototype.setMin=function(t){this.ms=t},dn.prototype.setMax=function(t){this.max=t},dn.prototype.setJitter=function(t){this.jitter=t};class Ds extends yt{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,Xr(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 dn({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||xv;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 vh(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=qt(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=qt(n,"error",o);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}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(qt(e,"ping",this.onping.bind(this)),qt(e,"data",this.ondata.bind(this)),qt(e,"error",this.onerror.bind(this)),qt(e,"close",this.onclose.bind(this)),qt(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){As(()=>{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 bh(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 tr={};function ei(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=uv(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=tr[i]&&o in tr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return a?c=new Ds(r,e):(tr[i]||(tr[i]=new Ds(r,e)),c=tr[i]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(ei,{Manager:Ds,Socket:bh,io:ei,connect:ei});function Ls(){return document.visibilityState==="visible"&&document.hasFocus()}function Cv(t){const{conversations:e,addMessage:n,isChatOpen:r,incrementUnreadCount:i}=ot.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&&Ry(s.messages,o)){mt("Duplicate message detected, skipping:",t.threadId);return}n(t.threadId,o),(!r||!Ls())&&i()}function Ev(t){const e=ot.getState().setConversationOpen;e(t.threadId,!1)}function Sv(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=ot.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,jy(t.csMember.displayName))}function kv(t){const{conversations:e,updateMessage:n}=ot.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){mt("⚠️ Conversation not found for update:",t.threadId);return}if(!r.messages.some(o=>o.date===t.message.date)){mt("⚠️ 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 Tv(t){const{conversations:e,removeMessage:n}=ot.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){mt("⚠️ Conversation not found for deletion:",t.threadId);return}if(!r.messages.some(o=>o.date===t.messageDate)){mt("⚠️ Message not found for deletion:",t.messageDate);return}n(t.threadId,t.messageDate)}function Av(t){return new Promise(e=>{const n=ei(Lt.domain,{path:"/socket"});n.on("new-support-message",Cv),n.on("updated-support-message",kv),n.on("deleted-support-message",Tv),n.on("thread-closed",Ev),n.on("thread-assigned",Sv),n.on("connect",()=>{n.emit("identify",{jwt:t}),e(n)})})}async function Pv({name:t,email:e}){const n=JSON.stringify({guildId:Lt.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(`${Lt.domain}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(Ae.set("discord-widget",s.token,{sameSite:"strict",secure:window.location.protocol==="https:"}),ot.getState().setToken(s.token)),s}async function Iv(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Lt.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 Mv(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Lt.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 Rv(t){return await Av(t)}async function Nv(t){const{smartMergeCurrentConversation:e,setConversationOpen:n,conversations:r}=ot.getState();try{const i=await Iv(t);if(i)mt("✅ Found current conversation:",i.threadId),e(i);else{mt("ℹ️ No current conversation found");const o=r.find(s=>s.status==="open"&&s.threadId!=="TEMP");o&&(mt("ℹ️ Closing stale conversation:",o.threadId),n(o.threadId,!1))}}catch{ot.getState().setNetworkError("Failed to load conversation")}}async function Dv(t){const{pastConversationsLastFetchedAt:e,smartMergePastConversations:n,setLoading:r,setNetworkError:i}=ot.getState(),o=5*60*1e3;if(!e||Date.now()-e>o)try{r(!0);const a=await Mv(t);a&&a.length>0?(mt(`✅ Loaded ${a.length} past conversations`),n(a)):mt("ℹ️ No past conversations found")}catch{i("Failed to load conversation history")}finally{r(!1)}}async function Lv(){const{username:t,email:e,setNetworkError:n,setLoading:r}=ot.getState();try{r(!0),n(null);let i=Ae.get("discord-widget");i?mt("ℹ️ Returning user - JWT found in cookies"):(mt("ℹ️ New user - obtaining JWT token..."),i=(await Pv({name:t,email:e})).token,mt("✅ JWT token obtained")),await Rv(i),await Nv(i),mt("✅ Network initialization complete")}catch(i){n(i instanceof Error?i.message:"Network initialization failed")}finally{r(!1)}}const Bv="Customer support",Ov="A team member will pick up this conversation shortly",Fv="https://i.imgur.com/ecjl5HR.png",Vv=()=>{const{conversations:t,setOpenConversationId:e,pastConversationsLastFetchedAt:n,guildSettings:r}=ot(),i=t.filter(c=>c.status==="open").length;U(()=>{const c=Ae.get("discord-widget");if(!c)return;const h=5*60*1e3;(!n||Date.now()-n>h)&&Dv(c)},[n]);function o(){return i!==0?null:x(ce.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:x("div",{className:`flex flex-row items-center transform transition-transform duration-150
|
|
106
|
-
hover:scale-105 active:scale-95`,children:[
|
|
105
|
+
*/(function(t){const e=Qr,n=Is,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=T,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:s,SharedArrayBuffer:a}=globalThis;l.TYPED_ARRAY_SUPPORT=c(),!l.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 c(){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(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function h(p){if(p>i)throw new RangeError('The value "'+p+'" is invalid for option "size"');const u=new o(p);return Object.setPrototypeOf(u,l.prototype),u}function l(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 _(p)}return f(p,u,d)}l.poolSize=8192;function f(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(st(p,s)||p&&st(p.buffer,s)||typeof a<"u"&&(st(p,a)||p&&st(p.buffer,a)))return C(p,u,d);if(typeof p=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const y=p.valueOf&&p.valueOf();if(y!=null&&y!==p)return l.from(y,u,d);const b=k(p);if(b)return b;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof p[Symbol.toPrimitive]=="function")return l.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)}l.from=function(p,u,d){return f(p,u,d)},Object.setPrototypeOf(l.prototype,o.prototype),Object.setPrototypeOf(l,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 g(p,u,d){return m(p),p<=0?h(p):u!==void 0?typeof d=="string"?h(p).fill(u,d):h(p).fill(u):h(p)}l.alloc=function(p,u,d){return g(p,u,d)};function _(p){return m(p),h(p<0?0:M(p)|0)}l.allocUnsafe=function(p){return _(p)},l.allocUnsafeSlow=function(p){return _(p)};function w(p,u){if((typeof u!="string"||u==="")&&(u="utf8"),!l.isEncoding(u))throw new TypeError("Unknown encoding: "+u);const d=I(p,u)|0;let y=h(d);const b=y.write(p,u);return b!==d&&(y=y.slice(0,b)),y}function E(p){const u=p.length<0?0:M(p.length)|0,d=h(u);for(let y=0;y<u;y+=1)d[y]=p[y]&255;return d}function x(p){if(st(p,o)){const u=new o(p);return C(u.buffer,u.byteOffset,u.byteLength)}return E(p)}function C(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 y;return u===void 0&&d===void 0?y=new o(p):d===void 0?y=new o(p,u):y=new o(p,u,d),Object.setPrototypeOf(y,l.prototype),y}function k(p){if(l.isBuffer(p)){const u=M(p.length)|0,d=h(u);return d.length===0||p.copy(d,0,0,u),d}if(p.length!==void 0)return typeof p.length!="number"||de(p.length)?h(0):E(p);if(p.type==="Buffer"&&Array.isArray(p.data))return E(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 T(p){return+p!=p&&(p=0),l.alloc(+p)}l.isBuffer=function(u){return u!=null&&u._isBuffer===!0&&u!==l.prototype},l.compare=function(u,d){if(st(u,o)&&(u=l.from(u,u.offset,u.byteLength)),st(d,o)&&(d=l.from(d,d.offset,d.byteLength)),!l.isBuffer(u)||!l.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(u===d)return 0;let y=u.length,b=d.length;for(let S=0,P=Math.min(y,b);S<P;++S)if(u[S]!==d[S]){y=u[S],b=d[S];break}return y<b?-1:b<y?1:0},l.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}},l.concat=function(u,d){if(!Array.isArray(u))throw new TypeError('"list" argument must be an Array of Buffers');if(u.length===0)return l.alloc(0);let y;if(d===void 0)for(d=0,y=0;y<u.length;++y)d+=u[y].length;const b=l.allocUnsafe(d);let S=0;for(y=0;y<u.length;++y){let P=u[y];if(st(P,o))S+P.length>b.length?(l.isBuffer(P)||(P=l.from(P)),P.copy(b,S)):o.prototype.set.call(b,P,S);else if(l.isBuffer(P))P.copy(b,S);else throw new TypeError('"list" argument must be an Array of Buffers');S+=P.length}return b};function I(p,u){if(l.isBuffer(p))return p.length;if(s.isView(p)||st(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,y=arguments.length>2&&arguments[2]===!0;if(!y&&d===0)return 0;let b=!1;for(;;)switch(u){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return rr(p).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return bt(p).length;default:if(b)return y?-1:rr(p).length;u=(""+u).toLowerCase(),b=!0}}l.byteLength=I;function N(p,u,d){let y=!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 Yt(this,u,d);case"utf8":case"utf-8":return K(this,u,d);case"ascii":return jt(this,u,d);case"latin1":case"binary":return H(this,u,d);case"base64":return ye(this,u,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ri(this,u,d);default:if(y)throw new TypeError("Unknown encoding: "+p);p=(p+"").toLowerCase(),y=!0}}l.prototype._isBuffer=!0;function A(p,u,d){const y=p[u];p[u]=p[d],p[d]=y}l.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)A(this,d,d+1);return this},l.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)A(this,d,d+3),A(this,d+1,d+2);return this},l.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)A(this,d,d+7),A(this,d+1,d+6),A(this,d+2,d+5),A(this,d+3,d+4);return this},l.prototype.toString=function(){const u=this.length;return u===0?"":arguments.length===0?K(this,0,u):N.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(u){if(!l.isBuffer(u))throw new TypeError("Argument must be a Buffer");return this===u?!0:l.compare(this,u)===0},l.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&&(l.prototype[r]=l.prototype.inspect),l.prototype.compare=function(u,d,y,b,S){if(st(u,o)&&(u=l.from(u,u.offset,u.byteLength)),!l.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),y===void 0&&(y=u?u.length:0),b===void 0&&(b=0),S===void 0&&(S=this.length),d<0||y>u.length||b<0||S>this.length)throw new RangeError("out of range index");if(b>=S&&d>=y)return 0;if(b>=S)return-1;if(d>=y)return 1;if(d>>>=0,y>>>=0,b>>>=0,S>>>=0,this===u)return 0;let P=S-b,z=y-d;const ct=Math.min(P,z),nt=this.slice(b,S),lt=u.slice(d,y);for(let X=0;X<ct;++X)if(nt[X]!==lt[X]){P=nt[X],z=lt[X];break}return P<z?-1:z<P?1:0};function R(p,u,d,y,b){if(p.length===0)return-1;if(typeof d=="string"?(y=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,de(d)&&(d=b?0:p.length-1),d<0&&(d=p.length+d),d>=p.length){if(b)return-1;d=p.length-1}else if(d<0)if(b)d=0;else return-1;if(typeof u=="string"&&(u=l.from(u,y)),l.isBuffer(u))return u.length===0?-1:D(p,u,d,y,b);if(typeof u=="number")return u=u&255,typeof o.prototype.indexOf=="function"?b?o.prototype.indexOf.call(p,u,d):o.prototype.lastIndexOf.call(p,u,d):D(p,[u],d,y,b);throw new TypeError("val must be string, number or Buffer")}function D(p,u,d,y,b){let S=1,P=p.length,z=u.length;if(y!==void 0&&(y=String(y).toLowerCase(),y==="ucs2"||y==="ucs-2"||y==="utf16le"||y==="utf-16le")){if(p.length<2||u.length<2)return-1;S=2,P/=2,z/=2,d/=2}function ct(lt,X){return S===1?lt[X]:lt.readUInt16BE(X*S)}let nt;if(b){let lt=-1;for(nt=d;nt<P;nt++)if(ct(p,nt)===ct(u,lt===-1?0:nt-lt)){if(lt===-1&&(lt=nt),nt-lt+1===z)return lt*S}else lt!==-1&&(nt-=nt-lt),lt=-1}else for(d+z>P&&(d=P-z),nt=d;nt>=0;nt--){let lt=!0;for(let X=0;X<z;X++)if(ct(p,nt+X)!==ct(u,X)){lt=!1;break}if(lt)return nt}return-1}l.prototype.includes=function(u,d,y){return this.indexOf(u,d,y)!==-1},l.prototype.indexOf=function(u,d,y){return R(this,u,d,y,!0)},l.prototype.lastIndexOf=function(u,d,y){return R(this,u,d,y,!1)};function O(p,u,d,y){d=Number(d)||0;const b=p.length-d;y?(y=Number(y),y>b&&(y=b)):y=b;const S=u.length;y>S/2&&(y=S/2);let P;for(P=0;P<y;++P){const z=parseInt(u.substr(P*2,2),16);if(de(z))return P;p[d+P]=z}return P}function et(p,u,d,y){return At(rr(u,p.length-d),p,d,y)}function ht(p,u,d,y){return At(L(u),p,d,y)}function Lt(p,u,d,y){return At(bt(u),p,d,y)}function Y(p,u,d,y){return At(J(u,p.length-d),p,d,y)}l.prototype.write=function(u,d,y,b){if(d===void 0)b="utf8",y=this.length,d=0;else if(y===void 0&&typeof d=="string")b=d,y=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(y)?(y=y>>>0,b===void 0&&(b="utf8")):(b=y,y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const S=this.length-d;if((y===void 0||y>S)&&(y=S),u.length>0&&(y<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");b||(b="utf8");let P=!1;for(;;)switch(b){case"hex":return O(this,u,d,y);case"utf8":case"utf-8":return et(this,u,d,y);case"ascii":case"latin1":case"binary":return ht(this,u,d,y);case"base64":return Lt(this,u,d,y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,u,d,y);default:if(P)throw new TypeError("Unknown encoding: "+b);b=(""+b).toLowerCase(),P=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ye(p,u,d){return u===0&&d===p.length?e.fromByteArray(p):e.fromByteArray(p.slice(u,d))}function K(p,u,d){d=Math.min(p.length,d);const y=[];let b=u;for(;b<d;){const S=p[b];let P=null,z=S>239?4:S>223?3:S>191?2:1;if(b+z<=d){let ct,nt,lt,X;switch(z){case 1:S<128&&(P=S);break;case 2:ct=p[b+1],(ct&192)===128&&(X=(S&31)<<6|ct&63,X>127&&(P=X));break;case 3:ct=p[b+1],nt=p[b+2],(ct&192)===128&&(nt&192)===128&&(X=(S&15)<<12|(ct&63)<<6|nt&63,X>2047&&(X<55296||X>57343)&&(P=X));break;case 4:ct=p[b+1],nt=p[b+2],lt=p[b+3],(ct&192)===128&&(nt&192)===128&&(lt&192)===128&&(X=(S&15)<<18|(ct&63)<<12|(nt&63)<<6|lt&63,X>65535&&X<1114112&&(P=X))}}P===null?(P=65533,z=1):P>65535&&(P-=65536,y.push(P>>>10&1023|55296),P=56320|P&1023),y.push(P),b+=z}return Bt(y)}const wt=4096;function Bt(p){const u=p.length;if(u<=wt)return String.fromCharCode.apply(String,p);let d="",y=0;for(;y<u;)d+=String.fromCharCode.apply(String,p.slice(y,y+=wt));return d}function jt(p,u,d){let y="";d=Math.min(p.length,d);for(let b=u;b<d;++b)y+=String.fromCharCode(p[b]&127);return y}function H(p,u,d){let y="";d=Math.min(p.length,d);for(let b=u;b<d;++b)y+=String.fromCharCode(p[b]);return y}function Yt(p,u,d){const y=p.length;(!u||u<0)&&(u=0),(!d||d<0||d>y)&&(d=y);let b="";for(let S=u;S<d;++S)b+=gn[p[S]];return b}function ri(p,u,d){const y=p.slice(u,d);let b="";for(let S=0;S<y.length-1;S+=2)b+=String.fromCharCode(y[S]+y[S+1]*256);return b}l.prototype.slice=function(u,d){const y=this.length;u=~~u,d=d===void 0?y:~~d,u<0?(u+=y,u<0&&(u=0)):u>y&&(u=y),d<0?(d+=y,d<0&&(d=0)):d>y&&(d=y),d<u&&(d=u);const b=this.subarray(u,d);return Object.setPrototypeOf(b,l.prototype),b};function ft(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")}l.prototype.readUintLE=l.prototype.readUIntLE=function(u,d,y){u=u>>>0,d=d>>>0,y||ft(u,d,this.length);let b=this[u],S=1,P=0;for(;++P<d&&(S*=256);)b+=this[u+P]*S;return b},l.prototype.readUintBE=l.prototype.readUIntBE=function(u,d,y){u=u>>>0,d=d>>>0,y||ft(u,d,this.length);let b=this[u+--d],S=1;for(;d>0&&(S*=256);)b+=this[u+--d]*S;return b},l.prototype.readUint8=l.prototype.readUInt8=function(u,d){return u=u>>>0,d||ft(u,1,this.length),this[u]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(u,d){return u=u>>>0,d||ft(u,2,this.length),this[u]|this[u+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(u,d){return u=u>>>0,d||ft(u,2,this.length),this[u]<<8|this[u+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),(this[u]|this[u+1]<<8|this[u+2]<<16)+this[u+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),this[u]*16777216+(this[u+1]<<16|this[u+2]<<8|this[u+3])},l.prototype.readBigUInt64LE=Ot(function(u){u=u>>>0,ue(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const b=d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24,S=this[++u]+this[++u]*2**8+this[++u]*2**16+y*2**24;return BigInt(b)+(BigInt(S)<<BigInt(32))}),l.prototype.readBigUInt64BE=Ot(function(u){u=u>>>0,ue(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const b=d*2**24+this[++u]*2**16+this[++u]*2**8+this[++u],S=this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+y;return(BigInt(b)<<BigInt(32))+BigInt(S)}),l.prototype.readIntLE=function(u,d,y){u=u>>>0,d=d>>>0,y||ft(u,d,this.length);let b=this[u],S=1,P=0;for(;++P<d&&(S*=256);)b+=this[u+P]*S;return S*=128,b>=S&&(b-=Math.pow(2,8*d)),b},l.prototype.readIntBE=function(u,d,y){u=u>>>0,d=d>>>0,y||ft(u,d,this.length);let b=d,S=1,P=this[u+--b];for(;b>0&&(S*=256);)P+=this[u+--b]*S;return S*=128,P>=S&&(P-=Math.pow(2,8*d)),P},l.prototype.readInt8=function(u,d){return u=u>>>0,d||ft(u,1,this.length),this[u]&128?(255-this[u]+1)*-1:this[u]},l.prototype.readInt16LE=function(u,d){u=u>>>0,d||ft(u,2,this.length);const y=this[u]|this[u+1]<<8;return y&32768?y|4294901760:y},l.prototype.readInt16BE=function(u,d){u=u>>>0,d||ft(u,2,this.length);const y=this[u+1]|this[u]<<8;return y&32768?y|4294901760:y},l.prototype.readInt32LE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),this[u]|this[u+1]<<8|this[u+2]<<16|this[u+3]<<24},l.prototype.readInt32BE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),this[u]<<24|this[u+1]<<16|this[u+2]<<8|this[u+3]},l.prototype.readBigInt64LE=Ot(function(u){u=u>>>0,ue(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const b=this[u+4]+this[u+5]*2**8+this[u+6]*2**16+(y<<24);return(BigInt(b)<<BigInt(32))+BigInt(d+this[++u]*2**8+this[++u]*2**16+this[++u]*2**24)}),l.prototype.readBigInt64BE=Ot(function(u){u=u>>>0,ue(u,"offset");const d=this[u],y=this[u+7];(d===void 0||y===void 0)&&Ve(u,this.length-8);const b=(d<<24)+this[++u]*2**16+this[++u]*2**8+this[++u];return(BigInt(b)<<BigInt(32))+BigInt(this[++u]*2**24+this[++u]*2**16+this[++u]*2**8+y)}),l.prototype.readFloatLE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),n.read(this,u,!0,23,4)},l.prototype.readFloatBE=function(u,d){return u=u>>>0,d||ft(u,4,this.length),n.read(this,u,!1,23,4)},l.prototype.readDoubleLE=function(u,d){return u=u>>>0,d||ft(u,8,this.length),n.read(this,u,!0,52,8)},l.prototype.readDoubleBE=function(u,d){return u=u>>>0,d||ft(u,8,this.length),n.read(this,u,!1,52,8)};function _t(p,u,d,y,b,S){if(!l.isBuffer(p))throw new TypeError('"buffer" argument must be a Buffer instance');if(u>b||u<S)throw new RangeError('"value" argument is out of bounds');if(d+y>p.length)throw new RangeError("Index out of range")}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(u,d,y,b){if(u=+u,d=d>>>0,y=y>>>0,!b){const z=Math.pow(2,8*y)-1;_t(this,u,d,y,z,0)}let S=1,P=0;for(this[d]=u&255;++P<y&&(S*=256);)this[d+P]=u/S&255;return d+y},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(u,d,y,b){if(u=+u,d=d>>>0,y=y>>>0,!b){const z=Math.pow(2,8*y)-1;_t(this,u,d,y,z,0)}let S=y-1,P=1;for(this[d+S]=u&255;--S>=0&&(P*=256);)this[d+S]=u/P&255;return d+y},l.prototype.writeUint8=l.prototype.writeUInt8=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,1,255,0),this[d]=u&255,d+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,2,65535,0),this[d]=u&255,this[d+1]=u>>>8,d+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,2,65535,0),this[d]=u>>>8,this[d+1]=u&255,d+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(u,d,y){return u=+u,d=d>>>0,y||_t(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},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(u,d,y){return u=+u,d=d>>>0,y||_t(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 Fe(p,u,d,y,b){_e(u,y,b,p,d,7);let S=Number(u&BigInt(4294967295));p[d++]=S,S=S>>8,p[d++]=S,S=S>>8,p[d++]=S,S=S>>8,p[d++]=S;let P=Number(u>>BigInt(32)&BigInt(4294967295));return p[d++]=P,P=P>>8,p[d++]=P,P=P>>8,p[d++]=P,P=P>>8,p[d++]=P,d}function we(p,u,d,y,b){_e(u,y,b,p,d,7);let S=Number(u&BigInt(4294967295));p[d+7]=S,S=S>>8,p[d+6]=S,S=S>>8,p[d+5]=S,S=S>>8,p[d+4]=S;let P=Number(u>>BigInt(32)&BigInt(4294967295));return p[d+3]=P,P=P>>8,p[d+2]=P,P=P>>8,p[d+1]=P,P=P>>8,p[d]=P,d+8}l.prototype.writeBigUInt64LE=Ot(function(u,d=0){return Fe(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeBigUInt64BE=Ot(function(u,d=0){return we(this,u,d,BigInt(0),BigInt("0xffffffffffffffff"))}),l.prototype.writeIntLE=function(u,d,y,b){if(u=+u,d=d>>>0,!b){const ct=Math.pow(2,8*y-1);_t(this,u,d,y,ct-1,-ct)}let S=0,P=1,z=0;for(this[d]=u&255;++S<y&&(P*=256);)u<0&&z===0&&this[d+S-1]!==0&&(z=1),this[d+S]=(u/P>>0)-z&255;return d+y},l.prototype.writeIntBE=function(u,d,y,b){if(u=+u,d=d>>>0,!b){const ct=Math.pow(2,8*y-1);_t(this,u,d,y,ct-1,-ct)}let S=y-1,P=1,z=0;for(this[d+S]=u&255;--S>=0&&(P*=256);)u<0&&z===0&&this[d+S+1]!==0&&(z=1),this[d+S]=(u/P>>0)-z&255;return d+y},l.prototype.writeInt8=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,1,127,-128),u<0&&(u=255+u+1),this[d]=u&255,d+1},l.prototype.writeInt16LE=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,2,32767,-32768),this[d]=u&255,this[d+1]=u>>>8,d+2},l.prototype.writeInt16BE=function(u,d,y){return u=+u,d=d>>>0,y||_t(this,u,d,2,32767,-32768),this[d]=u>>>8,this[d+1]=u&255,d+2},l.prototype.writeInt32LE=function(u,d,y){return u=+u,d=d>>>0,y||_t(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},l.prototype.writeInt32BE=function(u,d,y){return u=+u,d=d>>>0,y||_t(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},l.prototype.writeBigInt64LE=Ot(function(u,d=0){return Fe(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),l.prototype.writeBigInt64BE=Ot(function(u,d=0){return we(this,u,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function fn(p,u,d,y,b,S){if(d+y>p.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function nr(p,u,d,y,b){return u=+u,d=d>>>0,b||fn(p,u,d,4),n.write(p,u,d,y,23,4),d+4}l.prototype.writeFloatLE=function(u,d,y){return nr(this,u,d,!0,y)},l.prototype.writeFloatBE=function(u,d,y){return nr(this,u,d,!1,y)};function pn(p,u,d,y,b){return u=+u,d=d>>>0,b||fn(p,u,d,8),n.write(p,u,d,y,52,8),d+8}l.prototype.writeDoubleLE=function(u,d,y){return pn(this,u,d,!0,y)},l.prototype.writeDoubleBE=function(u,d,y){return pn(this,u,d,!1,y)},l.prototype.copy=function(u,d,y,b){if(!l.isBuffer(u))throw new TypeError("argument should be a Buffer");if(y||(y=0),!b&&b!==0&&(b=this.length),d>=u.length&&(d=u.length),d||(d=0),b>0&&b<y&&(b=y),b===y||u.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(y<0||y>=this.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("sourceEnd out of bounds");b>this.length&&(b=this.length),u.length-d<b-y&&(b=u.length-d+y);const S=b-y;return this===u&&typeof o.prototype.copyWithin=="function"?this.copyWithin(d,y,b):o.prototype.set.call(u,this.subarray(y,b),d),S},l.prototype.fill=function(u,d,y,b){if(typeof u=="string"){if(typeof d=="string"?(b=d,d=0,y=this.length):typeof y=="string"&&(b=y,y=this.length),b!==void 0&&typeof b!="string")throw new TypeError("encoding must be a string");if(typeof b=="string"&&!l.isEncoding(b))throw new TypeError("Unknown encoding: "+b);if(u.length===1){const P=u.charCodeAt(0);(b==="utf8"&&P<128||b==="latin1")&&(u=P)}}else typeof u=="number"?u=u&255:typeof u=="boolean"&&(u=Number(u));if(d<0||this.length<d||this.length<y)throw new RangeError("Out of range index");if(y<=d)return this;d=d>>>0,y=y===void 0?this.length:y>>>0,u||(u=0);let S;if(typeof u=="number")for(S=d;S<y;++S)this[S]=u;else{const P=l.isBuffer(u)?u:l.from(u,b),z=P.length;if(z===0)throw new TypeError('The value "'+u+'" is invalid for argument "value"');for(S=0;S<y-d;++S)this[S+d]=P[S%z]}return this};const ve={};function mn(p,u,d){ve[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(b){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:b,writable:!0})}toString(){return`${this.name} [${p}]: ${this.message}`}}}mn("ERR_BUFFER_OUT_OF_BOUNDS",function(p){return p?`${p} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),mn("ERR_INVALID_ARG_TYPE",function(p,u){return`The "${p}" argument must be of type number. Received type ${typeof u}`},TypeError),mn("ERR_OUT_OF_RANGE",function(p,u,d){let y=`The value of "${p}" is out of range.`,b=d;return Number.isInteger(d)&&Math.abs(d)>2**32?b=ii(String(d)):typeof d=="bigint"&&(b=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(b=ii(b)),b+="n"),y+=` It must be ${u}. Received ${b}`,y},RangeError);function ii(p){let u="",d=p.length;const y=p[0]==="-"?1:0;for(;d>=y+4;d-=3)u=`_${p.slice(d-3,d)}${u}`;return`${p.slice(0,d)}${u}`}function Vs(p,u,d){ue(u,"offset"),(p[u]===void 0||p[u+d]===void 0)&&Ve(u,p.length-(d+1))}function _e(p,u,d,y,b,S){if(p>d||p<u){const P=typeof u=="bigint"?"n":"";let z;throw u===0||u===BigInt(0)?z=`>= 0${P} and < 2${P} ** ${(S+1)*8}${P}`:z=`>= -(2${P} ** ${(S+1)*8-1}${P}) and < 2 ** ${(S+1)*8-1}${P}`,new ve.ERR_OUT_OF_RANGE("value",z,p)}Vs(y,b,S)}function ue(p,u){if(typeof p!="number")throw new ve.ERR_INVALID_ARG_TYPE(u,"number",p)}function Ve(p,u,d){throw Math.floor(p)!==p?(ue(p,d),new ve.ERR_OUT_OF_RANGE("offset","an integer",p)):u<0?new ve.ERR_BUFFER_OUT_OF_BOUNDS:new ve.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${u}`,p)}const oi=/[^+/0-9A-Za-z-_]/g;function si(p){if(p=p.split("=")[0],p=p.trim().replace(oi,""),p.length<2)return"";for(;p.length%4!==0;)p=p+"=";return p}function rr(p,u){u=u||1/0;let d;const y=p.length;let b=null;const S=[];for(let P=0;P<y;++P){if(d=p.charCodeAt(P),d>55295&&d<57344){if(!b){if(d>56319){(u-=3)>-1&&S.push(239,191,189);continue}else if(P+1===y){(u-=3)>-1&&S.push(239,191,189);continue}b=d;continue}if(d<56320){(u-=3)>-1&&S.push(239,191,189),b=d;continue}d=(b-55296<<10|d-56320)+65536}else b&&(u-=3)>-1&&S.push(239,191,189);if(b=null,d<128){if((u-=1)<0)break;S.push(d)}else if(d<2048){if((u-=2)<0)break;S.push(d>>6|192,d&63|128)}else if(d<65536){if((u-=3)<0)break;S.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((u-=4)<0)break;S.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return S}function L(p){const u=[];for(let d=0;d<p.length;++d)u.push(p.charCodeAt(d)&255);return u}function J(p,u){let d,y,b;const S=[];for(let P=0;P<p.length&&!((u-=2)<0);++P)d=p.charCodeAt(P),y=d>>8,b=d%256,S.push(b),S.push(y);return S}function bt(p){return e.toByteArray(si(p))}function At(p,u,d,y){let b;for(b=0;b<y&&!(b+d>=u.length||b>=p.length);++b)u[b+d]=p[b];return b}function st(p,u){return p instanceof u||p!=null&&p.constructor!=null&&p.constructor.name!=null&&p.constructor.name===u.name}function de(p){return p!==p}const gn=function(){const p="0123456789abcdef",u=new Array(256);for(let d=0;d<16;++d){const y=d*16;for(let b=0;b<16;++b)u[y+b]=p[d]+p[b]}return u}();function Ot(p){return typeof BigInt>"u"?ir:p}function ir(){throw new Error("BigInt not supported")}})(Qw);const Ms=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),ti=$t.WebSocket||$t.MozWebSocket,bh=!0,cv="arraybuffer",Ch=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class lv extends Ts{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=Ch?{}:hh(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=bh&&!Ch?n?new ti(e,n):new ti(e):new ti(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;Cs(r,this.supportsBinary,o=>{const s={};try{bh&&this.ws.send(o)}catch{}i&&Ms(()=>{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]=yh()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}check(){return!!ti}}class uv extends Ts{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=Fw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(n).getReader(),i=Ow();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const o=()=>{r.read().then(({done:a,value:c})=>{a||(this.onPacket(c),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&&Ms(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const dv={websocket:lv,webtransport:uv,polling:Jw},hv=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,fv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rs(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=hv.exec(t||""),o={},s=14;for(;s--;)o[fv[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=pv(o,o.path),o.queryKey=mv(o,o.query),o}function pv(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 mv(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}let Eh=class yn extends yt{constructor(e,n={}){super(),this.binaryType=cv,this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Rs(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=Rs(n.host).host),Zr(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=Kw(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=dh,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 dv[e](r)}open(){let e;if(this.opts.rememberUpgrade&&yn.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;yn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(l(),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,l(),n.close(),n=null)}const s=f=>{const m=new Error("probe error: "+f);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function a(){s("transport closed")}function c(){s("socket closed")}function h(f){n&&f.name!==n.name&&o()}const l=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",a),this.off("close",c),this.off("upgrading",h)};n.once("open",i),n.once("error",s),n.once("close",a),this.once("close",c),this.once("upgrading",h),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onOpen(){if(this.readyState="open",yn.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+=jw(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){yn.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}};Eh.protocol=dh;function gv(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=Rs(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 yv=typeof ArrayBuffer=="function",wv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Sh=Object.prototype.toString,vv=typeof Blob=="function"||typeof Blob<"u"&&Sh.call(Blob)==="[object BlobConstructor]",_v=typeof File=="function"||typeof File<"u"&&Sh.call(File)==="[object FileConstructor]";function Ns(t){return yv&&(t instanceof ArrayBuffer||wv(t))||vv&&t instanceof Blob||_v&&t instanceof File}function ei(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n<r;n++)if(ei(t[n]))return!0;return!1}if(Ns(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return ei(t.toJSON(),!0);for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&ei(t[n]))return!0;return!1}function xv(t){const e=[],n=t.data,r=t;return r.data=Ds(n,e),r.attachments=e.length,{packet:r,buffers:e}}function Ds(t,e){if(!t)return t;if(Ns(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]=Ds(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]=Ds(t[r],e));return n}return t}function bv(t,e){return t.data=Ls(t.data,e),delete t.attachments,t}function Ls(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]=Ls(t[n],e);else if(typeof t=="object")for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(t[n]=Ls(t[n],e));return t}const Cv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ev=5;var W;(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"})(W||(W={}));class Sv{constructor(e){this.replacer=e}encode(e){return(e.type===W.EVENT||e.type===W.ACK)&&ei(e)?this.encodeAsBinary({type:e.type===W.EVENT?W.BINARY_EVENT:W.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===W.BINARY_EVENT||e.type===W.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=xv(e),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}function kh(t){return Object.prototype.toString.call(t)==="[object Object]"}class Bs extends yt{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===W.BINARY_EVENT;r||n.type===W.BINARY_ACK?(n.type=r?W.EVENT:W.ACK,this.reconstructor=new kv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ns(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(W[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===W.BINARY_EVENT||r.type===W.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(Bs.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 W.CONNECT:return kh(n);case W.DISCONNECT:return n===void 0;case W.CONNECT_ERROR:return typeof n=="string"||kh(n);case W.EVENT:case W.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Cv.indexOf(n[0])===-1);case W.ACK:case W.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kv{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=bv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Tv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Bs,Encoder:Sv,get PacketType(){return W},protocol:Ev},Symbol.toStringTag,{value:"Module"}));function qt(t,e,n){return t.on(e,n),function(){t.off(e,n)}}const Av=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Th extends yt{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=[qt(e,"open",this.onopen.bind(this)),qt(e,"packet",this.onpacket.bind(this)),qt(e,"error",this.onerror.bind(this)),qt(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(Av.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:W.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:W.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 W.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 W.EVENT:case W.BINARY_EVENT:this.onevent(e);break;case W.ACK:case W.BINARY_ACK:this.onack(e);break;case W.DISCONNECT:this.ondisconnect();break;case W.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:W.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:W.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 hn(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}hn.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},hn.prototype.reset=function(){this.attempts=0},hn.prototype.setMin=function(t){this.ms=t},hn.prototype.setMax=function(t){this.max=t},hn.prototype.setJitter=function(t){this.jitter=t};class Os extends yt{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,Zr(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 hn({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||Tv;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 Eh(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=qt(n,"open",function(){r.onopen(),e&&e()}),o=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},s=qt(n,"error",o);if(this._timeout!==!1){const a=this._timeout,c=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}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(qt(e,"ping",this.onping.bind(this)),qt(e,"data",this.ondata.bind(this)),qt(e,"error",this.onerror.bind(this)),qt(e,"close",this.onclose.bind(this)),qt(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){Ms(()=>{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 Th(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 tr={};function ni(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=gv(t,e.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=tr[i]&&o in tr[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let c;return a?c=new Os(r,e):(tr[i]||(tr[i]=new Os(r,e)),c=tr[i]),n.query&&!e.query&&(e.query=n.queryKey),c.socket(n.path,e)}Object.assign(ni,{Manager:Os,Socket:Th,io:ni,connect:ni});function Fs(){return document.visibilityState==="visible"&&document.hasFocus()}function Pv(t){const{conversations:e,addMessage:n,isChatOpen:r,incrementUnreadCount:i}=ot.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&&By(s.messages,o)){mt("Duplicate message detected, skipping:",t.threadId);return}n(t.threadId,o),(!r||!Fs())&&i()}function Iv(t){const e=ot.getState().setConversationOpen;e(t.threadId,!1)}function Mv(t){const{setConversationCSMember:e,addMessage:n,tempConversationToThread:r}=ot.getState();r(t.threadId),e(t.threadId,t.csMember),n(t.threadId,qy(t.csMember.displayName))}function Rv(t){const{conversations:e,updateMessage:n}=ot.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){mt("⚠️ Conversation not found for update:",t.threadId);return}if(!r.messages.some(o=>o.date===t.message.date)){mt("⚠️ 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 Nv(t){const{conversations:e,removeMessage:n}=ot.getState(),r=e.find(o=>o.threadId===t.threadId);if(!r){mt("⚠️ Conversation not found for deletion:",t.threadId);return}if(!r.messages.some(o=>o.date===t.messageDate)){mt("⚠️ Message not found for deletion:",t.messageDate);return}n(t.threadId,t.messageDate)}function Dv(t){return new Promise(e=>{const n=ni(Dt.domain,{path:"/socket"});n.on("new-support-message",Pv),n.on("updated-support-message",Rv),n.on("deleted-support-message",Nv),n.on("thread-closed",Iv),n.on("thread-assigned",Mv),n.on("connect",()=>{n.emit("identify",{jwt:t}),e(n)})})}async function Lv({name:t,email:e}){const n=JSON.stringify({guildId:Dt.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(`${Dt.domain}/auth/token`,i)).json();return s.token&&s.token!=="undefined"&&(Pe.set("discord-widget",s.token,{sameSite:"strict",secure:window.location.protocol==="https:"}),ot.getState().setToken(s.token)),s}async function Bv(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Dt.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 Ov(t){const e=new Headers;e.append("Content-Type","application/json"),e.append("Authorization",`Bearer ${t}`);try{const n=await fetch(`${Dt.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 Fv(t){return await Dv(t)}async function Vv(t){const{smartMergeCurrentConversation:e,setConversationOpen:n,conversations:r}=ot.getState();try{const i=await Bv(t);if(i)mt("✅ Found current conversation:",i.threadId),e(i);else{mt("ℹ️ No current conversation found");const o=r.find(s=>s.status==="open"&&s.threadId!=="TEMP");o&&(mt("ℹ️ Closing stale conversation:",o.threadId),n(o.threadId,!1))}}catch{ot.getState().setNetworkError("Failed to load conversation")}}async function Uv(t){const{pastConversationsLastFetchedAt:e,smartMergePastConversations:n,setLoading:r,setNetworkError:i}=ot.getState(),o=5*60*1e3;if(!e||Date.now()-e>o)try{r(!0);const a=await Ov(t);a&&a.length>0?(mt(`✅ Loaded ${a.length} past conversations`),n(a)):mt("ℹ️ No past conversations found")}catch{i("Failed to load conversation history")}finally{r(!1)}}async function $v(){const{username:t,email:e,setNetworkError:n,setLoading:r}=ot.getState();try{r(!0),n(null);let i=Pe.get("discord-widget");i?mt("ℹ️ Returning user - JWT found in cookies"):(mt("ℹ️ New user - obtaining JWT token..."),i=(await Lv({name:t,email:e})).token,mt("✅ JWT token obtained")),await Fv(i),await Vv(i),mt("✅ Network initialization complete")}catch(i){n(i instanceof Error?i.message:"Network initialization failed")}finally{r(!1)}}const zv="Customer support",jv="A team member will pick up this conversation shortly",Wv="https://i.imgur.com/ecjl5HR.png",Hv=()=>{const{conversations:t,setOpenConversationId:e,pastConversationsLastFetchedAt:n,guildSettings:r}=ot(),i=t.filter(c=>c.status==="open").length;U(()=>{const c=Pe.get("discord-widget");if(!c)return;const h=5*60*1e3;(!n||Date.now()-n>h)&&Uv(c)},[n]);function o(){return i!==0?null:v(ce.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:v("div",{className:`flex flex-row items-center transform transition-transform duration-150
|
|
106
|
+
hover:scale-105 active:scale-95`,children:[v("span",{className:"text-sm text-slate-50 pr-3",children:"Send us a new message"}),v(Vg,{color:"#FFFFFF",size:18,strokeWidth:1})]})})}function s(c,h,l){var _,w;const f=c.messages[c.messages.length-1],m=c.status==="open",g=!(c!=null&&c.csMember)||c.csMember.displayName===zv;return v("div",{className:`flex flex-row items-center px-3 py-4 hover:bg-gray-200 cursor-pointer ${l?"":"border-b border-gray-200 "}`,onClick:()=>e(c.threadId),children:[v("div",{className:"relative inline-block mr-3",children:[v("img",{className:"inline-block size-[32px] rounded-full",src:g?(r==null?void 0:r.iconURL)||Wv:c.csMember.displayAvatarURL}),!g&&((_=c==null?void 0:c.csMember)==null?void 0:_.status)&&v("span",{className:`absolute top-0 end-0 block size-3 rounded-full ring-2 ring-white dark:ring-neutral-900 ${nh(c.csMember.status,"bg")}`})]}),v("div",{className:"flex flex-1 flex-col",children:[v("p",{className:`text-sm/3 ${m?"font-semibold":""}`,children:g?jv:(w=c==null?void 0:c.csMember)==null?void 0:w.displayName}),v("p",{className:"text-xs text-gray-500 line-clamp-1",children:f.content})]}),v("div",{className:"ml-2",children:v("p",{className:"text-xs text-gray-500",children:od(f.date)})})]},`conversation-${h}`)}function a(){const c=[...t].filter(f=>f.status==="open"),h=[...t].filter(f=>f.status==="closed"),l=f=>f.sort((m,g)=>g.lastMessageDate-m.lastMessageDate).map((m,g)=>m.messages.length?s(m,g,g+1===f.length):null);return v(ce.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:[c.length>0&&v("div",{className:"mb-2",children:[v("span",{className:"text-sm",children:"Current conversation"}),l(c)]}),h.length>0&&v(Z,{children:[v("span",{className:"text-sm",children:"Closed messages"}),l(h)]})]})}return v("div",{className:"flex flex-col flex-1 overflow-auto",children:[a(),o()]})},Ah=({IconComponent:t,onClick:e})=>v("button",{onClick:e,className:`flex mr-2 items-center justify-center w-8 h-8
|
|
107
107
|
transform transition-transform duration-150
|
|
108
|
-
hover:scale-110 active:scale-95`,children:
|
|
108
|
+
hover:scale-110 active:scale-95`,children:v(t,{})}),Kv=({size:t})=>v("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:[v("path",{d:"M18 6 6 18"}),v("path",{d:"m6 6 12 12"})]}),qv=({size:t})=>v("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:v("path",{d:"m15 18-6-6 6-6"})}),Ph={title:"Hi there 👋",subtitle:"We typically reply within a few minutes"},Yv=()=>{var f,m,g,_,w,E;const{setChatOpen:t,setOpenConversationId:e,guildSettings:n,conversations:r,openConversationId:i}=ot(),o=r.find(x=>x.status==="open"),s=!!i,a=r.length===1&&r[0].status==="closed",c=r.length>1,h=s&&(a||c),l=i&&(o!=null&&o.csMember)&&((f=o==null?void 0:o.csMember)==null?void 0:f.displayName)!=="Customer support"?{title:(m=o==null?void 0:o.csMember)==null?void 0:m.displayName,subtitle:(g=o==null?void 0:o.csMember)!=null&&g.status?Iw((_=o==null?void 0:o.csMember)==null?void 0:_.status):null,avatar:(w=o==null?void 0:o.csMember)==null?void 0:w.displayAvatarURL,status:(E=o==null?void 0:o.csMember)==null?void 0:E.status}:{title:(n==null?void 0:n.header_title)??Ph.title,subtitle:(n==null?void 0:n.header_subtitle)??Ph.subtitle,avatar:(n==null?void 0:n.iconURL)||"https://i.imgur.com/ecjl5HR.png"};return v("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:[h&&v(Ah,{onClick:()=>e(null),IconComponent:qv}),v("div",{className:"relative inline-block mr-3",children:[v("img",{className:"inline-block w-[40px] rounded-full",src:l.avatar}),l.status&&v("span",{className:`absolute top-0 end-0 block size-3.5 rounded-full ring-2 ring-white dark:ring-neutral-900 ${nh(l.status,"bg")}`})]}),v("div",{className:"flex-1 flex-col",children:[v("p",{className:"text-lg/5 font-regular",children:l.title}),l.subtitle&&v("p",{className:"flex-1 text-xs/4 line-clamp-2",children:l.subtitle})]}),v(Ah,{onClick:()=>t(!1),IconComponent:Kv})]})};function Gv(){const[t,e]=j({width:null,height:null});return oe(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n),()=>{window.removeEventListener("resize",n)}},[]),t}const Xv=()=>{const t=Gv();return!t.width||!t.height?!1:t.width>t.height?t.width<=td||t.height<=Oy:t.width<=td},Zv=()=>{const{openConversationId:t,conversations:e,isChatVisible:n}=ot(),r=Xv(),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 v(vo,{children:n&&v(ce.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:v("div",{className:`flex flex-col h-full bg-white shadow-xl overflow-hidden ${r?"":"rounded-xl"}`,children:[v(Yv,{}),i?v(Hv,{}):v(Pw,{})]})},"chatbox")})};async function Jv(){const{setGuildSettings:t,guildSettings:e}=ot.getState();if(e.lastUpdate)return;const n=new Headers;n.append("Content-Type","application/json");try{const i=await(await fetch(`${Dt.domain}/guildSettings/${Dt.app_id}`,{method:"GET",headers:n})).json();t(i)}catch{}}async function Qv(){const t=new Headers;t.append("Content-Type","application/json");try{return(await(await fetch(`${Dt.domain}/guildSettings/status/${Dt.app_id}`,{method:"GET",headers:t})).json()).active}catch{return!1}}function t_(t,e){const n=F(document.title),r=F(null),i=F(!1);U(()=>{n.current||(n.current=document.title)},[]),U(()=>{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]),U(()=>{if(e&&t>0&&i.current){const o=t>1?"s":"";document.title=`(${t}) New message${o} - ${n.current}`}},[t,e])}function e_(){const[t,e]=j(Fs);return U(()=>{const n=()=>e(Fs());return document.addEventListener("visibilitychange",n),window.addEventListener("focus",n),window.addEventListener("blur",n),()=>{document.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n),window.removeEventListener("blur",n)}},[]),t}function n_(){const{isChatOpen:t,setChatVisible:e,toggleChatOpen:n,isNetworkInitialized:r,setNetworkInitialized:i,username:o,email:s,addMessage:a,conversations:c,_REHYDRATED_:h,networkError:l,isLoading:f,unreadCount:m,markMessagesAsReadWithSync:g,syncUnreadCountFromServer:_,initializeUnreadState:w}=ot(),[E,x]=j(!1),C=e_();t_(m,m>0&&(!t||!C)),U(()=>{t&&C&&m>0&&g()},[t,C,m,g]),U(()=>{(async()=>{const I=await Qv();x(I)})()},[]),U(()=>{w()},[w]);const k=Q(()=>(!o||!s)&&!c.filter(N=>N.messages.filter(A=>A.customRenderer===cn.IntroduceYourself)).length?(a("TEMP",Ky),!0):!1,[o,s,a,c]);return U(()=>{h&&(async()=>(await Jv(),!k()&&(o||s)&&!r&&($v(),i(!0),_())))()},[r,i,k,_,o,s,h]),U(()=>{if(t)e(!0);else{const I=setTimeout(()=>e(!1),300);return()=>clearTimeout(I)}},[t,e]),E?v(Z,{children:[v(jg,{onClick:()=>n(),isOpen:t,unreadCount:m}),v(Zv,{}),v(()=>l?v("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:[v("strong",{children:"Connection Error"}),v("p",{style:{margin:"4px 0 0 0",fontSize:"12px"},children:l})]}):null,{}),v(()=>!f||!t?null:v("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..."}),{}),v("div",{id:"deskcord-lightbox-portal",style:{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",zIndex:2147482e3,pointerEvents:"none"}})]}):null}const r_=()=>{const t=F(null),[e,n]=j(null),[r,i]=j(null);return U(()=>{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=`
|
|
109
109
|
all: initial;
|
|
110
110
|
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
111
111
|
font-size: 16px;
|
|
112
112
|
line-height: 1.5;
|
|
113
113
|
color: #000;
|
|
114
114
|
box-sizing: border-box;
|
|
115
|
-
`,o.appendChild(s));let a=o.querySelector("#deskcord-tailwind-styles");a||(a=document.createElement("style"),a.id="deskcord-tailwind-styles",a.textContent=
|
|
115
|
+
`,o.appendChild(s));let a=o.querySelector("#deskcord-tailwind-styles");a||(a=document.createElement("style"),a.id="deskcord-tailwind-styles",a.textContent=ef,o.insertBefore(a,o.firstChild));let c=o.querySelector("#deskcord-lightbox-styles");c||(c=document.createElement("style"),c.id="deskcord-lightbox-styles",c.textContent=nf,o.insertBefore(c,a.nextSibling));let h=o.querySelector("#deskcord-reset-styles");return h||(h=document.createElement("style"),h.id="deskcord-reset-styles",h.textContent=`
|
|
116
116
|
/* Reset styles to ensure isolation from parent page */
|
|
117
117
|
:host {
|
|
118
118
|
all: initial;
|
|
@@ -143,4 +143,4 @@
|
|
|
143
143
|
-webkit-font-smoothing: antialiased;
|
|
144
144
|
-moz-osx-font-smoothing: grayscale;
|
|
145
145
|
}
|
|
146
|
-
`,o.insertBefore(h,o.firstChild)),n(o),i(s),()=>{}},[]),
|
|
146
|
+
`,o.insertBefore(h,o.firstChild)),n(o),i(s),()=>{}},[]),v(Z,{children:[v("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&&He.createPortal(v(i_,{value:e,children:v(n_,{})}),r)]})},Ih=He.createContext(null),i_=({value:t,children:e})=>v(Ih.Provider,{value:t,children:e});window.deskcord?window.deskcord.openChatbox=()=>{ot.getState().setChatOpen(!0)}:window.deskcord={settings:{app_id:""},openChatbox:()=>{}};let er=document.getElementById("deskcord-root");er||(er=document.createElement("div"),er.id="deskcord-root",document.body.appendChild(er)),He.render(v(He.StrictMode,{children:v(r_,{})}),er)})();
|